IDS peak ICV v1.6.0
Loading...
Searching...
No Matches
GammaFeature Class Reference
Inheritance diagram for GammaFeature:

Public Member Functions

 GammaFeature (ToneCurveCorrectionModule module)
 Creates a GammaFeature for an existing tone curve correction module.
 
void ResetToDefault ()
 Resets the gamma value to the default.
 

Properties

float Value [get, set]
 Sets the gamma correction exponent.
 
IntervalF Range [get]
 Retrieves the valid range for the gamma correction exponent.
 
bool IsEnabled [get, set]
 Enables or disables the feature.
 

Detailed Description

Gamma applies an inverse gamma transformation to an image.

This module adjusts the image luminance by applying an inverse gamma correction. This prepares the image for a linear domain or further processing.

The correction is applied independently to each channel in the image. For RGB images, it is applied to each color channel (R, G, B), and for monochrome images, it is applied to the single intensity channel.

The correction is performed using the following formula:

color_value_out = Math.Pow(color_value_in, 1.0 / gamma);

where:

  • color_value_in is the input channel value,
  • gamma is the gamma exponent,
  • color_value_out is the resulting output value.
Warning
Gamma values close to zero may result in very dark images, while very high values may cause loss of detail in dark areas. Use values within the Range.

Defaults
  • gamma = 1.0
See also
DigitalBlackFeature, GainFeature, SharpeningFeature
Since
IDSImaging.Peak.ICV 1.3

Constructor & Destructor Documentation

◆ GammaFeature()

Creates a GammaFeature for an existing tone curve correction module.

Parameters
moduleReference to the underlying ToneCurveCorrectionModule.

Member Function Documentation

◆ ResetToDefault()

void ResetToDefault ( )
inline

Resets the gamma value to the default.

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

Implements IFeature.

Property Documentation

◆ IsEnabled

bool IsEnabled
getset

Enables or disables the feature.

Implements IFeature.

◆ Range

Retrieves the valid range for the gamma correction exponent.

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

◆ Value

float Value
getset

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. Valid values are within the range returned by Range.

Exceptions
IcvOutOfRangeExceptionThe gamma value is outside the valid range.