C# Class ImageProcessor.Imaging.FastBitmap

Allows fast access to System.Drawing.Bitmap's pixel data.
Inheritance: IDisposable
Exibir arquivo Open project: JimBobSquarePants/ImageProcessor Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void

Disposes the object and frees resources for the Garbage Collector.

Equals ( object obj ) : bool

Determines whether the specified T:System.Object is equal to the current T:System.Object.

FastBitmap ( Image bitmap ) : System

Initializes a new instance of the FastBitmap class.

FastBitmap ( Image bitmap, bool computeIntegrals ) : System

Initializes a new instance of the FastBitmap class.

FastBitmap ( Image bitmap, bool computeIntegrals, bool computeTilted ) : System

Initializes a new instance of the FastBitmap class.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

GetPixel ( int x, int y ) : Color

Gets the color at the specified pixel of the System.Drawing.Bitmap.

GetSum ( int x, int y, int rectangleWidth, int rectangleHeight ) : long

Gets the sum of the pixels in a rectangle of the Integral image.

GetSum2 ( int x, int y, int rectangleWidth, int rectangleHeight ) : long

Gets the sum of the squared pixels in a rectangle of the Integral image.

GetSumT ( int x, int y, int rectangleWidth, int rectangleHeight ) : long

Gets the sum of the pixels in a tilted rectangle of the Integral image.

SetPixel ( int x, int y, Color color ) : void

Sets the color of the specified pixel of the System.Drawing.Bitmap.

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes the object and frees resources for the Garbage Collector.

Private Methods

Method Description
CalculateIntegrals ( ) : void

Computes all possible rectangular areas in the image.

LockBitmap ( ) : void

Locks the bitmap into system memory.

UnlockBitmap ( ) : void

Unlocks the bitmap from system memory.

this ( int x, int y ) : Color32*

Gets the pixel data for the given position.

Method Details

Dispose() public method

Disposes the object and frees resources for the Garbage Collector.
public Dispose ( ) : void
return void

Dispose() protected method

Disposes the object and frees resources for the Garbage Collector.
protected Dispose ( bool disposing ) : void
disposing bool If true, the object gets disposed.
return void

Equals() public method

Determines whether the specified T:System.Object is equal to the current T:System.Object.
public Equals ( object obj ) : bool
obj object The object to compare with the current object.
return bool

FastBitmap() public method

Initializes a new instance of the FastBitmap class.
public FastBitmap ( Image bitmap ) : System
bitmap Image The input bitmap.
return System

FastBitmap() public method

Initializes a new instance of the FastBitmap class.
public FastBitmap ( Image bitmap, bool computeIntegrals ) : System
bitmap Image The input bitmap.
computeIntegrals bool /// Whether to compute integral rectangles. ///
return System

FastBitmap() public method

Initializes a new instance of the FastBitmap class.
public FastBitmap ( Image bitmap, bool computeIntegrals, bool computeTilted ) : System
bitmap Image The input bitmap.
computeIntegrals bool /// Whether to compute integral rectangles. ///
computeTilted bool /// Whether to compute tilted integral rectangles. ///
return System

GetHashCode() public method

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
return int

GetPixel() public method

Gets the color at the specified pixel of the System.Drawing.Bitmap.
public GetPixel ( int x, int y ) : Color
x int The x-coordinate of the pixel to retrieve.
y int The y-coordinate of the pixel to retrieve.
return Color

GetSum() public method

Gets the sum of the pixels in a rectangle of the Integral image.
public GetSum ( int x, int y, int rectangleWidth, int rectangleHeight ) : long
x int The horizontal position of the rectangle x.
y int The vertical position of the rectangle y.
rectangleWidth int The rectangle's width w.
rectangleHeight int The rectangle's height h.
return long

GetSum2() public method

Gets the sum of the squared pixels in a rectangle of the Integral image.
public GetSum2 ( int x, int y, int rectangleWidth, int rectangleHeight ) : long
x int The horizontal position of the rectangle x.
y int The vertical position of the rectangle y.
rectangleWidth int The rectangle's width w.
rectangleHeight int The rectangle's height h.
return long

GetSumT() public method

Gets the sum of the pixels in a tilted rectangle of the Integral image.
public GetSumT ( int x, int y, int rectangleWidth, int rectangleHeight ) : long
x int The horizontal position of the rectangle x.
y int The vertical position of the rectangle y.
rectangleWidth int The rectangle's width w.
rectangleHeight int The rectangle's height h.
return long

SetPixel() public method

Sets the color of the specified pixel of the System.Drawing.Bitmap.
public SetPixel ( int x, int y, Color color ) : void
x int The x-coordinate of the pixel to set.
y int The y-coordinate of the pixel to set.
color Color /// A color structure that represents the /// color to set the specified pixel. ///
return void