TexturedFilter Class |
Namespace: Accord.Imaging.Filters
The TexturedFilter type exposes the following members.
Name | Description | |
---|---|---|
TexturedFilter(Single, IFilter) |
Initializes a new instance of the TexturedFilter class.
| |
TexturedFilter(ITextureGenerator, IFilter) |
Initializes a new instance of the TexturedFilter class.
| |
TexturedFilter(Single, IFilter, IFilter) |
Initializes a new instance of the TexturedFilter class.
| |
TexturedFilter(ITextureGenerator, IFilter, IFilter) |
Initializes a new instance of the TexturedFilter class.
|
Name | Description | |
---|---|---|
Filter1 |
First filter.
| |
Filter2 |
Second filter
| |
FilterLevel |
Filter level value, [0, 1].
| |
FormatTranslations |
Format translations dictionary.
(Overrides BaseFilterFormatTranslations.) | |
PreserveLevel |
Preserve level value
| |
Texture |
Generated texture.
| |
TextureGenerator |
Texture generator.
|
Name | Description | |
---|---|---|
Apply(Bitmap) |
Apply filter to an image.
(Inherited from BaseFilter.) | |
Apply(BitmapData) |
Apply filter to an image.
(Inherited from BaseFilter.) | |
Apply(UnmanagedImage) |
Apply filter to an image in unmanaged memory.
(Inherited from BaseFilter.) | |
Apply(UnmanagedImage, UnmanagedImage) |
Apply filter to an image in unmanaged memory.
(Inherited from BaseFilter.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProcessFilter |
Process the filter on the specified image.
(Overrides BaseFilterProcessFilter(UnmanagedImage, UnmanagedImage).) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
HasMethod |
Checks whether an object implements a method with the given name.
(Defined by ExtensionMethods.) | |
IsEqual |
Compares two objects for equality, performing an elementwise
comparison if the elements are vectors or matrices.
(Defined by Matrix.) | |
To(Type) | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) | |
ToT | Overloaded.
Converts an object into another type, irrespective of whether
the conversion can be done at compile time or not. This can be
used to convert generic types to numeric types during runtime.
(Defined by ExtensionMethods.) |
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 . 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: