计算机应用 ›› 2016, Vol. 36 ›› Issue (5): 1415-1420.DOI: 10.11772/j.issn.1001-9081.2016.05.1415

• 虚拟现实与数字媒体 • 上一篇    下一篇

Hough变换和轮廓匹配相结合的瞳孔精确检测算法

毛顺兵   

  1. 西南大学 计算机与信息科学学院, 重庆 400715
  • 收稿日期:2015-11-02 修回日期:2015-12-28 出版日期:2016-05-10 发布日期:2016-05-09
  • 通讯作者: 毛顺兵
  • 作者简介:毛顺兵(1977-),男,四川简阳人,助教,硕士,主要研究方向:图像处理。
  • 基金资助:
    中央高校基本科研业务费专项资金资助项目(XDJK2016C104)。

Exact pupil detection algorithm combining Hough transformation and contour matching

MAO Shunbing   

  1. School of Computer and Information Science, Southwest University, Chongqing 400715, China
  • Received:2015-11-02 Revised:2015-12-28 Online:2016-05-10 Published:2016-05-09
  • Supported by:
    This work is partially supported by the Fundamental Research Funds for the Central Universities (XDJK2016C104).

摘要: 针对红外眼部视频中瞳孔直径检测精度不够高的问题,提出了一种将Hough圆变换和轮廓匹配相结合的瞳孔检测算法(Hough-Contour)。对每帧图像,首先进行灰度化并滤波去噪;然后提取边缘并利用修改后的Hough梯度法检测出初始圆作为瞳孔参数;最后在滤波后的灰度图上的瞳孔附近用位置和半径在一定范围可变的圆形轮廓去匹配瞳孔,从而计算出瞳孔中心坐标和直径。在Hough变换阶段,将Hough梯度法中的对候选圆心按累加值降序排序这一步骤改为寻找最大值,以降低该操作以及后续计算半径的时耗。通过实验寻找到圆心累加数组最大值的阈值,使其能自动排除闭眼帧且不会导致漏检。在轮廓匹配阶段,实验发现如果圆形轮廓的移动范围和半径伸缩范围取值为初始圆半径的十分之一,点对数取值为40,则可将瞳孔的精确匹配率从OpenCV圆变换检测算法的约10%提高至99.8%。对算法的时间性能作了测试,在实验所用的低端电脑上处理一帧需要60 ms,在高端电脑上可以对红外瞳孔视频做到实时检测。

关键词: 瞳孔检测, Hough变换, 轮廓匹配, 红外视频, OpenCV

Abstract: In order to improve the precision of detection on the diameter of pupils in infrared eye videos, an exact pupil detection algorithm (Hough-Contour) combining Hough transformation and contour matching was proposed. Firstly, each image frame was grayed and filtered; secondly, the edge of the image was extracted and the initial circle was detected and taken as the pupil parameter by the revised Hough gradient method; finally, around the pupil, a circular contour whose position and radius varies in a limited range was used to match the pupil, realizing the calculation of pupil center's coordinate and diameter. In the phase of Hough transformation, the descending sort of candidate circle centers according to their accumulated values in Hough transformation was turned into searching for their maximum, in order to reduce the time consumption of this proceeding and the calculation of radius later. In the experiment, the threshold of the maximum in the array of accumulated values was searched and the image frames of closing eyes were excluded by this threshold. In the phase of contour matching, the experiment shows that if the range of the circular contour moving and stretching was assigned one tenth of the radius of the initial circle, and if the number of point pairs was assigned 40, the precision of detection on pupils would reach 99.8% from around 10% which was attained by OpenCV circle transformation. In the experiments on time performance, the proposed algorithm needed 60 ms to process one frame on the low-end computers, and the real-time detection on infrared eye videos can be achieved on the high-end computers.

Key words: pupil detection, Hough transformation, contour matching, infrared video, OpenCV

中图分类号: