Ask Your Question
0

houghCircles to detect pupil

asked 2016-01-19 11:05:25 -0500

SiPL gravatar image

updated 2016-01-20 23:10:34 -0500

Hello :D I'm trying to detect circles in detected eyes but houghCircles fail to detect any circles. This is my code http://pastebin.com/QnyJNaT3

What could be the problem? Please help me.

Edit: I think i found why it can't detect any circles.

After detecting i tried showing the image.

Detected eyes here: eye_cascade.detectMultiScale(faceROI, eyes, 1.1, 1, 0, Size(30, 30));

Stored the first detected eye image in eyeROI: Mat eyeROI = gray_img(eyes[0]);

Display eyeROI: imshow("eye", eyeROI);

What i saw was that it is showing parts of objects beside my detected eye. Sometimes a part of my room door which is next o my face and sometimes a part of my hair. Its not showing the detected eye and maybe thats why houghcircles failed to detect any circular objects. What could be the problem?

Edit 2: The second problem is fixed. Now just cant get it to detect houghcircles in eye image window.

edit retag flag offensive close merge delete

Comments

@hi, SiPL, if you could add an example image ?

berak gravatar imageberak ( 2016-01-19 11:08:06 -0500 )edit

Hi berak, i'm so sorry for replying late. I'm taking a live video from a webcam as input. When i try to detect in the entire video frame it detects other circles such as a DVD but fails to detect pupil. Is that because i haven't given any image transformations?

SiPL gravatar imageSiPL ( 2016-01-19 12:14:29 -0500 )edit
1
sturkmen gravatar imagesturkmen ( 2016-01-20 15:22:04 -0500 )edit

Ty :D I'll look at it and try if it works

SiPL gravatar imageSiPL ( 2016-01-20 23:11:21 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-01-20 04:44:23 -0500

Like said on freenode, take a look at the iris localisation algorithm I have written for the OpenCV 3 Blueprints book and which can be found here.

It is also based on Hough circle localisation to find the outer and inner contour of the iris.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-01-19 11:05:25 -0500

Seen: 1,131 times

Last updated: Jan 20 '16