Improvments to local retinex

This commit is contained in:
Desmis
2019-05-22 12:33:13 +02:00
parent 73ec1a8b83
commit beb033aff5
2 changed files with 4 additions and 4 deletions

View File

@@ -893,7 +893,7 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b
const float high = 0.f; // Dummy to pass to retinex_scales(...)
constexpr auto maxRetinexScales = 8;
constexpr auto maxRetinexScales = 10;
float RetinexScales[maxRetinexScales];
retinex_scales(RetinexScales, scal, moderetinex, nei, high);
@@ -1197,9 +1197,9 @@ void ImProcFunctions::MSRLocal(int sp, int lum, LabImage * bufreti, LabImage * b
guid[i][j] = src[i][j]/32768.f;
ble[i][j] = luminance[i][j]/32768.f;
}
double epsilon = 4. * 1e-5 / (double) scal;
if (loc.spots.at(sp).softradiusret > 0.f) {
guidedFilter(guid, ble, ble, loc.spots.at(sp).softradiusret * 10.f / skip, 1e-5, multiThread, 4);
guidedFilter(guid, ble, ble, loc.spots.at(sp).softradiusret * 10.f / skip, epsilon, multiThread, 4);
}
#ifdef _OPENMP

View File

@@ -161,7 +161,7 @@ Locallab::Locallab():
chromaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))),
gammaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))),
slomaskreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))),
scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 1.0, 8.0, 1., 4.))),
scalereti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCALERETI"), 1.0, 10.0, 1., 4.))),
darkness(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DARKRETI"), 0.01, 3.0, 0.01, 1.))),
lightnessreti(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LIGHTRETI"), 0.01, 3.0, 0.01, 1.))),
limd(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESRETI"), 1.2, 100.0, 0.1, 8.))),