IDS peak ICV v1.5.0
Loading...
Searching...
No Matches
ToneCurveCorrectionModule Class Reference

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

Inheritance diagram for ToneCurveCorrectionModule:

Public Member Functions

 ToneCurveCorrectionModule ()
 Creates an instance of class ToneCurveCorrectionModule with default values for gamma and black.
 
 ~ToneCurveCorrectionModule () override
 
 ToneCurveCorrectionModule (const ToneCurveCorrectionModule &other)=delete
 Copy constructor for class ToneCurveCorrectionModule is deleted.
 
 ToneCurveCorrectionModule (ToneCurveCorrectionModule &&other) noexcept
 
ToneCurveCorrectionModule & operator= (const ToneCurveCorrectionModule &other)=delete
 Copy assignment for class ToneCurveCorrectionModule is deleted.
 
ToneCurveCorrectionModule & operator= (ToneCurveCorrectionModule &&other) noexcept
 
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 SetEnabled (bool enabled) override
 Enables or disables the module.
 
bool IsEnabled () const override
 Gets whether this module is currently enabled.
 
const char * GetType () const override
 Returns the type of the module for serialization purposes.
 
void ResetToDefault () override
 Resets all settings to the default values for gamma and black.
 
void SetGamma (float gamma)
 Sets the gamma correction exponent.
 
float GetGamma () const
 Gets the current gamma correction exponent.
 
peak::common::IntervalF GetGammaRange () const
 Returns the valid range for the gamma correction exponent.
 
void SetDigitalBlack (float digitalBlack)
 Sets the digital black used for digital black correction.
 
float GetDigitalBlack () const
 Gets the current digital black used for correction.
 
peak::common::IntervalF GetDigitalBlackRange () const
 Returns the valid range for the digital black correction value.
 
peak::icv::Image Process (const peak::icv::Image &input) const
 Processes the input image and returns a tone curve corrected output image.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Processes the input image and returns a tone curve corrected output image.
 

Detailed Description

Tone curve correction is an image pipeline module that applies digital black correction and inverse gamma transformation to an image.

See also
features::DigitalBlackFeature and features::GammaFeature
Since
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ ToneCurveCorrectionModule() [1/3]

Creates an instance of class ToneCurveCorrectionModule with default values for gamma and black.

Since
ids_peak_icv 1.0

◆ ~ToneCurveCorrectionModule()

~ToneCurveCorrectionModule ( )
inlineoverride
Since
ids_peak_icv 1.0

◆ ToneCurveCorrectionModule() [2/3]

Copy constructor for class ToneCurveCorrectionModule 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

◆ ToneCurveCorrectionModule() [3/3]

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.

◆ GetDigitalBlack()

float GetDigitalBlack ( ) const
inline

Gets the current digital black used for correction.

Returns
The digital black value currently set.
Since
ids_peak_icv 1.0

◆ GetDigitalBlackRange()

peak::common::IntervalF GetDigitalBlackRange ( ) const
inline

Returns the valid range for the digital black correction value.

Returns
An IntervalF containing the minimum and maximum allowed digital black values.
Since
ids_peak_icv 1.0

◆ GetGamma()

float GetGamma ( ) const
inline

Gets the current gamma correction exponent.

Returns
The gamma exponent currently set.
Since
ids_peak_icv 1.0

◆ GetGammaRange()

peak::common::IntervalF GetGammaRange ( ) const
inline

Returns the valid range for the gamma correction exponent.

Returns
An IntervalF containing the minimum and maximum allowed gamma values.
Since
ids_peak_icv 1.0

◆ 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.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Gets whether this module is currently enabled.

Returns
true if enabled; otherwise false.
Since
ids_peak_icv 1.0

Implements IModule.

◆ operator=() [1/2]

ToneCurveCorrectionModule & operator= ( const ToneCurveCorrectionModule & other)
delete

Copy assignment for class ToneCurveCorrectionModule 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]

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

◆ Process() [1/2]

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

Processes the input image and returns a tone curve corrected output image.

Note
Supported pixel formats: Mono8, Mono10, Mono12, Mono16, RGB8, RGB10, RGB12, BGR8, BGR10, BGR12, RGBa8, RGBa10, RGBa12, BGRa8, BGRa10, BGRa12. Images with other formats are passed through unmodified.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed.
Returns
A new image with tone curve correction applied.
Exceptions
peak::common::InvalidCastExceptionIf the input cast to peak::icv::Image failed.
Since
ids_peak_icv 1.0

Implements IModule.

◆ Process() [2/2]

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

Processes the input image and returns a tone curve corrected output image.

Note
Supported pixel formats: Mono8, Mono10, Mono12, Mono16, RGB8, RGB10, RGB12, BGR8, BGR10, BGR12, RGBa8, RGBa10, RGBa12, BGRa8, BGRa10, BGRa12. Images with other formats are passed through unmodified.
This operation disregards any specified image regions and processes the entire image.
Parameters
inputThe input image to be processed.
Returns
A new image with tone curve correction applied.
Since
ids_peak_icv 1.0

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets all settings to the default values for gamma and black.

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

Implements IModule.

◆ 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.

◆ SetDigitalBlack()

void SetDigitalBlack ( float digitalBlack)
inline

Sets the digital black used for digital black correction.

This value is subtracted from the input image channel values before gamma correction. It typically represents sensor black offset.

Note
The digital black must be within the valid range returned by GetDigitalBlackRange().
Parameters
digitalBlackThe digital black value in normalized units.
Since
ids_peak_icv 1.0

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Enables or disables the module.

Parameters
enabledSet to true to enable, or false to disable.
Since
ids_peak_icv 1.0

Implements IModule.

◆ SetGamma()

void SetGamma ( float gamma)
inline

Sets the gamma correction exponent.

This value determines the degree of inverse gamma correction applied during processing, where output values are computed as pow(input, 1/gamma). Higher gamma values lighten the image, while values closer to zero darken it.

Note
The gamma exponent must be within the valid range returned by GetGammaRange().
Parameters
gammaThe gamma exponent.
Since
ids_peak_icv 1.0