Merge branch 'dev' into spot-removal-tool

This commit is contained in:
Ingo Weyrich
2020-11-24 17:16:41 +01:00
257 changed files with 79066 additions and 10075 deletions

View File

@@ -47,6 +47,17 @@ class WavOpacityCurveSH;
class WavOpacityCurveRG;
class WavOpacityCurveW;
class WavOpacityCurveWL;
class LocretigainCurve;
class LocretigainCurverab;
class LocLHCurve;
class LocHHCurve;
class LocCHCurve;
class LocLLmaskCurve;
class LocCCmaskCurve;
class LocHHmaskCurve;
class LocLLmaskexpCurve;
class LocCCmaskexpCurve;
class LocHHmaskexpCurve;
enum RenderingIntent : int {
RI_PERCEPTUAL = INTENT_PERCEPTUAL,
@@ -105,6 +116,12 @@ public:
}
}
template<typename U = T>
typename std::enable_if<std::is_integral<U>::value, bool>::type operator !=(const Threshold<U>& rhs) const
{
return !(*this == rhs);
}
T getBottom() const
{
return bottom_left;
@@ -320,6 +337,7 @@ struct RetinexParams {
int stonalwidth;
int radius;
Glib::ustring complexmethod;
Glib::ustring retinexMethod;
Glib::ustring retinexcolorspace;
Glib::ustring gammaretinex;
@@ -404,7 +422,6 @@ struct RGBCurvesParams {
/**
* Parameters of the Color Toning
*/
struct ColorToningParams {
bool enabled;
bool autosat;
@@ -492,6 +509,7 @@ struct ColorToningParams {
void getCurves(ColorGradientCurve& colorCurveLUT, OpacityCurve& opacityCurveLUT, const double xyz_rgb[3][3], bool& opautili) const;
};
/**
* Parameters of the sharpening
*/
@@ -531,8 +549,10 @@ struct SharpenEdgeParams {
bool operator ==(const SharpenEdgeParams& other) const;
bool operator !=(const SharpenEdgeParams& other) const;
};
struct SharpenMicroParams {
bool enabled;
bool matrix;
@@ -653,6 +673,7 @@ struct ColorAppearanceParams {
TcMode curveMode;
TcMode curveMode2;
CtcMode curveMode3;
Glib::ustring complexmethod;
Glib::ustring surround;
Glib::ustring surrsrc;
@@ -912,8 +933,26 @@ struct LensProfParams {
* Parameters of the perspective correction
*/
struct PerspectiveParams {
Glib::ustring method;
bool render;
double horizontal;
double vertical;
double camera_crop_factor;
double camera_focal_length;
double camera_pitch;
double camera_roll;
double camera_shift_horiz;
double camera_shift_vert;
double camera_yaw;
double projection_pitch;
double projection_rotate;
double projection_shift_horiz;
double projection_shift_vert;
double projection_yaw;
/** A line is stored as 4 integers in this order: x1, y1, x2, y2 */
std::vector<int> control_line_values;
/** 0 is vertical, 1 is horizontal, undefined otherwise. */
std::vector<int> control_line_types;
PerspectiveParams();
@@ -938,6 +977,538 @@ struct GradientParams {
bool operator !=(const GradientParams& other) const;
};
/**
* Parameters of the Local Lab
*/
struct LocallabParams {
struct LocallabSpot {
// Control spot settings
Glib::ustring name;
bool isvisible;
Glib::ustring prevMethod; // show, hide
Glib::ustring shape; // ELI, RECT
Glib::ustring spotMethod; // norm, exc
Glib::ustring wavMethod; // D2, D4, D6, D10, D14
int sensiexclu;
int structexclu;
double struc;
Glib::ustring shapeMethod; // IND, SYM, INDSL, SYMSL
std::vector<int> loc; // For ellipse/rectangle: {locX, locXL, locY, locYT}
int centerX;
int centerY;
int circrad;
Glib::ustring qualityMethod; // none, std, enh, enhsup, contr, sob2
Glib::ustring complexMethod; // sim, mod, all
double transit;
double feather;
double thresh;
double iter;
double balan;
double balanh;
double colorde;
double colorscope;
double transitweak;
double transitgrad;
bool hishow;
bool activ;
bool avoid;
bool blwh;
bool recurs;
bool laplac;
bool deltae;
bool shortc;
bool savrest;
int scopemask;
int lumask;
// Color & Light
bool visicolor;
bool expcolor;
int complexcolor;
bool curvactiv;
int lightness;
int contrast;
int chroma;
double labgridALow;
double labgridBLow;
double labgridAHigh;
double labgridBHigh;
double labgridALowmerg;
double labgridBLowmerg;
double labgridAHighmerg;
double labgridBHighmerg;
int strengthgrid;
int sensi;
int structcol;
double strcol;
double strcolab;
double strcolh;
double angcol;
int blurcolde;
double blurcol;
double contcol;
int blendmaskcol;
double radmaskcol;
double chromaskcol;
double gammaskcol;
double slomaskcol;
int shadmaskcol;
double strumaskcol;
double lapmaskcol;
Glib::ustring qualitycurveMethod; // none, std
Glib::ustring gridMethod; // one, two
Glib::ustring merMethod; // mone, mtwo, mthr, mfou, mfiv
Glib::ustring toneMethod; // one, two, thr, fou
Glib::ustring mergecolMethod; // one, two, thr, fou, fiv, six, sev, sev0, sev1, sev2, hei, nin, ten, ele, twe, thi, for, hue, sat, col, lum
std::vector<double> llcurve;
std::vector<double> lccurve;
std::vector<double> cccurve;
std::vector<double> clcurve;
std::vector<double> rgbcurve;
std::vector<double> LHcurve;
std::vector<double> HHcurve;
std::vector<double> CHcurve;
bool invers;
bool special;
bool toolcol;
bool enaColorMask;
bool fftColorMask;
std::vector<double> CCmaskcurve;
std::vector<double> LLmaskcurve;
std::vector<double> HHmaskcurve;
std::vector<double> HHhmaskcurve;
double softradiuscol;
double opacol;
double mercol;
double merlucol;
double conthrcol;
std::vector<double> Lmaskcurve;
std::vector<double> LLmaskcolcurvewav;
Threshold<int> csthresholdcol;
// Exposure
bool visiexpose;
bool expexpose;
int complexexpose;
double expcomp;
int hlcompr;
int hlcomprthresh;
int black;
int shadex;
int shcompr;
int expchroma;
int sensiex;
int structexp;
int blurexpde;
double strexp;
double angexp;
std::vector<double> excurve;
bool inversex;
bool enaExpMask;
bool enaExpMaskaft;
std::vector<double> CCmaskexpcurve;
std::vector<double> LLmaskexpcurve;
std::vector<double> HHmaskexpcurve;
int blendmaskexp;
double radmaskexp;
double chromaskexp;
double gammaskexp;
double slomaskexp;
double lapmaskexp;
double strmaskexp;
double angmaskexp;
double softradiusexp;
std::vector<double> Lmaskexpcurve;
Glib::ustring expMethod; // std, pde
Glib::ustring exnoiseMethod; // none, med, medhi
double laplacexp;
double balanexp;
double linear;
double gamm;
double fatamount;
double fatdetail;
double fatanchor;
double fatlevel;
// Shadow highlight
bool visishadhigh;
bool expshadhigh;
int complexshadhigh;
Glib::ustring shMethod; // std, tone
int multsh[5];
int highlights;
int h_tonalwidth;
int shadows;
int s_tonalwidth;
int sh_radius;
int sensihs;
bool enaSHMask;
std::vector<double> CCmaskSHcurve;
std::vector<double> LLmaskSHcurve;
std::vector<double> HHmaskSHcurve;
int blendmaskSH;
double radmaskSH;
int blurSHde;
double strSH;
double angSH;
bool inverssh;
double chromaskSH;
double gammaskSH;
double slomaskSH;
double lapmaskSH;
int detailSH;
std::vector<double> LmaskSHcurve;
double fatamountSH;
double fatanchorSH;
double gamSH;
double sloSH;
// Vibrance
bool visivibrance;
bool expvibrance;
int complexvibrance;
int saturated;
int pastels;
int warm;
Threshold<int> psthreshold;
bool protectskins;
bool avoidcolorshift;
bool pastsattog;
int sensiv;
std::vector<double> skintonescurve;
std::vector<double> CCmaskvibcurve;
std::vector<double> LLmaskvibcurve;
std::vector<double> HHmaskvibcurve;
bool enavibMask;
int blendmaskvib;
double radmaskvib;
double chromaskvib;
double gammaskvib;
double slomaskvib;
double lapmaskvib;
double strvib;
double strvibab;
double strvibh;
double angvib;
std::vector<double> Lmaskvibcurve;
// Soft Light
bool visisoft;
bool expsoft;
int complexsoft;
int streng;
int sensisf;
double laplace;
Glib::ustring softMethod; // soft, reti
// Blur & Noise
bool visiblur;
bool expblur;
int complexblur;
double radius;
int strength;
int sensibn;
int itera;
int guidbl;
int strbl;
int isogr;
int strengr;
int scalegr;
int epsbl;
Glib::ustring blMethod; // blur, med, guid
Glib::ustring chroMethod; // lum, chr, all
Glib::ustring quamethod; // cons agre
Glib::ustring blurMethod; // norm, inv
Glib::ustring medMethod; // none, 33, 55, 77, 99
bool activlum;
double noiselumf;
double noiselumf0;
double noiselumf2;
double noiselumc;
double noiselumdetail;
int noiselequal;
double noisechrof;
double noisechroc;
double noisechrodetail;
int adjblur;
int bilateral;
int sensiden;
int detailthr;
std::vector<double> locwavcurveden;
Glib::ustring showmaskblMethodtyp;
std::vector<double> CCmaskblcurve;
std::vector<double> LLmaskblcurve;
std::vector<double> HHmaskblcurve;
bool enablMask;
bool fftwbl;
bool invbl;
bool toolbl;
int blendmaskbl;
double radmaskbl;
double chromaskbl;
double gammaskbl;
double slomaskbl;
double lapmaskbl;
int shadmaskbl;
int shadmaskblsha;
double strumaskbl;
std::vector<double> Lmaskblcurve;
std::vector<double> LLmaskblcurvewav;
Threshold<int> csthresholdblur;
// Tone Mapping
bool visitonemap;
bool exptonemap;
int complextonemap;
double stren;
double gamma;
double estop;
double scaltm;
int rewei;
double satur;
int sensitm;
double softradiustm;
double amount;
bool equiltm;
std::vector<double> CCmasktmcurve;
std::vector<double> LLmasktmcurve;
std::vector<double> HHmasktmcurve;
bool enatmMask;
bool enatmMaskaft;
int blendmasktm;
double radmasktm;
double chromasktm;
double gammasktm;
double slomasktm;
double lapmasktm;
std::vector<double> Lmasktmcurve;
// Retinex
bool visireti;
bool expreti;
int complexreti;
Glib::ustring retinexMethod; // low, uni, high
double str;
double chrrt;
double neigh;
double vart;
double offs;
int dehaz;
int depth;
int sensih;
std::vector<double> localTgaincurve;
std::vector<double> localTtranscurve;
bool inversret;
bool equilret;
bool loglin;
double dehazeSaturation;
double softradiusret;
std::vector<double> CCmaskreticurve;
std::vector<double> LLmaskreticurve;
std::vector<double> HHmaskreticurve;
bool enaretiMask;
bool enaretiMasktmap;
int blendmaskreti;
double radmaskreti;
double chromaskreti;
double gammaskreti;
double slomaskreti;
double lapmaskreti;
double scalereti;
double darkness;
double lightnessreti;
double limd;
double cliptm;
bool fftwreti;
std::vector<double> Lmaskreticurve;
// Sharpening
bool visisharp;
bool expsharp;
int complexsharp;
int sharcontrast;
double sharradius;
int sharamount;
int shardamping;
int shariter;
double sharblur;
int sensisha;
bool inverssha;
// Local Contrast
bool visicontrast;
bool expcontrast;
int complexcontrast;
int lcradius;
double lcamount;
double lcdarkness;
double lclightness;
double sigmalc;
int levelwav;
double residcont;
double residsha;
double residshathr;
double residhi;
double residhithr;
double residblur;
double levelblur;
double sigmabl;
double residchro;
double residcomp;
double sigma;
double offset;
double sigmadr;
double threswav;
double chromalev;
double chromablu;
double sigmadc;
double deltad;
double fatres;
double clarilres;
double claricres;
double clarisoft;
double sigmalc2;
double strwav;
double angwav;
double strengthw;
double sigmaed;
double radiusw;
double detailw;
double gradw;
double tloww;
double thigw;
double edgw;
double basew;
int sensilc;
bool fftwlc;
bool blurlc;
bool wavblur;
bool wavedg;
bool waveshow;
bool wavcont;
bool wavcomp;
bool wavgradl;
bool wavcompre;
bool origlc;
Glib::ustring localcontMethod; // loc, wav
Glib::ustring localedgMethod; // fir, sec, thr
Glib::ustring localneiMethod; // none, low, high
std::vector<double> locwavcurve;
Threshold<int> csthreshold;
std::vector<double> loclevwavcurve;
std::vector<double> locconwavcurve;
std::vector<double> loccompwavcurve;
std::vector<double> loccomprewavcurve;
std::vector<double> locedgwavcurve;
std::vector<double> CCmasklccurve;
std::vector<double> LLmasklccurve;
std::vector<double> HHmasklccurve;
bool enalcMask;
int blendmasklc;
double radmasklc;
double chromasklc;
std::vector<double> Lmasklccurve;
// Contrast by detail levels
bool visicbdl;
bool expcbdl;
int complexcbdl;
double mult[6];
double chromacbdl;
double threshold;
int sensicb;
double clarityml;
int contresid;
double softradiuscb;
bool enacbMask;
std::vector<double> CCmaskcbcurve;
std::vector<double> LLmaskcbcurve;
std::vector<double> HHmaskcbcurve;
int blendmaskcb;
double radmaskcb;
double chromaskcb;
double gammaskcb;
double slomaskcb;
double lapmaskcb;
std::vector<double> Lmaskcbcurve;
// Log encoding
bool visilog;
bool explog;
int complexlog;
bool autocompute;
double sourceGray;
double sourceabs;
double targabs;
double targetGray;
double catad;
double saturl;
double lightl;
double lightq;
double contl;
double contq;
double colorfl;
std::vector<double> LcurveL;
bool Autogray;
bool fullimage;
double repar;
bool ciecam;
double blackEv;
double whiteEv;
double detail;
int sensilog;
Glib::ustring sursour;
Glib::ustring surround;
double baselog;
double strlog;
double anglog;
std::vector<double> CCmaskcurveL;
std::vector<double> LLmaskcurveL;
std::vector<double> HHmaskcurveL;
bool enaLMask;
double blendmaskL;
double radmaskL;
double chromaskL;
std::vector<double> LmaskcurveL;
// mask
bool visimask;
int complexmask;
bool expmask;
int sensimask;
double blendmask;
double blendmaskab;
double softradiusmask;
bool enamask;
bool fftmask;
double blurmask;
double contmask;
std::vector<double> CCmask_curve;
std::vector<double> LLmask_curve;
std::vector<double> HHmask_curve;
double strumaskmask;
bool toolmask;
double radmask;
double lapmask;
double chromask;
double gammask;
double slopmask;
double shadmask;
int str_mask;
int ang_mask;
std::vector<double> HHhmask_curve;
std::vector<double> Lmask_curve;
std::vector<double> LLmask_curvewav;
Threshold<int> csthresholdmask;
LocallabSpot();
bool operator ==(const LocallabSpot& other) const;
bool operator !=(const LocallabSpot& other) const;
};
static const double LABGRIDL_CORR_MAX;
static const double LABGRIDL_CORR_SCALE;
static const double LABGRIDL_DIRECT_SCALE;
bool enabled;
int selspot;
std::vector<LocallabSpot> spots;
LocallabParams();
bool operator ==(const LocallabParams& other) const;
bool operator !=(const LocallabParams& other) const;
};
/**
* Parameters of the post-crop vignette filter
*/
@@ -1223,6 +1794,8 @@ private:
struct WaveletParams {
std::vector<double> ccwcurve;
std::vector<double> wavdenoise;
std::vector<double> wavdenoiseh;
std::vector<double> blcurve;
std::vector<double> levelshc;
std::vector<double> opacityCurveRG;
@@ -1231,6 +1804,8 @@ struct WaveletParams {
std::vector<double> opacityCurveW;
std::vector<double> opacityCurveWL;
std::vector<double> hhcurve;
std::vector<double> wavguidcurve;
std::vector<double> wavhuecurve;
std::vector<double> Chcurve;
std::vector<double> wavclCurve;
bool enabled;
@@ -1245,6 +1820,10 @@ struct WaveletParams {
int greenhigh;
int bluehigh;
double ballum;
double sigm;
double levden;
double thrden;
double limden;
double balchrom;
double chromfi;
double chromco;
@@ -1252,6 +1831,9 @@ struct WaveletParams {
double mergeC;
double softrad;
double softradend;
double strend;
int detend;
double thrend;
bool lipst;
bool avoid;
@@ -1289,6 +1871,11 @@ struct WaveletParams {
Glib::ustring CLmethod;
Glib::ustring Backmethod;
Glib::ustring Tilesmethod;
Glib::ustring complexmethod;
Glib::ustring denmethod;
Glib::ustring mixmethod;
Glib::ustring slimethod;
Glib::ustring quamethod;
Glib::ustring daubcoeffmethod;
Glib::ustring CHmethod;
Glib::ustring Medgreinf;
@@ -1346,6 +1933,8 @@ struct WaveletParams {
Threshold<double> level1noise;
Threshold<double> level2noise;
Threshold<double> level3noise;
Threshold<double> leveldenoise;
Threshold<double> levelsigm;
WaveletParams();
@@ -1354,6 +1943,8 @@ struct WaveletParams {
void getCurves(
WavCurve& cCurve,
WavCurve& wavdenoise,
WavCurve& wavdenoiseh,
Wavblcurve& tCurve,
WavOpacityCurveRG& opacityCurveLUTRG,
WavOpacityCurveSH& opacityCurveLUTSH,
@@ -1424,9 +2015,9 @@ struct SoftLightParams {
struct DehazeParams {
bool enabled;
int strength;
int saturation;
bool showDepthMap;
int depth;
bool luminance;
DehazeParams();
@@ -1444,10 +2035,13 @@ struct RAWParams {
struct BayerSensor {
enum class Method {
AMAZE,
AMAZEBILINEAR,
AMAZEVNG4,
RCD,
RCDBILINEAR,
RCDVNG4,
DCB,
DCBBILINEAR,
DCBVNG4,
LMMSE,
IGV,
@@ -1626,10 +2220,28 @@ struct FilmNegativeParams {
double greenExp;
double blueRatio;
double redBase;
double greenBase;
double blueBase;
struct RGB {
float r, g, b;
bool operator ==(const RGB& other) const;
bool operator !=(const RGB& other) const;
RGB operator *(const RGB& other) const;
};
RGB refInput;
RGB refOutput;
enum class ColorSpace {
INPUT = 0,
WORKING
// TODO : add support for custom color profile
};
ColorSpace colorSpace;
enum class BackCompat { CURRENT = 0, V1, V2 };
BackCompat backCompat;
FilmNegativeParams();
bool operator ==(const FilmNegativeParams& other) const;
@@ -1671,6 +2283,7 @@ public:
LensProfParams lensProf; ///< Lens correction profile parameters
PerspectiveParams perspective; ///< Perspective correction parameters
GradientParams gradient; ///< Gradient filter parameters
LocallabParams locallab; ///< Local lab parameters
PCVignetteParams pcvignette; ///< Post-crop vignette filter parameters
CACorrParams cacorrection; ///< Lens c/a correction parameters
VignettingParams vignetting; ///< Lens vignetting correction parameters