Change numero label masks and format iplocallab locallab

This commit is contained in:
Desmis 2019-11-17 17:41:27 +01:00
parent 8318a077ce
commit a7cc1d2feb
3 changed files with 42 additions and 38 deletions

View File

@ -2180,7 +2180,7 @@ TP_LOCALLAB_MRTWO;Short Curves 'L' Mask
TP_LOCALLAB_MRTHR;Original Image TP_LOCALLAB_MRTHR;Original Image
TP_LOCALLAB_MRFOU;Previous Spot TP_LOCALLAB_MRFOU;Previous Spot
TP_LOCALLAB_MERGETYPE;Merge image and mask TP_LOCALLAB_MERGETYPE;Merge image and mask
TP_LOCALLAB_MERGETYPE_TOOLTIP;None, use all mask in LCH mode.\nShort curves 'L' mask, use a short circuit for mask 2, 3, 4, 6, 7.\nOriginal mask 7, blend current image with original TP_LOCALLAB_MERGETYPE_TOOLTIP;None, use all mask in LCH mode.\nShort curves 'L' mask, use a short circuit for mask 2, 3, 4, 6, 7.\nOriginal mask 8, blend current image with original
TP_LOCALLAB_MERGENONE;None TP_LOCALLAB_MERGENONE;None
TP_LOCALLAB_MERGEONE;Short Curves 'L' Mask TP_LOCALLAB_MERGEONE;Short Curves 'L' Mask
TP_LOCALLAB_MERGETWO;Original(Mask 7) TP_LOCALLAB_MERGETWO;Original(Mask 7)
@ -2407,11 +2407,12 @@ TP_LOCALLAB_LUMASK;Luminance Background Mask
TP_LOCALLAB_SHORTC;Short Curves 'L' Mask TP_LOCALLAB_SHORTC;Short Curves 'L' Mask
TP_LOCALLAB_SHORTCMASK_TOOLTIP;Short circuit the 2 curves L(L) and L(H).\nAllows you to mix the current image with the original image modified by the mask job.\nUsable with masks 2, 3, 4, 6, 7 TP_LOCALLAB_SHORTCMASK_TOOLTIP;Short circuit the 2 curves L(L) and L(H).\nAllows you to mix the current image with the original image modified by the mask job.\nUsable with masks 2, 3, 4, 6, 7
TP_LOCALLAB_SHOWCB;2+ - Mask and modifications TP_LOCALLAB_SHOWCB;2+ - Mask and modifications
TP_LOCALLAB_SHOWT;3 - Mask and modifications TP_LOCALLAB_SHOWVI;3 - Mask and modifications
TP_LOCALLAB_SHOWS;4+* - Mask and modifications TP_LOCALLAB_SHOWT;4 - Mask and modifications
TP_LOCALLAB_SHOWR;5 - Mask and modifications TP_LOCALLAB_SHOWS;5+* - Mask and modifications
TP_LOCALLAB_SHOWE;6+ - Mask and modifications TP_LOCALLAB_SHOWR;6 - Mask and modifications
TP_LOCALLAB_SHOWC;7+* - Mask and modifications TP_LOCALLAB_SHOWE;7+ - Mask and modifications
TP_LOCALLAB_SHOWC;8+* - Mask and modifications
TP_LOCALLAB_SHOWC1;Merge file TP_LOCALLAB_SHOWC1;Merge file
TP_LOCALLAB_SHOWPLUS;1+* - Mask and modifications - Smooth-Blur & Denoise TP_LOCALLAB_SHOWPLUS;1+* - Mask and modifications - Smooth-Blur & Denoise
TP_LOCALLAB_SHOWMASKCOL_TOOLTIP;Display modifications.\nBeware, you can only view one modification (color and light or Exposure or Shadows-Highlight or TM or CBDL or Retinex MSR or Blur).\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 or Shadows-Highlight or TM or CBDL or Retinex MSR or Blur).\n\nUse Mask is before algorihtm shape detection

View File

@ -8822,7 +8822,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
//vibrance //vibrance
if (lp.expvib && (lp.past != 0.f || lp.satur != 0.f || lp.showmaskvibmet == 2 || lp.enavibMask || lp.showmaskvibmet == 3 || lp.showmaskvibmet == 4) && lp.vibena){ //interior ellipse renforced lightness and chroma //locallutili if (lp.expvib && (lp.past != 0.f || lp.satur != 0.f || lp.showmaskvibmet == 2 || lp.enavibMask || lp.showmaskvibmet == 3 || lp.showmaskvibmet == 4) && lp.vibena) { //interior ellipse renforced lightness and chroma //locallutili
if (call <= 3) { //simpleprocess, dcrop, improccoordinator if (call <= 3) { //simpleprocess, dcrop, improccoordinator
const int ystart = std::max(static_cast<int>(lp.yc - lp.lyT) - cy, 0); const int ystart = std::max(static_cast<int>(lp.yc - lp.lyT) - cy, 0);
const int yend = std::min(static_cast<int>(lp.yc + lp.ly) - cy, original->H); const int yend = std::min(static_cast<int>(lp.yc + lp.ly) - cy, original->H);
@ -8930,44 +8930,45 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
if (lp.showmaskvibmet == 0 || lp.showmaskvibmet == 1 || lp.showmaskvibmet == 2 || lp.showmaskvibmet == 4 || lp.enavibMask) { if (lp.showmaskvibmet == 0 || lp.showmaskvibmet == 1 || lp.showmaskvibmet == 2 || lp.showmaskvibmet == 4 || lp.enavibMask) {
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16) #pragma omp parallel for schedule(dynamic,16)
#endif #endif
for (int y = ystart; y < yend; y++) { for (int y = ystart; y < yend; y++) {
for (int x = xstart; x < xend; x++) { for (int x = xstart; x < xend; x++) {
bufexporig->L[y - ystart][x - xstart] = original->L[y][x]; bufexporig->L[y - ystart][x - xstart] = original->L[y][x];
bufexporig->a[y - ystart][x - xstart] = original->a[y][x]; bufexporig->a[y - ystart][x - xstart] = original->a[y][x];
bufexporig->b[y - ystart][x - xstart] = original->b[y][x]; bufexporig->b[y - ystart][x - xstart] = original->b[y][x];
}
} }
}
VibranceParams vibranceParams; VibranceParams vibranceParams;
vibranceParams.enabled = params->locallab.spots.at(sp).expvibrance; vibranceParams.enabled = params->locallab.spots.at(sp).expvibrance;
vibranceParams.pastels = params->locallab.spots.at(sp).pastels; vibranceParams.pastels = params->locallab.spots.at(sp).pastels;
vibranceParams.saturated = params->locallab.spots.at(sp).saturated; vibranceParams.saturated = params->locallab.spots.at(sp).saturated;
vibranceParams.psthreshold = params->locallab.spots.at(sp).psthreshold; vibranceParams.psthreshold = params->locallab.spots.at(sp).psthreshold;
vibranceParams.protectskins = params->locallab.spots.at(sp).protectskins; vibranceParams.protectskins = params->locallab.spots.at(sp).protectskins;
vibranceParams.avoidcolorshift = params->locallab.spots.at(sp).avoidcolorshift; vibranceParams.avoidcolorshift = params->locallab.spots.at(sp).avoidcolorshift;
vibranceParams.pastsattog = params->locallab.spots.at(sp).pastsattog; vibranceParams.pastsattog = params->locallab.spots.at(sp).pastsattog;
vibranceParams.skintonescurve = params->locallab.spots.at(sp).skintonescurve; vibranceParams.skintonescurve = params->locallab.spots.at(sp).skintonescurve;
bufexpfin->CopyFrom(bufexporig.get()); bufexpfin->CopyFrom(bufexporig.get());
ImProcFunctions::vibrance(bufexpfin.get(), vibranceParams, params->toneCurve.hrenabled, params->icm.workingProfile); ImProcFunctions::vibrance(bufexpfin.get(), vibranceParams, params->toneCurve.hrenabled, params->icm.workingProfile);
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16) #pragma omp parallel for schedule(dynamic,16)
#endif #endif
for (int y = 0; y < bfh; y++) { for (int y = 0; y < bfh; y++) {
for (int x = 0; x < bfw; x++) { for (int x = 0; x < bfw; x++) {
buflight[y][x] = CLIPRET((bufexpfin->L[y][x] - bufexporig->L[y][x]) / 328.f); buflight[y][x] = CLIPRET((bufexpfin->L[y][x] - bufexporig->L[y][x]) / 328.f);
bufl_ab[y][x] = CLIPRET((sqrt(SQR(bufexpfin->a[y][x]) + SQR(bufexpfin->b[y][x])) - sqrt(SQR(bufexporig->a[y][x]) + SQR(bufexporig->b[y][x]))) / 250.f); bufl_ab[y][x] = CLIPRET((sqrt(SQR(bufexpfin->a[y][x]) + SQR(bufexpfin->b[y][x])) - sqrt(SQR(bufexporig->a[y][x]) + SQR(bufexporig->b[y][x]))) / 250.f);
}
} }
bufexpfin.reset();
} }
bufexpfin.reset();
}
transit_shapedetect(2, bufexporig.get(), nullptr, originalmaskvib.get(), buflight, bufl_ab, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk); transit_shapedetect(2, bufexporig.get(), nullptr, originalmaskvib.get(), buflight, bufl_ab, nullptr, nullptr, nullptr, false, hueref, chromaref, lumaref, sobelref, 0.f, nullptr, lp, original, transformed, cx, cy, sk);
if (params->locallab.spots.at(sp).recurs) { if (params->locallab.spots.at(sp).recurs) {

View File

@ -879,7 +879,8 @@ pe(nullptr)
if (showtooltip) { if (showtooltip) {
LLmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); LLmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP"));
} }
// maskCurveEditorG->curveListComplete();
// maskCurveEditorG->curveListComplete();
// maskHCurveEditorG->setCurveListener(this); // maskHCurveEditorG->setCurveListener(this);
HHmaskshape->setIdentityValue(0.); HHmaskshape->setIdentityValue(0.);
@ -888,6 +889,7 @@ pe(nullptr)
if (showtooltip) { if (showtooltip) {
HHmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP")); HHmaskshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_CC_TOOLTIP"));
} }
// maskHCurveEditorG->setCurveListener(this); // maskHCurveEditorG->setCurveListener(this);
HHmaskshape->setCurveColorProvider(this, 6); HHmaskshape->setCurveColorProvider(this, 6);
@ -9130,7 +9132,7 @@ void Locallab::enableListener()
pastsattogconn.block(false); pastsattogconn.block(false);
showmaskvibMethodConn.block(false); showmaskvibMethodConn.block(false);
enavibMaskConn.block(false); enavibMaskConn.block(false);
// Soft Light // Soft Light
enablesoftConn.block(false); enablesoftConn.block(false);
softMethodConn.block(false); softMethodConn.block(false);
showmasksoftMethodConn.block(false); showmasksoftMethodConn.block(false);