documentation

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...
 

Detailed Description

Functions for managing Worker objects.

A Worker object controls the tracking thread.

Function Documentation

◆ vlDelete_Worker()

VL_SDK_API void VL_CALLINGCONVENTION vlDelete_Worker ( vlWorker_t worker)

Deletes a Worker object.

Parameters
workerPointer to a Worker object.

◆ vlNew_SyncWorker()

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.

Returns
Pointer to a synchronous Worker object. Use vlDelete_Worker after usage to avoid memory leaks.

◆ vlNew_Worker()

VL_SDK_API vlWorker_t* VL_CALLINGCONVENTION vlNew_Worker ( )

Creates a Worker object.

Use vlDelete_Worker after usage to avoid memory leaks.

Returns
Pointer to an Worker object. Use vlDelete_Worker after usage to avoid memory leaks.

◆ vlReleaseBinaryBuffer()

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!

Parameters
dataPointer to a binary object.

◆ vlWorker_AddCalibratedImageListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddCalibratedImageListener ( vlWorker_t worker,
vlCallbackCalibratedImageWrapper  listener,
void *  clientData,
vlImageFormat  format 
)

Registers a listener for CalibratedImage events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if an CalibratedImage event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
formatThe image format for which the listener function should receive events.
Returns
true, on success; false otherwise.

◆ vlWorker_AddCameraCalibrationDB()

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.

Parameters
workerPointer to an Worker object.
uriZero terminated string with an URI pointing to the camera calibration database file.
Returns
true, on success; false otherwise.

◆ vlWorker_AddDebugImageListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddDebugImageListener ( vlWorker_t worker,
vlCallbackImageWrapper  listener,
void *  clientData 
)

Register a listener for debug image events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if a debug image event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_AddExtrinsicDataListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddExtrinsicDataListener ( vlWorker_t worker,
vlCallbackExtrinsicDataWrapper  listener,
void *  clientData 
)

Registers a listener for ExtrinsicData events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if an ExtrinsicData event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_AddImageListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddImageListener ( vlWorker_t worker,
vlCallbackImageWrapper  listener,
void *  clientData 
)

Registers a listener for image events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if an image event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_AddIntrinsicDataListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddIntrinsicDataListener ( vlWorker_t worker,
vlCallbackIntrinsicDataWrapper  listener,
void *  clientData 
)

Registers a listener for IntrinsicData events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if an IntrinsicData event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_AddPerformanceInfoListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddPerformanceInfoListener ( vlWorker_t worker,
vlCallbackZString  listener,
void *  clientData 
)

Registers a listener for performance information events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if a performance information event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_AddTrackingStateListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddTrackingStateListener ( vlWorker_t worker,
vlCallbackZString  listener,
void *  clientData 
)

Registers a listener for tracking state events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if a tracking state event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_AddWorldFromAnchorTransformListener()

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.

Parameters
workerPointer to a Worker object.
anchorNameName of the anchor to be addressed.
listenerListener function which will be notified during the event processing, if an event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_AddWorldFromCameraTransformListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_AddWorldFromCameraTransformListener ( vlWorker_t worker,
vlCallbackExtrinsicDataWrapper  listener,
void *  clientData 
)

Registers a listener for world from camera transform events.

Parameters
workerPointer to a Worker object.
listenerListener function which will be notified during the event processing, if an world from camera transform event occurred.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_ClearListeners()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_ClearListeners ( vlWorker_t worker)

Removes all listeners.

Parameters
workerPointer to a Worker object.
Returns
true, on success; false otherwise.

◆ vlWorker_GetDeviceInfo()

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:

{
"appID": "com.unity3d.UnityEditor5.x",
"availableCameras": [{
"cameraName": "HD Webcam C525",
"deviceID": "HDWebcamC525",
"internalID": "0x400000046d0826",
"position": "unknown",
"prefRes": "640x480"
}],
"cameraAllowed": false,
"currentDisplayOrientation": 0,
"hasWebServer": false,
"internalModelID": "x86_64",
"manufacture": "Apple",
"model": "Mac",
"modelVersion": "Mac",
"nativeResX": 242,
"nativeResY": 0,
"numberOfProcessors": 1,
"os": "macOS",
"unifiedID": "1467016391MY190",
"usingEventLogger": false,
"webServerURL": ""
}
Parameters
workerPointer to an vlWorker object.
Returns
A char* containing the current device information which MUST be freed using vlReleaseBinaryBuffer().

◆ vlWorker_GetImageByNameSync()

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.

Parameters
workerPointer to a Worker object.
image_namename of the image to get
Returns
A pointer to an ImageWrapper object, on success; NULL otherwise.

◆ vlWorker_GetImageSync()

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.

Parameters
workerPointer to a Worker object.
Returns
A pointer to an ImageWrapper object, on success; NULL otherwise.

◆ vlWorker_GetLicenseInformation()

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.

Parameters
workerPointer to a Worker object.
Returns
A char* containing the current license information which MUST be freed using vlReleaseBinaryBuffer().

◆ vlWorker_GetNodeExtrinsicDataSync()

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.

Parameters
workerPointer to a Worker object.
nodeThe name of the node.
keyThe name of the exposed ExtrinsicData.
Returns
A pointer to an ExtrinsicDataWrapper object, on success; NULL otherwise.

◆ vlWorker_GetNodeImageSync()

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.

Parameters
workerPointer to a Worker object.
nodename of the node
keyName of the exposed image
Returns
A pointer to an ImageWrapper object, on success; NULL otherwise.

◆ vlWorker_GetNodeIntrinsicDataSync()

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.

Parameters
workerPointer to a Worker object.
nodeThe name of the node.
keyThe name of the exposed IntrinsicData.
Returns
A pointer to an IntrinsicData object, on success; NULL otherwise.

◆ vlWorker_GetNodeSimilarityTransformSync()

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.

Parameters
workerPointer to a Worker object.
nodeThe name of the node.
keyThe name of the exposed SimilarityTransform.
Returns
A pointer to a SimilarityTransformWrapper object, on success; NULL otherwise.

◆ vlWorker_IsRunning()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_IsRunning ( vlWorker_t worker)

Returns whether the thread is currently running or not.

Parameters
workerPointer to a Worker object.
Returns
true, if the thread is running; false otherwise.

◆ vlWorker_LoadPlugin()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_LoadPlugin ( vlWorker_t worker,
const char  pluginName[] 
)

Loads the plugin with the given name.

Parameters
workerPointer to a Worker object.
pluginNameZero terminated string with the name of the plugin without prefix ("VP") and fileending (".dll", ".so") e.g. "VideoUEye".
Returns
true, if plugin has been loaded successfully; false otherwise.

◆ vlWorker_PollEvents()

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.

Parameters
workerPointer to a Worker object.
Returns
true, on success; false otherwise.

◆ vlWorker_ProcessCallbacks()

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.

Parameters
workerPointer to a Worker object.
Returns
true, on success; false otherwise.

◆ vlWorker_ProcessJsonAndBinaryCommandSync()

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!

Parameters
workerPointer to a Worker object.
jsonStringCommand as zero terminated JSON string.
dataBinary data pointer. The lifetime of the memory should be maintaned until the answer has been received. (might be 0)
sizeThe size of the content passed.
callbackCallback function, which will be called synchronously
clientDataThe callback function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, if the command is supported; false, otherwise.

◆ vlWorker_ProcessJsonCommandSync()

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).

Parameters
workerPointer to a Worker object.
jsonStringCommand as zero terminated JSON string.
callbackCallback function, which will be called after the command was processed.
clientDataThe callback function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, if the command is supported; false, otherwise.

◆ vlWorker_PushJsonAndBinaryCommand()

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.1.0/tracker-commands.html

Parameters
workerPointer to a Worker object.
jsonStringCommand as zero terminated JSON string.
dataBinary data pointer. The lifetime of the memory should be maintaned until the answer has been received. (might be 0)
sizeThe size of the content passed.
callbackCallback function, which will be called inside vlWorker_ProcessCallbacks after the command was processed.
clientDataThe callback function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, if the command was enqueue successfully; false otherwise.

◆ vlWorker_PushJsonCommand()

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.1.0/tracker-commands.html

Parameters
workerPointer to a Worker object.
jsonStringCommand as zero terminated JSON string.
callbackCallback function, which will be called inside vlWorker_ProcessCallbacks after the command was processed.
clientDataThe callback function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, if the command was enqueue successfully; false otherwise.

◆ vlWorker_RemoveCalibratedImageListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveCalibratedImageListener ( vlWorker_t worker,
vlCallbackCalibratedImageWrapper  listener,
void *  clientData,
vlImageFormat  format 
)

Unregisters a listener from CalibratedImage events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
formatThe image format for which the listener function has been registered.
Returns
true, on success; false otherwise.

◆ vlWorker_RemoveDebugImageListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveDebugImageListener ( vlWorker_t worker,
vlCallbackImageWrapper  listener,
void *  clientData 
)

Unregisters a listener from debug image events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
Returns
true, on success; false otherwise.

◆ vlWorker_RemoveExtrinsicDataListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveExtrinsicDataListener ( vlWorker_t worker,
vlCallbackExtrinsicDataWrapper  listener,
void *  clientData 
)

Unregisters a listener from ExtrinsicData events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
Returns
true, on success; false otherwise.

◆ vlWorker_RemoveImageListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveImageListener ( vlWorker_t worker,
vlCallbackImageWrapper  listener,
void *  clientData 
)

Unregisters a listener from image events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
Returns
true, on success; false otherwise.

◆ vlWorker_RemoveIntrinsicDataListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveIntrinsicDataListener ( vlWorker_t worker,
vlCallbackIntrinsicDataWrapper  listener,
void *  clientData 
)

Unregisters a listener from IntrinsicData events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
Returns
true, on success; false otherwise.

◆ vlWorker_RemovePerformanceInfoListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemovePerformanceInfoListener ( vlWorker_t worker,
vlCallbackZString  listener,
void *  clientData 
)

Unregisters a listener from performance info events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
Returns
true, on success; false otherwise.

◆ vlWorker_RemoveTrackingStateListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveTrackingStateListener ( vlWorker_t worker,
vlCallbackZString  listener,
void *  clientData 
)

Unregisters a listener from tracking state events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
Returns
true, on success; false otherwise.

◆ vlWorker_RemoveWorldFromAnchorTransformListener()

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.

Parameters
workerPointer to a Worker object.
anchorNameName of the anchor to be addressed.
listenerListener function which should be unregistered.
clientDataThe listener function will be called with the given pointer value as parameter. This can be used to invoke a member function.
Returns
true, on success; false otherwise.

◆ vlWorker_RemoveWorldFromCameraTransformListener()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_RemoveWorldFromCameraTransformListener ( vlWorker_t worker,
vlCallbackExtrinsicDataWrapper  listener,
void *  clientData 
)

Unregisters a listener from world from camera transform events.

Parameters
workerPointer to a Worker object.
listenerListener function which should be unregistered.
clientDataPointer value used as parameter during the registration of the listener.
Returns
true, on success; false otherwise.

◆ vlWorker_ResetCameraCalibrationDB()

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.

Parameters
workerPointer to an Worker object.
Returns
true, on success; false otherwise.

◆ vlWorker_RunOnceSync()

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.

Parameters
workerPointer to a Worker object.
Returns
true, on success; false, otherwise.

◆ vlWorker_SetLicenseFileData()

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.

Parameters
workerPointer to a Worker object.
licenseFileDataZero terminated string with the license data.
Returns
true, on success; false otherwise.

◆ vlWorker_SetLicenseFilePath()

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.

Parameters
workerPointer to a Worker object.
licenseFilePathZero terminated string with a path to the license file.
Returns
true, on success; false otherwise.

◆ vlWorker_SetNodeExtrinsicDataSync()

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.

Parameters
workerPointer to a Worker object.
extrinsicDataPointer to an ExtrinsicData object.
nodeThe name of the node.
keyThe name of the ExtrinsicData to set.
Returns
true, on success; false, otherwise.

◆ vlWorker_SetNodeImageSync()

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.

Parameters
workerPointer to a Worker object.
imagePointer to an Image object
nodename of the node
keyName of the image to set
Returns
true, on success; false, otherwise.

◆ vlWorker_SetNodeIntrinsicDataSync()

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.

Parameters
workerPointer to a Worker object.
intrinsicDataPointer to an IntrinsicData object
nodeThe name of the node.
keyThe name of the IntrinsicData to set.
Returns
true, on success; false, otherwise.

◆ vlWorker_SetNodeSimilarityTransformSync()

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.

Parameters
workerPointer to a Worker object.
similarityTransformPointer to a SimilarityTransform object.
nodeThe name of the node.
keyThe name of the SimilarityTransform to set.
Returns
true, on success; false, otherwise.

◆ vlWorker_Start()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_Start ( vlWorker_t worker)

Starts the tracking thread.

Parameters
workerPointer to a Worker object.
Returns
true, on success; false otherwise.

◆ vlWorker_Stop()

VL_SDK_API bool VL_CALLINGCONVENTION vlWorker_Stop ( vlWorker_t worker)

Stops the tracking thread.

Parameters
workerPointer to a Worker object.
Returns
true, on success; false otherwise.

◆ vlWorker_WaitEvents()

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.

Parameters
workerPointer to a Worker object.
timeoutNumber 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.
Returns
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.