imcrop関数とfor構文を使って、検出された全ての顔を切り取り、Figureにひとつずつ表示するプログラムを教えてください。
Afficher commentaires plus anciens
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関数を用いたプログラム
Réponses (1)
Atsushi Ueno
le 11 Déc 2022
Modifié(e) : Atsushi Ueno
le 11 Déc 2022
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
Catégories
En savoir plus sur Process Point Clouds dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!