sightmachine/simplecv-js — pull request #53 by chaithuzz2 (2013-07-25 20:45:08+00:00)
Title: Added getFaces() method and stretch filter

We have a face detection now for simplecv-js.

to use it in console you can use the following code.

display = new Display(".livePreview")
size = display.resolution()
console.log size
Camera.beginStream((i)=>
i = i.resize size[0], size[1]
dl = i.addDrawingLayer()
dl.noFill()
comp = i.getFaces()
for face in comp
dl.rect(face.x, face.y, face.width, face.height)
i.show display
)

and also i added a stretch filter which does the same function in SimpleCV