1from __future__
import annotations
11 Adjusts the saturation of an image by modifying a 3x3 color correction matrix.
13 @supportedPixelformats{ColorMatrixTransformation}
15 This feature modifies the image's color saturation by scaling the chrominance components
16 of the color correction matrix. A higher saturation makes colors more vivid, while a lower
17 value results in more muted tones.
19 The default value for saturation is 1.0.
21 @since ids_peak_icv 1.0
22 @ingroup ids_peak_icv_python_pipeline_features
25 def __init__(self, module: ColorMatrixTransformationModule) ->
None:
28 Creates a SaturationFeature for an existing color matrix transformation module.
29 @param module: Reference to the underlying module
31 @since ids_peak_icv 1.0
39 Indicates whether the feature is currently enabled.
40 @return True if enabled; otherwise, False.
42 @since ids_peak_icv 1.0
44 return self.
_module.saturation_enabled
50 Enables or disables the feature.
51 @param value: Set to True to enable the feature, or False to disable it.
53 @since ids_peak_icv 1.0
55 self.
_module.saturation_enabled = value
60 Resets the saturation value to 1.0.
62 @note The enabled state does not change when calling this function.
64 @since ids_peak_icv 1.0
72 Gets the current saturation value.
73 @return The saturation value currently set.
75 @since ids_peak_icv 1.0
80 def value(self, saturation: float) ->
None:
83 Sets the saturation value.
85 @param saturation: A floating-point value representing the saturation value.
86 Valid values are within the range returned by range property.
88 :raise OutOfRangeException: If saturation is outside the valid range.
90 @since ids_peak_icv 1.0
92 self.
_module.saturation = saturation
98 Retrieves the valid range for the saturation.
100 The returned interval specifies the minimum and maximum values that can be passed to value property.
102 @return An Interval representing the valid saturation range.
104 @since ids_peak_icv 1.0
106 return self.
_module.saturation_range
Abstract base class for all image processing pipeline features.
Adjusts the saturation of an image by modifying a 3x3 color correction matrix.
None reset_to_default(self)
Resets the saturation value to 1.0.
float value(self)
Gets the current saturation value.
None __init__(self, ColorMatrixTransformationModule module)
Creates a SaturationFeature for an existing color matrix transformation module.
bool enabled(self)
Indicates whether the feature is currently enabled.
Interval range(self)
Retrieves the valid range for the saturation.