Thread Subject: Eye Detection Help Needed

Subject: Eye Detection Help Needed

From: Fake Ghost

Date: 22 May, 2009 02:53:02

Message: 1 of 1

I=imread('int.jpg');%original Image
I=rgb2gray(I);
p=80;
eye=rgb2gray(imread('eye1.jpg'));%eye Template
I=imresize(I,[p p]);
eye(p,p)=0; %make the padding of zeros to make it equal size.
fi=fftn(I);
fr=fftn(eye);
fc = fi .* conj(fr);
fcn = fc ./ abs(fc);
c = real(ifft2(fcn));
[v index] = max(c(:));
siz=80;
[y x] = ind2sub(siz,index);
% invert quadrants due to fft shift
mid = siz(1) / 2;
y = y - sign(y-mid-0.5) * mid
x = x - sign(x-mid-0.5) * mid

Now These X and y are the eye co-ordinates.
what i want to do is how i can merge it into some other module. like i am detecting face in live video stream. i want to merge it into that code. but i dont know what condition to be used to that purpose

like i have tried max(max(c))>0.2 then its have detected the eye but i have gives true as well as false results. the accuracy rate is only 50-60%. so please help how i can improve my code to achieve accuracy.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
template matching Fake Ghost 21 May, 2009 22:54:03
detection Fake Ghost 21 May, 2009 22:54:03
eye Fake Ghost 21 May, 2009 22:54:02
rssFeed for this Thread

Contact us at files@mathworks.com