Hello everyone
I want to implement iris recognition algorithm in MATLAB. In the first step I have to localize iris region and I use circular hough transform and canny edge detector for this purpose. The problem is that I have to determine the canny threshold and the inner and outer radii for iris myself for each image since they are different in different images unless it draws some unrelated circles. I want to know how can I make this localization adaptive with all the images?
Thank you
Iris Localization in iris recognition algorithm
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Iris Localization in iris recognition algorithm
[Mod note: As the question isn't about using ImageMagick, but a more general image processing problem (using a different product), I'm moving this to the Digital Image Processing forum.]
Can you link to some sample images? You can upload to dropbox.com or similar, and paste the URLs here.
My first thought is "trial and error". If Canny makes too many or too few edges, adjust the parameters.
Can you link to some sample images? You can upload to dropbox.com or similar, and paste the URLs here.
My first thought is "trial and error". If Canny makes too many or too few edges, adjust the parameters.
snibgo's IM pages: im.snibgo.com
Re: Iris Localization in iris recognition algorithm
I uploaded them in the following link
https://www.dropbox.com/sh/te6lpd2p5qiu ... dsJHa?dl=0
https://www.dropbox.com/sh/te6lpd2p5qiu ... dsJHa?dl=0
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Iris Localization in iris recognition algorithm
Those seem to be outputs. I guess that untitled.png is a desired output, and untitled2.png is not a desired output. Is that right?
Can you provide the input?
Can you provide the input?
snibgo's IM pages: im.snibgo.com
Re: Iris Localization in iris recognition algorithm
yes that's right. When I change the input, it draws undesired circles and each time I have to adjust the parameters. I uploaded the code and the input image in the following link:
https://www.dropbox.com/sh/hak8n1euh3sb ... nzHaa?dl=0
https://www.dropbox.com/sh/hak8n1euh3sb ... nzHaa?dl=0
Re: Iris Localization in iris recognition algorithm
I provide you with some other inputs to check:
https://www.dropbox.com/sh/riio6yi2yu2c ... yWuIa?dl=0
https://www.dropbox.com/sh/riio6yi2yu2c ... yWuIa?dl=0
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Iris Localization in iris recognition algorithm
Sorry, I don't know Matlab.
One approach:
1. Examine just the blue channel. This darkens skin, with respect to the eye.
2. Take a slice of that image: the full width, and the central 50% of the height. We assume this will include the centre of the eye.
3. Scale it to one line, a single pixel high.
4. Find the peak in the left half, and the peak in the right half.
Here's the Windows BAT script:
I show these results visually:
These peaks defines the left and right side of the iris. (To find the peaks, chop the Nx1 image in half, autolevel each half, and find the first white pixel.) Now we know the diameter of the iris, and the x-coord of the centre.
Finding the vertical location of the centre is harder because of the variation in the eyelids. Perhaps trial and error would given the best solution.
For the pupil, we can examine the saturation channel. The pupil is low saturation (dark in these images); the iris is higher saturation (lighter).
We assume the pupil is concentric with the iris. So, again, we can take a thin slice through the image, this time through the centre of the circles. We look for the start and end of the dark portion.
One approach:
1. Examine just the blue channel. This darkens skin, with respect to the eye.
2. Take a slice of that image: the full width, and the central 50% of the height. We assume this will include the centre of the eye.
3. Scale it to one line, a single pixel high.
4. Find the peak in the left half, and the peak in the right half.
Here's the Windows BAT script:
Code: Select all
for %%F in (Img*.jpg) do (
for /F "usebackq" %%L in (`%IM%identify ^
-format "WW=%%w\nHH=%%h" ^
%%F`) do set %%L
%IM%convert ^
%%F ^
-channel B -separate +channel ^
-gravity Center -crop 100%%x50%%+0+0 +repage ^
+write eye_%%F_s.png ^
-scale "%WW%x1^!" -auto-level ^
+write eye_%%F_s2.png info:
call %PICTBAT%graphLineCol eye_%%F_s2.png
%IM%convert eye_%%F_s2_glc.png eye_%%F_s.png %%F -append eye_%%F_s2a.png
)
These peaks defines the left and right side of the iris. (To find the peaks, chop the Nx1 image in half, autolevel each half, and find the first white pixel.) Now we know the diameter of the iris, and the x-coord of the centre.
Finding the vertical location of the centre is harder because of the variation in the eyelids. Perhaps trial and error would given the best solution.
For the pupil, we can examine the saturation channel. The pupil is low saturation (dark in these images); the iris is higher saturation (lighter).
Code: Select all
for %%F in (Img*.jpg) do (
%IM%convert ^
%%F ^
-colorspace HCL ^
-channel G -separate +channel ^
-auto-level ^
eye_%%F_sat.png
)
We assume the pupil is concentric with the iris. So, again, we can take a thin slice through the image, this time through the centre of the circles. We look for the start and end of the dark portion.
snibgo's IM pages: im.snibgo.com
Re: Iris Localization in iris recognition algorithm
Thank you very much.
I'll work on it.
I'll work on it.