Inherits MonoBehaviour.
Public Types | |
enum | ImageStream { None, CameraImage, DebugImage } |
Public Member Functions | |
bool | AddCameraCalibrationDB (string uri) |
Adds the camera calibration DataBase using the URI. It will not be loaded at this point but only the addability checked. The loading of the actual database happens when starting the tracking pipe! More... | |
delegate void | CalibrationDataAction (VLCameraCalibration result) |
delegate void | ExtrinsicDataAction (VLExtrinsicDataWrapper extrinsicData) |
Delegate for OnExtrinsicData events. More... | |
VLDeviceInfo | GetDeviceInfo () |
Returns the device info, when the worker object has been initialized. You can call this function in order to get useful system information before starting the tracking pipe You might use this structure for retreiving the available cameras in the system. More... | |
string | GetDeviceType () |
Returns the type of the loaded device pipeline. Works for tracking configurations loaded from a vl-file or vl-string. More... | |
VLLicenseInformation | GetLicenseInformation () |
Texture2D | GetStreamTexture (ImageStream streamType) |
bool | GetTrackerInitialized () |
string | GetTrackerType () |
Returns the type of the loaded tracking pipeline. Works for tracking configurations loaded from a vl-file or vl-string. More... | |
bool | GetTrackerType (out string trackerType) |
Returns the type of the loaded tracking pipeline. Works for tracking configurations loaded from a vl-file or vl-string. More... | |
bool | GetTrackingRunning () |
VLWorker | GetWorker () |
Returns the owned VLWorker object. More... | |
delegate void | ImageAction (VLImageWrapper image) |
Delegate for OnImage events. More... | |
delegate void | IntrinsicDataAction (VLIntrinsicDataWrapper intrinsicData) |
Delegate for OnIntrinsicData events. More... | |
void | PauseTracking () |
Pause the tracking. More... | |
delegate void | PerformanceInfoAction (VLPerformanceInfo state) |
Delegate for OnPerformanceInfo events. More... | |
void | ResetTrackingHard () |
Reset the tracking and all keyframes. More... | |
void | ResetTrackingSoft () |
Reset the tracking. More... | |
void | ResumeTracking () |
Resume the tracking. More... | |
bool | RunOnceSync () |
void | RunTrackingOnce () |
Runs the tracking once while the tracking is paused. More... | |
bool | SetCameraCalibrationState (string camCalibState) |
void | SetWaitForEvents (bool wait) |
Set waitForEvents to the given value. More... | |
void | StartTracking (string filename) |
Start the tracking using a vl-file. More... | |
void | StartTrackingFromString (string trackingConfig, string projectDir, string overrideParameter=null) |
Start the tracking using a tracking configuration as string. More... | |
void | StopTracking () |
Stop the tracking (releases all tracking resources). More... | |
delegate void | TrackerInitializedAction (bool success) |
Delegate for OnTrackerInitialized events. More... | |
delegate void | TrackerInitializedWithIssuesAction (VLTrackingIssues errors, VLTrackingIssues warnings) |
Delegate for OnTrackerInitializedWithIssues events. More... | |
delegate void | TrackerInitializingAction () |
Delegate for OnTrackerInitializing events. More... | |
delegate void | TrackerPausedAction (bool success) |
Delegate for OnTrackerPaused events. More... | |
delegate void | TrackerRanOnceAction (bool success) |
Delegate for OnTrackerRanOnce events. More... | |
delegate void | TrackerResetHardAction (bool success) |
Delegate for TrackerResetHardAction events. More... | |
delegate void | TrackerResetSoftAction (bool success) |
Delegate for OnTrackerResetSoft events. More... | |
delegate void | TrackerRunningAction (bool success) |
Delegate for OnTrackerRunning events. More... | |
delegate void | TrackerStoppedAction (bool success) |
Delegate for OnTrackerStopped events. More... | |
VLFrame | TrackFrame (VLFrame frame) |
delegate void | TrackingStatesAction (VLTrackingState state) |
Delegate for OnTrackingStates events. More... | |
bool | WriteCameraCalibration (string uri) |
Static Public Member Functions | |
static void | EmitEvents (VLFrame frame) |
Data Fields | |
string | baseDir |
Directory from which the tracking configuration files will be loaded. More... | |
string | calibrationDataBaseURI |
VLLicenseFile | licenseFile |
Path of the license file relative to StreamingAssets, e.g. VisionLib/license.xml. More... | |
VLUnitySdk.LogLevel | logLevel = VLUnitySdk.LogLevel.Warning |
VisionLib log level. More... | |
bool | synchronousWorker = false |
int | targetFPS = 30 |
Target number of frames per second for the tracking thread. More... | |
bool | waitForEvents = false |
Whether to wait for tracking events. More... | |
Events | |
static CalibrationDataAction | OnCameraCalibrationData |
static ImageAction | OnDebugImage |
Event with the current debug image. This Event will be emitted for each tracking frame, if debugLevel is at least 1 More... | |
static ExtrinsicDataAction | OnExtrinsicData |
Event with the current extrinsic data. This Event will be emitted for each tracking frame. More... | |
static ImageAction | OnImage |
Event with the current tracking image. This Event will be emitted for each tracking frame. More... | |
static IntrinsicDataAction | OnIntrinsicData |
Event with the current intrinsic data. This Event will be emitted for each tracking frame. More... | |
static PerformanceInfoAction | OnPerformanceInfo |
Event with the current tracking performance. This Event will be emitted for each tracking frame. More... | |
static TrackerInitializedAction | OnTrackerInitialized |
Event which will be emitted after the tracking configuration was loaded. More... | |
static TrackerInitializedWithIssuesAction | OnTrackerInitializedWithIssues |
Event which will be emitted after the tracking configuration was loaded. More... | |
static TrackerInitializingAction | OnTrackerInitializing |
Event which will be emitted once after calling the StartTracking function. More... | |
static TrackerPausedAction | OnTrackerPaused |
Event which will be emitted after the tracking was paused. More... | |
static TrackerRanOnceAction | OnTrackerRanOnce |
Event which will be emitted once after the tracking was explicitly ran once. More... | |
static TrackerResetHardAction | OnTrackerResetHard |
Event which will be emitted after a hard reset was executed. More... | |
static TrackerResetSoftAction | OnTrackerResetSoft |
Event which will be emitted after a soft reset was executed. More... | |
static TrackerRunningAction | OnTrackerRunning |
Event which will be emitted once after the tracking was stopped or paused and is now running again. More... | |
static TrackerStoppedAction | OnTrackerStopped |
Event which will be emitted after the tracking was stopped. More... | |
static TrackingStatesAction | OnTrackingStates |
Event with the current tracking state of all tracked objects. This Event will be emitted for each tracking frame. More... | |
|
inline |
Adds the camera calibration DataBase using the URI. It will not be loaded at this point but only the addability checked. The loading of the actual database happens when starting the tracking pipe!
true
, if camera calibration DB was added, false
otherwise.uri | URI pointing to the camera calibration to be merged. |
delegate void VLWorkerBehaviour.ExtrinsicDataAction | ( | VLExtrinsicDataWrapper | extrinsicData | ) |
Delegate for OnExtrinsicData events.
extrinsicData | VLExtrinsicDataWrapper. |
|
inline |
Returns the device info, when the worker object has been initialized. You can call this function in order to get useful system information before starting the tracking pipe You might use this structure for retreiving the available cameras in the system.
|
inline |
Returns the type of the loaded device pipeline. Works for tracking configurations loaded from a vl-file or vl-string.
|
inline |
Returns the type of the loaded tracking pipeline. Works for tracking configurations loaded from a vl-file or vl-string.
|
inline |
Returns the type of the loaded tracking pipeline. Works for tracking configurations loaded from a vl-file or vl-string.
trackerType | loaded tracker type |
|
inline |
delegate void VLWorkerBehaviour.ImageAction | ( | VLImageWrapper | image | ) |
Delegate for OnImage events.
image | VLImageWrapper. |
delegate void VLWorkerBehaviour.IntrinsicDataAction | ( | VLIntrinsicDataWrapper | intrinsicData | ) |
Delegate for OnIntrinsicData events.
intrinsicData | VLIntrinsicDataWrapper. |
|
inline |
Pause the tracking.
delegate void VLWorkerBehaviour.PerformanceInfoAction | ( | VLPerformanceInfo | state | ) |
Delegate for OnPerformanceInfo events.
state | VLPerformanceInfo with information about the performance. |
|
inline |
Reset the tracking and all keyframes.
|
inline |
Reset the tracking.
|
inline |
Resume the tracking.
|
inline |
Runs the tracking once while the tracking is paused.
|
inline |
Set waitForEvents to the given value.
See waitForEvents for further information.
|
inline |
Start the tracking using a vl-file.
The type of the tracker will be derived from the vl-file.
|
inline |
Start the tracking using a tracking configuration as string.
trackingConfig | Tracking configuration as string |
projectDir | Directory |
overrideParameter |
|
inline |
Stop the tracking (releases all tracking resources).
delegate void VLWorkerBehaviour.TrackerInitializedAction | ( | bool | success | ) |
Delegate for OnTrackerInitialized events.
success | true , if the tracking configuration was loaded successfully; false , otherwise. |
delegate void VLWorkerBehaviour.TrackerInitializedWithIssuesAction | ( | VLTrackingIssues | errors, |
VLTrackingIssues | warnings | ||
) |
Delegate for OnTrackerInitializedWithIssues events.
errors | null , if the no warning was emitted VLTrackingIssues , as a list of VLTrackingIssue. |
warnings | null , if the no warning was emitted VLTrackingIssues , as a list of VLTrackingIssue. |
delegate void VLWorkerBehaviour.TrackerInitializingAction | ( | ) |
Delegate for OnTrackerInitializing events.
delegate void VLWorkerBehaviour.TrackerPausedAction | ( | bool | success | ) |
Delegate for OnTrackerPaused events.
success | true , on success; false , otherwise. |
delegate void VLWorkerBehaviour.TrackerRanOnceAction | ( | bool | success | ) |
Delegate for OnTrackerRanOnce events.
success | true , on success; false , otherwise. |
delegate void VLWorkerBehaviour.TrackerResetHardAction | ( | bool | success | ) |
Delegate for TrackerResetHardAction events.
success | true , on success; false , otherwise. |
delegate void VLWorkerBehaviour.TrackerResetSoftAction | ( | bool | success | ) |
Delegate for OnTrackerResetSoft events.
success | true , on success; false , otherwise. |
delegate void VLWorkerBehaviour.TrackerRunningAction | ( | bool | success | ) |
Delegate for OnTrackerRunning events.
success | true , on success; false , otherwise. |
delegate void VLWorkerBehaviour.TrackerStoppedAction | ( | bool | success | ) |
Delegate for OnTrackerStopped events.
success | true , on success; false , otherwise. |
delegate void VLWorkerBehaviour.TrackingStatesAction | ( | VLTrackingState | state | ) |
Delegate for OnTrackingStates events.
state | VLTrackingState with information about the currently tracked objects. |
string VLWorkerBehaviour.baseDir |
Directory from which the tracking configuration files will be loaded.
If this is null or an empty string, then the tracking configuration files will be loaded from the /StreamingAssets/VisionLib/
directory. This has the advantage, that they can be found on all platforms. Otherwise you need to make sure, that the baseDir is accessible for the current platform.
VLLicenseFile VLWorkerBehaviour.licenseFile |
Path of the license file relative to StreamingAssets, e.g. VisionLib/license.xml.
VLUnitySdk.LogLevel VLWorkerBehaviour.logLevel = VLUnitySdk.LogLevel.Warning |
VisionLib log level.
Available log levels:
Log level N will disable all log messages with a level > N.
int VLWorkerBehaviour.targetFPS = 30 |
Target number of frames per second for the tracking thread.
The tracking will run as fast as possible, if the value is zero or less.
Higher values will result in a smoother tracking experience, but the battery will be drained faster.
bool VLWorkerBehaviour.waitForEvents = false |
Whether to wait for tracking events.
If true
, the Update member function will wait until there is at least one tracking event. This will limit the speed of the Unity update cycler to the speed of the tracking, but the tracking will feel more smooth, because the camera image will be shown with less delay.
If false
, the speed of the tracking and the Unity update cycle are largely separate. Due to the out of sync update rates, the camera might be shown with a slight delay.
|
static |
Event with the current debug image. This Event will be emitted for each tracking frame, if debugLevel is at least 1
|
static |
Event with the current extrinsic data. This Event will be emitted for each tracking frame.
|
static |
Event with the current tracking image. This Event will be emitted for each tracking frame.
|
static |
Event with the current intrinsic data. This Event will be emitted for each tracking frame.
|
static |
Event with the current tracking performance. This Event will be emitted for each tracking frame.
|
static |
Event which will be emitted after the tracking configuration was loaded.
|
static |
Event which will be emitted after the tracking configuration was loaded.
|
static |
Event which will be emitted once after calling the StartTracking function.
|
static |
Event which will be emitted after the tracking was paused.
|
static |
Event which will be emitted once after the tracking was explicitly ran once.
|
static |
Event which will be emitted after a hard reset was executed.
|
static |
Event which will be emitted after a soft reset was executed.
|
static |
Event which will be emitted once after the tracking was stopped or paused and is now running again.
|
static |
Event which will be emitted after the tracking was stopped.
|
static |
Event with the current tracking state of all tracked objects. This Event will be emitted for each tracking frame.