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

Morph filter.

The filter combines two images by taking specified percent of pixels' intensities from source image and the rest from overlay image. For example, if the source percent value is set to 0.8, then each pixel of the result image equals to 0.8 * source + 0.2 * overlay, where source and overlay are corresponding pixels' values in source and overlay images.

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

Sample usage:

// create filter Morph filter = new Morph( overlayImage ); filter.SourcePercent = 0.75; // apply the filter Bitmap resultImage = filter.Apply( sourceImage );

Source image:

Overlay image:

Result image:

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

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

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

Initializes a new instance of the Morph class.

Morph ( Bitmap overlayImage ) : System

Initializes a new instance of the Morph class.

Morph ( UnmanagedImage unmanagedOverlayImage ) : System

Initializes a new instance of the Morph class.

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

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

Process the filter on the specified image.

Приватные методы

Метод Описание
InitFormatTranslations ( ) : void

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

Morph() публичный метод

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

Morph() публичный метод

Initializes a new instance of the Morph class.
public Morph ( Bitmap overlayImage ) : System
overlayImage System.Drawing.Bitmap Overlay image.
Результат System

Morph() публичный метод

Initializes a new instance of the Morph class.
public Morph ( UnmanagedImage unmanagedOverlayImage ) : System
unmanagedOverlayImage UnmanagedImage Unmanaged overlay image.
Результат System

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

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