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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!