Dehaze improvrmrnt offset
This commit is contained in:
@@ -107,12 +107,12 @@ void RawImageSource::MSR(LabImage* lab, int width, int height, int skip, LCurveP
|
|||||||
float mean, stddv;
|
float mean, stddv;
|
||||||
float mini, delta, maxi;
|
float mini, delta, maxi;
|
||||||
float eps = 2.f;
|
float eps = 2.f;
|
||||||
float gain = (float) lcur.gain;//def =1 not use
|
//float gain = (float) lcur.gain;//def =1 not use
|
||||||
gain=1.f;
|
float gain=1.f;
|
||||||
float gain2 = (float) lcur.gain;//def =1 not use
|
float gain2 = (float) lcur.gain;//def =1 not use
|
||||||
gain2/=100.f;
|
gain2/=100.f;
|
||||||
float offset =(float) lcur.offs;//def = 0 not use
|
float offse =(float) lcur.offs;//
|
||||||
offset = 0.f;
|
float offset = 0.f;
|
||||||
float strength = (float) lcur.str;
|
float strength = (float) lcur.str;
|
||||||
int scal = lcur.scal;//def=3
|
int scal = lcur.scal;//def=3
|
||||||
int nei = (int) 2.5f*lcur.neigh;//def = 200
|
int nei = (int) 2.5f*lcur.neigh;//def = 200
|
||||||
@@ -227,7 +227,7 @@ float beta=16384.0f;
|
|||||||
#endif
|
#endif
|
||||||
for ( int i=0; i < H_L; i ++ )
|
for ( int i=0; i < H_L; i ++ )
|
||||||
for (int j=0; j< W_L; j++) {
|
for (int j=0; j< W_L; j++) {
|
||||||
float cd = gain2*32768.f * ( dst[i][j] - mini ) / delta;
|
float cd = gain2*32768.f * (( dst[i][j] - mini ) / delta) + offse;
|
||||||
src[i][j] = clipdehaz( cd, 0.f, 32768.f );
|
src[i][j] = clipdehaz( cd, 0.f, 32768.f );
|
||||||
lab->L[i][j]=((100.f - strength)* lab->L[i][j] + strength * src[i][j])/100.f;
|
lab->L[i][j]=((100.f - strength)* lab->L[i][j] + strength * src[i][j])/100.f;
|
||||||
}
|
}
|
||||||
|
@@ -251,7 +251,7 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"))
|
|||||||
scal = Gtk::manage (new Adjuster (M("TP_LABCURVE_SCAL"), 1, 6., 1., 3.));
|
scal = Gtk::manage (new Adjuster (M("TP_LABCURVE_SCAL"), 1, 6., 1., 3.));
|
||||||
neigh = Gtk::manage (new Adjuster (M("TP_LABCURVE_NEIGH"), 6, 100., 1., 80.));
|
neigh = Gtk::manage (new Adjuster (M("TP_LABCURVE_NEIGH"), 6, 100., 1., 80.));
|
||||||
gain = Gtk::manage (new Adjuster (M("TP_LABCURVE_GAIN"), 70, 130, 1, 100));
|
gain = Gtk::manage (new Adjuster (M("TP_LABCURVE_GAIN"), 70, 130, 1, 100));
|
||||||
offs = Gtk::manage (new Adjuster (M("TP_LABCURVE_OFFS"), 0, 40, 0.1, 0));
|
offs = Gtk::manage (new Adjuster (M("TP_LABCURVE_OFFS"), 0, 500, 1, 0));
|
||||||
vart = Gtk::manage (new Adjuster (M("TP_LABCURVE_VART"), 100, 160, 1, 125));
|
vart = Gtk::manage (new Adjuster (M("TP_LABCURVE_VART"), 100, 160, 1, 125));
|
||||||
dehazVBox->pack_start (*str);
|
dehazVBox->pack_start (*str);
|
||||||
str->show ();
|
str->show ();
|
||||||
@@ -268,8 +268,8 @@ LCurve::LCurve () : FoldableToolPanel(this, "labcurves", M("TP_LABCURVE_LABEL"))
|
|||||||
dehazVBox->pack_start (*gain);
|
dehazVBox->pack_start (*gain);
|
||||||
gain->show ();
|
gain->show ();
|
||||||
|
|
||||||
// dehazVBox->pack_start (*offs);
|
dehazVBox->pack_start (*offs);
|
||||||
// offs->show ();
|
offs->show ();
|
||||||
|
|
||||||
dehazVBox->pack_start (*vart);
|
dehazVBox->pack_start (*vart);
|
||||||
vart->show ();
|
vart->show ();
|
||||||
|
Reference in New Issue
Block a user