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:
srcImageThe source image from which to create normalized imagedestPixelFormatThe desired pixel format for the normalized imagesrcDataRangeThe 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:
srcImageThe source image from which to create normalized imageminThe lower bound of the normalization rangemaxThe upper bound of the normalization rangesrcDataRangeThe 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:
srcImageThe source image from which to create normalized imageminThe lower bound of the normalization rangemaxThe upper bound of the normalization rangedestPixelFormatThe desired pixel format for the normalized imagesrcDataRangeThe 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:
srcImageThe source image from which to create normalized imagedestImageThe destination image in which to store the normalized imagesrcDataRangeThe 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:
srcImageThe source image from which to create normalized imagedestImageThe destination image in which to store the normalized imageminThe lower bound of the normalization rangemaxThe upper bound of the normalization rangesrcDataRangeThe 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:
srcImageThe source image from which to create scaled imagescalingAlgThe desired image scaling algorithm to usescalingFactorThe 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:
srcImageThe source image from which to create scaled imagedestImageAn image object in which to store the scaled datascalingAlgThe desired image scaling algorithm to usescalingFactorThe desired image scaling factor to use
function GetNumThreads¶
Returns the number of threads that Spinnaker utilizes for image post processing.
Returns:
Number of threads
function SetNumThreads¶
Sets the number of threads that Spinnaker utilizes for image post processing.
Parameters:
numThreadsNumber of threads
The documentation for this class was generated from the following file C:/workspace/include/ImageUtility.h