how to recognize the face after the detection and croping in the image

5 ビュー (過去 30 日間)
rushi parikh
rushi parikh 2023 年 3 月 21 日
回答済み: Image Analyst 2023 年 3 月 21 日
% Initialize the detector
faceDetector = vision.CascadeObjectDetector;
shapeInserter = vision.ShapeInserter('BorderColor','Custom','CustomBorderColor',[0 255 0]);
% Read the image
I = imread('solvey.jpg'); % Read your image here
imshow(I);
bbox = step(faceDetector, I);
% Draw boxes around detected faces and display results
I_faces = step(shapeInserter, I, int32(bbox));
figure;imshow(I_faces), title('Detected faces');
% Cropping individual faces
for i=1:size(bbox,1)
face = imresize(imcrop(I,bbox(i,:)),[60 60]);
figure;imshow(face,[]);
end
  1 件のコメント
Sachin
Sachin 2023 年 3 月 21 日
編集済み: Sachin 2023 年 3 月 21 日
what error you are getting ?

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2023 年 3 月 21 日
No 20 line long program can do face recognition (identifying the name of the person in the image given that the person is a member of the database of all potential people to pick from). It's far too complicated, especially as the number of faces in the database becomes large. For a start, see this:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by