简体   繁体   English

MATLAB中的眼睛检测

[英]Eye-detection in MATLAB

I have two images. 我有两张照片。 In one of the images, my eye is in the center position and in the other image, it is in the left. 在其中一个图像中,我的眼睛位于中心位置,而在另一个图像中,它位于左侧。 How do I find out whether my eye is in the left or the right? 如何判断我的眼睛是左侧还是右侧?

I am using MATLAB. 我正在使用MATLAB。 Are there any functions for this? 这有什么功能吗?

A simple solution is to try to detect the iris using circular Hough Transform . 一个简单的解决方案是尝试使用圆形Hough变换检测虹膜。

You can find a lot materials out there. 你可以找到很多材料。 To name a few, these two fileexchange submissions: 仅举几例,这两个fileexchange提交:

This sounds like Eye tracking implemented in MATLAB which is a fairly popular research topic. 这听起来像是在MATLAB实现的眼动追踪,这是一个相当受欢迎的研究课题。

If you want a more detailed answer, please answer the following questions: 如果您想要更详细的答案,请回答以下问题:

  1. Do you know the coordinates of your eye in the first image? 你知道第一张照片中眼睛的坐标吗?
  2. What kind of motion is there between the two images? 两幅影像之间有什么样的动作? Rotation/translation/scaling/...? 旋转/平移/缩放/ ...?
  3. Do you want this to be real-time? 你想要这个是实时的吗?
  4. What is the resolution of the images? 图像的分辨率是多少?
  5. Are there going to be more eyes in the image apart from yours? 除了你的图像之外,图像中会有更多的眼睛吗?

If you are willing to select the eye in one image you can use template matching to find it in others (for example you can mark it in the first frame of a video and then find it in all other frames). 如果您愿意在一个图像中选择眼睛,您可以使用模板匹配在其他图像中找到它(例如,您可以在视频的第一帧中标记它,然后在所有其他帧中找到它)。

Look at the normxcor2 function in matlab: http://www.nd.edu/~hpcc/solaris8_usr_local/src/matlab6.1/help/toolbox/images/normxcorr2.html 在matlab中查看normxcor2函数: http ://www.nd.edu/~hpcc/solaris8_usr_local/src/matlab6.1/help/toolbox/images/normxcorr2.html

This technique is robust to constant illumination change, but will fail if the appearance of the eye changes significantly between the image you took the template from and the image you are searching in. 此技术对于恒定的照明变化是稳健的,但如果在拍摄模板的图像与您正在搜索的图像之间眼睛的外观发生显着变化,则该技术将失败。

If you are going to search for the eye in a lot of frames (for example, eye tracking from a webcam) then you should look at stronger techniques such as the Kalman Filter or the Particle Filter (aka Condensation Filter in computer vision) 如果您要在很多帧中搜索眼睛(例如,从网络摄像头进行眼睛跟踪),那么您应该考虑更强大的技术,例如卡尔曼滤波器或粒子滤波器(也称为计算机视觉中的冷凝滤波器)

By using Color Distance Maps, the skin and non skin area can be differentiated and thus the non skin area contains the iris. 通过使用颜色距离贴图,可以区分皮肤和非皮肤区域,因此非皮肤区域包含虹膜。 From the iris, the whole eye could be detected. 从虹膜中,可以检测到整个眼睛。 Hope it works. 希望它有效。

您还应该看看MATLAB中的眼球检测 ,他们先检测到眼睛然后检测到了EyeBall。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM