Applies a 3x3 color correction matrix to the data.
More...
#include <peak_ipl/algorithm/peak_ipl_color_corrector.hpp>
Applies a 3x3 color correction matrix to the data.
◆ ColorCorrector() [1/3]
| peak::ipl::ColorCorrector::ColorCorrector |
( |
| ) |
|
|
inline |
◆ ~ColorCorrector()
| peak::ipl::ColorCorrector::~ColorCorrector |
( |
| ) |
|
|
inline |
◆ ColorCorrector() [2/3]
| peak::ipl::ColorCorrector::ColorCorrector |
( |
const ColorCorrector & | other | ) |
|
|
inline |
Copy Constructor for a new ColorCorrector instance.
Creates a new ColorCorrector 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.0 Deleted.
-
1.8 Implemented as shallow copy.
◆ ColorCorrector() [3/3]
Move constructor for ColorCorrector instance.
Moves the instance from other to this. Afterward, other is invalid.
- Parameters
-
| [in] | other | The other instance to move. |
- Since
- 1.0
◆ ApplyChromaticAdaption()
| void peak::ipl::ColorCorrector::ApplyChromaticAdaption |
( |
const ChromaticAdapter & | chromaticAdapter, |
|
|
uint32_t | colorTemperature ) |
|
inline |
Applies the chromatic adaption matrix to the color corrector matrix.
This calculates and applies the chromatic adaption matrix to the existing color corrector matrix.
- Note
- The existing matrix will be overwritten and cannot be restored. If this is not the intended behavior, it is advised to store the factors beforehand.
- Parameters
-
| [in] | chromaticAdapter | The chromatic adapter instance. |
| [in] | colorTemperature | The color temperature to set in Kelvin. |
- Since
- 1.16
◆ ColorCorrectionFactors() [1/2]
Returns the factors of the color correction matrix.
- Returns
- colorCorrectorFactors The factors of the color correction matrix
- Since
- 1.0
◆ ColorCorrectionFactors() [2/2]
Returns the factors of the color correction matrix.
- Returns
- colorCorrectorFactors The factors of the color correction matrix
- Since
- 1.3.2
◆ IsPixelFormatSupported()
| bool peak::ipl::ColorCorrector::IsPixelFormatSupported |
( |
PixelFormatName | pixelFormatName | ) |
const |
|
inline |
Returns whether the color 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.0
◆ operator=() [1/2]
Move assignment for ColorCorrector instance.
Moves the instance from other to this. Afterward, other is invalid.
- Parameters
-
| [in] | other | The other instance to move. |
- Since
- 1.3.3
◆ operator=() [2/2]
Copy assigment for ColorCorrector 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.0 Deleted.
-
1.8 Implemented as shallow copy.
◆ Process()
| Image peak::ipl::ColorCorrector::Process |
( |
const Image & | inputImage | ) |
const |
|
inline |
Corrects the colors of the given image by applying a 3x3 color correction matrix to the data.
- 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 color corrected pixels
- Exceptions
-
- Since
- 1.0
-
1.2 Will throw ImageFormatNotSupportedException if inputImage has a packed pixel format
◆ ProcessInPlace()
| void peak::ipl::ColorCorrector::ProcessInPlace |
( |
Image & | image | ) |
const |
|
inline |
Corrects the colors of the given image by applying a 3x3 color correction matrix to the data 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.0
-
1.2 Will throw ImageFormatNotSupportedException if image has packed a pixel format
◆ Saturation()
| float peak::ipl::ColorCorrector::Saturation |
( |
| ) |
const |
|
inline |
Returns the color saturation value.
- Returns
- The color saturation value
- Since
- 1.6
◆ SaturationMax()
| float peak::ipl::ColorCorrector::SaturationMax |
( |
| ) |
const |
|
inline |
Returns the maximum color saturation value.
- Returns
- The maximum color saturation value
- Since
- 1.6
◆ SaturationMin()
| float peak::ipl::ColorCorrector::SaturationMin |
( |
| ) |
const |
|
inline |
Returns the minimum color saturation value.
- Returns
- The minimum color saturation value
- Since
- 1.6
◆ SetColorCorrectionFactors()
Sets the values of the color correction matrix.
The matrix is row-wise sorted:
| | |
| RR | GR | BR |
| RG | GG | BG |
| RB | GB | BB |
- Parameters
-
| [in] | colorCorrectorFactors | The factors of the color correction matrix. |
- Since
- 1.0
◆ SetSaturation()
| void peak::ipl::ColorCorrector::SetSaturation |
( |
float | saturation | ) |
|
|
inline |
Sets the color saturation value.
- Parameters
-
| [in] | saturation | The color saturation value. |
- Since
- 1.6
The documentation for this class was generated from the following file: