Code Monkey home page Code Monkey logo

jquery.facedetection's Introduction

Face detection jquery plugin

A jQuery plugin which detects faces in pictures and returns theirs coords. This plugin uses an algorithm by Liu Liu.

Demo here: http://facedetection.jaysalvat.com/

Html & Scripts

Includes

<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script> 
<script src="js/facedetection/ccv.js"></script> 
<script src="js/facedetection/face.js"></script>
<script src="js/jquery.facedetection.js"></script> 

Image

<img id="myPicture" src="img/face.jpg">

Script

<script>
	$(function() {
		var coords = $('#myPicture').faceDetection();
		console.log(coords);    
	});
</script> 

Results

Returns an array with found faces object:

x: Y coord of the face

y: Y coord of the face

width: Width of the face

height: Height of the face

positionX: X position relative to the document

positionY: Y position relative to the document

offsetX: X position relative to the offset parent

offsetY: Y position relative to the offset parent

confidence: Level of confidence

Settings

confidence: Minimum level of confidence

start: Callback function trigged just before the process starts. DOES'NT WORK PROPERLY

start:function(img) {
	// ...
}

complete: Callback function trigged after the detection is completed

complete:function(img, coords) {
	// ...
}

error: Callback function trigged on errors

error:function(img, code, message) {
	// ...
}

jquery.facedetection's People

Contributors

jaysalvat avatar liuliu avatar plamba95 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.