OSVR Framework (Internal Development Docs)  0.6-1962-g59773924
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
osvr::vbtracker::LedIdentifier Class Referenceabstract

Helper class to identify an LED based on its pattern of brightness over time. The base class defines the interface. The derived classes encode the pattern-detection algorithm for specific devices. More...

#include </home/jenkins/root/workspace/OSVR-Core-Docs/plugins/unifiedvideoinertialtracker/LedIdentifier.h>

Inheritance diagram for osvr::vbtracker::LedIdentifier:
osvr::vbtracker::OsvrHdkLedIdentifier osvr::vbtracker::OsvrHdkLedIdentifier

Public Member Functions

virtual ~LedIdentifier ()
 Virtual destructor;.
 
virtual ZeroBasedBeaconId getId (ZeroBasedBeaconId currentId, BrightnessList &brightnesses, bool &lastBright, bool blobsKeepId) const =0
 Determine the identity of the LED whose brightness pattern is passed in. Truncates the passed-in list to the length needed to look for a pattern, so it does not grow too long and waste space and time, and perhaps produce spurious Ids. More...
 
virtual ~LedIdentifier ()
 Virtual destructor;.
 
virtual int getId (int currentId, BrightnessList &brightnesses, bool &lastBright, bool blobsKeepId) const =0
 Determine the identity of the LED whose brightness pattern is passed in. Truncates the passed-in list to the length needed to look for a pattern, so it does not grow too long and waste space and time, and perhaps produce spurious Ids. More...
 

Detailed Description

Helper class to identify an LED based on its pattern of brightness over time. The base class defines the interface. The derived classes encode the pattern-detection algorithm for specific devices.

NOTE: This class may modify the passed-in list, truncating it so that old data points are removed once there are enough measurements to make an estimate.

Todo:
Consider adding a distance estimator as a parameter throughout, which can be left alone for unknown or estimated based on a Kalman filter; it would be used to scale the expected brightness.

NOTE: This class may modify the passed-in list, truncating it so that old data points are removed once there are enough measurements to make an estimate.

Todo:
Consider adding a distance estimator as a parameter throughout, which can be left alone for unknown or estimated based on a Kalman filter; it would be used to scale the expected brightness.

Definition at line 53 of file LedIdentifier.h.

Member Function Documentation

virtual ZeroBasedBeaconId osvr::vbtracker::LedIdentifier::getId ( ZeroBasedBeaconId  currentId,
BrightnessList &  brightnesses,
bool &  lastBright,
bool  blobsKeepId 
) const
pure virtual

Determine the identity of the LED whose brightness pattern is passed in. Truncates the passed-in list to the length needed to look for a pattern, so it does not grow too long and waste space and time, and perhaps produce spurious Ids.

Parameters
[out]lastBrightset to True if we determine that the LED is currently "bright"
Returns
-1 for unknown (not enough information) and less than -1 for definitely not an LED (light sources will be constant, mis-tracked LEDs may produce spurious changes in the pattern for example).

Implemented in osvr::vbtracker::OsvrHdkLedIdentifier.

virtual int osvr::vbtracker::LedIdentifier::getId ( int  currentId,
BrightnessList &  brightnesses,
bool &  lastBright,
bool  blobsKeepId 
) const
pure virtual

Determine the identity of the LED whose brightness pattern is passed in. Truncates the passed-in list to the length needed to look for a pattern, so it does not grow too long and waste space and time, and perhaps produce spurious Ids.

Parameters
[out]lastBrightset to True if we determine that the LED is currently "bright"
Returns
-1 for unknown (not enough information) and less than -1 for definitely not an LED (light sources will be constant, mis-tracked LEDs may produce spurious changes in the pattern for example).

Implemented in osvr::vbtracker::OsvrHdkLedIdentifier.


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