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

Fill holes in objects in binary image.

The filter allows to fill black holes in white object in a binary image. It is possible to specify maximum holes' size to fill using MaxHoleWidth and MaxHoleHeight properties.

The filter accepts binary image only, which are represented as 8 bpp images.

Sample usage:

// create and configure the filter FillHoles filter = new FillHoles( ); filter.MaxHoleHeight = 20; filter.MaxHoleWidth = 20; filter.CoupledSizeFiltering = false; // apply the filter Bitmap result = filter.Apply( image );

Initial image:

Result image:

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

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

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

Initializes a new instance of the FillHoles class.

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

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

Process the filter on the specified image.

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

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

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

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

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