Detecting retinal microaneurysms and hemorrhages with robustness to the presence of blood vessels