I am trying to detect the eyes' irises but HoughCircles
returns 0 circles.
The input image(eyes) is:
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:
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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…