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

Channels filters.

The filter does color channels' filtering by clearing (filling with specified values) values, which are inside/outside of the specified value's range. The filter allows to fill certain ranges of RGB color channels with specified value.

The filter is similar to ColorFiltering, but operates with not entire pixels, but with their RGB values individually. This means that pixel itself may not be filtered (will be kept), but one of its RGB values may be filtered if they are inside/outside of specified range.

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

Sample usage:

// create filter ChannelFiltering filter = new ChannelFiltering( ); // set channels' ranges to keep filter.Red = new IntRange( 0, 255 ); filter.Green = new IntRange( 100, 255 ); filter.Blue = new IntRange( 100, 255 ); // apply the filter filter.ApplyInPlace( image );

Initial image:

Result image:

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

공개 메소드들

메소드 설명
ChannelFiltering ( ) : System

Initializes a new instance of the ChannelFiltering class.

ChannelFiltering ( IntRange red, IntRange green, IntRange blue ) : System

Initializes a new instance of the ChannelFiltering class.

보호된 메소드들

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

Process the filter on the specified image.

비공개 메소드들

메소드 설명
CalculateMap ( IntRange range, byte fill, bool fillOutsideRange, byte map ) : void

Calculate filtering map.

메소드 상세

ChannelFiltering() 공개 메소드

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

ChannelFiltering() 공개 메소드

Initializes a new instance of the ChannelFiltering class.
public ChannelFiltering ( IntRange red, IntRange green, IntRange blue ) : System
red AForge.IntRange Red channel's filtering range.
green AForge.IntRange Green channel's filtering range.
blue AForge.IntRange Blue channel's filtering range.
리턴 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