Skip to main content

Face Recognition using OpenCV and Python.



Face recognition is becoming increasingly important as our identities are digitalized. We are moving away further from the passwords and PIN numbers. Today, biometric sensors are available on all security devices and smartphones.
Innovation such as biometric is widely used now in place of the PIN and password. However facial recognition has started to rule these and will offer another level of security and flexibility.

Let's learn how face recognition works!!


Face Recognition works in 4 steps:

  1. Detect face in image.
  2. Compute Facial features
  3. Compare facial feature against known faces.
  4. Make a prediction.
But before Recognizing any face , we need to train our system , how to identify and recognise a face.Hence first, I will first discuss how to train our classifier.

Thanks to OpenCV , it makes the face recognition easy for any beginner. OpenCV comes with three built in face recognizers algorithms.
  • Eigen Faces : cv2.face.createEigenFaceRecognizer()
  • FisherFaces:  cv2.face.createFisherRecognizer()
  • Local Binary Patterns Histograms: cv2.face.createLBPHFaceRecognizer()

Implementation in Python: 

Let's go ahead and dive into some code.

Training the classifier
Predicting

Subscribe and Download Code.
If you like this post,.Subscribe 
To download the code: Click here.

If you have any doubt or suggestion , feel free to ask anything in the comment section.

Thanks.

Comments

Popular posts from this blog

Transparent Image overlay(Alpha blending) with OpenCV and Python

(a)Final Blended Image                     (b) Background Image                             (c)Foreground Image                               Alpha blending Alpha blending is the process of overlaying a foreground image with transparency over a background Image. The transparent image is generally a PNG image.It consists of four channels (RGBA).The fourth channel is the alpha channel which holds the transparency magnitude. Image (b) is a background image and image (c) is the foreground / overlay image. Image (a) is the final blended image obtained by blending  the overalay image using the alpha mask.  Below is the image(Fig d) of the alpha channel of the overlay  image. (d).Alpha Channel At every pixel of the image, we blend the background and foreground image color(F) and background color (B) using the alpha mask . At every pixel value of alpha lie in range(0,255), a pixel intensity of 0 means black color and pixel instensity of 255 means whit

Fast Pixel Processing with OpenCV and Python

In this post. I will explain how fast pixel manipulation of an image can be done in Python and OpenCV. Image processing is a CPU intensive task. It involves processing on large arrays. Hence when you are implementing your Image Processing algorithm, you algorithm needs to be highly efficient. The type of operation that can be applied on an Image can be classified into three categories.