基于matlab的人脸检测
我在我的项目中搜索了matlab人脸检测。 我发现了一个: 我下载了源代码,但它不起作用,我从matlab中得到了错误: ???类型的输入参数的未定义函数或方法“fdmex” “uint8” 10秒时出现错误==>tinytest=fdmex(x',阈值) 主要剧本是:基于matlab的人脸检测,matlab,face-detection,matlab-cvst,Matlab,Face Detection,Matlab Cvst,我在我的项目中搜索了matlab人脸检测。 我发现了一个: 我下载了源代码,但它不起作用,我从matlab中得到了错误: ???类型的输入参数的未定义函数或方法“fdmex” “uint8” 10秒时出现错误==>tinytest=fdmex(x',阈值) 主要剧本是: x = imread('geeks.jpg'); % decision threshold. % change this to a smaller value, if too many false detections oc
x = imread('geeks.jpg');
% decision threshold.
% change this to a smaller value, if too many false detections occur.
% change it to a larger value, if faces are not recognized.
% a reasonable range is -10 ... 10.
threshold = 0;
imagesc(x); hold on; colormap gray;
s = fdmex(x', threshold);
for i=1:size(s,1)
h = rectangle('Position',[s(i,1)-s(i,3)/2,s(i,2)-s(i,3)/2,s(i,3),s(i,3)], ...
'EdgeColor', [1,0,0], 'linewidth', 2);
end
axis equal;
axis off
您能找到错误吗?根据您的matlab版本,它看起来像
fdlib
,带有.dll
,将其重命名为.mexw32
,或主机所需的任何内容。您可以通过运行以下命令来确定这一点:
>> mexext
mexw32
在Matlab命令提示符下。使用mex扩展名,并将fdmex.dll
重命名为fdmex.mexw32
,或者将mexext
返回的任何内容重命名为
如果我在我的Windows XP机器上运行,我会得到一张漂亮的照片:
但是,如果您没有32位计算机,软件作者会在
请注意,所有版本均针对英特尔奔腾CPU进行了优化。如果
您希望在不同的平台上运行它,或者使用其他平台
有问题,请告诉我
他有一个个人资料和电子邮件的链接,因此我建议联系他获取64位版本的可执行文件。通常,当我看到uint8错误和灰度图像时,我需要做的就是发出红旗
colorImg=imread('imageName.jpg')
% Even if the image is grayscale, if its png or jpg,
% it will load in as a color image almost exclusively
img=rgb2gray(colorImg)
如果您查看img输出,您现在会注意到它的类型是double,而不是uint8:)
如果这不起作用,希望麦克达夫斯会起作用,但如果这真的能解决问题,我的问题似乎更容易解决。:) 如果您有安装了计算机视觉系统工具箱的最新版本的Matlab,您可以使用Vision.CascadeObjectDetector
系统对象来检测图像中的人脸。我将.dll更改为.mexw64,但我遇到另一个错误:???无效的MEX文件“C:\ran\Dropbox\IST Project\face detection\face\fdmex.mexw64”:C:\ran\Dropbox\IST Project\face detection\face\fdmex.mexw64. 11秒时出现错误==>tinytest=fdmex(x',阈值)@user2299317,如果您使用的是64位windows,则需要一个64位dll。fdmex.dll是一个32位dll。听起来您需要重新编译源代码。