Ask Your Question

Capture photo with specifications

asked 2016-01-28 11:43:48 -0500

Riyaz gravatar image

Hi, I am trying to build a photo capturing app which can click picture in a given specifications. An example will be like below image. The app should automatically click the image if person in front of the camera positions them self in specified specification. I am new to OpenCV and want to see if it can be leverage for this need. Plan to use opencv with Visual studio. Thanks and appreciate your responses.

image description

edit retag flag offensive close merge delete


i think in theory it is easy to implement such an application using OpenCV. but in practice it is hard to get good photos :)

sturkmen gravatar imagesturkmen ( 2016-01-28 12:40:26 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-29 10:40:58 -0500

kbarni gravatar image

As sturkmen said, it's quite easy. Capture the images in a loop using the VideoCapture module, then detect the faces with a Haar cascade classifier, which will give the face rectangle. Then wait till the rectangle gets in the desired area of the image. Something like:

if((face.w*face*h>min_surface)&&(face.x>target.x0)&&(face.y>target.y0)&&(face.x+face.w<target.x1)&&(face.y+face.h>target.y1) { imwrite(image,"goodcapture.jpg"); break; }

Some docs: video capture: face detection:

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-01-28 11:43:48 -0500

Seen: 77 times

Last updated: Jan 29 '16