opencv4nodejs: Facemark example not running
Hi !
When I tried to launch the example “facemark”, I get the following error :
facemark.setFaceDetector(frame => {
^
TypeError: facemark.setFaceDetector is not a function
at Object.<anonymous> (/home/loophole/EventBots/vision/opencv4nodejs/examples/facemark.js:27:10)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:201:16)
at bootstrap_node.js:626:3
When I comment this line, I get another one :
const faces = facemark.getFaces(gray);
^
TypeError: facemark.getFaces is not a function
at Object.<anonymous> (/home/loophole/EventBots/vision/opencv4nodejs/examples/facemark.js:35:24)
at Module._compile (module.js:624:30)
at Object.Module._extensions..js (module.js:635:10)
at Module.load (module.js:545:32)
at tryModuleLoad (module.js:508:12)
at Function.Module._load (module.js:500:3)
at Function.Module.runMain (module.js:665:10)
at startup (bootstrap_node.js:201:16)
at bootstrap_node.js:626:3
Am I missing something ?
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 18 (2 by maintainers)
Okay I actually managed to get the example working. I didn’t realize I could be using the face classifier directly. I have the following code if it can help someone :