Grayscale Filter
Grayscale Filter
Section titled “Grayscale Filter” Category Filters
Is Pair Node: No
Creates a grayscale filter that can be applied to an image. The filter can be customized with different modes and factors to achieve various grayscale effects.
Grayscale Mode
Section titled “Grayscale Mode”The Grayscale Mode
input allows you to choose how the grayscale effect is calculated. The available modes are:
- Weighted: This mode applies a weighted average to the RGB channels, giving more importance to the green channel, which is more sensitive to human vision. (R: 0.299, G: 0.587, B: 0.114, A: 0)
- Average: This mode calculates the average of the RGB channels, treating all channels equally. (R: 1/3, G: 1/3, B: 1/3, A: 0)
- Custom: This mode allows you to specify custom weights for each channel using the
Weight Factor
input. The values represent the contribution of red, green, and blue channels respectively.
Inputs
Section titled “Inputs” Type: Grayscale Mode (Enum)
Default: Weighted
The mode of the grayscale filter. This determines how the grayscale effect is calculated and applied to the input image.
Factor
Section titled “ Factor ” Type: Double
Default: 1
Min: 0
Max: 1
The factor by which the grayscale effect is applied. A value of 1 means full grayscale, while a value of 0 means no effect.
Normalize
Section titled “ Normalize ” Type: Boolean
Default: true
Whether to normalize the grayscale values. If true, the grayscale values will be adjusted to fit within the range of 0 to 1.
Weight Factor
Section titled “ Weight Factor ” Type: Vec3D
Default: (1, 1, 1)
The weight factor for each channel in the grayscale calculation. This is used when the mode is set to Custom. The values represent the contribution of red, green, and blue channels respectively.
Previous
Section titled “ Previous ” Type: Filter
Default: null
The previous filter in the chain. It will be applied before the grayscale filter.
Outputs
Section titled “Outputs” Filters
Section titled “ Filters ” Type: Filter
Default: null
Grayscale filter that can be applied to the image