-5

I need to get coordinates of facial features with Emgu CV. I know it is possible to train Haar classifier and it will recognize the objects, but I need exact coordinates, instead of squares with such objects.

For example, I must retrieve the coordinates of the left and right edges of the eye, instead of the square around it. How do I do so?

Rubens
  • 14,478
  • 11
  • 63
  • 92
konstantin_doncov
  • 2,725
  • 4
  • 40
  • 100

1 Answers1

2

Detection and recognition are different processes. What you want is a face detection, and you can learn how to do it by taking a look at opencv doc. You should also need experience on opencv, because you can get mass center or corners of the drawn rectangle (the output of detectMultiScale method) easily if you want to.

baci
  • 2,528
  • 15
  • 28
  • Thanks for the answer! I doubt that I can get the exact coordinates because I see often illustrations like these: [link1](http://sj.vdelzen.net/wp-content/uploads/2011/05/opencv003.png), [link2](http://eclecti.cc/files/2008/03/face.jpg), [link3](http://2.bp.blogspot.com/_vx0BjlnaOso/S7XAp11nJbI/AAAAAAAAAdw/T4Xc1ZY_uMY/s400/face-detect+cropped.png). These squares often contain an empty field (without face). – konstantin_doncov Jul 07 '13 at 13:44
  • That square is a `Rect` structure of opencv; which has x, y ,width and height properties for you to use. For example, center of it is nothing but Point2f(Rect.x+Rect.width/2, Rect.y+Rect.height/2). For the eyes, check out the eye detector at the same link. – baci Jul 07 '13 at 14:45
  • Yes, I understand. But in the first image(for example) width of the rectangle is not equal width of the face. – konstantin_doncov Jul 07 '13 at 16:06
  • You can try [skin detector](http://stackoverflow.com/questions/12968576/opencv-skin-detection) enhancement to cancel out non-face regions inside rectangles. – baci Jul 07 '13 at 16:08
  • Thanks, and what can I do for detect facial features(for example nose)? – konstantin_doncov Jul 07 '13 at 16:26
  • How [here](http://habrastorage.org/storage2/651/b48/dd3/651b48dd302163d7b296879cdfea6eba.png) got not a square, and rectangle? – konstantin_doncov Jul 07 '13 at 20:21