Textured filter - filter an image using texture.

Namespace:  AForge.Imaging.Filters
Assembly:  AForge.Imaging (in AForge.Imaging.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public class TexturedFilter : BaseFilter

Remarks

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).

Note:It is possible to set Filter2 to nullNothingnullptra null reference (Nothing in Visual Basic). 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:

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

Sample usage #2:

CopyC#
// 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:

Inheritance Hierarchy

System..::.Object
  AForge.Imaging.Filters..::.BaseFilter
    AForge.Imaging.Filters..::.TexturedFilter

See Also