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

#include <peak_icv/pipeline/features/peak_icv_saturation_feature.hpp>

Inheritance diagram for SaturationFeature:
Collaboration diagram for SaturationFeature:

Public Member Functions

 SaturationFeature (detail::ColorMatrixTransformationModule &module)
 Creates a SaturationFeature using an existing color matrix transformation module.
 
void SetEnabled (bool enabled) override
 Enables or disables the feature.
 
bool IsEnabled () const override
 Indicates whether the feature is currently enabled.
 
void ResetToDefault () override
 Resets the saturation value to its default.
 
void SetValue (float saturation)
 Sets the saturation level.
 
float GetValue () const
 Retrieves the current saturation level.
 
peak::common::IntervalF GetRange () const
 Retrieves the valid range for the saturation value.
 

Detailed Description

Adjusts the saturation of an image by modifying a 3x3 ColorCorrectionMatrix.

This feature modifies the image's color saturation by scaling the chrominance components of the color correction matrix. A higher saturation makes colors more vivid, while a lower value results in more muted tones.

Defaults
  • saturation = 1.0
See also
features::ColorCorrectionFeature, ColorCorrectionMatrix
Since
1.0

Definition at line 40 of file peak_icv_saturation_feature.hpp.

Constructor & Destructor Documentation

◆ SaturationFeature()

Creates a SaturationFeature using an existing color matrix transformation module.

Parameters
moduleReference to the underlying detail::ColorMatrixTransformationModule.
Since
1.0

Definition at line 113 of file peak_icv_saturation_feature.hpp.

Member Function Documentation

◆ GetRange()

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

Retrieves the valid range for the saturation value.

The returned interval specifies the minimum and maximum values that can be passed to SetValue.

Returns
An IntervalF representing the valid saturation range.
Since
1.0

Definition at line 142 of file peak_icv_saturation_feature.hpp.

◆ GetValue()

float GetValue ( ) const
inline

Retrieves the current saturation level.

Returns
The current saturation value.
Since
1.0

Definition at line 137 of file peak_icv_saturation_feature.hpp.

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Indicates whether the feature is currently enabled.

Returns
true if enabled; otherwise, false.
Since
1.0

Implements IFeature.

Definition at line 122 of file peak_icv_saturation_feature.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets the saturation value to its default.

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

Implements IFeature.

Definition at line 127 of file peak_icv_saturation_feature.hpp.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Enables or disables the feature.

Parameters
enabledSet to true to enable the feature, or false to disable it.
Since
1.0

Implements IFeature.

Definition at line 117 of file peak_icv_saturation_feature.hpp.

◆ SetValue()

void SetValue ( float saturation)
inline

Sets the saturation level.

Parameters
saturationA floating-point value representing the saturation level. A value of 1.0 means no change, values greater than 1.0 increase saturation, and values less than 1.0 decrease saturation. Valid values are within the range returned by GetRange.
Warning
Extreme saturation values may cause color clipping or unnatural color appearance. Values significantly above 2.0 or below 0.0 should be used with caution.
Exceptions
OutOfRangeExceptionIf saturation is outside the valid range.
See also
features::ColorCorrectionFeature, GetRange()
Since
1.0

Definition at line 132 of file peak_icv_saturation_feature.hpp.