matlab - 在人脸识别过程中,如何计算matlab训练集中每个图像的特征脸或PCA算法的阈值?

标签 matlab face-recognition threshold eigenvector

我编写了使用特征脸进行人脸识别的matlab代码。我得到了归一化图像、平均图像、特征脸,并计算了最小和最大欧氏距离。现在我必须将欧氏距离与阈值进行比较才能识别人脸。每张人脸图像的阈值是如何计算的?下一步是什么?

  %show the reconstructed image.
  subplot(1,2,2)
  imagesc(ReshapedImage); colormap('gray');
  title('Reconstructed image','fontsize',18)

  InImWeight = [];
  for i=1:size(u,2)
   t = u(:,i)';
  WeightOfInputImage = dot(t,Difference');
  InImWeight = [InImWeight; WeightOfInputImage];
  end

  ll = 1:M;
  figure(68)
  subplot(1,2,1)
  stem(ll,InImWeight)
   title('Weight of Input Face','fontsize',14)

    % Find Euclidean distance
     e=[];
   for i=1:size(omega,2)
       q = omega(:,i);
     DiffWeight = InImWeight-q;
       mag = norm(DiffWeight);
       e = [e mag];
         end

     kk = 1:size(e,2);
     subplot(1,2,2)
     stem(kk,e)
     title('Eucledian distance of input image','fontsize',14)

      MaximumValue=max(e)
      MinimumValue=min(e)

最佳答案

据我所知,人脸识别中的阈值选择没有标准规则。

由于您似乎有一组图像训练,因此您可以尝试根据生物特征性能指标选择阈值,例如错误接受率 (FAR) 和错误匹配率 (FMR)。

您可以尝试通过在一定范围内改变阈值来对训练集中的图像进行分类,并接受 MinimumValue 低于阈值的图像检测。 根据获得的结果,您可以为训练集选择适当的阈值。

关于matlab - 在人脸识别过程中,如何计算matlab训练集中每个图像的特征脸或PCA算法的阈值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22625591/

相关文章:

visual-studio-2010 - 是否可以将 Matlab 编译器链接到 Visual C++ 编译器?

arrays - 从数组中生成坐标

java - 如何使用 OpenIMAJ 识别新面孔

python - SKlearn : KDTree how to return nearest neighbour based on threshold (Python)

matlab - 如何在 Sublime Text 3 中定义自定义关键字自动缩进行为?

opencv - cv2.face' 没有属性 'LBPHFaceRecognizer

algorithm - 按相似度进行人脸聚类

opencv - emguCV 获得最大的 blob

r - 如何使用内部阈值解决 ODE?

git - 如何通过MATLAB脚本运行git命令?