separate iris from eye
Show older comments
i am doing a iris detection project,,,in that i have code to detect and plot circles around the iris but now i want to separate the iris part only from the eye image,,,i am trying to us e edge detection and imcrop techniques but not work suggest any way
9 Comments
Matt Kindig
on 27 Sep 2012
What is "not working" about edge detection techniques? Can you show us both your image as well as your Matlab code?
lakshmi
on 27 Sep 2012
Edited: Walter Roberson
on 27 Sep 2012
lakshmi
on 27 Sep 2012
Edited: Walter Roberson
on 27 Sep 2012
lakshmi
on 27 Sep 2012
lakshmi
on 27 Sep 2012
Image Analyst
on 27 Sep 2012
Looks like you got the iris, so all that's left to do is to crop it out. So use any() and find() to locate the top and bottom rows, and left and right columns, then use imcrop to crop it out. Demo code is in my tutorial.
lakshmi
on 28 Sep 2012
mathcafe123@gmail.com mathcafe123@gmail.com
on 17 Feb 2017
hi lakshmi may you please give me the code for detect the iris and pupil?
Answers (1)
Image Analyst
on 27 Sep 2012
0 votes
What is thresh() and the ci that it returns? But anyway, basically this looks just like simple thresholding, like I do in my Image Segmentation Tutorial to find coins in an image. I suggest you look at that demo. It does just like you are doing - threshold to find round objects, then crop them from the image to form small cropped sub-images. I think this is what you said you want to do.
As far as your edge detection code goes, you aren't doing anything with it. You simply get an edge image and then display it. Of course that would require lots of additional processing most likely since I envision all kinds of edges, like where the white of the eye hits the eyelids, where the eyelashes are, striations in the iris itself, etc.
Have you tried imfindcircle()?
7 Comments
lakshmi
on 27 Sep 2012
Image Analyst
on 27 Sep 2012
It's fairly new. What version of MATLAB do you have? See http://www.mathworks.com/help/images/ref/imfindcircles.html Make sure you expand the examples and look at them.
lakshmi
on 28 Sep 2012
Image Analyst
on 28 Sep 2012
I don't have the Neural Network toolbox - I use just standard methods.
lakshmi
on 28 Sep 2012
Image Analyst
on 28 Sep 2012
You haven't uploaded the image yet, just a screenshot. And why can't you upgrade to the latest MATLAB so you can use imfindcircle? Did you not get the maintenance agreement?
What you're trying to do (minus the neural network toolbox part) falls within the scope of this tutorial by Image Analyst.
You will not be able to create a circular image of just the iris, it will need to be square to fit into a matrix so Matlab can process it. The background will simply be a known value that you can disregard in further processing. Typically a background value of 0 works well.
Categories
Find more on Object Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!