C# Class ImageProcessor.Imaging.FastBitmap

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

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Disposes the object and frees resources for the Garbage Collector.

Private Methods

Méthode 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 méthode

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

Dispose() protected méthode

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

Equals() public méthode

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.
Résultat bool

FastBitmap() public méthode

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

FastBitmap() public méthode

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. ///
Résultat System

FastBitmap() public méthode

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. ///
Résultat System

GetHashCode() public méthode

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
Résultat int

GetPixel() public méthode

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.
Résultat Color

GetSum() public méthode

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.
Résultat long

GetSum2() public méthode

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.
Résultat long

GetSumT() public méthode

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.
Résultat long

SetPixel() public méthode

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. ///
Résultat void