diff --git a/.gitignore b/.gitignore index ce93513..d5f3ebc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ build .lock-wscript +.DS_Store +node_modules diff --git a/README.md b/README.md index 7106784..90bfdb3 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/TODO b/TODO index ef53287..3eb9295 100644 --- a/TODO +++ b/TODO @@ -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); \ No newline at end of file + + + + + +----- + + +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/ \ No newline at end of file