Fixed bad behavior Exposure PDE Ipol
This commit is contained in:
parent
7868cc160a
commit
3e9ba6e415
@ -2426,6 +2426,7 @@ TP_LOCALLAB_EXECLU;Excluding spot
|
||||
TP_LOCALLAB_EXNORM;Normal spot
|
||||
TP_LOCALLAB_EXPCBDL_TOOLTIP;In the case of contaminated sensor (type "grease"), and when the area is important or for a series of small defects.\n\na) Put the selection spot on a pronounced default (adapting its size if necessary), use a large spot enough to allow wavelet; b) choose a wide selection area to cover most of the area affected by the defects; c) Select a transition value (low) and transition weakening (high value); d) act on levels 2, 3, 4 or 5 or lower by reducing the contrast (values below 100) and by acting on the chroma slider if necessary. e)possibly act on "scope" to reduce the extent of the action.\n\nYou can also complete with Blur levels and Gaussian blur (Smooth Blur and noise)
|
||||
TP_LOCALLAB_EXPCHROMA;Chroma compensation
|
||||
TP_LOCALLAB_EXPCHROMA_TOOLTIP;Only in association with exposure compensation and PDE Ipol.\nAvoids desaturation of colors
|
||||
TP_LOCALLAB_EXPCOLOR_TOOLTIP;In the case of small defects.\n\nRed-eyes : red-centered circular selector, spot delimiters close to the eye, weak scope, "lightness" -100, "chrominance" -100.\n\nSpotIR :Circular selector centered on the defect, spot delimiters close to the default - reduce "chrominance", possibly act on "scope" to reduce the extent of the action.\n\nDust - grease (small) :Circular selector centered on the defect (adapt the size of the spot), spot delimiters not too close to the defect to allow an inconspicuous transition. a) "Transition" (low values) and "Transition weak" (high values); b) act on "lightness" and possibly on "chrominance" or "Color correction grid - direct" to approach the rendering of the polluted zone to that of the healthy zone; c) act moderately on "scope" to modulate the desired action.\n\nYou can also complete with Gaussian blur (Smooth Blur and noise)
|
||||
TP_LOCALLAB_EXPCONTRAST_TOOLTIP;Avoid spots that are too small(< 32x32 pixels).\nUse low transition values and high weakening transition values and scope to simulate small RT-spot and deal wth defects.\nUse if necessary the module 'Clarity & Sharp mask and Blend images' by adjusting 'Soft radius' to reduce artifacts.
|
||||
TP_LOCALLAB_EXPCONTRASTPYR_TOOLTIP;See the documentation of wavelet levels or denoise.\nHowever there are some differences: more tools and closer to the details for denoise.\nTone mapping for wavelet levels.
|
||||
|
@ -2371,7 +2371,7 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* b
|
||||
float shoulder = ((maxran / max(1.0f, exp_scale)) * (lp.hlcompthr / 200.0)) + 0.1;
|
||||
float hlrange = maxran - shoulder;
|
||||
float linear = lp.linear;
|
||||
float kl = 1.5f;
|
||||
float kl = 1.f;
|
||||
float addcomp = 0.f;
|
||||
|
||||
if (lp.linear > 0.f) {
|
||||
@ -2379,6 +2379,9 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* b
|
||||
lp.expcomp = 0.01f;
|
||||
}
|
||||
}
|
||||
if (settings->verbose) {
|
||||
printf("mean=%f\n", mean);
|
||||
}
|
||||
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for
|
||||
@ -2388,9 +2391,10 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* b
|
||||
for (int jr = 0; jr < bfw; jr++) {
|
||||
float L = bufexporig->L[ir][jr];
|
||||
|
||||
if (L < mean && lp.expmet == 1 && lp.linear > 0.f && lp.laplacexp > 0.1f && !lp.invex) {
|
||||
// if (L < mean && lp.expmet == 1 && lp.linear > 0.f && lp.laplacexp > 0.1f && !lp.invex) {//disabled generate artifacts
|
||||
if (lp.expmet == 1 && lp.linear > 0.f && lp.laplacexp > 0.1f && !lp.invex) {
|
||||
float Llin = LIM01(L / 32768.f);
|
||||
addcomp = linear * (-kl * Llin + kl);//maximum about 1.5 IL
|
||||
addcomp = linear * (-kl * Llin + kl);//maximum about 1. IL
|
||||
exp_scale = pow(2.0, (lp.expcomp + addcomp));
|
||||
shoulder = ((maxran / max(1.0f, exp_scale)) * (lp.hlcompthr / 200.0)) + 0.1;
|
||||
comp = (max(0.0, (lp.expcomp + addcomp)) + 1.0) * lp.hlcomp / 100.0;
|
||||
@ -13954,7 +13958,7 @@ void ImProcFunctions::Lab_Local(
|
||||
float ch = 0.f;
|
||||
float chprosl = 0.f;
|
||||
|
||||
if ((lp.expcomp != 0.f && lp.expcomp != 0.01f) || (exlocalcurve && localexutili)) {
|
||||
if ((lp.expcomp != 0.f && lp.expcomp != 0.01f) || (exlocalcurve && localexutili) || lp.laplacexp > 0.1f) {
|
||||
ch = (1.f + 0.02f * lp.expchroma);
|
||||
chprosl = ch <= 1.f ? 99.f * ch - 99.f : CLIPCHRO(ampli * ch - ampli);
|
||||
}
|
||||
|
@ -2488,6 +2488,7 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips)
|
||||
Lmaskexpshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP"));
|
||||
blendmaskexp->set_tooltip_text(M("TP_LOCALLAB_BLENDMASK_TOOLTIP"));
|
||||
mask2expCurveEditorG->set_tooltip_text(M("TP_LOCALLAB_CONTRASTCURVMASK_TOOLTIP"));
|
||||
expchroma->set_tooltip_text(M("TP_LOCALLAB_EXPCHROMA_TOOLTIP"));
|
||||
} else {
|
||||
exp->set_tooltip_text("");
|
||||
expMethod->set_tooltip_text("");
|
||||
@ -2512,6 +2513,7 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips)
|
||||
Lmaskexpshape->setTooltip("");
|
||||
blendmaskexp->set_tooltip_text(M(""));
|
||||
mask2expCurveEditorG->set_tooltip_text(M(""));
|
||||
expchroma->set_tooltip_text(M(""));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2567,7 +2569,6 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa
|
||||
|
||||
if (spot.expMethod == "std") {
|
||||
expMethod->set_active(0);
|
||||
updateGUIToMode(static_cast<modeType>(complexity->get_active_row_number()));
|
||||
} else if (spot.expMethod == "pde") {
|
||||
expMethod->set_active(1);
|
||||
}
|
||||
@ -2651,7 +2652,6 @@ void LocallabExposure::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
|
||||
|
||||
if (expMethod->get_active_row_number() == 0) {
|
||||
spot.expMethod = "std";
|
||||
updateGUIToMode(static_cast<modeType>(complexity->get_active_row_number()));
|
||||
} else if (expMethod->get_active_row_number() == 1) {
|
||||
spot.expMethod = "pde";
|
||||
}
|
||||
@ -3031,10 +3031,10 @@ void LocallabExposure::convertParamToNormal()
|
||||
slomaskexp->setValue(defSpot.slomaskexp);
|
||||
strmaskexp->setValue(defSpot.strmaskexp);
|
||||
angmaskexp->setValue(defSpot.angmaskexp);
|
||||
laplacexp->setValue(defSpot.laplacexp);
|
||||
linear->setValue(defSpot.linear);
|
||||
balanexp->setValue(defSpot.balanexp);
|
||||
gamm->setValue(defSpot.gamm);
|
||||
// laplacexp->setValue(defSpot.laplacexp);
|
||||
// linear->setValue(defSpot.linear);
|
||||
// balanexp->setValue(defSpot.balanexp);
|
||||
// gamm->setValue(defSpot.gamm);
|
||||
|
||||
// Enable all listeners
|
||||
enableListener();
|
||||
@ -3049,7 +3049,7 @@ void LocallabExposure::updateGUIToMode(const modeType new_type)
|
||||
slomaskexp->hide();
|
||||
gradFramemask->hide();
|
||||
blurexpde->hide();
|
||||
pdeFrame->hide();
|
||||
// pdeFrame->hide();
|
||||
} else {
|
||||
// Advanced widgets are shown in Expert mode
|
||||
lapmaskexp->show();
|
||||
@ -3057,7 +3057,7 @@ void LocallabExposure::updateGUIToMode(const modeType new_type)
|
||||
slomaskexp->show();
|
||||
gradFramemask->show();
|
||||
blurexpde->show();
|
||||
pdeFrame->show();
|
||||
// pdeFrame->show();
|
||||
}
|
||||
}
|
||||
|
||||
@ -3081,7 +3081,6 @@ void LocallabExposure::expMethodChanged()
|
||||
{
|
||||
// Update exposure GUI according to expMethod value
|
||||
updateExposureGUI2();
|
||||
updateGUIToMode(static_cast<modeType>(complexity->get_active_row_number()));
|
||||
|
||||
if (isLocActivated && exp->getEnabled()) {
|
||||
if (listener) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user