BlobCounterBase Class |
Namespace: Accord.Imaging
The BlobCounterBase type exposes the following members.
Name | Description | |
---|---|---|
BlobCounterBase |
Initializes a new instance of the BlobCounterBase class.
| |
BlobCounterBase(Bitmap) |
Initializes a new instance of the BlobCounterBase class.
| |
BlobCounterBase(BitmapData) |
Initializes a new instance of the BlobCounterBase class.
| |
BlobCounterBase(UnmanagedImage) |
Initializes a new instance of the BlobCounterBase class.
|
Name | Description | |
---|---|---|
BlobsFilter |
Custom blobs' filter to use.
| |
CoupledSizeFiltering |
Specifies if size filtering should be coupled or not.
| |
FilterBlobs |
Specifies if blobs should be filtered.
| |
ImageHeight |
Gets the height of the image.
| |
ImageWidth |
Gets the width of the image.
| |
MaxHeight |
Maximum allowed height of blob.
| |
MaxWidth |
Maximum allowed width of blob.
| |
MinHeight |
Minimum allowed height of blob.
| |
MinWidth |
Minimum allowed width of blob.
| |
ObjectLabels |
Objects' labels.
| |
ObjectsCount |
Objects count.
| |
ObjectsOrder |
Objects sort order.
|
Name | Description | |
---|---|---|
BuildObjectsMap |
Actual objects map building.
| |
Dispose |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
| |
Dispose(Boolean) |
Releases unmanaged and - optionally - managed resources.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
ExtractBlobsImage(Bitmap, Blob, Boolean) |
Extract blob's image.
| |
ExtractBlobsImage(UnmanagedImage, Blob, Boolean) |
Extract blob's image.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetBlobsEdgePoints |
Get list of object's edge points.
| |
GetBlobsLeftAndRightEdges |
Get list of points on the left and right edges of the blob.
| |
GetBlobsTopAndBottomEdges |
Get list of points on the top and bottom edges of the blob.
| |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetObjects(Bitmap, Boolean) |
Get blobs.
| |
GetObjects(UnmanagedImage, Boolean) |
Get blobs.
| |
GetObjectsInformation |
Get objects' information.
| |
GetObjectsRectangles |
Get objects' rectangles.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProcessImage(Bitmap) |
Build objects map.
| |
ProcessImage(BitmapData) |
Build objects map.
| |
ProcessImage(UnmanagedImage) |
Build object map from raw image data.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
The class is abstract and serves as a base for different blob counting algorithms. Classes, which inherit from this base class, require to implement BuildObjectsMap(UnmanagedImage) method, which does actual building of object's label's map.
For blobs' searcing usually all inherited classes accept binary images, which are actually grayscale thresholded images. But the exact supported format should be checked in particular class, inheriting from the base class. For blobs' extraction the class supports grayscale (8 bpp indexed) and color images (24 and 32 bpp).
Sample usage:
// create an instance of a blob counter algorithm BlobCounterBase bc = new BlobCounter(); // set filtering options bc.FilterBlobs = true; bc.MinWidth = 5; bc.MinHeight = 5; // process binary image bc.ProcessImage(image); // process blobs foreach (Blob blob in bc.GetObjects(image, false)) { // ... // blob.Rectangle - blob's rectangle // blob.Image - blob's image }