1from __future__
import annotations
5from ids_peak_icv
import Image
13 HotpixelCorrection detects and corrects hot pixels in camera images.
15 @supportedPixelformats{HotpixelCorrection}
17 The HotpixelCorrection class is responsible for identifying and correcting defective pixels that consistently
18 report higher-than-expected intensity values.
20 It allows fine-tuning of the detection sensitivity and management of a hot pixel
21 correction list, which is applied during image processing through the process() method.
23 The default value is an empty hotpixel correction list.
25 @since ids_peak_icv 1.0
26 @ingroup ids_peak_icv_python_pipeline_features
29 def __init__(self, module: HotpixelCorrectionModule) ->
None:
32 Creates a HotpixelCorrectionFeature for an existing hotpixel correction module.
33 @param module: Reference to the underlying module
35 @since ids_peak_icv 1.0
43 Gets whether this feature is currently enabled.
45 @return True if enabled; otherwise False.
47 @since ids_peak_icv 1.0
55 Enables or disables the feature.
57 @param enabled: True to enable, False to disable.
59 @since ids_peak_icv 1.0
66 Resets the hotpixel list to its default value (empty list).
68 @note The enabled state does not change when calling this function.
70 @since ids_peak_icv 1.0
78 Gets the current pixel list.
79 @return The pixel list currently set.
81 @since ids_peak_icv 1.0
83 return self.
_module.hotpixel_list
90 @param pixel_list: A list of points representing the hotpixel.
92 @since ids_peak_icv 1.0
94 self.
_module.hotpixel_list = pixel_list
96 def detect(self, image: Image, sensitivity: int = 3, gain_factor: float = 1.0) ->
None:
99 Performs immediate hot pixel detection on the given image.
101 This method analyzes the provided image and detects hot pixels based on the
102 sensitivity setting. The results are stored internally and can be accessed using pixel_list.
104 Note: Calling this function will overwrite any existing hot pixel list previously set via pixel_list.
106 @param image: The input image to analyze for hot pixel detection.
107 @param sensitivity: Sensitivity for hot pixel detection. A higher sensitivity
108 may result in detecting more hot pixels, including possible
110 @param gain_factor: Gain factor applied to the image. Used to account for
111 increased noise levels when detecting hot pixels.
113 @since ids_peak_icv 1.0
HotpixelCorrection detects and corrects hot pixels in camera images.
None reset_to_default(self)
Resets the hotpixel list to its default value (empty list).
None __init__(self, HotpixelCorrectionModule module)
Creates a HotpixelCorrectionFeature for an existing hotpixel correction module.
None detect(self, Image image, int sensitivity=3, float gain_factor=1.0)
Performs immediate hot pixel detection on the given image.
np.ndarray hotpixel_list(self)
Gets the current pixel list.
bool enabled(self)
Gets whether this feature is currently enabled.
Abstract base class for all image processing pipeline features.