Inherits MonoBehaviour.
Public Types | |
enum | ImageStream { ImageStream.None, ImageStream.CameraImage, ImageStream.DebugImage } |
Public Member Functions | |
bool | GetTrackingRunning () |
bool | GetTrackerInitialized () |
delegate void | TrackerInitializingAction () |
Delegate for OnTrackerInitializing events. 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 | TrackerStoppedAction (bool success) |
Delegate for OnTrackerStopped events. More... | |
delegate void | TrackerRunningAction (bool success) |
Delegate for OnTrackerRunning events. More... | |
delegate void | TrackerRanOnceAction (bool success) |
Delegate for OnTrackerRanOnce events. More... | |
delegate void | TrackerPausedAction (bool success) |
Delegate for OnTrackerPaused events. More... | |
delegate void | TrackerResetSoftAction (bool success) |
Delegate for OnTrackerResetSoft events. More... | |
delegate void | TrackerResetHardAction (bool success) |
Delegate for TrackerResetHardAction events. More... | |
delegate void | CalibrationDataAction (VLCameraCalibration result) |
delegate void | TrackingStatesAction (VLTrackingState state) |
Delegate for OnTrackingStates events. More... | |
delegate void | PerformanceInfoAction (VLPerformanceInfo state) |
Delegate for OnPerformanceInfo events. More... | |
delegate void | ImageAction (VLImageWrapper image) |
Delegate for OnImage events. More... | |
delegate void | ExtrinsicDataAction (VLExtrinsicDataWrapper extrinsicData) |
Delegate for OnExtrinsicData events. More... | |
delegate void | IntrinsicDataAction (VLIntrinsicDataWrapper intrinsicData) |
Delegate for OnIntrinsicData events. More... | |
VLWorker | GetWorker () |
Returns the owned VLWorker object. More... | |
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... | |
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... | |
void | PauseTracking () |
Pause the tracking. More... | |
void | ResumeTracking () |
Resume the tracking. More... | |
void | RunTrackingOnce () |
Runs the tracking once while the tracking is paused. More... | |
void | ResetTrackingSoft () |
Reset the tracking. More... | |
void | ResetTrackingHard () |
Reset the tracking and all keyframes. More... | |
void | SetWaitForEvents (bool wait) |
Set waitForEvents to the given value. 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... | |
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 | SetCameraCalibrationState (string camCalibState) |
bool | WriteCameraCalibration (string uri) |
bool | RunOnceSync () |
VLFrame | TrackFrame (VLFrame frame) |
Texture2D | GetStreamTexture (ImageStream streamType) |
Static Public Member Functions | |
static void | EmitEvents (VLFrame frame) |
Data Fields | |
VLLicenseFile | licenseFile |
Path of the license file relative to StreamingAssets, e.g. VisionLib/license.xml. More... | |
string | calibrationDataBaseURI |
bool | synchronousWorker = false |
string | baseDir |
Directory from which the tracking configuration files will be loaded. More... | |
int | targetFPS = 30 |
Target number of frames per second for the tracking thread. More... | |
bool | waitForEvents = false |
Whether to wait for tracking events. More... | |
VLUnitySdk.LogLevel | logLevel = VLUnitySdk.LogLevel.Warning |
VisionLib log level. More... | |
Events | |
static TrackerInitializingAction | OnTrackerInitializing |
Event which will be emitted once after calling the StartTracking function. 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 TrackerStoppedAction | OnTrackerStopped |
Event which will be emitted after the tracking was stopped. More... | |
static TrackerRunningAction | OnTrackerRunning |
Event which will be emitted once after the tracking was stopped or paused and is now running again. More... | |
static TrackerRanOnceAction | OnTrackerRanOnce |
Event which will be emitted once after the tracking was explicitly ran once. More... | |
static TrackerPausedAction | OnTrackerPaused |
Event which will be emitted after the tracking was paused. More... | |
static TrackerResetSoftAction | OnTrackerResetSoft |
Event which will be emitted after a soft reset was executed. More... | |
static TrackerResetHardAction | OnTrackerResetHard |
Event which will be emitted after a hard reset was executed. More... | |
static CalibrationDataAction | OnCameraCalibrationData |
static TrackingStatesAction | OnTrackingStates |
Event with the current tracking state of all tracked objects. 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 ImageAction | OnImage |
Event with the current tracking image. This Event will be emitted for each tracking frame. More... | |
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 IntrinsicDataAction | OnIntrinsicData |
Event with the current intrinsic data. This Event will be emitted for each tracking frame. More... | |
|
strong |
|
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.CalibrationDataAction | ( | VLCameraCalibration | result | ) |
|
inlinestatic |
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 |
|
inline |
|
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 |
|
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 |
|
inline |
Runs the tracking once while the tracking is paused.
|
inline |
|
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. |
|
inline |
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.
string VLWorkerBehaviour.calibrationDataBaseURI |
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.
bool VLWorkerBehaviour.synchronousWorker = false |
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 |
|
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.