IDS peak ICV v1.1.0
Loading...
Searching...
No Matches
HotpixelCorrectionModule Class Reference

#include <peak_icv/pipeline/detail/peak_icv_hotpixel_correction_module.hpp>

Inheritance diagram for HotpixelCorrectionModule:

Public Member Functions

 HotpixelCorrectionModule ()
 Creates a HotpixelCorrectionModule module with default settings (no correction).
 
 ~HotpixelCorrectionModule () override
 
 HotpixelCorrectionModule (const HotpixelCorrectionModule &other)=delete
 Copy constructor for class HotpixelCorrectionModule is deleted.
 
 HotpixelCorrectionModule (HotpixelCorrectionModule &&other) noexcept
 
HotpixelCorrectionModule & operator= (const HotpixelCorrectionModule &other)=delete
 Copy assignment for class HotpixelCorrectionModule is deleted.
 
HotpixelCorrectionModule & operator= (HotpixelCorrectionModule &&other) noexcept
 
void SetEnabled (bool enabled) override
 Sets the enabled state of this module.
 
bool IsEnabled () const override
 Checks if the module is currently enabled.
 
const char * GetType () const override
 Returns the type of the module for serialization purposes.
 
peak::icv::Image Process (const peak::icv::Image &input) const
 Applies hot pixel correction to the input image in place and returns a reference to the modified image.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Applies hot pixel correction to the input image in place and returns a reference to the modified image.
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the object's internal state into the provided archive.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Restores the object's state from the provided archive.
 
void SetList (const std::vector< peak::common::Point > &hotpixels)
 Sets the list of known hot pixels.
 
std::vector< peak::common::Point > GetList () const
 Retrieves the current list of known hot pixels.
 
peak::common::IntervalU GetSensitivityRange () const
 Returns the valid range of sensitivities.
 
void Detect (const peak::icv::Image &image, uint32_t sensitivity=3, float gainFactor=1.0F)
 Performs immediate hot pixel detection on the given image.
 
void ResetToDefault () override
 Clears the hot pixel list.
 

Detailed Description

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

The HotpixelCorrection class is responsible for identifying and correcting defective pixels that consistently report higher-than-expected intensity values.

It allows fine-tuning of the detection sensitivity and management of a hot pixel correction list, which is applied during image processing through the Process() method.

Since
ids_peak_icv 1.0

Definition at line 35 of file peak_icv_hotpixel_correction_module.hpp.

Constructor & Destructor Documentation

◆ HotpixelCorrectionModule() [1/3]

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

Since
ids_peak_icv 1.0

Definition at line 259 of file peak_icv_hotpixel_correction_module.hpp.

◆ ~HotpixelCorrectionModule()

~HotpixelCorrectionModule ( )
inlineoverride
Since
ids_peak_icv 1.0

Definition at line 266 of file peak_icv_hotpixel_correction_module.hpp.

◆ HotpixelCorrectionModule() [2/3]

Copy constructor for class HotpixelCorrectionModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ HotpixelCorrectionModule() [3/3]

Since
ids_peak_icv 1.0

Definition at line 274 of file peak_icv_hotpixel_correction_module.hpp.

Member Function Documentation

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
inlineoverridevirtual

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

Implements ISerializable.

Definition at line 326 of file peak_icv_hotpixel_correction_module.hpp.

◆ Detect()

void Detect ( const peak::icv::Image & image,
uint32_t sensitivity = 3,
float gainFactor = 1.0F )
inline

Performs immediate hot pixel detection on the given image.

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

Note
Supported pixel formats: BayerGR8, BayerGR10, BayerGR12, BayerRG8, BayerRG10, BayerRG12, BayerGB8, BayerGB10, BayerGB12, BayerBG8, BayerBG10, BayerBG12, Mono8, Mono10, Mono12
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. Valid values are within the range returned by GetSensitivityRange.
gainFactorGain factor applied to the image (typically 1.0 or higher). Used to account for increased noise levels when detecting hot pixels. Higher gain factors may require higher sensitivity values for effective detection.
Exceptions
OutOfRangeExceptionIf sensitivity value is outside the valid range.
NotSupportedExceptionIf image has any other than the supported pixel formats.
Warning
Calling this function will overwrite any existing hot pixel list previously set via SetList(). All previously configured hot pixel positions will be lost.
See also
SetList(), GetList(), GetSensitivityRange()
Since
ids_peak_icv 1.0

Definition at line 387 of file peak_icv_hotpixel_correction_module.hpp.

◆ GetList()

std::vector< peak::common::Point > GetList ( ) const
inline

Retrieves the current list of known hot pixels.

Returns
A vector containing the positions of all configured hot pixels.
Since
ids_peak_icv 1.0

Definition at line 362 of file peak_icv_hotpixel_correction_module.hpp.

◆ GetSensitivityRange()

peak::common::IntervalU GetSensitivityRange ( ) const
inline

Returns the valid range of sensitivities.

Returns
An IntervalU containing the minimum and maximum allowed sensitivity values.
Since
ids_peak_icv 1.0

Definition at line 431 of file peak_icv_hotpixel_correction_module.hpp.

◆ GetType()

const char * GetType ( ) const
inlineoverridevirtual

Returns the type of the module for serialization purposes.

Returns
A string representing the module's type.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 254 of file peak_icv_hotpixel_correction_module.hpp.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Checks if the module is currently enabled.

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

Implements IModule.

Definition at line 303 of file peak_icv_hotpixel_correction_module.hpp.

◆ operator=() [1/2]

HotpixelCorrectionModule & operator= ( const HotpixelCorrectionModule & other)
delete

Copy assignment for class HotpixelCorrectionModule is deleted.

Note
If you need to copy a module, you can create a new one and copy the parameters via Serialize() and Deserialize().
Since
ids_peak_icv 1.0

◆ operator=() [2/2]

HotpixelCorrectionModule & operator= ( HotpixelCorrectionModule && other)
inlinenoexcept
Since
ids_peak_icv 1.0

Definition at line 280 of file peak_icv_hotpixel_correction_module.hpp.

◆ Process() [1/2]

peak::common::Any Process ( const peak::common::Any & input) const
inlineoverridevirtual

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

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.

Note
Supported pixel formats: BayerGR8, BayerGR10, BayerGR12, BayerRG8, BayerRG10, BayerRG12, BayerGB8, BayerGB10, BayerGB12, BayerBG8, BayerBG10, BayerBG12, Mono8, Mono10, Mono12.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed and corrected.
Returns
A reference to the input image after in-place hot pixel correction.
Exceptions
peak::common::InvalidCastExceptionIf the input cast to peak::icv::Image failed.
NotSupportedExceptionIf image has any other than the supported pixel formats.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 406 of file peak_icv_hotpixel_correction_module.hpp.

◆ Process() [2/2]

peak::icv::Image Process ( const peak::icv::Image & input) const
inline

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

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.

Note
Supported pixel formats: BayerGR8, BayerGR10, BayerGR12, BayerRG8, BayerRG10, BayerRG12, BayerGB8, BayerGB10, BayerGB12, BayerBG8, BayerBG10, BayerBG12, Mono8, Mono10, Mono12.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed and corrected.
Returns
A reference to the input image after in-place hot pixel correction.
Exceptions
NotSupportedExceptionIf image has any other than the supported pixel formats.
Since
ids_peak_icv 1.0

Definition at line 401 of file peak_icv_hotpixel_correction_module.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Clears the hot pixel list.

Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 396 of file peak_icv_hotpixel_correction_module.hpp.

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
inlineoverridevirtual

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

Implements ISerializable.

Definition at line 308 of file peak_icv_hotpixel_correction_module.hpp.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Sets the enabled state of this module.

Parameters
enabledIf true, the module is enabled; otherwise, it is disabled.
Since
ids_peak_icv 1.0

Implements IModule.

Definition at line 298 of file peak_icv_hotpixel_correction_module.hpp.

◆ SetList()

void SetList ( const std::vector< peak::common::Point > & hotpixels)
inline

Sets the list of known hot pixels.

Parameters
hotpixelsA vector of hot pixel positions to use.
Since
ids_peak_icv 1.0

Definition at line 343 of file peak_icv_hotpixel_correction_module.hpp.