Add simplified Scope to local denoise
This commit is contained in:
parent
db03c16f45
commit
7a826a586d
@ -841,6 +841,7 @@ HISTORY_MSG_591;Local - Spot Excluding struc
|
|||||||
HISTORY_MSG_592;Local - Warm Cool
|
HISTORY_MSG_592;Local - Warm Cool
|
||||||
HISTORY_MSG_593;Local - Noise lum detail
|
HISTORY_MSG_593;Local - Noise lum detail
|
||||||
HISTORY_MSG_594;Local - Noise chro detail
|
HISTORY_MSG_594;Local - Noise chro detail
|
||||||
|
HISTORY_MSG_595;Local - Noise Scope
|
||||||
HISTORY_NEWSNAPSHOT;Add
|
HISTORY_NEWSNAPSHOT;Add
|
||||||
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
|
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
|
||||||
HISTORY_SNAPSHOT;Snapshot
|
HISTORY_SNAPSHOT;Snapshot
|
||||||
@ -1844,6 +1845,7 @@ TP_LOCALLAB_CURVEEDITOR_TONES_TOOLTIP;L=f(L), can be used with L(H) in Color and
|
|||||||
TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP;To be active, you must check button 'Enable curves'
|
TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP;To be active, you must check button 'Enable curves'
|
||||||
TP_LOCALLAB_CURVEMETHOD_TOOLTIP;'Normal', the curve L=f(L) has the same algorithm than slider lightness.\n'Super' the curve L=f(L) has an new improved algorithm, which can leeds in some cases to artifacts.
|
TP_LOCALLAB_CURVEMETHOD_TOOLTIP;'Normal', the curve L=f(L) has the same algorithm than slider lightness.\n'Super' the curve L=f(L) has an new improved algorithm, which can leeds in some cases to artifacts.
|
||||||
TP_LOCALLAB_EXCLUF;Excluding
|
TP_LOCALLAB_EXCLUF;Excluding
|
||||||
|
TP_LOCALLAB_SENSIDEN;Scope
|
||||||
TP_LOCALLAB_SENSIEXCLU;Scope
|
TP_LOCALLAB_SENSIEXCLU;Scope
|
||||||
TP_LOCALLAB_SENSIEXCLU_TOOLTIP;Adjust color to include in exclusion!
|
TP_LOCALLAB_SENSIEXCLU_TOOLTIP;Adjust color to include in exclusion!
|
||||||
TP_LOCALLAB_STRUC;Structure
|
TP_LOCALLAB_STRUC;Structure
|
||||||
|
@ -1149,6 +1149,7 @@ void Crop::update(int todo)
|
|||||||
params.locallab.warm = parent->warms[sp];
|
params.locallab.warm = parent->warms[sp];
|
||||||
params.locallab.noiselumdetail = parent->noiselumdetails[sp];
|
params.locallab.noiselumdetail = parent->noiselumdetails[sp];
|
||||||
params.locallab.noisechrodetail = parent->noisechrodetails[sp];
|
params.locallab.noisechrodetail = parent->noisechrodetails[sp];
|
||||||
|
params.locallab.sensiden = parent->sensidens[sp];
|
||||||
|
|
||||||
std::vector<double> cretie;
|
std::vector<double> cretie;
|
||||||
|
|
||||||
@ -1238,14 +1239,14 @@ void Crop::update(int todo)
|
|||||||
parent->lhist16, hltonecurveloc2, shtonecurveloc2, tonecurveloc2,
|
parent->lhist16, hltonecurveloc2, shtonecurveloc2, tonecurveloc2,
|
||||||
sca);
|
sca);
|
||||||
|
|
||||||
|
params.locallab.huerefblur = (parent->huerefblurs[sp]) / 100.f;
|
||||||
params.locallab.hueref = (parent->huerefs[sp]) / 100.f;
|
params.locallab.hueref = (parent->huerefs[sp]) / 100.f;
|
||||||
params.locallab.chromaref = parent->chromarefs[sp];
|
params.locallab.chromaref = parent->chromarefs[sp];
|
||||||
params.locallab.lumaref = parent->lumarefs[sp];
|
params.locallab.lumaref = parent->lumarefs[sp];
|
||||||
params.locallab.sobelref = parent->sobelrefs[sp];
|
params.locallab.sobelref = parent->sobelrefs[sp];
|
||||||
|
|
||||||
|
|
||||||
parent->ipf.Lab_Local(1, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,
|
parent->ipf.Lab_Local(1, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2,
|
||||||
loclhCurve, lochhCurve, LHutili, HHutili, cclocalcurve2, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
loclhCurve, lochhCurve, LHutili, HHutili, cclocalcurve2, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, params.locallab.huerefblur, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
||||||
lllocalcurve2.clear();
|
lllocalcurve2.clear();
|
||||||
cclocalcurve2.clear();
|
cclocalcurve2.clear();
|
||||||
sklocalcurve2.clear();
|
sklocalcurve2.clear();
|
||||||
@ -1530,6 +1531,7 @@ void Crop::update(int todo)
|
|||||||
parent->warms[sp] = params.locallab.warm = parent->warms[0];
|
parent->warms[sp] = params.locallab.warm = parent->warms[0];
|
||||||
parent->noiselumdetails[sp] = params.locallab.noiselumdetail = parent->noiselumdetails[0];
|
parent->noiselumdetails[sp] = params.locallab.noiselumdetail = parent->noiselumdetails[0];
|
||||||
parent->noisechrodetails[sp] = params.locallab.noisechrodetail = parent->noisechrodetails[0];
|
parent->noisechrodetails[sp] = params.locallab.noisechrodetail = parent->noisechrodetails[0];
|
||||||
|
parent->sensidens[sp] = params.locallab.sensiden = parent->sensidens[0];
|
||||||
|
|
||||||
std::vector<double> ccret;
|
std::vector<double> ccret;
|
||||||
|
|
||||||
@ -1628,12 +1630,13 @@ void Crop::update(int todo)
|
|||||||
parent->lhist16, hltonecurveloc2, shtonecurveloc2, tonecurveloc2,
|
parent->lhist16, hltonecurveloc2, shtonecurveloc2, tonecurveloc2,
|
||||||
sca);
|
sca);
|
||||||
|
|
||||||
|
params.locallab.huerefblur = (parent->huerefblurs[sp]) / 100.f;
|
||||||
params.locallab.hueref = (parent->huerefs[sp]) / 100.f;
|
params.locallab.hueref = (parent->huerefs[sp]) / 100.f;
|
||||||
params.locallab.chromaref = parent->chromarefs[sp];
|
params.locallab.chromaref = parent->chromarefs[sp];
|
||||||
params.locallab.lumaref = parent->lumarefs[sp];
|
params.locallab.lumaref = parent->lumarefs[sp];
|
||||||
params.locallab.sobelref = parent->sobelrefs[sp];
|
params.locallab.sobelref = parent->sobelrefs[sp];
|
||||||
parent->ipf.Lab_Local(1, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2, loclhCurve, lochhCurve,
|
parent->ipf.Lab_Local(1, (float**)shbuffer, labnCrop, labnCrop, reservCrop, cropx / skip, cropy / skip, skips(parent->fw, skip), skips(parent->fh, skip), skip, locRETgainCurve, lllocalcurve2, loclhCurve, lochhCurve,
|
||||||
LHutili, HHutili, cclocalcurve2, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
LHutili, HHutili, cclocalcurve2, localskutili, sklocalcurve2, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, params.locallab.huerefblur, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
||||||
|
|
||||||
lllocalcurve2.clear();
|
lllocalcurve2.clear();
|
||||||
cclocalcurve2.clear();
|
cclocalcurve2.clear();
|
||||||
@ -1889,6 +1892,7 @@ void Crop::freeAll()
|
|||||||
reservCrop = nullptr;
|
reservCrop = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* if (lablocCrop ) {
|
/* if (lablocCrop ) {
|
||||||
delete lablocCrop;
|
delete lablocCrop;
|
||||||
lablocCrop = NULL;
|
lablocCrop = NULL;
|
||||||
@ -2099,6 +2103,7 @@ bool Crop::setCropSizes(int rcx, int rcy, int rcw, int rch, int skip, bool inter
|
|||||||
|
|
||||||
reservCrop = new LabImage(cropw, croph);
|
reservCrop = new LabImage(cropw, croph);
|
||||||
|
|
||||||
|
|
||||||
/* if (lablocCrop) {
|
/* if (lablocCrop) {
|
||||||
delete lablocCrop; // labnCrop can't be resized
|
delete lablocCrop; // labnCrop can't be resized
|
||||||
}
|
}
|
||||||
|
@ -72,30 +72,30 @@ protected:
|
|||||||
ImProcCoordinator* const parent;
|
ImProcCoordinator* const parent;
|
||||||
const bool isDetailWindow;
|
const bool isDetailWindow;
|
||||||
EditUniqueID getCurrEditID();
|
EditUniqueID getCurrEditID();
|
||||||
bool setCropSizes (int cropX, int cropY, int cropW, int cropH, int skip, bool internal);
|
bool setCropSizes(int cropX, int cropY, int cropW, int cropH, int skip, bool internal);
|
||||||
void freeAll ();
|
void freeAll();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow);
|
Crop(ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow);
|
||||||
virtual ~Crop ();
|
virtual ~Crop();
|
||||||
// MyMutex* locMutex;
|
// MyMutex* locMutex;
|
||||||
void setEditSubscriber (EditSubscriber* newSubscriber);
|
void setEditSubscriber(EditSubscriber* newSubscriber);
|
||||||
bool hasListener();
|
bool hasListener();
|
||||||
void update (int todo);
|
void update(int todo);
|
||||||
void setWindow (int cropX, int cropY, int cropW, int cropH, int skip)
|
void setWindow(int cropX, int cropY, int cropW, int cropH, int skip)
|
||||||
{
|
{
|
||||||
setCropSizes (cropX, cropY, cropW, cropH, skip, false);
|
setCropSizes(cropX, cropY, cropW, cropH, skip, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @brief Synchronously look out if a full update is necessary
|
/** @brief Synchronously look out if a full update is necessary
|
||||||
* First try, only make fullUpdate if this returns false
|
* First try, only make fullUpdate if this returns false
|
||||||
*/
|
*/
|
||||||
bool tryUpdate ();
|
bool tryUpdate();
|
||||||
/** @brief Asynchronously reprocess the detailed crop */
|
/** @brief Asynchronously reprocess the detailed crop */
|
||||||
void fullUpdate (); // called via thread
|
void fullUpdate(); // called via thread
|
||||||
|
|
||||||
void setListener (DetailedCropListener* il);
|
void setListener(DetailedCropListener* il);
|
||||||
void destroy ();
|
void destroy();
|
||||||
int get_skip();
|
int get_skip();
|
||||||
int getLeftBorder();
|
int getLeftBorder();
|
||||||
int getUpperBorder();
|
int getUpperBorder();
|
||||||
|
@ -157,6 +157,7 @@ ImProcCoordinator::ImProcCoordinator()
|
|||||||
noiselumcs(500, -10000),
|
noiselumcs(500, -10000),
|
||||||
noiselumdetails(500, -10000),
|
noiselumdetails(500, -10000),
|
||||||
noisechrodetails(500, -10000),
|
noisechrodetails(500, -10000),
|
||||||
|
sensidens(500, -10000),
|
||||||
noisechrofs(500, -10000),
|
noisechrofs(500, -10000),
|
||||||
noisechrocs(500, -10000),
|
noisechrocs(500, -10000),
|
||||||
mult0s(500, -10000),
|
mult0s(500, -10000),
|
||||||
@ -203,11 +204,13 @@ ImProcCoordinator::ImProcCoordinator()
|
|||||||
strucs(500, -1000),
|
strucs(500, -1000),
|
||||||
warms(500, -1000),
|
warms(500, -1000),
|
||||||
huerefs(500, -100000.f),
|
huerefs(500, -100000.f),
|
||||||
|
huerefblurs(500, -100000.f),
|
||||||
chromarefs(500, -100000.f),
|
chromarefs(500, -100000.f),
|
||||||
lumarefs(500, -100000.f),
|
lumarefs(500, -100000.f),
|
||||||
sobelrefs(500, -100000.f),
|
sobelrefs(500, -100000.f),
|
||||||
|
|
||||||
huer(0),
|
huer(0),
|
||||||
|
huerblu(0),
|
||||||
chromar(0),
|
chromar(0),
|
||||||
lumar(0),
|
lumar(0),
|
||||||
sobeler(0),
|
sobeler(0),
|
||||||
@ -859,7 +862,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int maxdata = 88;//87 10016 //86 10017 //85 10016;// 82 10015//78;//73 for 10011
|
int maxdata = 90;//88 10019//87 10018 //86 10017 //85 10016;// 82 10015//78;//73 for 10011
|
||||||
|
|
||||||
if (fic0) {
|
if (fic0) {
|
||||||
//find current version mip
|
//find current version mip
|
||||||
@ -903,7 +906,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
//initilize newues when first utilisation of Locallab. Prepare creation of Mip files
|
//initilize newues when first utilisation of Locallab. Prepare creation of Mip files
|
||||||
for (int sp = 1; sp < maxspot; sp++) { // spots default
|
for (int sp = 1; sp < maxspot; sp++) { // spots default
|
||||||
int t_sp = sp;
|
int t_sp = sp;
|
||||||
int t_mipversion = 10019;//new value for each change
|
int t_mipversion = 10020;//new value for each change
|
||||||
int t_circrad = 18;
|
int t_circrad = 18;
|
||||||
int t_locX = 250;
|
int t_locX = 250;
|
||||||
int t_locY = 250;
|
int t_locY = 250;
|
||||||
@ -1028,6 +1031,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
int t_noiselumdetail = 0;
|
int t_noiselumdetail = 0;
|
||||||
//10019
|
//10019
|
||||||
int t_noisechrodetail = 0;
|
int t_noisechrodetail = 0;
|
||||||
|
//10019
|
||||||
|
int t_sensiden = 30;
|
||||||
|
|
||||||
//all variables except locRETgainCurve 'coomon for all)
|
//all variables except locRETgainCurve 'coomon for all)
|
||||||
fic << "Mipversion=" << t_mipversion << '@' << endl;
|
fic << "Mipversion=" << t_mipversion << '@' << endl;
|
||||||
@ -1123,6 +1128,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
fic << "Warm=" << t_warm << '@' << endl;
|
fic << "Warm=" << t_warm << '@' << endl;
|
||||||
fic << "Noiselumdetail=" << t_noiselumdetail << '@' << endl;
|
fic << "Noiselumdetail=" << t_noiselumdetail << '@' << endl;
|
||||||
fic << "Noisechrodetail=" << t_noisechrodetail << '@' << endl;
|
fic << "Noisechrodetail=" << t_noisechrodetail << '@' << endl;
|
||||||
|
fic << "Sensiden=" << t_sensiden << '@' << endl;
|
||||||
|
|
||||||
fic << "curveReti=" << t_curvret << '@' << endl;
|
fic << "curveReti=" << t_curvret << '@' << endl;
|
||||||
fic << "curveLL=" << t_curvll << '@' << endl;
|
fic << "curveLL=" << t_curvll << '@' << endl;
|
||||||
@ -1377,6 +1383,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
dataspot[81][0] = warms[0] = params.locallab.warm;
|
dataspot[81][0] = warms[0] = params.locallab.warm;
|
||||||
dataspot[82][0] = noiselumdetails[0] = params.locallab.noiselumdetail;
|
dataspot[82][0] = noiselumdetails[0] = params.locallab.noiselumdetail;
|
||||||
dataspot[83][0] = noisechrodetails[0] = params.locallab.noisechrodetail;
|
dataspot[83][0] = noisechrodetails[0] = params.locallab.noisechrodetail;
|
||||||
|
dataspot[84][0] = sensidens[0] = params.locallab.sensiden;
|
||||||
|
|
||||||
// for all curves work around - I do not know how to do with params curves...
|
// for all curves work around - I do not know how to do with params curves...
|
||||||
//curve Reti local
|
//curve Reti local
|
||||||
@ -1671,6 +1678,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
maxind = 82;
|
maxind = 82;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (versionmip == 10019) {
|
||||||
|
maxind = 83;
|
||||||
|
}
|
||||||
|
|
||||||
while (getline(fich, line)) {
|
while (getline(fich, line)) {
|
||||||
spotline = line;
|
spotline = line;
|
||||||
std::size_t pos = spotline.find("=");
|
std::size_t pos = spotline.find("=");
|
||||||
@ -1904,6 +1915,12 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (versionmip <= 10019) {//
|
||||||
|
for (int sp = 1; sp < maxspot; sp++) { // spots default
|
||||||
|
dataspot[84][sp] = 30;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//here we change the number of spot
|
//here we change the number of spot
|
||||||
|
|
||||||
if (ns < (maxspot - 1)) {
|
if (ns < (maxspot - 1)) {
|
||||||
@ -1912,7 +1929,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
|
|
||||||
for (int sp = ns + 1 ; sp < maxspot; sp++) { // spots default
|
for (int sp = ns + 1 ; sp < maxspot; sp++) { // spots default
|
||||||
int t_sp = sp;
|
int t_sp = sp;
|
||||||
int t_mipversion = 10019;
|
int t_mipversion = 10020;
|
||||||
int t_circrad = 18;
|
int t_circrad = 18;
|
||||||
int t_locX = 250;
|
int t_locX = 250;
|
||||||
int t_locY = 250;
|
int t_locY = 250;
|
||||||
@ -2029,6 +2046,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
int t_noiselumdetail = 0;
|
int t_noiselumdetail = 0;
|
||||||
//10019
|
//10019
|
||||||
int t_noisechrodetail = 0;
|
int t_noisechrodetail = 0;
|
||||||
|
//10020
|
||||||
|
int t_sensiden = 30;
|
||||||
|
|
||||||
fic << "Mipversion=" << t_mipversion << '@' << endl;
|
fic << "Mipversion=" << t_mipversion << '@' << endl;
|
||||||
fic << "Spot=" << t_sp << '@' << endl;
|
fic << "Spot=" << t_sp << '@' << endl;
|
||||||
@ -2120,6 +2139,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
fic << "Warm=" << t_warm << '@' << endl;
|
fic << "Warm=" << t_warm << '@' << endl;
|
||||||
fic << "Noiselumdetail=" << t_noiselumdetail << '@' << endl;
|
fic << "Noiselumdetail=" << t_noiselumdetail << '@' << endl;
|
||||||
fic << "Noisechrodetail=" << t_noisechrodetail << '@' << endl;
|
fic << "Noisechrodetail=" << t_noisechrodetail << '@' << endl;
|
||||||
|
fic << "Sensiden=" << t_sensiden << '@' << endl;
|
||||||
|
|
||||||
fic << "curveReti=" << t_curvret << '@' << endl;
|
fic << "curveReti=" << t_curvret << '@' << endl;
|
||||||
fic << "curveLL=" << t_curvll << '@' << endl;
|
fic << "curveLL=" << t_curvll << '@' << endl;
|
||||||
@ -2221,6 +2241,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
|
|
||||||
//main algorithm for all spots
|
//main algorithm for all spots
|
||||||
for (int sp = 1; sp < maxspot; sp++) { //spots default
|
for (int sp = 1; sp < maxspot; sp++) { //spots default
|
||||||
|
params.locallab.huerefblur = dataspot[maxdata - 5][sp] / 100.;
|
||||||
params.locallab.hueref = dataspot[maxdata - 4][sp] / 100.;
|
params.locallab.hueref = dataspot[maxdata - 4][sp] / 100.;
|
||||||
params.locallab.chromaref = dataspot[maxdata - 3][sp];
|
params.locallab.chromaref = dataspot[maxdata - 3][sp];
|
||||||
params.locallab.lumaref = dataspot[maxdata - 2][sp];
|
params.locallab.lumaref = dataspot[maxdata - 2][sp];
|
||||||
@ -2471,6 +2492,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
params.locallab.warm = warms[sp] = dataspot[81][sp];
|
params.locallab.warm = warms[sp] = dataspot[81][sp];
|
||||||
params.locallab.noiselumdetail = noiselumdetails[sp] = dataspot[82][sp];
|
params.locallab.noiselumdetail = noiselumdetails[sp] = dataspot[82][sp];
|
||||||
params.locallab.noisechrodetail = noisechrodetails[sp] = dataspot[83][sp];
|
params.locallab.noisechrodetail = noisechrodetails[sp] = dataspot[83][sp];
|
||||||
|
params.locallab.sensiden = sensidens[sp] = dataspot[84][sp];
|
||||||
|
|
||||||
|
|
||||||
int *s_datc;
|
int *s_datc;
|
||||||
@ -2681,25 +2703,29 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
lhist16, hltonecurveloc, shtonecurveloc, tonecurveloc,
|
lhist16, hltonecurveloc, shtonecurveloc, tonecurveloc,
|
||||||
sca);
|
sca);
|
||||||
|
|
||||||
double huere, chromare, lumare;
|
double huere, chromare, lumare, huerefblu;
|
||||||
double sobelre;
|
double sobelre;
|
||||||
ipf.calc_ref(nprevl, nprevl, 0, 0, pW, pH, scale, huere, chromare, lumare, sobelre);
|
|
||||||
|
ipf.calc_ref(nprevl, nprevl, 0, 0, pW, pH, scale, huerefblu, huere, chromare, lumare, sobelre);
|
||||||
|
huerblu = huerefblu;
|
||||||
huer = huere;
|
huer = huere;
|
||||||
chromar = chromare;
|
chromar = chromare;
|
||||||
lumar = lumare ;
|
lumar = lumare ;
|
||||||
sobeler = sobelre;
|
sobeler = sobelre;
|
||||||
|
params.locallab.huerefblur = huerblu;
|
||||||
params.locallab.hueref = huer;
|
params.locallab.hueref = huer;
|
||||||
params.locallab.chromaref = chromar;
|
params.locallab.chromaref = chromar;
|
||||||
params.locallab.lumaref = lumar;
|
params.locallab.lumaref = lumar;
|
||||||
params.locallab.sobelref = sobeler;
|
params.locallab.sobelref = sobeler;
|
||||||
|
|
||||||
|
dataspot[maxdata - 5][sp] = huerefblurs[sp] = 100.f * params.locallab.huerefblur;
|
||||||
dataspot[maxdata - 4][sp] = huerefs[sp] = 100.f * params.locallab.hueref;
|
dataspot[maxdata - 4][sp] = huerefs[sp] = 100.f * params.locallab.hueref;
|
||||||
dataspot[maxdata - 3][sp] = chromarefs[sp] = params.locallab.chromaref;
|
dataspot[maxdata - 3][sp] = chromarefs[sp] = params.locallab.chromaref;
|
||||||
dataspot[maxdata - 2][sp] = lumarefs[sp] = params.locallab.lumaref;
|
dataspot[maxdata - 2][sp] = lumarefs[sp] = params.locallab.lumaref;
|
||||||
dataspot[maxdata - 1][sp] = sobelrefs[sp] = params.locallab.sobelref;
|
dataspot[maxdata - 1][sp] = sobelrefs[sp] = params.locallab.sobelref;
|
||||||
//printf("sp=%i huerefsp=%f\n", sp, huerefs[sp]);
|
//printf("sp=%i huerefsp=%f\n", sp, huerefs[sp]);
|
||||||
ipf.Lab_Local(3, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve,
|
ipf.Lab_Local(3, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve,
|
||||||
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, params.locallab.huerefblur, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
||||||
lllocalcurve.clear();
|
lllocalcurve.clear();
|
||||||
cclocalcurve.clear();
|
cclocalcurve.clear();
|
||||||
sklocalcurve.clear();
|
sklocalcurve.clear();
|
||||||
@ -2720,6 +2746,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
params.locallab.huerefblur = INFINITY;
|
||||||
params.locallab.hueref = INFINITY;
|
params.locallab.hueref = INFINITY;
|
||||||
params.locallab.chromaref = INFINITY;
|
params.locallab.chromaref = INFINITY;
|
||||||
params.locallab.lumaref = INFINITY;
|
params.locallab.lumaref = INFINITY;
|
||||||
@ -3014,6 +3041,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
dataspot[81][sp] = warms[sp] = params.locallab.warm = dataspot[81][0];
|
dataspot[81][sp] = warms[sp] = params.locallab.warm = dataspot[81][0];
|
||||||
dataspot[82][sp] = noiselumdetails[sp] = params.locallab.noiselumdetail = dataspot[82][0];
|
dataspot[82][sp] = noiselumdetails[sp] = params.locallab.noiselumdetail = dataspot[82][0];
|
||||||
dataspot[83][sp] = noisechrodetails[sp] = params.locallab.noisechrodetail = dataspot[83][0];
|
dataspot[83][sp] = noisechrodetails[sp] = params.locallab.noisechrodetail = dataspot[83][0];
|
||||||
|
dataspot[84][sp] = sensidens[sp] = params.locallab.sensiden = dataspot[84][0];
|
||||||
|
|
||||||
|
|
||||||
int *s_datc;
|
int *s_datc;
|
||||||
@ -3234,13 +3262,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
CurveFactory::curveskLocal(localskutili, params.locallab.skintonescurve, sklocalcurve, sca);
|
CurveFactory::curveskLocal(localskutili, params.locallab.skintonescurve, sklocalcurve, sca);
|
||||||
CurveFactory::curveexLocal(localexutili, params.locallab.excurve, exlocalcurve, sca);
|
CurveFactory::curveexLocal(localexutili, params.locallab.excurve, exlocalcurve, sca);
|
||||||
|
|
||||||
|
params.locallab.huerefblur = huerefblurs[sp] / 100.;
|
||||||
params.locallab.hueref = huerefs[sp] / 100.;
|
params.locallab.hueref = huerefs[sp] / 100.;
|
||||||
params.locallab.chromaref = chromarefs[sp];
|
params.locallab.chromaref = chromarefs[sp];
|
||||||
params.locallab.lumaref = lumarefs[sp];
|
params.locallab.lumaref = lumarefs[sp];
|
||||||
params.locallab.sobelref = sobelrefs[sp];
|
params.locallab.sobelref = sobelrefs[sp];
|
||||||
|
|
||||||
ipf.Lab_Local(3, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve, LHutili, HHutili, cclocalcurve,
|
ipf.Lab_Local(3, (float**)shbuffer, nprevl, nprevl, reserv, 0, 0, pW, pH, scale, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve, LHutili, HHutili, cclocalcurve,
|
||||||
localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, params.locallab.huerefblur, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
||||||
lllocalcurve.clear();
|
lllocalcurve.clear();
|
||||||
cclocalcurve.clear();
|
cclocalcurve.clear();
|
||||||
sklocalcurve.clear();
|
sklocalcurve.clear();
|
||||||
@ -3255,7 +3283,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
|
|
||||||
for (int spe = 1; spe < maxspot; spe++) {
|
for (int spe = 1; spe < maxspot; spe++) {
|
||||||
int t_sp = spe;
|
int t_sp = spe;
|
||||||
int t_mipversion = 10019;
|
int t_mipversion = 10020;
|
||||||
int t_circrad = dataspot[2][spe];
|
int t_circrad = dataspot[2][spe];
|
||||||
int t_locX = dataspot[3][spe];
|
int t_locX = dataspot[3][spe];
|
||||||
int t_locY = dataspot[4][spe];
|
int t_locY = dataspot[4][spe];
|
||||||
@ -3345,7 +3373,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
int t_warm = dataspot[81][spe];
|
int t_warm = dataspot[81][spe];
|
||||||
int t_noiselumdetail = dataspot[82][spe];
|
int t_noiselumdetail = dataspot[82][spe];
|
||||||
int t_noisechrodetail = dataspot[83][spe];
|
int t_noisechrodetail = dataspot[83][spe];
|
||||||
|
int t_sensiden = dataspot[84][spe];
|
||||||
|
|
||||||
|
int t_huerefblur = dataspot[maxdata - 5][spe];
|
||||||
int t_hueref = dataspot[maxdata - 4][spe];
|
int t_hueref = dataspot[maxdata - 4][spe];
|
||||||
int t_chromaref = dataspot[maxdata - 3][spe];
|
int t_chromaref = dataspot[maxdata - 3][spe];
|
||||||
int t_lumaref = dataspot[maxdata - 2][spe];
|
int t_lumaref = dataspot[maxdata - 2][spe];
|
||||||
@ -3453,7 +3483,9 @@ void ImProcCoordinator::updatePreviewImage(int todo, Crop* cropCall)
|
|||||||
fou << "Warm=" << t_warm << '@' << endl;
|
fou << "Warm=" << t_warm << '@' << endl;
|
||||||
fou << "Noiselumdetail=" << t_noiselumdetail << '@' << endl;
|
fou << "Noiselumdetail=" << t_noiselumdetail << '@' << endl;
|
||||||
fou << "Noisechrodetail=" << t_noisechrodetail << '@' << endl;
|
fou << "Noisechrodetail=" << t_noisechrodetail << '@' << endl;
|
||||||
|
fou << "Sensiden=" << t_sensiden << '@' << endl;
|
||||||
|
|
||||||
|
fou << "huerefblur=" << t_huerefblur << '@' << endl;
|
||||||
fou << "hueref=" << t_hueref << '@' << endl;
|
fou << "hueref=" << t_hueref << '@' << endl;
|
||||||
fou << "chromaref=" << t_chromaref << '@' << endl;
|
fou << "chromaref=" << t_chromaref << '@' << endl;
|
||||||
fou << "lumaref=" << t_lumaref << '@' << endl;
|
fou << "lumaref=" << t_lumaref << '@' << endl;
|
||||||
|
@ -308,6 +308,7 @@ protected:
|
|||||||
LUTi noiselumcs;
|
LUTi noiselumcs;
|
||||||
LUTi noiselumdetails;
|
LUTi noiselumdetails;
|
||||||
LUTi noisechrodetails;
|
LUTi noisechrodetails;
|
||||||
|
LUTi sensidens;
|
||||||
LUTi noisechrofs;
|
LUTi noisechrofs;
|
||||||
LUTi noisechrocs;
|
LUTi noisechrocs;
|
||||||
LUTi mult0s;
|
LUTi mult0s;
|
||||||
@ -358,11 +359,12 @@ protected:
|
|||||||
LUTi warms;
|
LUTi warms;
|
||||||
|
|
||||||
LUTf huerefs;
|
LUTf huerefs;
|
||||||
|
LUTf huerefblurs;
|
||||||
LUTf chromarefs;
|
LUTf chromarefs;
|
||||||
LUTf lumarefs;
|
LUTf lumarefs;
|
||||||
LUTf sobelrefs;
|
LUTf sobelrefs;
|
||||||
|
|
||||||
double huer, chromar, lumar, sobeler;
|
double huer, huerblu, chromar, lumar, sobeler;
|
||||||
void startProcessing();
|
void startProcessing();
|
||||||
void process();
|
void process();
|
||||||
float colourToningSatLimit;
|
float colourToningSatLimit;
|
||||||
|
@ -292,10 +292,10 @@ public:
|
|||||||
//locallab
|
//locallab
|
||||||
void MSRLocal(float** luminance, float** templ, const float* const *originalLuminance, const int width, const int height, const LocallabParams &loc, const int skip, const LocretigainCurve &locRETgainCcurve, const int chrome, const int scall, const float krad, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax);
|
void MSRLocal(float** luminance, float** templ, const float* const *originalLuminance, const int width, const int height, const LocallabParams &loc, const int skip, const LocretigainCurve &locRETgainCcurve, const int chrome, const int scall, const float krad, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax);
|
||||||
// void calc_ref (LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huere, double &chromare, double &lumare, double &sobelref);
|
// void calc_ref (LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huere, double &chromare, double &lumare, double &sobelref);
|
||||||
void calc_ref(LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huere, double &chromare, double &lumare, double &sobelref);
|
void calc_ref(LabImage* original, LabImage* transformed, int cx, int cy, int oW, int oH, int sk, double &huerefblur, double &huere, double &chromare, double &lumare, double &sobelref);
|
||||||
void copy_ref(LabImage* spotbuffer, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp, double &huerefspot, double &chromarefspot, double &lumarefspot);
|
void copy_ref(LabImage* spotbuffer, LabImage* original, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp, double &huerefspot, double &chromarefspot, double &lumarefspot);
|
||||||
void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp);
|
void paste_ref(LabImage* spotbuffer, LabImage* transformed, int cx, int cy, int sk, const struct local_params & lp);
|
||||||
void Lab_Local(int call, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, double &hueref, double &chromaref, double &lumaref, double &sobelref);
|
void Lab_Local(int call, float** shbuffer, LabImage* original, LabImage* transformed, LabImage* reserved, int cx, int cy, int oW, int oH, int sk, const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, bool &LHutili, bool &HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, double & huerefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref);
|
||||||
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
|
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
|
||||||
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
|
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
|
||||||
void InverseBlurNoise_Local(const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
|
void InverseBlurNoise_Local(const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
|
||||||
@ -313,12 +313,13 @@ public:
|
|||||||
void exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve);
|
void exlabLocal(const local_params& lp, int bfh, int bfw, LabImage* bufexporig, LabImage* lab, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve);
|
||||||
void Exclude_Local(int sen, float **deltaso, float **buflight, float **bufchro, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, LabImage * rsv, int cx, int cy);
|
void Exclude_Local(int sen, float **deltaso, float **buflight, float **bufchro, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, LabImage * rsv, int cx, int cy);
|
||||||
|
|
||||||
void DeNoise_Local(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy);
|
//void DeNoise_Local(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy);
|
||||||
// void ColorLight_Local(int call, LabImage * bufcolorig, float **buflight, float **bufchro, float **bufchroslid, float ** bufhh, float ** buflightslid, bool &LHutili, bool &HHutili, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
// void ColorLight_Local(int call, LabImage * bufcolorig, float **buflight, float **bufchro, float **bufchroslid, float ** bufhh, float ** buflightslid, bool &LHutili, bool &HHutili, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
||||||
|
void DeNoise_Local(int call, const struct local_params& lp, int levred, float hueplus, float huemoins, float hueref, float dhueden, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy);
|
||||||
|
|
||||||
void ColorLight_Local(int call, LabImage * bufcolorig, float **buflight, float **bufchro, float **bufchroslid, float ** bufhh, float ** buflightslid, bool &LHutili, bool &HHutili, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
void ColorLight_Local(int call, LabImage * bufcolorig, float **buflight, float **bufchro, float **bufchroslid, float ** bufhh, float ** buflightslid, bool &LHutili, bool &HHutili, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
||||||
void InverseColorLight_Local(const struct local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref);
|
void InverseColorLight_Local(const struct local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref);
|
||||||
void cat02_Local(float **buflightcat, float **buf_a_cat, float ** buf_b_cat, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy);
|
void cat02_Local(float **buflightcat, float **buf_a_cat, float ** buf_b_cat, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy);
|
||||||
|
|
||||||
void Sharp_Local(int call, float **loctemp, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
void Sharp_Local(int call, float **loctemp, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
||||||
void InverseSharp_Local(float **loctemp, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
void InverseSharp_Local(float **loctemp, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const local_params& lp, LabImage* original, LabImage* transformed, int cx, int cy);
|
||||||
|
@ -125,7 +125,7 @@ struct local_params {
|
|||||||
int cir;
|
int cir;
|
||||||
float thr;
|
float thr;
|
||||||
int prox;
|
int prox;
|
||||||
int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu;
|
int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden;
|
||||||
float ligh;
|
float ligh;
|
||||||
int shamo, shdamp, shiter, senssha, sensv;
|
int shamo, shdamp, shiter, senssha, sensv;
|
||||||
double shrad;
|
double shrad;
|
||||||
@ -381,6 +381,8 @@ static void calcLocalParams(int oW, int oH, const LocallabParams& locallab, stru
|
|||||||
float local_noiselc = locallab.noiselumc;
|
float local_noiselc = locallab.noiselumc;
|
||||||
float local_noiseldetail = locallab.noiselumdetail;
|
float local_noiseldetail = locallab.noiselumdetail;
|
||||||
float local_noisechrodetail = locallab.noisechrodetail;
|
float local_noisechrodetail = locallab.noisechrodetail;
|
||||||
|
int local_sensiden = locallab.sensiden;
|
||||||
|
|
||||||
float local_noisecf = locallab.noisechrof;
|
float local_noisecf = locallab.noisechrof;
|
||||||
float local_noisecc = locallab.noisechroc;
|
float local_noisecc = locallab.noisechroc;
|
||||||
float multi[5];
|
float multi[5];
|
||||||
@ -468,6 +470,7 @@ static void calcLocalParams(int oW, int oH, const LocallabParams& locallab, stru
|
|||||||
lp.noiselc = local_noiselc;
|
lp.noiselc = local_noiselc;
|
||||||
lp.noisecf = local_noisecf;
|
lp.noisecf = local_noisecf;
|
||||||
lp.noisecc = local_noisecc;
|
lp.noisecc = local_noisecc;
|
||||||
|
lp.sensden = local_sensiden;
|
||||||
|
|
||||||
|
|
||||||
lp.strengt = streng;
|
lp.strengt = streng;
|
||||||
@ -1861,99 +1864,240 @@ void ImProcFunctions::addGaNoise(LabImage *lab, LabImage *dst, const float mean,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy)
|
void ImProcFunctions::DeNoise_Local(int call, const struct local_params& lp, int levred, float hueplus, float huemoins, float hueref, float dhueden, LabImage* original, LabImage* transformed, const LabImage &tmp1, int cx, int cy)
|
||||||
{
|
{
|
||||||
// local denoise
|
// local denoise
|
||||||
//simple algo , perhaps we can improve as the others, but noise is here and not good for hue detection
|
//simple algo , perhaps we can improve as the others, but noise is here and not good for hue detection
|
||||||
// BENCHFUN
|
// BENCHFUN
|
||||||
const float ach = (float)lp.trans / 100.f;
|
const float ach = (float)lp.trans / 100.f;
|
||||||
|
constexpr float delhu = 0.1f; //between 0.05 and 0.2
|
||||||
|
|
||||||
#pragma omp parallel for schedule(dynamic,16) if (multiThread)
|
|
||||||
|
|
||||||
for (int y = 0; y < transformed->H; y++) {
|
float factnoise1 = 1.f + (lp.noisecf) / 500.f;
|
||||||
const int loy = cy + y;
|
float factnoise2 = 1.f + (lp.noisecc) / 500.f;
|
||||||
const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing
|
|
||||||
float factnoise1 = 1.f + (lp.noisecf) / 200.f;
|
|
||||||
float factnoise2 = 1.f + (lp.noisecc) / 100.f;
|
|
||||||
|
|
||||||
if (isZone0) { // outside selection and outside transition zone => no effect, keep original values
|
constexpr float apl = (-1.f) / delhu;
|
||||||
for (int x = 0; x < transformed->W; x++) {
|
const float bpl = - apl * hueplus;
|
||||||
transformed->L[y][x] = original->L[y][x];
|
constexpr float amo = 1.f / delhu;
|
||||||
transformed->a[y][x] = original->a[y][x];
|
const float bmo = - amo * huemoins;
|
||||||
transformed->b[y][x] = original->b[y][x];
|
/*
|
||||||
}
|
constexpr float pb = 4.f;
|
||||||
|
constexpr float pa = (1.f - pb) / 40.f;
|
||||||
|
*/
|
||||||
|
int GW = transformed->W;
|
||||||
|
int GH = transformed->H;
|
||||||
|
|
||||||
continue;
|
LabImage *origblur = nullptr;
|
||||||
}
|
|
||||||
|
|
||||||
for (int x = 0; x < transformed->W; x++) {
|
origblur = new LabImage(GW, GH);
|
||||||
int lox = cx + x;
|
|
||||||
|
|
||||||
int zone;
|
float radius = 2.f;
|
||||||
float localFactor;
|
#ifdef _OPENMP
|
||||||
calcTransition(lox, loy, ach, lp, zone, localFactor);
|
#pragma omp parallel
|
||||||
int begx = int (lp.xc - lp.lxL);
|
#endif
|
||||||
int begy = int (lp.yc - lp.lyT);
|
{
|
||||||
|
gaussianBlur(original->L, origblur->L, GW, GH, radius);
|
||||||
|
gaussianBlur(original->a, origblur->a, GW, GH, radius);
|
||||||
|
gaussianBlur(original->b, origblur->b, GW, GH, radius);
|
||||||
|
|
||||||
switch (zone) {
|
}
|
||||||
case 0: { // outside selection and outside transition zone => no effect, keep original values
|
|
||||||
|
/*
|
||||||
|
const float ahu = 1.f / (2.8f * lp.sensden - 280.f);
|
||||||
|
const float bhu = 1.f - ahu * 2.8f * lp.sensden;
|
||||||
|
*/
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp parallel if (multiThread)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
#ifdef __SSE2__
|
||||||
|
float atan2Buffer[transformed->W] ALIGNED16;
|
||||||
|
float sqrtBuffer[transformed->W] ALIGNED16;
|
||||||
|
vfloat c327d68v = F2V(327.68f);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp for schedule(dynamic,16)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (int y = 0; y < transformed->H; y++) {
|
||||||
|
const int loy = cy + y;
|
||||||
|
|
||||||
|
const bool isZone0 = loy > lp.yc + lp.ly || loy < lp.yc - lp.lyT; // whole line is zone 0 => we can skip a lot of processing
|
||||||
|
|
||||||
|
if (isZone0) { // outside selection and outside transition zone => no effect, keep original values
|
||||||
|
for (int x = 0; x < transformed->W; x++) {
|
||||||
transformed->L[y][x] = original->L[y][x];
|
transformed->L[y][x] = original->L[y][x];
|
||||||
transformed->a[y][x] = original->a[y][x];
|
transformed->a[y][x] = original->a[y][x];
|
||||||
transformed->b[y][x] = original->b[y][x];
|
transformed->b[y][x] = original->b[y][x];
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 1: { // inside transition zone
|
continue;
|
||||||
float factorx = localFactor;
|
}
|
||||||
float difL, difa, difb;
|
|
||||||
|
|
||||||
if (call == 2) { //simpleprocess
|
#ifdef __SSE2__
|
||||||
difL = tmp1.L[loy - begy][lox - begx] - original->L[y][x];
|
int i = 0;
|
||||||
difa = tmp1.a[loy - begy][lox - begx] - original->a[y][x];
|
|
||||||
difb = tmp1.b[loy - begy][lox - begx] - original->b[y][x];
|
for (; i < transformed->W - 3; i += 4) {
|
||||||
} else { //dcrop
|
vfloat av = LVFU(origblur->a[y][i]);
|
||||||
difL = tmp1.L[y][x] - original->L[y][x];
|
vfloat bv = LVFU(origblur->b[y][i]);
|
||||||
difa = tmp1.a[y][x] - original->a[y][x];
|
STVF(atan2Buffer[i], xatan2f(bv, av));
|
||||||
difb = tmp1.b[y][x] - original->b[y][x];
|
STVF(sqrtBuffer[i], _mm_sqrt_ps(SQRV(bv) + SQRV(av)) / c327d68v);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; i < transformed->W; i++) {
|
||||||
|
atan2Buffer[i] = xatan2f(origblur->b[y][i], origblur->a[y][i]);
|
||||||
|
sqrtBuffer[i] = sqrt(SQR(origblur->b[y][i]) + SQR(origblur->a[y][i])) / 327.68f;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
for (int x = 0, lox = cx + x; x < transformed->W; x++, lox++) {
|
||||||
|
int zone = 0;
|
||||||
|
// int lox = cx + x;
|
||||||
|
int begx = int (lp.xc - lp.lxL);
|
||||||
|
int begy = int (lp.yc - lp.lyT);
|
||||||
|
|
||||||
|
float localFactor = 1.f;
|
||||||
|
calcTransition(lox, loy, ach, lp, zone, localFactor);
|
||||||
|
|
||||||
|
if (zone == 0) { // outside selection and outside transition zone => no effect, keep original values
|
||||||
|
transformed->L[y][x] = original->L[y][x];
|
||||||
|
transformed->a[y][x] = original->a[y][x];
|
||||||
|
transformed->b[y][x] = original->b[y][x];
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __SSE2__
|
||||||
|
const float rhue = atan2Buffer[x];
|
||||||
|
// const float rchro = sqrtBuffer[x];
|
||||||
|
#else
|
||||||
|
const float rhue = xatan2f(origblur->b[y][x], origblur->a[y][x]);
|
||||||
|
// const float rchro = sqrt(SQR(origblur->b[y][x]) + SQR(origblur->a[y][x])) / 327.68f;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// float rL = original->L[y][x] / 327.68f;
|
||||||
|
|
||||||
|
float khu = 0.f;
|
||||||
|
// bool kzon = false;
|
||||||
|
|
||||||
|
// algo with detection of hue ==> artifacts for noisy images ==> denoise before
|
||||||
|
if (levred == 7 && lp.sensden < 90.f) { // after 90 plein effect
|
||||||
|
//hue detection
|
||||||
|
if ((hueref + dhueden) < rtengine::RT_PI && rhue < hueplus && rhue > huemoins) { //transition are good
|
||||||
|
if (rhue >= hueplus - delhu) {
|
||||||
|
khu = apl * rhue + bpl;
|
||||||
|
} else if (rhue < huemoins + delhu) {
|
||||||
|
khu = amo * rhue + bmo;
|
||||||
|
} else {
|
||||||
|
khu = 1.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// kzon = true;
|
||||||
|
|
||||||
|
} else if ((hueref + dhueden) >= rtengine::RT_PI && (rhue > huemoins || rhue < hueplus)) {
|
||||||
|
if (rhue >= hueplus - delhu && rhue < hueplus) {
|
||||||
|
khu = apl * rhue + bpl;
|
||||||
|
} else if (rhue >= huemoins && rhue < huemoins + delhu) {
|
||||||
|
khu = amo * rhue + bmo;
|
||||||
|
} else {
|
||||||
|
khu = 1.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// kzon = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
difL *= factorx;
|
if ((hueref - dhueden) > -rtengine::RT_PI && rhue < hueplus && rhue > huemoins) {
|
||||||
difa *= factorx;
|
if (rhue >= hueplus - delhu && rhue < hueplus) {
|
||||||
difb *= factorx ;
|
khu = apl * rhue + bpl;
|
||||||
transformed->L[y][x] = original->L[y][x] + difL;
|
} else if (rhue >= huemoins && rhue < huemoins + delhu) {
|
||||||
transformed->a[y][x] = (original->a[y][x] + difa) * factnoise1 * factnoise2;
|
khu = amo * rhue + bmo;
|
||||||
transformed->b[y][x] = (original->b[y][x] + difb) * factnoise1 * factnoise2 ;
|
} else {
|
||||||
break;
|
khu = 1.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
case 2: { // inside selection => full effect, no transition
|
// kzon = true;
|
||||||
float difL, difa, difb;
|
|
||||||
|
|
||||||
if (call == 2) { //simpleprocess
|
} else if ((hueref - dhueden) <= -rtengine::RT_PI && (rhue > huemoins || rhue < hueplus)) {
|
||||||
difL = tmp1.L[loy - begy][lox - begx] - original->L[y][x];
|
if (rhue >= hueplus - delhu && rhue < hueplus) {
|
||||||
difa = tmp1.a[loy - begy][lox - begx] - original->a[y][x];
|
khu = apl * rhue + bpl;
|
||||||
difb = tmp1.b[loy - begy][lox - begx] - original->b[y][x];
|
} else if (rhue >= huemoins && rhue < huemoins + delhu) {
|
||||||
} else { //dcrop
|
khu = amo * rhue + bmo;
|
||||||
difL = tmp1.L[y][x] - original->L[y][x];
|
} else {
|
||||||
difa = tmp1.a[y][x] - original->a[y][x];
|
khu = 1.f;
|
||||||
difb = tmp1.b[y][x] - original->b[y][x];
|
}
|
||||||
|
|
||||||
|
// kzon = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
transformed->L[y][x] = original->L[y][x] + difL;
|
khu = 1.f;
|
||||||
transformed->a[y][x] = (original->a[y][x] + difa) * factnoise1 * factnoise2;
|
|
||||||
transformed->b[y][x] = (original->b[y][x] + difb) * factnoise1 * factnoise2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch (zone) {
|
||||||
|
case 0: { // outside selection and outside transition zone => no effect, keep original values
|
||||||
|
transformed->L[y][x] = original->L[y][x];
|
||||||
|
transformed->a[y][x] = original->a[y][x];
|
||||||
|
transformed->b[y][x] = original->b[y][x];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 1: { // inside transition zone
|
||||||
|
float factorx = localFactor;
|
||||||
|
float difL, difa, difb;
|
||||||
|
|
||||||
|
if (call == 2) { //simpleprocess
|
||||||
|
difL = tmp1.L[loy - begy][lox - begx] - original->L[y][x];
|
||||||
|
difa = tmp1.a[loy - begy][lox - begx] - original->a[y][x];
|
||||||
|
difb = tmp1.b[loy - begy][lox - begx] - original->b[y][x];
|
||||||
|
} else { //dcrop
|
||||||
|
difL = tmp1.L[y][x] - original->L[y][x];
|
||||||
|
difa = tmp1.a[y][x] - original->a[y][x];
|
||||||
|
difb = tmp1.b[y][x] - original->b[y][x];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
difL *= factorx * khu;
|
||||||
|
difa *= factorx * khu;
|
||||||
|
difb *= factorx * khu;
|
||||||
|
transformed->L[y][x] = original->L[y][x] + difL;
|
||||||
|
transformed->a[y][x] = (original->a[y][x] + difa) * factnoise1 * factnoise2;
|
||||||
|
transformed->b[y][x] = (original->b[y][x] + difb) * factnoise1 * factnoise2 ;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case 2: { // inside selection => full effect, no transition
|
||||||
|
float difL, difa, difb;
|
||||||
|
|
||||||
|
if (call == 2) { //simpleprocess
|
||||||
|
difL = tmp1.L[loy - begy][lox - begx] - original->L[y][x];
|
||||||
|
difa = tmp1.a[loy - begy][lox - begx] - original->a[y][x];
|
||||||
|
difb = tmp1.b[loy - begy][lox - begx] - original->b[y][x];
|
||||||
|
} else { //dcrop
|
||||||
|
difL = tmp1.L[y][x] - original->L[y][x];
|
||||||
|
difa = tmp1.a[y][x] - original->a[y][x];
|
||||||
|
difb = tmp1.b[y][x] - original->b[y][x];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
difL *= khu;
|
||||||
|
difa *= khu;
|
||||||
|
difb *= khu;
|
||||||
|
|
||||||
|
transformed->L[y][x] = original->L[y][x] + difL;
|
||||||
|
transformed->a[y][x] = (original->a[y][x] + difa) * factnoise1 * factnoise2;
|
||||||
|
transformed->b[y][x] = (original->b[y][x] + difb) * factnoise1 * factnoise2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
delete origblur;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ImProcFunctions::cat02_Local(float **buflightcat, float **buf_a_cat, float ** buf_b_cat, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy)
|
void ImProcFunctions::cat02_Local(float **buflightcat, float **buf_a_cat, float ** buf_b_cat, const float hueplus, const float huemoins, const float hueref, const float dhue, const float chromaref, const float lumaref, const struct local_params & lp, LabImage * original, LabImage * transformed, const LabImage * const tmp1, int cx, int cy)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -6271,6 +6415,8 @@ void ImProcFunctions::ColorLight_Local(int call, LabImage * bufcolorig, float **
|
|||||||
kzon = true;
|
kzon = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//printf("khu=%f ", khu);
|
||||||
|
|
||||||
// realhh = hhro;
|
// realhh = hhro;
|
||||||
|
|
||||||
//detection of deltaE and deltaL
|
//detection of deltaE and deltaL
|
||||||
@ -7153,7 +7299,7 @@ void ImProcFunctions::InverseColorLight_Local(const struct local_params & lp, La
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImProcFunctions::calc_ref(LabImage * original, LabImage * transformed, int cx, int cy, int oW, int oH, int sk, double & hueref, double & chromaref, double & lumaref, double & sobelref)
|
void ImProcFunctions::calc_ref(LabImage * original, LabImage * transformed, int cx, int cy, int oW, int oH, int sk, double & huerefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref)
|
||||||
{
|
{
|
||||||
if (params->locallab.enabled) {
|
if (params->locallab.enabled) {
|
||||||
//always calculate hueref, chromaref, lumaref before others operations use in normal mode for all modules exceprt denoise
|
//always calculate hueref, chromaref, lumaref before others operations use in normal mode for all modules exceprt denoise
|
||||||
@ -7165,10 +7311,15 @@ void ImProcFunctions::calc_ref(LabImage * original, LabImage * transformed, int
|
|||||||
double aveB = 0.;
|
double aveB = 0.;
|
||||||
double aveL = 0.;
|
double aveL = 0.;
|
||||||
double aveChro = 0.;
|
double aveChro = 0.;
|
||||||
|
double aveAblur = 0.;
|
||||||
|
double aveBblur = 0.;
|
||||||
|
float avAblur, avBblur;
|
||||||
|
|
||||||
double avesobel = 0.;
|
double avesobel = 0.;
|
||||||
// int precision for the counters
|
// int precision for the counters
|
||||||
int nab = 0;
|
int nab = 0;
|
||||||
int nso = 0;
|
int nso = 0;
|
||||||
|
int nsb = 0;
|
||||||
// single precision for the result
|
// single precision for the result
|
||||||
float avA, avB, avL;
|
float avA, avB, avL;
|
||||||
int spotSize = 0.88623f * max(1, lp.cir / sk); //18
|
int spotSize = 0.88623f * max(1, lp.cir / sk); //18
|
||||||
@ -7182,6 +7333,9 @@ void ImProcFunctions::calc_ref(LabImage * original, LabImage * transformed, int
|
|||||||
LabImage *sobelL;
|
LabImage *sobelL;
|
||||||
LabImage *deltasobelL;
|
LabImage *deltasobelL;
|
||||||
LabImage *origsob;
|
LabImage *origsob;
|
||||||
|
LabImage *origblur = nullptr;
|
||||||
|
LabImage *blurorig = nullptr;
|
||||||
|
|
||||||
int spotSi = 1 + 2 * max(1, lp.cir / sk);
|
int spotSi = 1 + 2 * max(1, lp.cir / sk);
|
||||||
|
|
||||||
if (spotSi < 5) {
|
if (spotSi < 5) {
|
||||||
@ -7189,9 +7343,54 @@ void ImProcFunctions::calc_ref(LabImage * original, LabImage * transformed, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
spotSise2 = (spotSi - 1) / 2;
|
spotSise2 = (spotSi - 1) / 2;
|
||||||
|
|
||||||
|
|
||||||
origsob = new LabImage(spotSi, spotSi);
|
origsob = new LabImage(spotSi, spotSi);
|
||||||
sobelL = new LabImage(spotSi, spotSi);
|
sobelL = new LabImage(spotSi, spotSi);
|
||||||
deltasobelL = new LabImage(spotSi, spotSi);
|
deltasobelL = new LabImage(spotSi, spotSi);
|
||||||
|
bool isdenoise = false;
|
||||||
|
|
||||||
|
if ((lp.noiself > 0.f || lp.noiselc > 0.f || lp.noisecf > 0.f || lp.noisecc > 0.f) && lp.denoiena) {
|
||||||
|
isdenoise = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isdenoise) {
|
||||||
|
origblur = new LabImage(spotSi, spotSi);
|
||||||
|
blurorig = new LabImage(spotSi, spotSi);
|
||||||
|
|
||||||
|
for (int y = max(cy, (int)(lp.yc - spotSise2)); y < min(transformed->H + cy, (int)(lp.yc + spotSise2 + 1)); y++) {
|
||||||
|
for (int x = max(cx, (int)(lp.xc - spotSise2)); x < min(transformed->W + cx, (int)(lp.xc + spotSise2 + 1)); x++) {
|
||||||
|
int yb = max(cy, (int)(lp.yc - spotSise2));
|
||||||
|
|
||||||
|
int xb = max(cx, (int)(lp.xc - spotSise2));
|
||||||
|
|
||||||
|
int z = y - yb;
|
||||||
|
int u = x - xb;
|
||||||
|
origblur->L[z][u] = original->L[y - cy][x - cx];
|
||||||
|
origblur->a[z][u] = original->a[y - cy][x - cx];
|
||||||
|
origblur->b[z][u] = original->b[y - cy][x - cx];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float radius = 2.f;
|
||||||
|
{
|
||||||
|
//No omp
|
||||||
|
gaussianBlur(origblur->L, blurorig->L, spotSi, spotSi, radius);
|
||||||
|
gaussianBlur(origblur->a, blurorig->a, spotSi, spotSi, radius);
|
||||||
|
gaussianBlur(origblur->b, blurorig->b, spotSi, spotSi, radius);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int y = 0; y < spotSi; y++) {
|
||||||
|
for (int x = 0; x < spotSi; x++) {
|
||||||
|
aveAblur += blurorig->a[y][x];
|
||||||
|
aveBblur += blurorig->b[y][x];
|
||||||
|
nsb++;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//ref for luma, chroma, hue
|
//ref for luma, chroma, hue
|
||||||
for (int y = max(cy, (int)(lp.yc - spotSize)); y < min(transformed->H + cy, (int)(lp.yc + spotSize + 1)); y++) {
|
for (int y = max(cy, (int)(lp.yc - spotSize)); y < min(transformed->H + cy, (int)(lp.yc + spotSize + 1)); y++) {
|
||||||
@ -7250,9 +7449,30 @@ void ImProcFunctions::calc_ref(LabImage * original, LabImage * transformed, int
|
|||||||
avB = aveB / 327.68f;
|
avB = aveB / 327.68f;
|
||||||
avL = aveL / 327.68f;
|
avL = aveL / 327.68f;
|
||||||
hueref = xatan2f(avB, avA); //mean hue
|
hueref = xatan2f(avB, avA); //mean hue
|
||||||
|
|
||||||
|
if (isdenoise) {
|
||||||
|
|
||||||
|
aveAblur = aveAblur / nsb;
|
||||||
|
aveBblur = aveBblur / nsb;
|
||||||
|
avAblur = aveAblur / 327.68f;
|
||||||
|
avBblur = aveBblur / 327.68f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isdenoise) {
|
||||||
|
huerefblur = xatan2f(avBblur, avAblur);
|
||||||
|
} else {
|
||||||
|
huerefblur = 0.f;
|
||||||
|
}
|
||||||
|
|
||||||
|
// printf("hueblur=%f hue=%f\n", huerefblur, hueref);
|
||||||
chromaref = aveChro;
|
chromaref = aveChro;
|
||||||
lumaref = avL;
|
lumaref = avL;
|
||||||
|
|
||||||
|
if (isdenoise) {
|
||||||
|
delete origblur;
|
||||||
|
delete blurorig;
|
||||||
|
}
|
||||||
|
|
||||||
if (lumaref > 95.f) {//to avoid crash
|
if (lumaref > 95.f) {//to avoid crash
|
||||||
lumaref = 95.f;
|
lumaref = 95.f;
|
||||||
}
|
}
|
||||||
@ -7352,7 +7572,7 @@ void ImProcFunctions::paste_ref(LabImage * spotbuffer, LabImage * transformed, i
|
|||||||
|
|
||||||
void ImProcFunctions::Lab_Local(int call, float** shbuffer, LabImage * original, LabImage * transformed, LabImage * reserved, int cx, int cy, int oW, int oH, int sk,
|
void ImProcFunctions::Lab_Local(int call, float** shbuffer, LabImage * original, LabImage * transformed, LabImage * reserved, int cx, int cy, int oW, int oH, int sk,
|
||||||
const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve,
|
const LocretigainCurve & locRETgainCcurve, LUTf & lllocalcurve, const LocLHCurve & loclhCurve, const LocHHCurve & lochhCurve,
|
||||||
bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, double & hueref, double & chromaref, double & lumaref, double & sobelref)
|
bool & LHutili, bool & HHutili, LUTf & cclocalcurve, bool & localskutili, LUTf & sklocalcurve, bool & localexutili, LUTf & exlocalcurve, LUTf & hltonecurveloc, LUTf & shtonecurveloc, LUTf & tonecurveloc, double & huerefblur, double & hueref, double & chromaref, double & lumaref, double & sobelref)
|
||||||
{
|
{
|
||||||
//general call of others functions : important return hueref, chromaref, lumaref
|
//general call of others functions : important return hueref, chromaref, lumaref
|
||||||
if (params->locallab.enabled) {
|
if (params->locallab.enabled) {
|
||||||
@ -7438,8 +7658,7 @@ void ImProcFunctions::Lab_Local(int call, float** shbuffer, LabImage * original,
|
|||||||
constexpr float ared = (rtengine::RT_PI - 0.05f) / 100.f;
|
constexpr float ared = (rtengine::RT_PI - 0.05f) / 100.f;
|
||||||
|
|
||||||
constexpr float bred = 0.05f;
|
constexpr float bred = 0.05f;
|
||||||
|
float dhue = ared * lp.sens + bred; //delta hue vibr
|
||||||
float dhue = ared * lp.sens + bred; //delta hue lght chroma
|
|
||||||
|
|
||||||
float dhuev = ared * lp.sensv + bred; //delta hue vibr
|
float dhuev = ared * lp.sensv + bred; //delta hue vibr
|
||||||
|
|
||||||
@ -7457,6 +7676,9 @@ void ImProcFunctions::Lab_Local(int call, float** shbuffer, LabImage * original,
|
|||||||
|
|
||||||
float dhueexclu = ared * lp.sensexclu + bred; //delta hue exclude
|
float dhueexclu = ared * lp.sensexclu + bred; //delta hue exclude
|
||||||
|
|
||||||
|
float dhueden = ared * lp.sensden + bred; //delta hue lght chroma
|
||||||
|
|
||||||
|
|
||||||
constexpr float maxh = 3.5f; // 3.5 amplification contrast above mean
|
constexpr float maxh = 3.5f; // 3.5 amplification contrast above mean
|
||||||
|
|
||||||
constexpr float maxl = 2.5f; // 3 reductio contrast under mean
|
constexpr float maxl = 2.5f; // 3 reductio contrast under mean
|
||||||
@ -8499,6 +8721,17 @@ void ImProcFunctions::Lab_Local(int call, float** shbuffer, LabImage * original,
|
|||||||
levred = 7;
|
levred = 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float hueplus = huerefblur + dhueden;
|
||||||
|
float huemoins = huerefblur - dhueden;
|
||||||
|
|
||||||
|
if (hueplus > rtengine::RT_PI) {
|
||||||
|
hueplus = huerefblur + dhueden - 2.f * rtengine::RT_PI;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (huemoins < -rtengine::RT_PI) {
|
||||||
|
huemoins = huerefblur - dhueden + 2.f * rtengine::RT_PI;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
const int numThreads = omp_get_max_threads();
|
const int numThreads = omp_get_max_threads();
|
||||||
#else
|
#else
|
||||||
@ -9373,8 +9606,8 @@ void ImProcFunctions::Lab_Local(int call, float** shbuffer, LabImage * original,
|
|||||||
|
|
||||||
fftwf_cleanup();
|
fftwf_cleanup();
|
||||||
|
|
||||||
|
// printf("huere=%f dhueden=%f huplus=%f huemoin=%f\n", hueref, dhueden, hueplus, huemoins);
|
||||||
DeNoise_Local(call, lp, original, transformed, tmp1, cx, cy);
|
DeNoise_Local(call, lp, levred, hueplus, huemoins, huerefblur, dhueden, original, transformed, tmp1, cx, cy);
|
||||||
|
|
||||||
} else if (call == 2) { //simpleprocess
|
} else if (call == 2) { //simpleprocess
|
||||||
|
|
||||||
@ -10250,7 +10483,7 @@ void ImProcFunctions::Lab_Local(int call, float** shbuffer, LabImage * original,
|
|||||||
|
|
||||||
fftwf_cleanup();
|
fftwf_cleanup();
|
||||||
|
|
||||||
DeNoise_Local(call, lp, original, transformed, bufwv, cx, cy);
|
DeNoise_Local(call, lp, levred, hueplus, huemoins, huerefblur, dhueden, original, transformed, bufwv, cx, cy);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -621,6 +621,8 @@ enum ProcEvent {
|
|||||||
Evlocallabwarm = 591,
|
Evlocallabwarm = 591,
|
||||||
Evlocallabnoiselumdetail = 592,
|
Evlocallabnoiselumdetail = 592,
|
||||||
Evlocallabnoisechrodetail = 593,
|
Evlocallabnoisechrodetail = 593,
|
||||||
|
Evlocallabsensiden = 594,
|
||||||
|
Evlocallabhuerefblur = 595,
|
||||||
|
|
||||||
NUMOFEVENTS
|
NUMOFEVENTS
|
||||||
|
|
||||||
|
@ -2376,6 +2376,7 @@ noiselumf(0),
|
|||||||
noiselumc(0),
|
noiselumc(0),
|
||||||
noiselumdetail(0),
|
noiselumdetail(0),
|
||||||
noisechrodetail(0),
|
noisechrodetail(0),
|
||||||
|
sensiden(30),
|
||||||
noisechrof(0),
|
noisechrof(0),
|
||||||
noisechroc(0),
|
noisechroc(0),
|
||||||
sharradius(40),
|
sharradius(40),
|
||||||
@ -2415,6 +2416,7 @@ inversrad(false),
|
|||||||
inversret(false),
|
inversret(false),
|
||||||
inverssha(false),
|
inverssha(false),
|
||||||
hueref(1.),
|
hueref(1.),
|
||||||
|
huerefblur(1.),
|
||||||
chromaref(50.),
|
chromaref(50.),
|
||||||
lumaref(50.),
|
lumaref(50.),
|
||||||
sobelref(0.),
|
sobelref(0.),
|
||||||
@ -2510,6 +2512,7 @@ bool LocallabParams::operator ==(const LocallabParams& other) const
|
|||||||
&& noiselumc == other.noiselumc
|
&& noiselumc == other.noiselumc
|
||||||
&& noiselumdetail == other.noiselumdetail
|
&& noiselumdetail == other.noiselumdetail
|
||||||
&& noisechrodetail == other.noisechrodetail
|
&& noisechrodetail == other.noisechrodetail
|
||||||
|
&& sensiden == other.sensiden
|
||||||
&& noisechrof == other.noisechrof
|
&& noisechrof == other.noisechrof
|
||||||
&& noisechroc == other.noisechroc
|
&& noisechroc == other.noisechroc
|
||||||
&& sharradius == other.sharradius
|
&& sharradius == other.sharradius
|
||||||
@ -2540,6 +2543,7 @@ bool LocallabParams::operator ==(const LocallabParams& other) const
|
|||||||
&& nbspot == other.nbspot
|
&& nbspot == other.nbspot
|
||||||
&& anbspot == other.anbspot
|
&& anbspot == other.anbspot
|
||||||
&& hueref == other.hueref
|
&& hueref == other.hueref
|
||||||
|
&& huerefblur == other.huerefblur
|
||||||
&& chromaref == other.chromaref
|
&& chromaref == other.chromaref
|
||||||
&& lumaref == other.lumaref
|
&& lumaref == other.lumaref
|
||||||
&& sobelref == other.sobelref
|
&& sobelref == other.sobelref
|
||||||
@ -3486,6 +3490,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
|||||||
saveToKeyfile(!pedited || pedited->locallab.noiselumc, "Locallab", "noiselumc", locallab.noiselumc, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.noiselumc, "Locallab", "noiselumc", locallab.noiselumc, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.noiselumdetail, "Locallab", "noiselumdetail", locallab.noiselumdetail, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.noiselumdetail, "Locallab", "noiselumdetail", locallab.noiselumdetail, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.noisechrodetail, "Locallab", "noisechrodetail", locallab.noisechrodetail, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.noisechrodetail, "Locallab", "noisechrodetail", locallab.noisechrodetail, keyFile);
|
||||||
|
saveToKeyfile(!pedited || pedited->locallab.sensiden, "Locallab", "Sensiden", locallab.sensiden, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.noisechrof, "Locallab", "noisechrof", locallab.noisechrof, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.noisechrof, "Locallab", "noisechrof", locallab.noisechrof, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.noisechroc, "Locallab", "noisechroc", locallab.noisechroc, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.noisechroc, "Locallab", "noisechroc", locallab.noisechroc, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.sharradius, "Locallab", "Sharradius", locallab.sharradius, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.sharradius, "Locallab", "Sharradius", locallab.sharradius, keyFile);
|
||||||
@ -3509,6 +3514,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
|||||||
saveToKeyfile(!pedited || pedited->locallab.nbspot, "Locallab", "Nbspot", locallab.nbspot, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.nbspot, "Locallab", "Nbspot", locallab.nbspot, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.anbspot, "Locallab", "ANbspot", locallab.anbspot, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.anbspot, "Locallab", "ANbspot", locallab.anbspot, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.hueref, "Locallab", "Hueref", locallab.hueref, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.hueref, "Locallab", "Hueref", locallab.hueref, keyFile);
|
||||||
|
saveToKeyfile(!pedited || pedited->locallab.huerefblur, "Locallab", "Huerefblur", locallab.huerefblur, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.chromaref, "Locallab", "Chromaref", locallab.chromaref, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.chromaref, "Locallab", "Chromaref", locallab.chromaref, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.lumaref, "Locallab", "Lumaref", locallab.lumaref, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.lumaref, "Locallab", "Lumaref", locallab.lumaref, keyFile);
|
||||||
saveToKeyfile(!pedited || pedited->locallab.sobelref, "Locallab", "Sobelref", locallab.sobelref, keyFile);
|
saveToKeyfile(!pedited || pedited->locallab.sobelref, "Locallab", "Sobelref", locallab.sobelref, keyFile);
|
||||||
@ -4541,6 +4547,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
|||||||
assignFromKeyfile(keyFile, "Locallab", "noiselumc", pedited, locallab.noiselumc, pedited->locallab.noiselumc);
|
assignFromKeyfile(keyFile, "Locallab", "noiselumc", pedited, locallab.noiselumc, pedited->locallab.noiselumc);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "noiselumdetail", pedited, locallab.noiselumdetail, pedited->locallab.noiselumdetail);
|
assignFromKeyfile(keyFile, "Locallab", "noiselumdetail", pedited, locallab.noiselumdetail, pedited->locallab.noiselumdetail);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "noisechrodetail", pedited, locallab.noisechrodetail, pedited->locallab.noisechrodetail);
|
assignFromKeyfile(keyFile, "Locallab", "noisechrodetail", pedited, locallab.noisechrodetail, pedited->locallab.noisechrodetail);
|
||||||
|
assignFromKeyfile(keyFile, "Locallab", "Sensiden", pedited, locallab.sensiden, pedited->locallab.sensiden);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "noisechrof", pedited, locallab.noisechrof, pedited->locallab.noisechrof);
|
assignFromKeyfile(keyFile, "Locallab", "noisechrof", pedited, locallab.noisechrof, pedited->locallab.noisechrof);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "noisechroc", pedited, locallab.noisechroc, pedited->locallab.noisechroc);
|
assignFromKeyfile(keyFile, "Locallab", "noisechroc", pedited, locallab.noisechroc, pedited->locallab.noisechroc);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Sharradius", pedited, locallab.sharradius, pedited->locallab.sharradius);
|
assignFromKeyfile(keyFile, "Locallab", "Sharradius", pedited, locallab.sharradius, pedited->locallab.sharradius);
|
||||||
@ -4565,6 +4572,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
|||||||
assignFromKeyfile(keyFile, "Locallab", "Nbspot", pedited, locallab.nbspot, pedited->locallab.nbspot);
|
assignFromKeyfile(keyFile, "Locallab", "Nbspot", pedited, locallab.nbspot, pedited->locallab.nbspot);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "ANbspot", pedited, locallab.anbspot, pedited->locallab.anbspot);
|
assignFromKeyfile(keyFile, "Locallab", "ANbspot", pedited, locallab.anbspot, pedited->locallab.anbspot);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Hueref", pedited, locallab.hueref, pedited->locallab.hueref);
|
assignFromKeyfile(keyFile, "Locallab", "Hueref", pedited, locallab.hueref, pedited->locallab.hueref);
|
||||||
|
assignFromKeyfile(keyFile, "Locallab", "Huerefblur", pedited, locallab.huerefblur, pedited->locallab.huerefblur);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Chromaref", pedited, locallab.chromaref, pedited->locallab.chromaref);
|
assignFromKeyfile(keyFile, "Locallab", "Chromaref", pedited, locallab.chromaref, pedited->locallab.chromaref);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Lumaref", pedited, locallab.lumaref, pedited->locallab.lumaref);
|
assignFromKeyfile(keyFile, "Locallab", "Lumaref", pedited, locallab.lumaref, pedited->locallab.lumaref);
|
||||||
assignFromKeyfile(keyFile, "Locallab", "Sobelref", pedited, locallab.sobelref, pedited->locallab.sobelref);
|
assignFromKeyfile(keyFile, "Locallab", "Sobelref", pedited, locallab.sobelref, pedited->locallab.sobelref);
|
||||||
|
@ -916,6 +916,7 @@ struct LocallabParams {
|
|||||||
int noiselumc;
|
int noiselumc;
|
||||||
int noiselumdetail;
|
int noiselumdetail;
|
||||||
int noisechrodetail;
|
int noisechrodetail;
|
||||||
|
int sensiden;
|
||||||
int noisechrof;
|
int noisechrof;
|
||||||
int noisechroc;
|
int noisechroc;
|
||||||
int sharradius;
|
int sharradius;
|
||||||
@ -955,6 +956,7 @@ struct LocallabParams {
|
|||||||
bool inversret;
|
bool inversret;
|
||||||
bool inverssha;
|
bool inverssha;
|
||||||
double hueref;
|
double hueref;
|
||||||
|
double huerefblur;
|
||||||
double chromaref;
|
double chromaref;
|
||||||
double lumaref;
|
double lumaref;
|
||||||
double sobelref;
|
double sobelref;
|
||||||
|
@ -620,7 +620,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
|||||||
LUMINANCECURVE, // Evlocallabstruc
|
LUMINANCECURVE, // Evlocallabstruc
|
||||||
LUMINANCECURVE, // Evlocallabwarm
|
LUMINANCECURVE, // Evlocallabwarm
|
||||||
LUMINANCECURVE, // Evlocallabnoiselumdetail
|
LUMINANCECURVE, // Evlocallabnoiselumdetail
|
||||||
LUMINANCECURVE // Evlocallabnoisechrodetail
|
LUMINANCECURVE, // Evlocallabnoisechrodetail
|
||||||
|
LUMINANCECURVE, // Evlocallabsensiden
|
||||||
|
LUMINANCECURVE // Evlocallabhuerefblur
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1103,7 +1103,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ifstream fich(datalab, ios::in);
|
ifstream fich(datalab, ios::in);
|
||||||
int maxdata = 88; //87 10018//86 10017//85 10016 //82;//78;//73 10011
|
int maxdata = 90; //88 10019 //87 10018//86 10017//85 10016 //82;//78;//73 10011
|
||||||
|
|
||||||
if (fich && versionmip != 0) {
|
if (fich && versionmip != 0) {
|
||||||
std::string inser;
|
std::string inser;
|
||||||
@ -1340,7 +1340,9 @@ private:
|
|||||||
dataspots[81][0] = params.locallab.warm;
|
dataspots[81][0] = params.locallab.warm;
|
||||||
dataspots[82][0] = params.locallab.noiselumdetail;
|
dataspots[82][0] = params.locallab.noiselumdetail;
|
||||||
dataspots[83][0] = params.locallab.noisechrodetail;
|
dataspots[83][0] = params.locallab.noisechrodetail;
|
||||||
|
dataspots[84][0] = params.locallab.sensiden;
|
||||||
|
|
||||||
|
dataspots[maxdata - 5][0] = 100.f * params.locallab.huerefblur;
|
||||||
dataspots[maxdata - 4][0] = 100.f * params.locallab.hueref;
|
dataspots[maxdata - 4][0] = 100.f * params.locallab.hueref;
|
||||||
dataspots[maxdata - 3][0] = params.locallab.chromaref;
|
dataspots[maxdata - 3][0] = params.locallab.chromaref;
|
||||||
dataspots[maxdata - 2][0] = params.locallab.lumaref;
|
dataspots[maxdata - 2][0] = params.locallab.lumaref;
|
||||||
@ -1607,6 +1609,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
for (int sp = 1; sp < maxspot; sp++) { //spots default
|
for (int sp = 1; sp < maxspot; sp++) { //spots default
|
||||||
|
params.locallab.huerefblur = INFINITY;
|
||||||
params.locallab.hueref = INFINITY;
|
params.locallab.hueref = INFINITY;
|
||||||
params.locallab.chromaref = INFINITY;
|
params.locallab.chromaref = INFINITY;
|
||||||
params.locallab.lumaref = INFINITY;
|
params.locallab.lumaref = INFINITY;
|
||||||
@ -1811,7 +1814,9 @@ private:
|
|||||||
params.locallab.warm = dataspots[81][sp];
|
params.locallab.warm = dataspots[81][sp];
|
||||||
params.locallab.noiselumdetail = dataspots[82][sp];
|
params.locallab.noiselumdetail = dataspots[82][sp];
|
||||||
params.locallab.noisechrodetail = dataspots[83][sp];
|
params.locallab.noisechrodetail = dataspots[83][sp];
|
||||||
|
params.locallab.sensiden = dataspots[84][sp];
|
||||||
|
|
||||||
|
params.locallab.huerefblur = ((float) dataspots[maxdata - 5][sp]) / 100.f;
|
||||||
params.locallab.hueref = ((float) dataspots[maxdata - 4][sp]) / 100.f;
|
params.locallab.hueref = ((float) dataspots[maxdata - 4][sp]) / 100.f;
|
||||||
params.locallab.chromaref = dataspots[maxdata - 3][sp];
|
params.locallab.chromaref = dataspots[maxdata - 3][sp];
|
||||||
params.locallab.lumaref = dataspots[maxdata - 2][sp];
|
params.locallab.lumaref = dataspots[maxdata - 2][sp];
|
||||||
@ -1992,17 +1997,19 @@ private:
|
|||||||
hist16, hltonecurveloc, shtonecurveloc, tonecurveloc,
|
hist16, hltonecurveloc, shtonecurveloc, tonecurveloc,
|
||||||
1);
|
1);
|
||||||
|
|
||||||
double huere, chromare, lumare;
|
double huere, chromare, lumare, huerefblu;
|
||||||
double sobelre;
|
double sobelre;
|
||||||
ipf.calc_ref(labView, labView, 0, 0, fw, fh, 1, huere, chromare, lumare, sobelre);
|
|
||||||
|
|
||||||
|
ipf.calc_ref(labView, labView, 0, 0, fw, fh, 1, huerefblu, huere, chromare, lumare, sobelre);
|
||||||
|
|
||||||
|
params.locallab.huerefblur = huerefblu;
|
||||||
params.locallab.hueref = huere;
|
params.locallab.hueref = huere;
|
||||||
params.locallab.chromaref = chromare;
|
params.locallab.chromaref = chromare;
|
||||||
params.locallab.lumaref = lumare;
|
params.locallab.lumaref = lumare;
|
||||||
params.locallab.sobelref = sobelre;
|
params.locallab.sobelref = sobelre;
|
||||||
|
|
||||||
ipf.Lab_Local(2, (float**)shbuffer, labView, labView, reservView, 0, 0, fw, fh, 1, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve,
|
ipf.Lab_Local(2, (float**)shbuffer, labView, labView, reservView, 0, 0, fw, fh, 1, locRETgainCurve, lllocalcurve, loclhCurve, lochhCurve,
|
||||||
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
LHutili, HHutili, cclocalcurve, localskutili, sklocalcurve, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, params.locallab.huerefblur, params.locallab.hueref, params.locallab.chromaref, params.locallab.lumaref, params.locallab.sobelref);
|
||||||
lllocalcurve.clear();
|
lllocalcurve.clear();
|
||||||
cclocalcurve.clear();
|
cclocalcurve.clear();
|
||||||
sklocalcurve.clear();
|
sklocalcurve.clear();
|
||||||
|
@ -108,9 +108,11 @@ Locallab::Locallab():
|
|||||||
noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), 0, 100, 1, 0))),
|
noiselumc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMCOARSE"), 0, 100, 1, 0))),
|
||||||
noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0, 100, 1, 50))),
|
noiselumdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMDETAIL"), 0, 100, 1, 50))),
|
||||||
noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0, 100, 1, 50))),
|
noisechrodetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHRODETAIL"), 0, 100, 1, 50))),
|
||||||
|
sensiden(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIDEN"), 0, 100, 1, 30))),
|
||||||
noisechrof(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROFINE"), 0, 100, 1, 0))),
|
noisechrof(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROFINE"), 0, 100, 1, 0))),
|
||||||
noisechroc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROCOARSE"), 0, 100, 1, 0))),
|
noisechroc(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISECHROCOARSE"), 0, 100, 1, 0))),
|
||||||
hueref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_HUEREF"), -3.15, 3.15, 0.01, 0))),
|
hueref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_HUEREF"), -3.15, 3.15, 0.01, 0))),
|
||||||
|
huerefblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_HUEREFBLUR"), -3.15, 3.15, 0.01, 0))),
|
||||||
chromaref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMAREF"), 0, 200, 0.01, 0))),
|
chromaref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMAREF"), 0, 200, 0.01, 0))),
|
||||||
lumaref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LUMAMAREF"), 0, 100, 0.01, 0))),
|
lumaref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LUMAMAREF"), 0, 100, 0.01, 0))),
|
||||||
sobelref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOBELREF"), 0, 100, 0.01, 0))),
|
sobelref(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOBELREF"), 0, 100, 0.01, 0))),
|
||||||
@ -508,17 +510,20 @@ Locallab::Locallab():
|
|||||||
pack_start(*anbspot);
|
pack_start(*anbspot);
|
||||||
|
|
||||||
hueref->setAdjusterListener(this);
|
hueref->setAdjusterListener(this);
|
||||||
|
huerefblur->setAdjusterListener(this);
|
||||||
chromaref->setAdjusterListener(this);
|
chromaref->setAdjusterListener(this);
|
||||||
lumaref->setAdjusterListener(this);
|
lumaref->setAdjusterListener(this);
|
||||||
sobelref->setAdjusterListener(this);
|
sobelref->setAdjusterListener(this);
|
||||||
|
|
||||||
pack_start(*hueref);
|
pack_start(*hueref);
|
||||||
|
pack_start(*huerefblur);
|
||||||
pack_start(*chromaref);
|
pack_start(*chromaref);
|
||||||
pack_start(*lumaref);
|
pack_start(*lumaref);
|
||||||
pack_start(*sobelref);
|
pack_start(*sobelref);
|
||||||
|
|
||||||
anbspot->hide();//keep anbspot - i used it to test diffrent algo...
|
anbspot->hide();//keep anbspot - i used it to test diffrent algo...
|
||||||
hueref->hide();
|
hueref->hide();
|
||||||
|
huerefblur->hide();
|
||||||
chromaref->hide();
|
chromaref->hide();
|
||||||
lumaref->hide();
|
lumaref->hide();
|
||||||
sobelref->hide();
|
sobelref->hide();
|
||||||
@ -644,6 +649,7 @@ Locallab::Locallab():
|
|||||||
noiselumc->setAdjusterListener(this);
|
noiselumc->setAdjusterListener(this);
|
||||||
noiselumdetail->setAdjusterListener(this);
|
noiselumdetail->setAdjusterListener(this);
|
||||||
noisechrodetail->setAdjusterListener(this);
|
noisechrodetail->setAdjusterListener(this);
|
||||||
|
sensiden->setAdjusterListener(this);
|
||||||
|
|
||||||
noisechrof->setAdjusterListener(this);
|
noisechrof->setAdjusterListener(this);
|
||||||
|
|
||||||
@ -656,6 +662,7 @@ Locallab::Locallab():
|
|||||||
denoisBox->pack_start(*noisechrof);
|
denoisBox->pack_start(*noisechrof);
|
||||||
denoisBox->pack_start(*noisechroc);
|
denoisBox->pack_start(*noisechroc);
|
||||||
denoisBox->pack_start(*noisechrodetail);
|
denoisBox->pack_start(*noisechrodetail);
|
||||||
|
denoisBox->pack_start(*sensiden);
|
||||||
|
|
||||||
neutrHBox1 = Gtk::manage(new Gtk::HBox());
|
neutrHBox1 = Gtk::manage(new Gtk::HBox());
|
||||||
|
|
||||||
@ -1311,6 +1318,7 @@ void Locallab::neutral_pressed()
|
|||||||
noisechrof->resetValue(false);
|
noisechrof->resetValue(false);
|
||||||
noisechroc->resetValue(false);
|
noisechroc->resetValue(false);
|
||||||
noisechrodetail->resetValue(false);
|
noisechrodetail->resetValue(false);
|
||||||
|
sensiden->resetValue(false);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1816,12 +1824,16 @@ bool Locallab::localComputed_()
|
|||||||
warm->setValue(nextdatasp[81]);
|
warm->setValue(nextdatasp[81]);
|
||||||
noiselumdetail->setValue(nextdatasp[82]);
|
noiselumdetail->setValue(nextdatasp[82]);
|
||||||
noisechrodetail->setValue(nextdatasp[83]);
|
noisechrodetail->setValue(nextdatasp[83]);
|
||||||
|
sensiden->setValue(nextdatasp[84]);
|
||||||
|
|
||||||
double intermed = 0.01 * (double) nextdatasp[84];
|
double intermedblur = 0.01 * (double) nextdatasp[85];
|
||||||
|
huerefblur->setValue(intermedblur);
|
||||||
|
double intermed = 0.01 * (double) nextdatasp[86];
|
||||||
hueref->setValue(intermed);
|
hueref->setValue(intermed);
|
||||||
chromaref->setValue(nextdatasp[85]);
|
|
||||||
lumaref->setValue(nextdatasp[86]);
|
chromaref->setValue(nextdatasp[87]);
|
||||||
sobelref->setValue(nextdatasp[87]);
|
lumaref->setValue(nextdatasp[88]);
|
||||||
|
sobelref->setValue(nextdatasp[89]);
|
||||||
|
|
||||||
int *s_datc;
|
int *s_datc;
|
||||||
s_datc = new int[70];
|
s_datc = new int[70];
|
||||||
@ -2105,7 +2117,7 @@ bool Locallab::localComputed_()
|
|||||||
|
|
||||||
void Locallab::localChanged(int **datasp, std::string datastr, std::string ll_str, std::string lh_str, std::string cc_str, std::string hh_str, std::string sk_str, std::string ps_str, std::string ex_str, int sp, int maxdat)
|
void Locallab::localChanged(int **datasp, std::string datastr, std::string ll_str, std::string lh_str, std::string cc_str, std::string hh_str, std::string sk_str, std::string ps_str, std::string ex_str, int sp, int maxdat)
|
||||||
{
|
{
|
||||||
for (int i = 2; i < 88; i++) {
|
for (int i = 2; i < 90; i++) {
|
||||||
nextdatasp[i] = datasp[i][sp];
|
nextdatasp[i] = datasp[i][sp];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2142,6 +2154,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
{
|
{
|
||||||
anbspot->hide();
|
anbspot->hide();
|
||||||
hueref->hide();
|
hueref->hide();
|
||||||
|
huerefblur->hide();
|
||||||
chromaref->hide();
|
chromaref->hide();
|
||||||
lumaref->hide();
|
lumaref->hide();
|
||||||
sobelref->hide();
|
sobelref->hide();
|
||||||
@ -2195,6 +2208,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
noisechrof->setEditedState(pedited->locallab.noisechrof ? Edited : UnEdited);
|
noisechrof->setEditedState(pedited->locallab.noisechrof ? Edited : UnEdited);
|
||||||
noisechroc->setEditedState(pedited->locallab.noisechroc ? Edited : UnEdited);
|
noisechroc->setEditedState(pedited->locallab.noisechroc ? Edited : UnEdited);
|
||||||
noisechrodetail->setEditedState(pedited->locallab.noisechrodetail ? Edited : UnEdited);
|
noisechrodetail->setEditedState(pedited->locallab.noisechrodetail ? Edited : UnEdited);
|
||||||
|
sensiden->setEditedState(pedited->locallab.sensiden ? Edited : UnEdited);
|
||||||
|
|
||||||
pastels->setEditedState(pedited->locallab.pastels ? Edited : UnEdited);
|
pastels->setEditedState(pedited->locallab.pastels ? Edited : UnEdited);
|
||||||
saturated->setEditedState(pedited->locallab.saturated ? Edited : UnEdited);
|
saturated->setEditedState(pedited->locallab.saturated ? Edited : UnEdited);
|
||||||
@ -2231,6 +2245,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
nbspot->setEditedState(pedited->locallab.nbspot ? Edited : UnEdited);
|
nbspot->setEditedState(pedited->locallab.nbspot ? Edited : UnEdited);
|
||||||
anbspot->setEditedState(pedited->locallab.anbspot ? Edited : UnEdited);
|
anbspot->setEditedState(pedited->locallab.anbspot ? Edited : UnEdited);
|
||||||
hueref->setEditedState(pedited->locallab.hueref ? Edited : UnEdited);
|
hueref->setEditedState(pedited->locallab.hueref ? Edited : UnEdited);
|
||||||
|
huerefblur->setEditedState(pedited->locallab.huerefblur ? Edited : UnEdited);
|
||||||
chromaref->setEditedState(pedited->locallab.chromaref ? Edited : UnEdited);
|
chromaref->setEditedState(pedited->locallab.chromaref ? Edited : UnEdited);
|
||||||
lumaref->setEditedState(pedited->locallab.lumaref ? Edited : UnEdited);
|
lumaref->setEditedState(pedited->locallab.lumaref ? Edited : UnEdited);
|
||||||
sobelref->setEditedState(pedited->locallab.sobelref ? Edited : UnEdited);
|
sobelref->setEditedState(pedited->locallab.sobelref ? Edited : UnEdited);
|
||||||
@ -2386,6 +2401,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
nbspot->setValue(pp->locallab.nbspot);
|
nbspot->setValue(pp->locallab.nbspot);
|
||||||
anbspot->setValue(pp->locallab.anbspot);
|
anbspot->setValue(pp->locallab.anbspot);
|
||||||
hueref->setValue(pp->locallab.hueref);
|
hueref->setValue(pp->locallab.hueref);
|
||||||
|
huerefblur->setValue(pp->locallab.huerefblur);
|
||||||
chromaref->setValue(pp->locallab.chromaref);
|
chromaref->setValue(pp->locallab.chromaref);
|
||||||
lumaref->setValue(pp->locallab.lumaref);
|
lumaref->setValue(pp->locallab.lumaref);
|
||||||
sobelref->setValue(pp->locallab.sobelref);
|
sobelref->setValue(pp->locallab.sobelref);
|
||||||
@ -2406,6 +2422,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
noisechrof->setValue(pp->locallab.noisechrof);
|
noisechrof->setValue(pp->locallab.noisechrof);
|
||||||
noisechroc->setValue(pp->locallab.noisechroc);
|
noisechroc->setValue(pp->locallab.noisechroc);
|
||||||
noisechrodetail->setValue(pp->locallab.noisechrodetail);
|
noisechrodetail->setValue(pp->locallab.noisechrodetail);
|
||||||
|
sensiden->setValue(pp->locallab.sensiden);
|
||||||
expcolor->setEnabled(pp->locallab.expcolor);
|
expcolor->setEnabled(pp->locallab.expcolor);
|
||||||
expexpose->setEnabled(pp->locallab.expexpose);
|
expexpose->setEnabled(pp->locallab.expexpose);
|
||||||
expvibrance->setEnabled(pp->locallab.expvibrance);
|
expvibrance->setEnabled(pp->locallab.expvibrance);
|
||||||
@ -2557,6 +2574,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
|
|
||||||
anbspot->hide();
|
anbspot->hide();
|
||||||
hueref->hide();
|
hueref->hide();
|
||||||
|
huerefblur->hide();
|
||||||
chromaref->hide();
|
chromaref->hide();
|
||||||
lumaref->hide();
|
lumaref->hide();
|
||||||
sobelref->hide();
|
sobelref->hide();
|
||||||
@ -2831,6 +2849,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pp->locallab.noiselumc = noiselumc->getIntValue();
|
pp->locallab.noiselumc = noiselumc->getIntValue();
|
||||||
pp->locallab.noiselumdetail = noiselumdetail->getIntValue();
|
pp->locallab.noiselumdetail = noiselumdetail->getIntValue();
|
||||||
pp->locallab.noisechrodetail = noisechrodetail->getIntValue();
|
pp->locallab.noisechrodetail = noisechrodetail->getIntValue();
|
||||||
|
pp->locallab.sensiden = sensiden->getIntValue();
|
||||||
pp->locallab.noiselumf = noiselumf->getIntValue();
|
pp->locallab.noiselumf = noiselumf->getIntValue();
|
||||||
pp->locallab.noisechrof = noisechrof->getIntValue();
|
pp->locallab.noisechrof = noisechrof->getIntValue();
|
||||||
pp->locallab.noisechroc = noisechroc->getIntValue();
|
pp->locallab.noisechroc = noisechroc->getIntValue();
|
||||||
@ -2871,6 +2890,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pp->locallab.nbspot = nbspot->getIntValue();
|
pp->locallab.nbspot = nbspot->getIntValue();
|
||||||
pp->locallab.anbspot = anbspot->getIntValue();
|
pp->locallab.anbspot = anbspot->getIntValue();
|
||||||
pp->locallab.hueref = hueref->getValue();
|
pp->locallab.hueref = hueref->getValue();
|
||||||
|
pp->locallab.huerefblur = huerefblur->getValue();
|
||||||
pp->locallab.chromaref = chromaref->getValue();
|
pp->locallab.chromaref = chromaref->getValue();
|
||||||
pp->locallab.lumaref = lumaref->getValue();
|
pp->locallab.lumaref = lumaref->getValue();
|
||||||
pp->locallab.sobelref = sobelref->getValue();
|
pp->locallab.sobelref = sobelref->getValue();
|
||||||
@ -2945,6 +2965,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pedited->locallab.noiselumc = noiselumc->getEditedState();
|
pedited->locallab.noiselumc = noiselumc->getEditedState();
|
||||||
pedited->locallab.noiselumdetail = noiselumdetail->getEditedState();
|
pedited->locallab.noiselumdetail = noiselumdetail->getEditedState();
|
||||||
pedited->locallab.noisechrodetail = noisechrodetail->getEditedState();
|
pedited->locallab.noisechrodetail = noisechrodetail->getEditedState();
|
||||||
|
pedited->locallab.sensiden = sensiden->getEditedState();
|
||||||
pedited->locallab.noisechrof = noisechrof->getEditedState();
|
pedited->locallab.noisechrof = noisechrof->getEditedState();
|
||||||
pedited->locallab.noisechroc = noisechroc->getEditedState();
|
pedited->locallab.noisechroc = noisechroc->getEditedState();
|
||||||
pedited->locallab.sharradius = sharradius->getEditedState();
|
pedited->locallab.sharradius = sharradius->getEditedState();
|
||||||
@ -2984,6 +3005,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pedited->locallab.nbspot = nbspot->getEditedState();
|
pedited->locallab.nbspot = nbspot->getEditedState();
|
||||||
pedited->locallab.anbspot = anbspot->getEditedState();
|
pedited->locallab.anbspot = anbspot->getEditedState();
|
||||||
pedited->locallab.hueref = hueref->getEditedState();
|
pedited->locallab.hueref = hueref->getEditedState();
|
||||||
|
pedited->locallab.huerefblur = huerefblur->getEditedState();
|
||||||
pedited->locallab.chromaref = chromaref->getEditedState();
|
pedited->locallab.chromaref = chromaref->getEditedState();
|
||||||
pedited->locallab.lumaref = lumaref->getEditedState();
|
pedited->locallab.lumaref = lumaref->getEditedState();
|
||||||
pedited->locallab.sobelref = sobelref->getEditedState();
|
pedited->locallab.sobelref = sobelref->getEditedState();
|
||||||
@ -3718,6 +3740,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
|||||||
noiselumc->setDefault(defParams->locallab.noiselumc);
|
noiselumc->setDefault(defParams->locallab.noiselumc);
|
||||||
noiselumdetail->setDefault(defParams->locallab.noiselumdetail);
|
noiselumdetail->setDefault(defParams->locallab.noiselumdetail);
|
||||||
noisechrodetail->setDefault(defParams->locallab.noisechrodetail);
|
noisechrodetail->setDefault(defParams->locallab.noisechrodetail);
|
||||||
|
sensiden->setDefault(defParams->locallab.sensiden);
|
||||||
noisechrof->setDefault(defParams->locallab.noisechrof);
|
noisechrof->setDefault(defParams->locallab.noisechrof);
|
||||||
noisechroc->setDefault(defParams->locallab.noisechroc);
|
noisechroc->setDefault(defParams->locallab.noisechroc);
|
||||||
sharradius->setDefault(defParams->locallab.sharradius);
|
sharradius->setDefault(defParams->locallab.sharradius);
|
||||||
@ -3747,6 +3770,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
|||||||
nbspot->setDefault(defParams->locallab.nbspot);
|
nbspot->setDefault(defParams->locallab.nbspot);
|
||||||
anbspot->setDefault(defParams->locallab.anbspot);
|
anbspot->setDefault(defParams->locallab.anbspot);
|
||||||
hueref->setDefault(defParams->locallab.hueref);
|
hueref->setDefault(defParams->locallab.hueref);
|
||||||
|
huerefblur->setDefault(defParams->locallab.huerefblur);
|
||||||
chromaref->setDefault(defParams->locallab.chromaref);
|
chromaref->setDefault(defParams->locallab.chromaref);
|
||||||
lumaref->setDefault(defParams->locallab.lumaref);
|
lumaref->setDefault(defParams->locallab.lumaref);
|
||||||
sobelref->setDefault(defParams->locallab.sobelref);
|
sobelref->setDefault(defParams->locallab.sobelref);
|
||||||
@ -3794,6 +3818,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
|||||||
noiselumc->setDefaultEditedState(pedited->locallab.noiselumc ? Edited : UnEdited);
|
noiselumc->setDefaultEditedState(pedited->locallab.noiselumc ? Edited : UnEdited);
|
||||||
noiselumdetail->setDefaultEditedState(pedited->locallab.noiselumdetail ? Edited : UnEdited);
|
noiselumdetail->setDefaultEditedState(pedited->locallab.noiselumdetail ? Edited : UnEdited);
|
||||||
noisechrodetail->setDefaultEditedState(pedited->locallab.noisechrodetail ? Edited : UnEdited);
|
noisechrodetail->setDefaultEditedState(pedited->locallab.noisechrodetail ? Edited : UnEdited);
|
||||||
|
sensiden->setDefaultEditedState(pedited->locallab.sensiden ? Edited : UnEdited);
|
||||||
noisechrof->setDefaultEditedState(pedited->locallab.noisechrof ? Edited : UnEdited);
|
noisechrof->setDefaultEditedState(pedited->locallab.noisechrof ? Edited : UnEdited);
|
||||||
noisechroc->setDefaultEditedState(pedited->locallab.noisechroc ? Edited : UnEdited);
|
noisechroc->setDefaultEditedState(pedited->locallab.noisechroc ? Edited : UnEdited);
|
||||||
sharradius->setDefaultEditedState(pedited->locallab.sharradius ? Edited : UnEdited);
|
sharradius->setDefaultEditedState(pedited->locallab.sharradius ? Edited : UnEdited);
|
||||||
@ -3823,6 +3848,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
|||||||
nbspot->setDefaultEditedState(pedited->locallab.nbspot ? Edited : UnEdited);
|
nbspot->setDefaultEditedState(pedited->locallab.nbspot ? Edited : UnEdited);
|
||||||
anbspot->setDefaultEditedState(pedited->locallab.anbspot ? Edited : UnEdited);
|
anbspot->setDefaultEditedState(pedited->locallab.anbspot ? Edited : UnEdited);
|
||||||
hueref->setDefaultEditedState(pedited->locallab.hueref ? Edited : UnEdited);
|
hueref->setDefaultEditedState(pedited->locallab.hueref ? Edited : UnEdited);
|
||||||
|
huerefblur->setDefaultEditedState(pedited->locallab.huerefblur ? Edited : UnEdited);
|
||||||
chromaref->setDefaultEditedState(pedited->locallab.chromaref ? Edited : UnEdited);
|
chromaref->setDefaultEditedState(pedited->locallab.chromaref ? Edited : UnEdited);
|
||||||
lumaref->setDefaultEditedState(pedited->locallab.lumaref ? Edited : UnEdited);
|
lumaref->setDefaultEditedState(pedited->locallab.lumaref ? Edited : UnEdited);
|
||||||
sobelref->setDefaultEditedState(pedited->locallab.sobelref ? Edited : UnEdited);
|
sobelref->setDefaultEditedState(pedited->locallab.sobelref ? Edited : UnEdited);
|
||||||
@ -3869,6 +3895,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
|||||||
noiselumc->setDefaultEditedState(Irrelevant);
|
noiselumc->setDefaultEditedState(Irrelevant);
|
||||||
noiselumdetail->setDefaultEditedState(Irrelevant);
|
noiselumdetail->setDefaultEditedState(Irrelevant);
|
||||||
noisechrodetail->setDefaultEditedState(Irrelevant);
|
noisechrodetail->setDefaultEditedState(Irrelevant);
|
||||||
|
sensiden->setDefaultEditedState(Irrelevant);
|
||||||
noisechrof->setDefaultEditedState(Irrelevant);
|
noisechrof->setDefaultEditedState(Irrelevant);
|
||||||
noisechroc->setDefaultEditedState(Irrelevant);
|
noisechroc->setDefaultEditedState(Irrelevant);
|
||||||
sharradius->setDefaultEditedState(Irrelevant);
|
sharradius->setDefaultEditedState(Irrelevant);
|
||||||
@ -3898,6 +3925,7 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
|||||||
nbspot->setDefaultEditedState(Irrelevant);
|
nbspot->setDefaultEditedState(Irrelevant);
|
||||||
anbspot->setDefaultEditedState(Irrelevant);
|
anbspot->setDefaultEditedState(Irrelevant);
|
||||||
hueref->setDefaultEditedState(Irrelevant);
|
hueref->setDefaultEditedState(Irrelevant);
|
||||||
|
huerefblur->setDefaultEditedState(Irrelevant);
|
||||||
chromaref->setDefaultEditedState(Irrelevant);
|
chromaref->setDefaultEditedState(Irrelevant);
|
||||||
lumaref->setDefaultEditedState(Irrelevant);
|
lumaref->setDefaultEditedState(Irrelevant);
|
||||||
sobelref->setDefaultEditedState(Irrelevant);
|
sobelref->setDefaultEditedState(Irrelevant);
|
||||||
@ -3933,6 +3961,7 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
|
|||||||
updateGeometry(int (centerX->getValue()), int (centerY->getValue()), int (circrad->getValue()), (int)locY->getValue(), degree->getValue(), (int)locX->getValue(), (int)locYT->getValue(), (int)locXL->getValue());
|
updateGeometry(int (centerX->getValue()), int (centerY->getValue()), int (circrad->getValue()), (int)locY->getValue(), degree->getValue(), (int)locX->getValue(), (int)locYT->getValue(), (int)locXL->getValue());
|
||||||
anbspot->hide();
|
anbspot->hide();
|
||||||
hueref->hide();
|
hueref->hide();
|
||||||
|
huerefblur->hide();
|
||||||
chromaref->hide();
|
chromaref->hide();
|
||||||
lumaref->hide();
|
lumaref->hide();
|
||||||
sobelref->hide();
|
sobelref->hide();
|
||||||
@ -4046,6 +4075,8 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
|
|||||||
listener->panelChanged(Evlocallabnoiselumdetail, noiselumdetail->getTextValue());
|
listener->panelChanged(Evlocallabnoiselumdetail, noiselumdetail->getTextValue());
|
||||||
} else if (a == noisechrodetail) {
|
} else if (a == noisechrodetail) {
|
||||||
listener->panelChanged(Evlocallabnoisechrodetail, noisechrodetail->getTextValue());
|
listener->panelChanged(Evlocallabnoisechrodetail, noisechrodetail->getTextValue());
|
||||||
|
} else if (a == sensiden) {
|
||||||
|
listener->panelChanged(Evlocallabsensiden, sensiden->getTextValue());
|
||||||
} else if (a == noisechrof) {
|
} else if (a == noisechrof) {
|
||||||
listener->panelChanged(Evlocallabnoisechrof, noisechrof->getTextValue());
|
listener->panelChanged(Evlocallabnoisechrof, noisechrof->getTextValue());
|
||||||
} else if (a == noisechroc) {
|
} else if (a == noisechroc) {
|
||||||
@ -4094,6 +4125,8 @@ void Locallab::adjusterChanged(Adjuster * a, double newval)
|
|||||||
listener->panelChanged(Evlocallabanbspot, ""); //anbspot->getTextValue());
|
listener->panelChanged(Evlocallabanbspot, ""); //anbspot->getTextValue());
|
||||||
} else if (a == hueref) {
|
} else if (a == hueref) {
|
||||||
listener->panelChanged(Evlocallabhueref, ""); //anbspot->getTextValue());
|
listener->panelChanged(Evlocallabhueref, ""); //anbspot->getTextValue());
|
||||||
|
} else if (a == huerefblur) {
|
||||||
|
listener->panelChanged(Evlocallabhuerefblur, ""); //anbspot->getTextValue());
|
||||||
} else if (a == chromaref) {
|
} else if (a == chromaref) {
|
||||||
listener->panelChanged(Evlocallabchromaref, ""); //anbspot->getTextValue());
|
listener->panelChanged(Evlocallabchromaref, ""); //anbspot->getTextValue());
|
||||||
} else if (a == lumaref) {
|
} else if (a == lumaref) {
|
||||||
@ -4146,6 +4179,7 @@ void Locallab::enabledChanged()
|
|||||||
{
|
{
|
||||||
anbspot->hide();
|
anbspot->hide();
|
||||||
hueref->hide();
|
hueref->hide();
|
||||||
|
huerefblur->hide();
|
||||||
chromaref->hide();
|
chromaref->hide();
|
||||||
lumaref->hide();
|
lumaref->hide();
|
||||||
sobelref->hide();
|
sobelref->hide();
|
||||||
@ -4234,6 +4268,7 @@ void Locallab::trimValues(rtengine::procparams::ProcParams * pp)
|
|||||||
noiselumc->trimValue(pp->locallab.noiselumc);
|
noiselumc->trimValue(pp->locallab.noiselumc);
|
||||||
noiselumdetail->trimValue(pp->locallab.noiselumdetail);
|
noiselumdetail->trimValue(pp->locallab.noiselumdetail);
|
||||||
noisechrodetail->trimValue(pp->locallab.noisechrodetail);
|
noisechrodetail->trimValue(pp->locallab.noisechrodetail);
|
||||||
|
sensiden->trimValue(pp->locallab.sensiden);
|
||||||
noisechrof->trimValue(pp->locallab.noisechrof);
|
noisechrof->trimValue(pp->locallab.noisechrof);
|
||||||
noisechroc->trimValue(pp->locallab.noisechroc);
|
noisechroc->trimValue(pp->locallab.noisechroc);
|
||||||
sharradius->trimValue(pp->locallab.sharradius);
|
sharradius->trimValue(pp->locallab.sharradius);
|
||||||
@ -4263,6 +4298,7 @@ void Locallab::trimValues(rtengine::procparams::ProcParams * pp)
|
|||||||
nbspot->trimValue(pp->locallab.nbspot);
|
nbspot->trimValue(pp->locallab.nbspot);
|
||||||
anbspot->trimValue(pp->locallab.anbspot);
|
anbspot->trimValue(pp->locallab.anbspot);
|
||||||
hueref->trimValue(pp->locallab.hueref);
|
hueref->trimValue(pp->locallab.hueref);
|
||||||
|
huerefblur->trimValue(pp->locallab.huerefblur);
|
||||||
chromaref->trimValue(pp->locallab.chromaref);
|
chromaref->trimValue(pp->locallab.chromaref);
|
||||||
lumaref->trimValue(pp->locallab.lumaref);
|
lumaref->trimValue(pp->locallab.lumaref);
|
||||||
sobelref->trimValue(pp->locallab.sobelref);
|
sobelref->trimValue(pp->locallab.sobelref);
|
||||||
@ -4289,6 +4325,7 @@ void Locallab::setBatchMode(bool batchMode)
|
|||||||
ToolPanel::setBatchMode(batchMode);
|
ToolPanel::setBatchMode(batchMode);
|
||||||
|
|
||||||
hueref->hide();
|
hueref->hide();
|
||||||
|
huerefblur->hide();
|
||||||
chromaref->hide();
|
chromaref->hide();
|
||||||
lumaref->hide();
|
lumaref->hide();
|
||||||
sobelref->hide();
|
sobelref->hide();
|
||||||
@ -4320,6 +4357,7 @@ void Locallab::setBatchMode(bool batchMode)
|
|||||||
noiselumc->showEditedCB();
|
noiselumc->showEditedCB();
|
||||||
noiselumdetail->showEditedCB();
|
noiselumdetail->showEditedCB();
|
||||||
noisechrodetail->showEditedCB();
|
noisechrodetail->showEditedCB();
|
||||||
|
sensiden->showEditedCB();
|
||||||
noisechroc->showEditedCB();
|
noisechroc->showEditedCB();
|
||||||
noiselumf->showEditedCB();
|
noiselumf->showEditedCB();
|
||||||
sharradius->showEditedCB();
|
sharradius->showEditedCB();
|
||||||
@ -4350,6 +4388,7 @@ void Locallab::setBatchMode(bool batchMode)
|
|||||||
nbspot->showEditedCB();
|
nbspot->showEditedCB();
|
||||||
anbspot->showEditedCB();
|
anbspot->showEditedCB();
|
||||||
hueref->showEditedCB();
|
hueref->showEditedCB();
|
||||||
|
huerefblur->showEditedCB();
|
||||||
chromaref->showEditedCB();
|
chromaref->showEditedCB();
|
||||||
lumaref->showEditedCB();
|
lumaref->showEditedCB();
|
||||||
sobelref->showEditedCB();
|
sobelref->showEditedCB();
|
||||||
|
@ -117,10 +117,12 @@ private:
|
|||||||
Adjuster* const noiselumc;
|
Adjuster* const noiselumc;
|
||||||
Adjuster* const noiselumdetail;
|
Adjuster* const noiselumdetail;
|
||||||
Adjuster* const noisechrodetail;
|
Adjuster* const noisechrodetail;
|
||||||
|
Adjuster* const sensiden;
|
||||||
|
|
||||||
Adjuster* const noisechrof;
|
Adjuster* const noisechrof;
|
||||||
Adjuster* const noisechroc;
|
Adjuster* const noisechroc;
|
||||||
Adjuster* const hueref;
|
Adjuster* const hueref;
|
||||||
|
Adjuster* const huerefblur;
|
||||||
Adjuster* const chromaref;
|
Adjuster* const chromaref;
|
||||||
Adjuster* const lumaref;
|
Adjuster* const lumaref;
|
||||||
Adjuster* const sobelref;
|
Adjuster* const sobelref;
|
||||||
@ -234,7 +236,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int nextdatasp[88];
|
int nextdatasp[90];
|
||||||
int nextlength;
|
int nextlength;
|
||||||
std::string nextstr;
|
std::string nextstr;
|
||||||
std::string nextstr2;
|
std::string nextstr2;
|
||||||
|
@ -349,6 +349,7 @@ void ParamsEdited::set(bool v)
|
|||||||
locallab.noiselumc = v;
|
locallab.noiselumc = v;
|
||||||
locallab.noiselumdetail = v;
|
locallab.noiselumdetail = v;
|
||||||
locallab.noisechrodetail = v;
|
locallab.noisechrodetail = v;
|
||||||
|
locallab.sensiden = v;
|
||||||
locallab.noisechrof = v;
|
locallab.noisechrof = v;
|
||||||
locallab.noisechroc = v;
|
locallab.noisechroc = v;
|
||||||
locallab.sharradius = v;
|
locallab.sharradius = v;
|
||||||
@ -393,6 +394,7 @@ void ParamsEdited::set(bool v)
|
|||||||
locallab.nbspot = v;
|
locallab.nbspot = v;
|
||||||
locallab.anbspot = v;
|
locallab.anbspot = v;
|
||||||
locallab.hueref = v;
|
locallab.hueref = v;
|
||||||
|
locallab.huerefblur = v;
|
||||||
locallab.chromaref = v;
|
locallab.chromaref = v;
|
||||||
locallab.lumaref = v;
|
locallab.lumaref = v;
|
||||||
locallab.sobelref = v;
|
locallab.sobelref = v;
|
||||||
@ -1014,6 +1016,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
|||||||
locallab.noiselumc = locallab.noiselumc && p.locallab.noiselumc == other.locallab.noiselumc;
|
locallab.noiselumc = locallab.noiselumc && p.locallab.noiselumc == other.locallab.noiselumc;
|
||||||
locallab.noiselumdetail = locallab.noiselumdetail && p.locallab.noiselumdetail == other.locallab.noiselumdetail;
|
locallab.noiselumdetail = locallab.noiselumdetail && p.locallab.noiselumdetail == other.locallab.noiselumdetail;
|
||||||
locallab.noisechrodetail = locallab.noisechrodetail && p.locallab.noisechrodetail == other.locallab.noisechrodetail;
|
locallab.noisechrodetail = locallab.noisechrodetail && p.locallab.noisechrodetail == other.locallab.noisechrodetail;
|
||||||
|
locallab.sensiden = locallab.sensiden && p.locallab.sensiden == other.locallab.sensiden;
|
||||||
locallab.noisechrof = locallab.noisechrof && p.locallab.noisechrof == other.locallab.noisechrof;
|
locallab.noisechrof = locallab.noisechrof && p.locallab.noisechrof == other.locallab.noisechrof;
|
||||||
locallab.noisechroc = locallab.noisechroc && p.locallab.noisechroc == other.locallab.noisechroc;
|
locallab.noisechroc = locallab.noisechroc && p.locallab.noisechroc == other.locallab.noisechroc;
|
||||||
locallab.sharradius = locallab.sharradius && p.locallab.sharradius == other.locallab.sharradius;
|
locallab.sharradius = locallab.sharradius && p.locallab.sharradius == other.locallab.sharradius;
|
||||||
@ -1043,6 +1046,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
|||||||
locallab.nbspot = locallab.nbspot && p.locallab.nbspot == other.locallab.nbspot;
|
locallab.nbspot = locallab.nbspot && p.locallab.nbspot == other.locallab.nbspot;
|
||||||
locallab.anbspot = locallab.anbspot && p.locallab.anbspot == other.locallab.anbspot;
|
locallab.anbspot = locallab.anbspot && p.locallab.anbspot == other.locallab.anbspot;
|
||||||
locallab.hueref = locallab.hueref && p.locallab.hueref == other.locallab.hueref;
|
locallab.hueref = locallab.hueref && p.locallab.hueref == other.locallab.hueref;
|
||||||
|
locallab.huerefblur = locallab.huerefblur && p.locallab.huerefblur == other.locallab.huerefblur;
|
||||||
locallab.chromaref = locallab.chromaref && p.locallab.chromaref == other.locallab.chromaref;
|
locallab.chromaref = locallab.chromaref && p.locallab.chromaref == other.locallab.chromaref;
|
||||||
locallab.lumaref = locallab.lumaref && p.locallab.lumaref == other.locallab.lumaref;
|
locallab.lumaref = locallab.lumaref && p.locallab.lumaref == other.locallab.lumaref;
|
||||||
locallab.sobelref = locallab.sobelref && p.locallab.sobelref == other.locallab.sobelref;
|
locallab.sobelref = locallab.sobelref && p.locallab.sobelref == other.locallab.sobelref;
|
||||||
@ -2628,6 +2632,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
|||||||
toEdit.locallab.noisechrodetail = mods.locallab.noisechrodetail;
|
toEdit.locallab.noisechrodetail = mods.locallab.noisechrodetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (locallab.sensiden) {
|
||||||
|
toEdit.locallab.sensiden = mods.locallab.sensiden;
|
||||||
|
}
|
||||||
|
|
||||||
if (locallab.noisechrof) {
|
if (locallab.noisechrof) {
|
||||||
toEdit.locallab.noisechrof = mods.locallab.noisechrof;
|
toEdit.locallab.noisechrof = mods.locallab.noisechrof;
|
||||||
}
|
}
|
||||||
@ -2744,6 +2752,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
|||||||
toEdit.locallab.hueref = mods.locallab.hueref;
|
toEdit.locallab.hueref = mods.locallab.hueref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (locallab.huerefblur) {
|
||||||
|
toEdit.locallab.huerefblur = mods.locallab.huerefblur;
|
||||||
|
}
|
||||||
|
|
||||||
if (locallab.chromaref) {
|
if (locallab.chromaref) {
|
||||||
toEdit.locallab.chromaref = mods.locallab.chromaref;
|
toEdit.locallab.chromaref = mods.locallab.chromaref;
|
||||||
}
|
}
|
||||||
|
@ -468,6 +468,7 @@ public:
|
|||||||
bool noiselumc;
|
bool noiselumc;
|
||||||
bool noiselumdetail;
|
bool noiselumdetail;
|
||||||
bool noisechrodetail;
|
bool noisechrodetail;
|
||||||
|
bool sensiden;
|
||||||
bool noisechrof;
|
bool noisechrof;
|
||||||
bool noisechroc;
|
bool noisechroc;
|
||||||
bool sharradius;
|
bool sharradius;
|
||||||
@ -503,6 +504,7 @@ public:
|
|||||||
bool nbspot;
|
bool nbspot;
|
||||||
bool anbspot;
|
bool anbspot;
|
||||||
bool hueref;
|
bool hueref;
|
||||||
|
bool huerefblur;
|
||||||
bool chromaref;
|
bool chromaref;
|
||||||
bool lumaref;
|
bool lumaref;
|
||||||
bool sobelref;
|
bool sobelref;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user