Closed YeriAddict closed 2 weeks ago
Step 1: https://stackoverflow.com/questions/53874176/plotting-histogram-of-vertical-projection-of-an-image Horizontal projection: row wise sum Vertical projection: column wise sum
https://stackoverflow.com/questions/40200070/what-does-axis-0-do-in-numpys-sum-function
horizontal_projection = np.sum(self.image, axis=0)
vertical_projection = np.sum(self.image, axis=1)
Steps:
Project the image in the vertical and horizontal direction to approximately estimate the center coordinates (Xp; Yp) of the the pupil. Since the pupil is generally darker than its surroundings, the coordinates corresponding to the minima of the two projection profiles are considered as the center coordinates of the pupil.
Binarize a 120x120 region centered at the point(Xp; Yp) adaptively selecting a reasonable threshold using the gray-level histogram of this region. The centroid of the resulting binary region is considered as a more accurate estimate of the pupil coordinates. In this binary region, we can also roughly compute the radius of the pupil
Calculate the exact parameters of these two circles using edge detection (Canny operator in experiments) and Hough transform in a certain region determined by the center of the pupil.
Goal:
In IrisLocalization.py, return two tuples
(Xp, Yp, Rp)
: Coordinates for the inner boundary (pupil)(Xs, Ys, Rs)
: Coordinates for the outer boundary (sclera)Maybe return the image with only the iris, rest in black (like in paper)