| Package | com.transmote.flar.utils.threshold |
| Class | public class DrunkHistogramThresholdAdapter |
| Inheritance | DrunkHistogramThresholdAdapter Object |
| Implements | IThresholdAdapter |
| Subclasses | DefaultThresholdAdapter |
this.speed and a bias calculated from the source histogram.
See the following URLs for more information:
| Property | Defined By | ||
|---|---|---|---|
| runsEveryFrame : Boolean [read-only]
Returns false;
DrunkHistogramThresholdAdapter runs only when confidence is low (poor marker detection). | DrunkHistogramThresholdAdapter | ||
| speed : Number
The speed at which the threshold changes during adaptive thresholding. | DrunkHistogramThresholdAdapter | ||
| Method | Defined By | ||
|---|---|---|---|
DrunkHistogramThresholdAdapter(speed:Number = 0.3) | DrunkHistogramThresholdAdapter | ||
calculateThreshold(source:BitmapData, currentThreshold:Number):Number
Calculate a new threshold. | DrunkHistogramThresholdAdapter | ||
dispose():void
Free this instance for garbage collection. | DrunkHistogramThresholdAdapter | ||
initFromXML(paramsObj:Object):void
Init from a name-value paired object that contains parameters parsed from XML. | DrunkHistogramThresholdAdapter | ||
resetCalculations(currentThreshold:Number):void
Reset calculations. | DrunkHistogramThresholdAdapter | ||
| runsEveryFrame | property |
runsEveryFrame:Boolean [read-only]
Returns false;
DrunkHistogramThresholdAdapter runs only when confidence is low (poor marker detection).
public function get runsEveryFrame():Boolean| speed | property |
speed:NumberThe speed at which the threshold changes during adaptive thresholding. Larger values may increase the speed at which the markers in uneven illumination are detected, but may also result in instability in marker detection. Value must be zero or greater. The default is 0.3. A value of zero will disable adaptive thresholding.
public function get speed():Number public function set speed(value:Number):void| DrunkHistogramThresholdAdapter | () | Constructor |
public function DrunkHistogramThresholdAdapter(speed:Number = 0.3)speed:Number (default = 0.3) |
| calculateThreshold | () | method |
public function calculateThreshold(source:BitmapData, currentThreshold:Number):NumberCalculate a new threshold.
Parameters
source:BitmapData — Used to calculate bias adjustment based on source histogram.
| |
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 |