Applies digital black and gamma correction to the image data.
More...
#include <peak_ipl/algorithm/peak_ipl_gamma_corrector.hpp>
Applies digital black and gamma correction to the image data.
◆ GammaCorrector() [1/3]
| peak::ipl::GammaCorrector::GammaCorrector |
( |
| ) |
|
|
inline |
◆ ~GammaCorrector()
| peak::ipl::GammaCorrector::~GammaCorrector |
( |
| ) |
|
|
inline |
◆ GammaCorrector() [2/3]
| peak::ipl::GammaCorrector::GammaCorrector |
( |
const GammaCorrector & | other | ) |
|
|
inline |
Copy Constructor for a new GammaCorrector instance.
Creates a new GammaCorrector instance.
- Note
- This only creates a shallow copy. See Shallow copy (since 1.8) for a detailed explanation.
- Parameters
-
| [in] | other | The other instance to acquire a reference for. |
- Since
- 1.2.2 Deleted
-
1.8 Implemented as shallow copy
◆ GammaCorrector() [3/3]
Move constructor for GammaCorrector instance.
Moves the instance from other to this. Afterwards other is invalid.
- Parameters
-
| [in] | other | The other instance to move. |
- Since
- 1.2.2
◆ DigitalBlack()
| float peak::ipl::GammaCorrector::DigitalBlack |
( |
| ) |
const |
|
inline |
Returns the value of the digital black correction.
- Returns
- the value of the digital black correction as decimal fraction of the maximum range of the corresponding bit depth.
- Since
- 1.15
◆ DigitalBlackMax()
| float peak::ipl::GammaCorrector::DigitalBlackMax |
( |
| ) |
const |
|
inline |
Returns the maximum value of the digital black correction.
- Returns
- the maximum value of the digital black correction (1.0f). 1.0f corresponds to the maximum range of the corresponding bit depth.
- Since
- 1.15
◆ DigitalBlackMin()
| float peak::ipl::GammaCorrector::DigitalBlackMin |
( |
| ) |
const |
|
inline |
Returns the minimum value of the digital black correction.
- Returns
- the minimum value of the digital black correction (0.0f) 0.0f means that digital black correction is disabled.
- Since
- 1.15
◆ GammaCorrectionMax()
| float peak::ipl::GammaCorrector::GammaCorrectionMax |
( |
| ) |
const |
|
inline |
Returns the maximum value of the gamma correction.
- Returns
- gammaMax The maximum value of the gamma correction.
- Since
- 1.2.2
◆ GammaCorrectionMin()
| float peak::ipl::GammaCorrector::GammaCorrectionMin |
( |
| ) |
const |
|
inline |
Returns the minimum value of the gamma correction.
- Returns
- gammaMin The minimum value of the gamma correction.
- Since
- 1.2.2
◆ GammaCorrectionValue()
| float peak::ipl::GammaCorrector::GammaCorrectionValue |
( |
| ) |
const |
|
inline |
Returns the value of the gamma correction.
- Returns
- gammaValue The value of the gamma correction.
- Since
- 1.2.2
◆ IsPixelFormatSupported()
| bool peak::ipl::GammaCorrector::IsPixelFormatSupported |
( |
PixelFormatName | pixelFormatName | ) |
const |
|
inline |
Returns whether the gamma corrector supports the given pixel format.
- Returns
- Flag whether the given pixel format is supported.
- Parameters
-
| [in] | pixelFormatName | The pixel format of interest. |
- Since
- 1.2.2
◆ operator=() [1/2]
Copy assigment for GammaCorrector instance.
Acquires a reference from other to this instance. If this instance already has a reference, it will be destroyed.
- Note
- See Shallow copy (since 1.8) for a detailed explanation.
- Parameters
-
| [in] | other | The other instance to acquire a reference for. |
- Since
- 1.2.2 Deleted
-
1.8 Implemented as shallow copy
◆ operator=() [2/2]
Move assignment for GammaCorrector instance.
Moves the instance from other to this. Afterwards other is invalid.
- Parameters
-
| [in] | other | The other instance to move. |
- Since
- 1.2.2
◆ Process()
| Image peak::ipl::GammaCorrector::Process |
( |
const Image & | inputImage | ) |
const |
|
inline |
Corrects the gammas of the given image.
- Parameters
-
| [in] | inputImage | Image to process. |
- Note
- Will not work with packed pixel formats. See Packed pixel format handling for the correct handling of this.
- Returns
- A new created image containing the gamma-corrected pixels.
- Exceptions
-
- Since
- 1.2.2
◆ ProcessInPlace()
| void peak::ipl::GammaCorrector::ProcessInPlace |
( |
Image & | image | ) |
const |
|
inline |
Corrects the gammas of the given image in place that is, it will change the input image.
- Parameters
-
| [in] | image | Image to process. |
- Note
- Will not work with packed pixel formats. See Packed pixel format handling for the correct handling of this.
- Exceptions
-
- Since
- 1.2.2
◆ SetDigitalBlack()
| void peak::ipl::GammaCorrector::SetDigitalBlack |
( |
float | digitalBlackValue | ) |
|
|
inline |
Configures the digital black correction value to adjust RGB master black.
This function sets the digital black, which shifts the darkest parts of an image towards zero. The value you set determines what intensity is treated as black, without changing the brightest parts (white level). This helps in the following ways:
- Improves contrast: Reduces stray light effects and makes dark areas truly black.
- Focuses on specific brightness ranges: Allows you to visualize a certain range of brightness in the image.
The value is supplied as a fraction of the maximum possible pixel value.
Note that gamma correction is applied after the digital black correction. Digital black is distinct from sensor electrical black adjustments, which can be set using the device black level. Digital black correction cannot address offsets in Bayer raw data.
- Parameters
-
| [in] | digitalBlackValue | The value of the digital black correction as decimal fraction of the maximum range of the corresponding bit depth. |
- Exceptions
-
| InvalidArgument | digitalBlackValue is not supported. |
- Since
- 1.15
◆ SetGammaCorrectionValue()
| void peak::ipl::GammaCorrector::SetGammaCorrectionValue |
( |
float | gammaValue | ) |
|
|
inline |
Sets the gamma value of the gamma correction.
The gamma correction adjusts the camera characteristic curve to a typical display characteristic curve by raising the gray values to the power of the inverse gamma value. Usually, sRGB colors with a gamma of 2.2 are assumed. A gamma setting of 1.0 preserves linear gray values.
The human eye perceives differences in brightness with a logarithmic characteristic curve, which is often approximated in practice with a gamma characteristic curve. The brightness perceived by humans increases more steeply in dark areas and less steeply in bright areas.
- Parameters
-
| [in] | gammaValue | The value of the gamma correction. |
- Exceptions
-
| InvalidArgument | gammaValue isn't supported. |
- Since
- 1.2.2
The documentation for this class was generated from the following file: