Page 1 of 1

Iris Localization in iris recognition algorithm

Posted: 2015-03-22T14:13:08-07:00
by behnamj
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

Re: Iris Localization in iris recognition algorithm

Posted: 2015-03-22T14:25:13-07:00
by snibgo
[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.

Re: Iris Localization in iris recognition algorithm

Posted: 2015-03-23T15:38:47-07:00
by behnamj
I uploaded them in the following link
https://www.dropbox.com/sh/te6lpd2p5qiu ... dsJHa?dl=0

Re: Iris Localization in iris recognition algorithm

Posted: 2015-03-23T16:02:16-07:00
by snibgo
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?

Re: Iris Localization in iris recognition algorithm

Posted: 2015-03-26T03:52:21-07:00
by behnamj
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

Re: Iris Localization in iris recognition algorithm

Posted: 2015-03-26T03:57:04-07:00
by behnamj
I provide you with some other inputs to check:

https://www.dropbox.com/sh/riio6yi2yu2c ... yWuIa?dl=0

Re: Iris Localization in iris recognition algorithm

Posted: 2015-03-26T06:47:18-07:00
by snibgo
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:

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

)
I show these results visually:

Image
Image
Image
Image
Image
Image
Image
Image

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
)
Image
Image
Image
Image
Image
Image
Image
Image

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.

Re: Iris Localization in iris recognition algorithm

Posted: 2015-04-01T02:53:11-07:00
by behnamj
Thank you very much.
I'll work on it.