LA - new tool - Color appearance (Cam16 & JzCzHz) (#6377)
* Gui improvments * Several improvments GUI Jz algo * Change function La for lightess Jz * SH jzazbz first * enable Jz SH * Clean code * Disabled Munsell correction when Jz * Change tooltip and Cam16 Munsell * GUI for CzHz and HzHz curves * Enable curves Hz(Hz) Cz(Hz) * Improve Cz chroma * Jz100 reference refine * Change limit Jz100 * Refine link between jz100 and peak adaptation * Improve GUI * Various improvment PQ PU gamut * Change defaults settings * forgotten PL in gamutjz * Small changes and comment * Change gamujz parameter * disabled gamut Jz too slow * Jzazbz curve Jz(Hz) * reenable gamutjz * small changes * Change tooltip * Change labels tooltips * Jzazbz only on advanced mode * GUI improvments * Change tooltip * Change default values and tooltip * Added tooltip Jz * Disabled Jz gamut * Change gamma color and light - remove exposure * Gamma for exposure and DR * gamma Sharp * Gamma vibrance * gamma optimizations * Change tooltips * Optimization PQ * LA GUI for tone curve Ciecam * LA ciecam Enable curve lightness - brightness * LA ciecam GUI color curve * LA ciecam enable color curve * Change tooltip and default values * Enable Jz curve * Enable Cz(Cz) curve * Enable Cz(Jz) curve * Added Log encoding to ciecam * Improvment algorithm remapping * Reenable forgotten listener logencodchanged * Change Jz tooltips * Reenable dynamic range and exposure * First change GUI auto ciecam * 2nd fixed ciecam auto * Improve GUI maskbackground curves * Enable activspot for la ciecam * set sensitive sliders La ciecam when auto scene conditions * Change internal calculations see comments * Checcbox ForceJz to 1 * Change tool position - change order CAM model * Expander for Jzczhz * Remove unused code * GUI changes * Change labels CAM16 Jzazbz * Change slider brightness parameters * improvment SH jz * Some changes to brightness Jz * Fixed scene conditions auto * Renable forgotten change * Prepare calculation Zcam * Prepare Iz for zcam * First GUI Zcam * Improve GUI Zcam * Calculate Qz white - brightness of the reference white * Prepare for PQ - eventually * Init LUT ZCAMBrightCurveJz and ZCAMBrightCurveQz * prepare zcam achromatic variables * First zcam * Change algo step 5 zcam * Another change original algo * Another change to original algo * first colorfullness * Fixed bad behavior threshold and change c c2 surround parameters * added saturation Zcam * Change parameters surround * Enable chroma zcam * change chroma and lightness formula * disable OMP for 2nd process Zcam * Improvment zcam for some high-light images * Change parameters overflow zcam * Change parmeters high datas * another change to retrieve... * Simplify code matrix conversion xyz-jzazbz * Adjust internam parameters zcam * Change some parameters - clean code * Enable PQCam16 * Enable PQ Cam16 - disable ZCAM * remove warning compilation message * Change GUI jzczhz * Fixed bad behavior remaping jz * Remove forgotten parameter - hide Jz100 - PU adaptation- chnage tooltips * Another change to chroma parameter * Small changes * If verbose display in console Cam16 informations * If verbose display in console source saturation colorfullness * Change to La calculation for ciecam * Change GUI cam16 - jzczhz - remove cam16 and jzczhz * Disable exposure compensation to calculate La for all Ciecam and Log encoding * Change label Cam16 and jzczhz * Improve GUI Jz * Other improvment GUI Jz Cam16 * verify nan Jz and ciecam matrix to avoid crash * Enable La manual for Jz to change PU-adaptation * Improve calculation to avoid crash Jz and Cam16 matrix * Fixed crash with local contrast in cam16 * Clean code loccont * First step GUI Cie mask * GUI part 2 - Cie * Build cieMask * Gui part 3 cie * Valid llcieMask * Valid llcieMask * Pass GUI curves parameters to iplocallab.cc * 2nd pass parameters from GUI to iplocallab.cc * Init first functions modifications * Add expander to cam16 adjustments * First test mask cie * Various improvment GUI - tooltips - process * Take into account Yb cam16 for Jz - reenable warm-cool * Surround source Cam16 before Jz * Improve GUI and process * Fixed bug and bad behavior last commit * Fixed bug chroma mask - improve GUI - Relative luminance for Jz * Increase sensitivity mask chroma * Improve Jz with saturation Z - improve GUI Jzczhz * Small code improvment * Another change mask C and enable mask for Cam16 and Jz * Some changes * Enable denoise chroma mask * Small change LIM01 normchromar * Enable Zcam matrix * Improve chroma curves...mask and boudaries * take into account recursive slider in settings * Change tooltip - improvment to C curve (denoise C - best value in curves - etc.) - remove Zcam button * Change tooltips * First part GUI - local contrast wavelet Jz * Passed parameters GUI local contrast wav jz to rtengine * save config wavelet jz * first try wavelet local contrast Jz * Add tooltips * Simplify code wavelet local contrast * take into account edge wavelet performance in Wavelet Jz * Fixed overflow jz when usig botth contradt and wavelt local jz contrast * Adapt size winGdiHandles in filepanel to avoid crash in Windows multieditor * First GUI part Clarity wavelet Jz * First try wavelet Jz Cz clarity * Added tooltips * Small change to enable wavelet jz * Disabled (commented) all Zcam code * Improve behavior when SH local-contrast and Clarity are use both * Change limit PQremap jz * Clean and optimize code * Reenable mjjz * Change settings guidedfilter wavelet Jz * Fixed crash when revory based on lum mask negative * Change tooltip * Fixed ad behavior auto mean and absolute luminance * Remove warning in console * Fixed bad behavior auto Log encoding - bad behavior curves L(H) Jz * Fixed another bad behavior - reenable curves color and light L(H) C(H) * first transposition Lab Jz for curves H * Change mask boundary for Jz * Various improvment to H curves Jz * Add amountchrom to Hcurve Color and Light * Improve gray boundary curves behavior * reenable Jz curve H(H) - soft radius * Improve guidefilter Jz H curve * Threshold chroma Jz(Hz) * Enable guidedfilter chroma curve H * improve GUI curves Hz * Checkbutton chroma for curve Jz(Hz) * Change event selectspot * Clean and small optimization code * Another clean code * Change calculation Hz references for curves Hz * Clean code * Various changes to GF and GUI * Another change to Chroma for Jz(H) * Change GUI sensitive Jz100 adapdjzcie * Improve code for Jz100 * Change default value skin-protection to 0 instead of 50 * Clean code * Remove BENCHFUN for ciecam * small correction to huejz_to_huehsv2 conversion * Added missing plum parameter for jch2xyz_ciecam02float * another small change to huejz_to_huehsv2 * Improvment to huelab_to_huehsv2 and some double functions * Fixed warning hide parameters in lgtm-com * Fixed ? Missing retuen statement in lgtm-com * Change behavior Log encoding whith PQ Cam16 * Small improvment to Jz PU adaptation * Added forgoten to_one for Cz slider * Replace 0.707... by RT_SQRT1_2 - change some settings chroma * Improvment to getAutoLogloc * Fixed crash with array in getAutoLogloc * First try Jz Log encoding * Forgotten Cz * Various improvment GUI setlogscale - Jz log encoding * Change labels tooltips Jz log * Change wrong clipcz value * Change tooltip auto scene conditions * Fixed bad behavior blackevjz whiteevjz * Small improvment to LA Log encoding std * Avoid bad behavior Jz log when enable Relative luminance * Change sourcegray jz calculation * Revert last change * Clean and comment code * Review tooltips thanks to Wayne - harmonize response La log encoding and Jz Log encoding * Always force Dynamic Range evaluation in full frame mode for Jz log encoding * Remove unused code * Small optimizations sigmoid Cam16 and Jz * Comment code * Change parameters deltaE for HDR * Various improvment to Jz - La - sigmoid - log encoding * Basic support for Sony ILCE-7M4 in camconst.json * German translation Spot Removal (#6388) * Filmnegative German translation (#6389) * (Temporarily) disable `ftree-loop-vectorize` for GCC 11 because of #6384 * Added BlacEv WhiteEv to sigmoidJz * Improve GUI for BlackEv WhiteEv * Change location SigmoidJz in Iplocallab * Improvment GUI and sensitivity sliders strength sigmoid * Change labels Co-authored-by: Thanatomanic <6567747+Thanatomanic@users.noreply.github.com> Co-authored-by: Anna <simonanna@gmx.net>
This commit is contained in:
@@ -216,6 +216,12 @@ ImProcCoordinator::ImProcCoordinator() :
|
||||
lmasklclocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmaskloglocalcurve(65536, LUT_CLIP_OFF),
|
||||
lmasklocal_curve(65536, LUT_CLIP_OFF),
|
||||
lmaskcielocalcurve(65536, LUT_CLIP_OFF),
|
||||
cielocalcurve(65536, LUT_CLIP_OFF),
|
||||
cielocalcurve2(65536, LUT_CLIP_OFF),
|
||||
jzlocalcurve(65536, LUT_CLIP_OFF),
|
||||
czlocalcurve(65536, LUT_CLIP_OFF),
|
||||
czjzlocalcurve(65536, LUT_CLIP_OFF),
|
||||
lastspotdup(false),
|
||||
previewDeltaE(false),
|
||||
locallColorMask(0),
|
||||
@@ -234,6 +240,7 @@ ImProcCoordinator::ImProcCoordinator() :
|
||||
locallsharMask(0),
|
||||
localllogMask(0),
|
||||
locall_Mask(0),
|
||||
locallcieMask(0),
|
||||
retistrsav(nullptr)
|
||||
{
|
||||
}
|
||||
@@ -785,6 +792,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
// Encoding log with locallab
|
||||
if (params->locallab.enabled && !params->locallab.spots.empty()) {
|
||||
const int sizespot = (int)params->locallab.spots.size();
|
||||
const LocallabParams::LocallabSpot defSpot;
|
||||
|
||||
float *sourceg = nullptr;
|
||||
sourceg = new float[sizespot];
|
||||
@@ -794,6 +802,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
targetg = new float[sizespot];
|
||||
bool *log = nullptr;
|
||||
log = new bool[sizespot];
|
||||
bool *cie = nullptr;
|
||||
cie = new bool[sizespot];
|
||||
bool *autocomput = nullptr;
|
||||
autocomput = new bool[sizespot];
|
||||
float *blackev = nullptr;
|
||||
@@ -802,7 +812,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
whiteev = new float[sizespot];
|
||||
bool *Autogr = nullptr;
|
||||
Autogr = new bool[sizespot];
|
||||
|
||||
bool *autocie = nullptr;
|
||||
autocie = new bool[sizespot];
|
||||
|
||||
|
||||
float *locx = nullptr;
|
||||
locx = new float[sizespot];
|
||||
float *locy = nullptr;
|
||||
@@ -818,7 +831,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
|
||||
for (int sp = 0; sp < sizespot; sp++) {
|
||||
log[sp] = params->locallab.spots.at(sp).explog;
|
||||
cie[sp] = params->locallab.spots.at(sp).expcie;
|
||||
autocomput[sp] = params->locallab.spots.at(sp).autocompute;
|
||||
autocie[sp] = params->locallab.spots.at(sp).Autograycie;
|
||||
blackev[sp] = params->locallab.spots.at(sp).blackEv;
|
||||
whiteev[sp] = params->locallab.spots.at(sp).whiteEv;
|
||||
sourceg[sp] = params->locallab.spots.at(sp).sourceGray;
|
||||
@@ -832,9 +847,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
centx[sp] = params->locallab.spots.at(sp).centerX / 2000.0 + 0.5;
|
||||
centy[sp] = params->locallab.spots.at(sp).centerY / 2000.0 + 0.5;
|
||||
|
||||
const bool fullim = params->locallab.spots.at(sp).fullimage;
|
||||
const bool fullimstd = params->locallab.spots.at(sp).fullimage;//for log encoding standard
|
||||
const bool fullimjz = true;//always force fullimage in log encoding Jz - always possible to put a checkbox if need
|
||||
|
||||
if (log[sp] && autocomput[sp]) {
|
||||
if ((log[sp] && autocomput[sp]) || (cie[sp] && autocie[sp])) {
|
||||
constexpr int SCALE = 10;
|
||||
int fw, fh, tr = TR_NONE;
|
||||
imgsrc->getFullSize(fw, fh, tr);
|
||||
@@ -845,7 +861,14 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
float xsta = std::max(static_cast<float>(centx[sp] - locxL[sp]), 0.f);
|
||||
float xend = std::min(static_cast<float>(centx[sp] + locx[sp]), 1.f);
|
||||
|
||||
if (fullim) {
|
||||
if (fullimstd && (log[sp] && autocomput[sp])) {
|
||||
ysta = 0.f;
|
||||
yend = 1.f;
|
||||
xsta = 0.f;
|
||||
xend = 1.f;
|
||||
}
|
||||
|
||||
if (fullimjz && (cie[sp] && autocie[sp])) {
|
||||
ysta = 0.f;
|
||||
yend = 1.f;
|
||||
xsta = 0.f;
|
||||
@@ -853,14 +876,18 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
}
|
||||
|
||||
ipf.getAutoLogloc(sp, imgsrc, sourceg, blackev, whiteev, Autogr, sourceab, fw, fh, xsta, xend, ysta, yend, SCALE);
|
||||
//printf("sg=%f sab=%f\n", sourceg[sp], sourceab[sp]);
|
||||
// printf("sp=%i sg=%f sab=%f\n", sp, sourceg[sp], sourceab[sp]);
|
||||
params->locallab.spots.at(sp).blackEv = blackev[sp];
|
||||
params->locallab.spots.at(sp).whiteEv = whiteev[sp];
|
||||
params->locallab.spots.at(sp).blackEvjz = blackev[sp];
|
||||
params->locallab.spots.at(sp).whiteEvjz = whiteev[sp];
|
||||
params->locallab.spots.at(sp).sourceGray = sourceg[sp];
|
||||
params->locallab.spots.at(sp).sourceabs = sourceab[sp];
|
||||
|
||||
params->locallab.spots.at(sp).sourceGraycie = sourceg[sp];
|
||||
params->locallab.spots.at(sp).sourceabscie = sourceab[sp];
|
||||
float jz1 = defSpot.jz100;
|
||||
if (locallListener) {
|
||||
locallListener->logencodChanged(blackev[sp], whiteev[sp], sourceg[sp], sourceab[sp], targetg[sp]);
|
||||
locallListener->logencodChanged(blackev[sp], whiteev[sp], sourceg[sp], sourceab[sp], targetg[sp], autocomput[sp], autocie[sp], jz1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -872,12 +899,14 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
delete [] centx;
|
||||
delete [] centy;
|
||||
|
||||
delete [] autocie;
|
||||
delete [] Autogr;
|
||||
delete [] whiteev;
|
||||
delete [] blackev;
|
||||
delete [] targetg;
|
||||
delete [] sourceab;
|
||||
delete [] sourceg;
|
||||
delete [] cie;
|
||||
delete [] log;
|
||||
delete [] autocomput;
|
||||
}
|
||||
@@ -923,7 +952,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
int sca = 1;
|
||||
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
|
||||
float avge, meantme, stdtme, meanretie, stdretie;
|
||||
std::vector<LocallabListener::locallabRef> locallref;
|
||||
//std::vector<LocallabListener::locallabRef> locallref;
|
||||
std::vector<LocallabListener::locallabRetiMinMax> locallretiminmax;
|
||||
huerefs.resize(params->locallab.spots.size());
|
||||
huerefblurs.resize(params->locallab.spots.size());
|
||||
@@ -937,6 +966,16 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
stdtms.resize(params->locallab.spots.size());
|
||||
meanretis.resize(params->locallab.spots.size());
|
||||
stdretis.resize(params->locallab.spots.size());
|
||||
const int sizespot = (int)params->locallab.spots.size();
|
||||
|
||||
float *huerefp = nullptr;
|
||||
huerefp = new float[sizespot];
|
||||
float *chromarefp = nullptr;
|
||||
chromarefp = new float[sizespot];
|
||||
float *lumarefp = nullptr;
|
||||
lumarefp = new float[sizespot];
|
||||
float *fabrefp = nullptr;
|
||||
fabrefp = new float[sizespot];
|
||||
|
||||
for (int sp = 0; sp < (int)params->locallab.spots.size(); sp++) {
|
||||
|
||||
@@ -953,6 +992,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool LHutili = loclhCurve.Set(params->locallab.spots.at(sp).LHcurve);
|
||||
const bool HHutili = lochhCurve.Set(params->locallab.spots.at(sp).HHcurve);
|
||||
const bool CHutili = locchCurve.Set(params->locallab.spots.at(sp).CHcurve);
|
||||
const bool HHutilijz = lochhCurvejz.Set(params->locallab.spots.at(sp).HHcurvejz);
|
||||
const bool CHutilijz = locchCurvejz.Set(params->locallab.spots.at(sp).CHcurvejz);
|
||||
const bool LHutilijz = loclhCurvejz.Set(params->locallab.spots.at(sp).LHcurvejz);
|
||||
const bool lcmasutili = locccmasCurve.Set(params->locallab.spots.at(sp).CCmaskcurve);
|
||||
const bool llmasutili = locllmasCurve.Set(params->locallab.spots.at(sp).LLmaskcurve);
|
||||
const bool lhmasutili = lochhmasCurve.Set(params->locallab.spots.at(sp).HHmaskcurve);
|
||||
@@ -984,6 +1026,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool llmaslogutili = locllmaslogCurve.Set(params->locallab.spots.at(sp).LLmaskcurveL);
|
||||
const bool lcmaslogutili = locccmaslogCurve.Set(params->locallab.spots.at(sp).CCmaskcurveL);
|
||||
const bool lhmaslogutili = lochhmaslogCurve.Set(params->locallab.spots.at(sp).HHmaskcurveL);
|
||||
const bool llmascieutili = locllmascieCurve.Set(params->locallab.spots.at(sp).LLmaskciecurve);
|
||||
const bool lcmascieutili = locccmascieCurve.Set(params->locallab.spots.at(sp).CCmaskciecurve);
|
||||
const bool lhmascieutili = lochhmascieCurve.Set(params->locallab.spots.at(sp).HHmaskciecurve);
|
||||
|
||||
const bool lcmas_utili = locccmas_Curve.Set(params->locallab.spots.at(sp).CCmask_curve);
|
||||
const bool llmas_utili = locllmas_Curve.Set(params->locallab.spots.at(sp).LLmask_curve);
|
||||
@@ -992,6 +1037,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool lmasutiliblwav = loclmasCurveblwav.Set(params->locallab.spots.at(sp).LLmaskblcurvewav);
|
||||
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params->locallab.spots.at(sp).LLmaskcolcurvewav);
|
||||
const bool locwavutili = locwavCurve.Set(params->locallab.spots.at(sp).locwavcurve);
|
||||
const bool locwavutilijz = locwavCurvejz.Set(params->locallab.spots.at(sp).locwavcurvejz);
|
||||
const bool loclevwavutili = loclevwavCurve.Set(params->locallab.spots.at(sp).loclevwavcurve);
|
||||
const bool locconwavutili = locconwavCurve.Set(params->locallab.spots.at(sp).locconwavcurve);
|
||||
const bool loccompwavutili = loccompwavCurve.Set(params->locallab.spots.at(sp).loccompwavcurve);
|
||||
@@ -1017,6 +1063,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
const bool localmasklcutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmasklccurve, lmasklclocalcurve, sca);
|
||||
const bool localmasklogutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).LmaskcurveL, lmaskloglocalcurve, sca);
|
||||
const bool localmask_utili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmask_curve, lmasklocal_curve, sca);
|
||||
const bool localmaskcieutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).Lmaskciecurve, lmaskcielocalcurve, sca);
|
||||
const bool localcieutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).ciecurve, cielocalcurve, sca);
|
||||
const bool localcieutili2 = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).ciecurve2, cielocalcurve2, sca);
|
||||
const bool localjzutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).jzcurve, jzlocalcurve, sca);
|
||||
const bool localczutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).czcurve, czlocalcurve, sca);
|
||||
const bool localczjzutili = CurveFactory::diagonalCurve2Lut(params->locallab.spots.at(sp).czjzcurve, czjzlocalcurve, sca);
|
||||
double ecomp = params->locallab.spots.at(sp).expcomp;
|
||||
double black = params->locallab.spots.at(sp).black;
|
||||
double hlcompr = params->locallab.spots.at(sp).hlcompr;
|
||||
@@ -1040,7 +1092,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
stdtme = 0.f;
|
||||
meanretie = 0.f;
|
||||
stdretie = 0.f;
|
||||
|
||||
float fab = 1.f;
|
||||
bool istm = params->locallab.spots.at(sp).equiltm && params->locallab.spots.at(sp).exptonemap;
|
||||
bool isreti = params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti;
|
||||
//preparation for mean and sigma on current RT-spot
|
||||
@@ -1093,17 +1145,24 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
float stdtm = stdtms[sp] = stdtme;
|
||||
float meanreti = meanretis[sp] = meanretie;
|
||||
float stdreti = stdretis[sp] = stdretie;
|
||||
|
||||
huerefp[sp] = huer;
|
||||
chromarefp[sp] = chromar;
|
||||
lumarefp[sp] = lumar;
|
||||
|
||||
CurveFactory::complexCurvelocal(ecomp, black / 65535., hlcompr, hlcomprthresh, shcompr, br, cont, lumar,
|
||||
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avg,
|
||||
sca);
|
||||
|
||||
// Save Locallab mask curve references for current spot
|
||||
/*
|
||||
LocallabListener::locallabRef spotref;
|
||||
spotref.huer = huer;
|
||||
spotref.lumar = lumar;
|
||||
spotref.chromar = chromar;
|
||||
spotref.fab = 1.f;
|
||||
locallref.push_back(spotref);
|
||||
*/
|
||||
// Locallab tools computation
|
||||
/* Notes:
|
||||
* - shbuffer is used as nullptr
|
||||
@@ -1125,6 +1184,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
cllocalcurve, localclutili,
|
||||
lclocalcurve, locallcutili,
|
||||
loclhCurve, lochhCurve, locchCurve,
|
||||
lochhCurvejz, locchCurvejz, loclhCurvejz,
|
||||
lmasklocalcurve, localmaskutili,
|
||||
lmaskexplocalcurve, localmaskexputili,
|
||||
lmaskSHlocalcurve, localmaskSHutili,
|
||||
@@ -1136,6 +1196,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
lmasklclocalcurve, localmasklcutili,
|
||||
lmaskloglocalcurve, localmasklogutili,
|
||||
lmasklocal_curve, localmask_utili,
|
||||
lmaskcielocalcurve, localmaskcieutili,
|
||||
cielocalcurve, localcieutili,
|
||||
cielocalcurve2, localcieutili2,
|
||||
jzlocalcurve, localjzutili,
|
||||
czlocalcurve, localczutili,
|
||||
czjzlocalcurve, localczjzutili,
|
||||
|
||||
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
|
||||
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
|
||||
@@ -1148,10 +1214,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
|
||||
|
||||
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
|
||||
locccmascieCurve, lcmascieutili, locllmascieCurve, llmascieutili, lochhmascieCurve, lhmascieutili,
|
||||
|
||||
lochhhmas_Curve, lhhmas_utili,
|
||||
loclmasCurveblwav, lmasutiliblwav,
|
||||
loclmasCurvecolwav, lmasutilicolwav,
|
||||
locwavCurve, locwavutili,
|
||||
locwavCurvejz, locwavutilijz,
|
||||
loclevwavCurve, loclevwavutili,
|
||||
locconwavCurve, locconwavutili,
|
||||
loccompwavCurve, loccompwavutili,
|
||||
@@ -1160,13 +1229,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
locwavCurveden, locwavdenutili,
|
||||
locedgwavCurve, locedgwavutili,
|
||||
loclmasCurve_wav, lmasutili_wav,
|
||||
LHutili, HHutili, CHutili, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
|
||||
huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
|
||||
huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
|
||||
meantm, stdtm, meanreti, stdreti);
|
||||
meantm, stdtm, meanreti, stdreti, fab);
|
||||
|
||||
|
||||
|
||||
fabrefp[sp] = fab;
|
||||
if (istm) { //calculate mean and sigma on full image for use by normalize_mean_dt
|
||||
float meanf = 0.f;
|
||||
float stdf = 0.f;
|
||||
@@ -1212,17 +1281,44 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
}
|
||||
// Update Locallab reference values according to recurs parameter
|
||||
if (params->locallab.spots.at(sp).recurs) {
|
||||
/*
|
||||
spotref.huer = huer;
|
||||
spotref.lumar = lumar;
|
||||
spotref.chromar = chromar;
|
||||
spotref.fab = fab;
|
||||
locallref.at(sp).chromar = chromar;
|
||||
locallref.at(sp).lumar = lumar;
|
||||
locallref.at(sp).huer = huer;
|
||||
locallref.at(sp).fab = fab;
|
||||
*/
|
||||
huerefp[sp] = huer;
|
||||
chromarefp[sp] = chromar;
|
||||
lumarefp[sp] = lumar;
|
||||
fabrefp[sp] = fab;
|
||||
|
||||
}
|
||||
// spotref.fab = fab;
|
||||
// locallref.at(sp).fab = fab;
|
||||
|
||||
// locallref.push_back(spotref);
|
||||
if (locallListener) {
|
||||
// locallListener->refChanged(locallref, params->locallab.selspot);
|
||||
locallListener->refChanged2(huerefp, chromarefp, lumarefp, fabrefp, params->locallab.selspot);
|
||||
locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot);
|
||||
}
|
||||
|
||||
}
|
||||
delete [] huerefp;
|
||||
delete [] chromarefp;
|
||||
delete [] lumarefp;
|
||||
delete [] fabrefp;
|
||||
// Transmit Locallab reference values and Locallab Retinex min/max to LocallabListener
|
||||
/*
|
||||
if (locallListener) {
|
||||
locallListener->refChanged(locallref, params->locallab.selspot);
|
||||
locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot);
|
||||
}
|
||||
*/
|
||||
ipf.lab2rgb(*nprevl, *oprevi, params->icm.workingProfile);
|
||||
//*************************************************************
|
||||
// end locallab
|
||||
@@ -1802,8 +1898,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
|
||||
adap = 2000.;
|
||||
} else {
|
||||
double E_V = fcomp + log2(double ((fnum * fnum) / fspeed / (fiso / 100.f)));
|
||||
E_V += params->toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV
|
||||
E_V += log2(params->raw.expos); // exposure raw white point ; log2 ==> linear to EV
|
||||
double kexp = 0.;
|
||||
E_V += kexp * params->toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV
|
||||
E_V += 0.5 * log2(params->raw.expos); // exposure raw white point ; log2 ==> linear to EV
|
||||
adap = pow(2.0, E_V - 3.0); // cd / m2
|
||||
// end calculation adaptation scene luminosity
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user