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

Adaptive Smoothing - noise removal with edges preserving.

The filter is aimed to perform image smoothing, but keeping sharp edges. This makes it applicable to additive noise removal and smoothing objects' interiors, but not applicable for spikes (salt and pepper noise) removal.

The next calculations are done for each pixel: weights are calculate for 9 pixels - pixel itself and 8 neighbors: w(x, y) = exp( -1 * (Gx^2 + Gy^2) / (2 * factor^2) ) Gx(x, y) = (I(x + 1, y) - I(x - 1, y)) / 2 Gy(x, y) = (I(x, y + 1) - I(x, y - 1)) / 2 , where factor is a configurable value determining smoothing's quality. sum of 9 weights is calclated (weightTotal); sum of 9 weighted pixel values is calculatd (total); destination pixel is calculated as total / weightTotal.

Description of the filter was found in "An Edge Detection Technique Using the Facet Model and Parameterized Relaxation Labeling" by Ioannis Matalas, Student Member, IEEE, Ralph Benjamin, and Richard Kitney.

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

Sample usage:

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

Initial image:

Result image:

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

공개 메소드들

메소드 설명
AdaptiveSmoothing ( ) : System

Initializes a new instance of the AdaptiveSmoothing class.

AdaptiveSmoothing ( double factor ) : System

Initializes a new instance of the AdaptiveSmoothing class.

보호된 메소드들

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

Process the filter on the specified image.

메소드 상세

AdaptiveSmoothing() 공개 메소드

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

AdaptiveSmoothing() 공개 메소드

Initializes a new instance of the AdaptiveSmoothing class.
public AdaptiveSmoothing ( double factor ) : System
factor double Factor value.
리턴 System

ProcessFilter() 보호된 메소드

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