Detecting frames for which a face appears in a video...
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I need to detect the number of frames for which a face is appearing in a video. I looked into the sample code using CAMShift algorithm (<http://www.mathworks.in/help/vision/examples/face-detection-and-tracking-using-camshift.html)>. Is there a way to get true and false values from the step function (bbox = step(faceDetector, videoFrame);) in order to know if a face appears in a particular frame? I'm new to MatLab. I'm assuming inbuilt functions (the step function seems pretty confusing) return some default value in case a condition fails. Is there a possible solution?
I am not concerned about the computational burden - although a faster approach for the same would be appreciated.
0 Commenti
Risposte (1)
Dima Lisin
il 15 Lug 2014
If a face is not detected in a frame, bbox will be empty. So you can simply check
if isempty(bbox) ...
to handle the case when a face is not detected.
Generally, you probably want to track the face, because vision.CascadeObject detector is not likely to detect a face, which is tilted or turned. Please see this example of tracking a face using the KLT algorithm, and this example of tracking multiple faces .
0 Commenti
Vedere anche
Categorie
Scopri di più su Computer Vision Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!