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

Extract RGB channel from image.

Extracts specified channel of color image and returns it as grayscale image.

The filter accepts 24, 32, 48 and 64 bpp color images and produces 8 (if source is 24 or 32 bpp image) or 16 (if source is 48 or 64 bpp image) bpp grayscale image.

Sample usage:

// create filter ExtractChannel filter = new ExtractChannel( RGB.G ); // apply the filter Bitmap channelImage = filter.Apply( image );

Initial image:

Result image:

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

공개 메소드들

메소드 설명
ExtractChannel ( ) : System

Initializes a new instance of the ExtractChannel class.

ExtractChannel ( short channel ) : System

Initializes a new instance of the ExtractChannel class.

보호된 메소드들

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

Process the filter on the specified image.

메소드 상세

ExtractChannel() 공개 메소드

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

ExtractChannel() 공개 메소드

Initializes a new instance of the ExtractChannel class.
public ExtractChannel ( short channel ) : System
channel short ARGB channel to extract.
리턴 System

ProcessFilter() 보호된 메소드

Process the filter on the specified image.
Can not extract alpha channel from none ARGB image. The /// exception is throw, when alpha channel is requested from RGB image.
protected ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void
sourceData UnmanagedImage Source image data.
destinationData UnmanagedImage Destination image data.
리턴 void