Peter Braden 2f3d3cea6e WIP
2012-01-23 19:04:33 -08:00

32 lines
675 B
Plaintext

Get rid of Image
- Replace with operations on Matrix and cv helper js functions
- Matrix doesn't need to be eventemitter:
instead create a cv.MatrixBuffer class that is an event emitter, and wraps matrix in js
############ Ideas #####################
var mat = cv.readImage('foo.jpg');
//shortcut for cascade classifier
mat.detectFaces('data.xml', function(err, faces){
for (var i=0;i<faces.length; i++){
var x = faces[i]
mat.ellipse(x.x + x.width/2, x.y + x.height/2, x.width/2, x.height/2);
}
});
var s = new opencv.ImageStream()
s.on('load', function(mat){
cv.writeImage(mat, filename, function(err){});
})
request.get('foo').pipe(s);