Bugfixes for tone curves.
This commit is contained in:
parent
3da66168b5
commit
3715bf42e3
@ -368,6 +368,7 @@ PARTIALPASTE_ICMSETTINGS;ICM settings
|
|||||||
PARTIALPASTE_IPTCINFO;IPTC info
|
PARTIALPASTE_IPTCINFO;IPTC info
|
||||||
PARTIALPASTE_LABCURVE;Luminance curve
|
PARTIALPASTE_LABCURVE;Luminance curve
|
||||||
PARTIALPASTE_LENSGROUP;Lens related settings
|
PARTIALPASTE_LENSGROUP;Lens related settings
|
||||||
|
PARTIALPASTE_LABCURVE;Lab curve
|
||||||
PARTIALPASTE_LUMADENOISE;Luminance noise reduction
|
PARTIALPASTE_LUMADENOISE;Luminance noise reduction
|
||||||
PARTIALPASTE_LUMINANCEGROUP;Luminance related settings
|
PARTIALPASTE_LUMINANCEGROUP;Luminance related settings
|
||||||
PARTIALPASTE_METAICMGROUP;Metadata/ICM settings
|
PARTIALPASTE_METAICMGROUP;Metadata/ICM settings
|
||||||
@ -626,7 +627,7 @@ TP_IMPULSEDENOISE_THRESH;Threshold
|
|||||||
TP_LABCURVE_BRIGHTNESS;Brightness
|
TP_LABCURVE_BRIGHTNESS;Brightness
|
||||||
TP_LABCURVE_CONTRAST;Contrast
|
TP_LABCURVE_CONTRAST;Contrast
|
||||||
TP_LABCURVE_CURVEEDITOR;Luminance Curve
|
TP_LABCURVE_CURVEEDITOR;Luminance Curve
|
||||||
TP_LABCURVE_LABEL;Luminance Curve
|
TP_LABCURVE_LABEL;Lab Curves
|
||||||
TP_LABCURVE_SATURATION;Saturation
|
TP_LABCURVE_SATURATION;Saturation
|
||||||
TP_LENSGEOM_AUTOCROP;Auto Crop
|
TP_LENSGEOM_AUTOCROP;Auto Crop
|
||||||
TP_LENSGEOM_FILL;Auto Fill
|
TP_LENSGEOM_FILL;Auto Fill
|
||||||
|
@ -730,12 +730,12 @@ void CurveFactory::complexCurve (double ecomp, double black, double hlcompr, dou
|
|||||||
|
|
||||||
std::vector<double> basecurvePoints;
|
std::vector<double> basecurvePoints;
|
||||||
basecurvePoints.push_back((double)((CurveType)NURBS));
|
basecurvePoints.push_back((double)((CurveType)NURBS));
|
||||||
float toex = black/a;
|
float toex = MIN(1,black/a);
|
||||||
float toey = black*(1-shcompr/100.0);
|
float toey = toex*a*(1-shcompr/100.0);
|
||||||
float shoulderx = toex+(1-toey)/a;
|
float shoulderx = toex+(1-toey)/a;//point in x at which line of slope a starting at toe point reaches y=1
|
||||||
float shouldery;
|
float shouldery;
|
||||||
if (shoulderx<1) {
|
if (shoulderx<1) {
|
||||||
shouldery = 1-(1-shoulderx)*(1-hlcompr/100.0);
|
shouldery = MAX(2*toey, 1-(1-shoulderx)*(1-hlcompr/100.0));
|
||||||
shoulderx = shoulderx - (1-shouldery)/a;
|
shoulderx = shoulderx - (1-shouldery)/a;
|
||||||
} else {
|
} else {
|
||||||
shoulderx = 1;
|
shoulderx = 1;
|
||||||
@ -748,15 +748,17 @@ void CurveFactory::complexCurve (double ecomp, double black, double hlcompr, dou
|
|||||||
basecurvePoints.push_back(toex); //toe point
|
basecurvePoints.push_back(toex); //toe point
|
||||||
basecurvePoints.push_back(toey); //value at toe point
|
basecurvePoints.push_back(toey); //value at toe point
|
||||||
|
|
||||||
basecurvePoints.push_back(0.25*toex+0.75*shoulderx); //toe point
|
if (toex<1) {
|
||||||
basecurvePoints.push_back(0.25*toey+0.75*shouldery); //value at toe point
|
basecurvePoints.push_back(0.25*toex+0.75*shoulderx); //toe point
|
||||||
|
basecurvePoints.push_back(0.25*toey+0.75*shouldery); //value at toe point
|
||||||
basecurvePoints.push_back(shoulderx); //shoulder point
|
|
||||||
basecurvePoints.push_back(shouldery); //value at shoulder point
|
|
||||||
|
|
||||||
basecurvePoints.push_back(1); // white point
|
|
||||||
basecurvePoints.push_back(1); // value at white point
|
|
||||||
|
|
||||||
|
basecurvePoints.push_back(shoulderx); //shoulder point
|
||||||
|
basecurvePoints.push_back(shouldery); //value at shoulder point
|
||||||
|
if (shoulderx<1) {
|
||||||
|
basecurvePoints.push_back(1); // white point
|
||||||
|
basecurvePoints.push_back(1); // value at white point
|
||||||
|
}
|
||||||
|
}
|
||||||
Curve* basecurve = NULL;
|
Curve* basecurve = NULL;
|
||||||
basecurve = new Curve (basecurvePoints, CURVES_MIN_POLY_POINTS/skip); // Actually, CURVES_MIN_POLY_POINTS = 1000,
|
basecurve = new Curve (basecurvePoints, CURVES_MIN_POLY_POINTS/skip); // Actually, CURVES_MIN_POLY_POINTS = 1000,
|
||||||
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||||
@ -767,12 +769,19 @@ void CurveFactory::complexCurve (double ecomp, double black, double hlcompr, dou
|
|||||||
brightcurvePoints.push_back(0); //black point. Value in [0 ; 1] range
|
brightcurvePoints.push_back(0); //black point. Value in [0 ; 1] range
|
||||||
brightcurvePoints.push_back(0); //black point. Value in [0 ; 1] range
|
brightcurvePoints.push_back(0); //black point. Value in [0 ; 1] range
|
||||||
|
|
||||||
brightcurvePoints.push_back(0.1); //toe point
|
if(br>0) {
|
||||||
brightcurvePoints.push_back(0.1+br/150.0); //value at toe point
|
brightcurvePoints.push_back(0.1); //toe point
|
||||||
|
brightcurvePoints.push_back(0.1+br/150.0); //value at toe point
|
||||||
|
|
||||||
brightcurvePoints.push_back(0.7); //shoulder point
|
brightcurvePoints.push_back(0.7); //shoulder point
|
||||||
brightcurvePoints.push_back(MIN(1.0,0.7+br/300.0)); //value at shoulder point
|
brightcurvePoints.push_back(MIN(1.0,0.7+br/300.0)); //value at shoulder point
|
||||||
|
} else {
|
||||||
|
brightcurvePoints.push_back(0.1+br/150.0); //toe point
|
||||||
|
brightcurvePoints.push_back(0.1); //value at toe point
|
||||||
|
|
||||||
|
brightcurvePoints.push_back(MIN(1.0,0.7+br/300.0)); //shoulder point
|
||||||
|
brightcurvePoints.push_back(0.7); //value at shoulder point
|
||||||
|
}
|
||||||
brightcurvePoints.push_back(1); // white point
|
brightcurvePoints.push_back(1); // white point
|
||||||
brightcurvePoints.push_back(1); // value at white point
|
brightcurvePoints.push_back(1); // value at white point
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ void Crop::update (int todo, bool internal) {
|
|||||||
parent->ipf.chrominanceCurve (laboCrop, labnCrop, 0, parent->chroma_acurve, 0, croph);
|
parent->ipf.chrominanceCurve (laboCrop, labnCrop, 0, parent->chroma_acurve, 0, croph);
|
||||||
parent->ipf.chrominanceCurve (laboCrop, labnCrop, 1, parent->chroma_bcurve, 0, croph);
|
parent->ipf.chrominanceCurve (laboCrop, labnCrop, 1, parent->chroma_bcurve, 0, croph);
|
||||||
|
|
||||||
parent->ipf.colorCurve (laboCrop, labnCrop);
|
parent->ipf.colorCurve (labnCrop, labnCrop);
|
||||||
|
|
||||||
if (skip==1) {
|
if (skip==1) {
|
||||||
parent->ipf.impulsedenoise (labnCrop);
|
parent->ipf.impulsedenoise (labnCrop);
|
||||||
|
@ -55,7 +55,7 @@ ToneCurve::ToneCurve () : ToolPanel(), expAdd(false), blackAdd(false), brAdd(fal
|
|||||||
pack_start (*hlcompr);
|
pack_start (*hlcompr);
|
||||||
|
|
||||||
//----------- Black Level ----------------------------------
|
//----------- Black Level ----------------------------------
|
||||||
black = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BLACKLEVEL"), 0, 32768, 1, 0));
|
black = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BLACKLEVEL"), 0, 16384, 1, 0));
|
||||||
pack_start (*black);
|
pack_start (*black);
|
||||||
shcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRSHADOWS"), -100, 100, 1, 0));
|
shcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRSHADOWS"), -100, 100, 1, 0));
|
||||||
pack_start (*shcompr);
|
pack_start (*shcompr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user