【发布时间】:2014-01-29 00:14:50
【问题描述】:
我使用函数“fdetect”裁剪出检测到的人脸,现在我正在尝试将获得的 2D 图像重塑为 1D 图像向量。我尝试了以下方法:
for k=1:length(files)
%read the images in the folder
imgs=imread(fullfile);
fdI=fdetect(imgs);
targetsize=[256 256];
img_resized=imresize(fdI,targetsize);
[irow icol]=size(img_resized',irow*icol,1);
T=[T temp] %1D image vector
end
但我得到了错误:
函数 IMRESIZE 期望其第一个输入 A 为非空。
我检查了函数“fdetect”的输出及其非空值,它给出了裁剪后的面孔。 任何人都可以指出我的错误或任何其他方式吗? 提前致谢。
【问题讨论】:
标签: matlab image-processing crop