18 #ifndef PIC_COLORS_COLOR_CONV_HPP 19 #define PIC_COLORS_COLOR_CONV_HPP 48 virtual void direct(
float *colIn,
float *colOut)
58 virtual void inverse(
float *colIn,
float *colOut)
69 void transform(
float *colIn,
float *colOut,
bool bDirection) {
83 static void apply(
const float *
mtx,
float *colIn,
float *colOut)
92 colOut[0] = tmp[0] *
mtx[0] + tmp[1] *
mtx[1] + tmp[2] *
mtx[2];
93 colOut[1] = tmp[0] *
mtx[3] + tmp[1] *
mtx[4] + tmp[2] *
mtx[5];
94 colOut[2] = tmp[0] *
mtx[6] + tmp[1] *
mtx[7] + tmp[2] *
mtx[8];
103 static void apply_s(
const float *
mtx,
float *colIn,
float *colOut)
105 if(
mtx == NULL || colIn == NULL || colOut == NULL) {
106 printf(
"Error in ColorSpaceLinear::ConvertLinearSpace_s");
virtual void inverse(float *colIn, float *colOut)
inverse is the inverse of direct.
Definition: color_conv.hpp:58
float mtx_inv[9]
Definition: color_conv.hpp:31
static void apply(const float *mtx, float *colIn, float *colOut)
apply
Definition: color_conv.hpp:83
void transform(float *colIn, float *colOut, bool bDirection)
transform
Definition: color_conv.hpp:69
Definition: bilateral_separation.hpp:25
virtual void direct(float *colIn, float *colOut)
direct converts from a color space to another one.
Definition: color_conv.hpp:48
float mtx[9]
Definition: color_conv.hpp:31
bool linear
Definition: color_conv.hpp:29
The ColorConv class.
Definition: color_conv.hpp:26
ColorConv()
ColorConv.
Definition: color_conv.hpp:38
static void apply_s(const float *mtx, float *colIn, float *colOut)
apply_s a safe apply
Definition: color_conv.hpp:103