some tweaks to the L*a*b* correction grid module
This commit is contained in:
parent
041990d216
commit
7353ff864b
@ -7199,7 +7199,7 @@ SSEFUNCTION void ImProcFunctions::lab2rgb (const LabImage &src, Imagefloat &dst,
|
||||
*/
|
||||
void ImProcFunctions::colorToningLabGrid(LabImage *lab)
|
||||
{
|
||||
const float factor = ColorToningParams::LABGRID_CORR_MAX * 1.6f;
|
||||
const float factor = ColorToningParams::LABGRID_CORR_MAX * 3.f;
|
||||
float a_scale = (params->colorToning.labgridAHigh - params->colorToning.labgridALow) / factor;
|
||||
float a_base = params->colorToning.labgridALow;
|
||||
float b_scale = (params->colorToning.labgridBHigh - params->colorToning.labgridBLow) / factor;
|
||||
|
@ -618,6 +618,8 @@ bool LocalContrastParams::operator!=(const LocalContrastParams &other) const
|
||||
}
|
||||
|
||||
|
||||
const double ColorToningParams::LABGRID_CORR_MAX = 12000.f;
|
||||
|
||||
ColorToningParams::ColorToningParams() :
|
||||
enabled(false),
|
||||
autosat(true),
|
||||
|
@ -452,7 +452,7 @@ struct ColorToningParams {
|
||||
double labgridBLow;
|
||||
double labgridAHigh;
|
||||
double labgridBHigh;
|
||||
static constexpr double LABGRID_CORR_MAX = 8000.f;
|
||||
static const double LABGRID_CORR_MAX;
|
||||
|
||||
ColorToningParams();
|
||||
|
||||
|
@ -119,19 +119,17 @@ public:
|
||||
const int cells = 8;
|
||||
float step = rtengine::ColorToningParams::LABGRID_CORR_MAX / float(cells/2);
|
||||
for (int j = 0; j < cells; j++) {
|
||||
for(int i = 0; i < cells; i++) {
|
||||
for (int i = 0; i < cells; i++) {
|
||||
float R, G, B;
|
||||
float x, y, z;
|
||||
int ii = i - cells/2;
|
||||
int jj = j - cells/2;
|
||||
float a = step * (ii + 0.5) * 1.5;
|
||||
float b = step * (jj + 0.5) * 1.5;
|
||||
float a = step * (ii + 0.5);
|
||||
float b = step * (jj + 0.5);
|
||||
Color::Lab2XYZ(25000.f, a, b, x, y, z);
|
||||
Color::xyz2srgb(x, y, z, R, G, B);
|
||||
cr->set_source_rgb(R / 65535.f, G / 65535.f, B / 65535.f);
|
||||
cr->rectangle(width * i / (float)cells, height * j / (float)cells,
|
||||
width / (float)cells - 1,
|
||||
height / (float)cells - 1);
|
||||
cr->rectangle(width * i / float(cells), height * j / float(cells), width / float(cells) - 1, height / float(cells) - 1);
|
||||
cr->fill();
|
||||
}
|
||||
}
|
||||
|
@ -174,7 +174,6 @@ public:
|
||||
bool labgridBLow;
|
||||
bool labgridAHigh;
|
||||
bool labgridBHigh;
|
||||
bool labgridSaturation;
|
||||
};
|
||||
|
||||
class SharpenEdgeParamsEdited
|
||||
|
Loading…
x
Reference in New Issue
Block a user