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

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

Inheritance diagram for ToneCurveCorrectionModule:
Collaboration 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
 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.
 
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
1.0

Definition at line 43 of file peak_icv_tone_curve_correction_module.hpp.

Constructor & Destructor Documentation

◆ ToneCurveCorrectionModule() [1/3]

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

Since
1.0

Definition at line 290 of file peak_icv_tone_curve_correction_module.hpp.

◆ ~ToneCurveCorrectionModule()

~ToneCurveCorrectionModule ( )
inlineoverride
Since
1.0

Definition at line 297 of file peak_icv_tone_curve_correction_module.hpp.

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

◆ ToneCurveCorrectionModule() [3/3]

Since
1.0

Definition at line 305 of file peak_icv_tone_curve_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 the 'Version' entry in archive is missing, malformed, or indicates an unsupported version.
Note
This function requires that the archive contains all expected fields as produced by a corresponding Serialize() call.
Since
1.0

Implements ISerializable.

Definition at line 352 of file peak_icv_tone_curve_correction_module.hpp.

◆ GetDigitalBlack()

float GetDigitalBlack ( ) const
inline

Gets the current digital black used for correction.

Returns
The digital black value currently set.
Since
1.0

Definition at line 433 of file peak_icv_tone_curve_correction_module.hpp.

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

Definition at line 413 of file peak_icv_tone_curve_correction_module.hpp.

◆ GetGamma()

float GetGamma ( ) const
inline

Gets the current gamma correction exponent.

Returns
The gamma exponent currently set.
Since
1.0

Definition at line 393 of file peak_icv_tone_curve_correction_module.hpp.

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

Definition at line 403 of file peak_icv_tone_curve_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
1.0

Implements IModule.

Definition at line 382 of file peak_icv_tone_curve_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
1.0

Implements IModule.

Definition at line 377 of file peak_icv_tone_curve_correction_module.hpp.

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

◆ operator=() [2/2]

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

Definition at line 314 of file peak_icv_tone_curve_correction_module.hpp.

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

Implements IModule.

Definition at line 457 of file peak_icv_tone_curve_correction_module.hpp.

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

Definition at line 452 of file peak_icv_tone_curve_correction_module.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

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

Since
1.0

Implements IModule.

Definition at line 387 of file peak_icv_tone_curve_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
1.0

Implements ISerializable.

Definition at line 335 of file peak_icv_tone_curve_correction_module.hpp.

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

Definition at line 442 of file peak_icv_tone_curve_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
1.0

Implements IModule.

Definition at line 371 of file peak_icv_tone_curve_correction_module.hpp.

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

Definition at line 423 of file peak_icv_tone_curve_correction_module.hpp.