Search code examples
javascriptflashhtmlface-detection

Face detection javascript/html5/flash


What is the best way for face detection in a web page ?

Which is the most used one ,actually what i need is detect the faces ,capture one face.

i have no experience about this .

is there any js solution available ?

whats ur suggestions and opinions ?

Thank you.

Friends : I am testing all your answers : i will come back with result.


Solution

  • You have a few possibilities here, it depends which is the target language you want to use for implementation. One of the possibilities would be Flash, where you can use a Ohtsuka Masakazu face detection library ported to AS3 originally implemented in OpenCV.

    http://www.libspark.org/wiki/mash/Marilena

    This was refined by Mario Klingemann. You can find the project here: http://www.quasimondo.com/archives/000687.php, which includes the source codes.

    If the desired platform is the native web browser, without any proprietary plugins, then the new WebRTC W3 initiative is one of the alternatives. There is another one, which w'll discuss later. You can find the implementation here: http://neave.com/webcam/html5/face/.

    The other solution would be to use websockets for front end communication with the back end server, where the heavy image detection analysis is happening. There whole process can be summarized in a few steps:

    • We access the webcam by using the getUserMedia function which is a HTML5 specific feature.
    • Then we send the webcam data to the server using websocket.
    • Here we analyze the received data, using for example JavaCV/OpenCV to detect and mark any face that is recognized.
    • We send back the data to the client using again websockets.

    There are a few options we can use at the backend site:

    Jetty: Provides websockets and many other integration.

    OpenCV: Library that has all kind of algorithms for image manipulation. We use their support for face recognition.

    JavaCV: Provides wrappers to commonly used libraries by researchers in the field of computer vision. Using this java wrapper we can analyze the images directly by data received from Jetty.

    And here is a cool implementation of the description above.

    UPDATE

    At the moment the most impressive JS face recognition library is: clmtrackr which is a library for fitting facial models to faces in videos or images. A thorough explanation of the technology is found here: http://auduno.tumblr.com/post/61888277175/fitting-faces