| Package | de.popforge.imageprocessing.core |
| Class | public final class Histogram |
| Property | Defined by | ||
|---|---|---|---|
| channels : Array
The histogram values in seperate channels.
| Histogram | ||
| DETAIL : int = 4 [static]
Histogram detail based on pixel skipping.
| Histogram | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a Histogram object.
| Histogram | ||
|
Analyzes the image and updates the histogram.
| Histogram | ||
|
Returns a new Histogram object that is a clone of the original instance with an exact copy of the contained information.
| Histogram | ||
|
getBitmapData(width:int = 0x100, height:int = 0x100, useMedian:Boolean = false):BitmapData
Creates a BitmapData containing the visual representation of the histogram.
| Histogram | ||
|
getCount(from:int, to:int):int
Accumulates the histogram values of all channels in a given interval.
| Histogram | ||
|
getValue(index:int):int
Searches for minimum at given position on histogram's x axis.
| Histogram | ||
| channels | property |
public var channels:Array
The histogram values in seperate channels.
Each channel goes from 0x00 to 0xff. A histogram stores the same value of channels as the analyzed image contains.
| DETAIL | property |
public static var DETAIL:int = 4
Histogram detail based on pixel skipping.
The detail of 1 would result in checking every pixel while the default value of
4 skips 3 pixels in x and y direction.
The default value is 4.
| Histogram | () | constructor |
public function Histogram(image:Image = null)Creates a Histogram object. If you specify an image, the histogram will be automatically generated.
Parametersimage:Image (default = null) — The image that holds the color information on which the histogram is based.
|
| analyze | () | method |
public function analyze(image:Image):voidAnalyzes the image and updates the histogram. The histogram should be updated everytime an image has been updated.
Parametersimage:Image — The image that will be analyzed.
|
See also
| clone | () | method |
public function clone():HistogramReturns a new Histogram object that is a clone of the original instance with an exact copy of the contained information.
ReturnsHistogram —
A new Histogram object that is identical to the original.
|
| getBitmapData | () | method |
public function getBitmapData(width:int = 0x100, height:int = 0x100, useMedian:Boolean = false):BitmapDataCreates a BitmapData containing the visual representation of the histogram.
Parameterswidth:int (default = 0x100) — The width of the resulting image in pixels.
|
|
height:int (default = 0x100) — The height of the resulting image in pixels.
|
|
useMedian:Boolean (default = false) — Set to true if median should be used to scale the histogram.
|
BitmapData — A BitmapData object that stores an image of the histogram.
|
| getCount | () | method |
public function getCount(from:int, to:int):int
Accumulates the histogram values of all channels in a given interval.
The interval will be clamped between 0x00 and 0xff
from:int — Value on the histogram's x axis where to start from (0x00 to 0xff).
|
|
to:int — Value on the histogram's x axis where to end (0x00 to 0xff).
|
int — Accumulated value of the histogram in the given interval.
|
— from parameter is greater than to> parameter.
|
| getValue | () | method |
public function getValue(index:int):intSearches for minimum at given position on histogram's x axis.
Parametersindex:int — Position on histogram's x axis.
|
int — Minimum at given x position.
|