Click or drag to resize

IBitmapImage Interface

Interface representing a bitmap image. Most of the image processing methods do not modify the existing instance, but instead return a new instance with the effect applied.

Namespace:  CohesiveComputing.Imaging
Assembly:  CohesiveComputing.BatchImagePro (in CohesiveComputing.BatchImagePro.dll) Version: 1.0.0
Syntax
C#
public interface IBitmapImage

The IBitmapImage type exposes the following members.

Properties
  NameDescription
Public propertyDpi
Gets or sets the image dpi.
Public propertyHeight
Gets the image height.
Public propertyIsTopDown
Gets a value indicating whether this image is top down.
Public propertyMetaData
Gets or sets the EXIF meta data dictionary.
Public propertyStride
Gets the number of bytes needed for each scan line.
Public propertyUserObj
Gets or sets a temporary user object instance associated with the image.
Public propertyWidth
Gets the image width.
Top
Methods
  NameDescription
Public methodAdd(IBitmapImage)
Performs arithmetic add of image2 to instance.
Public methodAdd(IBitmapImage, Single)
Performs arithmetic add of image2 to instance. Applies brightness scale factor to image2 before adding.
Public methodApplyLut(UInt32)
Applies intensity lookup table to image. The lookup table must have 256 elements with values ranging from 0 to 255 inclusive.
Public methodApplyLut(UInt32, UInt32, UInt32)
Applies RGB lookup table to image. Each lookup table must have 256 elements with values ranging from 0 to 255 inclusive.
Public methodAutoContrast
Automatically adjusts the image contrast and brightness levels.
Public methodBuildNormalizedHog
Builds normalized Histograms of oriented gradients for a given image using block size of 8x8 pixels. Normalizes the Hog in to a single array of gradients. Each successive group of 36 elements ((2 x 2) x (9 x 1) histogram) represents gradients (at angles 0, 20, 40, 60, 80, 100, 120, 140, and 160 degrees) in a 16x16 pixel window. This window slides over 8-pixel intervals, starting at top left of image.
Public methodChangeBrightness
Changes the image brightness.
Public methodChangePerspective
Change perspective for given axis.
Public methodColourAt
Returns RGB colour at given logical pixel co-ordinates. Origin is top left corner. No boundary checks are performed.
Public methodColourCodeAt
Returns RGB colour at given logical co-ordinates. Origin is top left corner. No boundary checks are performed.
Public methodCopy
Makes a copy of the entire image.
Public methodCountBlobs
Counts the blobs in the image.
Public methodCreateBlankImage
Creates blank image with same dimensions as instance image.
Public methodCreateEuclideanDistanceMap
Creates Euclidean distance map from a binary image. The EDM is represented using 8 bpp top down byte array.
Public methodCreateEuclideanDistanceMapImage
Creates Euclidean distance map image from a binary image
Public methodCrop
Copies a rectangular region from the image, and returns as new image.
Public methodDifference
Performs arithmetic subtraction from instance image. Negative results are forced to positive.
Public methodDilate
Applies 3x3 dilation kernel to the image. Works best on grey scale images.
Public methodDilate(MorphologyKernelType, Int32)
Applies dilation kernel to the image. Works best on grey scale images.
Public methodErode
Applies 3x3 erosion kernel to the image. Works best on grey scale images.
Public methodErode(MorphologyKernelType, Int32)
Applies erosion kernel to the image. Works best on grey scale images.
Public methodExtractBlobs
Extracts blobs from the image. Blob pixels must be non zero, i.e. not black.
Public methodFindDeSkewAngle
Finds the de-skew angle for scanned document that is not straight. This method works best with 200 DPI images using 11 point font size.
Public methodFindDeSkewAngle(Int32)
Finds the de-skew angle for scanned document that is not straight. This method works best with 200 DPI images using 11 point font size. Providing a different DPI than actual can sometimes improve the accuracy of this method.
Public methodFindEdges
Finds the edges in the image. Returns an array where each element corresponds to a pixel.
Public methodFindEdges1AsImage
Applies a 1st order derivative kernel to the image to find edges.
Public methodFindEdges2AsImage
Applies a 2nd order derivative kernel to the image to find edges.
Public methodFindEdgesLaplacian
Uses Laplacian 3x3 kernel to find all edges.
Public methodFindEdgesSobel
Uses Sobel 3x3 kernel to find all edges.
Public methodForEachGsPixel(FuncInt32, Int32)
Sets new grey scale levels for the instance image.
Public methodForEachGsPixel(FuncInt32, Int32, Int32)
Sets in-place grey scale levels for the instance image, for pixels at x and y co-ordinates.
Public methodForEachGsPixel(FuncInt32, Int32, Int32, Int32)
Sets new grey scale levels for the instance image, and exposes x and y co-ordinates.
Public methodForEachGsPixel(FuncInt32, Int32, Int32, Int32)
Sets new grey scale levels for the instance image, and exposes all immediate neighbour pixels in a clockwise order (i.e. Centre, {N, NE, E, SE, ..., NW}).
Public methodForEachGsPixel(FuncInt32, Int32, Int32, Int32, Int32, Int32)
Sets new grey scale levels for the instance image, and exposes x and y co-ordinates, and exposes all immediate neighbour pixels in a clockwise order (i.e. Centre, {N, NE, E, SE, ..., NW}).
Public methodForEachIPixel(ActionInt32, Int32, Int32)
Iterates brightness levels of the instance image, for pixels at x and y co-ordinates.
Public methodForEachIPixel(FuncInt32, Int32)
Sets new brightness levels for the instance image.
Public methodForEachIPixel(FuncInt32, Single)
Sets new brightness levels for the instance image.
Public methodForEachIPixel(FuncInt32, Int32, Int32)
Sets new brightness levels for the instance image, and exposes all immediate neighbour pixels in a clockwise order (i.e. Centre, {N, NE, E, SE, ..., NW}).
Public methodForEachIPixel(FuncInt32, Int32, Int32, Int32)
Sets new brightness levels for the instance image, for pixels at x and y co-ordinates.
Public methodForEachIPixel(FuncInt32, Int32, Int32, Int32)
Sets new brightness levels for the instance image, and exposes all immediate neighbour pixels in a clockwise order (i.e. Centre, {N, NE, E, SE, ..., NW}).
Public methodForEachIPixel(FuncInt32, Int32, Int32, Int32, Int32, Int32)
Sets new brightness levels for the instance image, for pixels at x and y co-ordinates, and exposes all immediate neighbour pixels in a clockwise order (i.e. Centre, {N, NE, E, SE, ..., NW}).
Public methodForEachRgbPixel(ActionInt32, Int32, Int32, Int32, Int32)
Iterates colour pixels of the instance image, for pixels at x and y co-ordinates.
Public methodForEachRgbPixel(FuncInt32, Int32, ValueTupleInt32, Int32, Int32)
Sets in-place new R,G & B colours for the instance image, for pixels at x and y co-ordinates.
Public methodForEachRgbPixel(FuncInt32, Int32, Int32, ValueTupleInt32, Int32, Int32)
Sets new R,G & B colours for the instance image.
Public methodForEachRgbPixel(FuncInt32, Int32, Int32, ValueTupleSingle, Single, Single)
Sets new R,G & B colours for the instance image.
Public methodForEachRgbPixel(FuncInt32, Int32, Int32, Int32, Int32, ValueTupleInt32, Int32, Int32)
Sets new R,G & B colours for the instance image, for pixels at x and y co-ordinates.
Public methodGetBlocksRegion
Returns the region of the image that is aligned with the supplied block size.
Public methodGetHistograms(ColourChannel)
Generates histogram statistics for the image.
Public methodGetHistograms(ColourChannel, Int32, Int32, Int32, Int32)
Generates histogram statistics for a region of the image.
Public methodGetHogDominantGradients
Gets the dominant gradients (of the image HOG); a 1 dimension array of (Angle, Gradient), where each element maps to an 8x8 block of an image, whose origin is the top left. StrideX and Height identify the width and height of the dominant gradient array.
Public methodGetImageData
Gets the raw image data as 24bpp blue/green/red raw data, where each row is 32bit aligned.
Public methodGetIntensityData
Gets 8-bit grey scale data for image. Each byte in the array corresponds to a pixel in the image.
Public methodGetRawFileSize
Returns the number of bytes needed to store image as a BMP file.
Public methodGPlot(Int32, Int32)
Plots a white pixel at co-ordinates whose origin is bottom left. No boundary checks are performed.
Public methodGPlot(Int32, Int32, Int32)
Plots a pixel at co-ordinates whose origin is bottom left. No boundary checks are performed.
Public methodGPlot(Int32, Int32, Int32, Int32, Int32)
Plots a pixel at co-ordinates whose origin is bottom left. No boundary checks are performed.
Public methodGPlotLine(Int32, Int32, Int32, Int32, Int32)
Plots a line from start point (origin is bottom left) to end point.
Public methodGPlotLine(Int32, Int32, Single, Int32, Int32)
Plots a line from start point (origin is bottom left), at given angle, for given radius. Returns end point co-ordinates.
Public methodGRectFill
Draws a filled rectangle. Origin is bottom left.
Public methodHEqualize
Performs histogram equalization on the image.
Public methodHEqualize(Single)
Performs histogram equalization on the image.
Public methodHEqualizeLocal
Performs histogram equalization for a pixel within a 3x3 neighbourhood.
Public methodIntensityAt
Returns intensity value (0 to 255) at given logical co-ordinates. Origin is top left corner. No boundary checks are performed.
Public methodIsGreyScale
Returns true if image is grey scale.
Public methodLogicalAnd
Performs AND operation of mask and image.
Public methodLogicalDifference(IBitmapImage)
Performs a 'Set' difference. Where the images intersect, black colour is output. Otherwise, the original pixel is output.
Public methodLogicalDifference(IBitmapImage, Single, Int32)
Performs a 'Set' difference. Where the images intersect, intersect Colour is output. Otherwise, the original pixel is output. Parameter matchAccuracy specifies the accuracy for the intersection.
Public methodLogicalXor
Performs XOR operation of mask and image.
Public methodPaste(IBitmapImage, Int32, Int32)
Pastes the specified rectangular image into the destination image.
Public methodPaste(IBitmapImage, Int32, Int32, Single, Boolean)
Pastes the specified rectangular image into the destination image, with optional blending and transparency.
Public methodPaste(IBitmapImage, Int32, Int32, Int32, Int32, Int32, Int32, Single)
Copies a rectangular region from paste source image in to destination image.
Public methodPaste(IBitmapImage, Int32, Int32, Int32, Int32, Int32, Int32, Single, Int32, Single)
Copies a rectangular region from paste source image in to destination image.
Public methodPlot(Int32, Int32)
Plots a white pixel at co-ordinates whose origin is top left. No boundary checks are performed.
Public methodPlot(Int32, Int32, Int32)
Plots a pixel at co-ordinates whose origin is top left. No boundary checks are performed.
Public methodPlot(Int32, Int32, Int32, Int32, Int32)
Plots a pixel at co-ordinates whose origin is top left. No boundary checks are performed.
Public methodPlotLine(Int32, Int32, Int32, Int32, Int32)
Plots a line from start point (origin is top left) to end point.
Public methodPlotLine(Int32, Int32, Single, Int32, Int32)
Plots a line from start point (origin is top left), at given angle, for given radius. Returns end point co-ordinates.
Public methodRectFill
Draws a filled rectangle. Origin is top left.
Public methodReduceDistortion
Reduces either barrel or pin cushion distortion.
Public methodReduceNoiseAdaptive
Applies adaptive 3x3 filter to reduce noise whilst preserving edges.
Public methodReduceNoiseMedian
Applies 3x3 median filter to R, G, & B colours of the image.
Public methodReflect
Reflects image in either horizontal or vertical axis.
Public methodResize(Single, ResizeInterpolation)
Resizes image by scale factor.
Public methodResize(Int32, Int32, ResizeInterpolation)
Resizes image to new width and height.
Public methodRotate(Double, Interpolation)
Rotates image by angle expressed as degrees.
Public methodRotate(Double, Int32, Interpolation)
Rotates image by angle expressed as degrees.
Public methodSave(Stream)
Saves instance to a bitmap stream.
Public methodSave(String)
Saves instance to a bitmap file.
Public methodSaveJpeg(Stream, Int32)
Saves image as Jpeg.
Public methodSaveJpeg(String, Int32)
Saves image as Jpeg.
Public methodSavePng(Stream)
Saves image as PNG.
Public methodSavePng(String)
Saves image as PNG.
Public methodSharpen
Applies a Laplacian 3x3 sharpening filter to the image using default strength of 0.
Public methodSharpen(Int32)
Applies a Laplacian 3x3 sharpening filter to the image.
Public methodSmooth
Applies smoothing 3x3 filter to the image
Public methodSmooth(KernelType, Int32)
Applies a smoothing kernel to the image. Uses strength parameter to apply dynamic centre pixel weighting.
Public methodSubtract(IBitmapImage)
Performs arithmetic subtraction from instance image. Negative results are forced to 0 (black).
Public methodSubtract(IBitmapImage, Single)
Performs arithmetic subtraction from instance image. Applies brightness scale factor to image2 before subtracting. Negative results are forced to 0 (black).
Public methodThreshold
Applies a bracketed (upper and lower) brightness threshold to the image.
Public methodThresholdBinary(Single)
Brightness values above (or equal to) specified threshold are forced to 100% (white). Brightness values below are forced to 0% (black).
Public methodThresholdBinary(Single, Boolean)
Brightness values are clamped to 100% (white) or 0% (black) depending on parameters thresholdPc and toInverse.
Public methodThresholdCeiling
Brightness values above specified limit are forced to 100% (white).
Public methodThresholdColour
Performs colour thresholding by thresholding each pixel to a default 20 colour palette.
Public methodThresholdColour(Int32)
Performs colour thresholding by thresholding each pixel to one of the supplied colours.
Public methodThresholdColour(ValueTupleInt32, Int32, Int32)
Performs colour thresholding by thresholding each pixel to one of the supplied colours.
Public methodThresholdColour(Int32, Single, Int32)
Performs colour thresholding by thresholding each pixel to one of the supplied colours. Colours not matching are set to the default colour.
Public methodThresholdColour(ValueTupleInt32, Int32, Int32, Single, ValueTupleInt32, Int32, Int32)
Performs colour thresholding by thresholding each pixel to one of the supplied colours. Colours not matching are set to the default colour.
Public methodThresholdFloor
Brightness values below specified limit are forced to 0% (black).
Public methodToGreyScale
Converts image to grey scale.
Public methodToInverse
Converts image to negative equivalent.
Top
See Also