Functions
-
loadModels() ⇒
Promise.<void>
-
Loading models for face detection and landmarks
-
getChoices() ⇒
Array.<Object>
- drawOutline(color)
-
Draws outline circle of video stream
-
getRadians(degrees) ⇒
number
-
Helper method for drawOutline
- startVideoStream()
-
Starts video stream (access to video) and adding event listener to video tag setting interval to call every * sec method for liveness and face detection
- detection()
-
Main method that detect user face and trying to calculate to which side user is watching and sending photos to back
- takePhoto()
-
taking photo of user's face and send it to back
-
convertToFile(dataURL, filename) ⇒
File
-
Helper method for takePhoto
-
calculateFacePosition(detections) ⇒
number
-
Helper method for detection method
-
getMeanPosition(position) ⇒
Array.<number>
-
Helper method for calculateFacePosition method
- stopVideoStream()
-
Stops video stream and clear interval
Promise.<void>
loadModels() ⇒ Loading models for face detection and landmarks
Array.<Object>
getChoices() ⇒
drawOutline(color)
Draws outline circle of video stream
Kind: global function
Param | Default |
---|---|
color | rgba(0, 0, 0, 0.15) |
number
getRadians(degrees) ⇒ Helper method for drawOutline
Kind: global function
Param |
---|
degrees |
startVideoStream()
Starts video stream (access to video) and adding event listener to video tag setting interval to call every * sec method for liveness and face detection
detection()
Main method that detect user face and trying to calculate to which side user is watching and sending photos to back
takePhoto()
taking photo of user's face and send it to back
File
convertToFile(dataURL, filename) ⇒ Helper method for takePhoto
Kind: global function
Param |
---|
dataURL |
filename |
number
calculateFacePosition(detections) ⇒ Helper method for detection method
Kind: global function
Param |
---|
detections |
Array.<number>
getMeanPosition(position) ⇒ Helper method for calculateFacePosition method
Kind: global function
Param |
---|
position |
stopVideoStream()
Stops video stream and clear interval
Kind: global function