Fixed numerous bug and add Preview for mask and transmission
This commit is contained in:
parent
44490e81ae
commit
f74e4b0dd2
@ -666,6 +666,7 @@ HISTORY_MSG_433;Retinex - Mask TW shadows
|
|||||||
HISTORY_MSG_434;Retinex - Mask radius
|
HISTORY_MSG_434;Retinex - Mask radius
|
||||||
HISTORY_MSG_435;Retinex - Mask method
|
HISTORY_MSG_435;Retinex - Mask method
|
||||||
HISTORY_MSG_436;Retinex - Mask curve
|
HISTORY_MSG_436;Retinex - Mask curve
|
||||||
|
HISTORY_MSG_437;Retinex - Preview
|
||||||
HISTORY_NEWSNAPSHOT;Add
|
HISTORY_NEWSNAPSHOT;Add
|
||||||
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
|
HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: <b>Alt-s</b>
|
||||||
HISTORY_SNAPSHOTS;Snapshots
|
HISTORY_SNAPSHOTS;Snapshots
|
||||||
@ -1707,6 +1708,11 @@ TP_RETINEX_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbsciss
|
|||||||
TP_RETINEX_UNIFORM;Uniform
|
TP_RETINEX_UNIFORM;Uniform
|
||||||
TP_RETINEX_VARIANCE;Variance
|
TP_RETINEX_VARIANCE;Variance
|
||||||
TP_RETINEX_VARIANCE_TOOLTIP;Low variance increase local contrast and saturation, but can lead to artifacts.
|
TP_RETINEX_VARIANCE_TOOLTIP;Low variance increase local contrast and saturation, but can lead to artifacts.
|
||||||
|
TP_RETINEX_VIEW;Preview
|
||||||
|
TP_RETINEX_VIEW_NONE;Standard
|
||||||
|
TP_RETINEX_VIEW_MASK;Mask
|
||||||
|
TP_RETINEX_VIEW_TRAN;Transmission
|
||||||
|
TP_RETINEX_VIEW_METHOD_TOOLTIP;Standard - normal display\nMask - display mask\nTransmission - displays the file transmission-map , before any action on contrast and brightness\nAttention, this does not correspond to reality, but a shift to make it visible
|
||||||
TP_RGBCURVES_BLUE;B
|
TP_RGBCURVES_BLUE;B
|
||||||
TP_RGBCURVES_CHANNEL;Channel
|
TP_RGBCURVES_CHANNEL;Channel
|
||||||
TP_RGBCURVES_GREEN;G
|
TP_RGBCURVES_GREEN;G
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
virtual int load (Glib::ustring fname, bool batch = false) = 0;
|
virtual int load (Glib::ustring fname, bool batch = false) = 0;
|
||||||
virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse) {};
|
virtual void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse) {};
|
||||||
virtual void demosaic (const RAWParams &raw) {};
|
virtual void demosaic (const RAWParams &raw) {};
|
||||||
virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
|
virtual void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI) {};
|
||||||
virtual void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {};
|
virtual void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI) {};
|
||||||
virtual void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {};
|
virtual void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI) {};
|
||||||
virtual void flushRawData () {};
|
virtual void flushRawData () {};
|
||||||
|
@ -251,7 +251,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
|
|||||||
|
|
||||||
imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI);
|
imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI);
|
||||||
float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax;
|
float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax;
|
||||||
imgsrc->retinex( params.icm, params.retinex, params.toneCurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex
|
imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex
|
||||||
|
|
||||||
if(dehaListener) {
|
if(dehaListener) {
|
||||||
dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
||||||
|
@ -405,7 +405,12 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
if(deh.mapMethod=="mapT") mapmet=3;
|
if(deh.mapMethod=="mapT") mapmet=3;
|
||||||
if(deh.mapMethod=="curv") mapmet=1;
|
if(deh.mapMethod=="curv") mapmet=1;
|
||||||
if(deh.mapMethod=="gaus") mapmet=4;
|
if(deh.mapMethod=="gaus") mapmet=4;
|
||||||
|
double shradius = (double) deh.radius;
|
||||||
|
// printf("shrad=%f\n",shradius);
|
||||||
|
|
||||||
|
int viewmet=0;
|
||||||
|
if(deh.viewMethod=="mask") viewmet=1;
|
||||||
|
if(deh.viewMethod=="tran") viewmet=2;
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
@ -424,6 +429,13 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
out[i] = &outBuffer[i * W_L];
|
out[i] = &outBuffer[i * W_L];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float *tran[H_L] ALIGNED16;
|
||||||
|
float *tranBuffer = new float[H_L * W_L];
|
||||||
|
|
||||||
|
for (int i = 0; i < H_L; i++) {
|
||||||
|
tran[i] = &tranBuffer[i * W_L];
|
||||||
|
}
|
||||||
|
|
||||||
const float logBetaGain = xlogf(16384.f);
|
const float logBetaGain = xlogf(16384.f);
|
||||||
float pond = logBetaGain / (float) scal;
|
float pond = logBetaGain / (float) scal;
|
||||||
|
|
||||||
@ -451,8 +463,8 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
printf("..");
|
printf("..");
|
||||||
|
|
||||||
|
|
||||||
double shradius = deh.radius;
|
if(mapmet==4) shradius /= 1.;
|
||||||
if(mapmet==4) shradius /= 10.;
|
else shradius = 40.;
|
||||||
|
|
||||||
// if(shHighlights > 0 || shShadows > 0) {
|
// if(shHighlights > 0 || shShadows > 0) {
|
||||||
if(mapmet==3) if(it==1) shmap->updateL (out, shradius, true, 1);//wav Total
|
if(mapmet==3) if(it==1) shmap->updateL (out, shradius, true, 1);//wav Total
|
||||||
@ -488,7 +500,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if(shHighlights > 0 || shShadows > 0) {
|
// if(shHighlights > 0 || shShadows > 0) {
|
||||||
if((mapmet == 2 && scale >2) || mapmet==3 || mapmet==4) {
|
if(((mapmet == 2 && scale >2) || mapmet==3 || mapmet==4) && it==1) {
|
||||||
|
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
@ -545,6 +557,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
printf(".\n");
|
||||||
if(mapmet > 1) {
|
if(mapmet > 1) {
|
||||||
if(shmap) {
|
if(shmap) {
|
||||||
delete shmap;
|
delete shmap;
|
||||||
@ -553,7 +566,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
shmap = NULL;
|
shmap = NULL;
|
||||||
|
|
||||||
delete [] buffer;
|
delete [] buffer;
|
||||||
delete [] outBuffer;
|
// delete [] outBuffer;
|
||||||
delete [] srcBuffer;
|
delete [] srcBuffer;
|
||||||
|
|
||||||
mean = 0.f;
|
mean = 0.f;
|
||||||
@ -598,6 +611,7 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
}
|
}
|
||||||
|
|
||||||
luminance[i][j] *= (-1.f + 4.f * dehatransmissionCurve[absciss]); //new transmission
|
luminance[i][j] *= (-1.f + 4.f * dehatransmissionCurve[absciss]); //new transmission
|
||||||
|
tran[i][j]=luminance[i][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -713,8 +727,10 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(exLuminance[i][j] > 65535.f*hig && higplus) str *= hig;
|
if(exLuminance[i][j] > 65535.f*hig && higplus) str *= hig;
|
||||||
luminance[i][j] = clipretinex( cd, 0.f, 32768.f ) * str + (1.f - str) * originalLuminance[i][j];
|
if(viewmet==0) luminance[i][j]=clipretinex( cd, 0.f, 32768.f ) * str + (1.f - str) * originalLuminance[i][j];
|
||||||
|
if(viewmet==1) luminance[i][j] = out[i][j];
|
||||||
|
if(viewmet==2) luminance[i][j] = 1000.f+ tran[i][j]*700.f;//arbitrary values to help display log values which are between -20 to + 30 - usage values -4 + 5
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
@ -726,6 +742,11 @@ void RawImageSource::MSR(float** luminance, float** originalLuminance, float **e
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
delete [] outBuffer;
|
||||||
|
outBuffer = NULL;
|
||||||
|
delete [] tranBuffer;
|
||||||
|
tranBuffer = NULL;
|
||||||
|
|
||||||
// printf("cdmin=%f cdmax=%f\n",minCD, maxCD);
|
// printf("cdmin=%f cdmax=%f\n",minCD, maxCD);
|
||||||
Tmean = mean;
|
Tmean = mean;
|
||||||
Tsigma = stddv;
|
Tsigma = stddv;
|
||||||
|
@ -464,6 +464,8 @@ enum ProcEvent {
|
|||||||
EvLradius = 433,
|
EvLradius = 433,
|
||||||
EvmapMethod = 434,
|
EvmapMethod = 434,
|
||||||
EvRetinexmapcurve = 435,
|
EvRetinexmapcurve = 435,
|
||||||
|
EvviewMethod = 436,
|
||||||
|
|
||||||
NUMOFEVENTS
|
NUMOFEVENTS
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -163,6 +163,7 @@ void RetinexParams::setDefaults()
|
|||||||
// grbl = 50;
|
// grbl = 50;
|
||||||
retinexMethod = "high";
|
retinexMethod = "high";
|
||||||
mapMethod = "none";
|
mapMethod = "none";
|
||||||
|
viewMethod = "none";
|
||||||
retinexcolorspace = "Lab";
|
retinexcolorspace = "Lab";
|
||||||
gammaretinex = "none";
|
gammaretinex = "none";
|
||||||
medianmap = false;
|
medianmap = false;
|
||||||
@ -1526,6 +1527,10 @@ int ProcParams::save (Glib::ustring fname, Glib::ustring fname2, bool fnameAbsol
|
|||||||
keyFile.set_string ("Retinex", "mapMethod", retinex.mapMethod);
|
keyFile.set_string ("Retinex", "mapMethod", retinex.mapMethod);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pedited || pedited->retinex.viewMethod) {
|
||||||
|
keyFile.set_string ("Retinex", "viewMethod", retinex.viewMethod);
|
||||||
|
}
|
||||||
|
|
||||||
if (!pedited || pedited->retinex.retinexcolorspace) {
|
if (!pedited || pedited->retinex.retinexcolorspace) {
|
||||||
keyFile.set_string ("Retinex", "Retinexcolorspace", retinex.retinexcolorspace);
|
keyFile.set_string ("Retinex", "Retinexcolorspace", retinex.retinexcolorspace);
|
||||||
}
|
}
|
||||||
@ -3864,6 +3869,15 @@ int ProcParams::load (Glib::ustring fname, ParamsEdited* pedited)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (keyFile.has_key ("Retinex", "viewMethod")) {
|
||||||
|
retinex.viewMethod = keyFile.get_string ("Retinex", "viewMethod");
|
||||||
|
|
||||||
|
if (pedited) {
|
||||||
|
pedited->retinex.viewMethod = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (keyFile.has_key ("Retinex", "Retinexcolorspace")) {
|
if (keyFile.has_key ("Retinex", "Retinexcolorspace")) {
|
||||||
retinex.retinexcolorspace = keyFile.get_string ("Retinex", "Retinexcolorspace");
|
retinex.retinexcolorspace = keyFile.get_string ("Retinex", "Retinexcolorspace");
|
||||||
|
|
||||||
@ -7478,6 +7492,7 @@ bool ProcParams::operator== (const ProcParams& other)
|
|||||||
&& retinex.offs == other.retinex.offs
|
&& retinex.offs == other.retinex.offs
|
||||||
&& retinex.retinexMethod == other.retinex.retinexMethod
|
&& retinex.retinexMethod == other.retinex.retinexMethod
|
||||||
&& retinex.mapMethod == other.retinex.mapMethod
|
&& retinex.mapMethod == other.retinex.mapMethod
|
||||||
|
&& retinex.viewMethod == other.retinex.viewMethod
|
||||||
&& retinex.retinexcolorspace == other.retinex.retinexcolorspace
|
&& retinex.retinexcolorspace == other.retinex.retinexcolorspace
|
||||||
&& retinex.gammaretinex == other.retinex.gammaretinex
|
&& retinex.gammaretinex == other.retinex.gammaretinex
|
||||||
&& retinex.vart == other.retinex.vart
|
&& retinex.vart == other.retinex.vart
|
||||||
|
@ -294,6 +294,7 @@ public:
|
|||||||
Glib::ustring retinexcolorspace;
|
Glib::ustring retinexcolorspace;
|
||||||
Glib::ustring gammaretinex;
|
Glib::ustring gammaretinex;
|
||||||
Glib::ustring mapMethod;
|
Glib::ustring mapMethod;
|
||||||
|
Glib::ustring viewMethod;
|
||||||
int vart;
|
int vart;
|
||||||
int limd;
|
int limd;
|
||||||
int highl;
|
int highl;
|
||||||
|
@ -2122,7 +2122,7 @@ void RawImageSource::retinexPrepareCurves(RetinexParams retinexParams, LUTf &cdc
|
|||||||
}
|
}
|
||||||
|
|
||||||
//void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 3> &conversionBuffer, bool dehacontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI)
|
//void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 3> &conversionBuffer, bool dehacontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI)
|
||||||
void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI)
|
void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI)
|
||||||
{
|
{
|
||||||
|
|
||||||
MyTime t4, t5;
|
MyTime t4, t5;
|
||||||
@ -2274,7 +2274,7 @@ void RawImageSource::retinex(ColorManagementParams cmp, RetinexParams deh, ToneC
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MSR(LBuffer, conversionBuffer[2], conversionBuffer[3], cdcurve, mapcontlutili, WNew, HNew, deh, dehatransmissionCurve, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
MSR(LBuffer, conversionBuffer[2], conversionBuffer[3], mapcurve, mapcontlutili, WNew, HNew, deh, dehatransmissionCurve, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax);
|
||||||
|
|
||||||
if(useHsl) {
|
if(useHsl) {
|
||||||
if(chutili) {
|
if(chutili) {
|
||||||
|
@ -152,7 +152,7 @@ public:
|
|||||||
void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse);
|
void preprocess (const RAWParams &raw, const LensProfParams &lensProf, const CoarseTransformParams& coarse);
|
||||||
void demosaic (const RAWParams &raw);
|
void demosaic (const RAWParams &raw);
|
||||||
// void retinex (RAWParams raw, ColorManagementParams cmp, RetinexParams lcur, LUTf & cdcurve, bool dehacontlutili);
|
// void retinex (RAWParams raw, ColorManagementParams cmp, RetinexParams lcur, LUTf & cdcurve, bool dehacontlutili);
|
||||||
void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI);
|
void retinex (ColorManagementParams cmp, RetinexParams deh, ToneCurveParams Tc, LUTf & cdcurve, LUTf & mapcurve, const RetinextransmissionCurve & dehatransmissionCurve, multi_array2D<float, 4> &conversionBuffer, bool dehacontlutili, bool mapcontlutili, bool useHsl, float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax, LUTu &histLRETI);
|
||||||
void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI);
|
void retinexPrepareCurves (RetinexParams retinexParams, LUTf &cdcurve, LUTf &mapcurve, RetinextransmissionCurve &retinextransmissionCurve, bool &retinexcontlutili, bool &mapcontlutili, bool &useHsl, LUTu & lhist16RETI, LUTu & histLRETI);
|
||||||
void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI);
|
void retinexPrepareBuffers (ColorManagementParams cmp, RetinexParams retinexParams, multi_array2D<float, 4> &conversionBuffer, LUTu &lhist16RETI);
|
||||||
void flushRawData ();
|
void flushRawData ();
|
||||||
|
@ -440,13 +440,13 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
|||||||
RETINEX, // EvLstr
|
RETINEX, // EvLstr
|
||||||
RETINEX, // EvLscal
|
RETINEX, // EvLscal
|
||||||
RETINEX, // EvLvart
|
RETINEX, // EvLvart
|
||||||
RETINEX, // EvLCDCurve
|
DEMOSAIC, // EvLCDCurve
|
||||||
RETINEX, // EvRetinextransmission
|
RETINEX, // EvRetinextransmission
|
||||||
DEMOSAIC, // EvRetinexEnabled
|
DEMOSAIC, // EvRetinexEnabled
|
||||||
RETINEX, // EvRetinexmedianmap
|
RETINEX, // EvRetinexmedianmap
|
||||||
RETINEX, // EvLlimd
|
RETINEX, // EvLlimd
|
||||||
DEMOSAIC, // Evretinexcolorspace
|
DEMOSAIC, // Evretinexcolorspace
|
||||||
RETINEX, // EvLCDHCurve
|
DEMOSAIC, // EvLCDHCurve
|
||||||
DEMOSAIC, // Evretinexgamma
|
DEMOSAIC, // Evretinexgamma
|
||||||
DEMOSAIC, // EvLgam
|
DEMOSAIC, // EvLgam
|
||||||
DEMOSAIC, // EvLslope
|
DEMOSAIC, // EvLslope
|
||||||
@ -463,7 +463,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
|||||||
RETINEX, //EvLs_tonalwidth
|
RETINEX, //EvLs_tonalwidth
|
||||||
RETINEX, //EvLradius
|
RETINEX, //EvLradius
|
||||||
RETINEX, //EvmapMethod
|
RETINEX, //EvmapMethod
|
||||||
RETINEX //EvRetinexmapcurve
|
DEMOSAIC, //EvRetinexmapcurve
|
||||||
|
DEMOSAIC //EvviewMethod
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -242,23 +242,23 @@ void SHMap::updateL (float** L, double radius, bool hq, int skip)
|
|||||||
{
|
{
|
||||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
//experimental dirpyr shmap
|
//experimental dirpyr shmap
|
||||||
|
|
||||||
float thresh = (100.f * radius); //1000;
|
float thresh = (100.f * radius); //1000;
|
||||||
|
int levrad = 16;
|
||||||
|
levrad=2;//for retinex - otherwise levrad = 16
|
||||||
// set up range function
|
// set up range function
|
||||||
// calculate size of Lookup table. That's possible because from a value k for all i>=k rangefn[i] will be exp(-10)
|
// calculate size of Lookup table. That's possible because from a value k for all i>=k rangefn[i] will be exp(-10)
|
||||||
// So we use this fact and the automatic clip of lut to reduce the size of lut and the number of calculations to fill the lut
|
// So we use this fact and the automatic clip of lut to reduce the size of lut and the number of calculations to fill the lut
|
||||||
// In past this lut had only integer precision with rangefn[i] = 0 for all i>=k
|
// In past this lut had only integer precision with rangefn[i] = 0 for all i>=k
|
||||||
// We set the last element to a small epsilon 1e-15 instead of zero to avoid divisions by zero
|
// We set the last element to a small epsilon 1e-15 instead of zero to avoid divisions by zero
|
||||||
const int lutSize = thresh * sqrtf(10.f) + 1;
|
const int lutSize = (int) thresh * sqrtf(10.f) + 1;
|
||||||
thresh *= thresh;
|
thresh *= thresh;
|
||||||
LUTf rangefn(lutSize);
|
LUTf rangefn(lutSize);
|
||||||
|
|
||||||
for (int i = 0; i < lutSize - 1; i++) {
|
for (int i = 0; i < lutSize - 1; i++) {
|
||||||
rangefn[i] = xexpf(-min(10.f, (static_cast<float>(i) * i) / thresh )); //*intfactor;
|
rangefn[i] = xexpf(-min(10.f, (static_cast<float>(i) * i) / thresh )); //*intfactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
rangefn[lutSize - 1] = 1e-15f;
|
rangefn[lutSize - 1] = 1e-15f;
|
||||||
|
//printf("lut=%d rf5=%f rfm=%f\n thre=%f",lutSize, rangefn[5],rangefn[lutSize-10],thresh );
|
||||||
|
|
||||||
// We need one temporary buffer
|
// We need one temporary buffer
|
||||||
float ** buffer = allocArray<float> (W, H);
|
float ** buffer = allocArray<float> (W, H);
|
||||||
@ -271,7 +271,7 @@ void SHMap::updateL (float** L, double radius, bool hq, int skip)
|
|||||||
int numLevels = 2;
|
int numLevels = 2;
|
||||||
int scale = 2;
|
int scale = 2;
|
||||||
|
|
||||||
while (skip * scale < 16) {
|
while (skip * scale < levrad) {
|
||||||
scale *= 2;
|
scale *= 2;
|
||||||
numLevels++;
|
numLevels++;
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ void SHMap::updateL (float** L, double radius, bool hq, int skip)
|
|||||||
level ++;
|
level ++;
|
||||||
indx = 1 - indx;
|
indx = 1 - indx;
|
||||||
|
|
||||||
while (skip * scale < 16) {
|
while (skip * scale < levrad) {
|
||||||
dirpyr_shmap(dirpyrlo[indx], dirpyrlo[1 - indx], W, H, rangefn, level, scale );
|
dirpyr_shmap(dirpyrlo[indx], dirpyrlo[1 - indx], W, H, rangefn, level, scale );
|
||||||
scale *= 2;
|
scale *= 2;
|
||||||
level ++;
|
level ++;
|
||||||
@ -398,7 +398,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
||||||
__m128 dirwtv, valv, normv, dftemp1v, dftemp2v;
|
__m128 dirwtv, valv, normv, dftemp1v, dftemp2v, fg;
|
||||||
#endif // __SSE2__
|
#endif // __SSE2__
|
||||||
int j;
|
int j;
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
@ -414,6 +414,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i
|
|||||||
|
|
||||||
for(int inbr = max(i - scalewin, i % scale); inbr <= min(i + scalewin, height - 1); inbr += scale) {
|
for(int inbr = max(i - scalewin, i % scale); inbr <= min(i + scalewin, height - 1); inbr += scale) {
|
||||||
for (int jnbr = j % scale; jnbr <= j + scalewin; jnbr += scale) {
|
for (int jnbr = j % scale; jnbr <= j + scalewin; jnbr += scale) {
|
||||||
|
//printf("dat=%f ",abs(data_fine[inbr][jnbr] - data_fine[i][j]));
|
||||||
dirwt = ( rangefn[abs(data_fine[inbr][jnbr] - data_fine[i][j])] );
|
dirwt = ( rangefn[abs(data_fine[inbr][jnbr] - data_fine[i][j])] );
|
||||||
val += dirwt * data_fine[inbr][jnbr];
|
val += dirwt * data_fine[inbr][jnbr];
|
||||||
norm += dirwt;
|
norm += dirwt;
|
||||||
@ -504,7 +505,7 @@ SSEFUNCTION void SHMap::dirpyr_shmap(float ** data_fine, float ** data_coarse, i
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
#if defined( __SSE2__ ) && defined( __x86_64__ )
|
||||||
__m128 dirwtv, valv, normv, dftemp1v, dftemp2v;
|
__m128 dirwtv, valv, normv, dftemp1v, dftemp2v, fgg;
|
||||||
float domkerv[5][5][4] __attribute__ ((aligned (16))) = {{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}};
|
float domkerv[5][5][4] __attribute__ ((aligned (16))) = {{{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {2, 2, 2, 2}, {2, 2, 2, 2}, {2, 2, 2, 2}, {1, 1, 1, 1}}, {{1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}}};
|
||||||
|
|
||||||
#endif // __SSE2__
|
#endif // __SSE2__
|
||||||
|
@ -129,7 +129,7 @@ IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* p
|
|||||||
imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, dummy);
|
imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, dummy);
|
||||||
imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy );
|
imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy );
|
||||||
float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax;
|
float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax;
|
||||||
imgsrc->retinex( params.icm, params.retinex, params.toneCurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy);
|
imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pl) {
|
if (pl) {
|
||||||
|
@ -55,6 +55,7 @@ void ParamsEdited::set (bool v)
|
|||||||
retinex.lhcurve = v;
|
retinex.lhcurve = v;
|
||||||
retinex.retinexMethod = v;
|
retinex.retinexMethod = v;
|
||||||
retinex.mapMethod = v;
|
retinex.mapMethod = v;
|
||||||
|
retinex.viewMethod = v;
|
||||||
retinex.retinexcolorspace = v;
|
retinex.retinexcolorspace = v;
|
||||||
retinex.gammaretinex = v;
|
retinex.gammaretinex = v;
|
||||||
retinex.enabled = v;
|
retinex.enabled = v;
|
||||||
@ -544,6 +545,7 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
|||||||
retinex.transmissionCurve = retinex.transmissionCurve && p.retinex.transmissionCurve == other.retinex.transmissionCurve;
|
retinex.transmissionCurve = retinex.transmissionCurve && p.retinex.transmissionCurve == other.retinex.transmissionCurve;
|
||||||
retinex.retinexMethod = retinex.retinexMethod && p.retinex.retinexMethod == other.retinex.retinexMethod;
|
retinex.retinexMethod = retinex.retinexMethod && p.retinex.retinexMethod == other.retinex.retinexMethod;
|
||||||
retinex.mapMethod = retinex.mapMethod && p.retinex.mapMethod == other.retinex.mapMethod;
|
retinex.mapMethod = retinex.mapMethod && p.retinex.mapMethod == other.retinex.mapMethod;
|
||||||
|
retinex.viewMethod = retinex.viewMethod && p.retinex.viewMethod == other.retinex.viewMethod;
|
||||||
retinex.retinexcolorspace = retinex.retinexcolorspace && p.retinex.retinexcolorspace == other.retinex.retinexcolorspace;
|
retinex.retinexcolorspace = retinex.retinexcolorspace && p.retinex.retinexcolorspace == other.retinex.retinexcolorspace;
|
||||||
retinex.gammaretinex = retinex.gammaretinex && p.retinex.gammaretinex == other.retinex.gammaretinex;
|
retinex.gammaretinex = retinex.gammaretinex && p.retinex.gammaretinex == other.retinex.gammaretinex;
|
||||||
retinex.str = retinex.str && p.retinex.str == other.retinex.str;
|
retinex.str = retinex.str && p.retinex.str == other.retinex.str;
|
||||||
@ -1092,6 +1094,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
|||||||
toEdit.retinex.mapMethod = mods.retinex.mapMethod;
|
toEdit.retinex.mapMethod = mods.retinex.mapMethod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (retinex.viewMethod) {
|
||||||
|
toEdit.retinex.viewMethod = mods.retinex.viewMethod;
|
||||||
|
}
|
||||||
|
|
||||||
if (retinex.retinexcolorspace) {
|
if (retinex.retinexcolorspace) {
|
||||||
toEdit.retinex.retinexcolorspace = mods.retinex.retinexcolorspace;
|
toEdit.retinex.retinexcolorspace = mods.retinex.retinexcolorspace;
|
||||||
}
|
}
|
||||||
|
@ -71,6 +71,7 @@ public:
|
|||||||
bool offs;
|
bool offs;
|
||||||
bool retinexMethod;
|
bool retinexMethod;
|
||||||
bool mapMethod;
|
bool mapMethod;
|
||||||
|
bool viewMethod;
|
||||||
bool retinexcolorspace;
|
bool retinexcolorspace;
|
||||||
bool gammaretinex;
|
bool gammaretinex;
|
||||||
bool vart;
|
bool vart;
|
||||||
|
@ -195,6 +195,17 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
|
|||||||
s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80));
|
s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80));
|
||||||
radius = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_RADIUS"), 5, 100, 1, 40));
|
radius = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_RADIUS"), 5, 100, 1, 40));
|
||||||
|
|
||||||
|
viewbox = Gtk::manage (new Gtk::HBox ());
|
||||||
|
labview = Gtk::manage (new Gtk::Label (M("TP_RETINEX_VIEW") + ":"));
|
||||||
|
viewbox->pack_start (*labview, Gtk::PACK_SHRINK, 1);
|
||||||
|
|
||||||
|
viewMethod = Gtk::manage (new MyComboBoxText ());
|
||||||
|
viewMethod->append_text (M("TP_RETINEX_VIEW_NONE"));
|
||||||
|
viewMethod->append_text (M("TP_RETINEX_VIEW_MASK"));
|
||||||
|
viewMethod->append_text (M("TP_RETINEX_VIEW_TRAN"));
|
||||||
|
viewMethod->set_active(0);
|
||||||
|
viewMethodConn = viewMethod->signal_changed().connect ( sigc::mem_fun(*this, &Retinex::viewMethodChanged) );
|
||||||
|
viewMethod->set_tooltip_markup (M("TP_RETINEX_VIEW_METHOD_TOOLTIP"));
|
||||||
|
|
||||||
curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH"));
|
curveEditorGH = new CurveEditorGroup (options.lastRetinexDir, M("TP_RETINEX_CONTEDIT_LH"));
|
||||||
curveEditorGH->setCurveListener (this);
|
curveEditorGH->setCurveListener (this);
|
||||||
@ -292,6 +303,12 @@ Retinex::Retinex () : FoldableToolPanel(this, "retinex", M("TP_RETINEX_LABEL"),
|
|||||||
s_tonalwidth->show();
|
s_tonalwidth->show();
|
||||||
settingsVBox->pack_start (*radius);
|
settingsVBox->pack_start (*radius);
|
||||||
radius->show();
|
radius->show();
|
||||||
|
|
||||||
|
viewbox->pack_start(*viewMethod);
|
||||||
|
settingsVBox->pack_start(*viewbox);
|
||||||
|
|
||||||
|
//settingsVBox->pack_start (*viewMethod);
|
||||||
|
|
||||||
// settingsVBox->pack_start (*highl);
|
// settingsVBox->pack_start (*highl);
|
||||||
// highl->show ();
|
// highl->show ();
|
||||||
|
|
||||||
@ -481,6 +498,7 @@ void Retinex::neutral_pressed ()
|
|||||||
s_tonalwidth->resetValue(false);
|
s_tonalwidth->resetValue(false);
|
||||||
radius->resetValue(false);
|
radius->resetValue(false);
|
||||||
mapMethod->set_active(0);
|
mapMethod->set_active(0);
|
||||||
|
viewMethod->set_active(0);
|
||||||
retinexMethod->set_active(2);
|
retinexMethod->set_active(2);
|
||||||
retinexcolorspace->set_active(0);
|
retinexcolorspace->set_active(0);
|
||||||
gammaretinex->set_active(0);
|
gammaretinex->set_active(0);
|
||||||
@ -599,6 +617,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
retinexColorSpaceConn.block(true);
|
retinexColorSpaceConn.block(true);
|
||||||
gammaretinexConn.block(true);
|
gammaretinexConn.block(true);
|
||||||
mapMethodConn.block(true);
|
mapMethodConn.block(true);
|
||||||
|
viewMethodConn.block(true);
|
||||||
|
|
||||||
|
|
||||||
if (pedited) {
|
if (pedited) {
|
||||||
@ -633,6 +652,10 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
mapMethod->set_active_text(M("GENERAL_UNCHANGED"));
|
mapMethod->set_active_text(M("GENERAL_UNCHANGED"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!pedited->retinex.viewMethod) {
|
||||||
|
viewMethod->set_active_text(M("GENERAL_UNCHANGED"));
|
||||||
|
}
|
||||||
|
|
||||||
if (!pedited->retinex.retinexcolorspace) {
|
if (!pedited->retinex.retinexcolorspace) {
|
||||||
retinexcolorspace->set_active_text(M("GENERAL_UNCHANGED"));
|
retinexcolorspace->set_active_text(M("GENERAL_UNCHANGED"));
|
||||||
}
|
}
|
||||||
@ -712,6 +735,13 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
mapMethod->set_active (4);
|
mapMethod->set_active (4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pp->retinex.viewMethod == "none") {
|
||||||
|
viewMethod->set_active (0);
|
||||||
|
} else if (pp->retinex.viewMethod == "mask") {
|
||||||
|
viewMethod->set_active (1);
|
||||||
|
} else if (pp->retinex.viewMethod == "tran") {
|
||||||
|
viewMethod->set_active (2);
|
||||||
|
}
|
||||||
|
|
||||||
if (pp->retinex.retinexcolorspace == "Lab") {
|
if (pp->retinex.retinexcolorspace == "Lab") {
|
||||||
retinexcolorspace->set_active (0);
|
retinexcolorspace->set_active (0);
|
||||||
@ -737,6 +767,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
retinexColorSpaceChanged();
|
retinexColorSpaceChanged();
|
||||||
gammaretinexChanged();
|
gammaretinexChanged();
|
||||||
mapMethodChanged ();
|
mapMethodChanged ();
|
||||||
|
viewMethodChanged ();
|
||||||
|
|
||||||
medianmapConn.block(true);
|
medianmapConn.block(true);
|
||||||
medianmapChanged ();
|
medianmapChanged ();
|
||||||
@ -751,6 +782,7 @@ void Retinex::read (const ProcParams* pp, const ParamsEdited* pedited)
|
|||||||
retinexColorSpaceConn.block(false);
|
retinexColorSpaceConn.block(false);
|
||||||
gammaretinexConn.block(false);
|
gammaretinexConn.block(false);
|
||||||
mapMethodConn.block(false);
|
mapMethodConn.block(false);
|
||||||
|
viewMethodConn.block(false);
|
||||||
transmissionShape->setCurve (pp->retinex.transmissionCurve);
|
transmissionShape->setCurve (pp->retinex.transmissionCurve);
|
||||||
|
|
||||||
|
|
||||||
@ -796,6 +828,7 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pedited->retinex.retinexcolorspace = retinexcolorspace->get_active_text() != M("GENERAL_UNCHANGED");
|
pedited->retinex.retinexcolorspace = retinexcolorspace->get_active_text() != M("GENERAL_UNCHANGED");
|
||||||
pedited->retinex.gammaretinex = gammaretinex->get_active_text() != M("GENERAL_UNCHANGED");
|
pedited->retinex.gammaretinex = gammaretinex->get_active_text() != M("GENERAL_UNCHANGED");
|
||||||
pedited->retinex.mapMethod = mapMethod->get_active_text() != M("GENERAL_UNCHANGED");
|
pedited->retinex.mapMethod = mapMethod->get_active_text() != M("GENERAL_UNCHANGED");
|
||||||
|
pedited->retinex.viewMethod = viewMethod->get_active_text() != M("GENERAL_UNCHANGED");
|
||||||
|
|
||||||
//%%%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%%%
|
||||||
pedited->retinex.str = str->getEditedState ();
|
pedited->retinex.str = str->getEditedState ();
|
||||||
@ -853,6 +886,14 @@ void Retinex::write (ProcParams* pp, ParamsEdited* pedited)
|
|||||||
pp->retinex.mapMethod = "mapT";
|
pp->retinex.mapMethod = "mapT";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (viewMethod->get_active_row_number() == 0) {
|
||||||
|
pp->retinex.viewMethod = "none";
|
||||||
|
} else if (viewMethod->get_active_row_number() == 1) {
|
||||||
|
pp->retinex.viewMethod = "mask";
|
||||||
|
} else if (viewMethod->get_active_row_number() == 2) {
|
||||||
|
pp->retinex.viewMethod = "tran";
|
||||||
|
}
|
||||||
|
|
||||||
if (retinexcolorspace->get_active_row_number() == 0) {
|
if (retinexcolorspace->get_active_row_number() == 0) {
|
||||||
pp->retinex.retinexcolorspace = "Lab";
|
pp->retinex.retinexcolorspace = "Lab";
|
||||||
} else if (retinexcolorspace->get_active_row_number() == 1) {
|
} else if (retinexcolorspace->get_active_row_number() == 1) {
|
||||||
@ -894,20 +935,20 @@ void Retinex::retinexMethodChanged()
|
|||||||
void Retinex::mapMethodChanged()
|
void Retinex::mapMethodChanged()
|
||||||
{
|
{
|
||||||
|
|
||||||
if(mapMethod->get_active_row_number() >= 1) {
|
if(mapMethod->get_active_row_number() == 1 || mapMethod->get_active_row_number() == 2) {
|
||||||
curveEditormap->show();
|
curveEditormap->show();
|
||||||
highlights->show();
|
highlights->show();
|
||||||
h_tonalwidth->show();
|
h_tonalwidth->show();
|
||||||
shadows->show();
|
shadows->show();
|
||||||
s_tonalwidth->show();
|
s_tonalwidth->show();
|
||||||
radius->show();
|
radius->show();
|
||||||
/* } else if(mapMethod->get_active_row_number() == 1) {
|
} else if(mapMethod->get_active_row_number() == 3 || mapMethod->get_active_row_number() == 4) {
|
||||||
curveEditormap->show();
|
curveEditormap->show();
|
||||||
highlights->hide();
|
highlights->show();
|
||||||
h_tonalwidth->hide();
|
h_tonalwidth->show();
|
||||||
shadows->hide();
|
shadows->show();
|
||||||
s_tonalwidth->hide();
|
s_tonalwidth->show();
|
||||||
radius->hide();*/
|
radius->hide();
|
||||||
} else {
|
} else {
|
||||||
curveEditormap->hide();
|
curveEditormap->hide();
|
||||||
highlights->hide();
|
highlights->hide();
|
||||||
@ -923,6 +964,40 @@ void Retinex::mapMethodChanged()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Retinex::viewMethodChanged()
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
if(mapMethod->get_active_row_number() == 1 || mapMethod->get_active_row_number() == 2) {
|
||||||
|
curveEditormap->show();
|
||||||
|
highlights->show();
|
||||||
|
h_tonalwidth->show();
|
||||||
|
shadows->show();
|
||||||
|
s_tonalwidth->show();
|
||||||
|
radius->show();
|
||||||
|
} else if(mapMethod->get_active_row_number() == 3 || mapMethod->get_active_row_number() == 4) {
|
||||||
|
curveEditormap->show();
|
||||||
|
highlights->show();
|
||||||
|
h_tonalwidth->show();
|
||||||
|
shadows->show();
|
||||||
|
s_tonalwidth->show();
|
||||||
|
radius->hide();
|
||||||
|
} else {
|
||||||
|
curveEditormap->hide();
|
||||||
|
highlights->hide();
|
||||||
|
h_tonalwidth->hide();
|
||||||
|
shadows->hide();
|
||||||
|
s_tonalwidth->hide();
|
||||||
|
radius->hide();
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
if (listener) {
|
||||||
|
listener->panelChanged (EvviewMethod, viewMethod->get_active_text ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Retinex::ColorSpaceUpdateUI ()
|
void Retinex::ColorSpaceUpdateUI ()
|
||||||
{
|
{
|
||||||
if (!batchMode) {
|
if (!batchMode) {
|
||||||
|
@ -50,6 +50,8 @@ protected:
|
|||||||
Gtk::HBox* dhbox;
|
Gtk::HBox* dhbox;
|
||||||
Gtk::HBox* mapbox;
|
Gtk::HBox* mapbox;
|
||||||
Gtk::Label* labmap;
|
Gtk::Label* labmap;
|
||||||
|
Gtk::HBox* viewbox;
|
||||||
|
Gtk::Label* labview;
|
||||||
|
|
||||||
Gtk::Label* labgam;
|
Gtk::Label* labgam;
|
||||||
Gtk::HBox* gambox;
|
Gtk::HBox* gambox;
|
||||||
@ -60,6 +62,7 @@ protected:
|
|||||||
MyComboBoxText* retinexcolorspace;
|
MyComboBoxText* retinexcolorspace;
|
||||||
MyComboBoxText* gammaretinex;
|
MyComboBoxText* gammaretinex;
|
||||||
MyComboBoxText* mapMethod;
|
MyComboBoxText* mapMethod;
|
||||||
|
MyComboBoxText* viewMethod;
|
||||||
Gtk::CheckButton* medianmap;
|
Gtk::CheckButton* medianmap;
|
||||||
double nextmin;
|
double nextmin;
|
||||||
double nextmax;
|
double nextmax;
|
||||||
@ -78,7 +81,7 @@ protected:
|
|||||||
DiagonalCurveEditor* cdshapeH;
|
DiagonalCurveEditor* cdshapeH;
|
||||||
DiagonalCurveEditor* mapshape;
|
DiagonalCurveEditor* mapshape;
|
||||||
CurveEditorGroup* transmissionCurveEditorG;
|
CurveEditorGroup* transmissionCurveEditorG;
|
||||||
sigc::connection retinexMethodConn, neutralconn, mapMethodConn;
|
sigc::connection retinexMethodConn, neutralconn, mapMethodConn, viewMethodConn;
|
||||||
sigc::connection retinexColorSpaceConn;
|
sigc::connection retinexColorSpaceConn;
|
||||||
sigc::connection gammaretinexConn;
|
sigc::connection gammaretinexConn;
|
||||||
FlatCurveEditor* transmissionShape;
|
FlatCurveEditor* transmissionShape;
|
||||||
@ -108,6 +111,7 @@ public:
|
|||||||
void curveChanged (CurveEditor* ce);
|
void curveChanged (CurveEditor* ce);
|
||||||
void retinexMethodChanged();
|
void retinexMethodChanged();
|
||||||
void mapMethodChanged();
|
void mapMethodChanged();
|
||||||
|
void viewMethodChanged();
|
||||||
void retinexColorSpaceChanged();
|
void retinexColorSpaceChanged();
|
||||||
void gammaretinexChanged();
|
void gammaretinexChanged();
|
||||||
void ColorSpaceUpdateUI();
|
void ColorSpaceUpdateUI();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user