Skip to content

Class Spinnaker::ImageUtility

ClassList > Spinnaker > ImageUtility

Static helper functions for the image object class.

  • #include <ImageUtility.h>

Public Static Functions

Type Name
ImagePtr CreateNormalized (const ImagePtr & srcImage, const PixelFormatEnums destPixelFormat, SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE)
ImagePtr CreateNormalized (const ImagePtr & srcImage, const double min, const double max, SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE)
ImagePtr CreateNormalized (const ImagePtr & srcImage, const double min, const double max, const PixelFormatEnums destPixelFormat, SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE)
void CreateNormalized (const ImagePtr & srcImage, ImagePtr & destImage, SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE)
void CreateNormalized (const ImagePtr & srcImage, ImagePtr & destImage, const double min, const double max, SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE)
ImagePtr CreateScaled (const ImagePtr & srcImage, ImageScalingAlgorithm scalingAlg, double scalingFactor)
void CreateScaled (const ImagePtr & srcImage, ImagePtr & destImage, ImageScalingAlgorithm scalingAlg, double scalingFactor)
unsigned int GetNumThreads ()
void SetNumThreads (const unsigned int numThreads)

Public Static Functions Documentation

function CreateNormalized [1/5]

static ImagePtr Spinnaker::ImageUtility::CreateNormalized (
    const ImagePtr & srcImage,
    const PixelFormatEnums destPixelFormat,
    SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE
) 

Computes a normalized image. The full range of the destination pixel format data type will be used as the min and max range for normalization. The destination pixel format must be of the same data type as the source image pixel format.

Parameters:

  • srcImage The source image from which to create normalized image
  • destPixelFormat The desired pixel format for the normalized image
  • srcDataRange The desired option for the source data range to normalize from

Returns:

The normalized image


function CreateNormalized [2/5]

static ImagePtr Spinnaker::ImageUtility::CreateNormalized (
    const ImagePtr & srcImage,
    const double min,
    const double max,
    SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE
) 

Computes a normalized image. The min and max must be within range of the destination pixel format data type. The normalized image pixel format will be the same as the source image.

Parameters:

  • srcImage The source image from which to create normalized image
  • min The lower bound of the normalization range
  • max The upper bound of the normalization range
  • srcDataRange The desired option for the source data range to normalize from

Returns:

The normalized image


function CreateNormalized [3/5]

static ImagePtr Spinnaker::ImageUtility::CreateNormalized (
    const ImagePtr & srcImage,
    const double min,
    const double max,
    const PixelFormatEnums destPixelFormat,
    SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE
) 

Computes a normalized image. The min and max must be within range of the destination pixel format data type. The destination pixel format must be of the same data type as the source image pixel format.

Parameters:

  • srcImage The source image from which to create normalized image
  • min The lower bound of the normalization range
  • max The upper bound of the normalization range
  • destPixelFormat The desired pixel format for the normalized image
  • srcDataRange The desired option for the source data range to normalize from

Returns:

The normalized image


function CreateNormalized [4/5]

static void Spinnaker::ImageUtility::CreateNormalized (
    const ImagePtr & srcImage,
    ImagePtr & destImage,
    SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE
) 

Computes a normalized image. The full range of the destination pixel format data type will be used as the min and max range for normalization. The destination image must be initialized and have the same width and height as the source image. The destination image pixel format must be of the same data type as the source image pixel format.

Note that the destination image 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.

Parameters:

  • srcImage The source image from which to create normalized image
  • destImage The destination image in which to store the normalized image
  • srcDataRange The desired option for the source data range to normalize from

function CreateNormalized [5/5]

static void Spinnaker::ImageUtility::CreateNormalized (
    const ImagePtr & srcImage,
    ImagePtr & destImage,
    const double min,
    const double max,
    SourceDataRange srcDataRange=SPINNAKER_SOURCE_DATA_RANGE_IMAGE_DATA_RANGE
) 

Computes a normalized image. The min and max must be within range of the destination pixel format data type. The destination image must be initialized and have the same width and height as the source image. The destination image pixel format must be of the same data type as the source image pixel format.

Note that the destination image 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.

Parameters:

  • srcImage The source image from which to create normalized image
  • destImage The destination image in which to store the normalized image
  • min The lower bound of the normalization range
  • max The upper bound of the normalization range
  • srcDataRange The desired option for the source data range to normalize from

function CreateScaled [1/2]

static ImagePtr Spinnaker::ImageUtility::CreateScaled (
    const ImagePtr & srcImage,
    ImageScalingAlgorithm scalingAlg,
    double scalingFactor
) 

Computes a scaled image using the specified parameters. Does not support scaling of raw bayer images.

Parameters:

  • srcImage The source image from which to create scaled image
  • scalingAlg The desired image scaling algorithm to use
  • scalingFactor The desired image scaling factor to use

Returns:

The scaled image


function CreateScaled [2/2]

static void Spinnaker::ImageUtility::CreateScaled (
    const ImagePtr & srcImage,
    ImagePtr & destImage,
    ImageScalingAlgorithm scalingAlg,
    double scalingFactor
) 

Computes a scaled image using the specified parameters. Does not support scaling of raw bayer images. The destination image height and width must be sufficient to store the calculated data. The destination image pixel format must be the same as the source image.

Note that the destination image 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.

Parameters:

  • srcImage The source image from which to create scaled image
  • destImage An image object in which to store the scaled data
  • scalingAlg The desired image scaling algorithm to use
  • scalingFactor The desired image scaling factor to use

function GetNumThreads

static unsigned int Spinnaker::ImageUtility::GetNumThreads () 

Returns the number of threads that Spinnaker utilizes for image post processing.

Returns:

Number of threads


function SetNumThreads

static void Spinnaker::ImageUtility::SetNumThreads (
    const unsigned int numThreads
) 

Sets the number of threads that Spinnaker utilizes for image post processing.

Parameters:

  • numThreads Number of threads


The documentation for this class was generated from the following file C:/workspace/include/ImageUtility.h