| Package | com.transmote.flar.utils.threshold |
| Interface | public interface IThresholdAdapter |
| Implementors | DrunkHistogramThresholdAdapter, DrunkWalkThresholdAdapter, HistogramThresholdAdapter, IntegralImageThresholdAdapter |
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.
| Property | Defined 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 | ||
| Method | Defined 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 | ||
| runsEveryFrame | property |
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.
public function get runsEveryFrame():Boolean| calculateThreshold | () | method |
public function calculateThreshold(source:BitmapData, currentThreshold:Number):NumberCalculate 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.
|
Number — New threshold value.
|
| dispose | () | method |
public function dispose():voidFree this instance for garbage collection.
| initFromXML | () | method |
public function initFromXML(paramsObj:Object):voidInit from a name-value paired object that contains parameters parsed from XML.
Parameters
paramsObj:Object |
| resetCalculations | () | method |
public function resetCalculations(currentThreshold:Number):voidReset calculations.
Parameters
currentThreshold:Number — current threshold value.
|