Spinnaker SDK C++
4.2.0.21
 
 

 
Loading...
Searching...
No Matches
ImageUtilityCCM Class Reference

Static function to create color corrected images from an image object. More...

#include <ImageUtilityCCM.h>

Static Public Member Functions

static ImagePtr CreateColorCorrected (const ImagePtr &srcImage, const CCMSettings &settings)
 Create a color corrected image from the source image by applying a color correction matrix calibrated according to the settings specified.
 
static void CreateColorCorrected (const ImagePtr &srcImage, ImagePtr &destImage, const CCMSettings &settings)
 Create a color corrected image from the source image by applying a color correction matrix calibrated according to the settings specified.
 
static std::string EncryptColorCorrectionMatrix (std::string ccmMatrixEntries)
 Returns an encrypted custom CCM string based on the input comma separated matrix entries string.
 
static std::string ColorTemperatureToString (const CCMColorTemperature &colorTemperature)
 Fetch the CCM setting color temperature enum and return as a string.
 
static std::string TypeToString (const CCMType &type)
 Fetch the CCM setting type enum and return as a string.
 
static std::string SensorToString (const CCMSensor &sensor)
 Fetch the CCM setting sensor enum and return as a string.
 
static std::string ColorSpaceToString (const CCMColorSpace &colorSpace)
 Fetch the CCM setting color space enum and return as a string.
 
static std::string ApplicationToString (const CCMApplication &application)
 Fetch the CMM setting application enum and return as a string.
 

Detailed Description

Static function to create color corrected images from an image object.

Member Function Documentation

◆ ApplicationToString()

static std::string ApplicationToString ( const CCMApplication application)
static

Fetch the CMM setting application enum and return as a string.

Parameters
applicationThe CMM setting application enum
Returns
The CMM application as a string
See also
CCMSettings

◆ ColorSpaceToString()

static std::string ColorSpaceToString ( const CCMColorSpace colorSpace)
static

Fetch the CCM setting color space enum and return as a string.

Parameters
colorSpaceThe CMM setting color space enum
Returns
The CCM color space as a string
See also
CCMSettings

◆ ColorTemperatureToString()

static std::string ColorTemperatureToString ( const CCMColorTemperature colorTemperature)
static

Fetch the CCM setting color temperature enum and return as a string.

Parameters
colorTemperatureThe CMM setting color temperature enum
Returns
The CCM color temperature as a string
See also
CCMSettings

◆ CreateColorCorrected() [1/2]

static ImagePtr CreateColorCorrected ( const ImagePtr srcImage,
const CCMSettings settings 
)
static

Create a color corrected image from the source image by applying a color correction matrix calibrated according to the settings specified.

When using ImageUtilityCCM, users are advised to disable CCM on the camera before capturing source images. This can be done through the camera node "ColorTransformationEnable".

Color correction is currently supported for the following pixel formats:

  • PixelFormat_BGR8
  • PixelFormat_BGRa8
  • PixelFormat_RGBa8
  • PixelFormat_RGB8
  • PixelFormat_BGR16
  • PixelFormat_BGRa16
  • PixelFormat_RGBa16
  • PixelFormat_RGB16 The output image will have the same pixel format as the source image.
Parameters
srcImageThe source image to which the CCM is applied
settingsSelected CCM settings including CCMColorTemperature, CCMType, CCMSensor, etc
Returns
The color corrected image
See also
CCMSettings

◆ CreateColorCorrected() [2/2]

static void CreateColorCorrected ( const ImagePtr srcImage,
ImagePtr destImage,
const CCMSettings settings 
)
static

Create a color corrected image from the source image by applying a color correction matrix calibrated according to the settings specified.

When using ImageUtilityCCM, users are advised to disable CCM on the camera before capturing source images. This can be done through the camera node "ColorTransformationEnable".

Color correction is currently supported for the following pixel formats:

  • PixelFormat_BGR8
  • PixelFormat_BGRa8
  • PixelFormat_RGBa8
  • PixelFormat_RGB8
  • PixelFormat_BGR16
  • PixelFormat_BGRa16
  • PixelFormat_RGBa16
  • PixelFormat_RGB16

The destination image height and width must be the same as the source image.

Parameters
srcImageThe source image to which the CCM is applied
destImageThe destination image in which to store the color corrected image
settingsSelected CCM settings including CCMColorTemperature, CCMType, CCMSensor, etc
See also
CCMSettings

◆ EncryptColorCorrectionMatrix()

static std::string EncryptColorCorrectionMatrix ( std::string  ccmMatrixEntries)
static

Returns an encrypted custom CCM string based on the input comma separated matrix entries string.

The matrix can be of either 3x3 Linear CCM or 9x3 Advanced CCM type. The custom code can be set in the CCMSettings to create a custom color corrected image that is not available in the existing preset temperature/application type.

Parameters
ccmMatrixEntriesString that contains comma separted CCM matrix entries
See also
CCMSettings
CreateColorCorrected
Returns
std::string Encrypted custom CCM code

◆ SensorToString()

static std::string SensorToString ( const CCMSensor sensor)
static

Fetch the CCM setting sensor enum and return as a string.

Parameters
sensorThe CMM setting sensor enum
Returns
The CCM sensor as a string
See also
CCMSettings

◆ TypeToString()

static std::string TypeToString ( const CCMType type)
static

Fetch the CCM setting type enum and return as a string.

Parameters
typeThe CMM setting type enum
Returns
The CCM type as a string
See also
CCMSettings

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