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

Textured filter - filter an image using texture.

The filter is similar to TexturedMerge filter in its nature, but instead of working with source image and overly, it uses provided filters to create images to merge (see Filter1 and Filter2 properties). In addition, it uses a bit more complex formula for calculation of destination pixel's value, which gives greater amount of flexibility:
dst = FilterLevel * ( src1 * textureValue + src2 * ( 1.0 - textureValue ) ) + PreserveLevel * src2, where src1 is value of pixel from the image produced by Filter1, src2 is value of pixel from the image produced by Filter2, dst is value of pixel in a destination image and textureValue is corresponding value from provided texture (see TextureGenerator or Texture).

It is possible to set Filter2 to . In this case original source image will be used instead of result produced by the second filter.

The filter 24 bpp color images for processing.

Sample usage #1:

// create filter TexturedFilter filter = new TexturedFilter( new CloudsTexture( ), new HueModifier( 50 ) ); // apply the filter Bitmap newImage = filter.Apply( image );

Sample usage #2:

// create filter TexturedFilter filter = new TexturedFilter( new CloudsTexture( ), new GrayscaleBT709( ), new Sepia( ) ); // apply the filter Bitmap newImage = filter.Apply( image );

Initial image:

Result image #1:

Result image #2:

상속: BaseFilter
파일 보기 프로젝트 열기: accord-net/framework

공개 메소드들

메소드 설명
TexturedFilter ( ITextureGenerator generator, IFilter filter1 ) : System

Initializes a new instance of the TexturedFilter class.

TexturedFilter ( ITextureGenerator generator, IFilter filter1, IFilter filter2 ) : System

Initializes a new instance of the TexturedFilter class.

TexturedFilter ( float texture, IFilter filter1 ) : System

Initializes a new instance of the TexturedFilter class.

TexturedFilter ( float texture, IFilter filter1, IFilter filter2 ) : System

Initializes a new instance of the TexturedFilter class.

보호된 메소드들

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

Process the filter on the specified image.

비공개 메소드들

메소드 설명
TexturedFilter ( ) : System

메소드 상세

ProcessFilter() 보호된 메소드

Process the filter on the specified image.
Texture size does not match image size. Filters should not change image dimension.
protected ProcessFilter ( UnmanagedImage sourceData, UnmanagedImage destinationData ) : void
sourceData UnmanagedImage Source image data.
destinationData UnmanagedImage Destination image data.
리턴 void

TexturedFilter() 공개 메소드

Initializes a new instance of the TexturedFilter class.
public TexturedFilter ( ITextureGenerator generator, IFilter filter1 ) : System
generator ITextureGenerator Texture generator.
filter1 IFilter First filter.
리턴 System

TexturedFilter() 공개 메소드

Initializes a new instance of the TexturedFilter class.
public TexturedFilter ( ITextureGenerator generator, IFilter filter1, IFilter filter2 ) : System
generator ITextureGenerator Texture generator.
filter1 IFilter First filter.
filter2 IFilter Second filter.
리턴 System

TexturedFilter() 공개 메소드

Initializes a new instance of the TexturedFilter class.
public TexturedFilter ( float texture, IFilter filter1 ) : System
texture float Generated texture.
filter1 IFilter First filter.
리턴 System

TexturedFilter() 공개 메소드

Initializes a new instance of the TexturedFilter class.
public TexturedFilter ( float texture, IFilter filter1, IFilter filter2 ) : System
texture float Generated texture.
filter1 IFilter First filter.
filter2 IFilter Second filter.
리턴 System