Skip to content

oscarenas/js-objectdetect

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-objectdetect

js-objectdetect is a javascript library for real-time object detection.

This library is based on the work of Paul Viola and Rainer Lienhart and compatible to stump based cascade classifiers used by the OpenCV object detector.

Watch this video for a short demonstration.

All modern browsers including IE 9+, Safari and Opera Mobile are supported.

Examples

js-objectdetect can be used for object detection, tracking and, in combination with mordern HTML5 features such as WebRTC, for all sorts of augmented reality applications that run in the browser without any plugin.

The following demos are available (Internet Explorer and iOS not supported):

gesture input
Rotating a 3D object via hand gesture

gesture scroll
Scrolling a website via hand gesture

glasses
Trying out various sunglasses

Classifiers

js-objectdetect is compatible to stump based classifiers used by OpenCV. Classifiers for face, hand and eye detection are already included. More can be found on the web (classifier repository). However, not all classifiers have the same performance and some are quite sensitive to lighting conditions.

Usage - jQuery

The provided jQuery plugin provides a simple interface to the object detection library:

<script src="js/objectdetect.js"></script>
<script src="js/objectdetect.frontalface.js"></script>

<script src="js/jquery.js"></script>
<script src="js/jquery.objectdetect.js"></script>

<img id="image" src="image.png">
<script>
	$("#image").objectdetect("all", {classifier: objectdetect.frontalface}, function(coords) {
		...
	});
</script>

More examples can be found in the repository.

Download

License

js-objectdetect is distributed under MIT license. The included classifiers are subject to their own licenses.

Credits

Thanks to Audun Mathias Øygard (auduno) for his inspirational headtrackr library, Brandon Jones (toji) for his valuable javascript performance tipps and Nikos (foo123) for his port of JViolaJones on which the canny pruning algorithm is based on.

About

computer vision in your browser - javascript real-time object detection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.4%
  • CSS 18.6%