Constructor
new FaceDetector(options)
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
Extends
- VisualStim
Methods
(protected) _estimateBoundingBox()
- Source:
Estimate the bounding box.
(async, protected) _initFaceApi()
- Source:
Init the Face-API library.
(protected) _updateIfNeeded()
- Source:
Update the visual representation of the detected faces, if necessary.
isReady() → {boolean}
- Source:
Query whether or not the face detector is ready to detect.
Returns:
whether or not the face detector is ready to detect
- Type
- boolean
setInput(input, logopt)
- Source:
Setter for the video attribute.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
input |
string | HTMLVideoElement | module:visual.Camera | the name of a movie resource or a HTMLVideoElement or a Camera component |
||
log |
boolean |
<optional> |
false
|
whether of not to log |
start(period, detectionCallback, logopt)
- Source:
Start detecting faces.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
period |
number | the detection period, in ms (e.g. 100 ms for 10Hz) |
||
detectionCallback |
the callback triggered when detection results are available |
|||
log |
boolean |
<optional> |
false
|
whether of not to log |
stop(logopt)
- Source:
Stop detecting faces.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
log |
boolean |
<optional> |
false
|
whether of not to log |