C# Класс Accord.Imaging.Filters.BlobsFiltering

Blobs filtering by size.

The filter performs filtering of blobs by their size in the specified source image - all blobs, which are smaller or bigger then specified limits, are removed from the image.

The image processing filter treats all none black pixels as objects' pixels and all black pixel as background.

The filter accepts 8 bpp grayscale images and 24/32 color images for processing.

Sample usage:

// create filter BlobsFiltering filter = new BlobsFiltering( ); // configure filter filter.CoupledSizeFiltering = true; filter.MinWidth = 70; filter.MinHeight = 70; // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Наследование: BaseInPlaceFilter
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BlobsFiltering ( ) : System

Initializes a new instance of the BlobsFiltering class.

BlobsFiltering ( IBlobsFilter blobsFilter ) : System

Initializes a new instance of the BlobsFiltering class.

BlobsFiltering ( int minWidth, int minHeight, int maxWidth, int maxHeight ) : System

Initializes a new instance of the BlobsFiltering class.

This constructor creates an instance of BlobsFiltering class with CoupledSizeFiltering property set to false.

BlobsFiltering ( int minWidth, int minHeight, int maxWidth, int maxHeight, bool coupledSizeFiltering ) : System

Initializes a new instance of the BlobsFiltering class.

For information about coupled filtering mode see documentation for BlobCounterBase.CoupledSizeFiltering property of BlobCounterBase class.

Защищенные методы

Метод Описание
ProcessFilter ( UnmanagedImage image ) : void

Process the filter on the specified image.

Описание методов

BlobsFiltering() публичный Метод

Initializes a new instance of the BlobsFiltering class.
public BlobsFiltering ( ) : System
Результат System

BlobsFiltering() публичный Метод

Initializes a new instance of the BlobsFiltering class.
public BlobsFiltering ( IBlobsFilter blobsFilter ) : System
blobsFilter IBlobsFilter Custom blobs' filtering routine to use /// (see ).
Результат System

BlobsFiltering() публичный Метод

Initializes a new instance of the BlobsFiltering class.
This constructor creates an instance of BlobsFiltering class with CoupledSizeFiltering property set to false.
public BlobsFiltering ( int minWidth, int minHeight, int maxWidth, int maxHeight ) : System
minWidth int Minimum allowed width of blob.
minHeight int Minimum allowed height of blob.
maxWidth int Maximum allowed width of blob.
maxHeight int Maximum allowed height of blob.
Результат System

BlobsFiltering() публичный Метод

Initializes a new instance of the BlobsFiltering class.

For information about coupled filtering mode see documentation for BlobCounterBase.CoupledSizeFiltering property of BlobCounterBase class.

public BlobsFiltering ( int minWidth, int minHeight, int maxWidth, int maxHeight, bool coupledSizeFiltering ) : System
minWidth int Minimum allowed width of blob.
minHeight int Minimum allowed height of blob.
maxWidth int Maximum allowed width of blob.
maxHeight int Maximum allowed height of blob.
coupledSizeFiltering bool Specifies if size filetering should be coupled or not.
Результат System

ProcessFilter() защищенный Метод

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage image ) : void
image UnmanagedImage Source image data.
Результат void