IDS peak IPL v1.16.1
Loading...
Searching...
No Matches
peak::ipl::ColorCorrector Class Referencefinal

Applies a 3x3 color correction matrix to the data. More...

#include <peak_ipl/algorithm/peak_ipl_color_corrector.hpp>

Public Member Functions

 ColorCorrector ()
 Constructor for a new ColorCorrector instance.
 
 ~ColorCorrector ()
 Destructor for the ColorCorrector instance.
 
 ColorCorrector (const ColorCorrector &other)
 Copy Constructor for a new ColorCorrector instance.
 
ColorCorrector & operator= (const ColorCorrector &other)
 Copy assigment for ColorCorrector instance.
 
 ColorCorrector (ColorCorrector &&other) noexcept
 Move constructor for ColorCorrector instance.
 
ColorCorrector & operator= (ColorCorrector &&other) noexcept
 Move assignment for ColorCorrector instance.
 
void SetColorCorrectionFactors (ColorCorrectionFactors colorCorrectorFactors)
 Sets the values of the color correction matrix.
 
peak::ipl::ColorCorrectionFactors ColorCorrectionFactors ()
 Returns the factors of the color correction matrix.
 
peak::ipl::ColorCorrectionFactors ColorCorrectionFactors () const
 Returns the factors of the color correction matrix.
 
float Saturation () const
 Returns the color saturation value.
 
float SaturationMin () const
 Returns the minimum color saturation value.
 
float SaturationMax () const
 Returns the maximum color saturation value.
 
void SetSaturation (float saturation)
 Sets the color saturation value.
 
void ApplyChromaticAdaption (const ChromaticAdapter &chromaticAdapter, uint32_t colorTemperature)
 Applies the chromatic adaption matrix to the color corrector matrix.
 
bool IsPixelFormatSupported (PixelFormatName pixelFormatName) const
 Returns whether the color corrector supports the given pixel format.
 
void ProcessInPlace (Image &image) const
 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.
 
Image Process (const Image &inputImage) const
 Corrects the colors of the given image by applying a 3x3 color correction matrix to the data.
 

Detailed Description

Applies a 3x3 color correction matrix to the data.

Constructor & Destructor Documentation

◆ ColorCorrector() [1/3]

peak::ipl::ColorCorrector::ColorCorrector ( )
inline

Constructor for a new ColorCorrector instance.

Creates a new ColorCorrector instance.

Since
1.0

◆ ~ColorCorrector()

peak::ipl::ColorCorrector::~ColorCorrector ( )
inline

Destructor for the ColorCorrector instance.

Destroys a ColorCorrector instance.

Since
1.0

◆ 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]otherThe other instance to acquire a reference for.
Since
1.0 Deleted.
1.8 Implemented as shallow copy.

◆ ColorCorrector() [3/3]

peak::ipl::ColorCorrector::ColorCorrector ( ColorCorrector && other)
inlinenoexcept

Move constructor for ColorCorrector instance.

Moves the instance from other to this. Afterward, other is invalid.

Parameters
[in]otherThe other instance to move.
Since
1.0

Member Function Documentation

◆ 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]chromaticAdapterThe chromatic adapter instance.
[in]colorTemperatureThe color temperature to set in Kelvin.
Since
1.16

◆ ColorCorrectionFactors() [1/2]

peak::ipl::ColorCorrectionFactors peak::ipl::ColorCorrector::ColorCorrectionFactors ( )
inline

Returns the factors of the color correction matrix.

Returns
colorCorrectorFactors The factors of the color correction matrix
Since
1.0

◆ ColorCorrectionFactors() [2/2]

peak::ipl::ColorCorrectionFactors peak::ipl::ColorCorrector::ColorCorrectionFactors ( ) const
inline

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]pixelFormatNameThe pixel format of interest.
Since
1.0

◆ operator=() [1/2]

ColorCorrector & peak::ipl::ColorCorrector::operator= ( ColorCorrector && other)
inlinenoexcept

Move assignment for ColorCorrector instance.

Moves the instance from other to this. Afterward, other is invalid.

Parameters
[in]otherThe other instance to move.
Since
1.3.3

◆ operator=() [2/2]

ColorCorrector & peak::ipl::ColorCorrector::operator= ( const ColorCorrector & other)
inline

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]otherThe 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]inputImageImage 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
ImageFormatNotSupportedExceptionimage has unsupported pixel format (for example packed pixel format)
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]imageImage to process.
Note
Will not work with packed pixel formats. See Packed pixel format handling for the correct handling of this.
Exceptions
ImageFormatNotSupportedExceptionimage has unsupported pixel format (for example packed pixel format)
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()

void peak::ipl::ColorCorrector::SetColorCorrectionFactors ( ColorCorrectionFactors colorCorrectorFactors)
inline

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]colorCorrectorFactorsThe 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]saturationThe color saturation value.
Since
1.6

The documentation for this class was generated from the following file: