Detecting frames for which a face appears in a video...
    조회 수: 7 (최근 30일)
  
       이전 댓글 표시
    
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
답변 (1개)
  Dima Lisin
    
 2014년 7월 15일
        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
참고 항목
카테고리
				Help Center 및 File Exchange에서 Computer Vision Toolbox에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

