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

Color filtering in HSL color space.

The filter operates in HSL color space and filters pixels, which color is inside/outside of the specified HSL range - it keeps pixels with colors inside/outside of the specified range and fills the rest with specified color.

The filter accepts 24 and 32 bpp color images for processing.

Sample usage:

// create filter HSLFiltering filter = new HSLFiltering( ); // set color ranges to keep filter.Hue = new IntRange( 335, 0 ); filter.Saturation = new Range( 0.6f, 1 ); filter.Luminance = new Range( 0.1f, 1 ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

Sample usage with saturation update only:

// create filter HSLFiltering filter = new HSLFiltering( ); // configure the filter filter.Hue = new IntRange( 340, 20 ); filter.UpdateLuminance = false; filter.UpdateHue = false; // apply the filter filter.ApplyInPlace( image );

Result image:

상속: BaseInPlacePartialFilter
파일 보기 프로젝트 열기: holisticware-admin/MonoVersal.AForgeNET 1 사용 예제들

공개 메소드들

메소드 설명
HSLFiltering ( ) : System

Initializes a new instance of the HSLFiltering class.

HSLFiltering ( IntRange hue, Range saturation, Range luminance ) : System

Initializes a new instance of the HSLFiltering class.

보호된 메소드들

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

Process the filter on the specified image.

메소드 상세

HSLFiltering() 공개 메소드

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

HSLFiltering() 공개 메소드

Initializes a new instance of the HSLFiltering class.
public HSLFiltering ( IntRange hue, Range saturation, Range luminance ) : System
hue AForge.IntRange Range of hue component.
saturation AForge.Range Range of saturation component.
luminance AForge.Range Range of luminance component.
리턴 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