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 Indicates whether the feature is currently enabled.
44 @return True if enabled; otherwise, False.
46 @since ids_peak_icv 1.0
54 Enables or disables the feature.
55 @param value: Set to True to enable the feature, or False to disable it.
57 @since ids_peak_icv 1.0
64 Resets the pixel list (empty list).
66 @note The enabled state does not change when calling this function.
68 @since ids_peak_icv 1.0
76 Gets the current pixel list.
77 @return The pixel list currently set.
79 @since ids_peak_icv 1.0
81 return self.
_module.hotpixel_list
88 @param pixel_list: A list of points representing the hotpixel.
90 @since ids_peak_icv 1.0
92 self.
_module.hotpixel_list = pixel_list
94 def detect(self, image: Image, sensitivity: int = 3, gain_factor: float = 1.0) ->
None:
97 Performs immediate hot pixel detection on the given image.
99 This method analyzes the provided image and detects hot pixels based on the
100 sensitivity setting. The results are stored internally and can be accessed using pixel_list.
102 Note: Calling this function will overwrite any existing hot pixel list previously set via pixel_list.
104 @param image: The input image to analyze for hot pixel detection.
105 @param sensitivity: Sensitivity for hot pixel detection. A higher sensitivity
106 may result in detecting more hot pixels, including possible
108 @param gain_factor: Gain factor applied to the image. Used to account for
109 increased noise levels when detecting hot pixels.
111 @since ids_peak_icv 1.0
HotpixelCorrection detects and corrects hot pixels in camera images.
None reset_to_default(self)
Resets the pixel list (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)
Indicates whether the feature is currently enabled.
Abstract base class for all image processing pipeline features.