Professional Documents
Culture Documents
BINARY ( INPUT<30 )
But we can see there are some black holes in the pupil which will
affect our output ( in BINARY matrix ). We can see these black
holes which are inside the pupil are surrounded by intensities
values equal to 1. We can use this to fill these holes. We run a
matrix loop of size 31*31 to 3*3 (just hit and try) in the whole
BINARY matrix whose boundaries intensity values are 1. Like you
can see below
center of the pupil. For that we will find the maximum value in the
new matrix h with command find let that value is n. Then we will
find the coordinate for that value n. Then calculate the mean for
both x and y coordinate and that will the final center for pupil and
radius will be n/
2. Let consider upper example in which
maximum length of matrix is 5 then radius will be 5/2 and center
will be (5, 4).
Iris Detection
Now consider the BINARY matrix from right side we run a loop
which will only find the first 1 in every row and find there
distances from the center same as from the left side and store all
the distances in a new matrix name distance. Then find the
value in matrix distance which will repeated more times. And
that will be the radius of the iris. Now we know radius for both
pupil and iris and we can now easily separate the iris part. Form
the whole eye image. And we store the final iris segmentation
image in a new matrix name irisseg which look like
Find angle for all pixels which are in iris w.r.t. center. Let the
coordinate of center are ( x, y ) and coordinate of any pixel in iris
region is ( i, j ) then the angle will be theta = atan ( abs( (j-y )/ (ix) ) ) now there will be several conditions like if ( j-y ) > 0 and ( i-x
)<0 then new theta will be (-theta) so on. Then we take a new
matrix DATA which store of theta and coordinate for all pixels
which are in the iris. Like see below
We can see that in the table some angles are repeating itself
thats why we will find the angle which repeats maximum times
and that maximum value will be the width of our rectangle and
length will from 1 to 360 that will same in all cases. And we know
coordinate of all pixels than we can easy fill the intensity of these
pixels in the rectangle. And the final rectangle will look like this