Package | com.transmote.flar.utils.threshold |
Class | public class DrunkWalkThresholdAdapter |
Inheritance | DrunkWalkThresholdAdapter Object |
Implements | IThresholdAdapter |
See the following URLs for more information:
Property | Defined By | ||
---|---|---|---|
bias : Number
The direction toward which adaptive thresholding trends. | DrunkWalkThresholdAdapter | ||
runsEveryFrame : Boolean [read-only]
Returns false;
DrunkWalkThresholdAdapter runs only when confidence is low (poor marker detection). | DrunkWalkThresholdAdapter | ||
speed : Number
The speed at which the threshold changes during adaptive thresholding. | DrunkWalkThresholdAdapter |
Method | Defined By | ||
---|---|---|---|
DrunkWalkThresholdAdapter(speed:Number = 0.3, bias:Number = -0.1)
Constructor. | DrunkWalkThresholdAdapter | ||
calculateThreshold(source:BitmapData, currentThreshold:Number):Number
Calculate a new threshold. | DrunkWalkThresholdAdapter | ||
dispose():void
Free this instance for garbage collection. | DrunkWalkThresholdAdapter | ||
initFromXML(paramsObj:Object):void
Init from a name-value paired object that contains parameters parsed from XML. | DrunkWalkThresholdAdapter | ||
resetCalculations(currentThreshold:Number):void
Reset calculations. | DrunkWalkThresholdAdapter |
bias | property |
bias:Number
The direction toward which adaptive thresholding trends.
Lower thresholds favor environments with too little light; Higher thresholds favor environments with too much light.
A value of -1 will adapt only toward a lower threshold. A value of +1 will adapt only toward a higher threshold. A value of 0 will adapt randomly in both directions, with no bias. The default is -0.1, as darker environments tend to be more common for viewing web applications than are brightly lit environments.
public function get bias():Number
public function set bias(value:Number):void
runsEveryFrame | property |
runsEveryFrame:Boolean
[read-only]
Returns false
;
DrunkWalkThresholdAdapter runs only when confidence is low (poor marker detection).
public function get runsEveryFrame():Boolean
speed | property |
speed:Number
The 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
DrunkWalkThresholdAdapter | () | Constructor |
public function DrunkWalkThresholdAdapter(speed:Number = 0.3, bias:Number = -0.1)
Constructor.
Parametersspeed:Number (default = 0.3 )
| |
bias:Number (default = -0.1 )
|
calculateThreshold | () | method |
public function calculateThreshold(source:BitmapData, currentThreshold:Number):Number
Calculate a new threshold.
Parameters
source:BitmapData — Unused by DrunkWalkThresholdAdapter.
| |
currentThreshold:Number — Current threshold value.
|
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 |