Image Utilities (IU)
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Groups Pages
Functions
Conversions

Conversion methods for 2D images. More...

Functions

IUCORE_DLLAPI void iu::convert (const ImageGpu_32f_C3 *src, ImageGpu_32f_C4 *dst)
 
IUCORE_DLLAPI void iu::convert (const ImageGpu_32f_C4 *src, ImageGpu_32f_C3 *dst)
 
IUCORE_DLLAPI void iu::convert_32f8u_C1 (const iu::ImageCpu_32f_C1 *src, iu::ImageCpu_8u_C1 *dst, float mul_constant=255.0f, float add_constant=0.0f)
 
IUCORE_DLLAPI void iu::convert_32f8u_C1 (const iu::ImageGpu_32f_C1 *src, iu::ImageGpu_8u_C1 *dst, float mul_constant=255.0f, unsigned char add_constant=0)
 
IUCORE_DLLAPI void iu::convert_32f8u_C4 (const iu::ImageGpu_32f_C4 *src, iu::ImageGpu_8u_C4 *dst, float mul_constant=255.0f, unsigned char add_constant=0)
 
IUCORE_DLLAPI void iu::convert_8u32f_C1 (const iu::ImageGpu_8u_C1 *src, iu::ImageGpu_32f_C1 *dst, float mul_constant=1/255.0f, float add_constant=0.0f)
 
IUCORE_DLLAPI void iu::convert_32u32f_C1 (const iu::ImageGpu_32u_C1 *src, iu::ImageGpu_32f_C1 *dst, float mul_constant, float add_constant=0.0f)
 
IUCORE_DLLAPI void iu::convert_32u32f_C1 (const iu::ImageCpu_32u_C1 *src, iu::ImageCpu_32f_C1 *dst, float mul_constant, float add_constant=0.0f)
 
IUCORE_DLLAPI void iu::convert_32s32f_C1_lin (iu::LinearDeviceMemory_32s_C1 *src, iu::LinearDeviceMemory_32f_C1 *dst)
 
IUCORE_DLLAPI void iu::convert_8u32f_C3C4 (const iu::ImageGpu_8u_C3 *src, iu::ImageGpu_32f_C4 *dst, float mul_constant=1/255.0f, float add_constant=0.0f)
 
IUCORE_DLLAPI void iu::convert_16u32f_C1 (const iu::ImageCpu_16u_C1 *src, iu::ImageCpu_32f_C1 *dst, float mul_constant, float add_constant)
 
IUCORE_DLLAPI void iu::convert_RgbHsv (const iu::ImageGpu_32f_C4 *src, iu::ImageGpu_32f_C4 *dst, bool normalize=false)
 
IUCORE_DLLAPI void iu::convert_HsvRgb (const iu::ImageGpu_32f_C4 *src, iu::ImageGpu_32f_C4 *dst, bool denormalize=false)
 
IUCORE_DLLAPI void iu::convert_RgbLab (const iu::ImageGpu_32f_C4 *src, iu::ImageGpu_32f_C4 *dst, bool isNormalized=true)
 
IUCORE_DLLAPI void iu::convert_LabRgb (const iu::ImageGpu_32f_C4 *src, iu::ImageGpu_32f_C4 *dst)
 

Detailed Description

Conversion methods for 2D images.

Function Documentation

IUCORE_DLLAPI void iu::convert ( const ImageGpu_32f_C3 *  src,
ImageGpu_32f_C4 *  dst 
)

Converts an 32-bit 3-channel image to a 32-bit 4-channel image (adds alpha channel with value 1.0 everywhere).

Parameters
src3-channel source image [device].
dst4-channel destination image [device]
IUCORE_DLLAPI void iu::convert ( const ImageGpu_32f_C4 *  src,
ImageGpu_32f_C3 *  dst 
)

Converts an 32-bit 4-channel image to a 32-bit 3-channel image (simply neglects the alpha channel).

Parameters
src4-channel source image [device].
dst3-channel destination image [device]
IUCORE_DLLAPI void iu::convert_16u32f_C1 ( const iu::ImageCpu_16u_C1 src,
iu::ImageCpu_32f_C1 dst,
float  mul_constant,
float  add_constant 
)

Converts an 16-bit single-channel image to a 32-bit single-channel image.

Parameters
src1-channel source image [host].
dst1-channel destination image [host].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_32f8u_C1 ( const iu::ImageCpu_32f_C1 src,
iu::ImageCpu_8u_C1 dst,
float  mul_constant = 255.0f,
float  add_constant = 0.0f 
)

Converts an 32-bit single-channel image to a 8-bit single-channel image.

Parameters
src1-channel source image [host].
dst1-channel destination image [host].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_32f8u_C1 ( const iu::ImageGpu_32f_C1 src,
iu::ImageGpu_8u_C1 dst,
float  mul_constant = 255.0f,
unsigned char  add_constant = 0 
)

Converts an 32-bit single-channel image to a 8-bit single-channel image.

Parameters
src1-channel source image [device].
dst1-channel destination image [device].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_32f8u_C4 ( const iu::ImageGpu_32f_C4 src,
iu::ImageGpu_8u_C4 dst,
float  mul_constant = 255.0f,
unsigned char  add_constant = 0 
)

Converts an 32-bit 4-channel image to a 8-bit 4-channel image.

Parameters
src4-channel source image [device].
dst4-channel destination image [device].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_32s32f_C1_lin ( iu::LinearDeviceMemory_32s_C1 src,
iu::LinearDeviceMemory_32f_C1 dst 
)

Converts a 32-bit single-channel linear memory to a 32-bit single-channel linear memory. Inplace conversion is possible.

Parameters
src1-channel src linear memory [device].
dst1-channel destination linear memory [device].
IUCORE_DLLAPI void iu::convert_32u32f_C1 ( const iu::ImageGpu_32u_C1 src,
iu::ImageGpu_32f_C1 dst,
float  mul_constant,
float  add_constant = 0.0f 
)

Converts a 32-bit single-channel uint image to a 32-bit single-channel float image.

Parameters
src1-channel source image [device].
dst1-channel destination image [device].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_32u32f_C1 ( const iu::ImageCpu_32u_C1 src,
iu::ImageCpu_32f_C1 dst,
float  mul_constant,
float  add_constant = 0.0f 
)

Converts a 32-bit single-channel uint image to a 32-bit single-channel float image.

Parameters
src1-channel source image [host].
dst1-channel destination image [host].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_8u32f_C1 ( const iu::ImageGpu_8u_C1 src,
iu::ImageGpu_32f_C1 dst,
float  mul_constant = 1/255.0f,
float  add_constant = 0.0f 
)

Converts an 8-bit single-channel image to a 32-bit single-channel image.

Parameters
src1-channel source image [device].
dst1-channel destination image [device].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_8u32f_C3C4 ( const iu::ImageGpu_8u_C3 src,
iu::ImageGpu_32f_C4 dst,
float  mul_constant = 1/255.0f,
float  add_constant = 0.0f 
)

Converts an 8-bit 3-channel image to a 32-bit 4-channel image.

Parameters
src3-channel source image [device].
dst4-channel destination image [device].
mul_constantThe optional scale factor.
add_constantThe optional delta, added to the scaled values.
IUCORE_DLLAPI void iu::convert_HsvRgb ( const iu::ImageGpu_32f_C4 src,
iu::ImageGpu_32f_C4 dst,
bool  denormalize = false 
)

Converts a HSV image to an RGB image.

Parameters
src4-channel source image [device].
dst4-channel destination image [device].
denormalizeDenormalizes all channels to [0, 1]
IUCORE_DLLAPI void iu::convert_LabRgb ( const iu::ImageGpu_32f_C4 src,
iu::ImageGpu_32f_C4 dst 
)

Converts a CIELAB image to a RGB image assuming D65 (=6500K) white point.

Parameters
src4-channel source image [device].
dst4-channel destination image [device].
IUCORE_DLLAPI void iu::convert_RgbHsv ( const iu::ImageGpu_32f_C4 src,
iu::ImageGpu_32f_C4 dst,
bool  normalize = false 
)

Converts an RGB image to a HSV image.

Parameters
src4-channel source image [device].
dst4-channel destination image [device].
normalizeNormalizes all channels to [0, 1]
IUCORE_DLLAPI void iu::convert_RgbLab ( const iu::ImageGpu_32f_C4 src,
iu::ImageGpu_32f_C4 dst,
bool  isNormalized = true 
)

Converts a RGB image to a CIELAB image using D65 (=6500K) white point normalization.

Parameters
src4-channel source image [device].
dst4-channel destination image [device].
isNormalizedflag indicating whether the values of src are normalized to [0, 1] or not. Not normalized images are assumed to have values in [0, 255].