C++ 使用WinBio注册指纹,样本号
我正在尝试使用Windows生物识别框架注册指纹。这个过程非常简单,但我想问一下,注册是否需要定义数量的样本(用户滑动手指的次数) 如果这是基于硬件的,那么您使用的指纹读取器应该会有所改变,但我想知道这是否是特定于实现的 我正在复制MSDN中的示例C++ 使用WinBio注册指纹,样本号,c++,windows,fingerprint,C++,Windows,Fingerprint,我正在尝试使用Windows生物识别框架注册指纹。这个过程非常简单,但我想问一下,注册是否需要定义数量的样本(用户滑动手指的次数) 如果这是基于硬件的,那么您使用的指纹读取器应该会有所改变,但我想知道这是否是特定于实现的 我正在复制MSDN中的示例 我们可以知道每次需要多少数据吗?在指纹登记结束之前,无法确定需要多少样本。 (我查找此号码的唯一原因是为了告知用户需要尝试多少次-想法不好…否,这取决于传感器、指纹清除等。为什么不让Windows决定何时完成数据? // Capture enroll
我们可以知道每次需要多少数据吗?在指纹登记结束之前,无法确定需要多少样本。
(我查找此号码的唯一原因是为了告知用户需要尝试多少次-想法不好…否,这取决于传感器、指纹清除等。为什么不让Windows决定何时完成数据?
// 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;
}
}