ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.61k stars 13.51k forks source link

is there a way to get the center of the iris (or pupil) location? #539

Open exnx opened 6 years ago

exnx commented 6 years ago

Is there a way to get the center location of the iris as well?

UrstrulyRoot commented 6 years ago

May be you can use Dlib landmarks to get the co-ordinates of eye. Get the centroid of all the 6 landmarks on the eye and mark it loosly as iris.

ageitgey commented 6 years ago

@ProudCule is correct. And once you have a loose location for the iris, you could probably use OpenCV functions like thresholding and contours to find the iris area and then find the middlepoint of the iris contour to get the exact center point location: https://www.pyimagesearch.com/2016/02/01/opencv-center-of-contour/