SPSignature.h File Reference
Detailed Description
SignWare Dynamic Development toolkit, signature object.
- Author:
- uko
Use SPSignatureCreate, SPSignatureCreateFromFlatFile, SPSignatureCreateFromFlatFile3, SPSignatureCreateFromGuiAcqu, SPSignatureCreateFromGuiDisp SPSignatureCreateFromReference, SPSignatureCreateFromTablet, SPSignatureCreateFromTellerImage, or SPSignatureCreateFromTemplate to create an SPSignature object.
If you intend to fill a signature object with data derived from a customized tablet driver then please consider these rules:
- Create an empty signature object (SPSignatureCreate)
- Fill all device characteristics:
- resolution: the capture resolution, you may resample down to 300 LPI if the device has a higher resolution
- sample rate: pass the sample rate of the device, or 0 if the device does not sample at equidistant time intervals. You must pass timestamps for all vectors if the sample rate is 0
- pressure levels: the number of pressure levels of the device (e. g. 2 if the device passes pen down / pen up)
- Device id: a unique id of the device, Device IDs in the range from 10000 ... 11000 are for free use, however SPTabletGetDeviceStr will return "Unknown Device".
- Fill the timestamp of the signature capture process, may be the time of the first or the last stroke, the time is unix time stamp (seconds since 1.1.1970 UTC).
- Optionally pass a serial id of the device
- Add all vectors from the device to the signature.
Assure to add a zero pressure vector (to the first pen down coordinate) whenever the pen was liftet up.
vector data:- x the x-coordinate of the sample point, where x / res = physx [inch] from left border
- y the y-coordinate of the sample point, where y / res = physy [inch] from top border
- p the pressure level normalized to 1024 (p = pDevice * 1024 / PressureLevels)
- t the time stamp of the vector, mseconds since start of signature capture, may be -1 if the device samples at equidistant time intervals
- Note:
- Creation of a signature object according to the above rules does not necessarily imply good comparison results, the characteristics of the device (resolution, sample rate, linearity, pressure levels) have an important impact on the comparison quality.
Defines | |
#define | SP_SIGNATURE_MIN_HEIGHT "SPSignatureMinHeight" |
Check signature minimum height. | |
#define | SP_SIGNATURE_MIN_PRESSURE_LEVELS "SPSignatureMinPressureLevels" |
Check signature minimum pressure levels. | |
#define | SP_SIGNATURE_MIN_STATIC_QUALITY "SPSignatureMinStaticQuality" |
Check signature minimum static quality. | |
#define | SP_SIGNATURE_MIN_VECTORS "SPSignatureMinVectors" |
Check the signature minimum number of vectors with pressure. | |
#define | SP_SIGNATURE_MIN_WIDTH "SPSignatureMinWidth" |
Check signature minimum width. | |
Functions | |
SPINT32 __cdecl | SPSignatureAddVector (pSPSIGNATURE_T pSignature, SPINT32 iX, SPINT32 iY, SPINT32 iPress) |
Add a tablet vector (sample) to an SPSignature object. | |
SPINT32 __cdecl | SPSignatureAddVector2 (pSPSIGNATURE_T pSignature, SPINT32 iX, SPINT32 iY, SPINT32 iPress, SPINT32 iTime) |
Add a tablet vector (sample) to an SPSignature object. | |
SPINT32 __cdecl | SPSignatureCheck (pSPSIGNATURE_T pSignature, pSPPROPERTYMAP_T pParams) |
Check a signature. | |
SPINT32 __cdecl | SPSignatureClearVectors (pSPSIGNATURE_T pSignature) |
Remove all tablet vectors (samples) from an SPSignature object. | |
SPINT32 __cdecl | SPSignatureClone (pSPSIGNATURE_T pSignature, pSPSIGNATURE_T *ppSignature) |
Create a copy of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureCreate (pSPSIGNATURE_T *ppSignature) |
Create a new SPSignature object. | |
SPINT32 __cdecl | SPSignatureCreateFromAcquire (pSPSIGNATURE_T *ppSignature, pSPACQUIRE_T pSPAcquire) |
Get the signature during acquiry mode. | |
SPINT32 __cdecl | SPSignatureCreateFromFlatFile (pSPSIGNATURE_T *ppSignature, const SPUCHAR *pbFlatFile, SPINT32 iFlatFileLength) |
Create a new SPSignature object from a flat file object. | |
SPINT32 __cdecl | SPSignatureCreateFromFlatFile3 (pSPSIGNATURE_T *ppSignature, const SPUCHAR *pbFlatFile, SPINT32 iFlatFileLength, SPINT32 iFlags) |
Create a new SPSignature object from a flat file object. | |
SPINT32 __cdecl | SPSignatureCreateFromGuiAcqu (pSPSIGNATURE_T *ppSignature, pSPGUIACQU_T pSPGuiAcqu) |
Get the signature during acquiry mode. | |
SPINT32 __cdecl | SPSignatureCreateFromGuiDisp (pSPSIGNATURE_T *ppSignature, pSPGUIDISP_T pSPGuiDisp) |
Create a new SPSignature object from an SPGuiDisp object. | |
SPINT32 __cdecl | SPSignatureCreateFromReference (pSPSIGNATURE_T *ppSignature, pSPREFERENCE_T pReference, SPINT32 iIndex) |
Create a new SPSignature object from a signature of an SPReference object. | |
SPINT32 __cdecl | SPSignatureCreateFromTablet (pSPSIGNATURE_T *ppSignature, pSPTABLET_T pTablet) |
Create a new SPSignature object using device parameters of an SPTablet object. | |
SPINT32 __cdecl | SPSignatureCreateFromTellerImage (pSPSIGNATURE_T *ppSignature, pSPTELLERIMAGE_T pTellerImage) |
Create an SPSignature object from an SPTellerImage object. | |
SPINT32 __cdecl | SPSignatureCreateFromTemplate (pSPSIGNATURE_T *ppSignature, pSPTEMPLATE_T pTemplate) |
Create a new SPSignature object from a an SPTemplate object. | |
SPINT32 __cdecl | SPSignatureFree (pSPSIGNATURE_T *ppSignature) |
Deallocate an SPSignature object. | |
SPINT32 __cdecl | SPSignatureFreeImage (SPUCHAR **ppImage) |
Deallocate a bitmap created by SPSignatureGetImage. | |
SPINT32 __cdecl | SPSignatureGetComplexity (pSPSIGNATURE_T pSignature, SPINT32 *piComplexity) |
Get the complexity of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetDevice (pSPSIGNATURE_T pSignature, SPINT32 *piDevice) |
Get the tablet device ID from an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetImage (pSPSIGNATURE_T pSignature, SPDOUBLE dZoom, SPINT32 iImageFormat, SPUCHAR **ppbImage, SPINT32 *piImageLength) |
Create a bitmap from the signature contained in an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetImageSize (pSPSIGNATURE_T pSignature, SPINT32 *piWidth, SPINT32 *piHeight) |
Get the size of an image for the signature contained in an SPReference object. | |
SPINT32 __cdecl | SPSignatureGetImageWithDPI (pSPSIGNATURE_T pSignature, SPDOUBLE dDPI, SPINT32 iImageFormat, SPUCHAR **ppbImage, SPINT32 *piImageLength) |
Create a bitmap from the signature contained in an SPSignature object with a certain resolution. | |
SPINT32 __cdecl | SPSignatureGetMaxPressure (pSPSIGNATURE_T pSignature, SPINT32 *piMaxPressure) |
Get the pressure range of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetNrVectors (pSPSIGNATURE_T pSignature, SPINT32 *piNrVectors) |
Get the number of tablet vectors (samples) contained in an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetPadSerial (pSPSIGNATURE_T pSignature, SPUCHAR *pbPadSerial, SPINT32 *piPadSerialLength) |
Get the tablet serial ID of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetResolution (pSPSIGNATURE_T pSignature, SPINT32 *piResolution) |
Get the resolution of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetSampleRate (pSPSIGNATURE_T pSignature, SPINT32 *piSampleRate) |
Get the sample rate of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetTimeStamp (pSPSIGNATURE_T pSignature, SPUINT32 *puTimeStamp) |
Get the timestamp of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetVector (pSPSIGNATURE_T pSignature, SPINT32 iIndex, SPINT32 *piX, SPINT32 *piY, SPINT32 *piPress) |
Get the values of a tablet vector (sample) contained in an SPSignature object. | |
SPINT32 __cdecl | SPSignatureGetVector2 (pSPSIGNATURE_T pSignature, SPINT32 iIndex, SPINT32 *piX, SPINT32 *piY, SPINT32 *piPress, SPINT32 *piTime) |
Get the values of a tablet vector (sample) contained in an SPSignature object. | |
SPINT32 __cdecl | SPSignatureMirrorY (pSPSIGNATURE_T pSignature) |
Mirror a signature vertically. | |
SPINT32 __cdecl | SPSignatureSetDevice (pSPSIGNATURE_T pSignature, SPINT32 iDevice) |
Set the tablet device ID of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureSetMaxPressure (pSPSIGNATURE_T pSignature, SPINT32 iMaxPressure) |
Set the pressure range of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureSetPadSerial (pSPSIGNATURE_T pSignature, const SPUCHAR *pbPadSerial, SPINT32 iPadSerialLength) |
Set the tablet serial ID of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureSetResolution (pSPSIGNATURE_T pSignature, SPINT32 iResolution) |
Set the resolution of an SPIgnature object. | |
SPINT32 __cdecl | SPSignatureSetSampleRate (pSPSIGNATURE_T pSignature, SPINT32 iSampleRate) |
Set the sample rate of an SPSignature object. | |
SPINT32 __cdecl | SPSignatureSetStaticGrayAlias (pSPSIGNATURE_T pSignature, SPBOOL bGrayAlias) |
Calculate gray levels in a static signature either from pressure levels of the vectors or from aliasing. | |
SPINT32 __cdecl | SPSignatureSetStaticPenWidth (pSPSIGNATURE_T pSignature, SPDOUBLE dWidth) |
Set the width of the pen used by an SPSignature object. | |
SPINT32 __cdecl | SPSignatureSetTicket (pSPSIGNATURE_T pSignature, pSPTICKET_T pTicket) |
Pass a license ticket to an SPSignature object to enable rendering. | |
SPINT32 __cdecl | SPSignatureSetTimeStamp (pSPSIGNATURE_T pSignature, SPUINT32 uTimeStamp) |
Set the timestamp of an SPSignature object. |
Define Documentation
|
Check signature minimum height.
|
|
Check signature minimum pressure levels.
|
|
Check signature minimum static quality.
|
|
Check the signature minimum number of vectors with pressure.
|
|
Check signature minimum width.
|
Function Documentation
|
Add a tablet vector (sample) to an SPSignature object.
|
|
Add a tablet vector (sample) to an SPSignature object.
|
|
Check a signature. Signature plausibility check. A signature should exceed a certain size and contain a pressure level range.
|
|
Remove all tablet vectors (samples) from an SPSignature object.
|
|
Create a copy of an SPSignature object.
|
|
Create a new SPSignature object. An SPSignature object created by this function does not contain a signature.
|
|
Get the signature during acquiry mode. The returned SPSignature object may not contain all vectors captured so far. This function is provided to check for empty signatures before accepting the signature (see SPGuiAcquAcquireDone). Modifying the SPSignature object won't have an effect on the signature being captured. This function behaves exactly like SPGuiAcquGetSignature.
|
|
Create a new SPSignature object from a flat file object. This function deserializes an SPSignature object serialized by SPFlatFileCreateFromSignature. SPSignatureCreateFromFlatFile() is equivalent to SPSignatureCreateFromFlatFile3() with a value of zero for iFlags unless overridden by environment variable SIGNWARE_ISO_LOAD. The value of that environment variable is either a decimal number or a hexadecimal number (prefixed by "0x"). The number will be shifted left 20 bits, that is, the following values (and combinations thereof) are defined:
|
|
Create a new SPSignature object from a flat file object. This function deserializes an SPSignature object serialized by SPFlatFileCreateFromSignature. This function does not use environment variable SIGNWARE_ISO_LOAD.
|
|
Get the signature during acquiry mode. The returned SPSignature object may not contain all vectors captured so far. This function is provided to check for empty signatures before accepting the signature (see SPGuiAcquAcquireDone). Modifying the SPSignature object won't have an effect on the signature being captured. This function behaves exactly like SPGuiAcquGetSignature.
|
|
Create a new SPSignature object from an SPGuiDisp object.
|
|
Create a new SPSignature object from a signature of an SPReference object.
|
|
Create a new SPSignature object using device parameters of an SPTablet object. These device-specific parameters of the SPSignature object will be initialized with properties of the tablet:
|
|
Create an SPSignature object from an SPTellerImage object.
|
|
Create a new SPSignature object from a an SPTemplate object.
|
|
Deallocate an SPSignature object. The SPSignature object must have been created by SPSignatureClone, SPSignatureCreate, SPSignatureCreateFromFlatFile, SPSignatureCreateFromFlatFile3, SPSignatureCreateFromGuiAcqu, SPSignatureCreateFromGuiDisp SPSignatureCreateFromReference, SPSignatureCreateFromTablet, SPSignatureCreateFromTellerImage, SPSignatureCreateFromTemplate, or SPGuiDispGetSignature.
|
|
Deallocate a bitmap created by SPSignatureGetImage.
|
|
Get the complexity of an SPSignature object.
|
|
Get the tablet device ID from an SPSignature object.
|
|
Create a bitmap from the signature contained in an SPSignature object. There is no inverse function for SPSignatureGetImage because the created image represents a static signature and does not contain dynamic (biometric) features.
|
|
Get the size of an image for the signature contained in an SPReference object. The actual image might be slightly bigger than predicted by this function.
|
|
Create a bitmap from the signature contained in an SPSignature object with a certain resolution. There is no inverse function for SPSignatureGetImage because the created image represents a static signature and does not contain dynamic (biometric) features.
|
|
Get the pressure range of an SPSignature object. The maximum pressure is read from the capabilities of the tablet used for capturing the signature. The pressure values of the signature data are normalized to the range 0 through 1023.
|
|
Get the number of tablet vectors (samples) contained in an SPSignature object.
|
|
Get the tablet serial ID of an SPSignature object. This function is provided for future use, currently no tablets support tablet serial ID's. The size of a tablet serial ID is limited to 20 bytes.
|
|
Get the resolution of an SPSignature object.
|
|
Get the sample rate of an SPSignature object.
|
|
Get the timestamp of an SPSignature object.
|
|
Get the values of a tablet vector (sample) contained in an SPSignature object.
|
|
Get the values of a tablet vector (sample) contained in an SPSignature object.
|
|
Mirror a signature vertically. The signature is mirrored such that the range of Y coordinates is not changed.
|
|
Set the tablet device ID of an SPSignature object. You should not overwrite the device ID unless you know what you are doing.
|
|
Set the pressure range of an SPSignature object. You should not overwrite the maximum pressure unless you know what you are doing.
|
|
Set the tablet serial ID of an SPSignature object. This function is provided for future use, currently no tablets support tablet serial ID's. The size of a tablet serial ID is limited to 20 bytes.
|
|
Set the resolution of an SPIgnature object. This function just changes the resolution attribut of the signature, the signature will not be resampled to the new resolution. You should not overwrite the resolution unless you know what you are doing.
|
|
Set the sample rate of an SPSignature object. This function just changes the sample rate attribut of the signature, the signature will not be resampled to the new sample rate. This function is provided to overwrite the sample rate when using Wacom tablets. Wacom tablets always return a sample rate of 100 Hz though the real sample rate may differ. SPTabletAcquireDone attempts to compute the real sample rate; you should set the sample rate of the captured signature to the computed sample rate (see SPTabletGetSampleRate). SPGuiAcquAcquireDone does this automatically.
|
|
Calculate gray levels in a static signature either from pressure levels of the vectors or from aliasing. By default, the gray level is based on the pressure level of a vector.
|
|
Set the width of the pen used by an SPSignature object. The pen is used for creating a static image from the signature contained in the SPSignature object. By default, the width of the pen is 0.5mm.
|
|
Pass a license ticket to an SPSignature object to enable rendering. When using a ticket license, you must pass at least one ticket charged for action SP_TICKET_RENDER if you want to convert a dynamic signature to a static image. This function copies the SPTicket object.
|
|
Set the timestamp of an SPSignature object. This function is provided to add a timestamp to a signature.
|