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

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

Inheritance 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
 Gets whether this feature is currently enabled.
 
void ResetToDefault () override
 Resets the saturation value to its default.
 
void SetValue (float saturation)
 Sets the saturation value.
 
float GetValue () const
 Gets the current saturation value.
 
peak::common::IntervalF GetRange () const
 Gets 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
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ SaturationFeature()

Creates a SaturationFeature using an existing color matrix transformation module.

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

Member Function Documentation

◆ GetRange()

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

Gets 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
ids_peak_icv 1.0

◆ GetValue()

float GetValue ( ) const
inline

Gets the current saturation value.

Returns
The current saturation value.
Since
ids_peak_icv 1.0

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Gets whether this feature is currently enabled.

Returns
true if enabled; otherwise false.
Since
ids_peak_icv 1.0

Implements IFeature.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets the saturation value to its default.

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

Implements IFeature.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Enables or disables the feature.

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

Implements IFeature.

◆ SetValue()

void SetValue ( float saturation)
inline

Sets the saturation value.

Parameters
saturationA floating-point value representing the saturation value. 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
ids_peak_icv 1.0