C# 클래스 Accord.Imaging.Filters.Threshold

Threshold binarization.

The filter does image binarization using specified threshold value. All pixels with intensities equal or higher than threshold value are converted to white pixels. All other pixels with intensities below threshold value are converted to black pixels.

The filter accepts 8 and 16 bpp grayscale images for processing.

Since the filter can be applied as to 8 bpp and to 16 bpp images, the ThresholdValue value should be set appropriately to the pixel format. In the case of 8 bpp images the threshold value is in the [0, 255] range, but in the case of 16 bpp images the threshold value is in the [0, 65535] range.

Sample usage:

// create filter Threshold filter = new Threshold( 100 ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

상속: BaseInPlacePartialFilter
파일 보기 프로젝트 열기: accord-net/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
threshold int

공개 메소드들

메소드 설명
Threshold ( ) : System

Initializes a new instance of the Threshold class.

Threshold ( int threshold ) : System

Initializes a new instance of the Threshold class.

보호된 메소드들

메소드 설명
ProcessFilter ( UnmanagedImage image, Rectangle rect ) : void

Process the filter on the specified image.

메소드 상세

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

Threshold() 공개 메소드

Initializes a new instance of the Threshold class.
public Threshold ( ) : System
리턴 System

Threshold() 공개 메소드

Initializes a new instance of the Threshold class.
public Threshold ( int threshold ) : System
threshold int Threshold value.
리턴 System

프로퍼티 상세

threshold 보호되어 있는 프로퍼티

Threshold value.
protected int threshold
리턴 int