5# include "../_cexports/c_foundation.h"
7# include "../global.hpp"
8# include "../image.hpp"
9# include "../exception.hpp"
46 colorModel = guessToColorModel;
67 return Internal::DoResCallObjectOut<Image>(
71 return Internal::DoResCallObjectOut<Image>(
75 return Internal::DoResCallObjectOut<Image>(
79 return Internal::DoResCallObjectOut<Image>(
84 return Internal::DoResCallObjectOut<Image>(
88 return Internal::DoResCallObjectOut<Image>(
92 return Internal::DoResCallObjectOut<Image>(
96 return Internal::DoResCallObjectOut<Image>(
116 return Internal::DoResCallObjectOut<Image>(
140 return Internal::DoResCallObjectOut<Image>(
164 return Internal::DoResCallObjectOut<Image>(
188 return Internal::DoResCallObjectOut<Image>(
212 return Internal::DoResCallObjectOut<Image>(
236 return Internal::DoResCallObjectOut<Image>(
260 return Internal::DoResCallObjectOut<Image>(
284 return Internal::DoResCallObjectOut<Image>(
308 return Internal::DoResCallObjectOut<Image>(
332 return image.
Clone();
336 return Internal::DoResCallObjectOut<Image>(
365 return image.
Clone();
369 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
388 template <
class RANGE>
389 inline typename TypedRange<std::unique_ptr<Image>, int, RANGE>::type
SwapChannels(
const Image &image,
390 const RANGE &newArrangement)
394 throw std::invalid_argument(
"the specification of new channels arrangement must have exactly three entries");
398 return Internal::DoResCallObjectOut<Image>(
399 [&](
void *&resimg) {
return CVB_CALL_CAPI(
SwapRGBChannels(image.
Handle(), newArrDimT.data(), resimg)); });
455 return Internal::DoResCallObjectOut<Image>([&](
void *&resimg) {
458 matrix.
A32, matrix.
A33, matrix.
A34, resimg));
477 using ConvertColorSpace::ColorTwistMatrix;
The Common Vision Blox image.
Definition decl_image.hpp:45
std::unique_ptr< Image > Clone() const
Creates a new image object, that is a copy of the current instance.
Definition detail_image.hpp:116
static TypedRange< std::unique_ptr< Image >, ImagePtr, RANGE >::type FromImages(MappingOption mapping, const RANGE &images)
Create an image that is the result of concatenating a series of input images.
Definition decl_image.hpp:96
Cvb::ColorModel ColorModel() const noexcept
Color model realized by this image.
Definition decl_image.hpp:314
void * Handle() const noexcept
Classic API image handle.
Definition decl_image.hpp:232
cvbres_t ConvertRGBToLab(IMG ImgIn, cvbbool_t UseLab16, IMG &ImgOut)
cvbres_t ConvertHLSToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertYUVToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToLUV(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToHSV(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertLabToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToYUV(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertYCbCrToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToGrayScale(IMG ImgIn, double CoeffRed, double CoeffGreen, double CoeffBlue, IMG &ImgOut)
cvbres_t ApplyColorTwistMatrix(IMG ImgIn, double A11, double A12, double A13, double A14, double A21, double A22, double A23, double A24, double A31, double A32, double A33, double A34, IMG &ImgOut)
cvbres_t ConvertRGBToGrayScaleStandard(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertXYZToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToHLS(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToYCbCr(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToYCC(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertRGBToXYZ(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertLUVToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertYCCToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t ConvertHSVToRGB(IMG ImgIn, IMG &ImgOut)
cvbres_t SwapRGBChannels(IMG ImgIn, long Order[3], IMG &ImgOut)
Namespace for collection of color space conversion functions from the Foundation package.
Definition convert_color_space.hpp:27
std::unique_ptr< Image > ConvertToCieLab8(const Image &image)
Convert the input image to CIE Lab with DataType::Int8BppUnsigned().
Definition convert_color_space.hpp:231
std::unique_ptr< Image > ConvertToMono(const Image &image)
Convert the input image to mono.
Definition convert_color_space.hpp:327
TypedRange< std::unique_ptr< Image >, int, RANGE >::type SwapChannels(const Image &image, const RANGE &newArrangement)
Create a new image by rearranging the planes of the input image.
Definition convert_color_space.hpp:389
std::unique_ptr< Image > ConvertToCieXYZ(const Image &image)
Convert the input image to CIE XYZ.
Definition convert_color_space.hpp:159
std::unique_ptr< Image > ConvertToYUV(const Image &image)
Convert the input image to YUV.
Definition convert_color_space.hpp:111
std::unique_ptr< Image > ConvertToCieLab16(const Image &image)
Convert the input image to CIE Lab with DataType::Int16BppUnsigned() for better precision.
Definition convert_color_space.hpp:207
std::unique_ptr< Image > ConvertToYCC(const Image &image)
Convert the input image to YCC.
Definition convert_color_space.hpp:255
std::unique_ptr< Image > ConvertToYCbCr(const Image &image)
Convert the input image to YCbCr.
Definition convert_color_space.hpp:135
std::unique_ptr< Image > ConvertToRGB(const Image &image, ColorModel guessToColorModel=ColorModel::RGB)
Convert the input image to RGB.
Definition convert_color_space.hpp:41
std::unique_ptr< Image > TwistColors(const Image &image, ColorTwistMatrix matrix)
Apply the color twist matrix to the input image.
Definition convert_color_space.hpp:453
std::unique_ptr< Image > ConvertToHLS(const Image &image)
Convert the input image to HLS.
Definition convert_color_space.hpp:279
std::unique_ptr< Image > ConvertToHSV(const Image &image)
Convert the input image to HSV.
Definition convert_color_space.hpp:303
std::unique_ptr< Image > ConvertToCieLUV(const Image &image)
Convert the input image to CIE LUV.
Definition convert_color_space.hpp:183
Namespace for the Foundation package.
Definition decl_metric_aqs12_calibration_piece.hpp:11
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
@ CopyPixels
Definition global.hpp:365
ColorModel
Color model that this image is using.
Definition global.hpp:176
@ CieLUV
Definition global.hpp:216
@ HLS
Definition global.hpp:224
@ CieLab
Definition global.hpp:220
@ MonoGuess
Definition global.hpp:184
@ HSI
Definition global.hpp:208
@ Mono
Definition global.hpp:192
@ HSV
Definition global.hpp:232
@ CieXYZ
Definition global.hpp:236
@ Unknown
Definition global.hpp:188
@ RGB
Definition global.hpp:200
@ YUV
Definition global.hpp:204
@ YCC
Definition global.hpp:228
@ YCbCr
Definition global.hpp:212
@ RGBGuess
Definition global.hpp:180
Matrix defining color transformations.
Definition convert_color_space.hpp:406
double A14
Coefficient 1,4 of the matrix.
Definition convert_color_space.hpp:418
double A21
Coefficient 2,1 of the matrix.
Definition convert_color_space.hpp:421
double A11
Coefficient 1,1 of the matrix.
Definition convert_color_space.hpp:409
double A12
Coefficient 1,2 of the matrix.
Definition convert_color_space.hpp:412
double A33
Coefficient 3,3 of the matrix.
Definition convert_color_space.hpp:439
double A13
Coefficient 1,3 of the matrix.
Definition convert_color_space.hpp:415
double A32
Coefficient 3,2 of the matrix.
Definition convert_color_space.hpp:436
double A34
Coefficient 3,4 of the matrix.
Definition convert_color_space.hpp:442
double A23
Coefficient 2,3 of the matrix.
Definition convert_color_space.hpp:427
double A31
Coefficient 3,1 of the matrix.
Definition convert_color_space.hpp:433
double A24
Coefficient 2,4 of the matrix.
Definition convert_color_space.hpp:430
double A22
Coefficient 2,2 of the matrix.
Definition convert_color_space.hpp:424