IDS peak ICV v1.5.0
Loading...
Searching...
No Matches
HotpixelCorrectionModule Class Reference
Inheritance diagram for HotpixelCorrectionModule:

Public Member Functions

None __init__ (self)
 Creates a HotpixelCorrectionModule module with default settings (no correction).
 
str type (self)
 Returns the type of the module for serialization purposes.
 
bool enabled (self)
 Gets whether this module is enabled.
 
None enabled (self, bool enabled)
 Enables or disables the module.
 
PointArray hotpixel_list (self)
 Gets the current array of known hot pixels.
 
None hotpixel_list (self, PointArray pixel_list)
 Sets the array of known hot pixels.
 
Interval sensitivity_range (self)
 Gets the valid range for sensitivity.
 
None detect (self, Image image, int sensitivity=3, float gain_factor=1.0)
 Performs immediate hot pixel detection on the given image.
 
Image process (self, Image input_image)
 Applies hot pixel correction to the input image in place and returns a reference to the modified image.
 
None reset_to_default (self)
 Resets the hotpixel list to its default value (empty list).
 
None serialize (self, IArchive archive)
 Serializes the object's internal state into the provided archive.
 
None deserialize (self, IArchive archive)
 Restores the object's state from the provided archive.
 

Data Fields

 enabled
 
 hotpixel_list = []
 

Static Public Attributes

np DEFAULT_HOTPIXEL_LIST = np.empty(0, dtype=Point)
 

Protected Member Functions

None _apply_pixel_list (self)
 
None _call_backend_set_list (self, npt.NDArray pixel_list)
 
None _call_backend_get_list (self)
 

Protected Attributes

bool _hotpixel_correction_enabled = True
 
np.ndarray|None _hotpixel_list = self.DEFAULT_HOTPIXEL_LIST
 
 _handle = _hotpixel_correction_handle
 
np _hotpixel_list
 
 _enabled
 

Detailed Description

Hotpixel correction is an image pipeline module for detecting and correcting hot pixels in camera images.

Provides the feature HotpixelCorrectionFeature.

Since
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self)

Creates a HotpixelCorrectionModule module with default settings (no correction).

Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

Member Function Documentation

◆ _apply_pixel_list()

None _apply_pixel_list ( self)
protected

◆ _call_backend_get_list()

None _call_backend_get_list ( self)
protected

◆ _call_backend_set_list()

None _call_backend_set_list ( self,
npt.NDArray pixel_list )
protected

◆ deserialize()

None deserialize ( self,
IArchive archive )

Restores the object's state from the provided archive.

This function reads and applies all necessary parameters from the given archive to reconstruct the internal state of the object. It ensures that the object is restored to a valid and consistent state.

Parameters
archiveThe source archive containing the serialized parameters.
Exceptions
CorruptedExceptionIf Archive is malformed, misses keys or the values are invalid
NotSupportedExceptionIf the 'Version' entry indicates an unsupported version.
Note
This function requires that the archive contains all expected fields as produced by a corresponding serialize() call.
Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

◆ detect()

None detect ( self,
Image image,
int sensitivity = 3,
float gain_factor = 1.0 )

Performs immediate hot pixel detection on the given image.

This method analyzes the provided image and detects hot pixels based on the sensitivity setting. The results are stored internally and can be accessed using pixel_list.

Note: Calling this function will overwrite any existing hot pixel list previously set via pixel_list.

Parameters
imageThe input image to analyze for hot pixel detection.
sensitivitySensitivity for hot pixel detection. A higher sensitivity may result in detecting more hot pixels, including possible false positives.
gain_factorGain factor applied to the image. Used to account for increased noise levels when detecting hot pixels.
Exceptions
NotSupportedExceptionIf image has any other than the supported pixel formats.
Since
ids_peak_icv 1.0

◆ enabled() [1/2]

bool enabled ( self)

Gets whether this module is enabled.

When disabled, :func:process returns the input image unchanged.

Returns
True if the module is enabled, False otherwise.
Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

◆ enabled() [2/2]

None enabled ( self,
bool enabled )

Enables or disables the module.

When disabled, :func:process returns the input image unchanged.

Parameters
enabledTrue to enable, False to disable.
Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

◆ hotpixel_list() [1/2]

PointArray hotpixel_list ( self)

Gets the current array of known hot pixels.

Returns
An array containing the positions of all configured hot pixels.
Since
ids_peak_icv 1.0

◆ hotpixel_list() [2/2]

None hotpixel_list ( self,
PointArray pixel_list )

Sets the array of known hot pixels.

Parameters
pixel_listAn array of hot pixel positions to use.
Since
ids_peak_icv 1.0

◆ process()

Image process ( self,
Image input_image )

Applies hot pixel correction to the input image in place and returns a reference to the modified image.

Supported pixel formats
  • Mono8
  • Mono10
  • Mono12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGR8
  • BayerGR10
  • BayerGR12

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

The correction is performed based on the current configuration of the module. The operation modifies the input image directly and does not create a copy.

Supported pixel formats
  • Mono8
  • Mono10
  • Mono12
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGR8
  • BayerGR10
  • BayerGR12

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

Images with other formats are passed through unmodified.

This operation disregards any specified image regions and processes the entire image.

Parameters
input_imageThe input image to be processed and corrected.
Exceptions
NotSupportedExceptionIf image has any other than the supported pixel formats.
Returns
A new image with hotpixel correction applied.
Since
ids_peak_icv 1.0

◆ reset_to_default()

None reset_to_default ( self)

Resets the hotpixel list to its default value (empty list).

Note
The enabled state does not change when calling this function.
Since
ids_peak_icv 1.0

◆ sensitivity_range()

Interval sensitivity_range ( self)

Gets the valid range for sensitivity.

Returns
The valid sensitivity range.
Since
ids_peak_icv 1.0

◆ serialize()

None serialize ( self,
IArchive archive )

Serializes the object's internal state into the provided archive.

This function populates the given archive with all parameters required to fully represent the current state of the object. It ensures that the object can be reconstructed or transmitted accurately by saving all relevant data members in a consistent and structured format.

Parameters
archiveThe target archive that will store the serialized parameters.
Since
ids_peak_icv 1.0

Reimplemented from ModuleBase.

◆ type()

str type ( self)

Returns the type of the module for serialization purposes.

Returns
Module type
Since
ids_peak_icv 1.0

Field Documentation

◆ _enabled

_enabled
protected

◆ _handle

_handle = _hotpixel_correction_handle
protected

◆ _hotpixel_correction_enabled

bool _hotpixel_correction_enabled = True
protected

◆ _hotpixel_list [1/2]

_hotpixel_list = self.DEFAULT_HOTPIXEL_LIST
protected

◆ _hotpixel_list [2/2]

np _hotpixel_list
protected

◆ DEFAULT_HOTPIXEL_LIST

np DEFAULT_HOTPIXEL_LIST = np.empty(0, dtype=Point)
static

◆ enabled

enabled

◆ hotpixel_list

hotpixel_list = []