SignDoc SDK (C++)
5.0.0
|
Biometric data of handwritten signatures. More...
#include <SignDocSDK-cpp.h>
Public Member Functions | |
SignDocSignatureData () | |
Constructor. More... | |
SignDocSignatureData (const SignDocSignatureData &aSource) | |
Copy constructor. More... | |
~SignDocSignatureData () | |
Destructor. More... | |
SignDocSignatureData & | operator= (const SignDocSignatureData &aSource) |
Assignment operator. More... | |
void | swap (SignDocSignatureData &aOther) |
Efficiently swap this object with another one. More... | |
Type | getType () const |
Get the type of handwritten signatures stored in this object. More... | |
bool | isEmpty () const |
Check if this object is empty. More... | |
bool | isReference () const |
Check if this object contains a reference. More... | |
bool | isSignature () const |
Check if this object contains a signature. More... | |
int | getNumberOfSignatures () const |
Get the number of signatures in this object. More... | |
ReturnCode | getStaticQuality (const SignDocImageParameters *aImageParameters, int &aOutput) const |
Compute the static quality of a reference. More... | |
ReturnCode | getDynamicQuality (int &aOutput) const |
Compute the dynamic quality of a reference. More... | |
void | clear () |
Remove all signatures. More... | |
ReturnCode | addEmptySignature () |
Add an empty signature. More... | |
ReturnCode | add (const SignDocSignatureData &aSource) |
Add signatures from another SignDocSignatureData object. More... | |
ReturnCode | addFromFile (Encoding aEncoding, const std::string &aPath, unsigned aFlags) |
Add signatures from a file. More... | |
ReturnCode | addFromFile (const wchar_t *aPath, unsigned aFlags) |
Add signatures from a file. More... | |
ReturnCode | addFromMemory (const unsigned char *aPtr, size_t aSize, unsigned aFlags) |
Add signatures from a blob. More... | |
ReturnCode | loadFromFile (const wchar_t *aPath, unsigned aFlags) |
Load (deserialize) signatures from a file. More... | |
ReturnCode | loadFromFile (Encoding aEncoding, const std::string &aPath, unsigned aFlags) |
Load (deserialize) signatures from a file. More... | |
ReturnCode | loadFromMemory (const unsigned char *aPtr, size_t aSize, unsigned aFlags) |
Load (deserialize) signatures from a blob. More... | |
ReturnCode | saveToMemory (std::vector< unsigned char > &aOutput, int aFormat) const |
Serialize this object to a blob. More... | |
ReturnCode | saveToFile (Encoding aEncoding, const std::string &aPath, int aFormat) const |
Serialize this object to a file. More... | |
ReturnCode | saveToFile (const wchar_t *aPath, int aFormat) const |
Serialize this object to a file. More... | |
ReturnCode | selectSignature (int aIndex) |
Select a signature for most functions operating on a single signature. More... | |
int | getSelectedSignature () const |
Get the index of the currently selected signature. More... | |
ReturnCode | getDeviceId (int &aOutput) const |
Get the capture device identifier. More... | |
ReturnCode | setDeviceId (int aDeviceId) |
Set the capture device identifier. More... | |
ReturnCode | getDeviceMaxPressure (int &aOutput) const |
Get the maximum pressure (force) value of the capture device. More... | |
ReturnCode | getDevicePressureLevels (int &aOutput) const |
Get the number of pressure (force) values supported by the capture device. More... | |
ReturnCode | setDeviceMaxPressure (int aDeviceMaxPressure) |
Set the maximum pressure (force) value of the capture device. More... | |
ReturnCode | getDeviceResolution (int &aOutput) const |
Get the spatial resolution of the capture device. More... | |
ReturnCode | setDeviceResolution (int aDeviceResolution) |
Set the spatial resolution of the capture device. More... | |
ReturnCode | getDeviceSampleRate (int &aOutput) const |
Get the sample rate (temporal resolution) of the capture device. More... | |
ReturnCode | setDeviceSampleRate (int aDeviceSampleRate) |
Set the sample rate (temporal resolution) of the capture device. More... | |
ReturnCode | getDeviceSerialNumber (std::vector< unsigned char > &aOutput) const |
Get the serial number of the capture device. More... | |
ReturnCode | setDeviceSerialNumber (const unsigned char *aPtr, size_t aSize) |
Set the serial number of the capture device. More... | |
ReturnCode | getTimeStamp (unsigned &aOutput) const |
Get the capture time stamp. More... | |
ReturnCode | setTimeStamp (unsigned aTimeStamp) |
Set the capture time stamp. More... | |
ReturnCode | getNumberOfSamples (int &aOutput) const |
Get the number of samples. More... | |
bool | hasTimeChannel () const |
Check if the biometric data has a time channel. More... | |
ReturnCode | getSample (int aIndex, int &aX, int &aY, int &aP, int &aT) const |
Get a sample. More... | |
ReturnCode | getMaxP (int &aOutput) const |
Compute the maximum pressure (force) value recorded in the biometric data. More... | |
ReturnCode | getMaxX (int &aOutput) const |
Compute the maximum X coordinate recorded in the biometric data. More... | |
ReturnCode | getMaxY (int &aOutput) const |
Compute the maximum Y coordinate recorded in the biometric data. More... | |
ReturnCode | getMinX (int &aOutput) const |
Compute the minimum X coordinate recorded in the biometric data. More... | |
ReturnCode | getMinY (int &aOutput) const |
Compute the minimum Y coordinate recorded in the biometric data. More... | |
ReturnCode | getHeight (int &aOutput) const |
Compute the height of the signature. More... | |
ReturnCode | getWidth (int &aOutput) const |
Compute the width of the signature. More... | |
ReturnCode | clearSamples () |
Remove all samples from a signature. More... | |
ReturnCode | addSample (int aX, int aY, int aP, int aT) |
Add a sample. More... | |
ReturnCode | mirrorY () |
Mirror signatures vertically. More... | |
ReturnCode | checkReference (const SignDocCheckSignatureParameters *aCheckSignatureParameters, const SignDocImageParameters *aImageParameters, bool &aOutput) const |
Check biometric data of a reference for plausibility. More... | |
ReturnCode | getComplexity (const SignDocImageParameters *aImageParameters, int &aOutput) const |
Compute the complexity of a signature. More... | |
ReturnCode | checkSignature (const SignDocCheckSignatureParameters *aCheckSignatureParameters, const SignDocImageParameters *aImageParameters, bool &aOutput) const |
Check biometric data of a signature for plausibility. More... | |
ReturnCode | renderAsImage (std::vector< unsigned char > &aImage, const SignDocImageParameters &aImageParameters, SignDocRenderOutput *aOutput) const |
Render a signature as image (returned as a blob). More... | |
ReturnCode | renderAsSignDocImage (const SignDocImageParameters &aImageParameters, std::unique_ptr< SignDocImage > &aImage) const |
Render a signature as image (returned as a SignDocImage object). More... | |
ReturnCode | matchSignature (const SignDocSignatureData &aOther, const SignDocMatchParameters *aMatchParameters, const SignDocImageParameters *aImageParameters, std::unique_ptr< SignDocMatchResult > &aOutput) const |
Match a single signature against another signature or a reference. More... | |
ReturnCode | matchReference (const SignDocSignatureData &aOther, const SignDocMatchParameters *aMatchParameters, const SignDocImageParameters *aImageParameters, std::unique_ptr< SignDocMatchResult > &aOutput) const |
Match a reference against a single signature. More... | |
const char * | getErrorMessage (Encoding aEncoding) const |
Get an error message for the last function call. More... | |
const wchar_t * | getErrorMessageW () const |
Get an error message for the last function call. More... | |
void | setErrorMessage (Encoding aEncoding, const std::string &aMessage) |
Set the error message. More... | |
SignDocSignatureData (SIGNDOC_SignatureData *aP) | |
Internal function. More... | |
SIGNDOC_SignatureData * | getImpl () |
Internal function. More... | |
const SIGNDOC_SignatureData * | getImpl () const |
Internal function. More... | |
void | setImpl (SIGNDOC_SignatureData *aP) |
Internal function. More... | |
Biometric data of handwritten signatures.
A SignDocSignatureData object holds any number of handwritten signatures:
To change the state from t_empty to t_signature, do one of these:
To change the state from t_empty to t_reference, do one of these:
To change from any state to t_empty, do this:
To change the state from t_signature to t_reference, do one of these:
To create an object of type t_signature from an object of type t_reference, do this:
The origin of the coordinate system is in the upper left corner of the capture device; X coordinates increase to the right, Y coordinates increase downwards. Note that this coordinate system differs from the coordinate system used by ISO 19794-7. Unless flag f_iso_flag_compat1 is set, the coordinate system will be transformed appropriately when reading or writing ISO 19794-7 data.
Functions for creating SignDocSignatureData objects:
Functions for getting information about a SignDocSignatureData object:
Functions for modifying a SignDocSignatureData object:
Functions for serializing and deserializing a SignDocSignatureData object:
Functions for getting information about the currently selected signature:
Functions for modifying the currently selected signature:
Other functions:
enum CaptureDevice |
Capture device identifiers.
Most of these are obsolete.
Enumerator | |
---|---|
cd_unknown |
Unknown capture device. |
cd_intuos |
Wacom Intuos. |
cd_mobinetix |
MobiNetix. |
cd_graphire |
Wacom Graphire. |
cd_bs_hesy |
BS Hesy. |
cd_pl400 |
Wacmo PL400. |
cd_epos |
Interlink ePAD Point of Sales. |
cd_esig |
Interlink ePad E-Signature. |
cd_eink |
Interlink ePad-Ink E-Signature. |
cd_penpartner |
Wacom PenPartner. |
cd_tabletpc |
Tablet PC. Integrated Tablet PC capture device. |
cd_stepover |
StepOver. |
cd_eid |
Interlink Epad-ID. |
cd_mtldc |
MotionTouch LegaPad LCD. |
cd_mtlpd |
MotionTouch LegaPad. MotionTouch LegaPad tablet without LDC. |
cd_epad2 |
Interlink ePad II. |
cd_bluem |
Stepover blueM II. Stepover blueM II tablet without LCD. |
cd_bluemlcd |
Stepover blueM II with LCD. |
cd_tzse |
Topaz tablet with LCD (and pressure). Topaz LCD SE. |
cd_epadls |
Interlink EPad-LS. |
cd_eink2 |
Interlink EPad-Ink Pro. |
cd_eid2 |
Interlink EPad-ID Pro. |
cd_signpad |
Wacom SignPad. STU-300, STU-500, etc. |
cd_bamboo |
Wacom Bamboo. |
cd_Verifone_mx |
Verifone MX 800 series. |
cd_ingenico_sc350 |
Ingenico iSC350. |
cd_ipad |
Apple iPad. |
cd_iphone |
Apple iPhone. |
cd_ipod |
Apple iPod. |
cd_olivetti_zpad_b8001 |
Olivetti Graphos zPad-B8001. |
cd_samsung_gt_n7000 |
Samsung GT-N7000. |
cd_htc_p510e |
HTC Flyer P510e. |
cd_android_touch |
mobilephone touch. Android touch device. |
cd_html5_capture |
HTML5 capture client. |
cd_olivetti_graphos_a10 |
Olivetti Graphos A10. |
cd_ensign10 |
Euronovate ENSign10. |
cd_vpsign |
VPSign. |
cd_user_first |
First user-defined device identifier. |
cd_user_last |
Last user-defined device identifier. |
enum Format |
Blob format flags.
Enumerator | |
---|---|
f_iso_mask_single |
Mask for blob format: formats specified by a single value. |
f_iso_mask_wrapper |
Mask for blob format: CBEFF wrapper. |
f_iso_mask_bdb |
Mask for blob format: BDB format. |
f_iso_mask_data |
Mask for blob format: data format. |
f_iso_mask_flags |
Mask for blob format: flags. |
f_softpro |
Blob format: SOFTPRO Flatfile format for dynamic signatures and references.
|
f_iso_19785_3_none |
Blob format: No ISO/IEC 19785-3:2015 (CBEFF) wrapper. This should be used with f_iso_19794_7_2014 (version 2) only as ISO/IEC 19794-7:2007 (version 1) requires a CBEFF wrapper. However, some products accept only unwrapped version 1 BDBs.
|
f_iso_19785_3_format2 |
Blob format: Use ISO/IEC 19785-3:2015 patron format type 2 ("minimum simple byte-oriented patron format") CBEFF wrapper. This can be used with f_iso_19794_7_2007tc1 or f_iso_19794_7_2014. With f_iso_19794_7_2007tc1, this patron format cannot be used for saving references.
|
f_iso_19785_3_format3 |
Blob format: Use ISO/IEC 19785-3:2015 patron format type 3 ("maximum simple patron format (byte oriented) using presence bitmap") CBEFF wrapper. This can be used with f_iso_19794_7_2007tc1 or f_iso_19794_7_2014. With f_iso_19794_7_2007tc1, this patron format cannot be used for saving references.
|
f_iso_19785_3_format6 |
Blob format: Use ISO/IEC 19785-3:2015 patron format type 6 ("complex patron format") CBEFF wrapper. This can be used with f_iso_19794_7_2007tc1 or f_iso_19794_7_2014. Both signatures and references can be saved with this patron format.
|
f_iso_19794_7_2007tc1 |
Blob format: ISO/IEC 19794-7:2007 (with Technical Corrigendum 1) Biometric Data Block (version 1). Please also use f_iso_19785_3_format2, f_iso_19785_3_format3, or f_iso_19785_3_format6 to specify the ISO/IEC 19785-3 wrapper. Alternateively, use f_iso_19785_3_none (signature) to omit the CBEFF wrapper; the CBEFF wrapper is mandatory in ISO/IEC 19794-7:2007, but some products accept only unwrapped BDBs. f_iso_19785_3_format6 is required for saving references, signatures can be saved with any of these constants. Please also use f_iso_19794_7_full (default) to select the data format. You can include flag f_iso_flag_meters for using ISO/IEC 19794-7:2007 without Technical Corrigendum 1. You can include flag f_iso_flag_compat1 for bug compatibility with SignWare before version 3.2.9.0. You can include flag f_iso_flag_no_ext_data to omit extended data. |
f_iso_19794_7_2014 |
Blob format: ISO/IEC 19794-7:2014 Biometric Data Block (version 2). Please also use f_iso_19785_3_none, f_iso_19785_3_format2, f_iso_19785_3_format3, or f_iso_19785_3_format6 to specify the ISO/IEC 19785-3 wrapper. Unlike ISO/IEC 19794-7:2007, ISO/IEC 19794-7:2014 allows BDBs without CBEFF wrapper. Both signatures and references can be saved with any of these constants. Please also use f_iso_19794_7_full (default) to select the data format. |
f_iso_19794_7_full |
Blob format: ISO/IEC 19794-7 full format. To be used with either f_iso_19794_7_2007tc1 or f_iso_19794_7_2014. Contrast with compact format, compression format, and XML, all of which are not yet supported.
|
f_iso_flag_meters |
Blob format flag: Use meters rather than millimeters for X and Y coordinates. ISO-format signatures written by SignWare before version 3.2.9.0 use meters as units for the X and Y coordinates as specified by the original version of ISO/IEC 19794-7:2007. Technical Corrigendum for ISO/IEC 19794-7:2007 changed the units to millimeters. Set this flag for compatibility with software that implements ISO/IEC 19794-7:2007 without Technical Corrigendum 1. This flag takes effect only if the Biometric Data Block is in ISO/IEC 19794-7:2007 format (version 1). For loading signatures or references written by SignWare before version 3.2.9.0, just leave f_iso_flag_no_fix unset rather than setting this flag. For saving signatures or references to be read by SignWare before version 3.2.9.0, set f_iso_flag_compat1 rather than this flag. This flag is ignored for non-ISO formats.
|
f_iso_flag_no_fix |
Blob format flag: do not attempt to automatically fix ISO-format signatures that have been written by SignWare before version 3.2.9.0. ISO-format signatures written by SignWare before version 3.2.9.0 have multiple issues:
These bugs have been fixed in SignWare 3.2.9.0. When loading a signature or reference, all of these issues will be fixed automatically if data written by SignWare before version 3.2.9.0 is detected, unless this flag (f_iso_flag_no_fix) is set. If this flag is set, no attempt is made to fix the data. If the signature or reference was indeed written by SignWare before version 3.2.9.0, loading will fail or the data read will be incorrect. When saving a signature or reference, this flag must not be set. This flag is ignored for non-ISO formats.
|
f_iso_flag_compat1 |
Blob format flag: write with bug compatibility with SignWare before version 3.2.9.0. ISO-format signatures written by SignWare before version 3.2.9.0 have multiple issues:
These bugs have been fixed in SignWare 3.2.9.0. Use this flag for saving signatures in a format that is bug-compatible with old versions of SignWare (except for the bdbCreationDate bug). Extended data will be omitted (see f_iso_flag_no_ext_data). When saving a signature or reference, this flag takes effect only if the Biometric Data Block is in ISO/IEC 19794-7:2007 format (version 1) with a patron format type 2, 3, or 6 CBEFF wrapper, that is, for format f_iso_19794_7_2007tc1 (with f_iso_19785_3_format2, f_iso_19785_3_format3, or f_iso_19785_3_format6). When loading a signature or reference, this flag must not be set. This flag is ignored for non-ISO formats.
|
f_iso_flag_no_ext_data |
Blob format flag: Omit or ignore extended data. By default, extended data will be written that includes the following information:
If this flag is set, extended data won't be added when saving a signature or reference and extended data will be ignored when loading a signature or reference. This flag is ignored for non-ISO formats.
|
enum Type |
Type of handwritten signatures stored in a SignDocSignatureData object.
This is the return type of getType().
Enumerator | |
---|---|
t_empty |
Empty. SignDocSignatureData objects of this type do not contain any handwritten signature. |
t_signature |
Signature. SignDocSignatureData objects of this type contain exactly one handwritten signature. |
t_reference |
Reference. SignDocSignatureData objects of this type contain two or more handwritten signatures. |
|
inline |
Constructor.
The new SignDocSignatureData object won't contain any signature. getType() will return t_empty.
Use loadFromFile() or loadFromMemory() to load signatures. Use add(), addEmptySignature(), addFromFile(), or addFromMemory() to add signatures.
|
inline |
Copy constructor.
[in] | aSource | The object to be copied. |
|
inline |
Destructor.
|
inline |
Internal function.
|
inline |
Add signatures from another SignDocSignatureData object.
If this object has type t_signature and aSource has type t_signature or t_reference, this object will become a reference.
All involved signatures must have the same sample rate.
[in] | aSource | The source object. |
|
inline |
Add an empty signature.
If this object has type t_signature, it will become a reference. If this object has type t_signature or t_reference, the new empty signature will inherit the sample rate and capture device ID of the existing signature.
The new signature will be the selected signature.
|
inline |
Add signatures from a file.
If this object has type t_signature and the blob in the file contains a signature or a reference, this object will become a reference.
This function opens the file, loads signatures from the file, and closes the file.
[in] | aEncoding | The encoding of aPath. |
[in] | aPath | The pathname of the file to be read. |
[in] | aFlags | Flags modifying the behavior of this function: |
|
inline |
Add signatures from a file.
If this object has type t_signature and the blob in the file contains a signature or a reference, this object will become a reference.
This function opens the file, loads signatures from the file, and closes the file.
[in] | aPath | The pathname of the file to be read. |
[in] | aFlags | Flags modifying the behavior of this function: |
|
inline |
Add signatures from a blob.
If this object has type t_signature and the blob pointed to by aPtr contains a signature or a reference, this object will become a reference.
[in] | aPtr | A pointer to the first octet of a serialized SignDocSignatureData object, see saveToMemory(). |
[in] | aSize | Size in octets of the blob pointed to by aPtr. |
[in] | aFlags | Flags modifying the behavior of this function: |
|
inline |
Add a sample.
This function fails if aT is -1 and this object already contains a sample with time channel.
This function fails if aT is not -1 and this object already contains a sample without time channel.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aX | X coordinate. |
[in] | aY | Y coordinate. |
[in] | aP | Pressure (or force), normalized to 0 through 1023. A sample with zero pressure is used for separating strokes. |
[in] | aT | Relative time in milliseconds. Must be -1 if the biometric data does not have a time channel. |
|
inline |
Check biometric data of a reference for plausibility.
The static and dynamic qualities of a reference should be equal to or greater than a certain value and the variance should be below a certain value. The individual signatures should meet or exceed a certain size and contain a certain number of different pressure levels. The complexity of the individual signatures should be equal to or greater than a certain value.
This function throws an exception if this object does not have type t_reference.
The following parameters are defined for aCheckSignatureParameters (see SignDocCheckSignatureParameters):
Additionally, the following parameters will be used if the value of boolean parameter "ReferenceCheckSignatures" is true:
[in] | aCheckSignatureParameters | Parameters for checking a signature. Default parameters will be used if this argument is nullptr. |
[in] | aImageParameters | A pointer to parameters for rendering the signature as image, should be nullptr for using default parameters. |
[out] | aOutput | The result will be stored here: true if the biometric data passes all checks, false if the biometric data fails any check. |
|
inline |
Check biometric data of a signature for plausibility.
A handwritten signature should meet or exceed a certain size and contain a certain number of different pressure levels. The static qualitiy of a signature should be equal to or greater than a certain value.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
The following parameters are defined for aCheckSignatureParameters (see SignDocCheckSignatureParameters):
[in] | aCheckSignatureParameters | Parameters for checking a signature. Default parameters will be used if this argument is nullptr. |
[in] | aImageParameters | A pointer to parameters for rendering the signature as image, should be nullptr for using default parameters. |
[out] | aOutput | The result will be stored here: true if the biometric data passes all checks, false if the biometric data fails any check. |
|
inline |
Remove all signatures.
getType() will return t_empty.
|
inline |
Remove all samples from a signature.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
|
inline |
Compute the complexity of a signature.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aImageParameters | A pointer to parameters for rendering the signature as image, should be nullptr for using default parameters. |
[out] | aOutput | The complexity of the signature in the range 0 (most simple) through 100 (most complex). |
|
inline |
Get the capture device identifier.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The capture device identifier, see enum CaptureDevice. |
|
inline |
Get the maximum pressure (force) value of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The maximum pressure (force) value of the capture device. |
|
inline |
Get the number of pressure (force) values supported by the capture device.
Some capture device drivers record the number of pressure (force) values rather than the maxium pressure (force) value, that is, they getDeviceMaxPressure() report a value that is off by one. This function (getDevicePressureLevels()) tries to work around that problem. It either returns the same value as getDeviceMaxPressure() (if that value looks wrong) or that value plus one (if that value looks good).
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The number of pressure (force) values supported by the capture device. |
|
inline |
Get the spatial resolution of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The spatial resolution of the device in 1/inch. This value is used for the X and Y coordinates. |
|
inline |
Get the sample rate (temporal resolution) of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The number of samples per second or 0 if the biometric data has a time channel. |
|
inline |
Get the serial number of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The serial number as an array of bytes, empty if the capture device does not have a serial number. |
|
inline |
Compute the dynamic quality of a reference.
This function fails if this object does not have type t_reference.
[out] | aOutput | The dynamic quality in the range 0 (bad) through 100 (very good). |
|
inline |
Get an error message for the last function call.
[in] | aEncoding | The encoding to be used for the error message. |
|
inline |
Get an error message for the last function call.
|
inline |
Compute the height of the signature.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The maximum X coordinate minus the minimum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value. |
|
inline |
Internal function.
|
inline |
Internal function.
|
inline |
Compute the maximum pressure (force) value recorded in the biometric data.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The maximum pressure (force) value (0 through 1023), zero if there are no samples. |
|
inline |
Compute the maximum X coordinate recorded in the biometric data.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The maximum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value. |
|
inline |
Compute the maximum Y coordinate recorded in the biometric data.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The maximum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value. |
|
inline |
Compute the minimum X coordinate recorded in the biometric data.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The minimum X coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value. |
|
inline |
Compute the minimum Y coordinate recorded in the biometric data.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The minimum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value. |
|
inline |
Get the number of samples.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The number of samples. |
|
inline |
Get the number of signatures in this object.
References contain two or more signatures, objects of type t_signature contain one signature, objects of type t_empty contain zero signatures.
|
inline |
Get a sample.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty or if aIndex is out of range.
[in] | aIndex | The 0-based index of the sample. |
[out] | aX | X coordinate. |
[out] | aY | Y coordinate. |
[out] | aP | Pressure (or force), normalized to 0 through 1023. A sample with zero pressure is used for separating strokes. |
[out] | aT | Relative time in milliseconds. Set to -1 if the biometric data does not have a time channel. |
|
inline |
Get the index of the currently selected signature.
|
inline |
Compute the static quality of a reference.
This function matches all signatures of the reference aginst all signatures of the reference using the static matching engine and returns the smallest match quality.
It is highly recommended to check the static quality if you intend to use the static matching engine. The result is the greater the more similar the signatures of the reference are.
This function fails if this object does not have type t_reference.
[in] | aImageParameters | Parameters for rendering the signature as image, should be nullptr for using default parameters. |
[out] | aOutput | The smallest static match quality encountered (0 through 100). |
|
inline |
Get the capture time stamp.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The capture time in seconds since 1970-01-01T00:00Z or zero if the time stamp is not available. |
|
inline |
Get the type of handwritten signatures stored in this object.
|
inline |
Compute the width of the signature.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[out] | aOutput | The maximum Y coordinate minus the minimum Y coordinate (samples with positive pressure (force) value only), zero if there are no samples with positive pressure (force) value. |
|
inline |
Check if the biometric data has a time channel.
This function returns false if this object has type t_empty or if this object has type t_reference and no signature has been selected with selectSignature().
|
inline |
Check if this object is empty.
|
inline |
Check if this object contains a reference.
|
inline |
Check if this object contains a signature.
|
inline |
Load (deserialize) signatures from a file.
This function is equivalent to clear() followed by addFromFile().
[in] | aPath | The pathname of the file to be read. |
[in] | aFlags | Flags modifying the behavior of this function: |
|
inline |
Load (deserialize) signatures from a file.
This function is equivalent to clear() followed by addFromFile().
[in] | aEncoding | The encoding of aPath. |
[in] | aPath | The pathname of the file to be read. |
[in] | aFlags | Flags modifying the behavior of this function: |
|
inline |
Load (deserialize) signatures from a blob.
This function is equivalent to clear() followed by addFromMemory().
[in] | aPtr | A pointer to the first octet of a serialized SignDocSignatureData object, see saveToMemory(). |
[in] | aSize | Size in octets of the blob pointed to by aPtr. |
[in] | aFlags | Flags modifying the behavior of this function: |
|
inline |
Match a reference against a single signature.
This function fails if this object does not have type t_reference.
If aOther has type t_reference, selectSignature() must have been called at least once for aOther to select the signature to match against.
matchSignature() matches a single signature against a single signature or a reference, matchReference() matches a reference against a single signature.
The license must allow comparing signatures.
[in] | aOther | The signature to match against. |
[in] | aMatchParameters | Parameters controlling how signature are matched. If this argument is nullptr, all parameters will be set to their respective default value. |
[in] | aImageParameters | Parameters controlling how signature are rendered as images for static matching. If this argument is nullptr, all parameters will be set to their respective default value. String parameter "Format" will be ignored. |
[out] | aOutput | A pointer to a new SignDocMatchResult object or nullptr will be stored here. The caller is responsible for destroying that object. |
|
inline |
Match a single signature against another signature or a reference.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object does not have type t_signature or t_reference.
matchSignature() matches a single signature against a single signature or a reference, matchReference() matches a reference against a single signature.
The license must allow comparing signatures.
[in] | aOther | The signature or reference to match against. |
[in] | aMatchParameters | Parameters controlling how signature are matched. If this argument is nullptr, all parameters will be set to their respective default value. |
[in] | aImageParameters | Parameters controlling how signature are rendered as images for static matching. If this argument is nullptr, all parameters will be set to their respective default value. String parameter "Format" will be ignored. |
[out] | aOutput | A pointer to a new SignDocMatchResult object or nullptr will be stored here. The caller is responsible for destroying that object. |
|
inline |
Mirror signatures vertically.
The signatures are mirrored such that for each signature the range of Y coordinates is not changed.
There is no function for mirroring a single signature of a reference.
|
inline |
Assignment operator.
[in] | aSource | The source object. |
|
inline |
Render a signature as image (returned as a blob).
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
The following parameter in aImageParameters is mandatory:
There are three ways to specify the size of the image:
The license must allow rendering signatures.
[out] | aImage | The rendered image will be stored here. |
[in] | aImageParameters | Parameters controlling how the signature is rendered. |
[out] | aOutput | The image size will be stored here. You can pass nullptr if you don't need the image size. This argument must not be nullptr for raw format. |
|
inline |
Render a signature as image (returned as a SignDocImage object).
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
See renderAsImage() for details. String parameter "Format" is ignored by this function.
The license must allow rendering signatures.
[in] | aImageParameters | Parameters controlling how the signature is rendered. |
[out] | aImage | The new SignDocImage object will be stored here. |
|
inline |
Serialize this object to a file.
Empty objects can be serialized only if aFormat is f_softpro.
[in] | aEncoding | The encoding of aPath. |
[in] | aPath | The pathname of the file to be created or overwritten. |
[in] | aFormat | Format to be used, see enum Format: either f_softpro or a combination (bitwise or) of up to one constant from each of the following three groups:
|
|
inline |
Serialize this object to a file.
Empty objects can be serialized only if aFormat is f_softpro.
[in] | aPath | The pathname of the file to be created or overwritten. |
[in] | aFormat | Format to be used, see enum Format: either f_softpro or a combination (bitwise or) of up to one constant from each of the following three groups:
|
|
inline |
Serialize this object to a blob.
Empty objects can be serialized only if aFormat is f_softpro.
[out] | aOutput | The serialized data will be stored here. |
[in] | aFormat | Format to be used, see enum Format: either f_softpro or a combination (bitwise or) of up to one constant from each of the following three groups:
|
|
inline |
Select a signature for most functions operating on a single signature.
If this object contains a single signature (getType() returns t_signature), selectSignature() need not be called. If this object contains a multiple signatures (getType() returns t_reference), selectSignature() must be called before any of these functions can be used:
The following functions also have an effect on what signature is selected:
[in] | aIndex | 0-based index of the signature to be selected or -1 to make no signature selected. |
|
inline |
Set the capture device identifier.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aDeviceId | The new capture device identifier, see enum CaptureDevice. |
|
inline |
Set the maximum pressure (force) value of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aDeviceMaxPressure | The new maximum pressure (force) value of the capture device. |
|
inline |
Set the spatial resolution of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aDeviceResolution | The new device resolution in 1/inch. This value is used for the X and Y coordinates. |
|
inline |
Set the sample rate (temporal resolution) of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aDeviceSampleRate | The new number of samples per second or 0 if the biometric data has a time channel. |
|
inline |
Set the serial number of the capture device.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aPtr | A pointer to the first octet of the new serial number of the capture device. |
[in] | aSize | The number of octets in the new serial number (0 through 20). |
|
inline |
Set the error message.
|
inline |
Internal function.
|
inline |
Set the capture time stamp.
If this object has type t_reference, selectSignature() must be called once before this function.
This function fails if this object has type t_empty.
[in] | aTimeStamp | The capture time in seconds since 1970-01-01T00:00Z or zero if the time stamp is not available. |
|
inline |
Efficiently swap this object with another one.
[in] | aOther | The other object. |