【发布时间】:2016-06-27 14:17:15
【问题描述】:
我已从图像中检测到人脸。现在我想将检测到的人脸作为 jpg 图像存储在 matlab 中。请有人指导我。
人脸检测代码为:
img = imread('C:\Users\Anmol\Desktop\face_recognition\Pgm\image1');
facedetector = vision.CascadeObjectDetector()
BBOX = step(facedetector,img)
B = insertObjectAnnotation(img,'rectangle',BBOX,'Face');
title('detected faces');
n = size(BBOX,1);
string = num2str(n);
str = strcat('no of face=',string);
disp(str);
非常感谢有人可以提供将检测到的人脸存储为 jpg 图像的代码
【问题讨论】:
-
你试过
imwrite吗? mathworks.com/help/matlab/ref/imwrite.html?refresh=true -
如果检测到多个人脸会怎样?是否要单独保存所有图像?
标签: matlab image-processing matlab-cvst