Skip to content
Face detection jQuery plugin
Pull request Compare This branch is 44 commits behind jaysalvat:master.
Latest commit c88e856 Nov 7, 2011 @jaysalvat jaysalvat Merge pull request #1 from plamba95/patch-1
fixed <img> tag, add id="myPicture"
Failed to load latest commit information.
img Simplified demo Nov 7, 2010
js Fix Nov 5, 2010
index.html fixed <img> tag, add id="myPicture" Nov 7, 2011

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:

Html & Scripts


<script src=""></script> 
<script src="js/facedetection/ccv.js"></script> 
<script src="js/facedetection/face.js"></script>
<script src="js/jquery.facedetection.js"></script> 


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


    $(function() {
        var coords = $('#myPicture').faceDetection();


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


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) {
    // ...
Something went wrong with that request. Please try again.