Eye Detection Using Python in Colab

In this post, you will learn how to detect eyes using OpenCV and Python. The following code is executed in COLAB.

CODE:

  1. Uploading cascade files:

2.Uploading the image:

3.We need to import some packages: numpy , cv2 , matplotlib .

4.A path to access cascade classifier:

5.To display the image we uploaded:

6.Method to create rectangle when eye is detected, here 7 is the width of the rectangle and (x,y),(x+w,y+h),(255,0,0) is the RGB value of the outline of the rectangle.

7.The final output:

You can access the cascade files and the code from my Github.

https://github.com/AMULYA-SRKL/EYE-DETECTION