Ask Your Question

how to crop the face detected in opencv for android

asked 2013-03-15 23:20:21 -0600

sanditha gravatar image

i want to use sample for face detection in opencv for android.using the sample instead of detecting face while capturing ,i want to detect face after the image is captured and crop theface part..if there is no face in image,it should giv a error to do this??please help

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-03-16 02:36:44 -0600

Steps to follow

  1. Detect your face using the Viola Jones approach
  2. Output will be a set of bounding boxes in the shape of Rectangles
  3. Use the code for region of interest to set the active image
  4. Just resize the image, plenty of functionality for that

Region setting

Mat selectRegion = originalImage( Rect(x,y,width, heigth) )
edit flag offensive delete link more

Question Tools


Asked: 2013-03-15 23:20:21 -0600

Seen: 2,944 times

Last updated: Mar 16 '13