An apparatus has an image capture sensor which captures a reference image of a retro-illuminated unstained capsule of an eye. After the ocular structure has been stained with a dye for an ophthalmic surgical procedure a second image is captured as a measurement image via the image capture sensor. An evaluation module compares the reference image and the measurement image taken after the staining of the ocular structure. The evaluation module from the comparison of the reference and measurement images then determines the local light attenuation by the introduced dye. The staining of the eye can also be determined by only imaging a stained ocular structure of an eye and evaluating the images on the basis of predetermined acceptance values.