imcrop関数とfor構文を使って、検出された全ての顔を切り取り、Figureにひとつずつ表示するプログラムを教えてください。
Show older comments
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関数を用いたプログラム
Answers (1)
Atsushi Ueno
on 11 Dec 2022
Edited: Atsushi Ueno
on 11 Dec 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
Categories
Find more on 深層学習を使用したオブジェクトの検出 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!