Griaule Biometrics

Home » GrEnroll

GrEnroll

Enrolls a fingerprint image.

Prerequisites Prerequisites The Fingerprint SDK library must have been previously initialized.The template array must be already allocated. The recommended size is GR_MAX_SIZE_TEMPLATE bytes.

Return On success, the enroll quality code is returned. On failure, the appropriate error code is returned.

Parameters

[in] rawImage

A raw grayscale fingerprint image.

[in] width

Fingerprint image width in pixels.

[in] height

Fingerprint image height in pixels.

[in] res

Fingerprint image resolution in DPI.

[out] tpt

The byte array in which the fingerprint template will be stored.

[in,out] tptSize

[in] The maximum size in bytes of the byte array supplied.
[out] The size in bytes of the extracted template.

[out] quality

The template quality.

[in] tptFormat

The template format to be used.

[in] context

Context in which the enrollment will be performed.

Declaration

C++

int result;
// set current buffer size for the consolidated template
_tpt->_size = GR_MAX_SIZE_TEMPLATE;
result = GrEnroll(_raw.img, _raw.width, _raw.height, _raw.Res, (char*)_tpt->_tpt, &_tpt->_size, &_tpt->_quality, GR_FORMAT_DEFAULT, GR_DEFAULT_CONTEXT);

// if error, set template size to 0
if (result < 0){
// Result < 0 => enrollment problem
_tpt->_size = 0;
}


Delphi



Var
ret: Integer;
Begin
// set current buffer size for the consolidated template
template.size := GR_MAX_SIZE_TEMPLATE;
ret := GrEnroll(raw.img, raw.width, raw.height, raw.res, template.tpt, template.size, template.quality, GR_FORMAT_DEFAULT, GR_DEFAULT_CONTEXT);
// if error, set template size to 0
// Result < 0 => enrollment problem
if (ret < 0 ) then
template.size := 0;
End;