How to save detected faces according to the bounding box ID?
1 次查看(过去 30 天)
显示 更早的评论
I work with this example: Detect and Track Multiple Faces. However I have no idea to save all detected face in each frame based on the
tracker.BoxIds.
This is my code:
...
...
for j=1:size(tracker.Bboxes,1);
J=imcrop(displayFrame, tracker.Bboxes(j,:));
imwrite(J,strcat(sprintf('frame%d(%d).jpg',frameNumber , j)), 'jpg');
end
...
...
The code I provide here does not save all the detected faces in one frame. My input video contain a group of people that pass through a camera. So each frame will contain different number of face. How can I crop all different faces that appear in a frame?
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!