Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

yes, opencv's face detection is quite noisy. but dlib's suffers from the same problem. (using the facial landmarks there won't help, since they depend on an initial rectangle, if that is already noisy, the landmarks will be, too.)

have a look at the tracking classes in opencv_contrib.

you would initialize it with a face detection rect, and use the tracker (e.g. MOSSE or MedianFlow) to localize it during your measurement, it's far more stable, than plain face detection, give it a try.

last but not least, using a person's face (from a distance) for this is not mandatory. you can overcome a lot of problems, if you let ppl cover the camera hole with their thumb, and let the light shine through the finger !