C# Class Encog.Util.DownSample.RGBDownsample

Downsample an image keeping the RGB colors.
Inheritance: IDownSample
ファイルを表示 Open project: encog/encog-silverlight-core

Public Methods

Method Description
DownSample ( Bitmap image, int height, int width ) : double[]

Called to downsample the image and store it in the down sample component.

DownSampleRegion ( int x, int y ) : void

Called to downsample a region of the image.

FindBounds ( ) : void

This method is called to automatically crop the image so that whitespace is removed.

ProcessImage ( Bitmap image ) : void

Process the image and prepare it to be downsampled.

Private Methods

Method Description
HLineClear ( int y ) : bool

This method is called internally to see if there are any pixels in the given scan line. This method is used to perform autocropping.

VLineClear ( int x ) : bool

This method is called internally to see if there are any pixels in the given scan line. This method is used to perform autocropping.

Method Details

DownSample() public method

Called to downsample the image and store it in the down sample component.
public DownSample ( Bitmap image, int height, int width ) : double[]
image System.Drawing.Bitmap The image to downsample.
height int The height to downsample to.
width int THe width to downsample to.
return double[]

DownSampleRegion() public method

Called to downsample a region of the image.
public DownSampleRegion ( int x, int y ) : void
x int The x coordinate of the resulting downsample.
y int The y coordinate of the resulting downsample.
return void

FindBounds() public method

This method is called to automatically crop the image so that whitespace is removed.
public FindBounds ( ) : void
return void

ProcessImage() public method

Process the image and prepare it to be downsampled.
public ProcessImage ( Bitmap image ) : void
image System.Drawing.Bitmap The image to downsample.
return void