Difference in brightness with CIECAM02 issue2510

This commit is contained in:
jdc
2014-11-05 13:30:09 +01:00
parent ec0fef8b13
commit 3f5199396c
6 changed files with 29 additions and 2 deletions

View File

@@ -783,6 +783,10 @@ PREFERENCES_GREY23;Yb=23 CIE L#55
PREFERENCES_GREY30;Yb=30 CIE L#60
PREFERENCES_GREY40;Yb=40 CIE L#70
PREFERENCES_GREY;Output device's Yb luminance (%)
PREFERENCES_GREYSC;Scene Yb luminance (%)
PREFERENCES_GREY05;Yb=05 CIE L#30
PREFERENCES_GREYSCA;Automatic
PREFERENCES_GREYSC18;Yb=18 CIE L#50
PREFERENCES_HISTOGRAMPOSITIONLEFT;Histogram in left panel
PREFERENCES_HISTOGRAMWORKING;Use working profile for main histogram and Navigator
PREFERENCES_HISTOGRAM_TOOLTIP;If enabled, the working profile is used for rendering the main histogram and the Navigator panel, otherwise the gamma-corrected output profile is used.

View File

@@ -437,6 +437,7 @@ if(params->colorappearance.enabled) {
ColorTemp::curveJ (qbri, qcontra, 1, CAMBrightCurveQ, hist16Q);//brightness and contrast Q
}
}
if(settings->viewinggreySc==0){//auto
if (mean<15.f) yb=3.0;
else if(mean<30.f) yb=5.0;
else if(mean<40.f) yb=10.0;
@@ -448,6 +449,8 @@ if(params->colorappearance.enabled) {
else if(mean<80.f) yb=60.0;
else if(mean<90.f) yb=80.0;
else yb=90.0;
}
if(settings->viewinggreySc==1) yb=18.0;
int gamu=0;
bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated
@@ -1397,7 +1400,7 @@ if(params->colorappearance.enabled) {
}
}
if(settings->viewinggreySc==0){//auto
if (mean<15.f) yb=3.0f;
else if(mean<30.f) yb=5.0f;
else if(mean<40.f) yb=10.0f;
@@ -1409,6 +1412,9 @@ if(params->colorappearance.enabled) {
else if(mean<80.f) yb=60.0f;
else if(mean<90.f) yb=80.0f;
else yb=90.0f;
}
if(settings->viewinggreySc==1) yb=18.0f;//fixed
const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated

View File

@@ -28,6 +28,7 @@ namespace rtengine {
int colorimetricIntent; ///< Colorimetric intent used at color space conversions
int viewingdevice; // white of output device (D50...D65..)
int viewingdevicegrey; // level of grey output device
int viewinggreySc; // level of grey Scene
Glib::ustring monitorProfile; ///< ICC profile of the monitor (full path recommended)
bool autoMonitorProfile; ///< Try to auto-determine the correct monitor color profile

View File

@@ -518,6 +518,7 @@ void Options::setDefaults () {
rtSettings.colorimetricIntent = 1;
rtSettings.viewingdevice=0;
rtSettings.viewingdevicegrey=3;
rtSettings.viewinggreySc=1;
rtSettings.monitorProfile = "";
rtSettings.autoMonitorProfile = false;
@@ -783,6 +784,7 @@ if (keyFile.has_group ("Color Management")) {
if (keyFile.has_key ("Color Management", "DenoiseLabgamma"))rtSettings.denoiselabgamma = keyFile.get_integer("Color Management", "DenoiseLabgamma");
if (keyFile.has_key ("Color Management", "view")) rtSettings.viewingdevice = keyFile.get_integer("Color Management", "view");
if (keyFile.has_key ("Color Management", "grey")) rtSettings.viewingdevicegrey = keyFile.get_integer("Color Management", "grey");
if (keyFile.has_key ("Color Management", "greySc")) rtSettings.viewinggreySc = keyFile.get_integer("Color Management", "greySc");
if (keyFile.has_key ("Color Management", "CBDLArtif")) rtSettings.artifact_cbdl = keyFile.get_double("Color Management", "CBDLArtif");
if (keyFile.has_key ("Color Management", "CBDLlevel0")) rtSettings.level0_cbdl = keyFile.get_double("Color Management", "CBDLlevel0");
if (keyFile.has_key ("Color Management", "CBDLlevel123")) rtSettings.level123_cbdl = keyFile.get_double("Color Management", "CBDLlevel123");
@@ -1087,6 +1089,7 @@ int Options::saveToFile (Glib::ustring fname) {
keyFile.set_integer ("Color Management", "Intent", rtSettings.colorimetricIntent);
keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice);
keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey);
keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc);
keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe);
keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto);

View File

@@ -582,16 +582,26 @@ Gtk::Widget* Preferences::getColorManagementPanel () {
grey->append_text (M("PREFERENCES_GREY30"));
grey->append_text (M("PREFERENCES_GREY40"));
Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M("PREFERENCES_GREYSC")+":", Gtk::ALIGN_LEFT));
greySc = Gtk::manage (new Gtk::ComboBoxText ());
greySc->append_text (M("PREFERENCES_GREYSCA"));
greySc->append_text (M("PREFERENCES_GREYSC18"));
Gtk::Label* restartNeeded1 = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
Gtk::Label* restartNeeded2 = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
Gtk::Label* restartNeeded3 = Gtk::manage( new Gtk::Label (Glib::ustring(" (") + M("PREFERENCES_APPLNEXTSTARTUP") + ")") );
Gtk::Table* colo = Gtk::manage (new Gtk::Table (2, 3));
Gtk::Table* colo = Gtk::manage (new Gtk::Table (3, 3));
colo->attach (*viewlab, 0, 1, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
colo->attach (*view, 1, 2, 0, 1, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2);
colo->attach (*restartNeeded1, 2, 3, 0, 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
colo->attach (*greylab, 0, 1, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2);
colo->attach (*grey, 1, 2, 1, 2, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2);
colo->attach (*restartNeeded2, 2, 3, 1, 2, Gtk::FILL, Gtk::SHRINK, 2, 2);
colo->attach (*greySclab, 0, 1, 2, 3, Gtk::FILL, Gtk::SHRINK, 2, 2);
colo->attach (*greySc, 1, 2, 2, 3, Gtk::EXPAND | Gtk::FILL | Gtk::SHRINK, Gtk::SHRINK, 2, 2);
colo->attach (*restartNeeded3, 2, 3, 2, 3, Gtk::FILL, Gtk::SHRINK, 2, 2);
mvbcm->pack_start (*colo, Gtk::PACK_SHRINK, 4);
Gtk::Label* cielab = Gtk::manage (new Gtk::Label (M("PREFERENCES_CIEART")+":", Gtk::ALIGN_LEFT));
@@ -1215,6 +1225,7 @@ void Preferences::storePreferences () {
moptions.rtSettings.colorimetricIntent = intent->get_active_row_number ();
moptions.rtSettings.viewingdevice = view->get_active_row_number ();
moptions.rtSettings.viewingdevicegrey = grey->get_active_row_number ();
moptions.rtSettings.viewinggreySc = greySc->get_active_row_number ();
// moptions.rtSettings.autocielab = cbAutocielab->get_active ();
moptions.rtSettings.ciecamfloat = cbciecamfloat->get_active ();
moptions.rtSettings.HistogramWorking = ckbHistogramWorking->get_active ();
@@ -1316,6 +1327,7 @@ void Preferences::fillPreferences () {
intent->set_active (moptions.rtSettings.colorimetricIntent);
view->set_active (moptions.rtSettings.viewingdevice);
grey->set_active (moptions.rtSettings.viewingdevicegrey);
greySc->set_active (moptions.rtSettings.viewinggreySc);
// cbAutocielab->set_active (moptions.rtSettings.autocielab);
cbciecamfloat->set_active (moptions.rtSettings.ciecamfloat);
ckbHistogramWorking->set_active (moptions.rtSettings.HistogramWorking);

View File

@@ -94,6 +94,7 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener {
Gtk::ComboBoxText* intent;
Gtk::ComboBoxText* view;
Gtk::ComboBoxText* grey;
Gtk::ComboBoxText* greySc;
Gtk::ComboBoxText* theme;
Gtk::CheckButton* slimUI;