Skip to content

Class Spinnaker::ImageUtilityCCM

ClassList > Spinnaker > ImageUtilityCCM

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

  • #include <ImageUtilityCCM.h>

Public Static Functions

Type Name
std::string ApplicationToString (const CCMApplication & application)
std::string ColorSpaceToString (const CCMColorSpace & colorSpace)
std::string ColorTemperatureToString (const CCMColorTemperature & colorTemperature)
ImagePtr CreateColorCorrected (const ImagePtr & srcImage, const CCMSettings & settings)
void CreateColorCorrected (const ImagePtr & srcImage, ImagePtr & destImage, const CCMSettings & settings)
std::string EncryptColorCorrectionMatrix (std::string ccmMatrixEntries)
std::string SensorToString (const CCMSensor & sensor)
std::string TypeToString (const CCMType & type)

Public Static Functions Documentation

function ApplicationToString

static std::string Spinnaker::ImageUtilityCCM::ApplicationToString (
    const CCMApplication & application
) 

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

Parameters:

  • application The CMM setting application enum

Returns:

The CMM application as a string

See also: CCMSettings


function ColorSpaceToString

static std::string Spinnaker::ImageUtilityCCM::ColorSpaceToString (
    const CCMColorSpace & colorSpace
) 

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

Parameters:

  • colorSpace The CMM setting color space enum

Returns:

The CCM color space as a string

See also: CCMSettings


function ColorTemperatureToString

static std::string Spinnaker::ImageUtilityCCM::ColorTemperatureToString (
    const CCMColorTemperature & colorTemperature
) 

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

Parameters:

  • colorTemperature The CMM setting color temperature enum

Returns:

The CCM color temperature as a string

See also: CCMSettings


function CreateColorCorrected [1/2]

static ImagePtr Spinnaker::ImageUtilityCCM::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. 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.

NOTE: Source image with alpha channel will not be retained in the destination image. Alpha channel in the color corrected destination image will be set to fully opaque. (255 for 8-bit image, 65535 for 16-bit image).

Parameters:

  • srcImage The source image to which the CCM is applied
  • settings Selected CCM settings including CCMColorTemperature, CCMType, CCMSensor, etc

Returns:

The color corrected image

See also: CCMSettings


function CreateColorCorrected [2/2]

static void Spinnaker::ImageUtilityCCM::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. 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

Note that the destination image height and width must be the same as the source image and the destination buffer cannot point to the same memory location as the source image buffer. This ensures that the image processing operation does not result in undefined behavior or data corruption due to overlapping memory regions.

NOTE: Source image with alpha channel will not be retained in the destination image. Alpha channel in the color corrected destination image will be set to fully opaque. (255 for 8-bit image, 65535 for 16-bit image).

Parameters:

  • srcImage The source image to which the CCM is applied
  • destImage The destination image in which to store the color corrected image
  • settings Selected CCM settings including CCMColorTemperature, CCMType, CCMSensor, etc

See also: CCMSettings


function EncryptColorCorrectionMatrix

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

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:

  • ccmMatrixEntries String that contains comma separted CCM matrix entries

See also: CCMSettings

See also: CreateColorCorrected

Returns:

std::string Encrypted custom CCM code


function SensorToString

static std::string Spinnaker::ImageUtilityCCM::SensorToString (
    const CCMSensor & sensor
) 

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

Parameters:

  • sensor The CMM setting sensor enum

Returns:

The CCM sensor as a string

See also: CCMSettings


function TypeToString

static std::string Spinnaker::ImageUtilityCCM::TypeToString (
    const CCMType & type
) 

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

Parameters:

  • type The 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 C:/workspace/include/ImageUtilityCCM.h