Facial detection

I am new to OpenCV. One of my students wants to identify a face, that is, create a bounding rectangle that just outlines the face, and have that rectangle follow the face as the face moves around. The purpose is medical monitoring, to look at color changes in the face caused by blood flow. At the moment, we do not know if the camera is even capable of distinguishing these subtle changes, but that’s a problem I know how to research. I have no idea where to begin with the geometry problem. Note that real-time display is not crucial; that would only matter during debugging and could lag behind; The issue first is to find the face and know where it is in the image. Once we have that, we need to detect subtle differences in color with a time resolution of one frame. Then extract from this data a pattern of changes. Ideally, we can get the frame time down to ~5fps. What course(s) should we take to be able to achieve this? The device is going to be proof-of-concept for a medical diagnostic system.

depends on what algorithm you want to employ… but most object detection systems these days are using neural networks to recognize patterns … one i use is based on the following open source project

it uses opencv in some of the basic plumbing but… this is a question likely beyond the scope of what I know opencv alone dones


aka: tracking (we do have code for that…)

something like Photoplethysmography ? (what a word …)

works for spatial changes (breathing, pulsing arteries) as well as color changes (pulsing capillaries):


if you want really cheap face detection

really cheap tracking can be had with MOSSE.

cheap means “not perfect”. DNN-based methods are the top performers these days, but more expensive, computationally.

tracking can drift and slip off, detection can fail/jitter. combine both (“sensor fusion”) for superb results.

Thank you.