Why HoughCircles returns 0 circles while trying to detect irises?

Viewed 2869

I am trying to detect the eyes' irises but HoughCircles returns 0 circles.

The input image(eyes) is:

Input image

Then I made the following things with this image:

cvtColor(eyes, gray, CV_BGR2GRAY);
morphologyEx(gray, gray, 4,cv::getStructuringElement(cv::MORPH_RECT,cv::Size(3,3)));
threshold(gray, gray, 0, 255, THRESH_OTSU);
vector<Vec3f> circles;
HoughCircles(gray, circles, CV_HOUGH_GRADIENT, 2, gray.rows/4);
if (circles.size())
        cout << "found" << endl;

So the final gray image looks like this:

Output image

I've found this question Using HoughCircles to detect and measure pupil and iris but it didn't help me despite the similarity with my issue.

So why does HoughCircles return 0 circles while trying to detect irises? If someone knows any better way to find irises, you are welcome.

1 Answers
Related