Project Basics:
This project is done using a Raspberry Pi 3 and a PiCamera with IR source.
I tried quite a few things during this project and learned a lot about different image processing techniques and python. I chose Python over LabVIEW because OpenCV has bindings for Python. OpenCV is an open-source library which encloses a lot of different imaging algorithms. Another reason why I chose to use Python is because it is becoming so popular and I love that it has so many libraries (or say packages) which are installed so easily and I also want to learn another new programming language.
Initially I tried to achieve the task using a laptop's webcam by first detecting faces, using Viola-Jones Haar Cascade, then detecting eyes in the found face using the same technique. After detecting eyes, I needed to find the iris, for that I tried quite a few things including Hough circles, Fabian Timm's Gradient Algorithm and Eclipse Fitting. However none of them track iris with good reliability. These bad results were due to different lighting conditions and other uncontrollable parameters. So I moved to Raspberry Pi (Yay! another new thing to learn about) and PiCamera.
The final project uses IR source for corneal reflection. Captured RGB (BRG in OpenCV) is converted into gray image, then blurs the image, converts it into a binary image, then finds Hough circles in it. Using a calibration window, data is collected and saved in a text file. When the 'Do Regression' track-bar is pressed, a quadratic regression analysis is done on the data which is saved in the text file and returns two quadratic functions. These functions are used to map the pupil-circle center to the screen co-ordinate circles.
I would like to thanks Adrian from PyImageSearch.com for helping and understanding many different concepts of image processing.
I will soon released the code on my github (need to comments different functions)
Thank you.
I tried quite a few things during this project and learned a lot about different image processing techniques and python. I chose Python over LabVIEW because OpenCV has bindings for Python. OpenCV is an open-source library which encloses a lot of different imaging algorithms. Another reason why I chose to use Python is because it is becoming so popular and I love that it has so many libraries (or say packages) which are installed so easily and I also want to learn another new programming language.
Initially I tried to achieve the task using a laptop's webcam by first detecting faces, using Viola-Jones Haar Cascade, then detecting eyes in the found face using the same technique. After detecting eyes, I needed to find the iris, for that I tried quite a few things including Hough circles, Fabian Timm's Gradient Algorithm and Eclipse Fitting. However none of them track iris with good reliability. These bad results were due to different lighting conditions and other uncontrollable parameters. So I moved to Raspberry Pi (Yay! another new thing to learn about) and PiCamera.
The final project uses IR source for corneal reflection. Captured RGB (BRG in OpenCV) is converted into gray image, then blurs the image, converts it into a binary image, then finds Hough circles in it. Using a calibration window, data is collected and saved in a text file. When the 'Do Regression' track-bar is pressed, a quadratic regression analysis is done on the data which is saved in the text file and returns two quadratic functions. These functions are used to map the pupil-circle center to the screen co-ordinate circles.
I would like to thanks Adrian from PyImageSearch.com for helping and understanding many different concepts of image processing.
I will soon released the code on my github (need to comments different functions)
Thank you.