Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Webcam face tracking in 25 lines of JavaScript. Very robust to poor lighting (jsfiddle.net)
18 points by xavierwebgl on May 15, 2018 | hide | past | favorite | 7 comments


Less than 25 lines isn't so great when you have to load in a separate library or two.


Yeah this is true. I wanted to detail it a bit more like "25 lines of code using FaceFilter API" but there are not enough characters available in a post 8-)


Yeah, you could do this in '1 line of code' if you just made another wrapper.


Yes, but the library is still quite generalistic (it would not make sense for example to include the drawing of the yellow rectangle in the lib or to not have access to the raw detection parameters).


Although the two libraries total to about 64Kb; not so bad


Error while parsing the 'allow' attribute: 'midi;', 'geolocation;', 'microphone;', 'camera;', 'encrypted-media;' are invalid feature names.


I think this error comes from JSFiddle : its executes the code in an iframe which has allow attribute. You can also test almost the same code here : https://jeeliz.com/demos/faceFilter/demos/canvas2D/faceTrack...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: