Introduction: Real Time Face Detection Using OpenCV With Java

Face detection is the way of determining the locations of human faces in digital images or video stream like cam.

We use face detection in robotics and also in biometric recognition like in this instructable

In this instructable i show you how to do real time face detection using OpenCV library with Java programming language.

Requirements :

1- PC or laptop contains JDK (download JDK from this link)

2- Netbeans IDE( download java se from this link )

3- USB webcam.

Steps :

See this video to know how to develop this application

Source Code :


RizkiA22 (author)2016-09-29

I Have Project Open Source Here

СергейЧ5 (author)2016-03-12

Here is other example. I think it is simplier

MB_Perera (author)2016-03-07


Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no opencv_java in java.library.path

at java.lang.ClassLoader.loadLibrary(

at java.lang.Runtime.loadLibrary0(

at java.lang.System.loadLibrary(

at org.opencv.core.Mat.<clinit>(

at gui.FaceDetection.<init>(

at gui.FaceDetection$

at java.awt.event.InvocationEvent.dispatch(

at java.awt.EventQueue.dispatchEventImpl(

at java.awt.EventQueue.access$200(

at java.awt.EventQueue$

at java.awt.EventQueue$

at Method)


at java.awt.EventQueue.dispatchEvent(

at java.awt.EventDispatchThread.pumpOneEventForFilters(

at java.awt.EventDispatchThread.pumpEventsForFilter(

at java.awt.EventDispatchThread.pumpEventsForHierarchy(

at java.awt.EventDispatchThread.pumpEvents(

at java.awt.EventDispatchThread.pumpEvents(


BUILD SUCCESSFUL (total time: 3 seconds)

About This Instructable




More by Taha Emara:Real Time Face Detection using OpenCV with JavaImplementation of MP3 player using Raspberry PiPerson Authentication using Face detection by PC and Microcontroller (PIC, Arduino ,.....)
Add instructable to: