【问题标题】:Create FeatureSet in Digital persona Fingerprint SDK在数字角色指纹 SDK 中创建 FeatureSet
【发布时间】:2017-04-24 11:54:50
【问题描述】:

我正在用 C# 创建指纹验证系统。我有数字角色 U.are.U 4500 指纹读取器。我正在阅读 sdk 来创建自己的应用程序,但我被困在“FeatureExtraction”步骤中。在向模板添加功能时它给了我错误说'对象引用未设置为对象实例。我已经检查了我的代码并在项目顶部启动了我的注册对象,但错误仍然相同。 这是我的代码,它给了我错误。

DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Enrollment);

        // Check quality of the sample and add to enroller if it's good
        if (features != null) try
            {
                Enroller.AddFeatures(features);     // Add feature set to template.
                MessageBox.Show("The fingerprint feature set was created.");
            }

这里是正确返回特征对象的“ExtractFeatures”函数。

protected DPFP.FeatureSet ExtractFeatures(DPFP.Sample Sample, DPFP.Processing.DataPurpose Purpose)
    {
        DPFP.Processing.FeatureExtraction Extractor = new DPFP.Processing.FeatureExtraction();  // Create a feature extractor
        DPFP.Capture.CaptureFeedback feedback = DPFP.Capture.CaptureFeedback.None;

        Extractor.CreateFeatureSet(Sample, Purpose, ref feedback, ref features);            // TODO: return features as a result?
        if (feedback == DPFP.Capture.CaptureFeedback.Good)
            return features;
        else
            return null;
    }

如果有人可以提供帮助,请帮助我解决我的问题。 谢谢

【问题讨论】:

    标签: c# fingerprint fingerprinting digital-persona-sdk


    【解决方案1】:

    请在您的代码中检查以下内容:

    1. ExtractFeatures 的方法定义: protected DPFP.FeatureSet ExtractFeatures(DPFP.Sample Sample, DPFP.Processing.DataPurpose Purpose)

    您传递的是参数类型注册,而不是未定义的参数类型 DataPurpose。

    DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Enrollment);

    1. 此外,在您的 ExtractFeatures 方法中,您将返回一个未在您的方法中声明的变量 features。代码应该如下:

      受保护的 DPFP.FeatureSet ExtractFeatures(DPFP.Sample Sample,DPFP.Processing.DataPurpose 目的) { DPFP.Processing.FeatureExtraction 提取器 = new DPFP.Processing.FeatureExtraction(); // 创建一个特征提取器 DPFP.Capture.CaptureFeedback 反馈 = DPFP.Capture.CaptureFeedback.None; DPFP.FeatureSet features = new DPFP.FeatureSet(); Extractor.CreateFeatureSet(Sample, Purpose, ref feedback, ref features); // TODO: 作为结果返回特征? 如果(反馈 == DPFP.Capture.CaptureFeedback.Good) 返回特征; 别的 返回空值; }

    希望对您有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-29
      • 2020-11-27
      • 2010-10-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-04
      相关资源
      最近更新 更多