2

I have been trying to detect the iris region of an eye and thereafter draw a circle around the detected area. I have managed to obtain a clear black and white eye image containing just the pupil, upper eyelid line and eyebrow using threshold function.

Once this is achieved HoughCircles is applied to detect if there are circles appearing in the image. However, it never detects any circular regions. After reading up on HoughCircles, it states that

the Hough gradient method works as follows:

First the image needs to be passed through an edge detection phase (in this case, cvCanny()).

I then added a canny detector after the threshold function. This still produced zero circles detected. If I remove the threshold function, the eye image becomes busy with unnecessary lines; hence I included it in.

cv::equalizeHist(gray, img);
medianBlur(img, img, 1);

IplImage img1 = img;
cvAddS(&img1, cvScalar(70,70,70), &img1);
//converting IplImage to cv::Mat  
Mat imgg = cvarrToMat(&img1);

medianBlur(imgg, imgg, 1);
cv::threshold(imgg, imgg, 120, 255, CV_THRESH_BINARY);
cv::Canny(img, img, 0, 20);

medianBlur(imgg, imgg, 1);

vector<Vec3f> circles;
/// Apply the Hough Transform to find the circles
HoughCircles(imgg, circles, CV_HOUGH_GRADIENT, 1, imgg.rows/8, 100, 30, 1, 5);
  • How can I overcome this problem?
  • Would hough circle method work?
  • Is there a better solution to detecting the iris region?
  • Are the parameters chosen correct?

Also note that the image is directly obtained from the webcam.

4

2 回答 2

0

双眼图像包含三个不同方面的睫毛,眼睛和眉毛。主要目的是到达感兴趣的区域,即眼睛/虹膜,不包括眉毛和睫毛。我按照以下步骤操作:-

Step 1:丢弃上半部分的眼睛图像,留下睫毛、眼部区域和小阴影区域。

第 2 步:找到轮廓

第三步:找到最大的轮廓,这样我们就只有眼睛区域

第 4 步:使用边界框在眼睛区域周围创建一个矩形 http://docs.opencv.org/doc/tutorials/imgproc/shapeescriptors/bounding_rects_circles/bounding_rects_circles.html

现在我们有了感兴趣的区域。从这一点开始,我现在正在对这些图像进行精确处理,并使用神经网络来训练系统来模拟鼠标的属性。我目前正在学习神经网络 link1以及如何在 opencv 中使用它。

使用以前的方法,包括检测虹膜点、创建眼睛矢量、跟踪它和计算屏幕上的掠过是非常耗时的。而且虹膜上反射的光也很难检测到。

于 2013-08-13T18:26:45.947 回答
0

尝试使用 Daugman 的 Integro 微分算子。它计算虹膜和瞳孔的中心,并在虹膜和瞳孔边界上绘制一个精确的圆。MATLAB 代码可在此处使用 Daugman 方法进行虹膜边界检测。由于我不熟悉 OpenCV,您可以转换它。

于 2013-08-02T07:55:00.583 回答