Various changes for mask

This commit is contained in:
Desmis 2019-01-11 08:24:19 +01:00
parent 8699054ef0
commit a4325e4cc0
3 changed files with 13 additions and 13 deletions

View File

@ -1974,7 +1974,7 @@ TP_LOCALLAB_EXNORM;Normal spot
TP_LOCALLAB_EXECLU;Excluding spot
TP_LOCALLAB_EXPOSE;Exposure
TP_LOCALLAB_LOC_CONTRAST;Local contrast
TP_LOCALLAB_REFLABEL;Reference (0..1) Luma=%1 Chroma=%2
TP_LOCALLAB_REFLABEL;Reference (0..1) Chroma=%1 Luma=%2
TP_LOCALLAB_NOISELUMFINE;Luminance fine (Wav)
TP_LOCALLAB_NOISELUMCOARSE;Luminance coarse (Wav)
TP_LOCALLAB_NOISELUMDETAIL;Luminance detail (DCT)
@ -2029,7 +2029,7 @@ TP_LOCALLAB_SENSIBN;Scope
TP_LOCALLAB_SENSIS_TOOLTIP;Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm.
TP_LOCALLAB_SETTINGS;Settings
TP_LOCALLAB_SHOW;Mask and modifications
TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure).\nYou must put 'Show modification' to none to enabled the other show.\n\nUse Mask is before algorihtm shape detection
TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure).\nYou must put 'Display modification' to 'none' or 'Usemask' to enabled the other show.\n\nUse Mask is before algorihtm shape detection
TP_LOCALLAB_SHOWMNONE;None
TP_LOCALLAB_SHOWMODIF;Show modifications whithout mask
TP_LOCALLAB_SHOWMODIFMASK;Show modifications whith mask

View File

@ -10884,13 +10884,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, LUTf & sobelrefs, float** shbu
if (locccmasCurve) {
float chromask = (sqrt(SQR(bufcolorig->a[loy - begy][lox - begx]) + SQR(bufcolorig->b[loy - begy][lox - begx])));
float chromaskr = chromask / 50000.f;
float chromaskr = chromask / 45000.f;
valCC = float (locccmasCurve[500.f * chromaskr]);
valCC = 1.f - valCC;
sincosval.y = (bufcolorig->a[loy - begy][lox - begx]) / chromask;
sincosval.x = (bufcolorig->b[loy - begy][lox - begx]) / chromask;
bufmaskblur->a[loy - begy][lox - begx] = 50000.f * valCC * sincosval.y;
bufmaskblur->b[loy - begy][lox - begx] = 50000.f * valCC * sincosval.x;
bufmaskblur->a[loy - begy][lox - begx] = 45000.f * valCC * sincosval.y;
bufmaskblur->b[loy - begy][lox - begx] = 45000.f * valCC * sincosval.x;
}
}
}
@ -11231,13 +11231,13 @@ void ImProcFunctions::Lab_Local(int call, int sp, LUTf & sobelrefs, float** shbu
if (locccmasexpCurve) {
float chromask = (sqrt(SQR(bufexporig->a[loy - begy][lox - begx]) + SQR(bufexporig->b[loy - begy][lox - begx])));
float chromaskr = chromask / 50000.f;
float chromaskr = chromask / 45000.f;
valCC = float (locccmasexpCurve[500.f * chromaskr]);
valCC = 1.f - valCC;
sincosval.y = (bufexporig->a[loy - begy][lox - begx]) / chromask;
sincosval.x = (bufexporig->b[loy - begy][lox - begx]) / chromask;
bufmaskblur->a[loy - begy][lox - begx] = 50000.f * valCC * sincosval.y;
bufmaskblur->b[loy - begy][lox - begx] = 50000.f * valCC * sincosval.x;
bufmaskblur->a[loy - begy][lox - begx] = 45000.f * valCC * sincosval.y;
bufmaskblur->b[loy - begy][lox - begx] = 45000.f * valCC * sincosval.x;
}
}
}

View File

@ -906,7 +906,7 @@ void Locallab::refChanged (double huer, double lumar, double chromar)
{
nexthuer = huer;
nextlumar = lumar / 100.f;
nextchromar = chromar / 152.f;
nextchromar = chromar / 137.4f;
//printf("nh=%f nl=%f nc=%f\n", nexthuer, nextlumar, nextchromar);
const auto func = [] (gpointer data) -> gboolean {
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
@ -932,8 +932,8 @@ void Locallab::updateLabel ()
if (!batchMode) {
float nX, nY;
nX = nextlumar;
nY = nextchromar;
nY = nextlumar;
nX = nextchromar;
{
transLabels->set_text (
Glib::ustring::compose (M ("TP_LOCALLAB_REFLABEL"),
@ -3829,14 +3829,14 @@ void Locallab::updateSpecificGUIState()
//update showmethod
if (multiImage && showmaskcolMethod->get_active_text() == M("GENERAL_UNCHANGED")) {
showmaskexpMethod->set_active(0);
} else if(showmaskcolMethod->get_active_row_number() == 1) {
} else if((showmaskcolMethod->get_active_row_number() == 1 || showmaskcolMethod->get_active_row_number() == 2 || showmaskcolMethod->get_active_row_number() == 4)) {
showmaskexpMethod->set_active(0);
expexpose->setEnabled(false);
}
if (multiImage && showmaskexpMethod->get_active_text() == M("GENERAL_UNCHANGED")) {
showmaskcolMethod->set_active(0);
} else if(showmaskexpMethod->get_active_row_number() == 1) {
} else if((showmaskexpMethod->get_active_row_number() == 1 || showmaskexpMethod->get_active_row_number() == 2 || showmaskexpMethod->get_active_row_number() == 4)) {
showmaskcolMethod->set_active(0);
expcolor->setEnabled(false);
}