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

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

Inheritance diagram for ColorMatrixTransformationModule:
Collaboration diagram for ColorMatrixTransformationModule:

Public Member Functions

 ColorMatrixTransformationModule ()
 Creates an instance of class ColorMatrixTransformationModule with the default color correction matrix and saturation value.
 
 ~ColorMatrixTransformationModule () override
 
 ColorMatrixTransformationModule (const ColorMatrixTransformationModule &other)=delete
 Copy constructor for class ColorMatrixTransformation is deleted.
 
 ColorMatrixTransformationModule (ColorMatrixTransformationModule &&other) noexcept
 
ColorMatrixTransformationModule & operator= (const ColorMatrixTransformationModule &other)=delete
 Copy assignment for class ColorMatrixTransformation is deleted.
 
ColorMatrixTransformationModule & operator= (ColorMatrixTransformationModule &&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 the ColorCorrectionMatrix to the default and the saturation value to the default.
 
void SetMatrix (const ColorCorrectionMatrix &matrix)
 Sets the ColorCorrectionMatrix.
 
ColorCorrectionMatrix GetMatrix () const
 Returns the current ColorCorrectionMatrix.
 
void SetSaturation (float saturation)
 Sets the Saturation.
 
float GetSaturation () const
 Returns the current saturation value.
 
peak::common::IntervalF GetSaturationRange () const
 Returns the saturation range.
 
peak::icv::Image Process (const peak::icv::Image &input) const
 Applies the configured ColorCorrectionMatrix and saturation adjustment to the input image.
 
peak::common::Any Process (const peak::common::Any &input) const override
 Applies the configured ColorCorrectionMatrix and saturation adjustment to the input image.
 
void SetAutoFeatureModule (const std::shared_ptr< modules::IAutoFeature > &module)
 Sets the auto feature module that should take the color correction matrix into account for automatic white balancing.
 

Detailed Description

Color matrix transformation is an image pipeline module that applies a ColorCorrectionMatrix to an image.

Provides the features features::ColorCorrectionFeature and features::SaturationFeature

Since
1.0

Definition at line 43 of file peak_icv_color_matrix_transformation_module.hpp.

Constructor & Destructor Documentation

◆ ColorMatrixTransformationModule() [1/3]

Creates an instance of class ColorMatrixTransformationModule with the default color correction matrix and saturation value.

Since
1.0

Definition at line 276 of file peak_icv_color_matrix_transformation_module.hpp.

◆ ~ColorMatrixTransformationModule()

~ColorMatrixTransformationModule ( )
inlineoverride
Since
1.0

Definition at line 285 of file peak_icv_color_matrix_transformation_module.hpp.

◆ ColorMatrixTransformationModule() [2/3]

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

◆ ColorMatrixTransformationModule() [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 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 337 of file peak_icv_color_matrix_transformation_module.hpp.

◆ GetMatrix()

ColorCorrectionMatrix GetMatrix ( ) const
inline

Returns the current ColorCorrectionMatrix.

Returns
The current ColorCorrectionMatrix.
Since
1.0

Definition at line 386 of file peak_icv_color_matrix_transformation_module.hpp.

◆ GetSaturation()

float GetSaturation ( ) const
inline

Returns the current saturation value.

Returns
The current saturation.
Since
1.0

Definition at line 417 of file peak_icv_color_matrix_transformation_module.hpp.

◆ GetSaturationRange()

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

Returns the saturation range.

Returns
The saturation range.
Since
1.0

Definition at line 422 of file peak_icv_color_matrix_transformation_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 368 of file peak_icv_color_matrix_transformation_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 363 of file peak_icv_color_matrix_transformation_module.hpp.

◆ operator=() [1/2]

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

Definition at line 301 of file peak_icv_color_matrix_transformation_module.hpp.

◆ operator=() [2/2]

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

◆ Process() [1/2]

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

Applies the configured ColorCorrectionMatrix and saturation adjustment to the input image.

Note
Supported pixel formats: 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 the color correction and saturation applied, or the original image if unsupported.
Exceptions
peak::common::InvalidCastExceptionIf the input cast to peak::icv::Image failed.
Since
1.0

Implements IModule.

Definition at line 437 of file peak_icv_color_matrix_transformation_module.hpp.

◆ Process() [2/2]

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

Applies the configured ColorCorrectionMatrix and saturation adjustment to the input image.

Note
Supported pixel formats: 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 the color correction and saturation applied, or the original image if unsupported.
Since
1.0

Definition at line 432 of file peak_icv_color_matrix_transformation_module.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets the ColorCorrectionMatrix to the default and the saturation value to the default.

Since
1.0

Implements IModule.

Definition at line 373 of file peak_icv_color_matrix_transformation_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 321 of file peak_icv_color_matrix_transformation_module.hpp.

◆ SetAutoFeatureModule()

void SetAutoFeatureModule ( const std::shared_ptr< modules::IAutoFeature > & module)
inline

Sets the auto feature module that should take the color correction matrix into account for automatic white balancing.

Since
1.0

Definition at line 486 of file peak_icv_color_matrix_transformation_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 355 of file peak_icv_color_matrix_transformation_module.hpp.

◆ SetMatrix()

void SetMatrix ( const ColorCorrectionMatrix & matrix)
inline

Sets the ColorCorrectionMatrix.

Parameters
matrixThe ColorCorrectionMatrix to set.
Since
1.0

Definition at line 391 of file peak_icv_color_matrix_transformation_module.hpp.

◆ SetSaturation()

void SetSaturation ( float saturation)
inline

Sets the Saturation.

Parameters
saturationThe saturation to set.
Exceptions
OutOfRangeExceptionIf saturation is outside the valid range (see GetSaturationRange).
Since
1.0

Definition at line 401 of file peak_icv_color_matrix_transformation_module.hpp.