Packagecom.transmote.flar.utils.threshold
Interfacepublic interface IThresholdAdapter
Implementors DrunkHistogramThresholdAdapter, DrunkWalkThresholdAdapter, HistogramThresholdAdapter, IntegralImageThresholdAdapter

Interface that defines how classes used for adaptive thresholding will interface with FLARManager.

Adaptive thresholding can result in better marker detection across a range of illumination. This is desirable for applications with low lighting, or in which the developer has little control over lighting conditions, such as with web applications.



Public Properties
 PropertyDefined By
  runsEveryFrame : Boolean
[read-only] Returns true if this threshold adapter should run every frame; Returns false if this threshold adapter should run only when no markers are found.
IThresholdAdapter
Public Methods
 MethodDefined By
  
calculateThreshold(source:BitmapData, currentThreshold:Number):Number
Calculate a new threshold.
IThresholdAdapter
  
dispose():void
Free this instance for garbage collection.
IThresholdAdapter
  
initFromXML(paramsObj:Object):void
Init from a name-value paired object that contains parameters parsed from XML.
IThresholdAdapter
  
resetCalculations(currentThreshold:Number):void
Reset calculations.
IThresholdAdapter
Property Detail
runsEveryFrameproperty
runsEveryFrame:Boolean  [read-only]

Returns true if this threshold adapter should run every frame; Returns false if this threshold adapter should run only when no markers are found.


Implementation
    public function get runsEveryFrame():Boolean
Method Detail
calculateThreshold()method
public function calculateThreshold(source:BitmapData, currentThreshold:Number):Number

Calculate a new threshold.

This algorithm may just calculate a threshold and pass that back to FLARManager, which then passes it on to the tracker for internal thresholding.

However, this algorithm may also modify the source BitmapData directly. In this case, the algorithm must return -1, to tell the tracker to skip its internal thresholding algorithm, and use the source BitmapData as modified here.

Parameters

source:BitmapData — Source BitmapData used for computer vision analysis.
 
currentThreshold:Number — Current threshold value.

Returns
Number — New threshold value.
dispose()method 
public function dispose():void

Free this instance for garbage collection.

initFromXML()method 
public function initFromXML(paramsObj:Object):void

Init from a name-value paired object that contains parameters parsed from XML.

Parameters

paramsObj:Object

resetCalculations()method 
public function resetCalculations(currentThreshold:Number):void

Reset calculations.

Parameters

currentThreshold:Number — current threshold value.