1from __future__
import annotations
3from ids_peak_common.datatypes.interval
import Interval
11 Decimation is used to decrease the image size.
13 @supportedPixelformats{Downsampling}
15 This method reduces resolution by selecting (i.e., skipping) pixels at regular intervals
16 along columns (x), rows (y) or both.
17 It is computationally efficient but may introduce aliasing.
19 @note Processes the entire image, ignoring any specified image region.
20 @note As with binning, the alpha channel of the input image (if present) is also ignored during decimation.
21 It is always set to the maximum possible pixel value.
22 @note Decimation permanently reduces image resolution. The original resolution cannot be recovered
23 after decimation is applied.
25 Default Configuration:
28 - DownsamplingMode.Decimation
30 @since ids_peak_icv 1.0
31 @ingroup ids_peak_icv_python_pipeline_features
34 def __init__(self, module: DownsamplingModule) ->
None:
37 Creates a DecimationFeature for an existing downsampling module.
39 @param module: module Reference to the underlying DownsamplingModule.
48 Gets whether this feature is currently enabled.
50 @return True if enabled; otherwise False.
58 Enables or disables the feature.
60 @param enabled: True to enable, False to disable.
67 Resets all settings to their defaults.
69 Default configuration:
72 - mode = DownsamplingMode.Decimation
74 @note The enabled state does not change when calling this function.
84 Gets the current number of columns used for decimation.
86 @return The current number of columns used for decimation.
87 The decimation algorithm uses one column, skips the next x - 1 columns, and repeats this process.
92 def x(self, value: int) ->
None:
95 Sets the number of columns used for decimation.
97 @param value: The number of columns used for decimation.
98 The decimation algorithm uses one column, skips the next x - 1 columns, and repeats this process.
99 Valid values are within the range returned by object.range.
101 @exception OutOfRangeException: If value is outside the valid range.
109 Gets the current number of rows used for decimation.
110 @return The current number of rows used for decimation.
111 The decimation algorithm uses one row, skips the next y - 1 rows, and repeats this process.
116 def y(self, value: int) ->
None:
119 Sets the number of rows used for decimation.
121 @param value: The number of rows used for decimation.
122 The decimation algorithm uses one row, skips the next y - 1 rows, and repeats this process.
123 Valid values are within the range returned by object.range.
125 @exception OutOfRangeException: If value is outside the valid range.
133 Gets the valid range for the decimation factors x and y.
135 The returned interval specifies the minimum and maximum values that can be passed to the property x or y.
137 @return An IntervalU representing the valid decimation factor range.
Decimation is used to decrease the image size.
None reset_to_default(self)
Resets all settings to their defaults.
None __init__(self, DownsamplingModule module)
Creates a DecimationFeature for an existing downsampling module.
int y(self)
Gets the current number of rows used for decimation.
bool enabled(self)
Gets whether this feature is currently enabled.
int x(self)
Gets the current number of columns used for decimation.
Interval range(self)
Gets the valid range for the decimation factors x and y.
Abstract base class for all image processing pipeline features.