From: wilson on
I din't explain for it details sorry the main thing i wanna do now is find the boundry of the iris and retina, i just wanna find the 2 circle from the eyes, this is almost the last part of my research after finish this the continue onwards thing i can handle by myself d!I had try hard on this about 3 weeks but i can't manage to get any solution and the deadline is almost near.Sorry because i din't had any other sources to learn from so i just post question to here and please for u to teach me up for the last time! Anyways thanks for your help sincerely u do help me a lots!
From: wilson on
Sorry image Analysis need to disturb u again
Image of the eye direct crop from here:
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

subplot(2,3,1);
%rgbImage = imread('eye123.jpg');
rgbImage = imread('eye234.jpg');
imshow(rgbImage);
title('Original Image');
set(gcf, 'Position', get(0,'Screensize'))

redPlane = rgbImage(:,:,1);
thresholdValue =90;
binaryImage = redPlane > thresholdValue; % Dark objects will be the chosen if you use <.
%binaryImage = ~binaryImage;
subplot(2,3,2);
imshow(binaryImage, []);
title('Binary Image');
%imshow(binaryImage, []);
%title('Thresholded');

% 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,350);
binaryImage = imfill(binaryImage, 'holes');
subplot(2,3,3);
imshow(binaryImage, []);
title('Just the iris');

% Label this image.
labeledImage2 = bwlabel(binaryImage);
% Find the bounding box of the eyes.
blobMeasurements2 = regionprops(labeledImage2, 'BoundingBox'); %measures a set of properties for each labeled region in the label matrix labledImage2
numberOfBlobs = length(blobMeasurements2);

% Plot the bounding box of the eyes over the original image.
subplot(2,3,1);
hold on; % Don't let image get blown away by the plotting of the box.
for k = 1 : numberOfBlobs % Loop through all blobs.
blobBoundingBox = blobMeasurements2(k).BoundingBox; % Get centroid.
end

% Crop out this blob.
row1 = blobBoundingBox(2);
col1 = blobBoundingBox(1);
row2 = row1 + blobBoundingBox(4) - 2;
col2 = col1 + blobBoundingBox(3) - 2;

% Get the box (x,y) coordinates.
x = [col1 col2 col2 col1 col1];
y = [row1 row1 row2 row2 row1];
plot(x,y, 'r', 'LineWidth', 2);


% Crop the eye and put it in a new image
croppedImage = rgbImage(row1:row2, col1:col2, :);
subplot(3, 3, 7);
imshow(croppedImage);

I cant manage to crop the iris of the eye why is that anything wrong in the code?
one more thing if the iris got reflection how to remove the reflection? Filtering?
Then the circle of the iris and retina is using Hough Transform method?
First  |  Prev  | 
Pages: 1 2
Prev: Load m-file
Next: Password Entry Using Inputdlg