Improve exposure with Laplace PDE

This commit is contained in:
Desmis 2019-07-18 11:42:29 +02:00
parent f54b0f619d
commit 1add88a9ae
13 changed files with 430 additions and 30 deletions

View File

@ -944,6 +944,9 @@ HISTORY_MSG_697;Local - TM Normalize
HISTORY_MSG_698;Local - Local contrast Fast Fourier
HISTORY_MSG_699;Local - Retinex Fast Fourier
HISTORY_MSG_701;Local - Exp Shadows
HISTORY_MSG_703;Local - Exp Laplacian threshold
HISTORY_MSG_704;Local - Exp PDE balance
HISTORY_MSG_705;Local - Exp linearity
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@ -2037,6 +2040,7 @@ TP_LOCALLAB_GRIDONE;Color Toning
TP_LOCALLAB_GRIDTWO;Direct
TP_LOCALLAB_LUM;Curves LC
TP_LOCALLAB_LAPLACE;Laplacian threshold deltaE
TP_LOCALLAB_LINEAR;Linearity
TP_LOCALLAB_HLH;Curves H
TP_LOCALLAB_EQUIL;Normalize Luminance
TP_LOCALLAB_CHROMACBDL;Chroma
@ -2064,6 +2068,8 @@ TP_LOCALLAB_EXPCHROMA;Chroma compensation
TP_LOCALLAB_GUIDFILTER;Guided filter radius
TP_LOCALLAB_GUIDFILTER_TOOLTIP;Adapt this values according to images - reduce if non misty images
TP_LOCALLAB_LOC_CONTRAST;Local contrast
TP_LOCALLAB_LAPLACEXP;Laplacian threshold
TP_LOCALLAB_BALANEXP;PDE balance
TP_LOCALLAB_REFLABEL;Ref. (0..1) Chroma=%1 Luma=%2 Hue=%3
TP_LOCALLAB_NOISELUMFINE;Luminance fine 1 (Wav)
TP_LOCALLAB_NOISELUMFINEZERO;Luminance fine 0 (Wav)
@ -2076,6 +2082,7 @@ TP_LOCALLAB_NOISECHROCOARSE;Chroma coarse (Wav)
TP_LOCALLAB_NOISECHRODETAIL;Chroma detail (DCT)
TP_LOCALLAB_NOISECHROC_TOOLTIP;If superior to zero, high quality algorithm is enabled.\nCoarse is for slider >=2
TP_LOCALLAB_PREVIEWSEL;Preview selection deltaE
TP_LOCALLAB_PDEFRA;PDE
TP_LOCALLAB_QUAL_METHOD;Global quality
TP_LOCALLAB_QUALCURV_METHOD;Curves type
TP_LOCALLAB_GAM;Gamma
@ -2094,7 +2101,8 @@ TP_LOCALLAB_PROXI;DeltaE weakening
TP_LOCALLAB_THRESDELTAE;Threshold deltaE-scope
TP_LOCALLAB_LIGHTNESS;Lightness
TP_LOCALLAB_MASK;Mask:
TP_LOCALLAB_METHOD_TOOLTIP;'Enhanced + chroma denoise' significantly increases processing times.\nBut reduce artifacts.
TP_LOCALLAB_METHOD_TOOLTIP;'Enhanced + chroma denoise' significantly increases processing times.\nBut reduce artifacts.
TP_LOCALLAB_PDE;Laplacian & PDE
TP_LOCALLAB_RADIUS;Radius
TP_LOCALLAB_RADMASKCOL;Radius
TP_LOCALLAB_RESID;Residual Image

View File

@ -1054,6 +1054,72 @@ void CurveFactory::complexCurve(double ecomp, double black, double hlcompr, doub
}
void CurveFactory::Curvelocalhl(double ecomp, double hlcompr, double hlcomprthresh, LUTf & hlCurve)
{
// a: slope of the curve
const float a = powf(2.0f, ecomp);
hlCurve.setClip(LUT_CLIP_BELOW); // used LUT_CLIP_BELOW, because we want to have a baseline of 2^expcomp in this curve. If we don't clip the lut we get wrong values, see Issue 2621 #14 for details
float exp_scale = a;
float maxran = 65536.f;
float scale = maxran;
float comp = (max(0.0, ecomp) + 1.0) * hlcompr / 100.0;
float shoulder = ((scale / max(1.0f, exp_scale)) * (hlcomprthresh / 200.0)) + 0.1;
if (comp <= 0.0f) {
hlCurve.makeConstant(exp_scale);
} else {
hlCurve.makeConstant(exp_scale, shoulder + 1);
float scalemshoulder = scale - shoulder;
#ifdef __SSE2__
int i = shoulder + 1;
if (i & 1) { // original formula, slower than optimized formulas below but only used once or none, so I let it as is for reference
// change to [0,1] range
float val = (float)i - shoulder;
float R = val * comp / (scalemshoulder);
hlCurve[i] = xlog(1.0f + R * exp_scale) / R; // don't use xlogf or 1.f here. Leads to errors caused by too low precision
i++;
}
vdouble onev = _mm_set1_pd(1.0);
vdouble Rv = _mm_set_pd((i + 1 - shoulder) * (double)comp / scalemshoulder, (i - shoulder) * (double)comp / scalemshoulder);
vdouble incrementv = _mm_set1_pd(2.0 * comp / scalemshoulder);
vdouble exp_scalev = _mm_set1_pd(exp_scale);
// for (; i < 0x10000; i += 2) {
for (; i < maxran; i += 2) {
// change to [0,1] range
vdouble resultv = xlog(onev + Rv * exp_scalev) / Rv;
vfloat resultfv = _mm_cvtpd_ps(resultv);
_mm_store_ss(&hlCurve[i], resultfv);
resultfv = PERMUTEPS(resultfv, _MM_SHUFFLE(1, 1, 1, 1));
_mm_store_ss(&hlCurve[i + 1], resultfv);
Rv += incrementv;
}
#else
float R = comp / scalemshoulder;
float increment = R;
// for (int i = shoulder + 1; i < 0x10000; i++) {
for (int i = shoulder + 1; i < maxran; i++) {
// change to [0,1] range
hlCurve[i] = xlog(1.0f + R * exp_scale) / R; // don't use xlogf or 1.f here. Leads to errors caused by too low precision
R += increment;
}
#endif
}
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void CurveFactory::complexCurvelocal(double ecomp, double black, double hlcompr, double hlcomprthresh,

View File

@ -364,6 +364,8 @@ public:
LUTf & hlCurve, LUTf & shCurve, LUTf & outCurve, LUTf & lightCurveloc, float avg,
int skip = 1);
static void Curvelocalhl(double ecomp, double hlcompr, double hlcomprthresh, LUTf & hlCurve);
static void curveBW(const std::vector<double>& curvePointsbw, const std::vector<double>& curvePointsbw2, const LUTu & histogrambw, LUTu & outBeforeCCurveHistogrambw,
ToneCurve & customToneCurvebw1, ToneCurve & customToneCurvebw2, int skip);

View File

@ -298,8 +298,9 @@ public:
void idirpyr(LabImage* data_coarse, LabImage* data_fine, int level, LUTf &rangefn_L, LUTf & nrwt_l, LUTf & nrwt_ab,
int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/);
//locallab
void normalize_mean_dt(float *data, const float *ref, size_t size);
void normalize_mean_dt(float *data, const float *ref, size_t size, float mod);
void retinex_pde(float *datain, float * dataout, int bfw, int bfh, float thresh, float multy, float *dE, int show);
void exposure_pde(float *dataor, float *datain, float * dataout, int bfw, int bfh, float thresh, float mod);
void fftw_convol_blur(float *input, float *output, int bfw, int bfh, float radius, int fftkern, int algo);
void fftw_convol_blur2(float **input2, float **output2, int bfw, int bfh, float radius, int fftkern, int algo);
void fftw_tile_blur(int GW, int GH, int tilssize , int max_numblox_W, int min_numblox_W, float **tmp1, int numThreads, double radius);
@ -324,7 +325,7 @@ public:
void transit_shapedetect_retinex(int senstype, LabImage * bufexporig, LabImage * bufmask, LabImage * buforigmas, float **buflight, float **bufchro, const float hueref, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
void transit_shapedetect(int senstype, const LabImage *bufexporig, LabImage * originalmask, float **buflight, float **bufchro, float **buf_a_cat, float ** buf_b_cat, float ** bufhh, bool HHutili, const float hueref, const float chromaref, const float lumaref, float sobelref, float meansobel, float ** blend2, const struct local_params & lp, LabImage * original, LabImage * transformed, int cx, int cy, int sk);
void exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve);
void exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, float mean);
void Exclude_Local(float **deltaso, float hueref, float chromaref, float lumaref, float sobelref, float meansobel, const struct local_params & lp, const LabImage * original, LabImage * transformed, const LabImage * rsv, const LabImage * reserv, int cx, int cy, int sk);
void DeNoise_Local(int call, const struct local_params& lp, int levred, float hueref, float lumaref, float chromaref, LabImage* original, LabImage* transformed, LabImage &tmp1, int cx, int cy, int sk);

View File

@ -253,8 +253,12 @@ struct local_params {
int showmaskcbmet;
int showmaskretimet;
int showmasksoftmet;
int blurmet;
float laplacexp;
float balanexp;
float linear;
int expmet;
int softmet;
int blurmet;
float noiself;
float noiself0;
float noiself2;
@ -460,6 +464,16 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
lp.gridmet = 1;
}
if (locallab.spots.at(sp).expMethod == "std") {
lp.expmet = 0;
} else if (locallab.spots.at(sp).expMethod == "pde") {
lp.expmet = 1;
}
printf("lpexmet=%i \n", lp.expmet);
lp.laplacexp = locallab.spots.at(sp).laplacexp;
lp.balanexp = locallab.spots.at(sp).balanexp;
lp.linear = locallab.spots.at(sp).linear;
lp.showmaskcolmet = llColorMask;
lp.showmaskexpmet = llExpMask;
lp.showmaskSHmet = llSHMask;
@ -1223,18 +1237,20 @@ void ImProcFunctions::softprocess(const LabImage* bufcolorig, array2D<float> &bu
}
}
void ImProcFunctions::exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve)
void ImProcFunctions::exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, float mean)
{
BENCHFUN
//exposure local
constexpr float maxran = 65536.f;
const float exp_scale = pow(2.0, lp.expcomp);
const float comp = (max(0.0, lp.expcomp) + 1.0) * lp.hlcomp / 100.0;
const float shoulder = ((maxran / max(1.0f, exp_scale)) * (lp.hlcompthr / 200.0)) + 0.1;
const float hlrange = maxran - shoulder;
float exp_scale = pow(2.0, lp.expcomp);
float comp = (max(0.0, lp.expcomp) + 1.0) * lp.hlcomp / 100.0;
float shoulder = ((maxran / max(1.0f, exp_scale)) * (lp.hlcompthr / 200.0)) + 0.1;
float hlrange = maxran - shoulder;
float linear = lp.linear;
// printf("linear=%f mean=%f expc=%f\n", linear, mean, lp.expcomp);
float kl = 1.f;
float addcomp = 0.f;
#ifdef _OPENMP
#pragma omp parallel for
#endif
@ -1242,9 +1258,19 @@ void ImProcFunctions::exlabLocal(const local_params& lp, int bfh, int bfw, LabIm
for (int ir = 0; ir < bfh; ir++) {
for (int jr = 0; jr < bfw; jr++) {
float L = bufexporig->L[ir][jr];
if(L < mean && lp.expmet == 1 && lp.expcomp > 0.f && !lp.invex) {
float Llin = LIM01(L / 32768.f);
addcomp = linear * (-kl * Llin + kl);
exp_scale = pow(2.0, (lp.expcomp + addcomp));
shoulder = ((maxran / max(1.0f, (exp_scale + addcomp))) * (lp.hlcompthr / 200.0)) + 0.1;
comp = (max(0.0, (lp.expcomp + addcomp)) + 1.0) * lp.hlcomp / 100.0;
hlrange = maxran - shoulder;
}
// CurveFactory::Curvelocalhl(comp, lp.hlcomp, lp.hlcompthr, hltonecurve);//to change with comp(ir,jr) if need
//highlight
const float hlfactor = (2 * L < MAXVALF ? hltonecurve[2 * L] : CurveFactory::hlcurve(exp_scale, comp, hlrange, 2 * L));
L *= hlfactor;
L *= hlfactor * pow(2.0, addcomp);//approximation but pretty good with Laplacian
//shadow tone curve
const float shfactor = shtonecurve[2 * L];
//tonecurve
@ -2650,7 +2676,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, const LabImage *bufexpor
datain[(y - ystart) * bfw + (x - xstart)] = original->L[y][x];
data[(y - ystart)* bfw + (x - xstart)] = bufexporig->L[y - ystart][x - xstart];
}
normalize_mean_dt(data, datain, bfh * bfw);
normalize_mean_dt(data, datain, bfh * bfw, 1.f);
#ifdef _OPENMP
#pragma omp parallel for
#endif
@ -3120,8 +3146,8 @@ void ImProcFunctions::InverseColorLight_Local(int sp, int senstype, const struct
temp->L[y][x] = original->L[y][x];
}
}
ImProcFunctions::exlabLocal(lp, GH, GW, original, temp, hltonecurveloc, shtonecurveloc, tonecurveloc);
float meanorig = 0.f;
ImProcFunctions::exlabLocal(lp, GH, GW, original, temp, hltonecurveloc, shtonecurveloc, tonecurveloc, meanorig);
if (exlocalcurve) {
#ifdef _OPENMP
@ -3752,7 +3778,7 @@ static void mean_dt(const float *data, size_t size, double *mean_p, double *dt_p
return;
}
void ImProcFunctions::normalize_mean_dt(float *data, const float *ref, size_t size)
void ImProcFunctions::normalize_mean_dt(float *data, const float *ref, size_t size, float mod)
{
/*
* Copyright 2009-2011 IPOL Image Processing On Line http://www.ipol.im/
@ -3768,6 +3794,7 @@ void ImProcFunctions::normalize_mean_dt(float *data, const float *ref, size_t si
double a, b;
size_t i;
float *ptr_data;
float *ptr_dataold;
if (NULL == data || NULL == ref) {
fprintf(stderr, "a pointer is NULL and should not be so\n");
@ -3784,8 +3811,11 @@ void ImProcFunctions::normalize_mean_dt(float *data, const float *ref, size_t si
/* normalize the array */
ptr_data = data;
ptr_dataold = data;
for (i = 0; i < size; i++) {
*ptr_data = a * *ptr_data + b;
*ptr_data = mod * *ptr_data + (1.f - mod) * *ptr_dataold;
ptr_data++;
}
@ -4022,7 +4052,7 @@ void ImProcFunctions::retinex_pde(float *datain, float * dataout, int bfw, int b
fftwf_cleanup_threads();
}
if( show != 4) {
normalize_mean_dt(data, datain, bfw * bfh);
normalize_mean_dt(data, datain, bfw * bfh, 1.f);
}
if(show == 0 || show == 4) {
@ -4047,6 +4077,68 @@ void ImProcFunctions::retinex_pde(float *datain, float * dataout, int bfw, int b
void ImProcFunctions::exposure_pde(float *dataor, float *datain, float * dataout, int bfw, int bfh, float thresh, float mod)
{
BENCHFUN
#ifdef _OPENMP
if (multiThread) {
fftwf_init_threads();
fftwf_plan_with_nthreads ( omp_get_max_threads() );
}
#endif
fftwf_plan dct_fw, dct_bw;
float *data_fft, *data_tmp, *data;
if (NULL == (data_tmp = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) {
fprintf(stderr, "allocation error\n");
abort();
}
//first call to laplacian with plein strength
(void) discrete_laplacian_threshold(data_tmp, datain, bfw, bfh, thresh);
if (NULL == (data_fft = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) {
fprintf(stderr, "allocation error\n");
abort();
}
if (NULL == (data = (float *) fftwf_malloc(sizeof(float) * bfw * bfh))) {
fprintf(stderr, "allocation error\n");
abort();
}
//execute first
dct_fw = fftwf_plan_r2r_2d(bfh, bfw, data_tmp, data_fft, FFTW_REDFT10, FFTW_REDFT10, FFTW_ESTIMATE | FFTW_DESTROY_INPUT);
fftwf_execute(dct_fw);
fftwf_free(data_tmp);
/* solve the Poisson PDE in Fourier space */
/* 1. / (float) (bfw * bfh)) is the DCT normalisation term, see libfftw */
(void) retinex_poisson_dct(data_fft, bfw, bfh, 1./(double) (bfw * bfh));
dct_bw = fftwf_plan_r2r_2d(bfh, bfw, data_fft, data, FFTW_REDFT01, FFTW_REDFT01, FFTW_ESTIMATE | FFTW_DESTROY_INPUT);
fftwf_execute(dct_bw);
fftwf_destroy_plan(dct_fw);
fftwf_destroy_plan(dct_bw);
fftwf_free(data_fft);
fftwf_cleanup();
if (multiThread) {
fftwf_cleanup_threads();
}
normalize_mean_dt(data, dataor, bfw * bfh, mod);
{
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (int y = 0; y < bfh ; y++) {
for (int x = 0; x < bfw; x++) {
dataout[y * bfw + x] = CLIPLOC(data[y * bfw + x]);
}
}
}
}
void ImProcFunctions::fftw_convol_blur(float *input, float *output, int bfw, int bfh, float radius, int fftkern, int algo)
{
/*
@ -6527,6 +6619,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (bfw > 0 && bfh > 0) {
std::unique_ptr<LabImage> bufexporig(new LabImage(bfw, bfh)); //buffer for data in zone limit
std::unique_ptr<LabImage> bufexpfin(new LabImage(bfw, bfh)); //buffer for data in zone limit
// std::unique_ptr<LabImage> temp(new LabImage(bfw, bfh)); //buffer for data in zone limit
JaggedArray<float> buflight(bfw, bfh);
JaggedArray<float> bufl_ab(bfw, bfh);
@ -6553,6 +6646,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float *datain = new float[bfwr*bfhr];
float *dataout = new float[bfwr*bfhr];
float *dE = new float[bfwr*bfhr];
deltaEforLaplace (dE, lp, bfwr, bfhr, bufexpfin.get(), hueref, chromaref, lumaref);
#ifdef _OPENMP
@ -6560,6 +6654,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
#endif
for (int y = 0; y < bfhr; y++) {
for (int x = 0; x < bfwr; x++) {
// datain[y * bfwr + x] = temp->L[y][x] - bufexpfin->L[y][x];
datain[y * bfwr + x] = bufexpfin->L[y][x];
}
}
@ -6570,6 +6665,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
#endif
for (int y = 0; y < bfhr; y++) {
for (int x = 0; x < bfwr; x++) {
// bufexpfin->L[y][x] = dataout[y * bfwr + x] + bufexpfin->L[y][x];
bufexpfin->L[y][x] = dataout[y * bfwr + x];
}
}
@ -7041,7 +7137,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
data[ir * Wd + jr] = orig[ir][jr];
}
normalize_mean_dt(data, datain, Hd * Wd);
normalize_mean_dt(data, datain, Hd * Wd, 1.f);
#ifdef _OPENMP
#pragma omp parallel for
#endif
@ -7320,7 +7416,14 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float meanfab, fab;
mean_fab(xstart, ystart, bfw, bfh, bufexporig.get(), original, fab, meanfab, lp.chromaexp);
float meanorig = 0.f;
for (int ir = 0; ir < bfh; ir++)
for (int jr = 0; jr < bfw; jr++) {
meanorig += bufexporig->L[ir][jr];
}
meanorig /= (bfh*bfw);
// meanorig /= 32768.f;
// printf("meanor=%f \n", meanorig);
if (lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 5) {
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
@ -7425,10 +7528,6 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bufexpfin->b[y][x] = original->b[y + ystart][x + xstart];
}
}
//shadows with ipshadowshighlight
if(lp.shadex > 0) {
ImProcFunctions::shadowsHighlights(bufexporig.get(), true, 1, 0, lp.shadex, 40, sk, 0, lp.shcomp);
}
@ -7446,14 +7545,47 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
lp.expcomp = 0.1f; // to enabled
}
ImProcFunctions::exlabLocal(lp, bfh, bfw, bufexpfin.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc);
ImProcFunctions::exlabLocal(lp, bfh, bfw, bufexpfin.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, meanorig);
} else {
ImProcFunctions::exlabLocal(lp, bfh, bfw, bufexporig.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc);
ImProcFunctions::exlabLocal(lp, bfh, bfw, bufexporig.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc, meanorig);
}
//exposure_pde
if(lp.expmet == 1) {
float *datain = new float[bfw*bfh];
float *dataout = new float[bfw*bfh];
float *dataor = new float[bfw*bfh];
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
for (int y = 0; y < bfh; y++) {
for (int x = 0; x < bfw; x++) {
datain[y * bfw + x] = bufexpfin->L[y][x];// - bufexporig->L[y][x];
dataor[y * bfw + x] = bufexpfin->L[y][x];
}
}
ImProcFunctions::exposure_pde(dataor, datain, dataout, bfw, bfh, 12.f * lp.laplacexp, lp.balanexp);
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
for (int y = 0; y < bfh; y++) {
for (int x = 0; x < bfw; x++) {
bufexpfin->L[y][x] = dataout[y * bfw + x] ;//+ bufexporig->L[y][x];
}
}
delete [] datain;
delete [] dataout;
delete [] dataor;
}
//shadows with ipshadowshighlight
if(lp.shadex > 0) {
ImProcFunctions::shadowsHighlights(bufexpfin.get(), true, 1, 0, lp.shadex, 40, sk, 0, lp.shcomp);
}
//cat02
if (params->locallab.spots.at(sp).warm != 0) {
ImProcFunctions::ciecamloc_02float(sp, bufexpfin.get());

View File

@ -728,6 +728,10 @@ enum ProcEventCode {
Evlocallabfftwreti = 698,
EvlocallabshowmasksoftMethod = 699,
Evlocallabshadex = 700,
EvlocallabexpMethod = 701,
Evlocallablaplacexp = 702,
Evlocallabbalanexp = 703,
Evlocallablinear = 704,
NUMOFEVENTS
};

View File

@ -2416,6 +2416,10 @@ LocallabParams::LocallabSpot::LocallabSpot() :
gammaskexp(1.0),
slomaskexp(0.0),
softradiusexp(0.0),
expMethod("std"),
laplacexp(20.0),
balanexp(0.8),
linear(0.0),
// Shadow highlight
expshadhigh(false),
highlights(0),
@ -2636,6 +2640,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& gammaskexp == other.gammaskexp
&& slomaskexp == other.slomaskexp
&& softradiusexp == other.softradiusexp
&& expMethod == other.expMethod
&& laplacexp == other.laplacexp
&& balanexp == other.balanexp
&& linear == other.linear
// Shadow highlight
&& expshadhigh == other.expshadhigh
&& highlights == other.highlights
@ -3813,6 +3821,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskexp, "Locallab", "Gammaskexp_" + std::to_string(i), spot.gammaskexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskexp, "Locallab", "Slomaskexp_" + std::to_string(i), spot.slomaskexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiusexp, "Locallab", "Softradiusexp_" + std::to_string(i), spot.softradiusexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expMethod, "Locallab", "ExpMethod_" + std::to_string(i), spot.expMethod, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).laplacexp, "Locallab", "Laplacexp_" + std::to_string(i), spot.laplacexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).balanexp, "Locallab", "Balanexp_" + std::to_string(i), spot.balanexp, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).linear, "Locallab", "Linearexp_" + std::to_string(i), spot.linear, keyFile);
// Shadow highlight
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expshadhigh, "Locallab", "Expshadhigh_" + std::to_string(i), spot.expshadhigh, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).highlights, "Locallab", "highlights_" + std::to_string(i), spot.highlights, keyFile);
@ -5118,6 +5130,10 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Gammaskexp_" + std::to_string(i), pedited, spot.gammaskexp, spotEdited.gammaskexp);
assignFromKeyfile(keyFile, "Locallab", "Slomaskexp_" + std::to_string(i), pedited, spot.slomaskexp, spotEdited.slomaskexp);
assignFromKeyfile(keyFile, "Locallab", "Softradiusexp_" + std::to_string(i), pedited, spot.softradiusexp, spotEdited.softradiusexp);
assignFromKeyfile(keyFile, "Locallab", "ExpMethod_" + std::to_string(i), pedited, spot.expMethod, spotEdited.expMethod);
assignFromKeyfile(keyFile, "Locallab", "Laplacexp_" + std::to_string(i), pedited, spot.laplacexp, spotEdited.laplacexp);
assignFromKeyfile(keyFile, "Locallab", "Balanexp_" + std::to_string(i), pedited, spot.balanexp, spotEdited.balanexp);
assignFromKeyfile(keyFile, "Locallab", "Linearexp_" + std::to_string(i), pedited, spot.linear, spotEdited.linear);
// Shadow highlight
assignFromKeyfile(keyFile, "Locallab", "Expshadhigh_" + std::to_string(i), pedited, spot.expshadhigh, spotEdited.expshadhigh);
assignFromKeyfile(keyFile, "Locallab", "highlights_" + std::to_string(i), pedited, spot.highlights, spotEdited.highlights);

View File

@ -1018,6 +1018,10 @@ struct LocallabParams {
double gammaskexp;
double slomaskexp;
double softradiusexp;
Glib::ustring expMethod;
double laplacexp;
double balanexp;
double linear;
// Shadow highlight
bool expshadhigh;
int highlights;

View File

@ -724,10 +724,14 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //EvlocallabsoftMethod
LUMINANCECURVE, // Evlocallabequilret
LUMINANCECURVE, // Evlocallabequiltm
LUMINANCECURVE, // Evlocallabfftwlc
LUMINANCECURVE, // Evlocallabfftwreti
LUMINANCECURVE, //EvlocallabshowmasksoftMethod
LUMINANCECURVE //Evlocallabshadex
LUMINANCECURVE, // Evlocallabfftwlc
LUMINANCECURVE, // Evlocallabfftwreti
LUMINANCECURVE, //EvlocallabshowmasksoftMethod
LUMINANCECURVE, //Evlocallabshadex
LUMINANCECURVE, // EvlocallabexpMethod
LUMINANCECURVE, //EvLocallablaplacexp
LUMINANCECURVE, //EvLocallabbalanexp
LUMINANCECURVE //EvLocallablinear
};

View File

@ -198,6 +198,9 @@ Locallab::Locallab():
gammaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))),
slomaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
softradiusexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.1, 0.))),
laplacexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACEXP"), 0.0, 100.0, 0.1, 20.))),
balanexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANEXP"), 0.4, 1.1, 0.01, 0.8))),
linear(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LINEAR"), 0., 1., 0.01, 0.))),
//Shadow hightlights
highlights(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0))),
h_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 70))),
@ -332,6 +335,7 @@ Locallab::Locallab():
showmaskcolMethod(Gtk::manage(new MyComboBoxText())),
//Exposure
showmaskexpMethod(Gtk::manage(new MyComboBoxText())),
expMethod(Gtk::manage(new MyComboBoxText())),
//Shadows Highlight
showmaskSHMethod(Gtk::manage(new MyComboBoxText())),
// Blur & Noise
@ -355,6 +359,7 @@ Locallab::Locallab():
lumaneutralButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMANEUTRAL")))),
lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))),
gridFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABGRID")))),
pdeFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_PDEFRA")))),
residFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_RESID")))),
// Others
@ -561,6 +566,10 @@ Locallab::Locallab():
expexpose->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expexpose));
enableexposeConn = expexpose->signal_enabled_toggled().connect(sigc::bind(sigc::mem_fun(this, &Locallab::enableToggled), expexpose));
if(showtooltip) expexpose->set_tooltip_text(M("TP_LOCALLAB_EXPOSURE_TOOLTIP"));
expMethod->append(M("TP_LOCALLAB_STD"));
expMethod->append(M("TP_LOCALLAB_PDE"));
expMethod->set_active(0);
expMethodConn = expMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::expMethodChanged));
setExpandAlignProperties (expmaskexp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
expmaskexp->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmaskexp));
@ -595,6 +604,9 @@ Locallab::Locallab():
gammaskexp->setAdjusterListener(this);
slomaskexp->setAdjusterListener(this);
softradiusexp->setAdjusterListener(this);
laplacexp->setAdjusterListener(this);
balanexp->setAdjusterListener(this);
linear->setAdjusterListener(this);
curveEditorG->setCurveListener(this);
@ -644,8 +656,23 @@ Locallab::Locallab():
HHmaskexpshape->setBottomBarColorProvider(this, 6);
maskexpCurveEditorG->curveListComplete();
pdeFrame->set_label_align(0.025, 0.5);
ToolParamBlock* const pdeBox = Gtk::manage(new ToolParamBlock());
pdeBox->pack_start(*laplacexp);
pdeBox->pack_start(*linear);
pdeBox->pack_start(*balanexp);
pdeFrame->add(*pdeBox);
ToolParamBlock* const exposeBox = Gtk::manage(new ToolParamBlock());
exposeBox->pack_start(*expMethod);
exposeBox->pack_start(*pdeFrame);
// exposeBox->pack_start(*laplacexp);
// exposeBox->pack_start(*linear);
// exposeBox->pack_start(*balanexp);
exposeBox->pack_start(*expcomp);
exposeBox->pack_start(*hlcompr);
exposeBox->pack_start(*hlcomprthresh);
@ -2199,6 +2226,15 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).gammaskexp = gammaskexp->getValue();
pp->locallab.spots.at(pp->locallab.selspot).slomaskexp = slomaskexp->getValue();
pp->locallab.spots.at(pp->locallab.selspot).softradiusexp = softradiusexp->getValue();
if (expMethod->get_active_row_number() == 0) {
pp->locallab.spots.at(pp->locallab.selspot).expMethod = "std";
} else if (expMethod->get_active_row_number() == 1) {
pp->locallab.spots.at(pp->locallab.selspot).expMethod = "pde";
}
pp->locallab.spots.at(pp->locallab.selspot).laplacexp = laplacexp->getValue();
pp->locallab.spots.at(pp->locallab.selspot).balanexp = balanexp->getValue();
pp->locallab.spots.at(pp->locallab.selspot).linear = linear->getValue();
// Shadow highlight
pp->locallab.spots.at(pp->locallab.selspot).expshadhigh = expshadhigh->getEnabled();
pp->locallab.spots.at(pp->locallab.selspot).highlights = highlights->getIntValue();
@ -2442,6 +2478,10 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).gammaskexp = pe->locallab.spots.at(pp->locallab.selspot).gammaskexp || gammaskexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).slomaskexp = pe->locallab.spots.at(pp->locallab.selspot).slomaskexp || slomaskexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).softradiusexp = pe->locallab.spots.at(pp->locallab.selspot).softradiusexp || softradiusexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).expMethod = pe->locallab.spots.at(pp->locallab.selspot).expMethod || expMethod->get_active_text() != M("GENERAL_UNCHANGED");
pe->locallab.spots.at(pp->locallab.selspot).laplacexp = pe->locallab.spots.at(pp->locallab.selspot).laplacexp || laplacexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).balanexp = pe->locallab.spots.at(pp->locallab.selspot).balanexp || balanexp->getEditedState();
pe->locallab.spots.at(pp->locallab.selspot).linear = pe->locallab.spots.at(pp->locallab.selspot).linear || linear->getEditedState();
// Shadow highlight
pe->locallab.spots.at(pp->locallab.selspot).expshadhigh = pe->locallab.spots.at(pp->locallab.selspot).expshadhigh || !expshadhigh->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).highlights = pe->locallab.spots.at(pp->locallab.selspot).highlights || highlights->getEditedState();
@ -2666,6 +2706,10 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).gammaskexp = pedited->locallab.spots.at(pp->locallab.selspot).gammaskexp || gammaskexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).slomaskexp = pedited->locallab.spots.at(pp->locallab.selspot).slomaskexp || slomaskexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).softradiusexp = pedited->locallab.spots.at(pp->locallab.selspot).softradiusexp || softradiusexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).expMethod = pedited->locallab.spots.at(pp->locallab.selspot).expMethod || expMethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->locallab.spots.at(pp->locallab.selspot).laplacexp = pedited->locallab.spots.at(pp->locallab.selspot).laplacexp || laplacexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).balanexp = pedited->locallab.spots.at(pp->locallab.selspot).balanexp || balanexp->getEditedState();
pedited->locallab.spots.at(pp->locallab.selspot).linear = pedited->locallab.spots.at(pp->locallab.selspot).linear || linear->getEditedState();
// Shadow highlight
pedited->locallab.spots.at(pp->locallab.selspot).expshadhigh = pedited->locallab.spots.at(pp->locallab.selspot).expshadhigh || !expshadhigh->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).highlights = pedited->locallab.spots.at(pp->locallab.selspot).highlights || highlights->getEditedState();
@ -3164,6 +3208,25 @@ void Locallab::showmaskexpMethodChanged()
}
}
void Locallab::expMethodChanged()
{
// printf("expMethodChanged\n");
if (expMethod->get_active_row_number() == 0) {
pdeFrame->hide();
} else {
pdeFrame->show();
}
// disableListener();
// enableListener();
if (getEnabled() && expexpose->getEnabled()) {
if (listener) {
listener->panelChanged(EvlocallabexpMethod, "");
}
}
}
void Locallab::showmaskSHMethodChanged()
{
// printf("showmaskSHMethodChanged\n");
@ -3502,6 +3565,8 @@ void Locallab::inversexChanged()
structexp->show();
blurexpde->show();
shadex->show();
pdeFrame->show();
expMethod->show();
softradiusexp->show();
showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
} else if (inversex->get_active()) {
@ -3512,6 +3577,8 @@ void Locallab::inversexChanged()
shadex->hide();
blurexpde->show();
softradiusexp->hide();
pdeFrame->hide();
expMethod->hide();
} else {
sensiex->show();
@ -3521,6 +3588,8 @@ void Locallab::inversexChanged()
blurexpde->show();
softradiusexp->show();
shadex->show();
pdeFrame->show();
expMethod->show();
if (batchMode) {
showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
@ -3905,6 +3974,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
gammaskexp->setDefault(defSpot->gammaskexp);
slomaskexp->setDefault(defSpot->slomaskexp);
softradiusexp->setDefault(defSpot->softradiusexp);
laplacexp->setDefault(defSpot->laplacexp);
balanexp->setDefault(defSpot->balanexp);
linear->setDefault(defSpot->linear);
// Shadow highlight
highlights->setDefault((double)defSpot->highlights);
h_tonalwidth->setDefault((double)defSpot->h_tonalwidth);
@ -4039,6 +4111,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
gammaskexp->setDefaultEditedState(Irrelevant);
slomaskexp->setDefaultEditedState(Irrelevant);
softradiusexp->setDefaultEditedState(Irrelevant);
laplacexp->setDefaultEditedState(Irrelevant);
balanexp->setDefaultEditedState(Irrelevant);
linear->setDefaultEditedState(Irrelevant);
// Shadow highlight
highlights->setDefaultEditedState(Irrelevant);
h_tonalwidth->setDefaultEditedState(Irrelevant);
@ -4177,6 +4252,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
gammaskexp->setDefaultEditedState(defSpotState->gammaskexp ? Edited : UnEdited);
slomaskexp->setDefaultEditedState(defSpotState->slomaskexp ? Edited : UnEdited);
softradiusexp->setDefaultEditedState(defSpotState->softradiusexp ? Edited : UnEdited);
laplacexp->setDefaultEditedState(defSpotState->laplacexp ? Edited : UnEdited);
balanexp->setDefaultEditedState(defSpotState->balanexp ? Edited : UnEdited);
linear->setDefaultEditedState(defSpotState->linear ? Edited : UnEdited);
// Shadow highlight
highlights->setDefaultEditedState(defSpotState->highlights ? Edited : UnEdited);
h_tonalwidth->setDefaultEditedState(defSpotState->h_tonalwidth ? Edited : UnEdited);
@ -4522,6 +4600,24 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
}
}
if (a == laplacexp) {
if (listener) {
listener->panelChanged(Evlocallablaplacexp, laplacexp->getTextValue());
}
}
if (a == balanexp) {
if (listener) {
listener->panelChanged(Evlocallabbalanexp, balanexp->getTextValue());
}
}
if (a == linear) {
if (listener) {
listener->panelChanged(Evlocallablinear, linear->getTextValue());
}
}
}
if (getEnabled() && expshadhigh->getEnabled()) {
@ -5143,6 +5239,9 @@ void Locallab::setBatchMode(bool batchMode)
gammaskexp->showEditedCB();
slomaskexp->showEditedCB();
softradiusexp->showEditedCB();
laplacexp->showEditedCB();
balanexp->showEditedCB();
linear->showEditedCB();
//Shadow Highlight
highlights->showEditedCB();
h_tonalwidth->showEditedCB();
@ -5244,6 +5343,8 @@ void Locallab::setBatchMode(bool batchMode)
// Color & Light
qualitycurveMethod->append(M("GENERAL_UNCHANGED"));
gridMethod->append(M("GENERAL_UNCHANGED"));
//exposure
expMethod->append(M("GENERAL_UNCHANGED"));
// softlight
softMethod->append(M("GENERAL_UNCHANGED"));
// Blur & Noise
@ -5404,6 +5505,7 @@ void Locallab::enableListener()
enableexposeConn.block(false);
inversexConn.block(false);
showmaskexpMethodConn.block(false);
expMethodConn.block(false);
enaExpMaskConn.block(false);
// Shadow highlight
enableshadhighConn.block(false);
@ -5466,6 +5568,7 @@ void Locallab::disableListener()
enableexposeConn.block(true);
inversexConn.block(true);
showmaskexpMethodConn.block(true);
expMethodConn.block(true);
enaExpMaskConn.block(true);
// Shadow highlight
enableshadhighConn.block(true);
@ -5540,6 +5643,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
gridMethod->set_active(1);
}
if(pp->locallab.spots.at(index).scalereti == 1) {
// limd->hide();
LocalcurveEditorgainT->hide();
@ -5592,6 +5696,14 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
gammaskexp->setValue(pp->locallab.spots.at(index).gammaskexp);
slomaskexp->setValue(pp->locallab.spots.at(index).slomaskexp);
softradiusexp->setValue(pp->locallab.spots.at(index).softradiusexp);
if (pp->locallab.spots.at(index).expMethod == "std") {
expMethod->set_active(0);
} else if (pp->locallab.spots.at(index).expMethod == "pde") {
expMethod->set_active(1);
}
laplacexp->setValue(pp->locallab.spots.at(index).laplacexp);
balanexp->setValue(pp->locallab.spots.at(index).balanexp);
linear->setValue(pp->locallab.spots.at(index).linear);
// Shadow highlight
expshadhigh->setEnabled(pp->locallab.spots.at(index).expshadhigh);
@ -5859,6 +5971,12 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
gammaskexp->setEditedState(spotState->gammaskexp ? Edited : UnEdited);
slomaskexp->setEditedState(spotState->slomaskexp ? Edited : UnEdited);
softradiusexp->setEditedState(spotState->softradiusexp ? Edited : UnEdited);
if (!spotState->expMethod) {
expMethod->set_active_text(M("GENERAL_UNCHANGED"));
}
laplacexp->setEditedState(spotState->laplacexp ? Edited : UnEdited);
balanexp->setEditedState(spotState->balanexp ? Edited : UnEdited);
linear->setEditedState(spotState->linear ? Edited : UnEdited);
// Shadow highlight
expshadhigh->set_inconsistent(!spotState->expshadhigh);
@ -6069,15 +6187,21 @@ void Locallab::updateSpecificGUIState()
structexp->show();
softradiusexp->show();
shadex->show();
expMethod->show();
pdeFrame->show();
showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
} else if (inversex->get_active()) {
structexp->hide();
softradiusexp->hide();
shadex->hide();
expMethod->hide();
pdeFrame->hide();
} else {
structexp->show();
softradiusexp->show();
shadex->show();
expMethod->show();
pdeFrame->show();
if (batchMode) {
showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode
}

View File

@ -140,6 +140,9 @@ private:
Adjuster* const gammaskexp;
Adjuster* const slomaskexp;
Adjuster* const softradiusexp;
Adjuster* const laplacexp;
Adjuster* const balanexp;
Adjuster* const linear;
//Shadow highlight
Adjuster* const highlights;
Adjuster* const h_tonalwidth;
@ -297,6 +300,8 @@ private:
//Exposure
MyComboBoxText* const showmaskexpMethod;
sigc::connection showmaskexpMethodConn;
MyComboBoxText* const expMethod;
sigc::connection expMethodConn;
//Shadows Highlight
MyComboBoxText* const showmaskSHMethod;
sigc::connection showmaskSHMethodConn;
@ -328,6 +333,7 @@ private:
Gtk::Button* const lumacontrastPlusButton;
sigc::connection lumacontrastMinusPressedConn, lumaneutralPressedConn, lumacontrastPlusPressedConn;
Gtk::Frame* gridFrame;
Gtk::Frame* pdeFrame;
Gtk::Frame* residFrame;
LabGrid *labgrid;
// Others
@ -390,6 +396,7 @@ private:
void showmaskcolMethodChanged();
//Exposure
void showmaskexpMethodChanged();
void expMethodChanged();
//Shadows Highlight
void showmaskSHMethodChanged();
// Blur & Noise

View File

@ -1006,6 +1006,10 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).gammaskexp = locallab.spots.at(j).gammaskexp && pSpot.gammaskexp == otherSpot.gammaskexp;
locallab.spots.at(j).slomaskexp = locallab.spots.at(j).slomaskexp && pSpot.slomaskexp == otherSpot.slomaskexp;
locallab.spots.at(j).softradiusexp = locallab.spots.at(j).softradiusexp && pSpot.softradiusexp == otherSpot.softradiusexp;
locallab.spots.at(j).expMethod = locallab.spots.at(j).expMethod && pSpot.expMethod == otherSpot.expMethod;
locallab.spots.at(j).laplacexp = locallab.spots.at(j).laplacexp && pSpot.laplacexp == otherSpot.laplacexp;
locallab.spots.at(j).balanexp = locallab.spots.at(j).balanexp && pSpot.balanexp == otherSpot.balanexp;
locallab.spots.at(j).linear = locallab.spots.at(j).linear && pSpot.linear == otherSpot.linear;
// Shadow highlight
locallab.spots.at(j).expshadhigh = locallab.spots.at(j).expshadhigh && pSpot.expshadhigh == otherSpot.expshadhigh;
locallab.spots.at(j).highlights = locallab.spots.at(j).highlights && pSpot.highlights == otherSpot.highlights;
@ -2875,6 +2879,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).softradiusexp = mods.locallab.spots.at(i).softradiusexp;
}
if (locallab.spots.at(i).expMethod) {
toEdit.locallab.spots.at(i).expMethod = mods.locallab.spots.at(i).expMethod;
}
if (locallab.spots.at(i).laplacexp) {
toEdit.locallab.spots.at(i).laplacexp = mods.locallab.spots.at(i).laplacexp;
}
if (locallab.spots.at(i).balanexp) {
toEdit.locallab.spots.at(i).balanexp = mods.locallab.spots.at(i).balanexp;
}
if (locallab.spots.at(i).linear) {
toEdit.locallab.spots.at(i).linear = mods.locallab.spots.at(i).linear;
}
// Shadow highlight
if (locallab.spots.at(i).expshadhigh) {
toEdit.locallab.spots.at(i).expshadhigh = mods.locallab.spots.at(i).expshadhigh;
@ -4399,6 +4419,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
gammaskexp(v),
slomaskexp(v),
softradiusexp(v),
expMethod(v),
laplacexp(v),
balanexp(v),
linear(v),
// Shadow highlight
expshadhigh(v),
highlights(v),
@ -4616,6 +4640,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
gammaskexp = v;
slomaskexp = v;
softradiusexp = v;
expMethod = v;
laplacexp = v;
balanexp = v;
linear = v;
// Shadow highlight
expshadhigh = v;
highlights = v;

View File

@ -433,6 +433,10 @@ public:
bool gammaskexp;
bool slomaskexp;
bool softradiusexp;
bool expMethod;
bool laplacexp;
bool balanexp;
bool linear;
// Shadow highlight
bool expshadhigh;
bool highlights;