3

I'm working on a robotics project with my raspberry pi and I want it to greet me when I walk in the room. I have facial recognition working using opencv-node, but wanted to take it a step further.

I would like to user FaceRecognizer() provoded with opencv. I was wondering if anyone knows the syntax for node.

im using opencv ^3.0.0 currently

camera.read(function(err, im) {
   if (err) throw err;

   im.detectObject('./node_modules/opencv/data/haarcascade_frontalface_alt2.xml', {}, function(err, faces) {
     if (err) throw err;
    //  im.convertGrayscale();
     for (var i = 0; i < faces.length; i++) {
       face = faces[i];
       im.rectangle([face.x, face.y], [face.width, face.height], rectColor, rectThickness);
     }

     io.emit('frame', { buffer: im.toBuffer() });
   });
 });

I also patched the video buffers to get nearly realtime video.

It would be great to have it recognize my family and I - saying different greetings!

Any help would be appreciated, thank you!

rcpilotp51
  • 524
  • 1
  • 3
  • 22

0 Answers0