Improve selection deltaE
This commit is contained in:
parent
9635599c18
commit
bf58e43236
@ -2827,7 +2827,7 @@ static void mean_fab(int begx, int begy, int cx, int cy, int xEn, int yEn, LabIm
|
||||
fab = meanfab + multsigma * stddv;
|
||||
|
||||
if (fab <= 0.f) {
|
||||
fab = 10000.f;
|
||||
fab = 100.f;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3860,22 +3860,7 @@ void ImProcFunctions::transit_shapedetect(int senstype, LabImage * bufexporig, L
|
||||
}
|
||||
|
||||
if (previewcol || previewexp || previewSH) {
|
||||
clc = 200.f;
|
||||
|
||||
if (senstype == 1) {
|
||||
clc = 60.f;
|
||||
}
|
||||
|
||||
if (senstype == 0) {
|
||||
cla = 0.f;
|
||||
clb = 200.f;
|
||||
}
|
||||
|
||||
if (senstype == 1) {
|
||||
cla = 0.f;
|
||||
clb = 50.f;
|
||||
}
|
||||
|
||||
clc = settings->previewselection * 100.f;//between 100 and 10000 to obtain "good" result
|
||||
}
|
||||
|
||||
float reducdE = 0.f;
|
||||
@ -3979,12 +3964,19 @@ void ImProcFunctions::transit_shapedetect(int senstype, LabImage * bufexporig, L
|
||||
flia = flib = ((100.f + realstrchdE) / 100.f);
|
||||
} else if (senstype == 1) {
|
||||
// printf("rdE=%f chdE=%f", realstradE, realstrchdE);
|
||||
flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f;
|
||||
flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f;
|
||||
flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f;
|
||||
flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f;
|
||||
if (previewcol || previewexp || previewSH){
|
||||
flia = (100.f + realstradE + realstrchdE) / 100.f;
|
||||
flib = (100.f + realstrbdE + realstrchdE) / 100.f;
|
||||
}
|
||||
} else if (senstype == 0) {
|
||||
// printf("rdE=%f chdE=%f", realstradE, realstrchdE);
|
||||
flia = (100.f + 0.3f * lp.strengrid * realstradE + realstrchdE) / 100.f;
|
||||
flib = (100.f + 0.3f * lp.strengrid * realstrbdE + realstrchdE) / 100.f;
|
||||
if (previewcol || previewexp || previewSH){
|
||||
flia = (100.f + realstradE + realstrchdE) / 100.f;
|
||||
flib = (100.f + realstrbdE + realstrchdE) / 100.f;
|
||||
}
|
||||
}
|
||||
|
||||
difa = chra * flia - original->a[y][x];
|
||||
@ -4076,9 +4068,17 @@ void ImProcFunctions::transit_shapedetect(int senstype, LabImage * bufexporig, L
|
||||
} else if (senstype == 1) {
|
||||
flia = (100.f + realstradE + 100.f * realstrchdE) / 100.f;
|
||||
flib = (100.f + realstrbdE + 100.f * realstrchdE) / 100.f;
|
||||
if (previewcol || previewexp || previewSH){
|
||||
flia = (100.f + realstradE + realstrchdE) / 100.f;
|
||||
flib = (100.f + realstrbdE + realstrchdE) / 100.f;
|
||||
}
|
||||
} else if (senstype == 0) {
|
||||
flia = (100.f + 0.3f * lp.strengrid * realstradE + realstrchdE) / 100.f;
|
||||
flib = (100.f + 0.3f * lp.strengrid * realstrbdE + realstrchdE) / 100.f;
|
||||
if (previewcol || previewexp || previewSH){
|
||||
flia = (100.f + realstradE + realstrchdE) / 100.f;
|
||||
flib = (100.f + realstrbdE + realstrchdE) / 100.f;
|
||||
}
|
||||
}
|
||||
|
||||
difa = chra * flia - original->a[y][x];
|
||||
|
@ -84,6 +84,7 @@ public:
|
||||
double reduchigh;
|
||||
double reduclow;
|
||||
bool detectshape;
|
||||
int previewselection;
|
||||
|
||||
|
||||
Glib::ustring lensfunDbDirectory; ///< The directory containing the lensfun database. If empty, the system defaults will be used (as described in http://lensfun.sourceforge.net/manual/dbsearch.html)
|
||||
|
@ -592,6 +592,7 @@ void Options::setDefaults()
|
||||
rtSettings.reduchigh = 0.85;//transition for luminance in scope
|
||||
rtSettings.reduclow = 0.85;//transition for luminance out scope
|
||||
rtSettings.detectshape = true;//experimental new detection shape
|
||||
rtSettings.previewselection = 5;//betwen 1 to 40
|
||||
|
||||
// end locallab
|
||||
|
||||
@ -1614,6 +1615,10 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
|
||||
//if( keyFile.has_key ("Color Management", "Ciebadpixgauss")) rtSettings.ciebadpixgauss = keyFile.get_boolean("Color Management", "Ciebadpixgauss");
|
||||
|
||||
if (keyFile.has_key("Color Management", "Previewselection")) {//Intensity of preview selection deltaE
|
||||
rtSettings.previewselection = keyFile.get_integer("Color Management", "Previewselection");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (keyFile.has_group("ICC Profile Creator")) {
|
||||
@ -2196,6 +2201,7 @@ void Options::saveToFile(Glib::ustring fname)
|
||||
//keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab);
|
||||
//keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction);
|
||||
keyFile.set_string("Color Management", "ClutsDirectory", clutsDir);
|
||||
keyFile.set_integer("Color Management", "Previewselection", rtSettings.previewselection);
|
||||
|
||||
keyFile.set_string("ICC Profile Creator", "PimariesPreset", ICCPC_primariesPreset);
|
||||
keyFile.set_double("ICC Profile Creator", "RedPrimaryX", ICCPC_redPrimaryX);
|
||||
|
Loading…
x
Reference in New Issue
Block a user