Loading...
Searching...
No Matches
PSTech.Pstsdk.Tracker Class Reference

Main PST SDK class implementing tracker communication. More...

Inheritance diagram for PSTech.Pstsdk.Tracker:
[legend]
Collaboration diagram for PSTech.Pstsdk.Tracker:
[legend]

## Public Member Functions
| Tracker ()
| Tracker constructor.
| Tracker (string path)
| Tracker constructor.
| Tracker (string path, string configFile)
| Tracker constructor.
| Tracker (string path, string configFile, string dbFile)
| Tracker constructor.
| Tracker (string path, string configFile, string dbFile, string grabberName)
| Tracker constructor.
void | LoadCalibrationFromLocalPath (string path)
| Load calibration information from a given path.
string[] | GetConnectedCameraUrls (bool silent=false)
| Get URLs of the calibration information for the connected PST Tracker.
string[] | GetUncalibratedCameraUrls (bool silent=false)
| Check if cameras of the connected PST Tracker are calibrated.
string | GetVersionInfo ()
| Get version information of the SDK.
string | GetConfigPath ()
| Get the path to the current configuration directory.
TrackerData | GetSingleMeasurement ()
| Retrieve latest available data from the connected PST Tracker.
void | AddTrackerListener (TrackerListener listener)
| Add a listener for tracker data and/or mode change reporting.
void | RemoveTrackerListener (TrackerListener listener)
| Remove a listener for tracker data and/or mode change reporting.
void | StartTracker ()
| Start tracking.
void | PauseTracker ()
| Pause tracking.
StatusMessage | Systemcheck ()
| Check if the tracker is running correctly.
void | SetFramerate (double fps)
| Set tracker frame rate.
double | GetFramerate ()
| Get current frame rate.
float[] | GetSupportedFramerates ()
| Get array of available frame rates.
void | SetExposure (double exposure)
| Set the exposure time.
double | GetExposure ()
| Get the current exposure time.
void | GetExposureRange (ref double min, ref double max)
| Get the allowed exposure range.
void | EnableFiltering ()
| Enable filtering of the tracking results.
void | DisableFiltering ()
| Disable filtering of the tracking results.
void | SetPositionFilter (double value)
| Set the strength of the position filter.
void | SetOrientationFilter (double value)
| Set the strength of the orientation filter.
void | EnableTremorFilter ()
| Enable the tremor filter.
void | DisableTremorFilter ()
| Disable the tremor filter.
void | EnableImageTransfer ()
| Enable image transfer from the PST Tracker.
void | DisableImageTransfer ()
| Disable image transfer from the PST Tracker.
Image | GetImage ()
| Retrieve images from the connected PST Tracker.
TargetStatus[] | GetTargetList ()
| Get TargetStatuses object containing all tracking targets and their status.
Target | GetTargetInfo (string targetName)
| Get basic tracking target information.
void | SetTargetStatus (string targetName, bool active)
| Set status of a single tracking Target.
bool | GetTargetStatus (string targetName)
| Get status of a single tracking Target.
TargetMarker[] | GetTargetMarkers (string targetName)
| Get 3D marker positions of stored tracking Target.
void | SetTargetId (string targetName, int id)
| Set the id of the tracking target.
void | SetReference (float[] creference, bool relative=false)
| Set the reference system in which tracking results are reported.
void | SetDefaultReference ()
| Reset the reference system to the default reference system.
float[] | GetReference ()
| Gets the transformation matrix for the current reference system.
CameraInfo[] | GetConnectedCameraInfo (bool silent=true)
| Retrieve camera information for connected PST Trackers.
void | Dispose ()
| Dispose method.
void | ImportJSONModel (string jsonModel)
| Import a tracking target model into the target model database.
string | ExportJSONModel (string modelName)
| Export a tracking target model as a JSON-formatted string.
void | RemoveTargetModel (string modelName)
| Remove a tracking target model from the target model database.
void | SetMarkerDetectionRegion (TrackingRegion detectionRegion)
| Sets the region of the tracking working space where markers are reported.
TrackingRegion | GetMarkerDetectionRegion ()
| Gets the region of the tracking working space where markers are reported.
bool | SupportsDetectionRegionPruning ()
| Check if the connected PST tracker supports pruning markers by tracking region.

## Static Public Member Functions
static void | Shutdown ()
| Shutdown the tracking system, stopping tracking.
static void | EnableSharedMemory ()
| Enable shared memory communication layer.
static void | DisableSharedMemory ()
| Disable shared memory communication layer.
static void | EnableRestServer (string serverAddress="localhost", string serverPort="7278", int eventStreamRetryTimeout=3000)
| Enable a REST Server using the HTTP protocol on a local area network.
static void | DisableRestServer ()
| Disable the REST server communication layer.
static void | EnableLogging ()
| Write plug-in status information to the standard error stream.
static string | GetSDKVersion ()
| Retrieve the SDK version string.

## Detailed Description

This class implements the main PST SDK functionality. Examples on how to use this class and how to get data from the PST Tracker can be found in the Examples section. Since the Tracker uses unmanaged resources, instances must always be disposed deterministically, either by:

- Using a C# `using` statement, or
- Using a `try/finally` block and calling Dispose in the finally section.

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, minimal/minimal.cs, reference/reference.cs, restserver/restserver.cs, sharedmemory/sharedmemory.cs, and trackingtarget/trackingtarget.cs.

## Constructor & Destructor Documentation

## ◆ Tracker() [1/5]

PSTech.Pstsdk.Tracker.Tracker | ( |  | ) |
| inline

Construct Tracker object using default values and initialize connected PST tracker.Camera calibration information is checked during initialization. When calibration files for the connected tracker can not be found, a message with download links will be printed to the command line.

See also
  GetUncalibratedCameraUrls

Exceptions

  TrackerException | General Tracker error.
  NotInitializedException | Tracker was not initialized correctly.

## ◆ Tracker() [2/5]

PSTech.Pstsdk.Tracker.Tracker | ( | string | path | ) |
| inline

Construct Tracker object setting the configuration path and initialize connected PST tracker.Camera calibration information is checked during initialization. When calibration files for the connected tracker can not be found, a message with download links will be printed to the command line.

Parameters

  path | Path to the configuration directory to be used for storing camera calibrations, target database and configuration files.Use "" for default. (default: "%PROGRAMDATA%\PS-Tech\PST Iris")

See also
  GetUncalibratedCameraUrls

Exceptions

  TrackerException | General Tracker error.
  NotInitializedException | Tracker was not initialized correctly.

## ◆ Tracker() [3/5]

PSTech.Pstsdk.Tracker.Tracker | ( | string | path,
|  | string | configFile )
| inline

Construct Tracker object using a config path and config file name and initialize connected PST tracker.Camera calibration information is checked during initialization. When calibration files for the connected tracker can not be found, a message with download links will be printed to the command line.

Parameters

  path | Path to the configuration directory to be used for storing camera calibrations, target database and configuration files.Use "" for default. (default: "%PROGRAMDATA%\PS-Tech\PST Iris")
  configFile | Name of the server configuration file.Use "" for default. (default: "server.cfg").>

See also
  GetUncalibratedCameraUrls

Exceptions

  TrackerException | General Tracker error.
  NotInitializedException | Tracker was not initialized correctly.

## ◆ Tracker() [4/5]

PSTech.Pstsdk.Tracker.Tracker | ( | string | path,
|  | string | configFile,
|  | string | dbFile )
| inline

Construct Tracker object using a config path, config file name and models database path and initialize connected PST tracker.Camera calibration information is checked during initialization. When calibration files for the connected tracker can not be found, a message with download links will be printed to the command line.

Parameters

  path | Path to the configuration directory to be used for storing camera calibrations, target database and configuration files.Use "" for default. (default: "%PROGRAMDATA%\PS-Tech\PST Iris")
  configFile | Name of the server configuration file.Use "" for default. (default: "server.cfg").>
  dbFile | Name of the tracking target database file.Use "" for default. (default: "models.db").

See also
  GetUncalibratedCameraUrls

Exceptions

  TrackerException | General Tracker error.
  NotInitializedException | Tracker was not initialized correctly.

## ◆ Tracker() [5/5]

PSTech.Pstsdk.Tracker.Tracker | ( | string | path,
|  | string | configFile,
|  | string | dbFile,
|  | string | grabberName )
| inline

Construct Tracker object using a config path, config file name, models database path and grabber file name and initialize connected PST tracker.Camera calibration information is checked during initialization. When calibration files for the connected tracker can not be found, a message with download links will be printed to the command line.

Parameters

  path | Path to the configuration directory to be used for storing camera calibrations, target database and configuration files.Use "" for default. (default: "%PROGRAMDATA%\PS-Tech\PST Iris")
  configFile | Name of the server configuration file.Use "" for default. (default: "server.cfg").>
  dbFile | Name of the tracking target database file.Use "" for default. (default: "models.db").
  grabberName | Name of the grabber plugin to be used.Can contain absolute or relative path to xml config file.Set to "default" to use auto-detect. (default: "default")

See also
  GetUncalibratedCameraUrls

Exceptions

  TrackerException | General Tracker error.
  NotInitializedException | Tracker was not initialized correctly.

## Member Function Documentation

## ◆ AddTrackerListener()

void PSTech.Pstsdk.Tracker.AddTrackerListener | ( | TrackerListener | listener | ) |
| inline

Register a TrackerListener object to receive tracking information and/or mode changes reported from the connected PST Tracker. Registered listeners remain active until removed via RemoveTrackerListener or until the Tracker is disposed. Calling Dispose() ensures all listeners are cleaned up automatically. Leaving listeners registered after they become obsolete may slow or block other listeners and interfere with tracking.

Parameters

  listener | TrackerListener object capable of reporting new tracker data and/or a change in the tracker mode.

See also
  TrackerListener, RemoveTrackerListener, TrackerData, ETrackerMode

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, minimal/minimal.cs, reference/reference.cs, and trackingtarget/trackingtarget.cs.

## ◆ DisableFiltering()

void PSTech.Pstsdk.Tracker.DisableFiltering | ( |  | ) |
| inline

Switch off filtering of the tracking results using the double exponential-based prediction filter (DESP).

See also
  EnableFiltering, DisableTremorFilter

## ◆ DisableImageTransfer()

void PSTech.Pstsdk.Tracker.DisableImageTransfer | ( |  | ) |
| inline

Disable transferring grayscale image data from the PST Tracker. When using a standard PST Iris or PST Base tracker, the frame rate of the tracker will be restored to the frame rate that was set before enabling image transfer.

See also
  EnableImageTransfer

## ◆ DisableRestServer()

void PSTech.Pstsdk.Tracker.DisableRestServer | ( |  | ) |
| inline static

Disable the REST server communication layer. If a REST server is running, the connections will be closed and the REST server will be destroyed. If no REST server is running a call to DisableRestServer() does nothing.

See also
  EnableRestServer

Examples
  restserver/restserver.cs.

## ◆ DisableSharedMemory()

void PSTech.Pstsdk.Tracker.DisableSharedMemory | ( |  | ) |
| inline static

Disable the shared memory-based communication layer. The PST-Client application will no longer be able to connect to the PST Tracker.

See also
  EnableSharedMemory

Examples
  sharedmemory/sharedmemory.cs.

## ◆ DisableTremorFilter()

void PSTech.Pstsdk.Tracker.DisableTremorFilter | ( |  | ) |
| inline

Disables the tremor filter. The tremor filter will no longer be used to filter the estimated target pose.

See also
  EnableTremorFilter, DisableFiltering

## ◆ Dispose()

void PSTech.Pstsdk.Tracker.Dispose | ( |  | ) |
| inline

This function should always be called before terminating an application using the PST Tracker. Calling Dispose ensures that:

- All registered listeners are removed automatically.
- Native tracker resources are freed safely.

## ◆ EnableFiltering()

void PSTech.Pstsdk.Tracker.EnableFiltering | ( |  | ) |
| inline

Switch on filtering of the tracker results using a double exponential-based prediction filter(DESP). This will result in smoother tracking with less noise.It can have a small impact on tracker accuracy.

Note
  When the shared memory communication pipeline is used to connect the PST-Client application to the SDK, filtering will be disabled upon starting the PST-Client application.To prevent multiple filter passes, filtering should not be re-enabled until the PST-Client application is closed.

See also
  DisableFiltering, SetPositionFilter, SetOrientationFilter, EnableTremorFilter, EnableSharedMemory

## ◆ EnableImageTransfer()

void PSTech.Pstsdk.Tracker.EnableImageTransfer | ( |  | ) |
| inline

Enable transferring grayscale image data from the PST Tracker. After enabling image transfer, call GetImage() in order to receive the captured images. When no calls are made to GetImage() for more than 4 seconds, image transfer will be automatically disabled. Note that for the standard PST Iris and standard PST Base trackers, enabling image transfer will result in a reduced framerate of 30 fps. The frame rate will be restored to the original setting after image transfer is disabled.

See also
  GetImage, DisableImageTransfer

Examples
  images/images.cs.

## ◆ EnableLogging()

void PSTech.Pstsdk.Tracker.EnableLogging | ( |  | ) |
| inline static

Provides information about the status of the tracker plug-in. Information is written to the standard error stream. Useful when debugging.

Note
  This should be called before creating any Tracker objects. Calling this afterwards will have no effect.

## ◆ EnableRestServer()

void PSTech.Pstsdk.Tracker.EnableRestServer | ( | string | serverAddress = "localhost",
|  | string | serverPort = "7278",
|  | int | eventStreamRetryTimeout = 3000 )
| inline static

Enable a REST Server that uses the HTTP protocol to enable access to the PST Tracker over a local area network. Parameters from the tracker can be accessed using GET requests. Tracking results and image can be streamed using an Event-stream based communication pipeline. The state of the tracker and parameters can be set through POST calls. If a REST server is aleady running, calling EnableRestServer() will terminate the current server and restart it with the new parameters. More information on how to use the REST server can be found in the REST documentation.

Parameters

  serverAddress | The IP address on which the REST server should be accessible.
  serverPort | The port number on which the REST server should be accessible.
  eventStreamRetryTimeout | Timeout in milliseconds before an eventstream attempt to reconnect to the server automatically.

See also
  DisableRestServer

Exceptions

  HttpException | The REST server failed to initialize properly. A possible cause could be an invalid IP address or port number.
  NotInitializedException | A Tracker object must have been initialized before enabling the REST server.

Examples
  restserver/restserver.cs.

## ◆ EnableSharedMemory()

void PSTech.Pstsdk.Tracker.EnableSharedMemory | ( |  | ) |
| inline static

Enable a shared memory-based communication layer. Enabling shared memory will allow the PST-Client application to connect to the SDK. This will allow receiving tracking data and setting parameters using the PST-Client application. Note that a PST-Client that is connected in this way will not be updated when settings are changed through the SDK. This could cause instabilities in the PST software.It is recommended to only use this function when setting up a PST Tracker (e.g.adding tracking targets or retrieving calibration data). When using a tracker in normal operation, it is recommended to choose to use either the PST-Client application or the SDK and not mix usage.

Note
  When using shared memory on Windows the application needs to have elevated access(run as Administrator). When running without elevated access the PST-Client will not be able to connect.
  When the shared memory communication pipeline is used to connect the PST-Client application to the SDK, filtering will be disabled upon starting the PST-Client application.To prevent multiple filter passes, filtering should not be re-enabled until the PST-Client application is closed.
  A Tracker object must have been initialized before enabling shared memory.

Exceptions

  NotInitializedException | A Tracker object must have been initialized before enabling shared memory.

See also
  DisableSharedMemory, EnableFiltering, EnableTremorFilter

Examples
  sharedmemory/sharedmemory.cs.

## ◆ EnableTremorFilter()

void PSTech.Pstsdk.Tracker.EnableTremorFilter | ( |  | ) |
| inline

Enables the tremor filter. This filter greatly reduces the noise levels of the estimated target pose. However, using the filter introduces latency to the tracking results received and lowers tracking accuracy.This filter is mainly useful when using the PST Tracker in an interaction-type setting. When the PST Tracker is used for measurement purposes, enabling the tremor filter is not recommended.

Note
  When the shared memory communication pipeline is used to connect the PST-Client application to the SDK, filtering will be disabled upon starting the PST-Client application.To prevent multiple filter passes, filtering should not be re-enabled until the PST-Client application is closed.

See also
  DisableTremorFilter, EnableFiltering

## ◆ ExportJSONModel()

string PSTech.Pstsdk.Tracker.ExportJSONModel | ( | string | modelName | ) |
| inline

Export a tracking target model from the target model database as a JSON-formatted string. The string will be formatted according to the specification found in Appendix A of the PST Manual.

Parameters

  modelName | The name of the target model to be exported.

Returns
  A JSON-formatted string representing the requested tracking target model.

Exceptions

  NotFoundException | The requested model was not found in the database.

See also
  Tracker.ImportJSONModel

## ◆ GetConfigPath()

string PSTech.Pstsdk.Tracker.GetConfigPath | ( |  | ) |
| inline

Retrieves the full path to the configuration directory currently being used by the PST Tracker. The default path is "%PROGRAMDATA%\PS-Tech\PST Iris". The configuration directory contains the target model database, server configuration, reference file and tracker calibration information.

Returns
  The full path to the configuration directory.

Exceptions

  OutOfMemoryException | Failed to allocate memory.

## ◆ GetConnectedCameraInfo()

CameraInfo[] PSTech.Pstsdk.Tracker.GetConnectedCameraInfo | ( | bool | silent = true | ) |
| inline

This function returns a array containing a CameraInfo entry for each camera in the connected PST Trackers. Each entry provides the unique camera identifier and calibration verification details. For detailed information about the fields and verification process, refer to the documentation of CameraInfo.

Returns
  Array of CameraInfo elements containing one CameraInfo entry per connected camera.

See also
  CameraInfo

Exceptions

  OutOfMemoryException | Failed to allocate memory.

## ◆ GetConnectedCameraUrls()

string[] PSTech.Pstsdk.Tracker.GetConnectedCameraUrls | ( | bool | silent = false | ) |
| inline

Note
  This function is deprecated and will be removed in a future release. Use GetConnectedCameraInfo() instead.

Returns and prints the URLs to download the calibration information for the cameras in the connected PST Tracker.

Parameters

  silent | Set to true in order to disable printing of calibration information. (default: false)

Returns
  Array of URLs specifying the download location of calibration information for connected cameras. The size of the vector is the number of connected cameras.

See also
  GetConnectedCameraInfo

Exceptions

  OutOfMemoryException | Failed to allocate memory.

## ◆ GetExposure()

double PSTech.Pstsdk.Tracker.GetExposure | ( |  | ) |
| inline

Get the current exposure time as set on the PST Tracker.

Returns
  The current exposure time in seconds.

See also
  SetExposure

Examples
  exposure/exposure.cs.

## ◆ GetExposureRange()

void PSTech.Pstsdk.Tracker.GetExposureRange | ( | ref double | min,
|  | ref double | max )
| inline

Get the minimum and maximum exposure value that can be set with the current frame rate. The maximum exposure value differs for different frame rates and PST Trackers. In general, lower frame rates allow for higher exposures and higher frame rates have a lower maximum exposure value. After changing the frame rate it is advised to check the currently allowed range before changing exposure values.

Parameters

  min | The minimum exposure value that can be set.
  max | The maximum exposure value that can be set.

See also
  SetExposure, GetExposure, SetFramerate

Examples
  exposure/exposure.cs.

## ◆ GetFramerate()

double PSTech.Pstsdk.Tracker.GetFramerate | ( |  | ) |
| inline

Get the current frame rate as set on the PST Tracker.

Returns
  Current frame rate in frames per second (fps).

See also
  SetFramerate, GetSupportedFramerates

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, and reference/reference.cs.

## ◆ GetImage()

Image PSTech.Pstsdk.Tracker.GetImage | ( |  | ) |
| inline

Retrieve images from the PST Tracker when image transfer has been enabled. When image transfer has not been enabled by calling EnableImageTransfer() before calling this method, Image.image will be an empty vector. Note that image transfer will be automatically disabled when no call to this method is made for 4 seconds.

Returns
  Image object containing the image information retrieved from the PST Tracker.

See also
  Image, EnableImageTransfer

Exceptions

  OutOfMemoryException | Failed to allocate memory.
  ImageRetrievalException | Image retrieval failed.

Examples
  images/images.cs.

## ◆ GetMarkerDetectionRegion()

TrackingRegion PSTech.Pstsdk.Tracker.GetMarkerDetectionRegion | ( |  | ) |
| inline

Gets the region of the tracking working space in which detected markers are currently being reported. Markers can either be in the high-precision TrackingRegion.Optimal region or in the TrackingRegion.Full region where accuracy is not guaranteed.

Returns
  The current detection region used while tracking.

Exceptions

  OutOfRangeException | Internal error.

See also
  TrackingRegion, SetMarkerDetectionRegion

## ◆ GetReference()

float[] PSTech.Pstsdk.Tracker.GetReference | ( |  | ) |
| inline

Tracking results are reported relative to a predefined right-handed Cartesian coordinate system, called the reference system. The default reference system is located at 1 meter from the PST Tracker.It is oriented such that the Z-axis points away from the PST tracker and the X-axis is parallel to the PST tracker.The transformation matrix defining the reference system is a row-major 4x4 homogeneous transformation matrix.

Returns
  The transformation matrix for the current reference system.

See also
  SetReference, SetDefaultReference

Examples
  reference/reference.cs.

## ◆ GetSDKVersion()

string PSTech.Pstsdk.Tracker.GetSDKVersion | ( |  | ) |
| inline static

Retrieves the SDK version information as a string. The SDK version can differ from the internal tracker version which can be retrieved using GetVersionInfo.

Returns
  Returns version.

See also
  GetVersionInfo

## ◆ GetSingleMeasurement()

TrackerData PSTech.Pstsdk.Tracker.GetSingleMeasurement | ( |  | ) |
| inline

Retrieve the latest TrackerData available from the connected PST Tracker. If this function is called before the tracking system is started with StartTracker(), the resulting TrackerData object will be empty.

Returns
  The latest trackerdata available retrieved from the PST Tracker.

See also
  TrackerData, StartTracker, TrackerListener

Exceptions

  OutOfMemoryException | Failed to allocate memory.

## ◆ GetSupportedFramerates()

float[] PSTech.Pstsdk.Tracker.GetSupportedFramerates | ( |  | ) |
| inline

Get a vector containing all frame rates that are available for the currently connected PST Tracker. The range of available frame rates differs for different types of PST Trackers. When using SetFramerate() to set a new frame rate, the frame rate of the PST Tracker will be set to the value provided by this function nearest to the value supplied to SetFramerate().

Returns
  A array of available frame rates.

See also
  SetFramerate, GetFramerate

Exceptions

  OutOfMemoryException | Failed to allocate memory.

## ◆ GetTargetInfo()

Target PSTech.Pstsdk.Tracker.GetTargetInfo | ( | string | targetName | ) |
| inline

Retrieves the name, uuid and id for the requested tracking target.

Parameters

  targetName | The name of the tracking target.

Returns
  Target object containing the basic target information.

See also
  Target

Exceptions

  NotFoundException | The requested data could not be found.

## ◆ GetTargetList()

TargetStatus[] PSTech.Pstsdk.Tracker.GetTargetList | ( |  | ) |
| inline

Retrieves the list of all tracking targets defined in the tracking target database and returns them as a array of TargetStatus objects.

Returns
  Array of TargetStatus elements containing the information and status of all available tracking Targets.

See also
  TargetStatus, SetTargetStatus, GetTargetStatus

Exceptions

  OutOfMemoryException | Failed to allocate memory.

Examples
  trackingtarget/trackingtarget.cs.

## ◆ GetTargetMarkers()

TargetMarker[] PSTech.Pstsdk.Tracker.GetTargetMarkers | ( | string | targetName | ) |
| inline

Gets a list of the 3D positions of the markers making up the specified tracking Target. The returned positions are relative to the tracking Target origin.

Parameters

  targetName | Name of the tracking Target to get the marker positions of.

Returns
  Array of TargetMarker elements containing 3D marker positions.

See also
  TargetMarker, Target

Exceptions

  OutOfMemoryException | Failed to allocate memory.
  NotFoundException | The requested data could not be found.

Examples
  trackingtarget/trackingtarget.cs.

## ◆ GetTargetStatus()

bool PSTech.Pstsdk.Tracker.GetTargetStatus | ( | string | targetName | ) |
| inline

Retrieves the status of a single tracking Target. Tracking targets can be either active (true) or inactive (false).

Parameters

  targetName | The name of the tracking Target to get the status of.

Returns
  Status of the tracking Target.

Exceptions

  NotFoundException | The requested data could not be found.

## ◆ GetUncalibratedCameraUrls()

string[] PSTech.Pstsdk.Tracker.GetUncalibratedCameraUrls | ( | bool | silent = false | ) |
| inline

Check for calibration information of the cameras of the connected PST Tracker. When not all calibration information can be retrieved, download urls for the uncalibrated cameras will be returned. Furthermore, a message will be shown at the command line specifying which files are missing and where they can be downloaded.

Parameters

  silent | Set to true in order to disable printing of missing calibration information. (default: false)

Returns
  Array of URLs specifying the download location of calibration information for uncalibrated cameras. The size of the vector is the number of uncalibrated cameras.

Exceptions

  OutOfMemoryException | Failed to allocate memory.

Examples
  listener/listener.cs.

## ◆ GetVersionInfo()

string PSTech.Pstsdk.Tracker.GetVersionInfo | ( |  | ) |
| inline

Retrieves version information of the PST Server used by the SDK.

Returns
  The version number of the PST Server.

Exceptions

  OutOfMemoryException | Failed to allocate memory.

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, reference/reference.cs, and trackingtarget/trackingtarget.cs.

## ◆ ImportJSONModel()

void PSTech.Pstsdk.Tracker.ImportJSONModel | ( | string | jsonModel | ) |
| inline

Import a JSON-formatted string representing a tracking target model into the target model database. The JSON string should be formatted according to the instructions found in Appendix A of the PST Manual. After successfully importing the model it can be tracked by the PST Tracker.

Parameters

  jsonModel | A JSON-formatted string representing the tracking target model.

Exceptions

  InvalidDataException | Data provided did not match the requirements.
  AlreadyExistsException | The request could not be executed because a model with the same name already exists in the database.
  JSONException | The JSON string could not be parsed correctly.

See also
  Tracker.ExportJSONModel

## ◆ LoadCalibrationFromLocalPath()

void PSTech.Pstsdk.Tracker.LoadCalibrationFromLocalPath | ( | string | path | ) |
| inline

Load the calibration information for each of the cameras in the connected PST Tracker from the specified local path. This function will overwrite any calibration information for the currently connected trackers available in the current configuration folder. Calibration information will only be loaded and placed in the configuration folder when calibration information is found and valid for all connected cameras.

Parameters

  path | Path to the local directory where the calibration information for all connected cameras is stored.

See also
  GetConnectedCameraUrls

Exceptions

  NotFoundException | Calibration information not found for one or more of the connected cameras.
  InvalidDataException | The provided data is not valid.

## ◆ PauseTracker()

void PSTech.Pstsdk.Tracker.PauseTracker | ( |  | ) |
| inline

Pause the tracking system, stop producing tracking results and enter low-power mode. Tracking can be resumed with a subsequent call to StartTracker().

See also
  StartTracker

## ◆ RemoveTargetModel()

void PSTech.Pstsdk.Tracker.RemoveTargetModel | ( | string | modelName | ) |
| inline

Remove a tracking target model from the target model database.

Parameters

  modelName | The name of the tracking target model to be removed.

Exceptions

  NotFoundException | The tracking target model to be removed was not found in the target model database.

## ◆ RemoveTrackerListener()

void PSTech.Pstsdk.Tracker.RemoveTrackerListener | ( | TrackerListener | listener | ) |
| inline

Remove a TrackerListener object receiving tracking information and/or mode changes reported from the connected PST Tracker. Leaving listeners registered after they become obsolete can slow down or block other listeners and may interfere with subsequent tracking sessions. If listeners are not removed manually, they will be removed automatically when the Tracker instance is disposed. However, this automatic cleanup only occurs when the Tracker is destroyed and should not be relied upon during normal operation.

Parameters

  listener | TrackerListener object capable of reporting new tracker data and/or a change in the tracker mode.

See also
  TrackerListener, AddTrackerListener

## ◆ SetDefaultReference()

void PSTech.Pstsdk.Tracker.SetDefaultReference | ( |  | ) |
| inline

Resets the currently set reference system to the default reference system. The default system is defined by a 4x4 identity matrix. This places the origin of the reference system 1 meter away from the PST Tracker.It is oriented such that the Z-axis points away from the PST tracker and the X-axis is parallel to the PST tracker.

See also
  SetReference, GetReference

Examples
  reference/reference.cs.

## ◆ SetExposure()

void PSTech.Pstsdk.Tracker.SetExposure | ( | double | exposure | ) |
| inline

Set the PST Tracker exposure time to the supplied time.This adjusts both the shutter speed of the PST Tracker and the time the IR illumination panel will be turned on.

Parameters

  exposure | Exposure time in seconds.

See also
  SetFramerate, GetFramerate

Exceptions

  OutOfRangeException | The supplied value is outside of the accepted range.
  NotSupportedException | Exposure could not be set on the Tracker.

Examples
  exposure/exposure.cs.

## ◆ SetFramerate()

void PSTech.Pstsdk.Tracker.SetFramerate | ( | double | fps | ) |
| inline

Set the PST Tracker frame rate to the value available for the connected PST Tracker nearest to the supplied value.

Parameters

  fps | The new frame rate to be set.

See also
  GetFramerate, GetSupportedFramerates

Exceptions

  NotSupportedException | Framerate could not be set on the Tracker.

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, and reference/reference.cs.

## ◆ SetMarkerDetectionRegion()

void PSTech.Pstsdk.Tracker.SetMarkerDetectionRegion | ( | TrackingRegion | detectionRegion | ) |
| inline

The tracker will report markers detected in the selected region. When the region is set to TrackingRegion.Full, all detected markers are reported. When the region is set to TrackingRegion.Optimal, only markers detected in the predetermined optimal region of the tracker used are reported. Markers are pruned based on their distance to the tracker as well as how far they are to the edges of the field of view.

Parameters

  detectionRegion | The detection region that should be used during tracking.

Exceptions

  OutOfRangeException | The supplied detection_region cannot be internally converted.
  NotSupportedException | TrackingRegion.Optimal was requested but the connected PST tracker does not support tracking region based pruning. The detection region has been set to TrackingRegion.Full.

See also
  TrackingRegion, GetMarkerDetectionRegion, SupportsDetectionRegionPruning

## ◆ SetOrientationFilter()

void PSTech.Pstsdk.Tracker.SetOrientationFilter | ( | double | value | ) |
| inline

Set the strength of the double exponential-based prediction filter (DESP) that filters the estimated positions of the tracked tracking targets. The supplied filtering value should be between 0 (no filtering) and 0.99 (maximum filtering).

Parameters

  value | Filtering strength to be used in range [0, 0.99].

See also
  EnableFiltering, SetPositionFilter

## ◆ SetPositionFilter()

void PSTech.Pstsdk.Tracker.SetPositionFilter | ( | double | value | ) |
| inline

Set the strength of the double exponential-based prediction filter (DESP) that filters the estimated positions of the tracked tracking targets. The supplied filtering value should be between 0 (no filtering) and 0.99 (maximum filtering).

Parameters

  value | Filtering strength to be used in range [0, 0.99].

See also
  EnableFiltering, SetOrientationFilter

## ◆ SetReference()

void PSTech.Pstsdk.Tracker.SetReference | ( | float[] | creference,
|  | bool | relative = false )
| inline

The reference system is defined by a homogeneous transformation matrix (a row-major 4x4 matrix) representing a right-handed Cartesian coordinate system. The function checks if the rotation component of the supplied transformation matrix is orthonormal and if the supplied transformation matrix is homogeneous (i.e.the final row of the matrix is [0 0 0 1]). If either one of these conditions is not true, a PSTech.TrackerException is thrown. As an optional parameter, the reference system can be set relative to the current reference system. When this option is used, the current reference system is transformed using the supplied transformation matrix. Otherwise, the current reference system is replaced by the supplied reference system.

Parameters

  creference | The transformation matrix for the new reference system.
  relative | When set to true, the current transformation matrix is transformed using the supplied transformation matrix.

See also
  GetReference, SetDefaultReference

Exceptions

  TrackerException | The supplied reference matrix is either non-homogeneous or the rotation component is non-orthonormal.

Examples
  reference/reference.cs.

## ◆ SetTargetId()

void PSTech.Pstsdk.Tracker.SetTargetId | ( | string | targetName,
|  | int | id )
| inline

This function changes the id of the tracking target. This id is mainly used when connecting to the PST Tracker through VRPN.

Parameters

  targetName | The name of the tracking target to change the id of.
  id | The new id of the tracking target.

See also
  Target

Exceptions

  NotFoundException | The requested data could not be found.

## ◆ SetTargetStatus()

void PSTech.Pstsdk.Tracker.SetTargetStatus | ( | string | targetName,
|  | bool | active )
| inline

Sets the status of a single tracking Target to active (true) or inactive (false).

Parameters

  targetName | The name of the tracking Target to set the status of.
  active | New status of the tracking Target.

See also
  TargetStatus, GetTargetStatus, GetTargetList

Exceptions

  NotFoundException | The requested data could not be found.

Examples
  trackingtarget/trackingtarget.cs.

## ◆ Shutdown()

void PSTech.Pstsdk.Tracker.Shutdown | ( |  | ) |
| inline static

Fully shutdown the tracking system, disconnecting from the PST Tracker and rendering the Tracker object useless. When the shared memory interface has been enabled it will be disabled as well. In order to restart the tracker, a new instance of the Tracker class has to be created.

See also
  Tracker(string, string, string, string), DisableSharedMemory

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, reference/reference.cs, restserver/restserver.cs, sharedmemory/sharedmemory.cs, and trackingtarget/trackingtarget.cs.

## ◆ StartTracker()

void PSTech.Pstsdk.Tracker.StartTracker | ( |  | ) |
| inline

Start the tracking system and produce tracking results.

See also
  PauseTracker

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, minimal/minimal.cs, reference/reference.cs, restserver/restserver.cs, sharedmemory/sharedmemory.cs, and trackingtarget/trackingtarget.cs.

## ◆ SupportsDetectionRegionPruning()

bool PSTech.Pstsdk.Tracker.SupportsDetectionRegionPruning | ( |  | ) |
| inline

Determines whether the currently connected PST tracker supports pruning detected markers based on the tracking region in which they are detected. When this function returns true, setting the detection region to TrackingRegion.Optimal via SetMarkerDetectionRegion will prune markers that fall outside the optimal zone.

Returns
  true if the connected PST tracker supports tracking region based pruning; false otherwise.

See also
  SetMarkerDetectionRegion, GetMarkerDetectionRegion

## ◆ Systemcheck()

StatusMessage PSTech.Pstsdk.Tracker.Systemcheck | ( |  | ) |
| inline

Perform a system check, checking if the PST Tracker has been initialized correctly and if the system is running properly. In order to get continuous feedback on the status of the PST Tracker it is recommended to implement regular polling of this function. This way, issues that will not cause the software to crash (e.g. a camera disconnect) can be handled.

Returns
  Current system status code as StatusMessage enumeration member.

See also
  StatusMessage

Examples
  exposure/exposure.cs, images/images.cs, listener/listener.cs, reference/reference.cs, and trackingtarget/trackingtarget.cs.

The documentation for this class was generated from the following file:

- src/Tracker.cs