Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use OpenCV or similar library in Javascript? [closed]

Can we use OpenCV from Javascript? Is there such implementation?

Is there any JS libraries that can be used for detecting face elements in the picture or video?

like image 768
Bohdan Avatar asked Feb 03 '12 13:02

Bohdan


People also ask

Can I use OpenCV in JavaScript?

It was first built in C++, but bindings have been created for different languages, such as Python and Java. It is even available in JavaScript as OpenCV.

Can we use OpenCV in browser?

Because OpenCV. js is able to run directly inside browser, the OpenCV. js tutorial web pages are intuitive and interactive. For example, using WebRTC API and evaluating JavaScript code would allow developers to change the parameters of CV functions and do live CV coding on web pages to see the results in real time.


2 Answers

OpenCV has never been ported to JavaScript in its entirety, but individual parts and algorithms have:

  • For face and face element detection (and other parts / objects), you could use js-objectdetect or HAAR.js which are ports of the OpenCV Object Detection based on Haar Feature Cascades.

  • The very first face detection algorithm on the web found in ccv also deserves a mention. Its classifier seems to be less reliable than the one provided by OpenCV though.

  • The headtrackr library used for facetracking might also be of interest since it implements the camshift algorithm also found in OpenCV.

like image 128
le_m Avatar answered Sep 21 '22 10:09

le_m


I recommend OpenCVjs. This is javascript OpenCV library.

like image 44
amrocs Avatar answered Sep 24 '22 10:09

amrocs