eduardolundgren / tracking.js

A modern approach for Computer Vision on the web
http://trackingjs.com
Other
9.43k stars 1.44k forks source link

Count number of faces #230

Closed sunnykeerthi closed 7 years ago

sunnykeerthi commented 7 years ago

Hi,

This is essentially not a bug just looking for a feature. Is there a way that I can count the number of faces in a given Image.

For example I've three persons in front of a webcam and I'm having 2 pages say, Success.html and error .html and as part of the underlying way to judge the redirection to Success or error pages the condition would be, if only one face is detected, it should be sent to success, else, it should be sent to error .

Please let me know if I have a feature available here already to perform this task and how can I do this.

If not, where can I get such similar reference.

Thanks, Rakesh

revolunet commented 7 years ago

The first example in the documentation show that event.data.length should give you the number of detected objects.

capture d ecran 2017-07-01 a 23 53 31

About the redirection logic, this is not tracking.js related, just change document.location to redirect.

jeromeetienne commented 7 years ago

closing, dont hesitate to reopen if needed

ps: @revolunet good to see you here :)