Get blobs.

Namespace:  AForge.Imaging
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public Blob[] GetObjects(
	Bitmap image,
	bool extractInOriginalSize
)

Parameters

image
Type: System.Drawing..::.Bitmap
Source image to extract objects from.
extractInOriginalSize
Type: System..::.Boolean
Specifies size of blobs' image to extract. If set to trueTruetruetrue (True in Visual Basic) each blobs' image will have the same size as the specified image. If set to falseFalsefalsefalse (False in Visual Basic) each blobs' image will have the size of its blob.

Return Value

Returns array of blobs.

Remarks

The method returns array of blobs. Before calling the method, the ProcessImage(Bitmap), ProcessImage(BitmapData) or ProcessImage(UnmanagedImage) method should be called, which will build objects map.

The method supports 24/32 bpp color and 8 bpp indexed grayscale images.

Exceptions

ExceptionCondition
AForge.Imaging..::.UnsupportedImageFormatExceptionUnsupported pixel format of the provided image.
System..::.ApplicationExceptionNo image was processed before, so objects can not be collected.

See Also