4. Enrolling the Fingerprint
The Enroll method is used to enroll fingerprints. All fingerprint data is used as the type
of handle, binary or encoded text found in the NBioBSP Class Library module.
Fingerprint data will be entered into the handle of FIR property upon successful
enrollment, and it can be returned as the type of binary or encoded text. The NBioBSP
Class Library provides various overloading Enroll method that can be used for the
specific purpose. One of example is as below.
Code:
m_NBioAPI = new NBioAPI();
...
NBioAPI.Type.HFIR hNewFIR;
ret = m_NBioAPI.Enroll(out hNewFIR, null);
if (ret == NBioAPI.Error.NONE)
{
Code:
// Enroll success ...
// Get binary encoded FIR data
NBioAPI.Type.FIR biFIR;
m_NBioAPI.GetFIRFromHandle(hNewFIR, out biFIR);
// Get text encoded FIR data
NBioAPI.Type.FIR_TEXTENCODE textFIR;
m_NBioAPI.GetTextFIRFromHandle(hNewFIR, out textFIR, true);
// Write FIR data to file or DB
}
else
// Enroll failed ...
Fingerprint data will be stored as saving biFIR or textFIR to a file or DB.(logic for stroing in DB or TEXT file is not in scope of this thread)