Ask Your Question
0

how to crop the face detected in opencv for android

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

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 message..how to do this??please help

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

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

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
Login/Signup to Answer

Question Tools

Stats

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

Seen: 2,622 times

Last updated: Mar 16 '13