OSVR-Core
Public Member Functions | List of all members
osvr::vbtracker::LedIdentifier Class Referenceabstract

Helper class to identify an LED based on its pattern of brightness over time. More...

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

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.

Member Function Documentation

§ getId() [1/2]

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.

§ getId() [2/2]

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.


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