How to know the detected face is of which frame in a matlab code of face detection and how to save first and last frame.
조회 수: 1 (최근 30일)
이전 댓글 표시
videoFileReader = vision.VideoFileReader('h1.avi'); videoFrame = step(videoFileReader); figure, imshow(videoFrame) faceDetector = vision.CascadeObjectDetector; bbox = step(faceDetector, videoFrame); videoOut = insertObjectAnnotation(videoFrame,'rectangle',bbox,'Face'); figure, imshow(videoOut), title('Detected face')
댓글 수: 0
답변 (1개)
Dima Lisin
2015년 12월 18일
Use an if statement to check if bbox is empty. If it is empty, then no face is detected. If not, then a face is detected.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!