| Package | de.popforge.imageprocessing.filters.binarization |
| Class | public final class CarryThreshold |
| Implements | IFilter |
The filter checks each pixel and adds the brightness to the carry flag. If the flag is greater than a threshold value of 0x7f the pixel will be set to 1 otherwise to 0.
The formula of this filter is new = ( flag += old > threshold ) ? 1, flag -= 0xff : 0.
Supported formats:
This is a conversion filter so there are no supported formats.
// Set the conversion filter to CarryThreshold Image.threshold = new CarryThreshold(); var video: WebCam = new WebCam( 160, 120 ); var image: Image = new Image( 160, 120, ImageFormat.BINARY ); image.loadBitmapData( video.getCurrentFrame(), true );
| Method | Defined by | ||
|---|---|---|---|
|
Applies the filter to the given Image object.
| CarryThreshold | ||
|
toString():String
Builds and returns a string containing the name of the class.
| CarryThreshold | ||
| apply | () | method |
public function apply(image:Image):voidApplies the filter to the given Image object.
Parametersimage:Image — The image that will be manipulated.
|
| toString | () | method |
public function toString():StringBuilds and returns a string containing the name of the class.
ReturnsString — A string containing the name of the class.
|