Real Time Face Detection Using OpenCV With Java


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 :



    • Creative Misuse Contest

      Creative Misuse Contest
    • Water Contest

      Water Contest
    • Clocks Contest

      Clocks Contest

    3 Discussions

    I Have Project Open Source Here

    Here is other example. I think it is simplier


    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)