IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
mirror_feature.py
Go to the documentation of this file.
3
4
6 """!
7 @brief
8 Mirror provides functionality to flip the image left-right or up-down.
9
10 @supportedPixelformats{ImageTransformation}
11
12 @note When processing images with a Bayer pattern, the result may have a different pixel format,
13 though the bit depth remains unchanged. Ensure your application can handle potential pixel format changes
14 after mirroring.
15
16 The default value is no mirroring.
17
18 @since ids_peak_icv 1.0
19 @ingroup ids_peak_icv_python_pipeline_features
20 """
21
22 @property
23 def enabled(self) -> bool:
24 """!
25 @brief
26 Indicates whether the feature is currently enabled.
27 @return True if enabled; otherwise, False.
28
29 @since ids_peak_icv 1.0
30 """
31 return self._module._mirror_enabled
32
33 @enabled.setter
34 def enabled(self, value: bool) -> None:
35 """!
36 @brief
37 Enables or disables the feature.
38 @param value: Set to True to enable the feature, or False to disable it.
39
40 @since ids_peak_icv 1.0
41 """
42 self._module._mirror_enabled = value
43
44 @property
45 def left_right_enabled(self) -> bool:
46 """!
47 @brief
48 Gets the current left-right mirroring setting.
49
50 @return True if left-right mirroring is enabled so that left and right will be flipped.
51
52 @since ids_peak_icv 1.0
53 """
54 return self._module.mirror_left_right
55
56 @left_right_enabled.setter
57 def left_right_enabled(self, value: bool) -> None:
58 """!
59 @brief
60 Sets whether the image should be mirrored left-right.
61
62 @param value: If true, the image will be mirrored along the vertical axis.
63
64 @since ids_peak_icv 1.0
65 """
66 self._module.mirror_left_right = value
67
68 @property
69 def up_down_enabled(self) -> bool:
70 """!
71 @brief
72 Gets the current up-down mirroring setting.
73
74 @return True if up-down mirroring is enabled so that up and down will be flipped.
75
76 @since ids_peak_icv 1.0
77 """
78 return self._module.mirror_up_down
79
80 @up_down_enabled.setter
81 def up_down_enabled(self, value: bool) -> None:
82 """!
83 @brief
84 Sets whether the image should be mirrored up-down.
85
86 @param value: If true, the image will be mirrored along the horizontal axis.
87
88 @since ids_peak_icv 1.0
89 """
90 self._module.mirror_up_down = value
91
92 def reset_to_default(self) -> None:
93 """!
94 @brief
95 Resets the mirroring to no mirroring.
96
97 @note The enabled state does not change when calling this function.
98
99 @since ids_peak_icv 1.0
100 """
102
103 def __init__(self, module: TransformationModule) -> None:
104 """!
105 @brief
106 Creates a MirrorFeature for an existing transformation module.
107
108 @param module: Reference to the underlying TransformationModule.
109
110 @since ids_peak_icv 1.0
111 """
112 self._module = module
Abstract base class for all image processing pipeline features.
Definition ifeature.py:6
Mirror provides functionality to flip the image left-right or up-down.
None reset_to_default(self)
Resets the mirroring to no mirroring.
bool up_down_enabled(self)
Gets the current up-down mirroring setting.
bool left_right_enabled(self)
Gets the current left-right mirroring setting.
None __init__(self, TransformationModule module)
Creates a MirrorFeature for an existing transformation module.
bool enabled(self)
Indicates whether the feature is currently enabled.