Added directional contrast to wavelet pyramid

This commit is contained in:
Desmis 2020-04-27 09:47:43 +02:00
parent 2673504ba2
commit 0189cc0815
11 changed files with 186 additions and 98 deletions

View File

@ -1104,8 +1104,8 @@ HISTORY_MSG_860;Local - Contrast Curve Blur levels
HISTORY_MSG_861;Local - Contrast Curve Contrast levels
HISTORY_MSG_862;Local - Contrast Sigma luminance
HISTORY_MSG_863;Local - Contrast Merge Original
HISTORY_MSG_864;Local - Contrast Detail
HISTORY_MSG_865;Local - Contrast Anchor
HISTORY_MSG_864;Local - Directional sigma
HISTORY_MSG_865;Local - Directional delta
HISTORY_MSG_866;Local - Contrast Curve Compression
HISTORY_MSG_867;Local - Contrast Amount residual
HISTORY_MSG_868;Local - balance ΔE C-H
@ -2338,7 +2338,7 @@ TP_LOCALLAB_COL_NAME;Name
TP_LOCALLAB_COL_VIS;Status
TP_LOCALLAB_COLORDE;Color preview selection ΔE and Intensity
TP_LOCALLAB_COLORDE_TOOLTIP;Show preview selection ΔE in blue if negative and in green if positive.\nShow real modifications if positive, show enhanced modifications with blue and yellow if negative.\nThe intensity is function of the level.\nFor 'Denoise' the appearance is different.
TP_LOCALLAB_COMPFRA;Levels Dynamic Laplacian Range Compression ƒ
TP_LOCALLAB_COMPFRA;Levels Directional Contrast
TP_LOCALLAB_COMPREFRA;Levels Dynamic Wavelet Range (un)Compression
TP_LOCALLAB_COMPRESS_TOOLTIP;Use if necessary the module 'Clarity & Sharp mask and Blend & Soft Images' by adjusting 'Soft radius' to reduce artifacts.
TP_LOCALLAB_COMPFRAME_TOOLTIP;Allows special effects. You can reduce artifacts with 'Clarity & Sharp mask - Blend & Soft Images".\nUses a lot of resources
@ -2367,6 +2367,7 @@ TP_LOCALLAB_DARKRETI;Darkness
TP_LOCALLAB_DEHAFRA;Dehaze
TP_LOCALLAB_DEHAZ;Strength
TP_LOCALLAB_DEHAZ_TOOLTIP;Negative values add haze
TP_LOCALLAB_DELTAD;Delta balance
TP_LOCALLAB_DELTAEC;Mask ΔE Image
TP_LOCALLAB_DENOIS;Ψ Denoise
TP_LOCALLAB_DENOI_TOOLTIP;This module can be used alone (at the end of process), or in complement of main denoise (at the beginning).\nScope allows to differentiate the action according to the color (deltaE).\nYou can complete the action with "median" or "Guided Filter" (Smooth Blur...).\nYou can complete the action with "Blur levels" "Wavelet pyramid"
@ -2484,7 +2485,7 @@ TP_LOCALLAB_LOC_CONTRAST;Local contrast & Wavelet Pyramid Ψ Big defects
TP_LOCALLAB_LOC_CONTRASTPYR;Ψ Pyramid 1:
TP_LOCALLAB_LOC_CONTRASTPYRLAB; Graduated Filter - Edge Sharpness - Blur
TP_LOCALLAB_LOC_CONTRASTPYR2;Ψ Pyramid 2:
TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contrast by Levels- Tone Mapping(s)
TP_LOCALLAB_LOC_CONTRASTPYR2LAB; Contrast by Levels- Directional contrast- Tone Mapping
TP_LOCALLAB_LOC_RESIDPYR;Residual Image Main
TP_LOCALLAB_LOG;Encoding log
TP_LOCALLAB_LOGAUTO;Automatic

View File

@ -330,7 +330,7 @@ public:
static void strcurv_data(std::string retistr, int *s_datc, int &siz);
void blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D<float> & blend2, int sk, bool multiThread);
void wavcontrast4(struct local_params& lp, float ** tmp, float ** tmpa, float ** tmpb, float contrast, float fatres, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads, const LocwavCurve & locwavCurve, bool & locwavutili, bool wavcurve,
void wavcontrast4(struct local_params& lp, float ** tmp, float ** tmpa, float ** tmpb, float contrast, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads, const LocwavCurve & locwavCurve, bool & locwavutili, bool wavcurve,
const LocwavCurve & loclevwavCurve, bool & loclevwavutili, bool wavcurvelev,
const LocwavCurve & locconwavCurve, bool & locconwavutili, bool wavcurvecon,
const LocwavCurve & loccompwavCurve, bool & loccompwavutili, bool wavcurvecomp,
@ -338,11 +338,11 @@ public:
const LocwavCurve & locedgwavCurve, bool & locedgwavutili,
float sigm, float offs,int & maxlvl, float fatdet, float fatanch, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres);
void wavcont(struct local_params& lp, wavelet_decomposition &wdspot, float ****templevel, int level_bl, int maxlvl,
void wavcont(struct local_params& lp, float ** tmp, wavelet_decomposition &wdspot, float ****templevel, int level_bl, int maxlvl,
const LocwavCurve & loclevwavCurve, bool & loclevwavutili,
const LocwavCurve & loccompwavCurve, bool & loccompwavutili,
const LocwavCurve & loccomprewavCurve, bool & loccomprewavutili,
float radlevblur, int process, procparams::FattalToneMappingParams &fatParams, float chromablu, float thres);
float radlevblur, int process, float chromablu, float thres, float sigmadc, float deltad);
void wavcbd(wavelet_decomposition &wdspot, int level_bl, int maxlvl,
const LocwavCurve & locconwavCurve, bool & locconwavutili, float sigm, float offs, float chromalev, int sk);

View File

@ -4275,7 +4275,7 @@ void ImProcFunctions::maskcalccol(int call, bool invmask, bool pde, int bfw, int
bool wavcurvecompre = false;
bool wavcurve = false;
bool locedgwavutili = false;
wavcontrast4(lp, bufmaskblurcol->L, nullptr, nullptr, contrast, 0.f, 0.f, 0.f, bfw, bfh, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurvecolwav, lmasutilicolwav, wavcurve, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, dummy, loccomprewavutili, wavcurvecompre, dummy, locedgwavutili, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f);
wavcontrast4(lp, bufmaskblurcol->L, nullptr, nullptr, contrast, 0.f, 0.f, bfw, bfh, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurvecolwav, lmasutilicolwav, wavcurve, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, dummy, loccomprewavutili, wavcurvecompre, dummy, locedgwavutili, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f);
}
@ -7450,11 +7450,11 @@ void ImProcFunctions::Compresslevels(float **Source, int W_L, int H_L, float com
}
void ImProcFunctions::wavcont(struct local_params& lp, wavelet_decomposition &wdspot, float ****templevel, int level_bl, int maxlvl,
void ImProcFunctions::wavcont(struct local_params& lp, float ** tmp, wavelet_decomposition &wdspot, float ****templevel, int level_bl, int maxlvl,
const LocwavCurve & loclevwavCurve, bool & loclevwavutili,
const LocwavCurve & loccompwavCurve, bool & loccompwavutili,
const LocwavCurve & loccomprewavCurve, bool & loccomprewavutili,
float radlevblur, int process, FattalToneMappingParams &fatParams, float chromablu, float thres)
float radlevblur, int process, float chromablu, float thres, float sigmadc, float deltad)
{
float madL[10][3];
int W_L = wdspot.level_W(0);
@ -7462,11 +7462,16 @@ void ImProcFunctions::wavcont(struct local_params& lp, wavelet_decomposition &wd
float * beta = nullptr;
float * betabl = nullptr;
float * betadc = nullptr;
if (process == 3) {
beta = new float[W_L * H_L];
}
if (process == 2) {
betadc = new float[W_L * H_L];
}
if (process == 1) {
betabl = new float[W_L * H_L];
}
@ -7554,20 +7559,94 @@ void ImProcFunctions::wavcont(struct local_params& lp, wavelet_decomposition &wd
}
}
if (process == 2) { //Dynamic compression laplacian - Huge ressources
if (process == 2) { //Directionnal contrast
float mean[10];
float meanN[10];
float sigma[10];
float sigmaN[10];
float MaxP[10];
float MaxN[10];
Evaluate2(wdspot, mean, meanN, sigma, sigmaN, MaxP, MaxN);
for (int dir = 1; dir < 4; dir++) {
for (int level = level_bl; level < maxlvl; ++level) {
int W_L = wdspot.level_W(level);
int H_L = wdspot.level_H(level);
float effect = sigmadc;
float offs = 1.f;
float mea[10];
for (int co = 0; co < H_L * W_L; co++) {
betadc[co] = 1.f;
}
calceffect(level, mean, sigma, mea, effect, offs);
float **WavL = wdspot.level_coeffs(level);
if (loccompwavCurve && loccompwavutili) {
for (int co = 0; co < H_L * W_L; co++) {
float WavCL = std::fabs(WavL[dir][co]);
float klev = (loccompwavCurve[level * 55.5f]);
fatParams.amount = 50.f * klev;
{
ToneMapFattal02(nullptr, fatParams, 3, 1, templevel[dir - 1][level], W_L, H_L, 0);
if (WavCL < mea[0]) {
betadc[co] = 0.05f;
} else if (WavCL < mea[1]) {
betadc[co] = 0.2f;
} else if (WavCL < mea[2]) {
betadc[co] = 0.7f;
} else if (WavCL < mea[3]) {
betadc[co] = 1.f; //standard
} else if (WavCL < mea[4]) {
betadc[co] = 1.f;
} else if (WavCL < mea[5]) {
betadc[co] = 0.8f; //+sigma
} else if (WavCL < mea[6]) {
betadc[co] = 0.7f;
} else if (WavCL < mea[7]) {
betadc[co] = 0.5f;
} else if (WavCL < mea[8]) {
betadc[co] = 0.3f; // + 2 sigma
} else if (WavCL < mea[9]) {
betadc[co] = 0.2f;
} else {
betadc[co] = 0.1f;
}
}
int iteration = deltad;
int itplus = 7 + iteration;
int itmoins = 7 - iteration;
int med = maxlvl / 2;
int it;
if (level < med) {
it = itmoins;
} else if (level == med) {
it = 7;
} else {
it = itplus;
}
if (loccompwavCurve && loccompwavutili) {
for (int j = 0; j < it; j++) {
float kba = 1.f;
for (int i = 0; i < W_L * H_L; i++) {
int ii = i / W_L;
int jj = i - ii * W_L;
float LL100 = tmp[ii * 2][jj * 2] / 327.68f;
float k1 = 0.3f * (loccompwavCurve[6.f * LL100] - 0.5f); //k1 between 0 and 0.5 0.5==> 1/6=0.16
float k2 = k1 * 2.f;
if (dir < 3) {
kba = 1.f + k1;
}
if (dir == 3) {
kba = 1.f - k2;
}
templevel[dir - 1][level][ii][jj] *= (1.f + (kba - 1.f) * betadc[i]);
}
}
}
}
}
}
@ -7681,6 +7760,10 @@ void ImProcFunctions::wavcont(struct local_params& lp, wavelet_decomposition &wd
delete[] beta;
}
if (process == 2) {
delete[] betadc;
}
if (process == 1) {
delete[] betabl;
}
@ -7688,13 +7771,13 @@ void ImProcFunctions::wavcont(struct local_params& lp, wavelet_decomposition &wd
}
void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float ** tmpa, float ** tmpb, float contrast, float fatres, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads,
void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float ** tmpa, float ** tmpb, float contrast, float radblur, float radlevblur, int bfw, int bfh, int level_bl, int level_hl, int level_br, int level_hr, int sk, bool numThreads,
const LocwavCurve & locwavCurve, bool & locwavutili, bool wavcurve, const LocwavCurve & loclevwavCurve, bool & loclevwavutili, bool wavcurvelev,
const LocwavCurve & locconwavCurve, bool & locconwavutili, bool wavcurvecon,
const LocwavCurve & loccompwavCurve, bool & loccompwavutili, bool wavcurvecomp,
const LocwavCurve & loccomprewavCurve, bool & loccomprewavutili, bool wavcurvecompre,
const LocwavCurve & locedgwavCurve, bool & locedgwavutili,
float sigm, float offs, int & maxlvl, float fatdet, float fatanch, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres)
float sigm, float offs, int & maxlvl, float sigmadc, float deltad, float chromalev, float chromablu, bool blurlc, bool blurena, bool levelena, bool comprena, bool compreena, float compress, float thres)
{
wavelet_decomposition *wdspot = new wavelet_decomposition(tmp[0], bfw, bfh, maxlvl, 1, sk, numThreads, lp.daubLen);
@ -7831,10 +7914,10 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float
int H_L = wdspot->level_H(0);
float *wav_L0 = wdspot->coeff0;
FattalToneMappingParams fatParams;
fatParams.threshold = fatdet;
fatParams.anchor = fatanch;
// FattalToneMappingParams fatParams;
// fatParams.threshold = fatdet;
// fatParams.anchor = fatanch;
/*
if (fatres > 0.f) {
fatParams.enabled = true;
fatParams.amount = fatres;
@ -7862,7 +7945,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float
}
}
*/
if (radblur > 0.f && blurena) {
array2D<float> bufl(W_L, H_L);
@ -8024,7 +8107,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float
float MaxN[10];
Evaluate2(*wdspot, mean, meanN, sigma, sigmaN, MaxP, MaxN);
*/
fatParams.enabled = wavcurvecomp;
// fatParams.enabled = wavcurvecomp;
templevel = new float***[dir];
@ -8047,15 +8130,15 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float
}
if (wavcurvelev && radlevblur > 0.f && blurena) {
wavcont(lp, *wdspot, templevel, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 1, fatParams, 1.f, 0.f);
wavcont(lp, tmp, *wdspot, templevel, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 1, 1.f, 0.f, 0.f, 0.f);
}
if (wavcurvecomp && comprena) {
wavcont(lp, *wdspot, templevel, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 2, fatParams, 1.f, 0.f);
wavcont(lp, tmp, *wdspot, templevel, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 2, 1.f, 0.f, sigmadc, deltad);
}
if (wavcurvecompre && compreena) {
wavcont(lp, *wdspot, templevel, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 3, fatParams, 1.f, thres);
wavcont(lp, tmp, *wdspot, templevel, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 3, 1.f, thres, 0.f, 0.f);
}
//free memory templevel
@ -8590,7 +8673,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float
}
if (wavcurvelev && radlevblur > 0.f) {
wavcont(lp, *wdspota, templevela, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 1, fatParams, chromablu, 0.f);
wavcont(lp, tmp, *wdspota, templevela, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 1, chromablu, 0.f, 0.f, 0.f);
}
wdspota->reconstruct(tmpa[0], 1.f);
@ -8645,7 +8728,7 @@ void ImProcFunctions::wavcontrast4(struct local_params& lp, float ** tmp, float
}
if (wavcurvelev && radlevblur > 0.f) {
wavcont(lp, *wdspotb, templevelb, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 1, fatParams, chromablu, 0.f);
wavcont(lp, tmp, *wdspotb, templevelb, level_bl, maxlvl, loclevwavCurve, loclevwavutili, loccompwavCurve, loccompwavutili, loccomprewavCurve, loccomprewavutili, radlevblur, 1, chromablu, 0.f, 0.f, 0.f);
}
wdspotb->reconstruct(tmpb[0], 1.f);
@ -10698,7 +10781,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool locedgwavutili = false;
bool wavcurvecompre = false;
bool wavcurve = false;
wavcontrast4(lp, bufmaskblurbl->L, nullptr, nullptr, contrast, 0.f, 0.f, 0.f, GW, GH, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurveblwav, lmasutiliblwav, wavcurve, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, dummy, loccomprewavutili, wavcurvecompre, dummy, locedgwavutili, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f);
wavcontrast4(lp, bufmaskblurbl->L, nullptr, nullptr, contrast, 0.f, 0.f, GW, GH, level_bl, level_hl, level_br, level_hr, sk, numThreads, loclmasCurveblwav, lmasutiliblwav, wavcurve, dummy, loclevwavutili, wavcurvelev, dummy, locconwavutili, wavcurvecon, dummy, loccompwavutili, wavcurvecomp, dummy, loccomprewavutili, wavcurvecompre, dummy, locedgwavutili, 1.f, 1.f, maxlvl, 0.f, 0.f, 1.f, 1.f, false, false, false, false, false, 0.f, 0.f);
}
int shado = params->locallab.spots.at(sp).shadmaskbl;
@ -12801,9 +12884,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
const float radlevblur = (params->locallab.spots.at(sp).levelblur) / sk;
const float sigma = params->locallab.spots.at(sp).sigma;
const float offs = params->locallab.spots.at(sp).offset;
const float fatdet = params->locallab.spots.at(sp).fatdet;
const float fatanch = params->locallab.spots.at(sp).fatanch;
const float fatres = params->locallab.spots.at(sp).fatres;
const float sigmadc = params->locallab.spots.at(sp).sigmadc;
const float deltad = params->locallab.spots.at(sp).deltad;
// const float fatres = params->locallab.spots.at(sp).fatres;
const float chrol = params->locallab.spots.at(sp).chromalev;
const float chrobl = params->locallab.spots.at(sp).chromablu;
const bool blurena = params->locallab.spots.at(sp).wavblur;
@ -12813,7 +12896,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
const float compress = params->locallab.spots.at(sp).residcomp;
const float thres = params->locallab.spots.at(sp).threswav;
wavcontrast4(lp, tmp1->L, tmp1->a, tmp1->b, contrast, fatres, radblur, radlevblur, tmp1->W, tmp1->H, level_bl, level_hl, level_br, level_hr, sk, numThreads, locwavCurve, locwavutili, wavcurve, loclevwavCurve, loclevwavutili, wavcurvelev, locconwavCurve, locconwavutili, wavcurvecon, loccompwavCurve, loccompwavutili, wavcurvecomp, loccomprewavCurve, loccomprewavutili, wavcurvecompre, locedgwavCurve, locedgwavutili, sigma, offs, maxlvl, fatdet, fatanch, chrol, chrobl, blurlc, blurena, levelena, comprena, compreena, compress, thres);
wavcontrast4(lp, tmp1->L, tmp1->a, tmp1->b, contrast, radblur, radlevblur, tmp1->W, tmp1->H, level_bl, level_hl, level_br, level_hr, sk, numThreads, locwavCurve, locwavutili, wavcurve, loclevwavCurve, loclevwavutili, wavcurvelev, locconwavCurve, locconwavutili, wavcurvecon, loccompwavCurve, loccompwavutili, wavcurvecomp, loccomprewavCurve, loccomprewavutili, wavcurvecompre, locedgwavCurve, locedgwavutili, sigma, offs, maxlvl, sigmadc, deltad, chrol, chrobl, blurlc, blurena, levelena, comprena, compreena, compress, thres);
const float satur = params->locallab.spots.at(sp).residchro;

View File

@ -886,8 +886,8 @@ enum ProcEventCode {
EvlocallabwavCurvecon = 860,
Evlocallabsigma = 861,
Evlocallaboriglc = 862,
Evlocallabfatdet = 863,
Evlocallabfatanch = 864,
Evlocallabsigmadc = 863,
Evlocallabdeltad = 864,
EvlocallabwavCurvecomp = 865,
Evlocallabfatres = 866,
EvLocallabSpotbalanh = 867,

View File

@ -3353,8 +3353,8 @@ LocallabParams::LocallabSpot::LocallabSpot() :
threswav(1.4),
chromalev(1.0),
chromablu(1.0),
fatdet(40.0),
fatanch(50.0),
sigmadc(1.0),
deltad(0.0),
fatres(0.0),
clarilres(0.0),
claricres(0.0),
@ -3424,18 +3424,22 @@ LocallabParams::LocallabSpot::LocallabSpot() :
},
loccompwavcurve{
static_cast<double>(FCT_MinMaxCPoints),
0.0,
0.0,
0.0,
0.35,
0.5,
0.,
0.00,
0.35,
0.35,
1.0,
0.0,
0.00,
0.35,
0.35
0.75,
0.35,
0.35,
0.60,
0.75,
0.35,
0.35,
1.00,
0.35,
0.00,
0.00
},
loccomprewavcurve{
static_cast<double>(FCT_MinMaxCPoints),
@ -3966,8 +3970,8 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& threswav == other.threswav
&& chromalev == other.chromalev
&& chromablu == other.chromablu
&& fatdet == other.fatdet
&& fatanch == other.fatanch
&& sigmadc == other.sigmadc
&& deltad == other.deltad
&& fatres == other.fatres
&& clarilres == other.clarilres
&& claricres == other.claricres
@ -5410,8 +5414,8 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->threswav, "Locallab", "Threswav_" + index_str, spot.threswav, keyFile);
saveToKeyfile(!pedited || spot_edited->chromalev, "Locallab", "Chromalev_" + index_str, spot.chromalev, keyFile);
saveToKeyfile(!pedited || spot_edited->chromablu, "Locallab", "Chromablu_" + index_str, spot.chromablu, keyFile);
saveToKeyfile(!pedited || spot_edited->fatdet, "Locallab", "Fatdet_" + index_str, spot.fatdet, keyFile);
saveToKeyfile(!pedited || spot_edited->fatanch, "Locallab", "Fatanch_" + index_str, spot.fatanch, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmadc, "Locallab", "sigmadc_" + index_str, spot.sigmadc, keyFile);
saveToKeyfile(!pedited || spot_edited->deltad, "Locallab", "deltad_" + index_str, spot.deltad, keyFile);
saveToKeyfile(!pedited || spot_edited->fatres, "Locallab", "Fatres_" + index_str, spot.fatres, keyFile);
saveToKeyfile(!pedited || spot_edited->clarilres, "Locallab", "ClariLres_" + index_str, spot.clarilres, keyFile);
saveToKeyfile(!pedited || spot_edited->claricres, "Locallab", "ClariCres_" + index_str, spot.claricres, keyFile);
@ -7063,8 +7067,8 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Threswav_" + index_str, pedited, spot.threswav, spotEdited.threswav);
assignFromKeyfile(keyFile, "Locallab", "Chromalev_" + index_str, pedited, spot.chromalev, spotEdited.chromalev);
assignFromKeyfile(keyFile, "Locallab", "Chromablu_" + index_str, pedited, spot.chromablu, spotEdited.chromablu);
assignFromKeyfile(keyFile, "Locallab", "Fatdet_" + index_str, pedited, spot.fatdet, spotEdited.fatdet);
assignFromKeyfile(keyFile, "Locallab", "Fatanch_" + index_str, pedited, spot.fatanch, spotEdited.fatanch);
assignFromKeyfile(keyFile, "Locallab", "sigmadc_" + index_str, pedited, spot.sigmadc, spotEdited.sigmadc);
assignFromKeyfile(keyFile, "Locallab", "deltad_" + index_str, pedited, spot.deltad, spotEdited.deltad);
assignFromKeyfile(keyFile, "Locallab", "Fatres_" + index_str, pedited, spot.fatres, spotEdited.fatres);
assignFromKeyfile(keyFile, "Locallab", "ClariLres_" + index_str, pedited, spot.clarilres, spotEdited.clarilres);
assignFromKeyfile(keyFile, "Locallab", "ClariCres_" + index_str, pedited, spot.claricres, spotEdited.claricres);

View File

@ -1307,8 +1307,8 @@ struct LocallabParams {
double threswav;
double chromalev;
double chromablu;
double fatdet;
double fatanch;
double sigmadc;
double deltad;
double fatres;
double clarilres;
double claricres;

View File

@ -890,8 +890,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, // EvlocallabwavCurvecon
LUMINANCECURVE, // Evlocallabsigma
LUMINANCECURVE, // Evlocallaboriglc
LUMINANCECURVE, // Evlocallabfatdet
LUMINANCECURVE, // Evlocallabfatanch
LUMINANCECURVE, // Evlocallabsigmadc
LUMINANCECURVE, // Evlocallabdeltad
LUMINANCECURVE, // EvlocallabwavCurvecomp
LUMINANCECURVE, // Evlocallabfatres
LUMINANCECURVE, // EvLocallabSpotbalanh

View File

@ -949,8 +949,8 @@ private:
Adjuster* const residcomp;
Gtk::Frame* const compFrame;
Gtk::CheckButton* const wavcomp;
Adjuster* const fatdet;
Adjuster* const fatanch;
Adjuster* const sigmadc;
Adjuster* const deltad;
CurveEditorGroup* const LocalcurveEditorwavcomp;
FlatCurveEditor* const wavshapecomp;
Adjuster* const fatres;

View File

@ -2070,8 +2070,8 @@ LocallabContrast::LocallabContrast():
residcomp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RESIDCOMP"), -1., 1., 0.01, 0.))),
compFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COMPFRA")))),
wavcomp(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_COMPFRA")))),
fatdet(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATDETAIL"), -100., 300., 1., 0.))),
fatanch(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 1., 100., 1., 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
sigmadc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SIGMAWAV"), 0.2, 3., 0.01, 1.))),
deltad(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DELTAD"), -3., 3., 0.1, 0.))),//, Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
LocalcurveEditorwavcomp(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_WAVCOMP"))),
wavshapecomp(static_cast<FlatCurveEditor*>(LocalcurveEditorwavcomp->addCurve(CT_Flat, "", nullptr, false, false))),
fatres(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATRES"), 0., 100., 1., 0.))),
@ -2304,12 +2304,12 @@ LocallabContrast::LocallabContrast():
wavcompConn = wavcomp->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavcompChanged));
if (showtooltip) {
fatdet->set_tooltip_text(M("TP_LOCALLAB_COMPFRAME_TOOLTIP"));
// sigmadc->set_tooltip_text(M("TP_LOCALLAB_COMPFRAME_TOOLTIP"));
}
fatdet->setAdjusterListener(this);
sigmadc->setAdjusterListener(this);
fatanch->setAdjusterListener(this);
deltad->setAdjusterListener(this);
LocalcurveEditorwavcomp->setCurveListener(this);
@ -2507,14 +2507,14 @@ LocallabContrast::LocallabContrast():
Gtk::VBox* const compBox = Gtk::manage(new Gtk::VBox());
compBox->set_spacing(2);
compFrame->set_label_widget(*wavcomp);
compBox->pack_start(*fatdet);
compBox->pack_start(*fatanch);
compBox->pack_start(*sigmadc);
compBox->pack_start(*deltad);
compBox->pack_start(*LocalcurveEditorwavcomp, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
Gtk::HSeparator* const separatorcomp = Gtk::manage(new Gtk::HSeparator());
compBox->pack_start(*separatorcomp);
compBox->pack_start(*fatres);
// Gtk::HSeparator* const separatorcomp = Gtk::manage(new Gtk::HSeparator());
// compBox->pack_start(*separatorcomp);
//compBox->pack_start(*fatres);
compFrame->add(*compBox);
// blurcontBox2->pack_start(*compFrame);
blurcontBox2->pack_start(*compFrame);
expcontrastpyr2->add(*blurcontBox2, false);
pack_start(*expcontrastpyr2);
@ -2703,8 +2703,8 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa
threswav->setValue(pp->locallab.spots.at(index).threswav);
residcomp->setValue(pp->locallab.spots.at(index).residcomp);
wavcomp->set_active(pp->locallab.spots.at(index).wavcomp);
fatdet->setValue(pp->locallab.spots.at(index).fatdet);
fatanch->setValue(pp->locallab.spots.at(index).fatanch);
sigmadc->setValue(pp->locallab.spots.at(index).sigmadc);
deltad->setValue(pp->locallab.spots.at(index).deltad);
wavshapecomp->setCurve(pp->locallab.spots.at(index).loccompwavcurve);
fatres->setValue(pp->locallab.spots.at(index).fatres);
@ -2822,8 +2822,8 @@ void LocallabContrast::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
pp->locallab.spots.at(index).threswav = threswav->getValue();
pp->locallab.spots.at(index).residcomp = residcomp->getValue();
pp->locallab.spots.at(index).wavcomp = wavcomp->get_active();
pp->locallab.spots.at(index).fatdet = fatdet->getValue();
pp->locallab.spots.at(index).fatanch = fatanch->getValue();
pp->locallab.spots.at(index).sigmadc = sigmadc->getValue();
pp->locallab.spots.at(index).deltad = deltad->getValue();
pp->locallab.spots.at(index).loccompwavcurve = wavshapecomp->getCurve();
pp->locallab.spots.at(index).fatres = fatres->getValue();
pp->locallab.spots.at(index).fftwlc = fftwlc->get_active();
@ -2885,8 +2885,8 @@ void LocallabContrast::setDefaults(const rtengine::procparams::ProcParams* defPa
sigmadr->setDefault(defSpot.sigmadr);
threswav->setDefault(defSpot.threswav);
residcomp->setDefault(defSpot.residcomp);
fatdet->setDefault(defSpot.fatdet);
fatanch->setDefault(defSpot.fatanch);
sigmadc->setDefault(defSpot.sigmadc);
deltad->setDefault(defSpot.deltad);
fatres->setDefault(defSpot.fatres);
blendmasklc->setDefault((double)defSpot.blendmasklc);
radmasklc->setDefault(defSpot.radmasklc);
@ -3152,17 +3152,17 @@ void LocallabContrast::adjusterChanged(Adjuster* a, double newval)
}
}
if (a == fatdet) {
if (a == sigmadc) {
if (listener) {
listener->panelChanged(Evlocallabfatdet,
fatdet->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
listener->panelChanged(Evlocallabsigmadc,
sigmadc->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
}
}
if (a == fatanch) {
if (a == deltad) {
if (listener) {
listener->panelChanged(Evlocallabfatanch,
fatanch->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
listener->panelChanged(Evlocallabdeltad,
deltad->getTextValue() + " (" + escapeHtmlChars(spotName) + ")");
}
}
@ -3572,8 +3572,8 @@ void LocallabContrast::updateContrastGUI1()
sigmadr->hide();
threswav->hide();
residcomp->hide();
fatdet->hide();
fatanch->hide();
sigmadc->hide();
deltad->hide();
LocalcurveEditorwavcomp->hide();
fatres->hide();
fftwlc->show();
@ -3618,8 +3618,8 @@ void LocallabContrast::updateContrastGUI1()
sigmadr->show();
threswav->show();
residcomp->show();
fatdet->show();
fatanch->show();
sigmadc->show();
deltad->show();
LocalcurveEditorwavcomp->show();
fatres->show();
fftwlc->hide();

View File

@ -1335,8 +1335,8 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).threswav = locallab.spots.at(j).threswav && pSpot.threswav == otherSpot.threswav;
locallab.spots.at(j).chromalev = locallab.spots.at(j).chromalev && pSpot.chromalev == otherSpot.chromalev;
locallab.spots.at(j).chromablu = locallab.spots.at(j).chromablu && pSpot.chromablu == otherSpot.chromablu;
locallab.spots.at(j).fatdet = locallab.spots.at(j).fatdet && pSpot.fatdet == otherSpot.fatdet;
locallab.spots.at(j).fatanch = locallab.spots.at(j).fatanch && pSpot.fatanch == otherSpot.fatanch;
locallab.spots.at(j).sigmadc = locallab.spots.at(j).sigmadc && pSpot.sigmadc == otherSpot.sigmadc;
locallab.spots.at(j).deltad = locallab.spots.at(j).deltad && pSpot.deltad == otherSpot.deltad;
locallab.spots.at(j).fatres = locallab.spots.at(j).fatres && pSpot.fatres == otherSpot.fatres;
locallab.spots.at(j).clarilres = locallab.spots.at(j).clarilres && pSpot.clarilres == otherSpot.clarilres;
locallab.spots.at(j).claricres = locallab.spots.at(j).claricres && pSpot.claricres == otherSpot.claricres;
@ -4267,12 +4267,12 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).chromablu = mods.locallab.spots.at(i).chromablu;
}
if (locallab.spots.at(i).fatdet) {
toEdit.locallab.spots.at(i).fatdet = mods.locallab.spots.at(i).fatdet;
if (locallab.spots.at(i).sigmadc) {
toEdit.locallab.spots.at(i).sigmadc = mods.locallab.spots.at(i).sigmadc;
}
if (locallab.spots.at(i).fatanch) {
toEdit.locallab.spots.at(i).fatanch = mods.locallab.spots.at(i).fatanch;
if (locallab.spots.at(i).deltad) {
toEdit.locallab.spots.at(i).deltad = mods.locallab.spots.at(i).deltad;
}
if (locallab.spots.at(i).fatres) {
@ -6015,8 +6015,8 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
threswav(v),
chromalev(v),
chromablu(v),
fatdet(v),
fatanch(v),
sigmadc(v),
deltad(v),
fatres(v),
clarilres(v),
claricres(v),
@ -6454,8 +6454,8 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
threswav = v;
chromalev = v;
chromablu = v;
fatdet = v;
fatanch = v;
sigmadc = v;
deltad = v;
fatres = v;
clarilres = v;
claricres = v;

View File

@ -735,8 +735,8 @@ public:
bool threswav;
bool chromalev;
bool chromablu;
bool fatdet;
bool fatanch;
bool sigmadc;
bool deltad;
bool fatres;
bool clarilres;
bool claricres;