title: use opencv and node to compare 2 faces for similarity
body: <p>I have openCV and nodejs running, and my goal is to make a program that takes a picture of a face when it sees it (did that already), and then compare that face with various faces to a database to see if it's a match. I would know who's face is who in the db, so then basically I would know who's face the site took a picture of. I got this code below to take the picture and save it... but I"m not sure how to get the measurements or compare with another face. I've found examples for image comparison, but I imagine I need facial comparison. </p>
  
  <pre><code> var snap = function(){
  </code></pre>
  
  <p>vid.read(function(err, im){
      im.detectObject(cv.FACE_CASCADE, {}, function(err, faces){</p>
  
  <pre><code>    console.log("FACES", faces)
    if (faces.length == 0){
      console.log("No Faces")
      return false;
    }
    var face = faces[0]
      , ims = im.size()
  
    var im2 = im.roi(face.x, face.y, face.width, face.height)
    /*
    im.adjustROI(
         -face.y
       , (face.y + face.height) - ims[0]
       , -face.x
       , (face.x + face.width) - ims[1])
       */
    im2.save('out.jpg')
  })
  </code></pre>
  
  <p>});
  }
  snap()</p>
  
  <p>Thanks</p>