Functions for managing Worker objects. More...
Functions | |
VL_SDK_API void VL_CALLINGCONVENTION | vlDelete_Worker (vlWorker_t *worker) |
Deletes a Worker object. More... | |
VL_SDK_API vlWorker_t *VL_CALLINGCONVENTION | vlNew_SyncWorker () |
Creates a synchronous Worker object. More... | |
VL_SDK_API vlWorker_t *VL_CALLINGCONVENTION | vlNew_Worker () |
Creates a Worker object. More... | |
VL_SDK_API void VL_CALLINGCONVENTION | vlReleaseBinaryBuffer (const char data[]) |
Helper function for releasing a binary memory block. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddCalibratedImageListener (vlWorker_t *worker, vlCallbackCalibratedImageWrapper listener, void *clientData, vlImageFormat format) |
Registers a listener for CalibratedImage events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddCameraCalibrationDB (vlWorker_t *worker, const char uri[]) |
Adds a given URI pointing to a camera calibration database JSON file to the VisionLib. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddDebugImageListener (vlWorker_t *worker, vlCallbackImageWrapper listener, void *clientData) |
Register a listener for debug image events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddExtrinsicDataListener (vlWorker_t *worker, vlCallbackExtrinsicDataWrapper listener, void *clientData) |
Registers a listener for ExtrinsicData events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddImageListener (vlWorker_t *worker, vlCallbackImageWrapper listener, void *clientData) |
Registers a listener for image events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddIntrinsicDataListener (vlWorker_t *worker, vlCallbackIntrinsicDataWrapper listener, void *clientData) |
Registers a listener for IntrinsicData events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddPerformanceInfoListener (vlWorker_t *worker, vlCallbackZString listener, void *clientData) |
Registers a listener for performance information events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddTrackingStateListener (vlWorker_t *worker, vlCallbackZString listener, void *clientData) |
Registers a listener for tracking state events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddWorldFromAnchorTransformListener (vlWorker_t *worker, const char anchorName[], vlCallbackSimilarityTransformWrapper listener, void *clientData) |
Register a listener for world from anchor transform events (SimilarityTransform events) produced by a certain anchor. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_AddWorldFromCameraTransformListener (vlWorker_t *worker, vlCallbackExtrinsicDataWrapper listener, void *clientData) |
Registers a listener for world from camera transform events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_ClearListeners (vlWorker_t *worker) |
Removes all listeners. More... | |
VL_SDK_API char *VL_CALLINGCONVENTION | vlWorker_GetDeviceInfo (vlWorker_t *worker) |
Returns a JSON string with information about the current device. More... | |
VL_SDK_API vlImageWrapper_t *VL_CALLINGCONVENTION | vlWorker_GetImageByNameSync (vlWorker_t *worker, const char *image_name) |
Returns a pointer to the camera image with the given name. More... | |
VL_SDK_API vlImageWrapper_t *VL_CALLINGCONVENTION | vlWorker_GetImageSync (vlWorker_t *worker) |
Returns a pointer to the camera image. More... | |
VL_SDK_API char *VL_CALLINGCONVENTION | vlWorker_GetLicenseInformation (vlWorker_t *worker) |
Retrieves actual license information as a JSON encoded string. More... | |
VL_SDK_API vlExtrinsicDataWrapper_t *VL_CALLINGCONVENTION | vlWorker_GetNodeExtrinsicDataSync (vlWorker_t *worker, const char node[], const char key[]) |
Returns a pointer to extrinsicdata with the given name from a given node. More... | |
VL_SDK_API vlImageWrapper_t *VL_CALLINGCONVENTION | vlWorker_GetNodeImageSync (vlWorker_t *worker, const char node[], const char key[]) |
Returns a pointer to the image with the given name from a given node. More... | |
VL_SDK_API vlIntrinsicDataWrapper_t *VL_CALLINGCONVENTION | vlWorker_GetNodeIntrinsicDataSync (vlWorker_t *worker, const char node[], const char key[]) |
Returns a pointer to IntrinsicData with the given name from a given node. More... | |
VL_SDK_API vlSimilarityTransformWrapper_t *VL_CALLINGCONVENTION | vlWorker_GetNodeSimilarityTransformSync (vlWorker_t *worker, const char node[], const char key[]) |
Returns a pointer to the SimilarityTransform with the given name from a given node. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_IsRunning (vlWorker_t *worker) |
Returns whether the thread is currently running or not. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_LoadPlugin (vlWorker_t *worker, const char pluginName[]) |
Loads the plugin with the given name. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_Lock (vlWorker_t *worker) |
For testing purposed. Don't use! | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_PollEvents (vlWorker_t *worker) |
Calls the registered listeners for the enqueued events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_ProcessCallbacks (vlWorker_t *worker) |
Executes all enqueued callbacks. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_ProcessJsonAndBinaryCommandSync (vlWorker_t *worker, const char jsonString[], const char data[], unsigned int size, vlCallbackJsonAndBinaryString callback, void *clientData) |
Processes the passed json command along with binary data for the visionLib. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_ProcessJsonCommandSync (vlWorker_t *worker, const char jsonString[], vlCallbackJsonString callback, void *clientData) |
Processes the passed command. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_PushJsonAndBinaryCommand (vlWorker_t *worker, const char jsonString[], const char data[], unsigned int size, vlCallbackJsonAndBinaryString callback, void *clientData) |
Enqueues a json command along with binary data for the visionLib. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_PushJsonCommand (vlWorker_t *worker, const char jsonString[], vlCallbackJsonString callback, void *clientData) |
Enqueues a command for the tracking thread as zero terminated JSON string. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveCalibratedImageListener (vlWorker_t *worker, vlCallbackCalibratedImageWrapper listener, void *clientData, vlImageFormat format) |
Unregisters a listener from CalibratedImage events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveDebugImageListener (vlWorker_t *worker, vlCallbackImageWrapper listener, void *clientData) |
Unregisters a listener from debug image events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveExtrinsicDataListener (vlWorker_t *worker, vlCallbackExtrinsicDataWrapper listener, void *clientData) |
Unregisters a listener from ExtrinsicData events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveImageListener (vlWorker_t *worker, vlCallbackImageWrapper listener, void *clientData) |
Unregisters a listener from image events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveIntrinsicDataListener (vlWorker_t *worker, vlCallbackIntrinsicDataWrapper listener, void *clientData) |
Unregisters a listener from IntrinsicData events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemovePerformanceInfoListener (vlWorker_t *worker, vlCallbackZString listener, void *clientData) |
Unregisters a listener from performance info events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveTrackingStateListener (vlWorker_t *worker, vlCallbackZString listener, void *clientData) |
Unregisters a listener from tracking state events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveWorldFromAnchorTransformListener (vlWorker_t *worker, const char anchorName[], vlCallbackSimilarityTransformWrapper listener, void *clientData) |
Unregister a listener from world from anchor transform events (SimilarityTransform events) produced by a certain anchor. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RemoveWorldFromCameraTransformListener (vlWorker_t *worker, vlCallbackExtrinsicDataWrapper listener, void *clientData) |
Unregisters a listener from world from camera transform events. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_ResetCameraCalibrationDB (vlWorker_t *worker) |
Removes all references to all manually set calibration data bases. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_RunOnceSync (vlWorker_t *worker) |
Processes the enqueued commands and the tracking once. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_SetLicenseFileData (vlWorker_t *worker, const char licenseFileData[]) |
Allows to inject the license data from memory. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_SetLicenseFilePath (vlWorker_t *worker, const char licenseFilePath[]) |
Sets the path of the license file. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_SetNodeExtrinsicDataSync (vlWorker_t *worker, vlExtrinsicDataWrapper_t *extrinsicData, const char node[], const char key[]) |
Sets the given extrinsicData in the given input of the given node. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_SetNodeImageSync (vlWorker_t *worker, vlImageWrapper_t *image, const char node[], const char key[]) |
Sets the given image in the given input of the given node. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_SetNodeIntrinsicDataSync (vlWorker_t *worker, vlIntrinsicDataWrapper_t *intrinsicData, const char node[], const char key[]) |
Sets the given IntrinsicData in the given input of the given node. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_SetNodeSimilarityTransformSync (vlWorker_t *worker, vlSimilarityTransformWrapper_t *similarityTransform, const char node[], const char key[]) |
Sets the given SimilarityTransform in the given input of the given node. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_Start (vlWorker_t *worker) |
Starts the tracking thread. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_Stop (vlWorker_t *worker) |
Stops the tracking thread. More... | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_Unlock (vlWorker_t *worker) |
For testing purposed. Don't use! | |
VL_SDK_API bool VL_CALLINGCONVENTION | vlWorker_WaitEvents (vlWorker_t *worker, unsigned int timeout) |
Waits for enqueued events and calls the registered listeners. More... | |
Functions for managing Worker objects.
A Worker object controls the tracking thread.
VL_SDK_API void VL_CALLINGCONVENTION vlDelete_Worker | ( | vlWorker_t * | worker | ) |
Deletes a Worker object.
worker | Pointer to a Worker object. |
VL_SDK_API vlWorker_t *VL_CALLINGCONVENTION vlNew_SyncWorker | ( | ) |
Creates a synchronous Worker object.
A synchronous Worker object doesn't create a new thread. Instead one has to explicitly tell the Worker when to do his work by calling the vlWorker_RunOnceSync function. This has the advantage, that we know exactly when the tracking is running, when it's finished and when we can get the results.
Use vlDelete_Worker after usage to avoid memory leaks.
VL_SDK_API vlWorker_t *VL_CALLINGCONVENTION vlNew_Worker | ( | ) |
Creates a Worker object.
Use vlDelete_Worker after usage to avoid memory leaks.
VL_SDK_API void VL_CALLINGCONVENTION vlReleaseBinaryBuffer | ( | const char | data[] | ) |
Helper function for releasing a binary memory block.
When an vlCallbackJsonAndBinaryString is issued, a memory block passed should be removed after using.
Currently this command is used internally and will be documented in future versions. Thus it is considered as BETA!
data | Pointer to a binary object. |
VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddCalibratedImageListener | ( | vlWorker_t * | worker, |
vlCallbackCalibratedImageWrapper | listener, | ||
void * | clientData, | ||
vlImageFormat | format | ||
) |
Registers a listener for CalibratedImage events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if an CalibratedImage event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
format | The image format for which the listener function should receive events. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddCameraCalibrationDB | ( | vlWorker_t * | worker, |
const char | uri[] | ||
) |
Adds a given URI pointing to a camera calibration database JSON file to the VisionLib.
The VisionLib loads the added camera calibration database file before loading a new tracking configuration file.
This allows to provide a custom camera calibrations for devices for which the VisionLib doesn't provide a default calibration. If a default calibration with the same name already exists, then the default calibration will get overwritten with the custom calibration.
Please also have a look at this reference for more information about the camera calibration database format.
worker | Pointer to an Worker object. |
uri | Zero terminated string with an URI pointing to the camera calibration database file. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddDebugImageListener | ( | vlWorker_t * | worker, |
vlCallbackImageWrapper | listener, | ||
void * | clientData | ||
) |
Register a listener for debug image events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if a debug image event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddExtrinsicDataListener | ( | vlWorker_t * | worker, |
vlCallbackExtrinsicDataWrapper | listener, | ||
void * | clientData | ||
) |
Registers a listener for ExtrinsicData events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if an ExtrinsicData event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddImageListener | ( | vlWorker_t * | worker, |
vlCallbackImageWrapper | listener, | ||
void * | clientData | ||
) |
Registers a listener for image events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if an image event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddIntrinsicDataListener | ( | vlWorker_t * | worker, |
vlCallbackIntrinsicDataWrapper | listener, | ||
void * | clientData | ||
) |
Registers a listener for IntrinsicData events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if an IntrinsicData event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddPerformanceInfoListener | ( | vlWorker_t * | worker, |
vlCallbackZString | listener, | ||
void * | clientData | ||
) |
Registers a listener for performance information events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if a performance information event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddTrackingStateListener | ( | vlWorker_t * | worker, |
vlCallbackZString | listener, | ||
void * | clientData | ||
) |
Registers a listener for tracking state events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if a tracking state event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddWorldFromAnchorTransformListener | ( | vlWorker_t * | worker, |
const char | anchorName[], | ||
vlCallbackSimilarityTransformWrapper | listener, | ||
void * | clientData | ||
) |
Register a listener for world from anchor transform events (SimilarityTransform events) produced by a certain anchor.
worker | Pointer to a Worker object. |
anchorName | Name of the anchor to be addressed. |
listener | Listener function which will be notified during the event processing, if an event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddWorldFromCameraTransformListener | ( | vlWorker_t * | worker, |
vlCallbackExtrinsicDataWrapper | listener, | ||
void * | clientData | ||
) |
Registers a listener for world from camera transform events.
worker | Pointer to a Worker object. |
listener | Listener function which will be notified during the event processing, if an world from camera transform event occurred. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_ClearListeners | ( | vlWorker_t * | worker | ) |
Removes all listeners.
worker | Pointer to a Worker object. |
true
, on success; false
otherwise. VL_SDK_API char *VL_CALLINGCONVENTION vlWorker_GetDeviceInfo | ( | vlWorker_t * | worker | ) |
Returns a JSON string with information about the current device.
It also contains information about the cameras currently connected to the system.
A typical device info might look like this:
worker | Pointer to an vlWorker object. |
VL_SDK_API vlImageWrapper_t *VL_CALLINGCONVENTION vlWorker_GetImageByNameSync | ( | vlWorker_t * | worker, |
const char * | image_name | ||
) |
Returns a pointer to the camera image with the given name.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
The worker is the owner of the image. Therefore you should not call vlDelete_ImageWrapper with the returned image as parameter.
NOTICE: This functions is experimental and might get removed in future.
worker | Pointer to a Worker object. |
image_name | name of the image to get |
NULL
otherwise. VL_SDK_API vlImageWrapper_t *VL_CALLINGCONVENTION vlWorker_GetImageSync | ( | vlWorker_t * | worker | ) |
Returns a pointer to the camera image.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
The worker is the owner of the image. Therefore you should not call vlDelete_ImageWrapper with the returned image as parameter.
NOTICE: This functions is experimental and might get removed in future.
worker | Pointer to a Worker object. |
NULL
otherwise. VL_SDK_API char *VL_CALLINGCONVENTION vlWorker_GetLicenseInformation | ( | vlWorker_t * | worker | ) |
Retrieves actual license information as a JSON encoded string.
The string is JSON encoded and can be used for examining available license features. It can only be valid after a license file has been set.
worker | Pointer to a Worker object. |
VL_SDK_API vlExtrinsicDataWrapper_t *VL_CALLINGCONVENTION vlWorker_GetNodeExtrinsicDataSync | ( | vlWorker_t * | worker, |
const char | node[], | ||
const char | key[] | ||
) |
Returns a pointer to extrinsicdata with the given name from a given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
The returned ExtrinsicData has to be freed using vlDelete_ExtrinsicDataWrapper.
NOTICE: This function is experimental and might get removed in future.
worker | Pointer to a Worker object. |
node | The name of the node. |
key | The name of the exposed ExtrinsicData. |
NULL
otherwise. VL_SDK_API vlImageWrapper_t *VL_CALLINGCONVENTION vlWorker_GetNodeImageSync | ( | vlWorker_t * | worker, |
const char | node[], | ||
const char | key[] | ||
) |
Returns a pointer to the image with the given name from a given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
The returned image has to be freed using vlDelete_ImageWrapper.
NOTICE: This functions is experimental and might get removed in future.
worker | Pointer to a Worker object. |
node | name of the node |
key | Name of the exposed image |
NULL
otherwise. VL_SDK_API vlIntrinsicDataWrapper_t *VL_CALLINGCONVENTION vlWorker_GetNodeIntrinsicDataSync | ( | vlWorker_t * | worker, |
const char | node[], | ||
const char | key[] | ||
) |
Returns a pointer to IntrinsicData with the given name from a given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
The returned IntrinsicData has to be freed using vlDelete_IntrinsicDataWrapper
NOTICE: This function is experimental and might get removed in future.
worker | Pointer to a Worker object. |
node | The name of the node. |
key | The name of the exposed IntrinsicData. |
NULL
otherwise. VL_SDK_API vlSimilarityTransformWrapper_t *VL_CALLINGCONVENTION vlWorker_GetNodeSimilarityTransformSync | ( | vlWorker_t * | worker, |
const char | node[], | ||
const char | key[] | ||
) |
Returns a pointer to the SimilarityTransform with the given name from a given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
The returned SimilarityTransform has to be freed using vlDelete_SimilarityTransformWrapper.
NOTICE: This function is experimental and might get removed in future.
worker | Pointer to a Worker object. |
node | The name of the node. |
key | The name of the exposed SimilarityTransform. |
NULL
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_IsRunning | ( | vlWorker_t * | worker | ) |
Returns whether the thread is currently running or not.
worker | Pointer to a Worker object. |
true
, if the thread is running; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_LoadPlugin | ( | vlWorker_t * | worker, |
const char | pluginName[] | ||
) |
Loads the plugin with the given name.
worker | Pointer to a Worker object. |
pluginName | Zero terminated string with the name of the plugin without prefix ("VP") and fileending (".dll", ".so") e.g. "VideoUEye". |
true
, if plugin has been loaded successfully; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_PollEvents | ( | vlWorker_t * | worker | ) |
Calls the registered listeners for the enqueued events.
Listeners aren't called immediately from the tracking thread in order to avoid synchronisation problems. Instead this method should be called regularly from the main thread.
worker | Pointer to a Worker object. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_ProcessCallbacks | ( | vlWorker_t * | worker | ) |
Executes all enqueued callbacks.
Callbacks aren't called immediately from the tracking thread in order to avoid synchronisation problems. Instead this method should be called regularly from the main thread.
worker | Pointer to a Worker object. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_ProcessJsonAndBinaryCommandSync | ( | vlWorker_t * | worker, |
const char | jsonString[], | ||
const char | data[], | ||
unsigned int | size, | ||
vlCallbackJsonAndBinaryString | callback, | ||
void * | clientData | ||
) |
Processes the passed json command along with binary data for the visionLib.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
Currently this command is used internally and will be documented in future versions. Thus it is considered as BETA!
worker | Pointer to a Worker object. |
jsonString | Command as zero terminated JSON string. |
data | Binary data pointer. The lifetime of the memory should be maintaned until the answer has been received. (might be 0) |
size | The size of the content passed. |
callback | Callback function, which will be called synchronously |
clientData | The callback function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, if the command is supported; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_ProcessJsonCommandSync | ( | vlWorker_t * | worker, |
const char | jsonString[], | ||
vlCallbackJsonString | callback, | ||
void * | clientData | ||
) |
Processes the passed command.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
worker | Pointer to a Worker object. |
jsonString | Command as zero terminated JSON string. |
callback | Callback function, which will be called after the command was processed. |
clientData | The callback function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, if the command is supported; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_PushJsonAndBinaryCommand | ( | vlWorker_t * | worker, |
const char | jsonString[], | ||
const char | data[], | ||
unsigned int | size, | ||
vlCallbackJsonAndBinaryString | callback, | ||
void * | clientData | ||
) |
Enqueues a json command along with binary data for the visionLib.
The command gets processed asynchronously by the tracking thread and a callback will called once after the processing has finished.
Currently this command is used internally and will be documented in future versions. Thus it is considered as BETA!
A list of the available commands can be found under https://docs.visionlib.com/v2.3.0/tracker-commands.html
worker | Pointer to a Worker object. |
jsonString | Command as zero terminated JSON string. |
data | Binary data pointer. The lifetime of the memory should be maintaned until the answer has been received. (might be 0) |
size | The size of the content passed. |
callback | Callback function, which will be called inside vlWorker_ProcessCallbacks after the command was processed. |
clientData | The callback function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, if the command was enqueue successfully; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_PushJsonCommand | ( | vlWorker_t * | worker, |
const char | jsonString[], | ||
vlCallbackJsonString | callback, | ||
void * | clientData | ||
) |
Enqueues a command for the tracking thread as zero terminated JSON string.
The command gets processed asynchronously by the tracking thread and a callback will called once after the processing has finished.
A list of the available commands can be found under https://docs.visionlib.com/v2.3.0/tracker-commands.html
worker | Pointer to a Worker object. |
jsonString | Command as zero terminated JSON string. |
callback | Callback function, which will be called inside vlWorker_ProcessCallbacks after the command was processed. |
clientData | The callback function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, if the command was enqueue successfully; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveCalibratedImageListener | ( | vlWorker_t * | worker, |
vlCallbackCalibratedImageWrapper | listener, | ||
void * | clientData, | ||
vlImageFormat | format | ||
) |
Unregisters a listener from CalibratedImage events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
format | The image format for which the listener function has been registered. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveDebugImageListener | ( | vlWorker_t * | worker, |
vlCallbackImageWrapper | listener, | ||
void * | clientData | ||
) |
Unregisters a listener from debug image events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveExtrinsicDataListener | ( | vlWorker_t * | worker, |
vlCallbackExtrinsicDataWrapper | listener, | ||
void * | clientData | ||
) |
Unregisters a listener from ExtrinsicData events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveImageListener | ( | vlWorker_t * | worker, |
vlCallbackImageWrapper | listener, | ||
void * | clientData | ||
) |
Unregisters a listener from image events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveIntrinsicDataListener | ( | vlWorker_t * | worker, |
vlCallbackIntrinsicDataWrapper | listener, | ||
void * | clientData | ||
) |
Unregisters a listener from IntrinsicData events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemovePerformanceInfoListener | ( | vlWorker_t * | worker, |
vlCallbackZString | listener, | ||
void * | clientData | ||
) |
Unregisters a listener from performance info events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveTrackingStateListener | ( | vlWorker_t * | worker, |
vlCallbackZString | listener, | ||
void * | clientData | ||
) |
Unregisters a listener from tracking state events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveWorldFromAnchorTransformListener | ( | vlWorker_t * | worker, |
const char | anchorName[], | ||
vlCallbackSimilarityTransformWrapper | listener, | ||
void * | clientData | ||
) |
Unregister a listener from world from anchor transform events (SimilarityTransform events) produced by a certain anchor.
worker | Pointer to a Worker object. |
anchorName | Name of the anchor to be addressed. |
listener | Listener function which should be unregistered. |
clientData | The listener function will be called with the given pointer value as parameter. This can be used to invoke a member function. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveWorldFromCameraTransformListener | ( | vlWorker_t * | worker, |
vlCallbackExtrinsicDataWrapper | listener, | ||
void * | clientData | ||
) |
Unregisters a listener from world from camera transform events.
worker | Pointer to a Worker object. |
listener | Listener function which should be unregistered. |
clientData | Pointer value used as parameter during the registration of the listener. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_ResetCameraCalibrationDB | ( | vlWorker_t * | worker | ) |
Removes all references to all manually set calibration data bases.
The VisionLib loads the added camera calibration database file before loading a new tracking configuration file. This command removes the queue of file to be loaded.
This allows to provide a custom camera calibrations for devices for which the VisionLib doesn't provide a default calibration. If a default calibration with the same name already exists, then the default calibration will get overwritten with the custom calibration.
Please also have a look at this reference for more information about the camera calibration database format.
worker | Pointer to an Worker object. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RunOnceSync | ( | vlWorker_t * | worker | ) |
Processes the enqueued commands and the tracking once.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker). The target number of FPS will get ignored. After calling this function you should call vlWorker_ProcessEvents and vlWorker_PollEvents to invoke callbacks and registered listeners.
worker | Pointer to a Worker object. |
true
, on success; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_SetLicenseFileData | ( | vlWorker_t * | worker, |
const char | licenseFileData[] | ||
) |
Allows to inject the license data from memory.
This is mandatory for being able to run the tracking. Alternatively you can load the license data from a file using the vlWorker_SetLicenseFilePath function. If the vlWorker_SetLicenseFilePath was previously used and now the license data should be read from a file, then please set the license file data to an empty string first.
worker | Pointer to a Worker object. |
licenseFileData | Zero terminated string with the license data. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_SetLicenseFilePath | ( | vlWorker_t * | worker, |
const char | licenseFilePath[] | ||
) |
Sets the path of the license file.
This is mandatory for being able to run the tracking. Alternatively you can inject the license file from memory using the vlWorker_SetLicenseFileData function.
worker | Pointer to a Worker object. |
licenseFilePath | Zero terminated string with a path to the license file. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_SetNodeExtrinsicDataSync | ( | vlWorker_t * | worker, |
vlExtrinsicDataWrapper_t * | extrinsicData, | ||
const char | node[], | ||
const char | key[] | ||
) |
Sets the given extrinsicData in the given input of the given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
NOTICE: This function is experimental and might get removed in future.
worker | Pointer to a Worker object. |
extrinsicData | Pointer to an ExtrinsicData object. |
node | The name of the node. |
key | The name of the ExtrinsicData to set. |
true
, on success; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_SetNodeImageSync | ( | vlWorker_t * | worker, |
vlImageWrapper_t * | image, | ||
const char | node[], | ||
const char | key[] | ||
) |
Sets the given image in the given input of the given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
NOTICE: This function is experimental and might get removed in future.
worker | Pointer to a Worker object. |
image | Pointer to an Image object |
node | name of the node |
key | Name of the image to set |
true
, on success; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_SetNodeIntrinsicDataSync | ( | vlWorker_t * | worker, |
vlIntrinsicDataWrapper_t * | intrinsicData, | ||
const char | node[], | ||
const char | key[] | ||
) |
Sets the given IntrinsicData in the given input of the given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
NOTICE: This function is experimental and might get removed in future.
worker | Pointer to a Worker object. |
intrinsicData | Pointer to an IntrinsicData object |
node | The name of the node. |
key | The name of the IntrinsicData to set. |
true
, on success; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_SetNodeSimilarityTransformSync | ( | vlWorker_t * | worker, |
vlSimilarityTransformWrapper_t * | similarityTransform, | ||
const char | node[], | ||
const char | key[] | ||
) |
Sets the given SimilarityTransform in the given input of the given node.
This function only works, if the Worker was created as synchronous instance (vlNew_SyncWorker).
NOTICE: This function is experimental and might get removed in future.
worker | Pointer to a Worker object. |
similarityTransform | Pointer to a SimilarityTransform object. |
node | The name of the node. |
key | The name of the SimilarityTransform to set. |
true
, on success; false
, otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_Start | ( | vlWorker_t * | worker | ) |
Starts the tracking thread.
worker | Pointer to a Worker object. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_Stop | ( | vlWorker_t * | worker | ) |
Stops the tracking thread.
worker | Pointer to a Worker object. |
true
, on success; false
otherwise. VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_WaitEvents | ( | vlWorker_t * | worker, |
unsigned int | timeout | ||
) |
Waits for enqueued events and calls the registered listeners.
Listeners aren't called immediately from the tracking thread in order to avoid synchronisation problems. Instead this method should be called regularly from the main thread.
worker | Pointer to a Worker object. |
timeout | Number of milliseconds before stopping to wait. Under normal circumstances this shouldn't happen, but in case something went wrong, we don't want to wait indefinitely. |
true
, on success or false
, if there was an error while waiting for events. false
is also returned, if the tracking is enabled, but timeout elapsed without an event arriving.