imcrop関数とfor構文を使って、検出された全ての顔を切り取り、Figureにひとつずつ表示するプログラムを教えてください。
이전 댓글 표시
clear all
faceDetector = vision.CascadeObjectDetector;
I = imread('visionteam.jpg');
bboxes = faceDetector(I);
IFaces = insertObjectAnnotation(I,'rectangle',bboxes,'Face');
figure;
imshow(IFaces)
title('Detected faces'); %以下にimcrop関数を用いたプログラム
답변 (1개)
Atsushi Ueno
2022년 12월 11일
편집: Atsushi Ueno
2022년 12월 11일
clear all
faceDetector = vision.CascadeObjectDetector;
I = imread('visionteam.jpg');
bboxes = faceDetector(I);
IFaces = insertObjectAnnotation(I,'rectangle',bboxes,'Face');
figure;
imshow(IFaces)
title('Detected faces'); %以下にimcrop関数を用いたプログラム
%imcrop関数とfor構文を使って、検出された全ての顔を切り取り、Figureにひとつずつ表示する
for k = 1:size(bboxes,1)
ICrpd = imcrop(I,bboxes(k,:));
figure;
imshow(ICrpd)
end
카테고리
도움말 센터 및 File Exchange에서 Process Point Clouds에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!