O'Reilly logo

Mastering OpenCV Android Application Programming by Nisarg Thakkar, Salil Kapur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Face detection using the cascade classifier

One of the most common applications of the cascade classifier is face detection. Implementation for both Haar and LBP classifiers on Android using OpenCV is very similar; the only difference is in the model that we use to detect faces. Let's work on a generic application for face detection and make relevant changes to the application to accommodate both Haar and LBP cascades. The application will display the camera preview on the entire screen (landscape orientation) and make rectangles around faces in each frame. It will also provide an option to switch between the front and back camera. Following are the steps to create this application:

  1. Create a new Eclipse (or Android Studio) project with a blank ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required