Local adjustments - Normalize luminance - improvment Preview TM - Retinex - Remove D.Range (#6185)
* Enable dynamic range - settings normalize luminance * Change range DR sigma offset * improve normalize_mean_dt with mean std before * Save work on normalize dynamic range * Improve normalize for TM * Added LA retinex to normalize_mean * Clean and optimize code * Disabled normalize DR - improve TM and Retinex * Clean code - first part * Clean code - part two * Change 2 default values Retinex * Change order TM and Retinex in process * remove the order number in - add tool to current spot - * Fixed bug in TM * Some change Retinex - default... * optimize mean sigma * cleanup for mean_sig * Fix some cppcheck issues * convert one large loop into three loops to avoid performance penalty on machines with 4-way L1 cache Co-authored-by: Ingo Weyrich <heckflosse67@gmx.de>
This commit is contained in:
@@ -951,6 +951,8 @@ private:
|
||||
|
||||
const std::unique_ptr<LabImage> reservView(new LabImage(*labView, true));
|
||||
const std::unique_ptr<LabImage> lastorigView(new LabImage(*labView, true));
|
||||
std::unique_ptr<LabImage> savenormtmView;
|
||||
std::unique_ptr<LabImage> savenormretiView;
|
||||
LocretigainCurve locRETgainCurve;
|
||||
LocretitransCurve locRETtransCurve;
|
||||
LocLHCurve loclhCurve;
|
||||
@@ -1035,6 +1037,7 @@ private:
|
||||
}
|
||||
|
||||
for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) {
|
||||
|
||||
// Set local curves of current spot to LUT
|
||||
locRETgainCurve.Set(params.locallab.spots.at(sp).localTgaincurve);
|
||||
locRETtransCurve.Set(params.locallab.spots.at(sp).localTtranscurve);
|
||||
@@ -1122,6 +1125,11 @@ private:
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
int lastsav;
|
||||
float avge;
|
||||
float meantme;
|
||||
float stdtme;
|
||||
float meanretie;
|
||||
float stdretie;
|
||||
|
||||
if (params.locallab.spots.at(sp).spotMethod == "exc") {
|
||||
ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
|
||||
} else {
|
||||
@@ -1140,7 +1148,7 @@ private:
|
||||
float Tmax;
|
||||
|
||||
// No Locallab mask is shown in exported picture
|
||||
ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), lastorigView.get(), 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve,
|
||||
ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), savenormtmView.get(), savenormretiView.get(), lastorigView.get(), 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve,
|
||||
lllocalcurve, locallutili,
|
||||
cllocalcurve, localclutili,
|
||||
lclocalcurve, locallcutili,
|
||||
@@ -1182,7 +1190,9 @@ private:
|
||||
loclmasCurve_wav,lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
|
||||
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantme, stdtme, meanretie, stdretie
|
||||
);
|
||||
|
||||
if (sp + 1u < params.locallab.spots.size()) {
|
||||
// do not copy for last spot as it is not needed anymore
|
||||
|
||||
Reference in New Issue
Block a user