Change microcontrast uniformity adjuster range, fixes #5129

This commit is contained in:
heckflosse 2019-01-01 17:36:17 +01:00
parent d43ccc5e81
commit b9942422e7
7 changed files with 16 additions and 8 deletions

View File

@ -12,7 +12,7 @@ Enabled=true
Contrast=15
Matrix=false
Strength=20
Uniformity=50
Uniformity=5
[RAW]
CA=true

View File

@ -12,7 +12,7 @@ Enabled=true
Contrast=15
Matrix=false
Strength=20
Uniformity=50
Uniformity=5
[RAW]
CA=true

View File

@ -643,7 +643,7 @@ BENCHFUN
const int k = params->sharpenMicro.matrix ? 1 : 2;
// k=2 matrix 5x5 k=1 matrix 3x3
const int width = W, height = H;
const int unif = params->sharpenMicro.uniformity / 10.0f; //put unif between 0 to 10
const int unif = params->sharpenMicro.uniformity;
const float amount = (k == 1 ? 2.7f : 1.f) * params->sharpenMicro.amount / 1500.0f; //amount 2000.0 quasi no artifacts ==> 1500 = maximum, after artifacts, 25/9 if 3x3
if (settings->verbose) {

View File

@ -1149,7 +1149,7 @@ SharpenMicroParams::SharpenMicroParams() :
matrix(false),
amount(20.0),
contrast(20.0),
uniformity(50.0)
uniformity(5)
{
}
@ -3962,7 +3962,13 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
pedited->sharpenMicro.contrast = true;
}
}
assignFromKeyfile(keyFile, "SharpenMicro", "Uniformity", pedited, sharpenMicro.uniformity, pedited->sharpenMicro.uniformity);
if (ppVersion >= 346) {
assignFromKeyfile(keyFile, "SharpenMicro", "Uniformity", pedited, sharpenMicro.uniformity, pedited->sharpenMicro.uniformity);
} else {
double temp;
assignFromKeyfile(keyFile, "SharpenMicro", "Uniformity", pedited, temp, pedited->sharpenMicro.uniformity);
sharpenMicro.uniformity = temp / 10;
}
}
if (keyFile.has_group("Vibrance")) {

View File

@ -531,7 +531,7 @@ struct SharpenMicroParams {
bool matrix;
double amount;
double contrast;
double uniformity;
int uniformity;
SharpenMicroParams();

View File

@ -1,11 +1,13 @@
#pragma once
// This number has to be incremented whenever the PP3 file format is modified or the behaviour of a tool changes
#define PPVERSION 345
#define PPVERSION 346
#define PPVERSION_AEXP 301 //value of PPVERSION when auto exposure algorithm was modified
/*
Log of version changes
346 2019-01-01
changed microcontrast uniformity
345 2018-10-21
dual demosaic auto contrast threshold
344 2018-10-04

View File

@ -40,7 +40,7 @@ SharpenMicro::SharpenMicro () : FoldableToolPanel(this, "sharpenmicro", M("TP_SH
amount->setAdjusterListener (this);
amount->show();
uniformity = Gtk::manage(new Adjuster (M("TP_SHARPENMICRO_UNIFORMITY"), 0, 100, 10, 50));
uniformity = Gtk::manage(new Adjuster (M("TP_SHARPENMICRO_UNIFORMITY"), 0, 10, 1, 5));
uniformity->setAdjusterListener (this);
uniformity->show();