RealScan Basic SDK Reference Manual V1.8.7
RealScan Basic SDK Reference Manual V1.8.7
Reference Manual
Rev. 1.8.7
Important Notice
Information in this document is provided in connection with Suprema products. No license, express
or implied, by estoppel or otherwise, to any intellectualproperty rights is granted by this document.
Except as provided in Suprema’s Terms and Conditions of Sale for such products, Suprema assumes
no liabilitywhatsoever, and Suprema disclaims any express or implied warranty, relating to sale
and/or use of Suprema products including liability or warranties relating tofitness for a particular
purpose, merchantability, or infringement of any patent, copyright or other intellectual property
right. Suprema products are notintended for use in medical, life saving, life sustaining applications,
or other applications in which the failure of the Supremaproduct could create a situation where
personal injury or death may occur.Should Buyer purchase or use Supremaproducts for any such
unintended or unauthorized application, Buyer shall indemnify and hold Supremaand its officers,
employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and
expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal
injury or death associated with such unintended or unauthorized use, even if such claim alleges that
Supremawas negligent regarding the design or manufacture of the part.
Supremareserves the right to make changes to specifications and product descriptions at any time
without notice to improve reliability, function, or design.
Designers must not rely on the absence or characteristics of any features or instructions marked
"reserved" or "undefined." Suprema reserves these forfuture definition and shall have no
responsibility whatsoever for conflicts or incompatibilities arising from future changes to them.
Contact your local Suprema sales office or your distributor to obtain the latest specifications and
before placing your product order.
*Third-party brands and names are the property of their respective owners.
Contents
1. Introduction ........................................................................ 9
1.1. Contents of the SDK .............................................................. 9
1.2. Usage ................................................................................. 9
1.2.1. Compilation ............................................................................... 9
3. API Specification................................................................ 19
3.1. Return Codes ..................................................................... 19
3.2. Compatibility...................................................................... 23
3.3. Device API ......................................................................... 26
RS_InitSDK........................................................................................27
RS_InitDevice ....................................................................................28
RS_ExitDevice ....................................................................................29
RS_ExitAllDevices ...............................................................................30
RS_GetDeviceInfo ..............................................................................31
RS_GetCaptureMode ...........................................................................39
RS_SetCaptureModeWithDir .................................................................40
RS_GetCaptureModeWithDir.................................................................43
RS_GetManualCaptureMode .................................................................46
RS_SetMinimumFinger ........................................................................47
RS_GetMinimumFinger ........................................................................48
RS_SetRollFingerOption .......................................................................49
RS_GetRollFingerOption ......................................................................51
RS_GetImageSize ...............................................................................52
RS_StartCapture ................................................................................54
RS_AbortCapture ................................................................................56
RS_RegisterCaptureCallback ................................................................57
RS_RegisterCaptureDataCallback ..........................................................58
RS_RegisterAdvCaptureDataCallback ....................................................59
RS_RegisterPreviewCallback ................................................................61
RS_RegisterAdvPreviewCallback ...........................................................62
RS_TakeImage ...................................................................................64
RS_TakeImageData ............................................................................66
RS_TakeImageDataSegment ................................................................68
RS_TakeImageDataEx .........................................................................77
RS_TakeCurrentImage ........................................................................79
RS_TakeCurrentImageData ..................................................................81
RS_TakeCurrentImageDataSegment .....................................................83
RS_TakeCurrentImageDataSegmentWithSize .........................................86
RS_TakeCurrentImageEx .....................................................................89
RS_TakeCurrentImageDataEx ..............................................................91
RS_Segment ......................................................................................93
RS_SegmentMask ...............................................................................96
RS_Segment_HandDecision .................................................................99
RS_GetLFDResult.............................................................................. 138
RS_AddOverlayCross......................................................................... 157
RS_AddOverlayLine........................................................................... 158
RS_SetFingerLED.............................................................................. 171
RS_DisplayLCD................................................................................. 176
1. Introduction
1.2. Usage
1.2.1. Compilation
To call APIs defined in the SDK, RS_API.h should be included in the source files
and Include should be added to the include directories. To link user application
with the SDK, RS_SDK.libshould be added to library modules.
#include “RS_API.h”
int main()
{
// First, initialize the SDK
int numOfDevice, deviceHandle;
intresult = RS_InitSDK(NULL, 0,&numOfDevice);
RECT drawRect;
GetDlgItem(IDC_VIEW_WINDOW)->GetClientRect(&drawRect);
result = RS_SetViewWindow(deviceHandle, GetDlgItem(IDC_VIEW_WINDOW)-
>m_hWnd, drawRect, false);
// Capture images
unsigned char* imageData = NULL;
int imageWidth, imageHeight;
result = RS_TakeImageData(deviceHandle, 10000, &imageData, &imageWidth,
&imageHeight);
// Do something
// …
// …
}
1
RealScan-10F and RealScan-G10F models cannot capture rolling fingers.
Copyright © 2020 by Suprema ID Inc. 11
RealScan Basic SDK Reference Manual
2. QuickStart Guide
This chapter is for developers who want to get started quickly with RealScan
SDK.It shows how to do the most common tasks withRealScandevices.Only
snippets of C++ source codes will be listed below. For more detailed examples,
see the Example directory of the SDK.
There are three ways to capture fingerprint images as depicted in Figure 1 Capture
Process. You can select any method according to the requirements of your
application.
RS_RegisterCapture
RS_StartCapture RS_TakeImageData
DataCallback
RS_TakeCurrent Capture
RS_StartCapture
No ImageData images
Callback is executed
after an image is
captured
Done?
Yes
// Callback function
void sampleCaptureCallback( int deviceHandle, int captureResult, unsigned
char* imageData, int imageWidth, int imageHeight )
{
// do something
}
if( imageData )
{
RS_FreeImageData( imageData );
}
If( imageData )
{
RS_FreeImageData( imageData );
}
The SDK includes an example project written in C++. You can compile and test it
in Microsoft Visual Studio 2005 or later. Inspecting the source codes would be the
fastest way to be acquainted with the SDK.
(1) Press Init button to initialize the SDK. The connected devices will be
shown at the left combo box.
(2) Select a device and press Init Device button to initialize it.
(3) Select a capture mode. Then, the image size of the capture mode will be
displayed.
(4) Enable the preview window. Otherwise, the preview and captured images
will not be shown on the screen.
(7) To test the switches and LEDs, select IO tab. You can control each I/O port
individually in the menu.
(8) To test the keypads and LCD, select IO tab. You can control each I/O port
individually in the menu.This is only for RealScan-F series.
3. API Specification
Every API in the SDK returns RS_SUCCESS when it succeeds. When it fails, it
returns a corresponding error code. For the API-specific meanings of these codes,
refer to Error Codes section of each API. You can also get a short description of
an error code by RS_GetErrString.
INITIALIZED
RS_ERR_CANNOT_OPEN_ DEVICE -107 Cannot open the device.
RS_ERR_CANNOT_WRITE_USB -108 Cannot write the data to the device.
RS_ERR_WRITE_USB_ TIMEOUT -109 Write timeout.
RS_ERR_CANNOT_READ_USB -110 Cannot read the data from the
device.
RS_ERR_READ_USB_TIMEOUT -111 Read timeout.
RS_ERR_INVALID_CAMERA_ -112 The camera mode is not supported.
MODE
RS_ERR_UNSUPPORTED_WAV_FO -113 The wave file is in unsupported
RMAT format.
RS_ERR_UNSUPPORTED_ -114 The command is not supported.
COMMAND
RS_ERR_SENSOR_DIRTY -115 The sensor is too dirty. This error will
be returned only if the automatic
calibration is on.
RS_ERR_FINGER_EXIST -116 Fingers are placed on the sensor
before capturing starts. This error
will be returned only if the automatic
calibration is on.
RS_ERR_TOO_STRONG_LIGHT -117 The external light is too strong to
capture images.
RS_ERR_INVALID_DEVICE_ -124 G1 only. Invalid G1 device is
CONNECTION attached.
Capture Related Errors
RS_ERR_INVALID_CAPTURE_ -200 The capture mode is not supported.
MODE
RS_ERR_CAPTURE_DISABLED -201 The capture mode is not enabled.
RS_ERR_CAPTURE_TIMEOUT -202 The capture process is not finished
within the specified timeout period.
RS_ERR_CAPTURE_ABORTED -203 The capture process is aborted.
RS_ERR_ROLL_PART_LIFT -206 A part of the finger is lifted.
RS_ERR_ROLL_DIRTY -207 The sensor surface is dirty, or more
than one finger is detected.
RS_ERR_ROLL_TOO_FAST -208 Rolling speed is too fast.
RS_ERR_ROLL_SHIFTED -209 The rolling finger is shifted.
RS_ERR_ROLL_DRY -210 The finger could not be recognized
3.2. Compatibility
2
The supported capture modes vary according to the scanner device. See
RS_SetCaptureMode for details.
Copyright © 2020 by Suprema ID Inc. 23
RealScan Basic SDK Reference Manual
RS_TakeCurrentImageDataSegment O O O O
RS_TakeCurrentImageDataSegmentWi O O O O
thSize
RS_TakeCurrentImageEx X X O X
RS_TakeCurrentImageDataEx X X O X
RS_Segment O O O O
RS_SegmentMask O O O O
RS_Segment_HandDecision O O O O
RS_SegmentMissingFinger O O O O
RS_SegmentWithSize O O O O
RS_Segment4 O O O O
RS_Segment4WithSize O O O O
RS_SegmentImages O O O O
RS_SegmentImagesMissingFinger O O O O
RS_SequenceCheck O O O O
RS_SequenceCheckMissingFinger O O O O
RS_GetQualityScore O O O O
RS_Calibrate O O O O
RS_SetAutomaticCalibrate O O O O
RS_GetAutomaticCalibrate O O O O
RS_SetAdvancedContrastEnhancement O O O O
RS_GetAdvancedContrastEnhancement O O O O
RS_SetPreProcessing O O O O
RS_GetPreProcessing O O O O
RS_SetPostProcessing O O O O
RS_GetPostProcessing O O O O
RS_SetPostProcessingEx O O O O
RS_GetPostProcessingEx O O O O
RS_SelfTest X O O O
RS_SetSegRotateOption O O O O
RS_SetLFDLevel O X X X
RS_GetLFDLevel O X X X
RS_FindTarget O O O O
RS_IsFinger O O O O
RS_IsCapturing O O O O
RS_RegisterFingerOnCallback O O O O
RS_GetImageQualityScore O O O O
RS_GetCurrentProcessedImage X X X O
RS_GetCurrentSynthesisImage X X X O
RS_SetViewWindow O O O O
RS_StopViewWindow O O O O
RS_AddOverlayText O O O O
RS_AddOverlayCross O O O O
Preview RS_AddOverlayLine O O O O
API RS_AddOverlayQuadrangle O O O O
RS_ShowOverlay O O O O
RS_ShowAllOverlay O O O O
RS_RemoveOverlay O O O O
RS_RemoveAllOverlay O O O O
RS_SetActiveKey X O O O
RS_GetKeyStatus X O O O
RS_RegisterKeypadCallback X O O O
RS_Beep X O O O
I/O API RS_SetCaptureBeep X O O O
RS_SetFingerLED X X O X
RS_SetModeLED X X O X
RS_SetStatusLED O O X X
RS_PlayWav X X O O
RS_DisplayLCD X X X O
RS_MakeLCDData X X X O
RS_ResetLCD X X X O
RS_GetSDKInfo O O O O
RS_GetErrString O O O O
RS_GetErrStringChar O O O O
RS_GetCaptureStatusString O O O O
Misc. API RS_GetCaptureStatusStringChar O O O O
RS_FreeImageData O O O O
RS_SaveBitmap O O O O
RS_SaveBitmapMem O O O O
RS_FreeImageData O O O O
RS_EncodeWSQ O O O O
RS_DecodeWSQ O O O O
You have to initialize the SDK to get the list of attached devices. To control a
device, you have to initialize it and acquire its handle. This handle will be used for
all subsequent function calls to the device.
RS_InitSDK
Initializes the SDK. This function should be called before any other functions are
executed.In most cases, you do not have to call it more than once. However, if any
device is removed or added, you have to call it again after releasing all devices
byRS_ExitAllDevices.
Parameters
configFileName
Reserved for future use. It will be used for fine-tuning the device parameters
in the future revisions.
option
Reserved for future use.
numOfDevice
Number of devices connected to the PC.
Error Codes
RS_SUCCESS The SDK is successfully initialized and the
connected devices are found.
RS_ERR_CANNOT_GET_USB_DEVICE Cannot get device information from USB.
RS_ERR_SDK_ALREADY_INITIALIZED There remain unreleased devices.
Compatibility
RealScan-10,RealScan-D, RealScan-F Series,RealScan-G10 and RealScan-G1
RS_InitDevice
Initializes a device and acquires its handle. The handle should be used for all
subsequent function calls to the device.
Parameters
deviceIndex
Index of the device. It should be less than the numOfDevice returned by
RS_InitSDK.
deviceHandle
Device handle to be returned.
Error Codes
RS_SUCCESS The device is initialized successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_DEVICE_INDEX The device index is invalid.
RS_ERR_DEVICE_ALREADY_INITIALIZED The device is already initialized.
RS_ERR_CANNOT_OPEN_DEVICE Cannot connect to the device.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// (1) Initialize the SDK
int numOfDevice;
int result = RS_InitSDK( NULL, 0, &numOfDevice );
RS_ExitDevice
Releases a device and its resources. After calling this function, you cannot access
the device with the handle any more.
Parameters
deviceHandle
Handle of the device acquired by RS_InitDevice.
Error Codes
RS_SUCCESS The handle and resources are released
successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to stop
it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_ExitAllDevices
RS_ExitAllDevices()
Parameters
None
Error Codes
RS_SUCCESS The handles and resources are released
successfully.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetDeviceInfo
Parameters
deviceHandle
Handle of the device.
deviceInfo
Pointer to the RSDeviceInfo structure, which is defined as follows;
struct RSDeviceInfo {
int deviceType;
char productName[16];
char deviceID[16];
char firmwareVersion[16];
char hardwareVersion[16];
int reserved[32];
};
Field Description
deviceType RS_DEVICE_REALSCAN_10
RS_DEVICE_REALSCAN_10F
RS_DEVICE_REALSCAN_D
RS_DEVICE_REALSCAN_DF
RS_DEVICE_REALSCAN_F
RS_DEVICE_REALSCAN_G10
productName Model name of the device.
deviceID ID of the device. Each device has a unique
device ID.
firmwareVersion Firmware version.
hardwareVersion Hardware version.
Error Codes
RS_SUCCESS The device information is read successfully.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Both RealScan-10 and RealScan-G10 can capture four kinds of images – rolled
single finger, flat single finger, two flat fingers, and four flat fingers. RealScan-D
supports three modes except four flat fingers.To capture an image of a specific
type, you have to configure the mode first. And you can configure other options
such as automatic capture sensitivity and rolling profile. You can also register
callback functions which will be called when the specified event is occurred.
The SDK also provides several functions for enhancing the quality of the images.
These functions can be grouped into two categories – background noise reduction
and contrast enhancement. By making use of these functions carefully, you will be
able to get higher quality images from RealScan devices.
RS_SetCaptureMode
Configures the capture mode. This mode determines what types of images are
captured in the subsequent functions calls. In this version of SDK V1.7, an
extended roll mode is newly added, which makes a device capture a roll finger
image with the size of 800x800 pixels. The available modes for each model are as
follows;
Parameters
deviceHandle
Handle of the device.
captureMode
Available modes are as follows;
Mode Description
RS_CAPTURE_DISABLED Capture is disabled.
RS_CAPTURE_ROLL_FINGER Capture a rolling finger.
RS_CAPTURE_ROLL_FINGER_EX Extended capture mode for roll
finger
RS_CAPTURE_FLAT_SINGLE_FINGER Capture a flat finger.
RS_CAPTURE_FLAT_TWO_FINGERS Capture two flat fingers.
RS_CAPTURE_FLAT_LEFT_FOUR_ Capture four flat fingers of left
FINGERS hand except for the thumb.
Copyright © 2020 by Suprema ID Inc. 36
RealScan Basic SDK Reference Manual
RS_CAPTURE_FLAT_RIGHT_FOUR_ Capture four flat fingers of right
FINGERS hand except for the thumb.
RS_CAPTURE_FLAT_LEFT_PALM Capture a left palm.
RS_CAPTURE_FLAT_RIGHT_PALM Capture a right palm.
RS_CAPTURE_FLAT_SINGLE_FINGER Extended capture mode for
_EX single flat finger.
RS_CAPTURE_FLAT_TWO_FINGERS_ Extended capture mode for two
EX flat fingers.
captureOption
Sensitivity level for capturing flat fingers in automatic mode. This option is
ignored when capturing roll fingers.
Sensitivity Description
RS_AUTO_SENSITIVITY_NORMAL Default sensitivity.
RS_AUTO_SENSITIVITY_HIGH More sensitive for capturing
flat fingers.
RS_AUTO_SENSITIVITY_HIGHER Most sensitive for capturing
flat fingers.
RS_AUTO_SENSITIVITY_DISABLED Mode for fingers in abnormal
condition such as amputated,
bandaged, etc.
withModeLED
If true, turn on the corresponding mode LED at the indicator panel of the
scanner device. The mode LEDs can also be controlled independently by
RS_SetModeLED function. This option is for RealScan-10 only.
Error Codes
RS_SUCCESS The capture mode is set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_CAPTURE_MODE The capture mode is not supported.
RS_ERR_INVALID_PARAM The capture option is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to
stop it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
Copyright © 2020 by Suprema ID Inc. 37
RealScan Basic SDK Reference Manual
// Capture a roll fingerwith mode LED
int result = RS_SetCaptureMode( deviceHandle, RS_CAPTURE_ROLL_FINGER,
RS_AUTO_SENSITIVITY_NORMAL, true );
RS_GetCaptureMode
Parameters
deviceHandle
Handle of the device.
captureMode
Capture mode to be returned.
captureOption
Capture option to be returned.
Error Codes
RS_SUCCESS The capture mode is read successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetCaptureModeWithDir
Configures the capture mode. This mode determines what types of images with
directionare captured in the subsequent functions calls. Since version of SDK V1.7,
an extended roll mode is newly added, which makes a device capture a roll finger
image with the size of 800x800 pixels. The available modes for each model are as
follows;
Parameters
deviceHandle
Handle of the device.
captureMode
Available modes are as follows;
Mode Description
RS_CAPTURE_DISABLED Capture is disabled.
RS_CAPTURE_ROLL_FINGER Capture a rolling finger.
RS_CAPTURE_ROLL_FINGER_EX Extended capture mode for roll
finger
Copyright © 2020 by Suprema ID Inc. 40
RealScan Basic SDK Reference Manual
RS_CAPTURE_FLAT_SINGLE_FINGER Capture a flat finger.
RS_CAPTURE_FLAT_TWO_FINGERS Capture two flat fingers.
RS_CAPTURE_FLAT_LEFT_FOUR_ Capture four flat fingers of left
FINGERS hand except for the thumb.
RS_CAPTURE_FLAT_RIGHT_FOUR_ Capture four flat fingers of right
FINGERS hand except for the thumb.
RS_CAPTURE_FLAT_LEFT_PALM Capture a left palm.
RS_CAPTURE_FLAT_RIGHT_PALM Capture a right palm.
RS_CAPTURE_FLAT_SINGLE_FINGER Extended capture mode for
_EX single flat finger.
RS_CAPTURE_FLAT_TWO_FINGERS_ Extended capture mode for two
EX flat fingers.
captureDirection
Available modes are as follows;
Mode Description
RS_CAPTURE_DIRECTION_DEFAULT Capture direction is basic.
RS_CAPTURE_DIRECTION_LEFT Capture direction is left.
RS_CAPTURE_DIRECTION_RIGHT Capture direction is right.
captureOption
Sensitivity level for capturing flat fingers in automatic mode. This option is
ignored when capturing roll fingers.
Sensitivity Description
RS_AUTO_SENSITIVITY_NORMAL Default sensitivity.
RS_AUTO_SENSITIVITY_HIGH More sensitive for capturing
flat fingers.
RS_AUTO_SENSITIVITY_HIGHER Most sensitive for capturing
flat fingers.
RS_AUTO_SENSITIVITY_DISABLED Mode for fingers in abnormal
condition such as amputated,
bandaged, etc.
withModeLED
If true, turn on the corresponding mode LED at the indicator panel of the
scanner device. The mode LEDs can also be controlled independently by
RS_SetModeLED function. This option is for RealScan-10 only.
Error Codes
RS_SUCCESS The capture mode is set successfully.
Compatibility
RealScan-10, RealScan-G10 and RealScan-F
Example
// Capture a roll finger in left direction with mode LED
int result = RS_SetCaptureModeWithDir( deviceHandle, RS_CAPTURE_ROLL_FINGER,
RS_CAPTURE_DIRECTION_LEFT, RS_AUTO_SENSITIVITY_NORMAL, true );
RS_GetCaptureModeWithDir
Parameters
deviceHandle
Handle of the device.
captureMode
Capture mode to be returned.
captureDirection
Capture direction to be returned.
captureOption
Capture option to be returned.
Error Codes
RS_SUCCESS The capture mode is read successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-G10 and RealScan-F
RS_SetManualCaptureMode
Configures the capture size. This mode determines what sizes of images are
captured in the subsequent functions calls. Since this version of SDK V1.8.2, this
mode is newly added, which makes a device capture the imagewith the size of
custom pixels. The range of width and height is minimum (200) and maximum
(10000).The available mode for each model is as follows;
Parameters
deviceHandle
Handle of the device.
captureMode
Available modes are as follows;
Mode Description
RS_CAPTURE_FLAT_MANUAL Capture whatever except for roll
image.
imageX
X point of captured image
imageY
Y point of captured image
imageWidth
Width of captured image
imageHeight
Height of captured image
captureOption
Sensitivity level for capturing flat fingers in automatic mode. This option is
ignored when capturing roll fingers.
Sensitivity Description
RS_AUTO_SENSITIVITY_NORMAL Default sensitivity.
RS_AUTO_SENSITIVITY_HIGH More sensitive for capturing
flat fingers.
Error Codes
RS_SUCCESS The capture mode is set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_CAPTURE_MODE The capture mode is not supported.
RS_ERR_INVALID_PARAM The capture option is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to
stop it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series and RealScan-G10
Example
// Capture fingers with capture parameterof (0, 0, 500, 500).
int result = RS_SetManualCaptureMode( deviceHandle, 0, 0, 500, 500,
RS_AUTO_SENSITIVITY_NORMAL, true);
RS_GetManualCaptureMode
Parameters
deviceHandle
Handle of the device.
imageX
X point to be returned.
imageY
Y point to be returned.
imageWidth
Width to be returned.
imageHeight
Height to be returned.
captureOption
Capture option to be returned.
Error Codes
RS_SUCCESS The capture mode is read successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series and RealScan-G10
RS_SetMinimumFinger
Parameters
deviceHandle
Handle of the device.
minFingerCount
Capture option to capture minimum finger.
Error Codes
RS_SUCCESS The capture mode is set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_CAPTURE_MODE The capture mode is not supported.
RS_ERR_WRONG_MIN_FINGER_COUNT The minimum finger is wrong.
Compatibility
RealScan-10, RealScan-F and RealScan-G10
RS_GetMinimumFinger
Parameters
deviceHandle
Handle of the device.
minFingerCount
minimum finger to be returned.
Error Codes
RS_SUCCESS The capture mode is set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_CAPTURE_MODE The capture mode is not supported.
RS_ERR_WRONG_MIN_FINGER_COUNT The minimum finger is wrong.
Compatibility
RealScan-10, RealScan-F and RealScan-G10
RS_SetRollFingerOption
Parameters
deviceHandle
Handle of the device.
rollDirection
Specifies the direction of rolling.
Direction Description
RS_ROLL_DIR_L2R Left to right.
RS_ROLL_DIR_R2L Right to left.
RS_ROLL_DIR_AUTO Left-to-Right or Right-to-Left direction
isdetectable automatically. Default.
RS_ROLL_DIR_AUTO_M Middle-to-Right-to-Left or Middle-to-Left-to-
Right diection is detectable automatically.
rollTime
Roll synthesis timeout (milli seconds) for waiting following input sequence.
Lower value increases the sensitivity of checking end of roll input. Higher value
decreases the sensitivity of checking end of roll input. Available since v1.8.3.
rollProfile
Specifies the strictness of error-checking during the rolling process.
Profile Description
RS_ROLL_PROFILE_LOW Error-checking will be applied more
loosely.
RS_ROLL_PROFILE_NORMAL Default profile.
RS_ROLL_PROFILE_HIGH Error-checking will be applied more
strictly.
Error Codes
RS_SUCCESS The options are set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_PARAM Any of the parameters are invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
RS_GetRollFingerOption
Parameters
deviceHandle
Handle of the device.
rollDirection
Rolling direction to be returned.
rollTime
Roll time to be returned.
rollProfile
Rolling profile to be returned.
Error Codes
RS_SUCCESS The options are read successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
RS_GetImageSize
Retrieves the image size of the current capture mode. It varies according to the
capture mode as follows;
Parameters
deviceHandle
Handle of the device.
Error Codes
RS_SUCCESS The image size is returned successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_StartCapture
You can capture images either manually or automatically. You can also select
synchronous or asynchronous APIs depending on your applications.
RS_StartCapture is used for capturing images asynchronously. It will return
immediately without waiting for the end of the capture.
Parameters
deviceHandle
Handle of the device.
autoCapture
Determines whether the image is captured automatically or manually.
timeout
Timeout period in milliseconds. If it is 0, the timeout period is infinite.
Error Codes
RS_SUCCESS Capture process is started successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_SENSOR_DIRTY The sensor surface is too dirty. See
RS_SetAutomaticCalibrate for details.
RS_ERR_FINGER_EXIST Fingers are placed on the sensor before
capturing starts. See
RS_SetAutomaticCalibrate for details.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
See 2.1.4 Capture Images for examples.
RS_AbortCapture
Parameters
deviceHandle
Handle of the device.
Error Codes
RS_SUCCESS Capture process is aborted successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_IS_NOT_RUNNING The capture process is not started yet.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_RegisterCaptureCallback
Registers a callback which will be called when the capture process is complete or
aborted. Please note that a crash occurs when you free a image buffer passed by
callback function.
Parameters
deviceHandle
Handle of the device.
captureCallback
RSCaptureCallbackis defined as follows;
typedef void (*RSCaptureCallback)( int deviceHandle, int errorCode,
CImage* image );
Argument Description
deviceHandle Handle of the device.
errorCode If capture succeeds, it will be RS_SUCCESS.
Otherwise, it will be the corresponding error
code.
image Pointer to the CImage object which has the
captured image. Note that, for rolling fingers,
it can return a CImage object even when the
return code is not RS_SUCCESS. This data
pointer will be expired right after the callback
function returns. DO NOT try to delete this
pointer or access in the other threads.
Error Codes
RS_SUCCESS The callback is registeredsuccessfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_RegisterCaptureDataCallback
Registers a callback which will be called when the capture process is complete or
aborted. The only differences between RS_RegisterCaptureCallback and
RS_RegisterCaptureDataCallback are the declarations of their callbacks. Please
note that a crash occurs when you free a image buffer passed by callback function.
Parameters
deviceHandle
Handle of the device.
captureCallback
RSRawCaptureCallbackis defined as follows;
typedef void (*RSRawCaptureCallback)( int deviceHandle, int errorCode,
unsigned char* imageData, int imageWidth, int imageHeight );
Argument Description
deviceHandle Handle of the device.
errorCode If capture succeeds, it will be RS_SUCCESS.
Otherwise, it will be the corresponding error code.
imageData Pointer to the byte array containing 8-bit gray
pixel data. Note that, for rolling fingers, it can
return pixel data even when the return code is not
RS_SUCCESS. This data pointer will be expired
right after the callback function returns. DO NOT
try to delete this pointer or access in the other
threads.
imageWidth Width of the captured image.
imageHeight Height of the captured image.
Error Codes
RS_SUCCESS The callback is registered successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_RegisterAdvCaptureDataCallback
Registers a callback which will be called when the capture process is complete or
aborted. This API is advanced version of RS_RegisterCaptureDataCallback.
Please note that a crash occurs when you free a image buffer passed by callback
function.
Parameters
deviceHandle
Handle of the device.
captureCallback
RSAdvRawCaptureCallbackis defined as follows;
typedef void (*RSRawCaptureCallback)( int deviceHandle, int errorCode,
RSFrameInfo *frameInfo );
Argument Description
deviceHandle Handle of the device.
errorCode If capture succeeds, it will be RS_SUCCESS.
Otherwise, it will be the corresponding error code.
frameInfo RSFrameInfo structure which contains image
buffer pointer with size and other quality
informations. Two data pointers (pImage,
pQuality) will be expired right after the callback
function returns. DO NOT try to delete these
pointers or access them in the other threads.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_RegisterPreviewCallback
Registers a callback which will be called when a preview frame is captured. Please
note that a crash occurs when you free a image buffer passed by callback function.
Parameters
deviceHandle
Handle of the device.
captureCallback
Function pointer of preview callback. See RS_RegisterCaptureDataCallback
for details.
Error Codes
RS_SUCCESS The callback is registered successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_RegisterAdvPreviewCallback
Registers a callback called when a preview frame is captured, with the frame-wise
picture quality metric. Frame-wise picture quality metric refers to the automatic
capture decision. Image buffer passed by callback interface is managed by SDK.
Please note that a crash occurs when you free an image buffer passed by callback
function and this API is unsupported for specified direction capture mode (Left or
Right).
Parameters
deviceHandle
Handle of the device.
captureCallback
Function pointer of preview callback. See RS_RegisterCaptureDataCallback
for details.
RSAdvPreviewCallbackis defined as follows;
typedef void (*RSRawCaptureCallback)( int deviceHandle, int errorCode,
unsigned char* imageData, int imageWidth, int imageHeight, int quality, int
status );
Argument Description
deviceHandle Handle of the device.
errorCode If capture succeeds, it will be RS_SUCCESS.
Otherwise, it will be the corresponding error code.
imageData Pointer to the byte array containing 8-bit gray
pixel data. Note that, for rolling fingers, it can
return pixel data even when the return code is not
RS_SUCCESS. This data pointer will be expired
right after the callback function returns. DO NOT
try to delete this pointer or access in the other
threads.
imageWidth Width of the captured image.
imageHeight Height of the captured image.
quality Quality metric higher than 100 ignites auto-
capture
status Status code for capture guide.
Error Codes
RS_SUCCESS The callback is registered successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_TakeImage
Captures a fingerprint image of the specified type. The detection and capture of
the image are handledautomatically by the DLL. After calling this function, users
only have to place the required fingers on the sensor. For flat fingers, the DLL will
determine if the required fingers are placed on the sensor, and emit a beep sound
after detecting it. For roll fingers, the DLL will detect the start and the end of
rolling, and emit a beep sound for each occasion. If the capture succeeds, the
fingerprint image will be returned. Otherwise, a corresponding error code will be
returned.
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
image
Pointer of pointer to the captured image. Note that, for rolling fingers, it can
return a CImage object even when the return code is not RS_SUCCESS. As a
rule of thumb, you have to check the value of this pointer regardless of the
return code. And if it is not NULL, you have to delete it later. As for the
CImage class, refer to any MFC programming books or the MSDN site.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_SENSOR_DIRTY The sensor surface is too dirty. See
RS_SetAutomaticCalibrate for details.
RS_ERR_FINGER_EXIST Fingers are placed on the sensor before capturing
starts. See RS_SetAutomaticCalibrate for
details.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_CAPTURE_TIMEOUT Cannot capture an image within the specified
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
CImage* capturedImage = NULL;
RS_TakeImageData
Returns the captured image as a byte array, not a CImage object. Otherwise, its
operation is identical to that of RS_TakeImage.
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_SENSOR_DIRTY The sensor surface is too dirty. See
RS_SetAutomaticCalibrate for details.
RS_ERR_FINGER_EXIST Fingers are placed on the sensor before
capturing starts. See
RS_SetAutomaticCalibrate for details.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_CAPTURE_TIMEOUT Cannot capture an image within the specified
timeout period.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
unsigned char* imageData = NULL;
int imageWidth, imageHeight;
RS_TakeImageDataSegment
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
captureResult
Error code of the capturing process.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
RS_SLAP_ONE_FINGER_ROLL Slap image of one rolled finger
numOfFinger
Copyright © 2020 by Suprema ID Inc. 68
RealScan Basic SDK Reference Manual
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Array of slap information, which are segmented from the original image. You
have to deallocate this pointer by RS_FreeImageData after using it.
RSSlapInfois defined as follows;
struct RSSlapInfo {
int fingerType; //
RSPoint fingerPosition[4]; // the position of the finger
// in the slap image
int imageQuality; // See RS_GetQualityScore for details
int rotation; // the rotation angle of the image. It specifies
// the clockwise rotation in degrees.
int reserved[3];
};
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
See RS_Segment for an example.
Copyright © 2020 by Suprema ID Inc. 70
RealScan Basic SDK Reference Manual
RS_TakeImageDataSegmentWithSize
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
captureResult
Error code of the capturing process.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// device handle : int nDeviceHandle
Copyright © 2020 by Suprema ID Inc. 73
RealScan Basic SDK Reference Manual
// slap type : int slapType
int captureRet;
unsigned char *pImageData;
int nImageWidth, nImageHeight;
int numOfFinger = 0;
RSSlapInfo* slapInfo;
unsigned char** fingerImageData = NULL;
int widthCrop = 500, heightCrop = 500;
nResult = RS_TakeImageDataSegmentWithSize(
nDeviceHandle, 20000,
&pImageData, &nImageWidth, &nImageHeight,
&captureRet, slapType, &numOfFinger, &slapInfo,
&fingerImageData, widthCrop, heightCrop);
RS_TakeImageEx
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
fingerprintIndex
Specifies the fingers to be captured. See RS_SetFingerLED for available
options.
withLED
If true, turn on the LEDs of fingers specified by fingerprintIndex.
image
Pointer of pointer to the captured image. Note that, for rolling fingers, it can
return a CImage object even when the return code is not RS_SUCCESS. As a
rule of thumb, you have to check the value of this pointer regardless of the
return code. And if it is not NULL, you have to delete it later. As for the
CImage class, refer to any MFC programming books or the MSDN site.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_SENSOR_DIRTY The sensor surface is too dirty. See
RS_SetAutomaticCalibrate for details.
RS_ERR_FINGER_EXIST Fingers are placed on the sensor before
capturing starts. See
Compatibility
RealScan-10 and RealScan-G10
Example
CImage* capturedImage = NULL;
RS_TakeImageDataEx
Same as RS_TakeImageEx except that it returns an array of gray pixel data, not
a CImage object.
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
fingerprintIndex
Specifies the fingers to be captured. See RS_SetFingerLED for available
options.
withLED
If true, turn on the LEDs of fingers specified by fingerprintIndex.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_SENSOR_DIRTY The sensor surface is too dirty. See
RS_SetAutomaticCalibrate for details.
Compatibility
RealScan-10 and RealScan-G10
RS_TakeCurrentImage
For some cases, you have to capture images manually. See RS_StartCapture for
setting up the manual capture. If you call RS_TakeCurrentImage for flat fingers,
it captures the image on the sensor without any check. Therefore, you have to
place fingers on the sensor before calling this function. For roll fingers, it starts
capturing without trying to detect the start of rolling.
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not captured for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
image
Pointer of pointer to the captured image. Note that, for rolling fingers, it can
return a CImage object even when the return code is not RS_SUCCESS. As a
rule of thumb, you have to check the value of this pointer regardless of the
return code. And if it is not NULL, you have to delete it later. As for the
CImage class, refer to any MFC programming books or the MSDN site.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_CAPTURE_TIMEOUT Cannot capture an image within the specified
timeout period.
RS_ERR_ROLL_PART_LIFT A part of the rolling finger is lifted.
RS_ERR_ROLL_DIRTY The sensor surface is dirty, or more than one
finger is detected.
RS_ERR_ROLL_TOO_FAST Rolling speed is too fast.
RS_ERR_ROLL_SHIFTED The finger is heavily shifted or rotated.
RS_ERR_ROLL_DRY The finger could not be recognized correctly
because of bad image contrast or smeared
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_TakeCurrentImageData
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not captured for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_CAPTURE_TIMEOUT Cannot capture an image within the specified
timeout period.
RS_ERR_ROLL_PART_LIFT A part of the rolling finger is lifted.
RS_ERR_ROLL_DIRTY The sensor surface is dirty, or more than one
finger is detected.
RS_ERR_ROLL_TOO_FAST Rolling speed is too fast.
RS_ERR_ROLL_SHIFTED The finger is heavily shifted or rotated.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_TakeCurrentImageDataSegment
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not captured for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
captureResult
Error code of the capturing process.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_CAPTURE_TIMEOUT Cannot capture an image within the
specified timeout period.
RS_ERR_ROLL_PART_LIFT A part of the rolling finger is lifted.
RS_ERR_ROLL_DIRTY The sensor surface is dirty, or more than
one finger is detected.
RS_ERR_ROLL_TOO_FAST Rolling speed is too fast.
RS_ERR_ROLL_SHIFTED The finger is heavily shifted or rotated.
RS_ERR_ROLL_DRY The finger could not be recognized correctly
because of bad image contrast or smeared
finger patterns
RS_ERR_ROLL_WRONG_DIR The rolling does not confirm to the specified
direction.
RS_ERR_ROLL_TOO_SHORT Rolling time is too short.
RS_ERR_CANNOT_SEGMENT Cannot segment the captured image.
RS_ERR_CANNOT_GET_QUALITY Cannot get the quality score of the
segmented images.
RS_ERR_SEGMENT_FEWER_FINGER The captured image has fewer fingers than
expected.
RS_ERR_SEGMENT_WRONG_HAND Left hand is captured for right hand, or vice
versa.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
See RS_Segment for an example.
RS_TakeCurrentImageDataSegmentWithSize
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not captured for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
captureResult
Error code of the capturing process.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
RS_SLAP_ONE_FINGER_ROLL Slap image of one rolled finger
numOfFinger
Copyright © 2020 by Suprema ID Inc. 86
RealScan Basic SDK Reference Manual
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Array of slap information, which are segmented from the original image. You
have to deallocate this pointer by RS_FreeImageData after using it.
RSSlapInfois defined as follows;
struct RSSlapInfo {
int fingerType; //
RSPoint fingerPosition[4]; // the position of the finger
// in the slap image
int imageQuality; // See RS_GetQualityScore for details
int rotation; // the rotation angle of the image. It specifies
// the clockwise rotation in degrees.
int reserved[3];
};
The fingerType will be one of the followings;
Finger Type Value
RS_FGP_UNKNOWN 0
RS_FGP_RIGHT_THUMB 1
RS_FGP_RIGHT_INDEX 2
RS_FGP_RIGHT_MIDDLE 3
RS_FGP_RIGHT_RING 4
RS_FGP_RIGHT_LITTLE 5
RS_FGP_LEFT_THUMB 6
RS_FGP_LEFT_INDEX 7
RS_FGP_LEFT_MIDDLE 8
RS_FGP_LEFT_RING 9
RS_FGP_LEFT_LITTLE 10
pCropImageData
The segmented images of a custom size user wantswill be saved into memory
buffers. These buffers are allocated by the DLL and you have to free them
using RS_FreeImageDatalater.
nCropWidth
The width of the segmented images user wants.
nCropHeight
The height of the segmented images user wants.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
See RS_Segment for an example.
RS_TakeCurrentImageEx
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
fingerprintIndex
Specifies the fingers to be captured. See RS_SetFingerLED for available
options.
withLED
If true, turn on the LEDs of fingers specified by fingerprintIndex.
image
Pointer of pointer to the captured image. Note that, for rolling fingers, it can
return a CImage object even when the return code is not RS_SUCCESS. As a
rule of thumb, you have to check the value of this pointer regardless of the
return code. And if it is not NULL, you have to delete it later. As for the
CImage class, refer to any MFC programming books or the MSDN site.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_CAPTURE_TIMEOUT Cannot capture an image within the
specified timeout period.
RS_ERR_INVALID_PARAM The fingerprintIndex is invalid.
Compatibility
RealScan-10 and RealScan-G10
RS_TakeCurrentImageDataEx
Parameters
deviceHandle
Handle of the device.
timeout
Timeout period in milliseconds. If the selected image is not detected for the
duration, RS_ERR_CAPTURE_TIMEOUT will be returned.
fingerprintIndex
Specifies the fingers to be captured. See RS_SetFingerLED for available
options.
withLED
If true, turn on the LEDs of fingers specified by fingerprintIndex.
imageData
Pointer of pointer to the pixel data of captured image. Note that, for rolling
fingers, it can return pixel data even when the return code is not RS_SUCCESS.
As a rule of thumb, you have to check the value of this pointer regardless of
the return code. And if it is not NULL, you have to free it by
RS_FreeImageData later.
imageWidth
Width of the captured image.
imageHeight
Height of the captured image.
Error Codes
RS_SUCCESS An image is captured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_CAPTURE_TIMEOUT Cannot capture an image within the
specified timeout period.
Compatibility
RealScan-10 and RealScan-G10
RS_Segment
Segments a 4-finger or 2-finger slap image into its finger components. It also
returns the quality score of each finger according to NIST standard. The
segmented images are stored into separate memory buffers.
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
RS_SLAP_ONE_FINGER_ROLL Slap image of one rolled finger
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Array of slap information, which are segmented from the original image. You
have to deallocate this pointer by RS_FreeImageData after using it.
RSSlapInfois defined as follows;
struct RSSlapInfo {
int fingerType; //
RSPoint fingerPosition[4]; // the position of the finger
// in the slap image
int imageQuality; // See RS_GetQualityScore for details
int rotation; // the rotation angle of the image. It specifies
Error Codes
RS_SUCCESS The slap image is segmented successfully.
RS_ERR_NO_DEVICE No device is connected to the PC.
RS_ERR_INVALID_PARAM The slapType is invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
RS_ERR_CANNOT_SEGMENT Cannot segment the slap image.
RS_ERR_CANNOT_GET_QUALITY Cannot get the scores of the segmented
images.
RS_ERR_SEGMENT_FEWER_FINGER The captured image has fewer fingers than
expected.
RS_ERR_SEGMENT_WRONG_HAND Left hand is captured for right hand, or vice
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
int imageWidth, imageHeight;
unsigned char* imageData;
int numOfFinger;
RSSlapInfo* slapInfo;
// do something
RS_FreeImageData((unsigned char*)slapInfo );
}
RS_SegmentMask
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
fingerMask
Each bit of fingerMask variable represents each finger segment of the input
fingerprint image. The following is the table of shortcut to access each of fingers.
RS_FINGER_M_LEFT_LITTLE Bitmask 0x800 represents left little finger
RS_FINGER_M_LEFT_RING Bitmask 0x400 represents left ring finger
RS_FINGER_M_LEFT_MIDDLE Bitmask 0x200 represents left middle finger
RS_FINGER_M_LEFT_INDEX Bitmask 0x100 represents left index finger
RS_FINGER_M_LEFT_THUMB Bitmask 0x080 represents left thumb
RS_FINGER_M_RIGHT_THUMB Bitmask 0x010 represents right thumb
RS_FINGER_M_RIGHT_INDEX Bitmask 0x008 represents right index finger
RS_FINGER_M_RIGHT_MIDDLE Bitmask 0x004 represents right middle finger
RS_FINGER_M_RIGHT_RING Bitmask 0x002 represents right ring finger
RS_FINGER_M_RIGHT_LITTLE Bitmask 0x001 represents right little finger
RS_FINGER_M_TWO_THUMB Combination of two thumbs
RS_FINGER_M_LEFT_FOUR Combination of all left fingers except thumb
RS_FINGER_M_RIGHT_FOUR Combination of all right fingers except thumb
RS_FINGER_M_TWO_LEFT1 Combination of left little and ring fingers
RS_FINGER_M_TWO_LEFT2 Combination of left middle and indes fingers
RS_FINGER_M_TWO_RIGHT2 Combination of right middle and indes fingers
Error Codes
RS_SUCCESS The slap image is segmented successfully.
RS_ERR_NO_DEVICE No device is connected to the PC.
RS_ERR_INVALID_PARAM ThefingerMask is invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
RS_ERR_CANNOT_SEGMENT Cannot segment the slap image.
RS_ERR_CANNOT_GET_QUALITY Cannot get the scores of the segmented
images.
RS_ERR_SEGMENT_FEWER_FINGER The captured image has fewer fingers than
expected.
RS_ERR_SEGMENT_WRONG_HAND Left hand is captured for right hand, or vice
versa.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
int imageWidth, imageHeight;
unsigned char* imageData;
// do something
RS_FreeImageData((unsigned char*)slapInfo );
}
RS_Segment_HandDecision
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
handType
Type of hand detected (output).
RS_LEFT_HAND Left hand detected.
RS_RIGHT_HAND Right hand detected.
RS_UNKOWN_HAND Cannot detect the type of hand.
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Refer to RS_Segment.
fingerImageData
The segmented images will be saved into memory buffers. These buffers are
allocated by the DLL and you have to free them using
RS_FreeImageDatalater.
fingerImageWidth
Array for storing the widths of the segmented images. You have to free it
using RS_FreeImageData later.
fingerImageHeight
Array for storing the heights of the segmented images. You have to free it
using RS_FreeImageData later.
Copyright © 2020 by Suprema ID Inc. 99
RealScan Basic SDK Reference Manual
Error Codes
Same as RS_Segment.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SegmentMissingFinger
Segments a 4-finger or 2-finger slap image into its finger components. It also
returns the quality score of each finger according to NIST standard. The
segmented images are stored into separate memory buffers.
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
slapType
Refer to RS_Segment.
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Refer to RS_Segment.
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Refer to RS_Segment.
fingerImageData
The segmented images will be saved into memory buffers. These buffers are
allocated by the DLL and you have to free them using
RS_FreeImageDatalater.
fingerImageWidth
Array for storing the widths of the segmented images. You have to free it
using RS_FreeImageData later.
fingerImageHeight
Error Codes
Refer to RS_Segment.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
int imageWidth, imageHeight;
unsigned char* imageData;
int numOfFinger;
RSSlapInfo* slapInfo;
RSMissingInfo missingInfo;
Memset(&missingInfo, 0, sizeof(RSMissingInfo));
missingInfo.firstfinger = TRUE; // if 1st finger is lost,
// little finger for left 4 slap
// left thumb for 2 thumb
// index finger for right 4 slap
// do something
RS_FreeImageData((unsigned char*)slapInfo );
}
RS_SegmentWithSize
Segments a 4-finger or 2-finger slap image into its finger components. It also
returns the quality score of each finger according to NIST standard. The
segmented imagesof a custom size user wants are stored into separate memory
buffers.
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
RS_SLAP_ONE_FINGER_ROLL Slap image of one rolled finger
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Array of slap information, which are segmented from the original image. You
have to deallocate this pointer by RS_FreeImageData after using it.
RSSlapInfois defined as follows;
struct RSSlapInfo {
int fingerType; //
RSPoint fingerPosition[4]; // the position of the finger
// in the slap image
int imageQuality; // See RS_GetQualityScore for details
int rotation; // the rotation angle of the image. It specifies
Error Codes
RS_SUCCESS The slap image is segmented successfully.
RS_ERR_NO_DEVICE No device is connected to the PC.
RS_ERR_INVALID_PARAM The slapType is invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
RS_ERR_CANNOT_SEGMENT Cannot segment the slap image.
RS_ERR_CANNOT_GET_QUALITY Cannot get the scores of the segmented
images.
RS_ERR_SEGMENT_FEWER_FINGER The captured image has fewer fingers than
expected.
RS_ERR_SEGMENT_WRONG_HAND Left hand is captured for right hand, or vice
versa.
Compatibility
Copyright © 2020 by Suprema ID Inc. 105
RealScan Basic SDK Reference Manual
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
int imageWidth, imageHeight;
unsigned char* imageData;
int numOfFinger;
RSSlapInfo* slapInfo;
// do something
RS_FreeImageData((unsigned char*)slapInfo );
}
RS_Segment4
Segments a 4-finger or 2-finger slap image into its finger components. It also
returns the quality score of each finger according to NIST standard. The
segmented images are stored into separate memory buffers.
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
RS_SLAP_ONE_FINGER_ROLL Slap image of one rolled finger
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Array of slap information thoseare segmented from the original image. You
Copyright © 2020 by Suprema ID Inc. 107
RealScan Basic SDK Reference Manual
have to deallocate this pointer by RS_FreeImageData after using it.
RSSlapInfois defined as follows;
struct RSSlapInfo {
int fingerType; //
RSPoint fingerPosition[4]; // the position of the finger
// in the slap image
int imageQuality; // See RS_GetQualityScore for details
int rotation; // the rotation angle of the image. It specifies
// the clockwise rotation in degrees.
int reserved[3];
};
The fingerType will be one of the followings;
Finger Type Value
RS_FGP_UNKNOWN 0
RS_FGP_RIGHT_THUMB 1
RS_FGP_RIGHT_INDEX 2
RS_FGP_RIGHT_MIDDLE 3
RS_FGP_RIGHT_RING 4
RS_FGP_RIGHT_LITTLE 5
RS_FGP_LEFT_THUMB 6
RS_FGP_LEFT_INDEX 7
RS_FGP_LEFT_MIDDLE 8
RS_FGP_LEFT_RING 9
RS_FGP_LEFT_LITTLE 10
fingerImageData1~4
The segmented images will be saved into memory buffers for each 4 finger.
These buffers are allocated by the DLL and you have to free them using
RS_FreeImageDatalater.
fingerImageWidth1~4
Each pointer indicates the width of the corresponding image. You have to free
it using RS_FreeImageData later.
fingerImageHeight1~4
Each pointer indicates the height of the corresponding image. You have to free
it using RS_FreeImageData later.
Error Codes
RS_SUCCESS The slap image is segmented successfully.
RS_ERR_NO_DEVICE No device is connected to the PC.
RS_ERR_INVALID_PARAM The slapType is invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
int imageWidth, imageHeight;
unsigned char* imageData;
int numOfFinger;
RSSlapInfo* slapInfo;
// do something
RS_FreeImageData((unsigned char*)slapInfo );
}
RS_Segment4WithSize
Segments a 4-finger or 2-finger slap image into its finger components. It also
returns the quality score of each finger according to NIST standard. The
segmented images of a custom size user wants are stored into separate memory
buffers.
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
slapType
RS_SLAP_LEFT_FOUR Slap image of four fingers of left hand.
RS_SLAP_RIGHT_FOUR Slap image of four fingers of right hand.
RS_SLAP_FOUR_FINGER Slap image of four fingers.
RS_SLAP_TWO_THUMB Slap image of two thumbs.
RS_SLAP_TWO_FINGER Slap image of two fingers.
RS_SLAP_ONE_FINGER Slap image of one flat finger.
RS_SLAP_ONE_FINGER_ROLL Slap image of one rolled finger
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Array of slap information thoseare segmented from the original image. You
have to deallocate this pointer by RS_FreeImageData after using it.
RSSlapInfois defined as follows;
Copyright © 2020 by Suprema ID Inc. 111
RealScan Basic SDK Reference Manual
struct RSSlapInfo {
int fingerType; //
RSPoint fingerPosition[4]; // the position of the finger
// in the slap image
int imageQuality; // See RS_GetQualityScore for details
int rotation; // the rotation angle of the image. It specifies
// the clockwise rotation in degrees.
int reserved[3];
};
The fingerType will be one of the followings;
Finger Type Value
RS_FGP_UNKNOWN 0
RS_FGP_RIGHT_THUMB 1
RS_FGP_RIGHT_INDEX 2
RS_FGP_RIGHT_MIDDLE 3
RS_FGP_RIGHT_RING 4
RS_FGP_RIGHT_LITTLE 5
RS_FGP_LEFT_THUMB 6
RS_FGP_LEFT_INDEX 7
RS_FGP_LEFT_MIDDLE 8
RS_FGP_LEFT_RING 9
RS_FGP_LEFT_LITTLE 10
fingerImageData1~4
The segmented images will be saved into memory buffers for each 4 finger.
These buffers are allocated by the DLL and you have to free them using
RS_FreeImageDatalater.
nCropWidth
Width of the segmented finger’s image.
nCropHeight
Height of the segmented finger’s image.
Error Codes
RS_SUCCESS The slap image is segmented successfully.
RS_ERR_NO_DEVICE No device is connected to the PC.
RS_ERR_INVALID_PARAM The slapType is invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
RS_ERR_CANNOT_SEGMENT Cannot segment the slap image.
RS_ERR_CANNOT_GET_QUALITY Cannot get the scores of the segmented
images.
RS_ERR_SEGMENT_FEWER_FINGER The captured image has fewer fingers than
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
int imageWidth, imageHeight;
unsigned char* imageData;
int numOfFinger;
RSSlapInfo* slapInfo;
// do something
RS_FreeImageData((unsigned char*)slapInfo );
}
RS_SegmentImages
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
slapType
Same forRS_Segment
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Same forRS_Segment
outFilename
filename prefix for output segmented images
Error Codes
Same forRS_Segment
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SegmentImagesMissingFinger
Parameters
imageData
Slap image data in memory.
imageWidth
Width of the slap image.
imageHeight
Height of the slap image.
slapType
Same forRS_Segment
numOfFinger
Number of fingers in the slap image. It will be returned as an output after
segmentation succeeds.
slapInfo
Same forRS_Segment
outFilename
filename prefix for output segmented images
missingInfo
Array of lost fingers information. Refer to RS_SegmentMissingFinger.
Error Codes
Same forRS_Segment
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetQualityScore
Parameters
imageData
Raw pixel data in memory.
imageWidth
Width of the image.
imageHeight
Height of the image.
nistQuality
NIST quality score of the image.
Error Codes
RS_SUCCESS The image score is calculated successfully.
RS_ERR_NO_DEVICE No device is connected to the PC.
RS_ERR_CANNOT_GET_QUALITY Cannot get the score of the image.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SequenceCheck
To verify that all fingers are captured properly, you have to check if the sequences
of single finger iamges correspond to those in the slaps. You use
RS_SequenceCheckto check the sequences of one or more fingers in a slpa
image.
Parameters
numOfFinger
Number of single finger files to be checked.
fingerImageData
Array of image data to be checked.
fingerImageWidth
Array of widths of the images.
fingerImageHeight
Array of heights of the images.
slapImageData
Slap image data.
slapImageWidth
Width of the slap image.
slapImageHeight
Height of the slap image.
slapType
Type of the slap. See the slapType parameter of RS_Segment for available
options.
fingerSequenceInSlap
Array of finger sequences, which are matched in the slap. See the
slapInfo.fingerType parameter of RS_Segment for available values.
securityLevel
Specifies the FAR(False Acceptance Ratio). If it is set to 1/100,000, it means
that the probability of accepting false fingerprints is 1/100,000. The available
values are as follows;
Error Codes
RS_SUCCESS The sequence are checked successfully. You can
get the detailed information by inspecting the
fingerSequenceInSlap parameter.
RS_ERR_NO_DEVICE No device is connected to the PC.
RS_ERR_INVALID_PARAM The slapType is invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
RS_ERR_CANNOT_SEGMENT Cannot segment the slap image.
Compatibility
RealScan-10, RealScan-F and RealScan-G10
RS_SequenceCheckMissingFinger
Parameters
numOfFinger
Number of single finger files to be checked.
fingerImageData
Array of image data to be checked.
fingerImageWidth
Array of widths of the images.
fingerImageHeight
Array of heights of the images.
slapImageData
Slap image data.
slapImageWidth
Width of the slap image.
slapImageHeight
Height of the slap image.
slapType
Type of the slap. See the slapType parameter of RS_Segment for available
options.
fingerSequenceInSlap
Array of finger sequences, which are matched in the slap. See the
slapInfo.fingerType parameter of RS_Segment for available values.
securityLevel
Refer to RS_SequenceCheck.
missingInfo
Array of lost fingers information. Refer to RS_SegmentMissingFinger to get
the more detailed definition.
Error Codes
Compatibility
RealScan-10, RealScan-F and RealScan-G10
RS_Calibrate
If the surface of the sensor gets dirty, it may have a bad effect on the capturing
performance. In that case, you can re-calibrate the sensor to minimize the bad
effect. You should not place anything on the sensor during the calibration process.
Parameters
deviceHandle
Handle of the device.
Error Codes
RS_SUCCESS The sensor is calibrated successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to stop
it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetAutomaticCalibrate
When the surface of a scanner is dirty, it has a bad effect on the quality of
captured images. With automatic calibration on, the DLL will try to re-calibrate the
scanner whenever it starts the capturing process. By minimizing the bad effect of
dirty background, it may contribute significantly to getting higher quality images.
There are two cases when the automatic calibration fails.
(1) If the sensor is dirtier than the internal threshold, it will return
RS_ERR_SENSOR_DIRTY error. In this case, you have to clean the sensor surface
and try again.
(2) If there are any fingers on the sensor before capturing starts,
RS_ERR_FINGER_EXIST error will be returned.
Parameters
deviceHandle
Handle of the device.
automatic
If true, enables the automatic calibration option. Otherwise, it is disabled. The
default is on.
Error Codes
RS_SUCCESS The option is set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to stop
it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetAutomaticCalibrate
Parameters
deviceHandle
Handle of the device.
automatic
Current setting of the option.
Error Codes
RS_SUCCESS The option is retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetAdvancedContrastEnhancement
For V1.3 or later versions, a new contrast enhancement algorithm is added. With it,
you can capture images even under difficult lighting conditions such as direct
sunlight. Though the new algorithm is more effective for enhancing image quality,
it consumes more CPU resources. The default is off. The option has no effect when
either automatic or manual contrast enhancement is enabled.
Parameters
deviceHandle
Handle of the device.
enabled
If true, enables the advanced contrast enhancement. Otherwise, it is disabled.
The default is off.
Error Codes
RS_SUCCESS The option is set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to stop
it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetAdvancedContrastEnhancement
Parameters
deviceHandle
Handle of the device.
enabled
Current setting of the option.
Error Codes
RS_SUCCESS The option is retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetPreProcessing
Parameters
deviceHandle
Handle of the device.
preprocessMode
RS_HIGH_NFIQ_SORE_PREPROCESS
If you want to capture high NFIQ socre image, set the pre-processing option
as RS_HIGH_NFIQ_SCORE_PREPROCESS.
RS_HIGH_VISIBILITY_PREPROCESS
If you want to capture high visible image, set the pre-processing option as
RS_HIGH_VISIBILITY_PREPROCESS.
RS_BALANCED_PREPROCESS
If you want to capture the image with moderate level of NFIQ score, set the
pre-processing option as RS_BALANCED_PREPROCESS.
Error Codes
RS_SUCCESS The options are retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetPreProcessing
Parameters
deviceHandle
Handle of the device.
preprocessMode
Current setting of pre-processing
function.RS_HIGH_NFIQ_SCORE_PREPROCESS,RS_HIGH_VISIBILITY_
PREPROCESS or
RS_BALANCED_PREPROCESS
Error Codes
RS_SUCCESS The options are retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetHaloProcessing
Parameters
deviceHandle
Handle of the device.
preprocessMode
RS_DIABLE_HALOPROCESS
If you want to disable ‘Halo reduction algorithm’, set the halo-processing
option as RS_DIABLE_HALOPROCESS.
RS_ENABLE_HALOPROCESS
If you want to enable ‘Halo reduction algorithm’, set the halo-processing option
as RS_ENABLE_HALOPROCESS
Error Codes
RS_SUCCESS The options are retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetHaloProcessing
Parameters
deviceHandle
Handle of the device.
preprocessMode
Current setting of halo-processing function.
RS_DIABLE_HALOPROCESS or
RS_ENABLE_HALOPROCESS
Error Codes
RS_SUCCESS The options are retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetPostProcessing
Parameters
deviceHandle
Handle of the device.
contrastEnhancement
If true, apply the contrast enhancement function to the final image. The
default is off.
noiseReduction
If true, apply the noise reduction function to the final image. The default is off.
Error Codes
RS_SUCCESS The options are set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to stop
it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetPostProcessing
Parameters
deviceHandle
Handle of the device.
contrastEnhancement
Current setting of contrast enhancement function.
noiseReduction
Current setting of noise reduction function.
Error Codes
RS_SUCCESS The options are retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetPostProcessingEx
Parameters
deviceHandle
Handle of the device.
contrastEnhancement
If true, apply the contrast enhancement function to the final image. The
default is off.
noiseReduction
If true, apply the noise reduction function to the final image. The default is off.
reductionLevel
Level of noise reduction between 10(min) and 200(max). The default is 100.
Error Codes
RS_SUCCESS The options are set successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to stop
it first.
RS_ERR_INVALID_PARAM The reductionLevel is out of range.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetPostProcessingEx
Parameters
deviceHandle
Handle of the device.
contrastEnhancement
Current setting of contrast enhancement function.
noiseReduction
Current setting of noise reduction function.
reductionLevel
Current setting of noise reduction level.
Error Codes
RS_SUCCESS The options are retrieved successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SelfTest
Various options of self-test can help checking conditions or status of scanner, and
determining the possibility of its malfunctioning.
Parameters
deviceHandle
Handle of the device.
testType
Self-Test type for the user purpose.
RS_SELFTEST_TYPE_ILLUMINATION Self-Test for checking
illumination of scanner.
RS_SELFTEST_TYPE_DIRTY Self-Test for checking dirty
surface of scanner.
Error Codes
RS_SUCCESS Self-Test process is finished successfully.
RS_ERR_SENSOR_ILLUMINATION Internal lighting is not proper to operate.
RS_ERR_TOO_STRONG_LIGHT Scanner cannot capture fingerprints due to
strong external light.
RS_ERR_SENSOR_DIRTY Scanner surface is too dirty to get good-
quality fingerprints.
RS_ERR_FINGER_EXIST Finger is detected on the surface of scanner.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
RS_SetSegRotateOption
Parameters
isRotating
If true, rotated segmentation areas will be returned as results. Or if false, non-
rotated segmentation areas will be returned. The default is false.
Error Codes
RS_SUCCESS The option is set successfully.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SetLFDLevel
Sets a specific Live Finger Detection(LFD) level for RealScan-G1. There are
6different levels for RealScan-G1.
Parameters
deviceHandle
Handle of the device
LFDLevel
The LFD level setting for target implementation using RealScan-G1. Lower
level of LFD can give you lower FRR(False Reject Rate) of live fingerswith lower
fake detection rate.
RS_LFD_OFF Not using LFD functionality
RS_LFD_LEVEL_1 LFD Level 1
RS_LFD_LEVEL_2 LFD Level 2
RS_LFD_LEVEL_3 LFD Level 3
RS_LFD_LEVEL_4 LFD Level 4
RS_LFD_LEVEL_5 LFD Level 5
RS_LFD_LEVEL_6 LFD Level 6
Error Codes
RS_SUCCESS The option is set successfully.
RS_ERR_UNSUPPORTED_COMMAND Not available except for RealScan-G1
Compatibility
RealScan-G1
RS_GetLFDLevel
Parameters
deviceHandle
Handle of the device
LFDLevel
The LFD level set for target implementation using RealScan-G1.
Error Codes
RS_SUCCESS The option is set successfully.
RS_ERR_UNSUPPORTED_COMMAND Not available except for RealScan-G1
Compatibility
RealScan-G1
RS_GetLFDResult
Parameters
deviceHandle
Handle of the device.
psLFDResult
LFD result to be returned.
Error Codes
RS_SUCCESS When it gets LFD result successfully.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_NOT_SUPPORT When LFD is not set.
RS_ERR_UNSUPPORTED_DEVICE When the device is not RealScan-D or
RealScan-G10.
RS_ERR_NO_DATA When nNumofFinger is 0.
Compatibility
RealScan-D, RealScan-G10
#define RS_MAX_LFD_INFO 4
#define RS_LFD_LIVE 0
#define RS_LFD_FAKE 1
RSLFDResult rsLFDResult;
int nRe;
nRe = GetLFDResult(deviceHandle, &rsLFDResult);
if(nRe == RS_SUCCESS)
{
//Do something..
}
RS_SetParam
Parameters
deviceHandle
Handle of the device
type
The type sets a value for supporting types of parameter. (i.e. preview mode).
variable
Pointer to parameter value of specified parameter type. ‘variable’ must point to
adequate storage type matched to parameter type.
Error Codes
RS_SUCCESS The option is set successfully.
RS_ERR_INVALID_PARAM One of the parameters is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// none
RS_GetParam
Parameters
deviceHandle
Handle of the device
type
The type sets a value for supporting types of parameter. (i.e. preview mode).
variable
Pointer to parameter value of specified parameter type. ‘variable’ must point to
adequate storage type matched to parameter type.
Error Codes
RS_SUCCESS The option is set successfully.
RS_ERR_INVALID_PARAM One of the parameters is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// none
RS_FindTarget
Parameters
queryImageData
Input image to match with Target data
queryImageWidth
Width of input image (pixel)
queryImageHeight
Height of input image (pixel)
targetImageData0~4
target image data.
When the target image is less than 5, the remaining parameter shall be set as
NULL or 0.
targetImageWidth0~4
Width of target image (pixel)
targetImageHeight0~4
Height of target image (pixel)
securityLevel
Security level to use when matching Target data(template matching). Each
sercurity has level 1 to 7 and and performs as below table. As the security
level increases, the FRR(FalseReject Rate) increases accordingly.
Level FAR(False Accept Rate)
1 1/100
2 1/1000
3 1/10000
4 1/100000
5 1/1000000
6 1/10000000
7 1/100000000
matchedTargetIndex
Index of the data which showed success matching with targetImageData0~4.
Index Target data
1 targetImageData0
2 targetImageData1
3 targetImageData2
4 targetImageData3
5 targetImageData4
Error Codes
RS_SUCCESS Matching success
RS_ERR_NO_MATCH Matching Fail– No matching fingerprint from
given target data
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// none
RS_IsFinger
Parameters
deviceHandle
RealScan scanner handle.
imageData
Input image to determine existence of fingerprint
imageWidth
Width of input image
imageHeight
Height of input image
Error Codes
RS_ERR_FINGER_EXIST Fingerprint exists
RS_ERR_CAPTURE_NOTENOUGH_FINGERS No fingerprint
RS_ERR_INVALID_PARAM Wrong parameter
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// none
RS_IsCapturing
Parameters
deviceHandle
RealScan scanner handle.
isRunning
Result ; TRUE: capture in progress. FALSE: No capture in progress.
Error Codes
RS_SUCCESS Confirm Success
RS_ERR_SDK_UNINITIALIZED Need SDK initialize
RS_ERR_INVALID_HANDLE WrongdeviceHandle
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// none
RS_RegisterFingerOnCallback
Register a callback which will be called when finger is on the device during capture.
Please note that a crash occurs when you free a image buffer passed by callback
function
Parameters
deviceHandle
Handle of the device.
captureCallback
Function pointer of preview callback.
Error Codes
RS_SUCCESS The callback is registered successfully.
RS_ERR_CAPTURE_IS_RUNNING A capture process is running. You have to
stop it first.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// none
RS_GetImageQualityScore
Retreives quality score of fingerprint from input image. Same as the quality
parameter of RS_RegisterAdvPreviewCallback.The score would be between
0(poor) and 200(excellent).
Parameters
imageData
Raw pixel data in memory.
imageWidth
Width of the image.
imageHeight
Height of the image.
nQualityScore
Qualityscore of the image for capture availability.
Error Codes
RS_SUCCESS The image score is calculated successfully.
RS_ERR_CAPTURE_NOTENOUGH_ Capture failed by timeout because of not
FINGERS enough segment of fingerprints for given
capture mode
RS_ERR_CAPTURE_TOOSMALL_FI Capture failed by timeout because of too
NGERSAREA small area of fingerprints for given capture
mode
RS_ERR_CAPTURE_TOOWEAK_PRI Capture failed by timeout because of too
NT weak contrast of fingerprints
RS_ERR_CAPTURE_TOOSTRONG_ Capture failed by timeout because of over-
PRINT saturated black parts of fingerprints
(customized version only)
RS_ERR_CAPTURE_TOOMUCH_PR Capture failed by timeout because of too
ESSURE much black component of fingerprints
(maybe there are too thick valies,
customized version only)
Compatibility
Copyright © 2020 by Suprema ID Inc. 147
RealScan Basic SDK Reference Manual
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// none
RS_GetCurrentProcessedImage
Get image used forroll-finger image synthesis during the capture. Supporting
ROLL_FINGER or ROLL_FINGER_EXonly.
Parameters
deviceHandle
Handle of the device.
imageData
Raw pixel data in memory.
Error Codes
RS_SUCCESS The currently processed image for
synthesizing a roll-fingeris captured
successfully.
RS_ERR_UNSUPPORTED_DEVICE Device not support for current API
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_ABNORMAL_CAPTURE_SIZE A Returning error when wrong image size
was entered for activated capture mode
Compatibility
RealScan-F Series
Example
// none
RS_GetCurrentSynthesisImage
Parameters
deviceHandle
Handle of the device.
imageData
Raw pixel data in memory.
Error Codes
RS_SUCCESS The currently synthesized image is
captured successfully.
RS_ERR_UNSUPPORTED_DEVICE Device not support for current API
RS_ERR_CAPTURE_DISABLED The capture mode is disabled.
RS_ERR_ABNORMAL_CAPTURE_SIZE A Returning error when wrong image size
was entered for activated capture mode
RS_ERR_ROLL_SHIFTED The finger is heavily shifted or rotated.
Compatibility
RealScan-F Series
Example
// none
As an option, you can configure a preview window, which will show fingerprint
images on the sensor in real time. You can also add overlays to the preview
window.
RS_SetViewWindow
Palm
2550 x 2550
Roll/Flat Single
800 x 750
Parameters
deviceHandle
Handle of the device.
windowHandle
Handle of the preview window.
drawRectangle
Client rectangle of the drawing region. The preview images will be scaled to be
fit to the rectangle.
autoContrast
Reserved for future use.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// Configure the preview window
// - IDC_VIEW_WINDOW is an example resource ID for the preview window.
RECT drawRect;
GetDlgItem( IDC_VIEW_WINDOW )->GetClientRect( &drawRect );
RS_StopViewWindow
Parameters
deviceHandle
Handle of the device.
Error Codes
RS_SUCCESS The preview is stopped.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_AddOverlayText
Parameters
deviceHandle
Handle of the device.
text
RSOverlayTextis defined as follows;
struct RSOverlayText {
POINT pos;
unsigned alignment;
char text[128];
int fontSize;
char fontName[32];
COLORREF color; // 0x00bbggrr
int reserved[16];
};
overlayHandle
Handle of the overlay to be returned.
Error Codes
RS_SUCCESS An overlay text is added.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_NO_MORE_OVERLAY No more overlayscan be added.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
RSOverlayText overlayText;
overlayText.pos.x = 100;
overlayText.pos.y = 100;
overlayText.color = 0x000000ff; // red
strcpy( overlayText.text, “Sample Text” );
int overlayHandle;
RS_AddOverlayCross
Parameters
deviceHandle
Handle of the device.
cross
RSOverlayCrossis defined as follows;
struct RSOverlayCross {
POINT centerPos;
int rangeX;
int rangeY;
COLORREF color;
int width;
int reserved[16];
};
overlayHandle
Handle of the overlay to be returned.
Error Codes
RS_SUCCESS An overlay cross is added.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_NO_MORE_OVERLAY No more overlayscan be added.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_AddOverlayLine
Parameters
deviceHandle
Handle of the device.
line
RSOverlayLineis defined as follows;
struct RSOverlayLine {
POINT startPos;
POINT endPos;
COLORREF color;
int width;
int reserved[16];
};
overlayHandle
Handle of the overlay to be returned.
Error Codes
RS_SUCCESS An overlay line is added.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_NO_MORE_OVERLAY No more overlayscan be added.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_AddOverlayQuadrangle
Parameters
deviceHandle
Handle of the device.
quadrangle
RSOverlayQuadrangleis defined as follows;
struct RSOverlayQuadrangle {
POINT pos[4];
COLORREF color;
int width;
int reserved[16];
};
overlayHandle
Handle of the overlay to be returned;
Error Codes
RS_SUCCESS An overlay quadrangle is added.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_NO_MORE_OVERLAY No more overlayscan be added.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_ShowOverlay
Shows or hides an overlay on the preview window. The overlay handle should be
acquired first using one of the RS_AddOverlayXXX functions.
Parameters
overlayHandle
Handle of the overlay.
show
If true, the overlay will be shown. If false, it will be hidden.
Error Codes
RS_SUCCESS The overlay is shown/hidden successfully.
RS_ERR_INVALID_OVERLAY_HANDLE The overlay handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_ShowAllOverlay
Parameters
deviceHandle
Handle of the device.
show
Shows or hides the overlays.
Error Codes
RS_SUCCESS The overlays are shown/hidden successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_RemoveOverlay
Parameters
overlayHandle
Handle of the overlay.
Error Codes
RS_SUCCESS The overlay is removed successfully.
RS_ERR_INVALID_OVERLAY_HANDLE The overlay handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_RemoveAllOverlay
Parameters
deviceHandle
Handle of the device.
Error Codes
RS_SUCCESS The overlays are removed successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
3.6. IO API
Both RealScan-10 and RealScan-G10have two input switches, four mode LEDs,
and 10 fingerprint LEDs. RealScan-D device has one input switch and one status
LED.
RS_SetActiveKey
Parameters
deviceHandle
Handle of the device.
keyMask
RS_REALSCAN10_NO_KEY No keys are activated.
RS_REALSCAN10_PLAY_KEY The Play key is enabled.
RS_REALSCAN10_STOP_KEY The Stop key is enabled.
RS_REALSCAN10_ALL_KEYS All keys are enabled.
or
RS_REALSCAND_NO_KEY No keys are activated.
RS_REALSCAND_KEY_0 The input switchis enabled.
RS_REALSCAND_ALL_KEYS All keys are enabled.
or
RS_REALSCANF_NO_KEY No keys are activated.
RS_REALSCANF_UP_KEY The Up key is enabled.
RS_REALSCANF_DOWN_KEY The Down key is enabled.
RS_REALSCANF_LEFT_KEY The Left key is enabled.
RS_REALSCANF_RIGHT_KEY The Right key is enabled.
RS_REALSCANF_PLAY_KEY The Play key is enabled.
RS_REALSCANF_FOOTSWITCH The Footswitch is enabled.
RS_REALSCANF_ALL_KEYS All keys are enabled.
Error Codes
RS_SUCCESS The specified keys are enabled successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
Copyright © 2020 by Suprema ID Inc. 165
RealScan Basic SDK Reference Manual
Example
// enable all keys
int result = RS_SetActiveKey( deviceHandle, RS_REALSCAN10_ALL_KEYS );
RS_GetKeyStatus
Parameters
deviceHandle
Handle of the device.
keyCode
Pressed keys. If both keys of RealScan-10 are pressed, the code will be
RS_REALSCAN10_PLAY_KEY | RS_REALSCAN10_STOP_KEY.
Error Codes
RS_SUCCESS Key codes are read successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
RS_RegisterKeypadCallback
Parameters
deviceHandle
Handle of the device.
callback
RSKeypadCallbackis defined as follows;
typedef void (*RSKeypadCallback)( int deviceHandle, unsigned keyCode );
Error Codes
RS_SUCCESS The callback is registered successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
Example
// emit a beep sound when a key is pressed
void beepCallback( int deviceHandle, unsigned keyCode )
{
switch( keyCode ) {
caseRS_REALSCAN10_PLAY_KEY:
RS_Beep( deviceHandle, RS_BEEP_PATTERN_1 );
break;
caseRS_REALSCAN10_STOP_KEY:
RS_Beep( deviceHandle, RS_BEEP_PATTERN_2 );
break;
}
}
RS_Beep
Parameters
deviceHandle
Handle of the device.
beepPattern
RS_BEEP_PATTERN_NONE No sound.
RS_BEEP_PATTERN_1 One short beep sound.
RS_BEEP_PATTERN_2 Two short beep sounds.
Error Codes
RS_SUCCESS Beep sound is emitted successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_PARAM Unsupported beep pattern.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
RS_SetCaptureBeep
Parameters
deviceHandle
Handle of the device.
startingBeep
Beep sound for the start of rolling capture in automatic mode. It should be one
of the following values.
RS_BEEP_PATTERN_NONE No sound.
RS_BEEP_PATTERN_1 One short beep sound.
RS_BEEP_PATTERN_2 Two short beep sounds.
successBeep
Beep sound for the capture success.
failBeep
Beep sound for the capture failure.
Error Codes
RS_SUCCESS Beep sounds are configured successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_PARAM Unsupported beep pattern.
Compatibility
RealScan-10, RealScan-D, RealScan-F and RealScan-G10
RS_SetFingerLED
Both RealScan-10 and RealScan-G10 have 10 fingerprint LEDs. You can turn on/off
these LEDs byRS_SetFingerLED.
Parameters
deviceHandle
Handle of the device.
fingerIndex
RS_FINGER_ALL All 10 fingerprint LEDs.
RS_FINGER_LEFT_LITTLE The little finger LED of left hand.
RS_FINGER_LEFT_RING The ring finger LED of left hand.
RS_FINGER_LEFT_MIDDLE The middle finger LED of left hand.
RS_FINGER_LEFT_INDEX The index finger LED of left hand.
RS_FINGER_LEFT_THUMB The thumb finger LED of left hand.
RS_FINGER_RIGHT_THUMB The thumb finger LED of right hand.
RS_FINGER_RIGHT_INDEX The index finger LED of right hand.
RS_FINGER_RIGHT_MIDDLE The middle finger LED of right hand.
RS_FINGER_RIGHT_RING The ring finger LED of right hand.
RS_FINGER_RIGHT_LITTLE The little finger LED of right hand.
RS_FINGER_TWO_THUMB Two LEDs for thumbs.
RS_FINGER_LEFT_FOUR Four fingerprint LEDs of left hand
except for the thumb.
RS_FINGER_RIGHT_FOUR Four fingerprint LEDs of right hand
except for the thumb.
RS_FINGER_TWO_LEFT1 Two LEDs for the little finger and the
ring finger of left hand
RS_FINGER_TWO_LEFT2 Two LEDs for the middle finger and the
index finger of left hand
RS_FINGER_TWO_RIGHT1 Two LEDs for the little finger and the
ring finger of right hand
RS_FINGER_TWO_RIGHT2 Two LEDs for the middle finger and the
index finger of right hand
ledColor
RS_LED_OFF Turn off the LED.
Error Codes
RS_SUCCESS The LED is turned on/off successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_PARAM The fingerIndex or ledColor is invalid.
RS_ERR_UNSUPPORTED_COMMAND RealScan-D does not support this command.
Compatibility
RealScan-10 and RealScan-G10
Example
// turn on the index finger LED of the right hand
int result = RS_SetFingerLED( deviceHandle, RS_FINGER_RIGHT_INDEX,
RS_LED_GREEN );
// turn off
result = RS_SetFingerLED( deviceHandle, RS_FINGER_RIGHT_INDEX, RS_LED_OFF );
RS_SetModeLED
Both RealScan-10 and RealScan-G10 have4 mode LEDs indicating the capture
mode. You can control these LEDs by RS_SetModeLED.
Parameters
deviceHandle
Handle of the device.
ledIndex
RS_LED_MODE_ALL All four LEDs.
RS_LED_MODE_LEFT_FINGER4 LED for flat left fingers.
RS_LED_MODE_RIGHT_FINGER4 LED for flat right fingers.
RS_LED_MODE_TWO_THUMB LED for two thumbs.
RS_LED_MODE_ROLL LED for rolled finger.
isOn
If true, turn on the LED. If false, turn it off.
Error Codes
RS_SUCCESS The LED is turned on/off successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_PARAM The ledIndex is invalid.
RS_ERR_UNSUPPORTED_COMMAND RealScan-D does not support this command.
Compatibility
RealScan-10 and RealScan-G10
Example
// turn on the LED for two thumbs.
int result = RS_SetModeLED( deviceHandle, RS_LED_MODE_TWO_THUMB, true );
RS_SetStatusLED
RealScan-D has one status LED. RealScan-G1 has blue status LED and can be seen
inside the platen. You can turn it on/off by RS_SetStatusLED, also you can make
blue LED of RealScan-G1 blinking.
Parameters
deviceHandle
Handle of the device.
ledCode (for RealScan-D)
RS_LED_OFF Turn off the LED.
RS_LED_GREEN Turn on green.
RS_LED_RED Turn on red.
RS_LED_YELLOW Turn on yellow.
ledCode (for RealScan-G1)
RS_LED_STATUS_OFF Turn off the LED.
RS_LED_STATUS_ON Turn on the LED.
RS_LED_STATUS_BLINK Blink the LED.
Error Codes
RS_SUCCESS The LED is turned on/off successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_INVALID_PARAM The ledCodeis invalid.
RS_ERR_UNSUPPORTED_COMMAND RealScan-10, RealScan-F and RealScan-G10
do not support this command.
Compatibility
RealScan-D and RealScan-G1
RS_PlayWav
RealScan-10, RealScan-G10 and RealScan-F can play wave files. The sound data in
the wave file should be 44100Hz 16 bit mono PCM.
Parameters
deviceHandle
Handle of the device.
wavFile
Filename of the wave file to be played.
Error Codes
RS_SUCCESS The wave file is played successfully.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
RS_ERR_CANNOT_OPEN_FILE Cannot open the wave file.
RS_ERR_CANNOT_READ_FILE Cannot read the wave file.
RS_ERR_UNSUPPORTED_WAV_FORMAT The wave file is not in 44100Hz 16 bit
mono PCM format.
Compatibility
RealScan-10, RealScan-F and RealScan-G10
RS_DisplayLCD
RealScan-F has LCD panel that can display pixel data. You candisplay 16-bit RGB
data onto the LCD panel, which has a size of 320(width) x 240(height).
RS_DisplayLCD( int deviceHandle, unsigned char* data, int dataLen, int sx,
int sy, int width, int height )
Parameters
deviceHandle
Handle of the device.
data
Pointer to image data to be displayed onto LCD.
dataLen
Length of the image data to be displayed onto LCD. DataLen should be
width*height*2, since LCD can display only 16-bit RGB data.
sx
Starting point of x-position of image data to be displayed.
sy
Starting point of y-position of image data to be displayed.
width
Width of the image displayed onto LCD. The maximum size is defined as
RS_LCD_WIDTH_MAX (= 320).
height
Height of the image displayed onto LCD. The maximum size of defined as
RS_LCD_HEIGHT_MAX (= 240).
Error Codes
RS_SUCCESS Displaying pixel data onto LCD panel is
donesuccessfully.
RS_ERR_UNSUPPORTED_COMMAND RealScan-10 and RealScan-D does not
support this command.
RS_ERR_INVALID_PARAM One of the parameters is invalid.
Compatibility
RealScan-F
RS_MakeLCDData
LCD display device in RealScan-F can show the 16-bit RGB data, which means that
it can display the image data whose 2 bytes represent 1 pixel on the LCD. This
function can change a format ofimage data into the format LCD can displaywith.
Parameters
inputRData
8-bit data to be the first 5 bits of 16-bit RGB data.
inputGData
8-bit data to be the next 6 bits of 16-bit RGB data.
inputBData
8-bit data to be the last 5 bits of 16-bit RGB data.
inputWidth
Width of the image to be transformed to the LCD Data.
inputHeight
Height of the image to be transformed to the LCD Data.
outputData
Pointer of pointer to the image to be displayed onto LCD panel. The size of the
image can be calculated as inputWidth*inputHeight*2.
Error Codes
RS_SUCCESS Operation is successfully done.
RS_ERR_CANNOT_MAKE_LCD_DATA The function cannot make LCD data since
the output buffer is not prepared.
RS_ERR_INVALID_LCD_DATA Making LCD data is succeeded, but the
output is not proper to display.
Compatibility
RealScan-F
RS_ResetLCD
This function will clean the LCD panel with using an image which is full of 0 pixels.
Parameters
deviceHandle
Handle of the device.
Error Codes
RS_SUCCESS Displaying pixel data onto LCD panel is done
successfully.
RS_ERR_UNSUPPORTED_COMMAND RealScan-10 and RealScan-D does not
support this command.
RS_ERR_INVALID_PARAM One of the parameters is invalid.
Compatibility
RealScan-F
RS_TurnOnBacklight_RSF
Parameters
deviceHandle
Handle of the device.
isOn
If true, turn on the back light. If false, turn it off.
Error Codes
RS_SUCCESS The BLUis turned on/off successfully.
RS_ERR_UNSUPPORTED_COMMAND This commandis supported only for
RealScan-F and RealScan-F CN device.
RS_ERR_CAPTURE_IS_RUNNING Cannot turn it on/off while capture is goin
on.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-F Series
RS_ResetDevice
Parameters
deviceHandle
Handle of the device.
Error Codes
RS_SUCCESS The device is reset successfully.
RS_ERR_UNSUPPORTED_COMMAND This commandis supported only for
RealScan-F CN device.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-F Series
RS_PowerCheck
This function will check whether the power adapter is connected or not.
Parameters
deviceHandle
Handle of the device.
powerType
If powerType is 1, Power type is USB. If 0, power adapter is connected.
Error Codes
RS_SUCCESS Power typeis read successfully.
RS_ERR_UNSUPPORTED_COMMAND This commandis supported only for
RealScan-F CN device.
RS_ERR_SDK_UNINITIALIZED The SDK is not yet initialized.
RS_ERR_INVALID_HANDLE The device handle is invalid.
Compatibility
RealScan-F (custom version only)
RS_GetSDKInfo
Parameters
sdkInfo
RSSDKInfois defined as follows;
struct RSSDKInfo {
char product[16];
char version[16];
char buildDate[16];
int reserved[16];
};
Error Codes
RS_SUCCESS
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetErrString
Parameters
errorCode
Error code returned by an API.
errMsg
CString object of the error string.
Error Codes
RS_SUCCESS
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetErrStringChar
Parameters
errorCode
Error code returned by an API.
errMsg
Pointer of the error string.
Error Codes
RS_SUCCESS
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetCaptureStatusString
Parameters
statusCode
Status code returned by an API.
statusMsg
Pointer of the status string.
Error Codes
RS_SUCCESS
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_GetCaptureStatusStringChar
Parameters
statusCode
Status code returned by an API.
statusMsg
Pointer of the error string.
Error Codes
RS_SUCCESS
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_FreeImageData
Parameters
imageData
Pointer to the image data to be freed.
Error Codes
None
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_SaveBitmap
Saves the raw pixel data returned by capturing functions into a BMP file.
Parameters
pixelData
Pointer to the raw pixel data.
imageWidth
Width of the image.
imageHeight
Height of the image.
filename
Name of the BMP file.
Error Codes
RS_SUCCESS The image data is saved successfully.
RS_ERR_CANNOT_WRITE_FILE Cannot write the BMP file.
RS_ERR_MEM_FULL Cannot allocate memory.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Example
// Callback function
void sampleCaptureCallback( int deviceHandle, int captureResult, unsigned
char* imageData, int imageWidth, int imageHeight )
{
if( captureResult == RS_SUCCESS )
{
RS_SaveBitmap( imageData, imageWidth, imageHeight,“Captured.bmp” );
}
if( imageData )
{
RS_FreeImageData( imageData );
}
}
RS_SaveBitmapMem
Saves the raw pixel data returned by capturing functions in a memory buffer.
Parameters
pixelData
Pointer to the raw pixel data.
imageWidth
Width of the image.
imageHeight
Height of the image.
imageBuffer
buffer of a BMP file.
Error Codes
RS_SUCCESS The image data is saved successfully.
RS_ERR_MEM_FULL Cannot allocate memory.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_EncodeWSQ
Compresses the raw pixel data returned by capturing functions into a WSQ file.
See FBI’s Criminal Justice Information Services (CJIS) document, "WSQ Gray-scale
Fingerprint Compressions Specification" for details.
Parameters
rawBuffer
Raw pixel data in memory.
width
Width of the rawBuffer.
height
Height of the rawBuffer.
ratio
Specifies the bit rate of the compression. Note that it should be thought of as
the level of acceptable distortion rather than a tool to achieve a specific file
size or an exact compression ratio. For example, 2.25 and 0.75 roughly yields
5:1 and 15:1 compression respectively. However, the actual compression ratio
will vary according to the characteristics of the original image. (Range:
0.1~7.5)
wsqBuffer
Compressed WSQ pixel data in memory.
wsqBufferLen
Length of the wsq buffer.
Error Codes
RS_SUCCESS The raw image is successfully encoded.
RS_ERR_INVALID_PARAM Any of the parameters are invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
RS_DecodeWSQ
Parameters
wsqBuffer
Compressed WSQ pixel data in memory.
wsqBufferLen
Length of the wsq buffer.
rawBuffer
Pointer of pointer to the raw pixel data of wsq buffer. And if it is not NULL, you
have to free it by RS_FreeImageData later.
rawWidth
Width of the raw buffer.
rawHeight
Height of the raw buffer.
Error Codes
RS_SUCCESS The raw image is successfully
decompressed.
RS_ERR_INVALID_PARAM Any of the parameters are invalid.
RS_ERR_MEM_FULL Cannot allocate memory.
Compatibility
RealScan-10, RealScan-D, RealScan-F Series, RealScan-G10 and RealScan-G1
Contact Info
Suprema ID Inc. (http://www.suprema-id.com)
#305~308, 3F, Building A, Tera Tower 2, 201 Songpa-daero,
Songpa-gu, Seoul, Republic of Korea
Tel: +82-31-710-5629
Fax:+82-2-881-5126
Email: [email protected], [email protected]