Handle of WNREngine object
Used to handle pointer (void *) to WNREngine object
Handle of WNRParams object
Used to handle pointer (void *) to WNRParams object
Handle of WNRResult object
Used to handle pointer (void *) to WNRResult object
Handle of WagonNumber object
Used to handle pointer (void *) to WagonNumber object
Invokes by WNREngine object on wagon number detection
hEngine | Handle of WNREngine object |
hWagonNum | Handle of WagonNumber object |
WagonNumber object must be deleted using function WagonNumber_Destroy
Create new WNREngine instance
hParams | Handle of WNRParams object |
bVideo bool | If this value is true, the engine will be initialized in video mode, otherwise - in still image mode |
wagonNumberDetectedCallback | WagonNumberDetectedCallback function (for video mode), use Null for still image mode |
Handle of WNREngine object
Reads wagon numbers from image file (JPEG, BMP, PNG)
hEngine | Handle of WNREngine object |
fileName const char* | Path to image file |
Handle of WNRResult object
WNRResult object must be deleted using function WNRResult_Destroy This function can be used for still image mode only.
Reads wagon numbers from image file (JPEG, BMP, PNG) contained in the memory
hEngine | Handle of WNREngine object |
pBuffer void* | Pointer to a memory buffer containing the image file data |
bufferSize int | size of memory buffer in bytes |
Handle of WNRResult object
WNRResult object must be deleted using function WNRResult_Destroy This function can be used for still image mode only.
Reads wagon numbers from image file (JPEG, BMP, PNG) from URL
hEngine | Handle of WNREngine object |
url const char* | URL string, example: http://domain.com/image.jpg |
Handle of WNRResult object
WNRResult object must be deleted using function WNRResult_Destroy This function can be used for still image mode only.
Reads wagon numbers from image buffer
hEngine | Handle of WNREngine object |
pBuffer void* | Pointer to buffer of image pixels data |
width int | Width of image in pixels |
height int | Height of image in pixels |
stride int | Size of one image row in bytes |
pixelFormat | Pixel format, PIXFMT enumeration |
Handle of WNRResult object
WNRResult object must be deleted using function WNRResult_Destroy
This function can be used for still image mode only.
Send video frame to engine (for video mode only)
hEngine | Handle of WNREngine object |
hFrame | Handle of VideoFrame object |
customData int64 | Custom 64 bit integer value which can be used identify frame by recognized plate. This value will be assigned to WagonNumber object. |
Possible values:
0 | no error |
1 | engine do not have valid license |
2 | engine have valid license but have not available channel to work |
3 | frame dropped due to processing queue overflow |
Send video frame to engine (for video mode only)
hEngine | Handle of WNREngine object |
pBuffer void* | Pointer to buffer of image pixels data |
width int | Width of image in pixels |
height int | Height of image in pixels |
stride int | Size of one image row in bytes |
pixelFormat | Pixel format, PIXFMT enumeration |
timestamp int64 | Frame timestamp received from camera (optional). If you have not this value, then use -1 |
customData int64 | Custom 64 bit integer value which can be used identify frame by recognized wagon number. This value will be assigned to WagonNumber object. |
Possible values:
0 | no error |
1 | engine do not have valid license |
2 | engine have valid license but have not available channel to work |
3 | frame dropped due to processing queue overflow |
Return current processing FPS (for video mode only)
hEngine | Handle of WNREngine object |
Current video processing FPS. It can be less then incoming FPS from camera.
This function can be used for video mode only.
Gets the value indicating whether the WNR engine has processed the frame queue, and queue is empty.
hEngine | Handle of WNREngine object |
Boolean value, True | frame processing queue is empty, False - frame processing queue is not empty. |
This property can be used to wait for the WNR Engine to finish its work and process all frames sent using WNREngine_PutFrameImageBuffer function.
This function can be used for video mode only.
Check if WNR engine is licensed
hEngine | Handle of WNREngine object |
Returns value 0 in case the engine have valid license
Returns value 1 in case the engine do not have valid license
Returns value 2 in case the engine have valid license, but have not available channel to work
Returns value 3 in case the engine cannot validate trial license (for trial version only)
Activates license on-line
licenseKey const char* | String containing the license key |
comments const char* | String containing comments to assign to activation (optional) |
0 on success, error code otherwise
The Internet connection (host: dtksoft.com port: 80) is required to perform license activation The optional comments parameter can be used to identify certain license activation, for example machine name or customer name can be used.
Activates license on-line (extended)
licenseKey const char* | String containing the license key |
comments const char* | String containing comments to assign to activation(optional) |
channels int | Number of channels |
security_key const char* | Security key |
0 on success, error code otherwise
The Internet connection (host: dtksoft.com port: 80) is required to perform license activation The optional comments parameter can be used to identify certain license activation, for example machine name or customer name can be used. This function should be used for special licenses that support activation of a certain number of channels and/or using a security key for activation.
Returns activation link to activate the defined license key
licenseKey const char* | String which contain license key |
comments const char* | String which contain comments assigned to activation (optional) |
activationLink char* | Pointer to string buffer which receives activation link |
size int | Size of string buffer |
Number of bytes copied to buffer. If activationLink = NULL or size = 0, then function return number of bytes required to store the result string
The Internet connection (host: dtksoft.com port: 80) is required to perform license activation The optional comments parameter can be used to identify certain license activation, for example machine name or customer name can be used.
Returns activation link to activate the defined license key (extended)
licenseKey const char* | String which contain license key |
comments const char* | String which contain comments assigned to activation (optional) |
channels int | Number of channels |
security_key const char* | Security key |
activationLink char* | Pointer to string buffer which receives activation link |
size int | Size of string buffer |
Number of bytes copied to buffer. If activationLink = NULL or size = 0, then function return number of bytes required to store the result string
The Internet connection (host: dtksoft.com port: 80) is required to perform license activation
The optional comments parameter can be used to identify certain license activation, for example machine name or customer name can be used.
This function should be used for special licenses that support activation of a certain number of channels and/or using a security key for activation.
Activates license on machine using activation code
activationCode const char* | String which contain activation code |
0 on success, error code otherwise
The optional comments parameter can be used to identify certain license activation, for example machine name or customer name can be used.
Gets the current machine/system ID
system_id char* | Pointer to string buffer which receives current machine ID (fingerprint) |
system_id_size int | Size of string buffer |
Number of bytes copied to buffer. If system_id = NULL or system_id_size = 0, then function return number of bytes required to store the result string
Reload license information from USB dongles
You do not need to call this function regularly, this function call is ONLY relevant after updating the USB key to tell the engine to reload the new license information from the dongle.
Gets the information of the currently activated license: license key, comments, number of channels, expiration date (if applicable)
license_key char* | Pointer to string buffer which receives license key activated on current machine |
license_key_max_len int | Size of string buffer |
comments char* | Pointer to string buffer which receives activation comments |
comments_max_len int | Size of string buffer |
channels int* | Pointer to integer variable which receives number of channels of activated license |
expirationDate time_t* | Pointer to 64bit integer value (time_t C++ type) which receives expiration date of activated license |
If expirationDate value is 0, then license does not expire.
Gets the information of the currently activated license
license_key char* | Pointer to string buffer which receives license key activated on current machine |
license_key_max_len int | Size of string buffer |
comments char* | Pointer to string buffer which receives activation comments |
comments_max_len int | Size of string buffer |
channels int* | Pointer to integer variable which receives number of channels of activated license |
expirationDate time_t* | Pointer to 64bit integer value (time_t C++ type) which receives expiration date of activated license |
usb_dongle_id char* | Pointer to string buffer which receives USB dongle id number |
usb_dongle_id_len int | Size of string buffer |
The function returns the following information: license key, comments, number of channels, expiration date (if applicable), USB dongle id (if applicable)
If expirationDate value is 0, then license does not expire.
If the license is not on a USB dongle, then usb_dongle_id will be an empty string.
Return library version
buffer char* | Pointer to string buffer which receives library version |
buff_size int | Size of string buffer |
Number of bytes copied to buffer. If buffer = NULL or buff_size = 0, then function return number of bytes required to store the result string
Sets information about the network license server to use for license verification.
ip_addres char* | IP address of the DTK license server |
port int | port number of the DTK license server, default 54300 |
This function enables network licensing for current process. The DTK License Server must be executed on remote or local machine.
To use local machine use ip_addres "127.0.0.1"
To disable network licensing call this function with empty ip_addres parameter.
Creates WNRParams object instance
Handle of new WNRParams object
Gets the type of wagon number to recognize
hParams | Handle of WNRParams object |
type of wagon number, WAGON_NUMBER_TYPE enumeration value
Sets the type of wagon number to recognize
hParams | Handle of WNRParams object |
type | type of wagon number, WAGON_NUMBER_TYPE enumeration value |
Gets minimum wagon number width
hParams | Handle of WNRParams object |
Minimum wagon number width in pixels
The minimum/maximum wagon number width parameters are used to tell the engine the expected size of the wagon number on image.
Defining a narrower interval increases recognition speed and decreases CPU resources, but negatively affects recognition accuracy.
The recommended values for min/max width are -/+30% of real wagon number width. For example, if we have wagon number 200 pixels in width, then you can define values 140/260.
If the recognition accuracy is not enough, you can try to decrease minimum width to get better results.
Default value is 80. Minimum value is 70. Maximum value is 1000.
Sets the minimum width of the wagon number
hParams | Handle of WNRParams object |
minWidth int | Minimum width of the wagon number in pixels |
The minimum/maximum wagon number width parameters are used to tell the engine the expected size of the wagon number on image.
Defining a narrower interval increases recognition speed and decreases CPU resources, but negatively affects recognition accuracy.
The recommended values for min/max width are -/+30% of real wagon number width. For example, if we have wagon number 200 pixels in width, then you can define values 140/260.
If the recognition accuracy is not enough, you can try to decrease minimum width to get better results.
Default value is 80. Minimum value is 70. Maximum value is 1000.
Gets the minimum width of the wagon number
hParams | Handle of WNRParams object |
Maximum width of the wagon number in pixels
The minimum/maximum wagon number width parameters are used to tell the engine the expected size of the wagon number on image.
Defining a narrower interval increases recognition speed and decreases CPU resources, but negatively affects recognition accuracy.
The recommended values for min/max width are -/+30% of real wagon number width. For example, if we have wagon number with 200 pixels in width, then you can define values 140/260.
If the recognition accuracy is not enough, you can try to decrease minimum width to get better results.
Default value is 300. Minimum value is 100.
Sets the maximum width of the wagon number
hParams | Handle of WNRParams object |
maxWidth int | Maximum width of the wagon number in pixels |
The minimum/maximum wagon number width parameters are used to tell the engine the expected size of the wagon number on image.
Defining a narrower interval increases recognition speed and decreases CPU resources, but negatively affects recognition accuracy.
The recommended values for min/max width are -/+30% of real wagon number width. For example, if we have wagon number with 200 pixels in width, then you can define values 140/260.
If the recognition accuracy is not enough, you can try to decrease minimum width to get better results.
Default value is 300. Minimum value is 100.
Gets the value indicating whether the WNR engine can return results with incorrect checksum
hParams | Handle of WNRParams object |
Boolean value
Default value is False.
Sets the value indicating whether the WNR engine can return results with incorrect checksum
hParams- Handle of WNRParams object val - Boolean value
Default value is False.
Gets the number of recognition threads used by WNR engine
hParams | Handle of WNRParams object |
Number of threads
Default value is 3.
This property used for video mode only
Sets the number of recognition threads used by WNR engine
hParams | Handle of WNRParams object |
numThreads int | Number of threads |
Default value is 3.
This property used for video mode only.
Gets the maximum FPS that the WNR engine will handle
hParams | Handle of WNRParams object |
Number of frames per second (FPS)
Default value is 0 (unlimited).
If the defined FPS limit is reached, then WNR Engine drop incoming frames.
This property used for video mode only.
Sets the maximum FPS that the WNR engine will handle
hParams | Handle of WNRParams object |
fps int | number of frames per second (FPS) |
Default value is 0 (unlimited).
If the defined FPS limit is reached, then WNR Engine drop incoming frames.
This property used for video mode only.
Gets the value indicating whether the WNR engine will process moving objects only
hParams | Handle of WNRParams object |
Boolean value, True | do recognition moving object only, False - process full frames always |
Default value is False.
This property used for video mode only.
Sets the value indicating whether the WNR engine will process moving objects only
hParams- Handle of WNRParams object recOnMotion - Boolean value, True - do recognition of moving object only, False - process full frames
Default value is False.
This property used for video mode only.
Gets the rotation angle of the image in degrees
hParams | Handle of WNRParams object |
Rotation angle in degrees. Possible values from 0 to 359. Value 0 | do not rotate image. |
Default value is 0. The input image will be rotated counterclockwise direction at defined angle (in degrees) before processing.
Sets the rotation angle of the image in degrees
hParams | Handle of WNRParams object |
rotateAngle int | Rotation angle in degrees (0..359). Value 0 - do not rotate image. |
Default value is 0. The input image will be rotated counterclockwise direction at defined angle (in degrees) before processing.
Gets the format string to draw on result image
hParams | Handle of WNRParams object |
format char* | Pointer to string buffer to receive format string |
format_size int | Size of string buffer |
Number of bytes copied to buffer. If format = NULL or format_size = 0, then function return number of bytes required to store the result string
Sets the format string to draw on result image
hParams | Handle of WNRParams object |
format const char* | Format string, available variables: %DATETIME%, "%NUMBER%", %COUNTRY%" |
Gets the position on image to draw format string
hParams | Handle of WNRParams object |
Position on result image.
0 | Burn format string in Left-Top corner on result image |
1 | Burn format string in Right-Top corner on result image |
2 | Burn format string in Left-Bottom corner on result image |
3 | Burn format string in Right-Bottom corner on result image |
Sets the position on image to draw format string
hParams | Handle of WNRParams object |
position int | Position on result image |
0 | Burn format string in Left-Top corner on result image |
1 | Burn format string in Right-Top corner on result image |
2 | Burn format string in Left-Bottom corner on result image |
3 | Burn format string in Right-Bottom corner on result image |
Gets eXtra non-documented options, which can enable some custom feature
hParams | Handle of WNRParams object |
optionName const char* | Option name |
val char** | Pointer to string buffer to receive option value |
val_size int | Size of string buffer |
Sets eXtra non-documented options, which can enable some custom feature
hParams | Handle of WNRParams object |
optionName const char* | Option name |
val const char* | String value of option |
Gets the number of recognition zones
hParams | Handle of WNRParams object |
Number of recognition zones
Add new recognition zone
hParams | Handle of WNRParams object |
Index of new recognition zone
Remove recognition zone by it's index
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
Value 0 if recognition zone has been deleted successfully, otherwise -1
Zone index is zero-based
Gets the number of polygon points that make up the zone
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
Number of polygon points of recognition zone, -1 if no zone found by index
Zone index is zero-based
Gets the coordinates of polygon point by it's index
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
pointIndex int | Zone index |
x int* | X - coordinate |
y int* | Y - coordinate |
Value 0 on success, otherwise -1
Zone index and Point index are zero-based
Sets the coordinates of polygon point by it's index
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
pointIndex int | Zone index |
x int | X - coordinate |
y int | Y - coordinate |
Value 0 on success, otherwise -1
Zone index and Point index are zero-based
Add new polygon point for recognition zone
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
x int | X - coordinate |
y int | Y - coordinate |
Value 0 on success, otherwise -1
Zone index is zero-based
Remove polygon point of recognition zone by it's index
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
pointIndex int | Point index |
Value 0 on success, otherwise -1
Zone index and Point index are zero-based
Gets the number of polygon points (with relative coordinates) that make up the zone
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
Number of polygon points of recognition zone, -1 if no zone found by index
Zone index is zero-based
Gets relative coordinates of polygon point by it's index
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
pointIndex int | Zone index |
x float* | X - relative coordinate (floating value from 0 to 1) |
y float* | Y - relative coordinate (floating value from 0 to 1) |
Value 0 on success, otherwise -1
Example: image 640 x 480 pixels, relative coordinates (0.1, 0.2) means (64, 96) in pixels for our image resolution.
Using relative coordinates, you can easily change the resolution and image size without updating the coordinates of the zones.
Zone index and Point index are zero-based
Sets relative coordinates of polygon point by it's index
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
pointIndex int | Zone index |
x float | X - relative coordinate (floating value from 0 to 1) |
y float | Y - relative coordinate (floating value from 0 to 1) |
Value 0 on success, otherwise -1
Example: image 640 x 480 pixels, relative coordinates (0.1, 0.2) means (64, 96) in pixels for our image resolution.
Using relative coordinates, you can easily change the resolution and image size without updating the coordinates of the zones.
Zone index and Point index are zero-based
Add new polygon point (with relative coordinates) for recognition zone
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
x float | X - relative coordinate (floating value from 0 to 1) |
y float | Y - relative coordinate (floating value from 0 to 1) |
Value 0 on success, otherwise -1
Example: image 640 x 480 pixels, relative coordinates (0.1, 0.2) means (64, 96) in pixels for our image resolution.
Using relative coordinates, you can easily change the resolution and image size without updating the coordinates of the zones.
Zone index is zero-based
Remove polygon point (with relative coordinates) of recognition zone by it's index
hParams | Handle of WNRParams object |
zoneIndex int | Zone index |
pointIndex int | Point index |
Value 0 on success, otherwise -1
Zone index and Point index are zero-based
Destroy WNRResult object
hResult | Handle of WNRResult object |
There is not possibility to create WNRResult object, the WNR engine only can create this object, you need to destroy it when you do not need it anymore.
Gets the number of WagonNumber objects containing in WNRResult object
hResult | Handle of WNRResult object |
Number of WagonNumber objects
Gets the WagonNumber object from WNRResult by it's index
hResult | Handle of WNRResult object |
index int | Index of WagonNumber object |
Handle of WagonNumber object
Each WagonNumber object from WNRResult must be destroyed using WagonNumber_Destroy function
Gets the processing time (in milliseconds) without image file reading from disk and image decoding.
hResult | Handle of WNRResult object |
time in milliseconds
Destroys the WagonNumber object instance
hWagonNum | Handle of WagonNumber object |
There is not possibility to create WagonNumber object, the WNR engine only can create this object, you need to destroy it when you do not need it anymore.
Gets the wagon number text
hWagonNum | Handle of WagonNumber object |
text char* | Pointer to string buffer which receives recognized wagon number text |
textSize int | Size of string buffer |
Number of bytes copied to string buffer. If text = NULL or textSize = 0, then function return required number of bytes required to store the result string
Gets the value indicating whether the checksum of wagon number is valid
hWagonNum | Handle of WagonNumber object |
Boolean value
The wagon number may have an incorrect checksum if the IgnoreChecksum parameter is set to True.
Gets the X coordinate of wagon number bounding rectangle
hWagonNum | Handle of WagonNumber object |
X coordinate in pixels
Gets the Y coordinate of wagon number bounding rectangle
hWagonNum | Handle of WagonNumber object |
Y coordinate in pixels
Gets the width of wagon number bounding rectangle
hWagonNum | Handle of WagonNumber object |
Width in pixels
Gets width of wagon number bounding rectangle
hWagonNum | Handle of WagonNumber object |
Width in pixels
Gets number of wagon number symbols
hWagonNum | Handle of WagonNumber object |
Number of symbols
Gets the X coordinate of symbol in pixels
hWagonNum | Handle of WagonNumber object |
index int | index of symbol (zero-based) |
X coordinate in pixels
Gets the Y coordinate of symbol in pixels
hWagonNum | Handle of WagonNumber object |
index int | index of symbol (zero-based) |
Y coordinate in pixels
Gets the width of symbol in pixels
hWagonNum | Handle of WagonNumber object |
index int | index of symbol (zero-based) |
Width in pixels
Gets the height of symbol in pixels
hWagonNum | Handle of WagonNumber object |
index int | index of symbol (zero-based) |
Height in pixels
Gets the symbol character
hWagonNum | Handle of WagonNumber object |
index int | index of symbol (zero-based) |
Character of symbol
Gets the recognition confidence of wagon number symbol
hWagonNum | Handle of WagonNumber object |
index int | index of symbol (zero-based) |
Number of percentage from 1 to 100
Gets the recognition confidence of wagon number
hWagonNum | Handle of WagonNumber object |
Number of percentage from 1 to 100
Gets the recognition zone index to which the wagon number belongs
hWagonNum | Handle of WagonNumber object |
Index of recognition zone
The index is one-based. If the index is 0, it means that the zones are not defined and the number is found on the whole image.
Gets the timestamp of the video frame where the wagon number recognized
hWagonNum | Handle of WagonNumber object |
Timestamp in milliseconds
This property used for video mode only
Gets the timestamp of the video frame that was passed to PutFrameImageBuffer function
hWagonNum | Handle of WagonNumber object |
Timestamp in milliseconds
This property used for video mode only
Gets the date/time string with milliseconds of the video frame where the wagon number recognized
hWagonNum | Handle of WagonNumber object |
buffer char* | Pointer to string buffer which will receive date/time string |
bufferSize int | Size of the string buffer in bytes |
Number of bytes copied to buffer. If buffer = NULL or bufferSize = 0, then function return required number of bytes required to store the result string
Returns data/time string of the video frame in format "yyyy-dd-mm hh:mm:ss.fff"
This property used for video mode only
Gets custom 64 bit data which has been sent as parameter of WNREngine_PutFrameImageBuffer function
hWagonNum | Handle of WagonNumber object |
64 bit integer value
This property used for video mode only
Get frame image buffer
hWagonNum | Handle of WagonNumber object |
pImageBuffer void** | Pointer to a pointer which receives the image buffer containing pixel data of the frame image in RGB24 format. |
width int* | Pointer to integer variable which receives width of frame image |
height int* | Pointer to integer variable which receives height of frame image |
stride int* | Pointer to integer variable which receives size of one image row in bytes |
You need to call WagonNumber_FreeImageBuffer with received pointer to free memory.
This property used for video mode only
Saves frame image to file (BMP, JPG, PNG)
hWagonNum | Handle of WagonNumber object |
fileName const char* | image file name |
param int | compression/quality parameter (see Notes) |
If image format is JPG then 'param' value means JPEG quality, value from 0 to 100
If image format is PNG then 'param' value means PNG compression, value from 0 to 9
If image format is BMP then 'param' value not used.
If 'param' value is set to -1, then default values will be used: 95 for JPEG, 6 for PNG
This property used for video mode only
Gets the image buffer of the wagon number
hWagonNum | Handle of WagonNumber object |
pImageBuffer void** | Pointer to a pointer which receives the image buffer containing pixel data of the wagon number image in RGB24 format. |
width int* | Pointer to integer variable which receives width of wagon number image |
height int* | Pointer to integer variable which receives height of wagon number image |
stride int* | Pointer to integer variable which receives size of one image row in bytes |
You need to call WagonNumber_FreeImageBuffer with received pointer to free memory.
This property used for video mode only
Saves the image of the wagon number to file (BMP, JPG, PNG)
hWagonNum | Handle of WagonNumber object |
fileName const char* | image file name |
param int | compression/quality parameter (see Notes) |
If image format is JPG then 'param' value means JPEG quality, value from 0 to 100 If image format is PNG then 'param' value means PNG compression, value from 0 to 9 If image format is BMP then 'param' value not used.
If 'param' value is set to -1, then default values will be used: 95 for JPEG, 6 for PNG
This property used for video mode only
Delete image buffer
pImageBuffer void* | Pointer to image buffer received using WagonNumber_GetImageBuffer or WagonNumber_GetWagonNumberImageBuffer functions. |