18 #ifndef PIC_COLORS_COLOR_CONV_XYZ_TO_LOGLUV_HPP 19 #define PIC_COLORS_COLOR_CONV_XYZ_TO_LOGLUV_HPP 21 #include "../colors/color_conv.hpp" 49 void direct(
float *colIn,
float *colOut)
52 colOut[0] = logf(colIn[1] +
epsilon);
54 float norm = colIn[0] + colIn[1] + colIn[2];
55 float x = colIn[0] / norm;
56 float y = colIn[1] / norm;
58 float norm_uv = -2.0f * x + 12.0f * y + 3.0f;
59 float u_prime = 4.0f * x / norm_uv;
60 float v_prime = 9.0f * y / norm_uv;
73 float norm = 6.0f * colIn[1] - 16.0f * colIn[2] + 12.0f;
75 float x = 9.0f * colIn[1] / norm;
76 float y = 4.0f * colIn[2] / norm;
77 float z = 1.0f - x - y;
void inverse(float *colIn, float *colOut)
inverse from CIE LUV to XYZ
Definition: color_conv_xyz_to_logluv.hpp:71
float epsilon
Definition: color_conv_xyz_to_logluv.hpp:31
bool linear
Definition: display.hpp:30
ColorConvXYZtoLogLuv()
ColorConvXYZtoLogLuv.
Definition: color_conv_xyz_to_logluv.hpp:38
The ColorConvXYZtoLogLuv class.
Definition: color_conv_xyz_to_logluv.hpp:28
void direct(float *colIn, float *colOut)
direct from XYZ to CIE LUV
Definition: color_conv_xyz_to_logluv.hpp:49
Definition: bilateral_separation.hpp:25
#define MAX(a, b)
Definition: math.hpp:73
The ColorConv class.
Definition: color_conv.hpp:26