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

Public Member Functions

None __init__ (self, ToneCurveCorrectionModule module)
 Creates a gamma feature for an existing tone curve correction module.
 
bool enabled (self)
 Gets whether this feature is currently enabled.
 
None enabled (self, bool enabled)
 Enables or disables the feature.
 
None reset_to_default (self)
 Resets the gamma value to its default value (1.0).
 
float value (self)
 Gets the current gamma correction exponent.
 
None value (self, float gamma)
 Sets the gamma correction exponent.
 
Interval range (self)
 Retrieves the valid range for the gamma correction exponent.
 

Data Fields

float value = 1.0
 

Protected Attributes

 _module = module
 

Detailed Description

Gamma applies an inverse gamma transformation to an image.

Supported pixel formats
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGR8
  • BayerGR10
  • BayerGR12
  • RGB8
  • RGBa8
  • BGR8
  • BGRa8
  • RGB10
  • RGBa10
  • BGR10
  • BGRa10
  • RGB12
  • RGBa12
  • BGR12
  • BGRa12

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

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 ^ (1.0 / gamma)

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 returned by range property.

The default value for gamma is 1.0.

Since
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self,
ToneCurveCorrectionModule module )

Creates a gamma feature for an existing tone curve correction module.

Parameters
moduleReference to the underlying module

Member Function Documentation

◆ enabled() [1/2]

bool enabled ( self)

Gets whether this feature is currently enabled.

Returns
True if enabled; otherwise False.
Since
ids_peak_icv 1.0

Reimplemented from IFeature.

◆ enabled() [2/2]

None enabled ( self,
bool enabled )

Enables or disables the feature.

Parameters
enabledTrue to enable, False to disable.
Since
ids_peak_icv 1.0

Reimplemented from IFeature.

◆ range()

Interval range ( self)

Retrieves the valid range for the gamma correction exponent.

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

Returns
An Interval representing the valid gamma range.
Since
ids_peak_icv 1.0

◆ reset_to_default()

None reset_to_default ( self)

Resets the gamma value to its default value (1.0).

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

Reimplemented from IFeature.

◆ value() [1/2]

float value ( self)

Gets the current gamma correction exponent.

Returns
The gamma exponent currently set.
Since
ids_peak_icv 1.0

◆ value() [2/2]

None value ( self,
float gamma )

Sets the gamma correction exponent.

This value determines the degree of inverse gamma correction applied during processing, where output values are computed as input ^ (1/gamma). Higher gamma values lighten the image, while values closer to zero darken it.

Parameters
gammaA floating-point value representing the gamma exponent. Valid values are within the range returned by range property.
Exceptions
OutOfRangeExceptionIf gamma is outside the valid range.
Since
ids_peak_icv 1.0

Field Documentation

◆ _module

_module = module
protected

◆ value

float value = 1.0