A module to detect faces.
This module provides an interface to OpenCV face detection.
To run, please point your browser to: https://accessors.org/hosts/browser/demo/faceDetector/faceDetector.html
This module uses the UC Irvine computer vision library; see https://accessors.org/hosts/browser/modules/cvlicense.txt#in_browser">
Based on code from examples in: http://ucisysarch.github.io/opencvjs/examples/face_detect.html
- Version:
- $$Id$$
- Source:
Members
(static) filters
A list of available filters.
Methods
(static) faceRectangles()
Return the detected faces rectangles
Returns:
An array of detected faces rectangles. If there are no faces detected, then an empty array is returned.
(static) filter(image, options, callback)
Detect faces in an image and return the image with squares around the faces.
Options: MinFaceSize - The minimum face size. (In pixels?) MaxFaceSize - The maximum face size. (In pixels?)
Any unrecognized options are ignored. Note that previously applied options for a given filter will still be used, even if they are not set in this call.
Parameters:
Name | Type | Description |
---|---|---|
image |
The image or path to image to detect faces in. |
|
options |
An object whose fields specify filter options. |
|
callback |
The callback to invoke when the result image is ready. Needed since there may be a delay if the input image is loaded from a file. |
(static) numberOfFaces()
Return number of detected faces
Returns:
The number of detected faces.