![]() |
IDS peak IPL v1.15.0
|
Algorithm for (adaptive) hotpixel detection and correction. More...
#include <peak_ipl/algorithm/peak_ipl_hotpixel_correction.hpp>
Public Types | |
| enum class | SensitivityLevel { Invalid , SensitivityLevel1 , SensitivityLevel2 , SensitivityLevel3 , SensitivityLevel4 , SensitivityLevel5 } |
| SensitivityLevel parameter for the HotpixelCorrection algorithm. More... | |
Public Member Functions | |
| HotpixelCorrection () | |
| Constructor for a new HotpixelCorrection instance. | |
| ~HotpixelCorrection () | |
| Destructor for the HotpixelCorrection instance. | |
| HotpixelCorrection (const HotpixelCorrection &other) | |
| Copy Constructor for a new HotpixelCorrection instance. | |
| HotpixelCorrection & | operator= (const HotpixelCorrection &other) |
| Copy assigment for HotpixelCorrection instance. | |
| HotpixelCorrection (HotpixelCorrection &&other) noexcept | |
| Move constructor for HotpixelCorrection instance. | |
| HotpixelCorrection & | operator= (HotpixelCorrection &&other) noexcept |
| Move assignment for HotpixelCorrection instance. | |
| void | SetSensitivity (SensitivityLevel sensitivityLevel=SensitivityLevel::SensitivityLevel3) |
| Sets the sensitivity of the hotpixel detection. | |
| SensitivityLevel | Sensitivity () const |
| Returns the current sensitivity. | |
| void | SetGainFactorPercent (uint32_t gainFactorPercent=100) |
| Sets the gain factor in percent. | |
| uint32_t | GainFactorPercent () const |
| Returns the current gain factor in percent. | |
| std::vector< Point2D > | Detect (const Image &inputImage) const |
| Detects hotpixels in the given image. | |
| Image | Correct (const Image &inputImage, const std::vector< Point2D > &hotpixels) const |
| Corrects the given hotpixels in the given image. | |
| Image & | CorrectInPlace (Image &inputImage, const std::vector< Point2D > &hotpixels) const |
| Corrects the given hotpixels inplace in the given image. | |
| Image | CorrectAdaptive (const Image &inputImage) |
| Corrects the given image adaptively. | |
| Image & | CorrectAdaptiveInPlace (Image &inputImage) |
| Corrects the given image inplace adaptively. | |
Algorithm for (adaptive) hotpixel detection and correction.
This algorithm corrects hotpixels either manually by correcting a predefined list of pixels or adaptively by automatically updating the list of pixels to correct. In manual mode, pass a list of hotpixels to Correct(). The hotpixels can be obtained using Detect(), or from a different source, e.g. retrieved directly from the camera from an initial hotpixel calibration. In adaptive mode, just keep passing new images to CorrectAdaptive(). Hotpixels are then detected and corrected automatically.
|
strong |
SensitivityLevel parameter for the HotpixelCorrection algorithm.
Higher sensitivity levels mean more hotpixels will be detected and corrected, but can also lead to more false-positives.
| Enumerator | |
|---|---|
| Invalid | |
| SensitivityLevel1 | |
| SensitivityLevel2 | |
| SensitivityLevel3 | default |
| SensitivityLevel4 | |
| SensitivityLevel5 | |
|
inline |
Constructor for a new HotpixelCorrection instance.
Creates a new HotpixelCorrection instance.
|
inline |
|
inline |
Copy Constructor for a new HotpixelCorrection instance.
Creates a new HotpixelCorrection instance.
| [in] | other | The other instance to acquire a reference for. |
|
inlinenoexcept |
Move constructor for HotpixelCorrection instance.
Moves the instance from other to this. Afterwards other is invalid.
| [in] | other | The other instance to move. |
|
inline |
Corrects the given hotpixels in the given image.
Pass a list of hotpixels, either returned by Detect(), or from a different source (e.g. retrieved directly from the camera from an initial hotpixel calibration).
| [in] | inputImage | The input image. |
| [in] | hotpixels | The list of hotpixels to be corrected. |
| ImageFormatNotSupportedException | inputImage has a packed pixel format |
| OutOfRangeException | inputImage is too small to process correctly |
| Exception | An internal error has occurred. |
Corrects the given image adaptively.
For each new passed to this method, first the list of hotpixels is adapted, then all pixels in the adapted hotpixel list are corrected.
| [in] | inputImage | The input image. |
| ImageFormatNotSupportedException | inputImage has a packed pixel format |
| OutOfRangeException | inputImage is too small to process correctly |
| Exception | An internal error has occurred. |
Corrects the given image inplace adaptively.
For each new passed to this method, first the list of hotpixels is adapted, then all pixels in the adapted hotpixel list are corrected. The image won't be copied.
| [in] | inputImage | The input image. |
| ImageFormatNotSupportedException | inputImage has a packed pixel format |
| OutOfRangeException | inputImage is too small to process correctly |
| Exception | An internal error has occurred. |
|
inline |
Corrects the given hotpixels inplace in the given image.
Pass a list of hotpixels, either returned by Detect(), or from a different source (e.g. retrieved directly from the camera from an initial hotpixel calibration). The image won't be copied and the hotpixel will be corrected within the given image.
| [in] | inputImage | The input image. |
| [in] | hotpixels | The list of hotpixels to be corrected. |
| ImageFormatNotSupportedException | inputImage has a packed pixel format |
| OutOfRangeException | inputImage is too small to process correctly |
| Exception | An internal error has occurred. |
|
inline |
Detects hotpixels in the given image.
| [in] | inputImage | The input image. |
| ImageFormatNotSupportedException | inputImage has a packed pixel format |
| OutOfRangeException | inputImage is too small to process correctly |
| Exception | An internal error has occurred. |
|
inline |
|
inline |
Copy assigment for HotpixelCorrection instance.
Acquires a reference from other to this instance. If this instance already has a reference, it will be destroyed.
| [in] | other | The other instance to acquire a reference for. |
|
inlinenoexcept |
Move assignment for HotpixelCorrection instance.
Moves the instance from other to this. Afterwards other is invalid.
| [in] | other | The other instance to move. |
|
inline |
Returns the current sensitivity.
| Exception | An internal error has occurred. |
|
inline |
Sets the gain factor in percent.
| [in] | gainFactorPercent | The gain factor in percent to set. |
| Exception | An internal error has occurred. |
|
inline |
Sets the sensitivity of the hotpixel detection.
| [in] | sensitivityLevel | The sensitivity level to set. |
| Exception | An internal error has occurred. |