This commit is contained in:
Peter Braden 2012-01-27 11:03:34 -08:00
parent c93b9dcf14
commit d54e8dcfac
3 changed files with 43 additions and 12 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
build
.lock-wscript
.DS_Store
node_modules

View File

@ -75,6 +75,11 @@ If you need to pipe data into an image, you can use an imagestream:
#### Image Processing
#### Object Detection
There is a shortcut method for
[Viola-Jones Haar Cascade](http://www.cognotics.com/opencv/servo_2007_series/part_2/sidebar.html) object
detection. This can be used for face detection etc.

48
TODO
View File

@ -1,22 +1,46 @@
im.calcHistograms(function(err, hist){})
- Matrix doesn't need to be eventemitter:
instead create a cv.MatrixBuffer class that is an event emitter, and wraps matrix in js
im.calcHistograms(mask, function(err, hist){})
############ Ideas #####################
var mat = cv.readImageSync('foo.jpg');
cv.readImage('foo.jpg', function(err, mat){});
var s = new opencv.ImageStream()
## Face recognition TODO
s.on('load', function(mat){
cv.writeImage(mat, filename, function(err){});
// Load Database
// TODO<
cv.loadImage('test.jpg', function(err, im){
im.detectObject("front-face.xml", {}, function(err, faces){ // <--- Rename faceDetect to detectObject - it's generic
_.each(faces, function(v){
// TODO {
var section = im.slice(v.x, v.y, v.x + v.width, v.y + v.height);
section.convertGrayscale()
section.resize(WID, HEIGHT);
section.equaliseHistogram();
// } TODO
})
})
})
request.get('foo').pipe(s);
-----
http://www.athile.net/library/wiki/index.php?title=Library/V8/Tutorial#Wrapping_a_Javascript_function_as_a_std::function.3C.3E
https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/