how to crop face from many number of frames(video)?I just croped 3 faces from single frame.Here is my code.Also show me how to save cropped faces from each frame in array?
조회 수: 2 (최근 30일)
이전 댓글 표시
clc; clear all; obj=VideoReader('vtu.avi');
img = read(obj,1); figure(1),imshow(img);
FaceDetect = vision.CascadeObjectDetector;
BB = step(FaceDetect,img);
figure(2),imshow(img);
end
for i = 1:size(BB,1)
rectangle('Position',BB(i,:),'LineWidth',3,'LineStyle','-','EdgeColor','r');
end for i = 1:size(BB,1) J= imcrop(img,BB(i,:)); figure(3),subplot(2,2,i);imshow(J); end
댓글 수: 0
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!