Package | com.transmote.flar.utils.threshold |
Class | public class DrunkWalkThresholdAdapter |
Implements | IThresholdAdapter |
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)
| 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
[read-write]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 oversaturated environments.
Implementation 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).
Implementation public function get runsEveryFrame():Boolean
speed | property |
speed:Number
[read-write]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.
Implementation 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)
Parameters
speed:Number (default = 0.3 )
|
|
bias:Number (default = -0.1 )
|
calculateThreshold | () | method |
public function calculateThreshold(source:BitmapData, currentThreshold:Number):Number
calculate a new threshold.
Parameterssource: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.
ParametersparamsObj:Object |
resetCalculations | () | method |
public function resetCalculations(currentThreshold:Number):void
reset calculations.
ParameterscurrentThreshold:Number |