指纹注册使用WinBio,样本号

Fingerprint enroll using WinBio, sample number

本文关键字:样本 WinBio 注册 指纹      更新时间:2023-10-16

我正在尝试使用Windows生物识别框架注册指纹。这个过程很简单,但我想问你,是否需要定义数量的样本(用户刷手指的次数)来进行注册?

如果这是基于硬件的,那么它应该会随着你使用的指纹读取器而改变,但我想知道这是否是特定于实现的。

我正在复制MSDN 中的示例

// Capture enrollment information by swiping the sensor with
// the finger identified by the subFactor argument in the 
// WinBioEnrollBegin function.
for (int swipeCount = 1;; ++swipeCount)
{
    wprintf_s(L"n Swipe the sensor to capture %s sample.",
             (swipeCount == 1)?L"the first":L"another");
    hr = WinBioEnrollCapture(
            sessionHandle,  // Handle to open biometric session
            &rejectDetail   // [out] Failure information
            );
    wprintf_s(L"n Sample %d captured from unit number %d.", 
              swipeCount, 
              unitId);
    if (hr == WINBIO_I_MORE_DATA)
    {
        wprintf_s(L"n    More data required.n");
        continue;
    }
    if (FAILED(hr))
    {
        if (hr == WINBIO_E_BAD_CAPTURE)
        {
            wprintf_s(L"n  Error: Bad capture; reason: %d", 
                      rejectDetail);
            continue;
        }
        else
        {
            wprintf_s(L"n WinBioEnrollCapture failed. hr = 0x%x", hr);
            goto e_Exit;
        }
    }
    else
    {
        wprintf_s(L"n    Template completed.n");
        break;
    }
}

我们能知道每次还需要多少数据吗?

在指纹登记结束之前,无法确定需要多少样本。(我寻找这个数字的唯一原因是为了通知用户需要多少次尝试-想法不好…)