C# 클래스 AForge.Imaging.Filters.ErrorDiffusionDithering

Base class for error diffusion dithering.

The class is the base class for binarization algorithms based on error diffusion.

Binarization with error diffusion in its idea is similar to binarization based on thresholding of pixels' cumulative value (see ThresholdWithCarry). Each pixel is binarized based not only on its own value, but on values of some surrounding pixels. During pixel's binarization, its binarization error is distributed (diffused) to some neighbor pixels with some coefficients. This error diffusion updates neighbor pixels changing their values, what affects their upcoming binarization. Error diffuses only on unprocessed yet neighbor pixels, which are right and bottom pixels usually (in the case if image processing is done from upper left corner to bottom right corner). Binarization error equals to processing pixel value, if it is below threshold value, or pixel value minus 255 otherwise.

The filter accepts 8 bpp grayscale images for processing.

상속: BaseInPlacePartialFilter
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET

보호된 프로퍼티들

프로퍼티 타입 설명
startX int
startY int
stopX int
stopY int
stride int
x int
y int

보호된 메소드들

메소드 설명
Diffuse ( int error, byte ptr ) : void

Do error diffusion.

All parameters of the image and current processing pixel's coordinates are initialized in protected members.

ErrorDiffusionDithering ( ) : System

Initializes a new instance of the ErrorDiffusionDithering class.

ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void

Process the filter on the specified image.

메소드 상세

Diffuse() 보호된 추상적인 메소드

Do error diffusion.
All parameters of the image and current processing pixel's coordinates are initialized in protected members.
protected abstract Diffuse ( int error, byte ptr ) : void
error int Current error value.
ptr byte Pointer to current processing pixel.
리턴 void

ErrorDiffusionDithering() 보호된 메소드

Initializes a new instance of the ErrorDiffusionDithering class.
protected ErrorDiffusionDithering ( ) : System
리턴 System

ProcessFilter() 보호된 메소드

Process the filter on the specified image.
protected ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void
image UnmanagedImage Source image data.
rect System.Drawing.Rectangle Image rectangle for processing by the filter.
리턴 void

프로퍼티 상세

startX 보호되어 있는 프로퍼티

Processing X start position.
protected int startX
리턴 int

startY 보호되어 있는 프로퍼티

Processing Y start position.
protected int startY
리턴 int

stopX 보호되어 있는 프로퍼티

Processing X stop position.
protected int stopX
리턴 int

stopY 보호되어 있는 프로퍼티

Processing Y stop position.
protected int stopY
리턴 int

stride 보호되어 있는 프로퍼티

Processing image's stride (line size).
protected int stride
리턴 int

x 보호되어 있는 프로퍼티

Current processing X coordinate.
protected int x
리턴 int

y 보호되어 있는 프로퍼티

Current processing Y coordinate.
protected int y
리턴 int