Change int by double - deltaEweakening - exposure comp - sharpening radius and blur radius
This commit is contained in:
parent
22323852a9
commit
35b8b77d53
@ -1068,7 +1068,7 @@ void CurveFactory::complexCurvelocal(double ecomp, double black, double hlcompr,
|
||||
const float add = 0.055f;
|
||||
float maxran = 65536.f; //65536
|
||||
|
||||
ecomp /= 100.;
|
||||
// ecomp /= 100.;
|
||||
|
||||
// check if brightness curve is needed
|
||||
if (br > 0.00001 || br < -0.00001) {
|
||||
|
@ -381,7 +381,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
|
||||
double local_center_ybuf = 0.0; // Provision
|
||||
double local_dxx = locallab.spots.at(sp).iter / 8000.0; //for proxi = 2==> # 1 pixel
|
||||
double local_dyy = locallab.spots.at(sp).iter / 8000.0;
|
||||
float iterati = (float) locallab.spots.at(sp).iter / 10.f;
|
||||
float iterati = (float) locallab.spots.at(sp).iter;
|
||||
|
||||
if (iterati > 4.f || iterati < 0.2f) {//to avoid artifacts if user does not clear cache with new settings Can be suppressed after
|
||||
iterati = 2.f;
|
||||
@ -476,9 +476,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
|
||||
float blurcolor = (float) locallab.spots.at(sp).blurcolde;
|
||||
int local_transit = locallab.spots.at(sp).transit;
|
||||
double radius = (double) locallab.spots.at(sp).radius;
|
||||
double sharradius = ((double) locallab.spots.at(sp).sharradius) / 100. ;
|
||||
double lcamount = ((double) locallab.spots.at(sp).lcamount) / 100. ;
|
||||
double sharblurr = ((double) locallab.spots.at(sp).sharblur) / 100. ;
|
||||
double sharradius = ((double) locallab.spots.at(sp).sharradius);
|
||||
double lcamount = ((double) locallab.spots.at(sp).lcamount) / 100.;
|
||||
double sharblurr = ((double) locallab.spots.at(sp).sharblur);
|
||||
int local_sensisha = locallab.spots.at(sp).sensisha;
|
||||
int local_sharamount = locallab.spots.at(sp).sharamount;
|
||||
int local_shardamping = locallab.spots.at(sp).shardamping;
|
||||
@ -603,7 +603,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall
|
||||
lp.shcomp = locallab.spots.at(sp).shcompr;
|
||||
lp.hlcomp = locallab.spots.at(sp).hlcompr;
|
||||
lp.hlcompthr = locallab.spots.at(sp).hlcomprthresh;
|
||||
lp.expcomp = locallab.spots.at(sp).expcomp / 100.;
|
||||
lp.expcomp = locallab.spots.at(sp).expcomp;
|
||||
printf("lp.expcomp=%f\n", lp.expcomp);
|
||||
lp.expchroma = locallab.spots.at(sp).expchroma / 100.;
|
||||
lp.sensex = local_sensiex;
|
||||
// lp.strucc = local_struc;
|
||||
@ -7089,10 +7090,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
// }
|
||||
|
||||
//sharpen only square area instaed of all image
|
||||
ImProcFunctions::deconvsharpeningloc(bufsh, hbuffer, bfw, bfh, loctemp, params->locallab.spots.at(sp).shardamping, (double)params->locallab.spots.at(sp).sharradius / 100., params->locallab.spots.at(sp).shariter, params->locallab.spots.at(sp).sharamount, params->locallab.spots.at(sp).sharcontrast, (double)params->locallab.spots.at(sp).sharblur / 100.);
|
||||
ImProcFunctions::deconvsharpeningloc(bufsh, hbuffer, bfw, bfh, loctemp, params->locallab.spots.at(sp).shardamping, (double)params->locallab.spots.at(sp).sharradius, params->locallab.spots.at(sp).shariter, params->locallab.spots.at(sp).sharamount, params->locallab.spots.at(sp).sharcontrast, (double)params->locallab.spots.at(sp).sharblur);
|
||||
} else { //call from dcrop.cc
|
||||
|
||||
ImProcFunctions::deconvsharpeningloc(original->L, shbuffer, bfw, bfh, loctemp, params->locallab.spots.at(sp).shardamping, (double)params->locallab.spots.at(sp).sharradius / 100., params->locallab.spots.at(sp).shariter, params->locallab.spots.at(sp).sharamount, params->locallab.spots.at(sp).sharcontrast, (double)params->locallab.spots.at(sp).sharblur / 100.);
|
||||
ImProcFunctions::deconvsharpeningloc(original->L, shbuffer, bfw, bfh, loctemp, params->locallab.spots.at(sp).shardamping, (double)params->locallab.spots.at(sp).sharradius, params->locallab.spots.at(sp).shariter, params->locallab.spots.at(sp).sharamount, params->locallab.spots.at(sp).sharcontrast, (double)params->locallab.spots.at(sp).sharblur);
|
||||
|
||||
}
|
||||
|
||||
@ -7105,7 +7106,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
int GH = original->H;
|
||||
JaggedArray<float> loctemp(GW, GH);
|
||||
|
||||
ImProcFunctions::deconvsharpeningloc(original->L, shbuffer, GW, GH, loctemp, params->locallab.spots.at(sp).shardamping, (double)params->locallab.spots.at(sp).sharradius / 100., params->locallab.spots.at(sp).shariter, params->locallab.spots.at(sp).sharamount, params->locallab.spots.at(sp).sharcontrast, (double)params->locallab.spots.at(sp).sharblur / 100.);
|
||||
ImProcFunctions::deconvsharpeningloc(original->L, shbuffer, GW, GH, loctemp, params->locallab.spots.at(sp).shardamping, (double)params->locallab.spots.at(sp).sharradius, params->locallab.spots.at(sp).shariter, params->locallab.spots.at(sp).sharamount, params->locallab.spots.at(sp).sharcontrast, (double)params->locallab.spots.at(sp).sharblur);
|
||||
|
||||
|
||||
InverseSharp_Local(loctemp, hueref, lumaref, chromaref, lp, original, transformed, cx, cy, sk);
|
||||
@ -7945,7 +7946,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
|
||||
|
||||
}
|
||||
//inverse
|
||||
else if (lp.invex && (lp.expcomp != 0 || lp.war != 0 || (exlocalcurve && localexutili)) && lp.exposena) {
|
||||
else if (lp.invex && (lp.expcomp != 0.0 || lp.war != 0 || (exlocalcurve && localexutili)) && lp.exposena) {
|
||||
float adjustr = 2.f;
|
||||
InverseColorLight_Local(sp, 1, lp, lightCurveloc, hltonecurveloc, shtonecurveloc, tonecurveloc, exlocalcurve, cclocalcurve, adjustr, localcutili, lllocalcurve, locallutili, original, transformed, cx, cy, hueref, chromaref, lumaref, sk);
|
||||
}
|
||||
|
@ -2355,7 +2355,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
qualityMethod("enh"),
|
||||
transit(60),
|
||||
thresh(2),
|
||||
iter(20),
|
||||
iter(2.0),
|
||||
// Color & Light
|
||||
expcolor(false),
|
||||
curvactiv(false),
|
||||
@ -2446,11 +2446,11 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
// Sharpening
|
||||
expsharp(false),
|
||||
sharcontrast(20),
|
||||
sharradius(40),
|
||||
sharradius(0.42),
|
||||
sharamount(75),
|
||||
shardamping(75),
|
||||
shariter(30),
|
||||
sharblur(20),
|
||||
sharblur(0.2),
|
||||
sensisha(19),
|
||||
inverssha(false),
|
||||
// Local Contrast
|
||||
|
@ -955,7 +955,7 @@ struct LocallabParams {
|
||||
Glib::ustring qualityMethod; // none, std, enh, enhsup, contr, sob2
|
||||
int transit;
|
||||
int thresh;
|
||||
int iter;
|
||||
double iter;
|
||||
// Color & Light
|
||||
bool expcolor;
|
||||
bool curvactiv;
|
||||
@ -1048,11 +1048,11 @@ struct LocallabParams {
|
||||
// Sharpening
|
||||
bool expsharp;
|
||||
int sharcontrast;
|
||||
int sharradius;
|
||||
double sharradius;
|
||||
int sharamount;
|
||||
int shardamping;
|
||||
int shariter;
|
||||
int sharblur;
|
||||
double sharblur;
|
||||
int sensisha;
|
||||
bool inverssha;
|
||||
// Local Contrast
|
||||
|
@ -58,7 +58,7 @@ ControlSpotPanel::ControlSpotPanel():
|
||||
circrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CIRCRADIUS"), 2, 150, 1, 18))),
|
||||
transit_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSIT"), 5, 95, 1, 60))),
|
||||
thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0, 8, 1, 2))),
|
||||
iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 2, 40, 1, 20))),
|
||||
iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 4., 0.1, 2.))),
|
||||
|
||||
lastObject_(-1),
|
||||
lastCoord_(new Coord()),
|
||||
@ -831,7 +831,8 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval)
|
||||
}
|
||||
|
||||
if (a == iter_) {
|
||||
row[spots_.iter] = (int) iter_->getValue();
|
||||
// row[spots_.iter] = (int) iter_->getValue();
|
||||
row[spots_.iter] = iter_->getValue();
|
||||
|
||||
if (listener) {
|
||||
listener->panelChanged(EvLocallabSpotIter, iter_->getTextValue());
|
||||
@ -1919,7 +1920,8 @@ void ControlSpotPanel::setDefaults(const ProcParams * defParams, const ParamsEdi
|
||||
circrad_->setDefault((double)defSpot->circrad);
|
||||
transit_->setDefault((double)defSpot->transit);
|
||||
thresh_->setDefault((double)defSpot->thresh);
|
||||
iter_->setDefault((double)defSpot->iter);
|
||||
// iter_->setDefault((double)defSpot->iter);
|
||||
iter_->setDefault(defSpot->iter);
|
||||
|
||||
// Set default edited states for adjusters
|
||||
if (!pedited) {
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
int qualityMethod; // 0 = Standard, 1 = Enhanced, 2 = Enhanced + chroma denoise
|
||||
int transit;
|
||||
int thresh;
|
||||
int iter;
|
||||
double iter;
|
||||
};
|
||||
|
||||
/**
|
||||
@ -273,7 +273,7 @@ private:
|
||||
Gtk::TreeModelColumn<int> qualityMethod; // 0 = Standard, 1 = Enhanced, 2 = Enhanced + chroma denoise
|
||||
Gtk::TreeModelColumn<int> transit;
|
||||
Gtk::TreeModelColumn<int> thresh;
|
||||
Gtk::TreeModelColumn<int> iter;
|
||||
Gtk::TreeModelColumn<double> iter;
|
||||
};
|
||||
|
||||
class RenameDialog:
|
||||
|
@ -82,7 +82,7 @@ Locallab::Locallab():
|
||||
blurcolde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))),
|
||||
blendmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))),
|
||||
// Exposure
|
||||
expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -200, 400, 5, 0))),
|
||||
expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -2.0, 4.0, 0.05, 0.0))),
|
||||
hlcompr(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 60))),
|
||||
hlcomprthresh(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 33))),
|
||||
black(Gtk::manage(new Adjuster(M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 50, 0))),
|
||||
@ -120,11 +120,11 @@ Locallab::Locallab():
|
||||
sensih(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIH"), 0, 100, 1, 15))),
|
||||
// Sharpening
|
||||
sharcontrast(Gtk::manage(new Adjuster(M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 20))),
|
||||
sharradius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARRADIUS"), 42, 500, 1, 4))),
|
||||
sharradius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARRADIUS"), 0.42, 3.50, 0.01, 0.42))),
|
||||
sharamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARAMOUNT"), 0, 100, 1, 100))),
|
||||
shardamping(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARDAMPING"), 0, 100, 1, 75))),
|
||||
shariter(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARITER"), 5, 100, 1, 30))),
|
||||
sharblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARBLUR"), 20, 200, 1, 20))),
|
||||
sharblur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SHARBLUR"), 0.2, 2.0, 0.1, 0.2))),
|
||||
sensisha(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSIS"), 0, 100, 1, 19))),
|
||||
// Local Contrast
|
||||
lcradius(Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_RADIUS"), 20, 200, 1, 80))),
|
||||
@ -1611,11 +1611,11 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
|
||||
// Sharpening
|
||||
pp->locallab.spots.at(pp->locallab.selspot).expsharp = expsharp->getEnabled();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sharcontrast = sharcontrast->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sharradius = sharradius->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sharradius = sharradius->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sharamount = sharamount->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).shardamping = shardamping->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).shariter = shariter->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sharblur = sharblur->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sharblur = sharblur->getValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).sensisha = sensisha->getIntValue();
|
||||
pp->locallab.spots.at(pp->locallab.selspot).inverssha = inverssha->get_active();
|
||||
// Local Contrast
|
||||
@ -2637,11 +2637,11 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe
|
||||
sensih->setDefault((double)defSpot->sensih);
|
||||
// Sharpening
|
||||
sharcontrast->setDefault((double)defSpot->sharcontrast);
|
||||
sharradius->setDefault((double)defSpot->sharradius);
|
||||
sharradius->setDefault(defSpot->sharradius);
|
||||
sharamount->setDefault((double)defSpot->sharamount);
|
||||
shardamping->setDefault((double)defSpot->shardamping);
|
||||
shariter->setDefault((double)defSpot->shariter);
|
||||
sharblur->setDefault((double)defSpot->sharblur);
|
||||
sharblur->setDefault(defSpot->sharblur);
|
||||
sensisha->setDefault((double)defSpot->sensisha);
|
||||
// Local Contrast
|
||||
lcradius->setDefault((double)defSpot->lcradius);
|
||||
|
Loading…
x
Reference in New Issue
Block a user