Face detection javascript/html5/flash [closed]

2020-06-27 09:13发布

问题:

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.

回答1:

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



回答2:

This demo uses only JavaScript and the getUserMedia API for real-time, client-side face detection: http://neave.github.com/face-detection/



回答3:

You may use a free API from face.com. It can be used in any language you want (AS, JS, etc).

It has some nice features (face features detection - eyes, mouth, etc), age detection, and more

It's limited to 5ooo photos per hour, but in most cases that's more than enough.



回答4:

Not sure if it's available but you could certainly port one. My opinion is it's definitely possible though may need to pair with Flash to access the cam.

Definitely google this one, it's pretty well covered. E.g. there's even a www.facedetection.com -- plus numerous APIs/SDKs such as in the comment above.

If you have the time why not try to craft your own / improve on what's out there. You may discover some easy way to do it that's lightweight and is just what you want. :)

If you are interested in more than just detection then: You need to consider are you doing recognition or identification.

Recognition you need to search for the image face in your face database.

Identification you need to confirm the image face matches the given identity.