From: wilson on
How can i do based on the picture:
http://www.merl.com/projects/images/irisrecognition.jpg
How can i get the boundry of the iris and the retina? How can i create the cricle on that?I try using hough transform but i can't manage to get the circle! I am just a beginner learner so i need some advice!
From: ImageAnalyst on
It's not super robust but it works with this image. You can tweak it
a bit to make it more robust (work with different colored eyes, etc.)
Be sure to fix line breaks introduced by the newsreader.


% Demo to outline the iris.
% by ImageAnalyst
clc;
close all;
clear all;
subplot(2,2,1);
rgbImage = imread(irisrecognition.jpg');
imshow(rgbImage);
title('Original Image');
set(gcf, 'Position', get(0,'Screensize'))

subplot(2,2,2);
redPlane = rgbImage(:,:,1);
thresholdValue = 119;
binaryImage = redPlane < thresholdValue; % Dark objects will be the
chosen if you use <.
imshow(binaryImage, []);
title('Thresholded the Red Channel');

% Do a "hole fill" to get rid of any background pixels inside the
blobs.
binaryImage = imfill(binaryImage, 'holes');
% Get rid of blobs less than 800 pixels in area.
binaryImage = bwareaopen(binaryImage, 20000);
subplot(2,2,3);
imshow(binaryImage, []);
title('Just the iris');

% Do connected componenets labeling.
labeledImage = bwlabel(binaryImage, 8); % Label each blob so we
can make measurements of it
% Get all the blob properties. Can only pass in original image in
version R2008a and later.
blobMeasurements = regionprops(labeledImage, redPlane, 'all');
numberOfBlobs = size(blobMeasurements, 1);
fprintf(1,'Blob # Mean Intensity Area Perimeter Centroid
\n');
for k = 1 : numberOfBlobs % Loop through all blobs.
% Find the mean of each blob. (R2008a has a better way where you can
pass the original image
% directly into regionprops. The way below works for all versions
including earlier versions.)
thisBlobsPixels = blobMeasurements(k).PixelIdxList; % Get list of
pixels in current blob.
meanGL = mean(redPlane(thisBlobsPixels)); % Find mean intensity
(in original image!)
meanGL2008a = blobMeasurements(k).MeanIntensity; % Mean again, but
only for version >= R2008a

blobArea = blobMeasurements(k).Area; % Get area.
blobPerimeter = blobMeasurements(k).Perimeter; % Get perimeter.
blobCentroid = blobMeasurements(k).Centroid; % Get centroid.
fprintf(1,'#%d %18.1f %11.1f %8.1f %8.1f %8.1f\n', k, meanGL,
blobArea, blobPerimeter, blobCentroid);

end

subplot(2,2,4);
imshow(rgbImage);
% Display it as if it were a perfect circle.
equivCircularDiameter = 2 * sqrt(blobMeasurements(1).Area / pi);
xcenter = blobMeasurements(1).Centroid(1);
ycenter = blobMeasurements(1).Centroid(2);
leftColumn = xcenter - equivCircularDiameter/2;
topRow = ycenter - equivCircularDiameter/2;
set(gca, 'units', 'pixels');
rectangle('Position',
[leftColumn,topRow,equivCircularDiameter,equivCircularDiameter],'Curvature',
[1,1], 'linewidth', 5, 'EdgeColor', [0 1 0])
title('Image with iris outlined in green');
From: wilson on
ImageAnalyst if i wanna use this image
http://images.google.co.uk/imgres?imgurl=http://salmaworld.files.wordpress.com/2009/09/beautiful-face-wallpapers_11213_1280x1024.jpg&imgrefurl=http://www.mathworks.co.uk/matlabcentral/newsreader/search_results%3Fsearch_string%3Drgb2gray%26view%3Dtext&usg=__MNo8LkQe-DN9sfH4e5E7n5evko0=&h=1024&w=1280&sz=181&hl=en&start=74&itbs=1&tbnid=Drqc8jryXDj1gM:&tbnh=120&tbnw=150&prev=/images%3Fq%3Dface%26gbv%3D2%26ndsp%3D18%26hl%3Den%26sa%3DN%26start%3D72

I wan to find the boudry of iris and retina so how to do it? Just want the circle of the 2 blob like show in http://www.merl.com/projects/images/irisrecognition.jpg. How to draw out the 2 circle by using matlab?
From: wilson on
i'm using matlab 7.1 so i cant manage to run the program right?
From: ImageAnalyst on
On Dec 10, 9:52 pm, "wilson " <wilson_silver3...(a)hotmail.com> wrote:
> ImageAnalyst if i wanna use this image....
-----------------------------------------------------------------------
Then why did you tell me the other one? Algorithms that work on giant
round irised won't necessarily work on small tiny irises. Anyway I've
probably spent more time developing code for you than anyone else
here. You should be able to handle it from here on out.

Please upgrade to the latest MATLAB since I can't be aware of what
versions various functionality came into existence. All I know is
what I have and that is release R2009b, which is the latest right now.
 |  Next  |  Last
Pages: 1 2
Prev: Load m-file
Next: Password Entry Using Inputdlg