IDS peak ICV v1.4.0
Loading...
Searching...
No Matches
ColorCorrectionMatrix Class Reference

#include <peak_icv/pipeline/types/peak_icv_color_correction_matrix.hpp>

Inheritance diagram for ColorCorrectionMatrix:

Public Member Functions

 ColorCorrectionMatrix ()=default
 Creates an instance of class ColorCorrectionMatrix.
 
 ColorCorrectionMatrix (const float(&data)[3][3])
 Creates an instance of class ColorCorrectionMatrix with data.
 
 ColorCorrectionMatrix (Matrix< float, 3, 3 > matrix)
 Creates an instance of class ColorCorrectionMatrix with data.
 
 ColorCorrectionMatrix (std::string name, const float(&data)[3][3])
 Creates an instance of class ColorCorrectionMatrix.
 
 ColorCorrectionMatrix (std::string name, Matrix< float, 3, 3 > matrix)
 Creates an instance of class ColorCorrectionMatrix.
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the object's internal state into the provided archive.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Restores the object's state from the provided archive.
 
bool operator== (const ColorCorrectionMatrix &other) const
 
constexpr const float * GetData () const
 Returns a pointer to the underlying data of the array.
 
constexpr float & At (std::size_t row, std::size_t col)
 Accesses the element at the specified row and column.
 
constexpr const float & At (std::size_t row, std::size_t col) const
 Accesses the element at the specified row and column (const version).
 
constexpr std::size_t GetNumberOfRows () const
 Gets the number of rows in the array.
 
constexpr std::size_t GetNumberOfColumns () const
 Gets the number of columns in the array.
 
auto begin ()
 Returns an iterator to the beginning of the array.
 
auto cbegin () const
 Returns a const iterator to the beginning of the array.
 
auto end ()
 Returns an iterator to the end of the array.
 
auto cend () const
 Returns a const iterator to the end of the array.
 

Static Public Member Functions

static Matrix Identity ()
 Creates and returns an identity matrix.
 
static Matrix Diagonal (const float &value)
 Constructs a uniform diagonal matrix.
 

Detailed Description

Color correction matrix.

A color correction matrix is a 3×3 transformation matrix used to adjust RGB color values. It is typically used to convert colors from a camera sensor’s native RGB space to a standard color space, or to perform color balancing and correction.

The color correction matrix is represented as a 3×3 float array:

m_00 m_01 m_02
m_10 m_11 m_12
m_20 m_21 m_22
See also
features::ColorCorrectionFeature for more information.
Since
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ ColorCorrectionMatrix() [1/5]

ColorCorrectionMatrix ( )
default

Creates an instance of class ColorCorrectionMatrix.

Since
ids_peak_icv 1.0

◆ ColorCorrectionMatrix() [2/5]

ColorCorrectionMatrix ( const float(&) data[3][3])
inlineexplicit

Creates an instance of class ColorCorrectionMatrix with data.

Parameters
dataThe initial data for the color correction matrix.
Since
ids_peak_icv 1.0

◆ ColorCorrectionMatrix() [3/5]

ColorCorrectionMatrix ( Matrix< float, 3, 3 > matrix)
inline

Creates an instance of class ColorCorrectionMatrix with data.

Parameters
matrixThe initial matrix for the color correction matrix.
Since
ids_peak_icv 1.0

◆ ColorCorrectionMatrix() [4/5]

ColorCorrectionMatrix ( std::string name,
const float(&) data[3][3] )
inline

Creates an instance of class ColorCorrectionMatrix.

Parameters
nameThe name of the color correction matrix, used for serialization.
dataThe initial data for the color correction matrix.
Since
ids_peak_icv 1.0

◆ ColorCorrectionMatrix() [5/5]

ColorCorrectionMatrix ( std::string name,
Matrix< float, 3, 3 > matrix )
inline

Creates an instance of class ColorCorrectionMatrix.

Parameters
nameThe name of the color correction matrix, used for serialization.
matrixThe initial matrix for the color correction matrix.
Since
ids_peak_icv 1.0

Member Function Documentation

◆ At() [1/2]

float & At ( std::size_t row,
std::size_t col )
inlineconstexprinherited

Accesses the element at the specified row and column.

This method throws an exception if the indices are out of range.

Parameters
rowThe row index of the element to access.
colThe column index of the element to access.
Returns
A reference to the element at the specified indices.
Exceptions
OutOfRangeExceptionIf the row or column index is out of range.
Since
ids_peak_icv 1.0

◆ At() [2/2]

const float & At ( std::size_t row,
std::size_t col ) const
inlineconstexprinherited

Accesses the element at the specified row and column (const version).

This method throws an exception if the indices are out of range.

Parameters
rowThe row index of the element to access.
colThe column index of the element to access.
Returns
A const reference to the element at the specified indices.
Exceptions
OutOfRangeExceptionIf the row or column index is out of range.
Since
ids_peak_icv 1.0

◆ begin()

auto begin ( )
inherited

Returns an iterator to the beginning of the array.

Returns
An iterator pointing to the first element of the array.
Since
ids_peak_icv 1.0

◆ cbegin()

auto cbegin ( ) const
inherited

Returns a const iterator to the beginning of the array.

Returns
An iterator pointing to the first element of the array.

◆ cend()

auto cend ( ) const
inherited

Returns a const iterator to the end of the array.

Returns
An iterator pointing to one past the last element of the array.

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
inlineoverridevirtual

Restores the object's state from the provided archive.

This function reads and applies all necessary parameters from the given archive to reconstruct the internal state of the object. It ensures that the object is restored to a valid and consistent state.

Parameters
archiveThe source archive containing the serialized parameters.
Since
ids_peak_icv 1.0

Implements ISerializable.

◆ Diagonal()

static Matrix Diagonal ( const float & value)
inlinestaticinherited

Constructs a uniform diagonal matrix.

Parameters
valueThe scalar value to be placed along the diagonal.
Returns
A Matrix with value on the diagonal and zeros elsewhere.
Since
ids_peak_icv 1.0

◆ end()

auto end ( )
inherited

Returns an iterator to the end of the array.

Returns
An iterator pointing to one past the last element of the array.
Since
ids_peak_icv 1.0

◆ GetData()

const float * GetData ( ) const
inlineconstexprinherited

Returns a pointer to the underlying data of the array.

Returns
A pointer to the array data.
Since
ids_peak_icv 1.0

◆ GetNumberOfColumns()

std::size_t GetNumberOfColumns ( ) const
inlineconstexprinherited

Gets the number of columns in the array.

Returns
The number of columns in the array.
Since
ids_peak_icv 1.0

◆ GetNumberOfRows()

std::size_t GetNumberOfRows ( ) const
inlineconstexprinherited

Gets the number of rows in the array.

Returns
The number of rows in the array.
Since
ids_peak_icv 1.0

◆ Identity()

static Matrix Identity ( )
inlinestaticinherited

Creates and returns an identity matrix.

Since
ids_peak_icv 1.0

◆ operator==()

bool operator== ( const ColorCorrectionMatrix & other) const
inline

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
inlineoverridevirtual

Serializes the object's internal state into the provided archive.

This function populates the given archive with all parameters required to fully represent the current state of the object. It ensures that the object can be reconstructed or transmitted accurately by saving all relevant data members in a consistent and structured format.

Parameters
archiveThe target archive that will store the serialized parameters.
Since
ids_peak_icv 1.0

Implements ISerializable.