kl3m3n's blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Real-time iris detection in Labview (using OpenCV for prior face and eye detection)

Klemen
Active Participant

Hello reader(s),

I have tested the iris detection algorithm that is described in the paper titled:

"Automatic Adaptive Facial Feature Extraction Using CDF Analysis".

I have used OpenCV to track the face and consequently the eye(s) - the detection of the eyes is limited to the facial region. The source code and the .dll for face and eye tracking can be found in one of my previous posts titled:

"Real-time face and eye detection in LabView using OpenCV Harr feature classifier".

The only deviation from the above mentioned post is that here I used a different training set for eye detection, i.e. I used "haarcascade_righteye_2splits.xml" classifier file insted of "haarcascade_eye_tree_eyeglasses.xml". I am also attaching a .dll (but not the source) that reflects this change. SO, IF YOU WANT TO TRY THE CODE, YOU NEED TO FOLLOW THE INSTRUCTIONS IN THE ABOVE MENTIONED POST TO GET IT WORKING.

The results are quite good and the iris can be tracked in "real-time" (more than 10 fps with my laptop mid-performance computer, camera resolution 640x480 pix). Three screenshot images for different gaze direction are shown below:

iris_detection_pose1.png

Figure 1. Frontal gaze.

iris_detection_pose2.png

Figure 2. Left gaze.

iris_detection_pose3.png

Figure 3. Right gaze.

I am attaching the Labview code also, saved for version 2010. Please mind that the code is very, very dirty (my dirtiest code yet, I would say), so don't hold this against me. You should also take a look (and understand) the parameters for iris detection (read the paper) - mainly the CDF function and the morphological function (erode). These two parameters have the greatest impact on the detection.

I will try to clean up the code in the future (if I am not to lazy), but if someone manages this before me, which is likely (mostly the performance part) fell free to post it here and I will upload the code.

Hopefully somebody finds this useful as a starting point for their application/project.

Best regards,

K


P.S.: Feel free to comment...


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
Comments