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

Horizontal run length smoothing algorithm.

The class implements horizontal run length smoothing algorithm, which is described in: K.Y. Wong, R.G. Casey and F.M. Wahl, "Document analysis system," IBM J. Res. Devel., Vol. 26, NO. 6,111). 647-656, 1982.

Unlike the original description of this algorithm, this implementation must be applied to inverted binary images containing document, i.e. white text on black background. So this implementation fills horizontal black gaps between white pixels.

This algorithm is usually used together with VerticalRunLengthSmoothing, Intersect and then further analysis of white blobs.

The filter accepts 8 bpp grayscale images, which are supposed to be binary inverted documents.

Sample usage:

// create filter HorizontalRunLengthSmoothing hrls = new HorizontalRunLengthSmoothing( 32 ); // apply the filter hrls.ApplyInPlace( image );

Source image:

Result image:

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

공개 메소드들

메소드 설명
HorizontalRunLengthSmoothing ( ) : System

Initializes a new instance of the HorizontalRunLengthSmoothing class.

HorizontalRunLengthSmoothing ( int maxGapSize ) : System

Initializes a new instance of the HorizontalRunLengthSmoothing class.

보호된 메소드들

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

Process the filter on the specified image.

메소드 상세

HorizontalRunLengthSmoothing() 공개 메소드

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

HorizontalRunLengthSmoothing() 공개 메소드

Initializes a new instance of the HorizontalRunLengthSmoothing class.
public HorizontalRunLengthSmoothing ( int maxGapSize ) : System
maxGapSize int Maximum gap size to fill (see ).
리턴 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