1from __future__
import annotations
3from ids_peak_common.datatypes.interval
import Interval
11 Provides access to sharpening settings within an image processing pipeline.
13 @supportedPixelformats{Sharpening}
15 This feature emphasizes edges and fine structures by increasing contrast between adjacent pixels.
16 The strength of the sharpening effect is controlled by the `value` property, where a value of 0
17 applies no sharpening. Higher values increase the sharpening effect.
20 Increasing the sharpness level can also amplify image noise and introduce visual artifacts
21 such as halos around edges. Moderate values are recommended for optimal results.
23 The default level for sharpening is 0.
25 @since ids_peak_icv 1.0
26 @ingroup ids_peak_icv_python_pipeline_features
29 def __init__(self, module: SharpeningModule) ->
None:
32 Initialize the SharpeningFeature to manage the specified sharpening module.
34 @param module: Reference to the underlying SharpeningModule
36 @since ids_peak_icv 1.0
44 Gets whether this feature is currently enabled.
46 @return True if enabled; otherwise False.
48 @since ids_peak_icv 1.0
56 Enables or disables the feature.
58 @param enabled: True to enable, False to disable.
60 @since ids_peak_icv 1.0
67 Resets the sharpness level to its default value (0).
69 @note The enabled state is not changed when calling this function.
71 @since ids_peak_icv 1.0
79 Gets the current sharpness level.
81 @return The current sharpening level.
83 @since ids_peak_icv 1.0
88 def level(self, level: int) ->
None:
91 Sets the sharpness level.
93 @param level: An integer representing the desired sharpness level.
94 The acceptable range of values can be obtained from the range property.
96 @exception OutOfRangeException: If the level is outside the valid range.
98 @since ids_peak_icv 1.0
106 Retrieves the valid range of sharpness levels.
108 @return An Interval object containing minimum and maximum allowed values.
110 @since ids_peak_icv 1.0
112 return self.
_module.level_range
Abstract base class for all image processing pipeline features.
Provides access to sharpening settings within an image processing pipeline.
None reset_to_default(self)
Resets the sharpness level to its default value (0).
None __init__(self, SharpeningModule module)
Initialize the SharpeningFeature to manage the specified sharpening module.
bool enabled(self)
Gets whether this feature is currently enabled.
int level(self)
Gets the current sharpness level.
Interval range(self)
Retrieves the valid range of sharpness levels.