Local Adjustments - Cam16 - lacam16n2 (new) (#7010)

* Restore settings and options

* Clean code and windows.yml

* Gui improvment

* Fixed wrong value maxicam

* Change GUI TRC and Log encoding and sigmoid

* Clean code locallabtools2

* Fomat locallabtools2

* New calcualtion gray when using Q

* Improve sigmoid Q with meanQ

* Change labels and tooltip

* Change DR with log

* Change location GUI TRC

* Change GUI sigmoid hide - show

* Fixed bug with trc

* Added whites to TRC & whites

* Small modification whites - comment code

* Change GUI and selection for sigmoid and log encoding Q

* Change yml worksflow

* Added cat to workingtrc rtthumbnail

* Delete entries in defualt languages

* Blacks and whites distribution

* Change tooltips

* Fixed some issues

* Change GUI hide to set_sensitive

* first step white and black log encoding

* GUI Labels - tooltips

* Compress brightness log encoding

* Change compression threshold

* Clean procparams

* Improve GUI and threshold compression

* Improvment GUI and tooltips

* First step primaries cam16

* Primaries loc step 2

* Primaries loc step 3

* jdcmax primaries - format iplab2rgb

* Improve GUI

* Beta RGB primaries and message

* Change tooltips

* Change order prim

* CIExy diagram step 1

* CIExy step 2

* CIExy step 2

* CIExy diagram step 4

* CIExy diagram step 5

* Change improccordinator and locallabtool2s listener

* Forgoten delete in improccordinator

* Disable setListener

* Improve GUI and behavior TRC and Primaries

* TRC primaries - illuminant step 1

* TRC primaries - illuminant step 2

* TRC primaries - illuminant step 3

* TRC primaries - illuminant step 4

* Gamut control - remove old listener and added listener locallabcieLC

* publish pre dev labels windows appimage

* publish pre dev labels windows appimage []

* Move log encoding cie - step 1

* Step 2

* Move Log encoding CIE and improve GUI step 3

* Pre Ciecam midtones step 1

* Mid tones step 2 and tooltips

* Forgoten label and tooltips

* Improve tooltips - and change yml files

* Include repository in appimage and windows.yml - change labels

* Forgotten surroundcie in procparams.cc

* Improve GUI with expander - clean code

* Change tooltip

* Clean locallabtools2 - improve Jpro

* Bypass Ciecam step 1

* step 2

* Step 3

* Change settings - improve GUI

* Clean code

* Improve sigmoid cam16

* Improve sigmoid cam16

* Added illuminant E to illmethod

* Change iccmatrices

* Working profile JDCmax stdA and Abstract Profile

* Pre-ciecam JDCmax stdA

* Abstract profile - cat method step 1

* Step 3

* Step 4 and various changes

* Enable default gamutcontrol - improve GUI

* Refine color pre-ciecam

* Step 2

* step 3

* Step - 4

* Refine colors Abstract profiles

* Expander true Abstract Profile

* Clean and comment code

* Tooltip pre-ciecam

* Change tooltips

* Improve GUI free primaries

* Labgrid dominant color

* Shift dominant color step 1

* Shift xy dominant color

* History msg shift

* Fixed various bad behavior - change scalrefi

* Improve behavior DR vs deltaE - log encoding and pre-ciecam

* Limited reduce deltaE to 1 - comment code

* Improve behavior TIF/JPG

* Forgotten code

* Various small changes to refinement color pre-ciecam

* Foramt iplab2rgb and simpleprocees - small change meanx meany

* Bad behavior with simpleprocess abstract profile and pre-ciecam

* Re-enable code for simpleprocess

* Iprove iplab2rgb

* Improve GUI if selection Jz

* provis with precision

* Chnage GUI log encoding basic - improve shiftxl shiftyl pre-ciecam

* Improve GUI with expanders

* Change location pre-ciecam expander

* Change label tooltip pre-ciecam

* Improve white distribution and equalizer

* Bad behavior Source data adjustments

* Comment code

* Improve Dynamic Range Compression - for some images with very high DR

* Clean code

* Improve TM fattal with saturation control in LA

* saturation control fattal LA

* RE-order paramsedit

* Change local contrast in LA - log encoding and Cam16

* LA settings avoidcolorshift XYZabsolute

* Change GUI precision blackEv WhiteEv BlackEvjz WhiteEvjz

* Check button smoothcie - smooth highlights

* Change order midtones - log encoding - other method smooth

* Change maximum gamma in TRC cam16

* Change maximum slope in TRC cam16

* refine smooth highlights

* Small improvment - comment code

* Bad behavior - black screen - in Cam16

* setLogscale for slopjcie

* Change source data GUI - PQ and other DR functions

* PQ mode advanced - adjustments and tooltip

* Comment and clean code

* Simplified GUI in Basic mode - Source Data Adjustments

* Added primaries to source date adjustements - fix basic problem

* GUI graduaded filter cie cam16

* Graduated filter - LA Color appearance

* More illuminant cam16 - D120 - Tungsten 2000K - Tungsten 1500K

* Abstract profile ICM - shift x - shift y

* Frame color dominant Abstract profile

* Frame color dominant Abstract profile

* Illuminant E - abstract profile

* Abstact profile - midtones

* Abstrcat profile - smooth highlights checkbutton

* Abstract Profile - Smooth highligts rtengine

* Bad behavior LA gamut - re-enabled Munsell in settings

* adapts Abstract profile and auto-match tone curve

* Change chromaticity curve c(h) - ppversion 351 and procparams

* icmpanel fixed bad wmidtcie

* Change in procparams assignfromkeyfile color Management

* Remove message in console

* Missing code procparams.cc wcat

* Clean message in console

* Disable ppversion 351 - surround extremely dark

* Choice surround scene Disable ciecam

* Improve GUI for surround Disable Ciecam

* Small change gamutcontrol - message g0..g5 verbose

* Remove gautcontrol on limits

* Strength log encoding - Source data adjustments

* Fixed genral bug in lacam16n - bad behavior color

* Checkbutton saturation control - Cam16 log encoding

* Change default saturation controle log encoding - false

* GUI LA Log encoding - Strength - saturation control - part 1

* Checkbox saturation control LA Log encoding

* Change repartition GUI brightnees - hue - chroma

* Hide primaries and illuminant in standard mode

* Merge with dev 2

* reduces sigmoid Q contrast

* Provisory disable Sigmoid Q

* Re-enable sigmoid function complexity mode

* Re-enable log encoding Q - with Ciecam

* GUI improvments - small code improvments

* Change tooltip

* Simplify GUI mode Basic - Standard - added tooltip

* Change tooltip - LA settings - Avoid color shift

* hope to fix the bug between Jz and Cam16

* Another change for Jz - format astyle locallabtool2.cc

* Clean code GUI - remove Zcam

* Change label in Recovery based on luminance mask

* Reduces minimum spot size from 2 to 1.5

* Improve behavior GUI with Jzczhz

* Clean code iplocallab.cc

* Small improvement ciecam02.cc

* Fixed bad behvior GUI and code between Cam16 and Jzczhz

* Improve Jz and surround effects

* Improve Jz and Local contrast Cam16 & Jz taking account surround

* Disable local contrast if cam16 and not ciecam surround

* Restore epsil 0.001 loccont

* Improve local contrast when surround low and Jz

* Clean code locallabtool2 - weakened a little Local Contrast in connection with surround

* Remove Laplacian threshold in Cam16 and JzCzHz mask

* Simplify Mask for JzCzHz

* Enable choice complexity mask in mode advanced

* Solved bad behavior GUI masks

* Optimize GUI mask Jz and cam16

* Change 3 icon .png without png

* Remove wrong message in console without problem

* Remove warning with & in some tooltips and TP_WBALANCE_AUTO_HEADER

* Smoothcie Method GUI

* Replace checkbutton smooth highlight bya combobox

* Improve behavior GUI - CIECAM - advanced - tempout and greenout

* Fixed - I hope - crash when delete spot and cam16

* Clean code with maxcam and dependencies

* Added Smooth highlight rolloff or not

* Improve smooth lights - gamma mode only - standard and advanced - gray balance

* Improve Smoothing lights - take into account the 2 Yb

* Change tooltip

* Chnage wrong lable scope => slope

* Clean and comment code

* Reduces the effect of - Smoothing light -Ev mode - Small change range Slope

* Scale Yb scene white whiteEv

* Hide Scale in some GUI cases

* Clean comment code Smotth and TM function

* Change GUI - Smooth highlights and tone mapping - allows also Basic

* Change labels

* Change tooltip

* Remove arrow.cur in windows.yml as suggested by Lawrence37

* Reverse last changes

* Change limits slope based in SDA

* Clean locallabtools2.cc

* Set minimum slope based to 0.6

* Change label highlight

* Change listener scene parameters to GUI

* Clean code sine changes listener

* Limits Blackev Whiteev values in slope base to avoid crash

* Change a little limits BlackEv WhiteEv

* Small changes in console - remove warnings

* Change XYZ relative - avoid color shift

* Improve gamutmap

* re build gamutmap
This commit is contained in:
Desmis 2024-04-15 07:47:19 +02:00 committed by GitHub
parent 73fb89147c
commit 8e312d9c02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
41 changed files with 9618 additions and 3737 deletions

View File

@ -15,7 +15,7 @@ on:
workflow_dispatch:
env:
publish_pre_dev_labels: '[]'
publish_pre_dev_labels: '["Beep6581:lacam16n2"]'
jobs:
build:

View File

@ -15,7 +15,7 @@ on:
workflow_dispatch:
env:
publish_pre_dev_labels: '[]'
publish_pre_dev_labels: '["Beep6581:lacam16n2"]'
jobs:
build:

View File

@ -1311,7 +1311,7 @@ HISTORY_MSG_1078;Local - Red and skin protection
HISTORY_MSG_1079;Local - CIECAM Sigmoid strength J
HISTORY_MSG_1080;Local - CIECAM Sigmoid threshold
HISTORY_MSG_1081;Local - CIECAM Sigmoid blend
HISTORY_MSG_1082;Local - CIECAM Sigmoid Q BlackEv WhiteEv
HISTORY_MSG_1082;Local - CIECAM Auto threshold
HISTORY_MSG_1083;Local - CIECAM Hue
HISTORY_MSG_1084;Local - Uses Black Ev - White Ev
HISTORY_MSG_1085;Local - Jz lightness
@ -1427,22 +1427,79 @@ HISTORY_MSG_ICL_LABGRIDCIEXY;Cie xy
HISTORY_MSG_ICM_AINTENT;Abstract profile intent
HISTORY_MSG_ICM_BLUX;Primaries Blue X
HISTORY_MSG_ICM_BLUY;Primaries Blue Y
HISTORY_MSG_ICM_CAT;Matrix adaptation
HISTORY_MSG_ICM_FBW;Black and White
HISTORY_MSG_ICM_GAMUT;Gamut control
HISTORY_MSG_ICM_GREX;Primaries Green X
HISTORY_MSG_ICM_GREY;Primaries Green Y
HISTORY_MSG_ICM_MIDTCIE;Midtones
HISTORY_MSG_ICM_OUTPUT_PRIMARIES;Output - Primaries
HISTORY_MSG_ICM_OUTPUT_TEMP;Output - ICC-v4 illuminant D
HISTORY_MSG_ICM_OUTPUT_TYPE;Output - Type
HISTORY_MSG_ICM_PRESER;Preserve neutral
HISTORY_MSG_ICM_REDX;Primaries Red X
HISTORY_MSG_ICM_REDY;Primaries Red Y
HISTORY_MSG_ICM_REFI;Refinement Colors
HISTORY_MSG_ICM_SHIFTX;Refinement Colors - shift x
HISTORY_MSG_ICM_SHIFTY;Refinement Colors - shift y
HISTORY_MSG_ICM_SMOOTHCIE;Smooth highlights
HISTORY_MSG_ICM_TRCEXP;Abstract Profile
HISTORY_MSG_ICM_WORKING_GAMMA;TRC - Gamma
HISTORY_MSG_ICM_WORKING_ILLUM_METHOD;Illuminant method
HISTORY_MSG_ICM_WORKING_PRIM_METHOD;Primaries method
HISTORY_MSG_ICM_WORKING_SLOPE;TRC - Slope
HISTORY_MSG_ICM_WORKING_TRC_METHOD;TRC method
HISTORY_MSG_ILLUM;CAL - SC - Illuminant
HISTORY_MSG_LOCAL_CIE_ANGGRAD;Local CIECAM - gradient angle
HISTORY_MSG_LOCAL_CIE_BRICOMP;Local CIECAM Brightness compression
HISTORY_MSG_LOCAL_CIE_BRICOMPTH;Local CIECAM Brightness compression threshold
HISTORY_MSG_LOCAL_CIE_CAT;Matrix adaptation
HISTORY_MSG_LOCAL_CIE_DETAILJZ;Local JzCzHz Local contrast
HISTORY_MSG_LOCAL_CIE_ENAMASKALL;Local CIECAM All mask tools
HISTORY_MSG_LOCAL_CIE_EXPPRECAM;Local CIECAM Pre-Cam
HISTORY_MSG_LOCAL_CIE_GAM;Local CIECAM Gamma
HISTORY_MSG_LOCAL_CIE_GAMUTCIE;Local CIECAM Gamut
HISTORY_MSG_LOCAL_CIE_ILL;Local CIECAM TRC Illuminant
HISTORY_MSG_LOCAL_CIE_LOGCIEQ;Local CIECAM Log encoding Q
HISTORY_MSG_LOCAL_CIE_MIDT;Local CIECAM Mid Tones
HISTORY_MSG_LOCAL_CIE_NORM;Local CIECAM Normalize L
HISTORY_MSG_LOCAL_CIE_PRIM;Local CIECAM TRC Primaries
HISTORY_MSG_LOCAL_CIE_REFI;Local CIECAM Refinement Colors
HISTORY_MSG_LOCAL_CIE_SIG;Sigmoid
HISTORY_MSG_LOCAL_CIE_SIGADAP;Local CIECAM Sigmoid adaptability
HISTORY_MSG_LOCAL_CIE_SIGMET;Local CIECAM - Sigmoid method
HISTORY_MSG_LOCAL_CIE_SLOP;Local CIECAM - Slope
HISTORY_MSG_LOCAL_CIE_SLOPESMO;Local CIECAM - Gray balance
HISTORY_MSG_LOCAL_CIE_SMOOTHMET;Local CIECAM - Smooth lights method
HISTORY_MSG_LOCAL_CIE_STRGRAD;Local CIECAM - gradient strength L
HISTORY_MSG_LOCAL_CIE_TRC;Local CIECAM - TRC
HISTORY_MSG_LOCAL_CIE_REDXL;Local CIECAM - Red X
HISTORY_MSG_LOCAL_CIE_REDYL;Local CIECAM - Red Y
HISTORY_MSG_LOCAL_CIE_GREXL;Local CIECAM - Green X
HISTORY_MSG_LOCAL_CIE_GREYL;Local CIECAM - Green Y
HISTORY_MSG_LOCAL_CIE_BLACKS;Local CIECAM - Blacks distribution
HISTORY_MSG_LOCAL_CIE_BLUXL;Local CIECAM - Blue X
HISTORY_MSG_LOCAL_CIE_BLUYL;Local CIECAM - Blue Y
HISTORY_MSG_LOCAL_CIE_SHIFTXL;Local CIECAM - Shift x
HISTORY_MSG_LOCAL_CIE_SHIFTYL;Local CIECAM - Shift y
HISTORY_MSG_LOCAL_CIE_SMOOTH;Local CIECAM - Scale Yb Scene
HISTORY_MSG_LOCAL_CIE_SATCIE;Local CIECAM - Saturation control
HISTORY_MSG_LOCAL_CIE_STRLOG;Local CIECAM - Log encoding strength
HISTORY_MSG_LOCAL_CIE_WHITES;Local CIECAM - Whites distribution
HISTORY_MSG_LOCAL_CIEMASK_BLURCONT;Local Cie mask blur contrast
HISTORY_MSG_LOCAL_CIEMASK_BLURFFT;Local Cie mask blur fftw
HISTORY_MSG_LOCAL_CIEMASK_BLURRAD;Local Cie mask blur radius
HISTORY_MSG_LOCAL_CIEMASK_CHH;Local Cie mask curve hh
HISTORY_MSG_LOCAL_CIEMASK_HIGH;Local Cie mask highlights
HISTORY_MSG_LOCAL_CIEMASK_SHAD;Local Cie mask shadows
HISTORY_MSG_LOCAL_CIEMASK_STRU;Local Cie mask structure
HISTORY_MSG_LOCAL_CIEMASK_STRU_TOOL;Local Cie mask structure as tool
HISTORY_MSG_LOCAL_CIEMASK_WLC;Local CIECAM mask wavelet Lc
HISTORY_MSG_LOCAL_CIEMASK_WLEV;Local CIECAM mask wavelet levels
HISTORY_MSG_LOCAL_LOG_BLACKS;Local Log - Blacks distribution
HISTORY_MSG_LOCAL_LOG_COMPR;Local Log - Compress brightness
HISTORY_MSG_LOCAL_LOG_SAT;Local Log - Saturation control
HISTORY_MSG_LOCAL_LOG_WHITES;Local Log - Whites distribution
HISTORY_MSG_LOCALCONTRAST_AMOUNT;Local Contrast - Amount
HISTORY_MSG_LOCALCONTRAST_DARKNESS;Local Contrast - Darkness
HISTORY_MSG_LOCALCONTRAST_ENABLED;Local Contrast
@ -2175,6 +2232,7 @@ TC_PRIM_GREX;Gx
TC_PRIM_GREY;Gy
TC_PRIM_REDX;Rx
TC_PRIM_REDY;Ry
TC_PRIM_REFI;Refine colors (white-point)
THRESHOLDSELECTOR_B;Bottom
THRESHOLDSELECTOR_BL;Bottom-left
THRESHOLDSELECTOR_BR;Bottom-right
@ -2662,9 +2720,16 @@ TP_ICM_SAVEREFERENCE_TOOLTIP;Save the linear TIFF image before the input profile
TP_ICM_TONECURVE;Tone curve
TP_ICM_TONECURVE_TOOLTIP;Employ the embedded DCP tone curve. The setting is only available if the selected DCP has a tone curve.
TP_ICM_TRCFRAME;Abstract Profile
TP_ICM_TRCFRAME_TOOLTIP;Also known as 'synthetic' or 'virtual' profiles, which are applied at the end of the processing pipeline (prior to ciecam) allowing you to create custom image effects.\nYou can make changes to the:\n 'Tone response curve', which modifies the tones of the image.\n 'Illuminant' : which allows you to change the profile primaries to adapt them to the shooting conditions.\n 'Destination primaries': which allows you to change the destination primaries with two main uses - channel mixer and calibration.\nNote: Abstract profiles take into account the built-in Working profiles without modifying them. They do not work with custom Working profiles.
TP_ICM_TRCFRAME_TOOLTIP;Also known as 'synthetic' or 'virtual' profiles, which are applied at the end of the processing pipeline (prior to ciecam) allowing you to create custom image effects.\nYou can make changes to the:\n 'Tone response curve', which modifies the tones of the image.\n 'Illuminant' : which allows you to change the profile primaries to adapt them to the shooting conditions.\n 'Destination primaries': which allows you to change the destination primaries with three main uses - channel mixer, restore image color (saturation), calibration.\nNote: Abstract profiles take into account the built-in Working profiles without modifying them. They do not work with custom Working profiles.
TP_ICM_TRC_TOOLTIP;Allows you to change the default sRGB 'Tone response curve' in RT (g=2.4 s=12.92).\nThis TRC modifies the tones of the image. The RGB and Lab values, histogram and output (screen, TIF, JPG) are changed:\n-Gamma acts mainly on light tones -Slope acts mainly on dark tones.\nYou can choose any pair of 'gamma and slope' (values >1) and the algorithm will ensure that there is continuity between the linear and parabolic parts of the curve.\nA selection other than 'none' activates the 'Illuminant' and 'Destination primaries' menus.
TP_ICM_WORKINGPROFILE;Working Profile
TP_ICM_WORKING_CAT;Matrix adaptation
TP_ICM_WORKING_CAT_BRAD;Bradford
TP_ICM_WORKING_CAT_CAT16;Cat16
TP_ICM_WORKING_CAT_CAT02;Cat02
TP_ICM_WORKING_CAT_TOOLTIP;Performs the chromatic adaptation of the XYZ conversion matrix. Default Bradford
TP_ICM_WORKING_CAT_VK;Von Kries
TP_ICM_WORKING_CAT_XYZ;XYZ scale
TP_ICM_WORKING_CIEDIAG;CIE xy diagram
TP_ICM_WORKING_ILLU;Illuminant
TP_ICM_WORKING_ILLU_1500;Tungsten 1500K
@ -2676,10 +2741,13 @@ TP_ICM_WORKING_ILLU_D60;D60
TP_ICM_WORKING_ILLU_D65;D65
TP_ICM_WORKING_ILLU_D80;D80
TP_ICM_WORKING_ILLU_D120;D120
TP_ICM_WORKING_ILLU_E;E
TP_ICM_WORKING_ILLU_NONE;Default
TP_ICM_WORKING_ILLU_STDA;stdA 2875K
TP_ICM_WORKING_NON;None
TP_ICM_WORKING_PRESER;Preserves Pastel tones
TP_ICM_WORKING_PRIM;Destination primaries
TP_ICM_WORKING_PRIM_TOOLTIP;Destination primaries (Advanced): which allows you to change the destination primaries to restore or change image color (saturation), the color balance is significantly preserved when the 'Working Profile' and the 'Destination primaries' are not too different, 'Working Profiles' are not modified. Perform a gamut control.\nWhen 'Custom LA (sliders)' is selected you can modify the values of the 3 primaries Red, Green, Blue for X and Y.
TP_ICM_WORKING_PRIMFRAME_TOOLTIP;When 'Custom CIE xy diagram' is selected in 'Destination- primaries'' combobox, you can modify the values of the 3 primaries directly on the graph.\nNote that in this case, the white point position on the graph will not be updated.
TP_ICM_WORKING_PRIM_AC0;ACESp0
TP_ICM_WORKING_PRIM_ACE;ACESp1
@ -2689,7 +2757,9 @@ TP_ICM_WORKING_PRIM_BRU;BruceRGB
TP_ICM_WORKING_PRIM_BST;BestRGB
TP_ICM_WORKING_PRIM_CUS;Custom (sliders)
TP_ICM_WORKING_PRIM_CUSGR;Custom (CIE xy Diagram)
TP_ICM_WORKING_PRIM_FREE;Custom LA (sliders)
TP_ICM_WORKING_PRIM_JDCMAX;JDC Max
TP_ICM_WORKING_PRIM_JDCMAXSTDA;JDC Max stdA
TP_ICM_WORKING_PRIM_NONE;Default
TP_ICM_WORKING_PRIM_PROP;ProPhoto
TP_ICM_WORKING_PRIM_REC;Rec2020
@ -2770,9 +2840,9 @@ TP_LOCALLAB_AMOUNT;Amount
TP_LOCALLAB_ARTIF;Shape detection
TP_LOCALLAB_ARTIF_TOOLTIP;ΔE scope threshold increases the range of ΔE scope. High values are for very wide gamut images.\nIncreasing ΔE decay can improve shape detection, but can also reduce the scope.
TP_LOCALLAB_AUTOGRAY;Auto mean luminance (Yb%)
TP_LOCALLAB_AUTOGRAYCIE;Auto
TP_LOCALLAB_AUTOGRAYCIE;Automatic
TP_LOCALLAB_AVOID;Avoid color shift
TP_LOCALLAB_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction (Uniform Perceptual Lab).\nMunsell correction always disabled when Jz or CAM16 or Color Appearance and Lighting is used.\n\nDefault: Munsell.\nMunsell correction: fixes Lab mode hue drifts due to non-linearity, when chromaticity is changed (Uniform Perceptual Lab).\nLab: applies a gamut control, in relative colorimetric, Munsell is then applied.\nXYZ Absolute, applies gamut control, in absolute colorimetric, Munsell is then applied.\nXYZ Relative, applies gamut control, in relative colorimetric, Munsell is then applied.
TP_LOCALLAB_AVOIDCOLORSHIFT_TOOLTIP;Fit colors into gamut of the working color space and apply Munsell correction (Uniform Perceptual Lab).\n\nDefault: Munsell only.\nMunsell only, fixes Lab mode hue drifts due to non-linearity, when chromaticity is changed (Uniform Perceptual Lab).\nLab, applies a gamut control, in relative colorimetric, Munsell is then applied.\nXYZ Absolute, applies gamut control, in absolute colorimetric, Munsell is then applied.\nXYZ Relative, applies gamut control, in relative colorimetric, Munsell is then applied.
TP_LOCALLAB_AVOIDMUN;Munsell correction only
TP_LOCALLAB_AVOIDMUN_TOOLTIP;Munsell correction always disabled when Jz or CAM16 is used.
TP_LOCALLAB_AVOIDRAD;Soft radius
@ -2815,9 +2885,12 @@ TP_LOCALLAB_BUTTON_DEL;Delete
TP_LOCALLAB_BUTTON_DUPL;Duplicate
TP_LOCALLAB_BUTTON_REN;Rename
TP_LOCALLAB_BUTTON_VIS;Show/Hide
TP_LOCALLAB_BWEVNONE;None
TP_LOCALLAB_BWEVSIG;Activated
TP_LOCALLAB_BWEVSIGLOG;Sigmoid & Log-Encoding
TP_LOCALLAB_BWFORCE;Uses Black Ev & White Ev
TP_LOCALLAB_CAM16PQREMAP;HDR PQ (Peak Luminance)
TP_LOCALLAB_CAM16PQREMAP_TOOLTIP;PQ (Perceptual Quantizer) adapted to CAM16. Allows you to change the internal PQ function (usually 10000 cd/m2 - default 100 cd/m2 - disabled for 100 cd/m2).\nCan be used to adapt to different devices and images.
TP_LOCALLAB_CAM16PQREMAP_TOOLTIP;PQ (Perceptual Quantizer) adapted to CAM16 (experimental). Allows you to change the internal PQ function (usually 10000 cd/m2 - default 100 cd/m2 - disabled for 100 cd/m2).\nCan be used to adapt to different devices and images. For example to match Cam16 processing with the maximum monitor brightness of 400cd/m2.
TP_LOCALLAB_CAM16_FRA;Cam16 Image Adjustments
TP_LOCALLAB_CAMMODE;CAM model
TP_LOCALLAB_CAMMODE_CAM16;CAM 16
@ -2844,6 +2917,11 @@ TP_LOCALLAB_CHROMASK_TOOLTIP;Changes the chroma of the mask if one exists (i.e.
TP_LOCALLAB_CHROML;Chroma (C)
TP_LOCALLAB_CHRRT;Chroma
TP_LOCALLAB_CIE;Color appearance (Cam16 & JzCzHz)
TP_LOCALLAB_CIE_SMOOTH_NONE;None
TP_LOCALLAB_CIE_SMOOTH_EV;Ev based
TP_LOCALLAB_CIE_SMOOTHFRAME;Highlight attenuation
TP_LOCALLAB_CIE_SMOOTH_GAMMA;Slope based
TP_LOCALLAB_CIE_SMOOTH_GAMMA ROLLOFF;Gamma based
TP_LOCALLAB_CIEC;Use Ciecam environment parameters
TP_LOCALLAB_CIECAMLOG_TOOLTIP;This module is based on the CIECAM color appearance model which was designed to better simulate how human vision perceives colors under different lighting conditions.\nThe first Ciecam process 'Scene conditions' is carried out by Log encoding, it also uses 'Absolute luminance' at the time of shooting.\nThe second Ciecam process 'Image adjustments' is simplified and uses only 3 variables (local contrast, contrast J, saturation s).\nThe third Ciecam process 'Viewing conditions' adapts the output to the intended viewing conditions (monitor, TV, projector, printer, etc.) so that the chromatic and contrast appearance is preserved across the display environment.
TP_LOCALLAB_CIECOLORFRA;Color
@ -2878,10 +2956,14 @@ TP_LOCALLAB_COLORSCOPE;Scope (color tools)
TP_LOCALLAB_COLORSCOPE_TOOLTIP;Common Scope slider for Color and Light, Shadows/Highlights, Vibrance.\nOther tools have their own scope controls.
TP_LOCALLAB_COLOR_CIE;Color curve
TP_LOCALLAB_COLOR_TOOLNAME;Color & Light
TP_LOCALLAB_COLORFRAME;Dominant color
TP_LOCALLAB_COL_NAME;Name
TP_LOCALLAB_COL_VIS;Status
TP_LOCALLAB_COMPFRA;Directional contrast
TP_LOCALLAB_COMPREFRA;Wavelet level tone mapping
TP_LOCALLAB_COMPRCIE;Brightness compression
TP_LOCALLAB_COMPRCIETH;Compression threshold
TP_LOCALLAB_COMPRLOG_TOOLTIP;This algorithm compress the data before log conversion, above the theshold slider value. To use in conjunction with Whites distribution.
TP_LOCALLAB_CONTCOL;Contrast threshold
TP_LOCALLAB_CONTFRA;Contrast by level
TP_LOCALLAB_CONTRAST;Contrast
@ -2912,7 +2994,7 @@ TP_LOCALLAB_DELTAD;Delta balance
TP_LOCALLAB_DELTAEC;ΔE Image mask
TP_LOCALLAB_DENOI1_EXP;Denoise based on luminance mask
TP_LOCALLAB_DENOI2_EXP;Recovery based on luminance mask
TP_LOCALLAB_DENOIBILAT_TOOLTIP;Allows you to reduce impulse or 'salt & pepper' noise.
TP_LOCALLAB_DENOIBILAT_TOOLTIP;Allows you to reduce impulse or 'salt & pepper' noise.
TP_LOCALLAB_DENOICHROC_TOOLTIP;Allows you to deal with blotches and packets of noise.
TP_LOCALLAB_DENOICHRODET_TOOLTIP;Allows you to recover chrominance detail by progressively applying a Fourier transform (DCT).
TP_LOCALLAB_DENOICHROF_TOOLTIP;Allows you to adjust fine-detail chrominance noise.
@ -2932,6 +3014,7 @@ TP_LOCALLAB_DETAIL;Local contrast
TP_LOCALLAB_DETAILFRA;Edge detection - DCT
TP_LOCALLAB_DETAILSH;Details
TP_LOCALLAB_DETAILTHR;Lum/chrom detail threshold
TP_LOCALLAB_DISAB_CIECAM;Disable Ciecam or Weak Jz surround
TP_LOCALLAB_DIVGR;Gamma
TP_LOCALLAB_DUPLSPOTNAME;Copy
TP_LOCALLAB_EDGFRA;Edge sharpness
@ -2939,6 +3022,7 @@ TP_LOCALLAB_EDGSHOW;Show all tools
TP_LOCALLAB_ELI;Ellipse
TP_LOCALLAB_ENABLE_AFTER_MASK;Use Tone Mapping
TP_LOCALLAB_ENABLE_MASK;Enable mask
TP_LOCALLAB_ENABLE_MASKALL;Enable all mask tools
TP_LOCALLAB_ENABLE_MASKAFT;Use all algorithms Exposure
TP_LOCALLAB_ENARETIMASKTMAP_TOOLTIP;If enabled the Mask uses Restored Data after Transmission Map instead of Original data.
TP_LOCALLAB_ENH;Enhanced
@ -2970,7 +3054,7 @@ TP_LOCALLAB_EXPCONTRASTPYR_TOOLTIP;See the documentation for Wavelet Levels.\nTh
TP_LOCALLAB_EXPCONTRAST_TOOLTIP;Avoid spots that are too small ( < 32x32 pixels).\nUse low 'Transition value' and high 'Transition decay' and 'Scope' to simulate small spots and deal with defects.\nUse 'Clarity and Sharp mask and Blend and Soften Images' if necessary by adjusting 'Soft radius' to reduce artifacts.
TP_LOCALLAB_EXPCURV;Curves
TP_LOCALLAB_EXPGRAD;Graduated Filter
TP_LOCALLAB_EXPGRADCOL_TOOLTIP;A graduated filter is available in Color and Light (luminance, chrominance & hue gradients, and 'Merge file'), Exposure (luminance grad.), Exposure Mask (luminance grad.), Shadows/Highlights (luminance grad.), Vibrance (luminance, chrominance & hue gradients), Local contrast & wavelet pyramid (local contrast grad.).\nFeather is located in Settings.
TP_LOCALLAB_EXPGRADCOL_TOOLTIP;A graduated filter is available in Color and Light (luminance, chrominance &amp; hue gradients, and 'Merge file'), Exposure (luminance grad.), Exposure Mask (luminance grad.), Shadows/Highlights (luminance grad.), Vibrance (luminance, chrominance &amp; hue gradients), Local contrast &amp; wavelet pyramid (local contrast grad.).\nFeather is located in Settings.
TP_LOCALLAB_EXPLAPBAL_TOOLTIP;Changes the transformed/original image blend.
TP_LOCALLAB_EXPLAPGAMM_TOOLTIP;Changes the behaviour for images with too much or too little contrast by adding a gamma curve before and after the Laplace transform.
TP_LOCALLAB_EXPLAPLIN_TOOLTIP;Changes the behaviour for underexposed images by adding a linear component prior to applying the Laplace transform.
@ -3134,8 +3218,11 @@ TP_LOCALLAB_LOGAUTOGRAY_TOOLTIP;Automatically calculates the 'Mean luminance' fo
TP_LOCALLAB_LOGAUTO_TOOLTIP;Pressing this button will calculate the dynamic range and 'Mean luminance' for the scene conditions if the 'Auto mean luminance (Yb%)' is checked).\nAlso calculates the absolute luminance at the time of shooting.\nPress the button again to adjust the automatically calculated values.
TP_LOCALLAB_LOGBASE_TOOLTIP;Default = 2.\nValues less than 2 reduce the action of the algorithm making the shadows darker and the highlights brighter.\nWith values greater than 2, the shadows are grayer and the highlights become more washed out.
TP_LOCALLAB_LOGCATAD_TOOLTIP;Chromatic adaptation allows us to interpret a color according to its spatio-temporal environment.\nUseful when the white balance deviates significantly from the D50 reference.\nAdapts colors to the illuminant of the output device.
TP_LOCALLAB_LOGCIE;Log encoding instead of Sigmoid
TP_LOCALLAB_LOGCIE_TOOLTIP;Allows you tu use Black Ev, White Ev, Scene Mean luminance(Yb%) and Viewing Mean luminance(Yb%) for tone-mapping using Log encoding Q.
TP_LOCALLAB_LOGCIE;Log encoding
TP_LOCALLAB_LOGCIE_TOOLTIP;Allows you tu use Black Ev, White Ev, White and Black distribution, Scene Mean luminance(Yb%) and Viewing Mean luminance(Yb%) for tone-mapping using 'Log encoding' with Brightness compression.
TP_LOCALLAB_LOGCIEQ;Log Encoding Q (with Ciecam)
TP_LOCALLAB_LOGCIEQ_TOOLTIP;Activating the checkbox allows you to switch between log encoding based on the 3 RGB channels, and log encoding based solely on Ciecams brightness (Q) channel.\nUsing the Q channel instead of the RGB channels helps avoid undesirable edge effects such as hue and saturation shifts.\nHowever, the settings are more difficult to optimise because Q is unbounded and Ciecam alters the data to take into account the surround conditions, simultaneous contrast etc.:\nThe user may have to adjust the following:\n Scene conditions: Mean luminance (Yb), Whites &amp; Blacks distribution, Black Ev, White Ev.\n Source Data Adjustments : Brightness compression, Strength.\n\nNote: when using Log Encoding (Q), be careful not to activate the Disable Ciecam option in the Scene Conditions, Surround menu.
TP_LOCALLAB_LOGCOLORFL;Colorfulness (M)
TP_LOCALLAB_LOGCOLORF_TOOLTIP;Perceived amount of hue in relation to gray.\nIndicator that a stimulus appears more or less colored.
TP_LOCALLAB_LOGCONQL;Contrast (Q)
@ -3143,7 +3230,7 @@ TP_LOCALLAB_LOGCONTHRES;Contrast threshold (J & Q)
TP_LOCALLAB_LOGCONTL;Contrast (J)
TP_LOCALLAB_LOGCONTL_TOOLTIP;Contrast (J) in CIECAM16 takes into account the increase in perceived coloration with luminance.
TP_LOCALLAB_LOGCONTQ_TOOLTIP;Contrast (Q) in CIECAM16 takes into account the increase in perceived coloration with brightness.
TP_LOCALLAB_LOGCONTTHRES_TOOLTIP;Adjusts the mid-tone contrast range (J & Q).\nPositive values progressively reduce the effect of the Contrast sliders (J & Q). Negative values progressively increase the effect of the Contrast sliders.
TP_LOCALLAB_LOGCONTTHRES_TOOLTIP;Adjusts the mid-tone contrast range (J &amp; Q).\nPositive values progressively reduce the effect of the Contrast sliders (J &amp; Q). Negative values progressively increase the effect of the Contrast sliders.
TP_LOCALLAB_LOGDETAIL_TOOLTIP;Acts mainly on high frequencies.
TP_LOCALLAB_LOGENCOD_TOOLTIP;Tone Mapping with Logarithmic encoding (ACES).\nUseful for underexposed images or images with high dynamic range.\n\nTwo-step process: 1) Dynamic Range calculation 2) Manual adjustment.
TP_LOCALLAB_LOGEXP;All tools
@ -3156,6 +3243,7 @@ TP_LOCALLAB_LOGLIGHTQ;Brightness (Q)
TP_LOCALLAB_LOGLIGHTQ_TOOLTIP;Perceived amount of light emanating from a stimulus.\nIndicator that a stimulus appears to be more or less bright, clear.
TP_LOCALLAB_LOGLIN;Logarithm mode
TP_LOCALLAB_LOGPFRA;Relative Exposure Levels
TP_LOCALLAB_LOGPFRA2;Log Encoding settings
TP_LOCALLAB_LOGREPART;Overall strength
TP_LOCALLAB_LOGREPART_TOOLTIP;Allows you to adjust the relative strength of the log-encoded image with respect to the original image.\nDoes not affect the Ciecam component.
TP_LOCALLAB_LOGSATURL_TOOLTIP;Saturation (s) in CIECAM16 corresponds to the color of a stimulus in relation to its own brightness.\nActs mainly on medium tones and on the highlights.
@ -3225,7 +3313,7 @@ TP_LOCALLAB_MASKRESRETI_TOOLTIP;Used to modulate the effect of the Retinex (Lumi
TP_LOCALLAB_MASKRESTM_TOOLTIP;Used to modulate the effect of the Tone Mapping settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The 'dark' and 'light' areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Tone Mapping settings \n In between these two areas, the full value of the Tone Mapping settings will be applied.
TP_LOCALLAB_MASKRESVIB_TOOLTIP;Used to modulate the effect of the Vibrance and Warm Cool settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The 'dark' and 'light' areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Vibrance and Warm Cool settings \n In between these two areas, the full value of the Vibrance and Warm Cool settings will be applied.
TP_LOCALLAB_MASKRESWAV_TOOLTIP;Used to modulate the effect of the Local contrast and Wavelet settings based on the image luminance information contained in the L(L) or LC(H) masks (Mask and modifications).\n The L(L) mask or the LC(H) mask must be enabled to use this function.\n The 'dark' and 'light' areas below the dark threshold and above the light threshold will be restored progressively to their original values prior to being modified by the Local contrast and Wavelet settings \n In between these two areas, the full value of the Local contrast and Wavelet settings will be applied.
TP_LOCALLAB_MASKUNUSABLE;Mask disabled (Mask & modifications)
TP_LOCALLAB_MASKUNUSABLE;Mask disabled (Enable in Mask & modifications)
TP_LOCALLAB_MASKUSABLE;Mask enabled (Mask & modifications)
TP_LOCALLAB_MASK_TOOLTIP;You can enable multiple masks for a tool by activating another tool and using only the mask (set the tool sliders to 0 ).\n\nYou can also duplicate the spot and place it close to the first spot. The small variations in the spot references allow you to make fine adjustments.
TP_LOCALLAB_MEDIAN;Median Low
@ -3261,6 +3349,7 @@ TP_LOCALLAB_MERTHR;Difference
TP_LOCALLAB_MERTWE;Exclusion
TP_LOCALLAB_MERTWO;Subtract
TP_LOCALLAB_METHOD_TOOLTIP;'Enhanced + chroma denoise' significantly increases processing times.\nBut reduce artifacts.
TP_LOCALLAB_MIDTCIE;Midtones
TP_LOCALLAB_MLABEL;Restored data Min=%1 Max=%2
TP_LOCALLAB_MLABEL_TOOLTIP;The values should be close to Min=0 Max=32768 (log mode) but other values are possible.You can adjust 'Clip restored data (gain)' and 'Offset' to normalize.\nRecovers image data without blending.
TP_LOCALLAB_MODE_EXPERT;Advanced
@ -3307,11 +3396,19 @@ TP_LOCALLAB_ORRETILAP_TOOLTIP;Modifies ΔE prior to any changes made by 'Scope'.
TP_LOCALLAB_ORRETISTREN_TOOLTIP;Acts on the Laplacian threshold, the greater the action, the more the differences in contrast will be reduced.
TP_LOCALLAB_PASTELS2;Vibrance
TP_LOCALLAB_PDE;Contrast Attenuator - Dynamic Range compression
TP_LOCALLAB_PRECAM_TOOLTIP;This 'Source Data Adjustments' modifies: a)the Dynamic Range using Log encoding; b) the tones of the image and primaries(simplified Abstract Profile) and also midtones, just before the Ciecam process. The values are changed:\n-Gamma acts mainly on light tones -Slope acts mainly on dark tones.\nYou can choose any pair of 'gamma and slope' (values >1) and the algorithm will ensure that there is continuity between the linear and parabolic parts of the curve.\n\n\n-Destination primaries: which allows you to change the destination primaries to restore or change image color (saturation), the color balance is 'significantly' preserved when the 'Working Profile' and the 'Destination primaries' are not too different (be careful), 'Working Profiles' are not modified.\nYou can also finely adapt the primaries and the illuminant (white-point).\nMoving a primary away from the white point reduces saturation and vice versa. Pay attention to the gamut.
TP_LOCALLAB_PRECAMGAMUT_TOOLTIP;If checked ensures a gamut control just after primary conversion to XYZ matrix.
TP_LOCALLAB_PRECAMREFI_TOOLTIP;Allows you to move the white-point in such a way that it approaches the dominant color. This action modifies the purity.
TP_LOCALLAB_PRECAMREFIMAIN_TOOLTIP;Allows you to move the white-point in such a way that it approaches the dominant color. This action modifies the purity. In combination with "Shift x" and "Shift y" allows you to carry out moderate Color Toning.
TP_LOCALLAB_PDEFRA;Contrast Attenuator ƒ
TP_LOCALLAB_PDEFRAME_TOOLTIP;PDE IPOL algorithm adapted for Rawtherapee : gives different results and requires different settings compared to main-menu 'Exposure'.\nMay be useful for under-exposed or high dynamic range images.
TP_LOCALLAB_PREVHIDE;Hide additional settings
TP_LOCALLAB_PREVIEW;Preview ΔE
TP_LOCALLAB_PREVSHOW;Show additional settings
TC_LOCALLAB_PRIM_SHIFTX;Shift x
TC_LOCALLAB_PRIM_SHIFTY;Shift y
TC_LOCALLAB_PRIM_SHIFTX_TOOLTIP;In combination with "Refine colors" allows you:\n 1) for low values adjust the image purity.\n 2) for higher values, carry out moderate Color Toning.\n 3) Be careful not to go outside the CIE xy diagram.
TP_LOCALLAB_PRIMILLFRAME;Primaries & Illuminant
TP_LOCALLAB_PROXI;ΔE decay
TP_LOCALLAB_QUAAGRES;Aggressive
TP_LOCALLAB_QUACONSER;Conservative
@ -3356,10 +3453,11 @@ TP_LOCALLAB_RETI_SCALE_TOOLTIP;If Scale=1, Retinex behaves like local contrast w
TP_LOCALLAB_RET_TOOLNAME;Dehaze & Retinex
TP_LOCALLAB_REWEI;Reweighting iterates
TP_LOCALLAB_RGB;RGB Tone Curve
TP_LOCALLAB_RGBCURVE_TOOLTIP;In RGB mode you have 4 choices : Standard, Weighted standard, Luminance & Film-like.
TP_LOCALLAB_RGBCURVE_TOOLTIP;In RGB mode you have 4 choices : Standard, Weighted standard, Luminance &amp; Film-like.
TP_LOCALLAB_ROW_NVIS;Not visible
TP_LOCALLAB_ROW_VIS;Visible
TP_LOCALLAB_RSTPROTECT_TOOLTIP;Red and skin-tone protection affects the Saturation, Chroma and Colorfulness sliders.
TP_LOCALLAB_SATCIE;Saturation control
TP_LOCALLAB_SATUR;Saturation
TP_LOCALLAB_SATURV;Saturation (s)
TP_LOCALLAB_SCALEGR;Scale
@ -3380,7 +3478,7 @@ TP_LOCALLAB_SHADEXCOMP;Shadow compression
TP_LOCALLAB_SHADHIGH;Shadows/Highlights & Tone Equalizer
TP_LOCALLAB_SHADHMASK_TOOLTIP;Lowers the highlights of the mask in the same way as the shadows/highlights algorithm.
TP_LOCALLAB_SHADMASK_TOOLTIP;Lifts the shadows of the mask in the same way as the shadows/highlights algorithm.
TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Adjust shadows and highlights either with shadows & highlights sliders or with a tone equalizer.\nCan be used instead of, or in conjunction with the Exposure module.\nCan also be used as a graduated filter.
TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP;Adjust shadows and highlights either with shadows &amp; highlights sliders or with a tone equalizer.\nCan be used instead of, or in conjunction with the Exposure module.\nCan also be used as a graduated filter.
TP_LOCALLAB_SHAMASKCOL;Shadows
TP_LOCALLAB_SHAPETYPE;Spot shape
TP_LOCALLAB_SHAPE_TOOLTIP;'Ellipse' is the normal mode.\n 'Rectangle' can be used in certain cases, for example to work in full-image mode by placing the delimiters outside the preview area. In this case, set transition = 100.\n\nFuture developments will include polygon shapes and Bezier curves.
@ -3426,17 +3524,36 @@ TP_LOCALLAB_SHOWVI;Mask and modifications
TP_LOCALLAB_SHRESFRA;Shadows/Highlights & TRC
TP_LOCALLAB_SHTRC_TOOLTIP;Based on 'working profile' (only those provided), modifies the tones of the image by acting on a TRC (Tone Response Curve).\nGamma acts mainly on light tones.\nSlope acts mainly on dark tones.\nIt is recommended that the TRC of both devices (monitor and output profile) be sRGB (default).
TP_LOCALLAB_SH_TOOLNAME;Shadows/Highlights & Tone Equalizer
TP_LOCALLAB_SIGFRA;Sigmoid Q & Log encoding Q
TP_LOCALLAB_SIGCIE;Sigmoid
TP_LOCALLAB_SIGFRA;Sigmoid Q
TP_LOCALLAB_SIGGAMJCIE;Gamma
TP_LOCALLAB_SIGJZFRA;Sigmoid Jz
TP_LOCALLAB_SIGMAWAV;Attenuation response
TP_LOCALLAB_SIGMOIDBL;Blend
TP_LOCALLAB_SIGMOIDLAMBDA;Contrast
TP_LOCALLAB_SIGMOIDQJ;Uses Black Ev & White Ev
TP_LOCALLAB_SIGMOIDLOGAUTO;Auto threshold
TP_LOCALLAB_SIGMOIDQJ;Black Ev & White Ev
TP_LOCALLAB_SIGMOIDSENSI;Adaptability
TP_LOCALLAB_SIGMOIDTH;Threshold (Gray point)
TP_LOCALLAB_SIGMOID_TOOLTIP;Allows you to simulate a Tone-mapping appearance using both the'Ciecam' (or 'Jz') and 'Sigmoid' function.\nThree sliders: a) Contrast acts on the shape of the sigmoid curve and consequently on the strength; b) Threshold (Gray point) distributes the action according to the luminance; c)Blend acts on the final aspect of the image, contrast and luminance.
TP_LOCALLAB_SIGMOID_TOOLTIP;Allows you to simulate a Tone-mapping appearance using both the 'Jz' and 'Sigmoid' function.\nThree sliders: a) Contrast acts on the shape of the sigmoid curve and consequently on the strength; b) Threshold (Gray point) distributes the action according to the luminance; c)Blend acts on the final aspect of the image, contrast and luminance.
TP_LOCALLAB_SIGMOID16_TOOLTIP;Allows you to simulate a Tone-mapping appearance using both the'Ciecam' and 'Sigmoid Q'.\nSigmoid Q: three sliders: a) Contrast acts on the shape of the sigmoid curve and consequently on the strength; b) Threshold (Gray point) distributes the action according to the luminance; c)Adaptability weights the action of the sigmoid by action on the internal exponential function.
TP_LOCALLAB_SIGMOIDLOGEV_TOOLTIP;If the comboxbox selection 'Black Ev and White Ev' is 'Sigmoid and Log encoding' instead of 'Sigmoid only', the two algorithms 'Log encoding' and 'Sigmoid' are used together.
TP_LOCALLAB_SIGMOIDNORMCIE;Normalize Luminance
TP_LOCALLAB_SIGMOIDNORMCIE_TOOLTIP;Reconstruct luminance so that the mean and variance of the output image take into account those of the original.\nAll the adjustments acting on J or Q are taken into account, including those which are not relative to Sigmoid Q.
TP_LOCALLAB_SIGMOIDNORMCIEBLEND_TOOLTIP;Blend acts on the final aspect of the image, contrast and luminance : ratio between original and output image.
TP_LOCALLAB_SIGMOIDQJCOMPRCIE_TOOLTIP;When the comboxbox selection'Uses Black Ev and White Ev' is 'Sigmoid and Log encoding Q' or 'Log encoding instead of Sigmoid' checked. This algorithm compress the data above the threshold slider value. This last value stands for brightness (Q) should be a near the possible value 'Compression treshold' (calculate when 'Auto threshold" checked, often > 1).
TP_LOCALLAB_SIGSLOPJCIE;Slope
TP_LOCALLAB_SIGTRCCIE;Source Data Adjustments
TP_LOCALLAB_SIGBLACKSSCIE;Blacks distribution
TP_LOCALLAB_SIGWHITESCIE;Whites distribution
TP_LOCALLAB_SIGMOIDWHITESCIE_TOOLTIP;Allows you, in Automatic, when the dynamic range of the image is high, to change the distribution of lights in whites and deep blacks.\nCan be used with Log encoding or Sigmoid with Black Ev and White Ev enabled.\n\nThe algorithm does not change the basic data, but acts on the components necessary to calculate the Dynamic range, Black Ev, White Ev and the Gray point.
TP_LOCALLAB_SLOMASKCOL;Slope
TP_LOCALLAB_SLOMASK_TOOLTIP;Adjusting Gamma and Slope can provide a soft and artifact-free transformation of the mask by progressively modifying 'L' to avoid any discontinuities.
TP_LOCALLAB_SLOPESMOOTH;Gray balance (Slope)
TP_LOCALLAB_SLOSH;Slope
TP_LOCALLAB_SMOOTHCIE;Smooth & Tone-Mapping
TP_LOCALLAB_SMOOTHCIE_SCA;Scale Yb Scene
TP_LOCALLAB_SMOOTHCIE_TOOLTIP;Completes the processing carried out by gamma, slope and midtones by causing a slight lowering of lights. Please note this does not replace Highlight reconstruction.\n\nGamma - Slope - based: choice (Standard and Advanced) allows you to simulate a "Tone mapping" using: a) Scene conditions: Black-Ev, White-Ev, Mean luminance (Yb%); b) Viewing conditions: Mean luminance (Yb%).\nScale Yb Scene is function of White-Ev.
TP_LOCALLAB_SOFT;Soft Light & Original Retinex
TP_LOCALLAB_SOFTM;Soft Light
TP_LOCALLAB_SOFTMETHOD_TOOLTIP;Apply a Soft-light blend (identical to the global adjustment). Carry out dodge and burn using the original Retinex algorithm.
@ -3458,13 +3575,14 @@ TP_LOCALLAB_STRENG;Strength
TP_LOCALLAB_STRENGR;Strength
TP_LOCALLAB_STRENGRID_TOOLTIP;You can adjust the desired effect with 'strength', but you can also use the 'scope' function which allows you to delimit the action (e.g. to isolate a particular color).
TP_LOCALLAB_STRENGTH;Noise
TP_LOCALLAB_STRENGTHCIELOG;Strength
TP_LOCALLAB_STRGRID;Strength
TP_LOCALLAB_STRUC;Structure
TP_LOCALLAB_STRUCCOL;Spot structure
TP_LOCALLAB_STRUCCOL1;Spot structure
TP_LOCALLAB_STRUCT_TOOLTIP;Uses the Sobel algorithm to take into account structure for shape detection.\nActivate 'Mask and modifications' > 'Show spot structure' (Advanced mode) to see a preview of the mask (without modifications).\n\nCan be used in conjunction with the Structure Mask, Blur Mask and 'Local contrast' (by wavelet level) to improve edge detection.\n\nEffects of adjustments using Lightness, Contrast, Chrominance, Exposure or other non-mask-related tools visible using either 'Show modified image' or 'Show modified areas with mask'.
TP_LOCALLAB_STRUMASKCOL;Structure mask strength
TP_LOCALLAB_STRUMASK_TOOLTIP;Structure mask (slider) with the checkbox 'Structure mask as tool' unchecked: In this case a mask showing the structure will be generated even if none of the 3 curves is activated. Structure masks are available for mask (Blur and denoise') and mask(Color & Light).
TP_LOCALLAB_STRUMASK_TOOLTIP;Structure mask (slider) with the checkbox 'Structure mask as tool' unchecked: In this case a mask showing the structure will be generated even if none of the 3 curves is activated. Structure masks are available for mask (Blur and denoise') and mask(Color &amp; Light).
TP_LOCALLAB_STRUSTRMASK_TOOLTIP;Moderate use of this slider is recommended!
TP_LOCALLAB_STYPE;Shape method
TP_LOCALLAB_STYPE_TOOLTIP;You can choose between:\nSymmetrical - left handle linked to right, top handle linked to bottom.\nIndependent - all handles are independent.
@ -3496,11 +3614,12 @@ TP_LOCALLAB_TRANSITGRAD;Transition differentiation XY
TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Allows you to vary the y-axis transition.
TP_LOCALLAB_TRANSITVALUE;Transition value
TP_LOCALLAB_TRANSITWEAK;Transition decay (linear-log)
TP_LOCALLAB_TRANSITWEAK_TOOLTIP;Adjust transition decay function: 1 linear , 2 parabolic, 3 cubic up to ^25.\nCan be used in conjunction with very low transition values to reduce defects (CBDL, Wavelets, Color & Light).
TP_LOCALLAB_TRANSITWEAK_TOOLTIP;Adjust transition decay function: 1 linear , 2 parabolic, 3 cubic up to ^25.\nCan be used in conjunction with very low transition values to reduce defects (CBDL, Wavelets, Color &amp; Light).
TP_LOCALLAB_TRANSIT_TOOLTIP;Adjust smoothness of transition between affected and unaffected areas as a percentage of the 'radius'.
TP_LOCALLAB_TRANSMISSIONGAIN;Transmission gain
TP_LOCALLAB_TRANSMISSIONMAP;Transmission map
TP_LOCALLAB_TRANSMISSION_TOOLTIP;Transmission according to transmission.\nAbscissa: transmission from negative values (min), mean, and positive values (max).\nOrdinate: amplification or reduction.\nYou can adjust this curve to change the Transmission and reduce artifacts.
TP_LOCALLAB_TRCFRAME;Tone Response Curve & Midtones
TP_LOCALLAB_USEMASK;Laplacian
TP_LOCALLAB_VART;Variance (contrast)
TP_LOCALLAB_VIBRANCE;Vibrance & Warm/Cool
@ -4154,7 +4273,7 @@ TP_WAVELET_WAVOFFSET;Offset
TP_WBALANCE_AUTO;Auto
TP_WBALANCE_AUTOITCGREEN;Temperature correlation
TP_WBALANCE_AUTOOLD;RGB grey
TP_WBALANCE_AUTO_HEADER;Automatic & Refinement
TP_WBALANCE_AUTO_HEADER;Automatic &amp; Refinement
TP_WBALANCE_CAMERA;Camera
TP_WBALANCE_CLOUDY;Cloudy
TP_WBALANCE_CUSTOM;Custom

View File

@ -229,7 +229,7 @@ float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, f
gpa = nonlinear_adaptationfloat ( gp, fl );
bpa = nonlinear_adaptationfloat ( bp, fl );
return ((2.0f * rpa) + gpa + ((1.0f / 20.0f) * bpa) - 0.305f) * nbb;
return ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb;
}
void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int c16, float plum)

View File

@ -25,11 +25,67 @@
#include "opthelper.h"
#include "iccstore.h"
#include <iostream>
#include "linalgebra.h"
using namespace std;
namespace rtengine
namespace rtengine {
namespace {
typedef Vec3f A3;
// D50 <-> D65 adapted from darktable, thanks to Alberto Griggio
void XYZ_D50_to_D65(float &X, float &Y, float &Z)
{
// Bradford adaptation matrix from http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
constexpr float M[3][3] = {
{ 0.9555766f, -0.0230393f, 0.0631636f },
{ -0.0282895f, 1.0099416f, 0.0210077f },
{ 0.0122982f, -0.0204830f, 1.3299098f }
};
A3 res = dot_product(M, A3(X, Y, Z));
X = res[0];
Y = res[1];
Z = res[2];
}
void XYZ_D65_to_D50(float &X, float &Y, float &Z)
{
// Bradford adaptation matrix from http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
constexpr float M[3][3] = {
{ 1.0478112f, 0.0228866f, -0.0501270f },
{ 0.0295424f, 0.9904844f, -0.0170491f },
{ -0.0092345f, 0.0150436f, 0.7521316f }
};
A3 res = dot_product(M, A3(X, Y, Z));
X = res[0];
Y = res[1];
Z = res[2];
}
/*
float PQ(float X)
{
X = std::max(X, 1e-10f);
const float XX = std::pow(X*1e-4f, 0.1593017578125f);
return std::pow(
(0.8359375f + 18.8515625f*XX) / (1 + 18.6875f*XX),
134.034375f);
}
float PQ_inv(float X)
{
X = std::max(X, 1e-10f);
const auto XX = std::pow(X, 7.460772656268214e-03f);
return 1e4f * std::pow(
(0.8359375f - XX) / (18.6875f*XX - 18.8515625f),
6.277394636015326f);
}
*/
} // namespace
cmsToneCurve* Color::linearGammaTRC;
LUTf Color::cachef;
@ -1911,7 +1967,146 @@ void Color::Lch2Luv(float c, float h, float &u, float &v)
v = c * sincosval.y;
}
void Color::primaries_to_xyz(double p[6], double Wx, double Wz, double *pxyz)
// code take in ART thanks to Alberto Griggio
//-----------------------------------------------------------------------------
// oklab color space from https://bottosson.github.io/posts/oklab/
//-----------------------------------------------------------------------------
void Color::xyz2oklab(float X, float Y, float Z, float &L, float &a, float &b)
{
XYZ_D50_to_D65(X, Y, Z);
constexpr float M1[3][3] = {
{0.8189330101f, 0.3618667424f, -0.1288597137f},
{0.0329845436f, 0.9293118715f, 0.0361456387f},
{0.0482003018f, 0.2643662691f, 0.6338517070f}
};
A3 lms = dot_product(M1, A3(X, Y, Z));
for (int i = 0; i < 3; ++i) {
lms[i] = xcbrtf(lms[i]);
}
constexpr float M2[3][3] = {
{0.2104542553f, 0.7936177850f, -0.0040720468f},
{1.9779984951f, -2.4285922050f, 0.4505937099f},
{0.0259040371f, 0.7827717662f, -0.8086757660f}
};
lms = dot_product(M2, lms);
L = lms[0];
a = lms[1];
b = lms[2];
}
void Color::oklab2xyz(float L, float a, float b, float &X, float &Y, float &Z)
{
constexpr float M2_inv[3][3] = {
{1.f, 0.39633779f, 0.21580376f},
{1.00000001f, -0.10556134f, -0.06385417f},
{1.00000005f, -0.08948418f, -1.29148554f}
};
A3 lms = dot_product(M2_inv, A3(L, a, b));
for (int i = 0; i < 3; ++i) {
lms[i] = SQR(lms[i])*lms[i];
}
constexpr float M1_inv[3][3] = {
{1.22701385f, -0.55779998f, 0.28125615f},
{-0.04058018f, 1.11225687f, -0.07167668f},
{-0.07638128f, -0.42148198f, 1.58616322}
};
lms = dot_product(M1_inv, lms);
X = lms[0];
Y = lms[1];
Z = lms[2];
XYZ_D65_to_D50(X, Y, Z);
}
// https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2100-2-201807-I!!PDF-F.pdf
// Perceptual Quantization / SMPTE standard ST.2084
float Color::eval_PQ_curve(float x, bool oetf)
{
constexpr float M1 = 2610.0 / 16384.0;
constexpr float M2 = (2523.0 / 4096.0) * 128.0;
constexpr float C1 = 3424.0 / 4096.0;
constexpr float C2 = (2413.0 / 4096.0) * 32.0;
constexpr float C3 = (2392.0 / 4096.0) * 32.0;
if (x == 0.f) {
return 0.f;
}
float res = 0.f;
if (oetf) {
// assume 1.0 is 100 nits, normalise so that 1.0 is 10000 nits
float p = std::pow(std::max(x, 0.f) / 100.f, M1);
float num = C1 + C2 * p;
float den = 1.f + C3 * p;
res = std::pow(num / den, M2);
} else {
float p = std::pow(x, 1.f / M2);
float num = std::max(p - C1, 0.f);
float den = C2 - C3 * p;
res = std::pow(num / den, 1.f / M1) * 100.f;
}
return res;
}
// https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2100-2-201807-I!!PDF-F.pdf
// Hybrid Log-Gamma
float Color::eval_HLG_curve(float x, bool oetf)
{
constexpr float A = 0.17883277f;
constexpr float B = 0.28466892f; // 1.f - 4.f * A
constexpr float C = 0.55991072953f; // 0.5f - A * std::log(4.f * A)
if (x == 0.f) {
return 0.f;
}
float res = 0.f;
if (oetf) {
// assume 1.0 is 100 nits, normalise so that 1.0 is 1000 nits
float e = LIM01(x / 10.f);
res = (e <= 1.f/12.f) ? std::sqrt(3.f * e) : A * std::log(12.f * e - B) + C;
} else {
res = (x <= 0.5f) ? SQR(x) / 3.f : (std::exp((x - C) / A) + B) / 12.f;
res *= 10.f;
}
return res;
}
float Color::eval_ACEScct_curve(float x, bool forward)
{
if (forward) {
if (x <= 0.078125f) {
return 10.5402377416545f * x + 0.0729055341958355f;
} else {
return (std::log2(x) + 9.72f) / 17.52f;
}
} else {
if (x <= 0.155251141552511f) {
return (x - 0.0729055341958355f) / 10.5402377416545f;
} else {
return std::exp2(x * 17.52f - 9.72f);
}
}
}
// end code take in ART thanks to Alberto Griggio
void Color::primaries_to_xyz(double p[6], double Wx, double Wz, double *pxyz, int cat)
{
//calculate Xr, Xg, Xb, Yr, Yb, Tg, Zr,Zg Zb
double Wy = 1.0;
@ -1967,29 +2162,112 @@ void Color::primaries_to_xyz(double p[6], double Wx, double Wz, double *pxyz)
mat_xyz[2][1] = Sb * Yb;
mat_xyz[2][2] = Sb * Zb;
//chromatic adaptation Bradford
//chromatic adaptation
Matrix MaBradford = {};
MaBradford[0][0] = 0.8951;
MaBradford[0][1] = -0.7502;
MaBradford[0][2] = 0.0389;
MaBradford[1][0] = 0.2664;
MaBradford[1][1] = 1.7135;
MaBradford[1][2] = -0.0685;
MaBradford[2][0] = -0.1614;
MaBradford[2][1] = 0.0367;
MaBradford[2][2] = 1.0296;
if( cat == 0 ) {//i bradford
MaBradford[0][0] = 0.8951;
MaBradford[0][1] = -0.7502;
MaBradford[0][2] = 0.0389;
MaBradford[1][0] = 0.2664;
MaBradford[1][1] = 1.7135;
MaBradford[1][2] = -0.0685;
MaBradford[2][0] = -0.1614;
MaBradford[2][1] = 0.0367;
MaBradford[2][2] = 1.0296;
} else if ( cat == 1 ) {// icat16
MaBradford[0][0] = 1.86206786;
MaBradford[0][1] = -1.01125463;
MaBradford[0][2] = 0.14918677;
MaBradford[1][0] = 0.38752654;
MaBradford[1][1] = 0.62144744;
MaBradford[1][2] = -0.00897398;
MaBradford[2][0] = -0.0158415;
MaBradford[2][1] = -0.03412294;
MaBradford[2][2] = 1.04996444;
} else if ( cat == 2 ) {// icat02
MaBradford[0][0] = 0.99015849;
MaBradford[0][1] = -0.00838772;
MaBradford[0][2] = 0.018229217;
MaBradford[1][0] = 0.239565979;
MaBradford[1][1] = 0.758664642;
MaBradford[1][2] = 0.001770137;
MaBradford[2][0] = 0.0;
MaBradford[2][1] = 0.0;
MaBradford[2][2] = 1.0;
} else if ( cat == 3 ) {//Von Kries
MaBradford[0][0] = 0.40024;
MaBradford[0][1] = -0.2263;
MaBradford[0][2] = 0.0;
MaBradford[1][0] = 0.7076;
MaBradford[1][1] = 1.16532;
MaBradford[1][2] = 0.0;
MaBradford[2][0] = -0.08081;
MaBradford[2][1] = 0.0457;
MaBradford[2][2] = 0.91822;
} else if ( cat == 4 ) {//None XYZ
MaBradford[0][0] = 1.0;
MaBradford[0][1] = 0.0;
MaBradford[0][2] = 0.0;
MaBradford[1][0] = 0.0;
MaBradford[1][1] = 1.0;
MaBradford[1][2] = 0.0;
MaBradford[2][0] = 0.0;
MaBradford[2][1] = 0.0;
MaBradford[2][2] = 1.0;
}
Matrix Ma_oneBradford = {};
Ma_oneBradford[0][0] = 0.9869929;
Ma_oneBradford[0][1] = 0.4323053;
Ma_oneBradford[0][2] = -0.0085287;
Ma_oneBradford[1][0] = -0.1470543;
Ma_oneBradford[1][1] = 0.5183603;
Ma_oneBradford[1][2] = 0.0400428;
Ma_oneBradford[2][0] = 0.1599627;
Ma_oneBradford[2][1] = 0.0492912;
Ma_oneBradford[2][2] = 0.9684867;
if( cat == 0 ) {//Bradford
Ma_oneBradford[0][0] = 0.9869929;
Ma_oneBradford[0][1] = 0.4323053;
Ma_oneBradford[0][2] = -0.0085287;
Ma_oneBradford[1][0] = -0.1470543;
Ma_oneBradford[1][1] = 0.5183603;
Ma_oneBradford[1][2] = 0.0400428;
Ma_oneBradford[2][0] = 0.1599627;
Ma_oneBradford[2][1] = 0.0492912;
Ma_oneBradford[2][2] = 0.9684867;
} else if ( cat == 1 ) { //cat16
Ma_oneBradford[0][0] = 0.401288;
Ma_oneBradford[0][1] = 0.650173;
Ma_oneBradford[0][2] = -0.051461;
Ma_oneBradford[1][0] = -0.250268;
Ma_oneBradford[1][1] = 1.204414;
Ma_oneBradford[1][2] = 0.045854;
Ma_oneBradford[2][0] = -0.002079;
Ma_oneBradford[2][1] = 0.048952;
Ma_oneBradford[2][2] = 0.953127;
} else if ( cat == 2 ) { //cat02
Ma_oneBradford[0][0] = 1.007245;
Ma_oneBradford[0][1] = 0.011136;
Ma_oneBradford[0][2] = -0.018381;
Ma_oneBradford[1][0] = -0.318061;
Ma_oneBradford[1][1] = 1.314589;
Ma_oneBradford[1][2] = 0.003471;
Ma_oneBradford[2][0] = 0.0;
Ma_oneBradford[2][1] = 0.0;
Ma_oneBradford[2][2] = 1.0;
} else if ( cat == 3 ) { //Von Kries
Ma_oneBradford[0][0] = 1.8599364;
Ma_oneBradford[0][1] = 0.3611914;
Ma_oneBradford[0][2] = 0.0;
Ma_oneBradford[1][0] = -1.1293816;
Ma_oneBradford[1][1] = 0.6388125;
Ma_oneBradford[1][2] = 0.0;
Ma_oneBradford[2][0] = 0.2198974;
Ma_oneBradford[2][1] = -0.0000064;
Ma_oneBradford[2][2] = 1.0890636;
} else if ( cat == 4 ) { //none XYZ
Ma_oneBradford[0][0] = 1.0;
Ma_oneBradford[0][1] = 0.0;
Ma_oneBradford[0][2] = 0.0;
Ma_oneBradford[1][0] = 0.0;
Ma_oneBradford[1][1] = 1.0;
Ma_oneBradford[1][2] = 0.0;
Ma_oneBradford[2][0] = 0.0;
Ma_oneBradford[2][1] = 0.0;
Ma_oneBradford[2][2] = 1.0;
}
//R G B source
double Rs = Wx * MaBradford[0][0] + Wy * MaBradford[1][0] + Wz * MaBradford[2][0];
double Gs = Wx * MaBradford[0][1] + Wy * MaBradford[1][1] + Wz * MaBradford[2][1];
@ -2078,16 +2356,15 @@ void Color::primaries_to_xyz(double p[6], double Wx, double Wz, double *pxyz)
* columns of the matrix p=xyz_rgb are RGB tristimulus primaries in XYZ
* c is the color fixed on the boundary; and m=0 for c=0, m=1 for c=255
*/
void Color::gamutmap(float &X, float Y, float &Z, const double p[3][3])
{
float epsil = 0.0001f;
float intermXYZ = X + 15 * Y + 3 * Z;
if(intermXYZ <= 0.f) {
intermXYZ = epsil;
}
float u = 4 * X / (intermXYZ) - u0;
float epsil = 0.0001f;
float intermXYZ = X + 15 * Y + 3 * Z;
if(intermXYZ <= 0.f) {
intermXYZ = epsil;
}
float u = 4 * X / (intermXYZ) - u0;
float v = 9 * Y / (intermXYZ) - v0;
float lam[3][2];
float lam_min = 1.0f;
@ -2118,14 +2395,12 @@ void Color::gamutmap(float &X, float Y, float &Z, const double p[3][3])
v = v * (double) lam_min + v0;
X = (9 * u * Y) / (4 * v);
float intermuv = 12 - 3 * u - 20 * v;
if(intermuv < 0.f) {
intermuv = 0.f;
}
float intermuv = 12 - 3 * u - 20 * v;
if(intermuv < 0.f) {
intermuv = 0.f;
}
Z = (intermuv) * Y / (4 * v);
}
void Color::skinredfloat ( float J, float h, float sres, float Sp, float dred, float protect_red, int sk, float rstprotection, float ko, float &s)

View File

@ -127,8 +127,8 @@ public:
constexpr static float D50x = 0.9642f; //0.96422;
constexpr static float D50z = 0.8249f; //0.82521;
constexpr static double u0 = 4.0 * static_cast<double>(D50x) / (static_cast<double>(D50x) + 15 + 3 * static_cast<double>(D50z));
constexpr static double v0 = 9.0 / (static_cast<double>(D50x) + 15 + 3 * static_cast<double>(D50z));
constexpr static double u0 = 4.0 * static_cast<double>(D50x) / (static_cast<double>(D50x) + 15.0 + 3.0 * static_cast<double>(D50z));
constexpr static double v0 = 9.0 / (static_cast<double>(D50x) + 15.0 + 3.0 * static_cast<double>(D50z));
constexpr static double epskap = 8.0;
constexpr static float epskapf = epskap;
@ -1399,7 +1399,36 @@ static inline void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, v
//static inline float gamma (double x) { return gammatab[x]; }
//static inline float igamma_srgb (double x) { return igammatab_srgb[x]; }
// code take in ART thanks to Alberto Griggio
// Rec.2100 PQ curve
// https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2100-2-201807-I!!PDF-F.pdf
// Perceptual Quantization / SMPTE standard ST.2084
static float eval_PQ_curve(float x, bool oetf);
// Hybrid-log gamma curve
// https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2100-2-201807-I!!PDF-F.pdf
static float eval_HLG_curve(float x, bool oetf);
static float eval_ACEScct_curve(float x, bool inverse);
static void xyz2oklab(float X, float Y, float Z, float &L, float &a, float &b);
static void oklab2xyz(float L, float a, float b, float &X, float &Y, float &Z);
template <class T>
static void rgb2oklab(float R, float G, float B, float &L, float &a, float &b, const T ws[3][3])
{
float X, Y, Z;
rgbxyz(R, G, B, X, Y, Z, ws);
xyz2oklab(X, Y, Z, L, a, b);
}
template <class T>
static void oklab2rgb(float L, float a, float b, float &R, float &G, float &B, const T iws[3][3])
{
float X, Y, Z;
oklab2xyz(L, a, b, X, Y, Z);
xyz2rgb(X, Y, Z, R, G, B, iws);
}
// -------------------------------- Jacques's Munsell correction
@ -1847,13 +1876,13 @@ static inline void Lab2XYZ(vfloat L, vfloat a, vfloat b, vfloat &x, vfloat &y, v
*/
static void gamutmap(float &X, float Y, float &Z, const double p[3][3]);
/**
* @brief Convert primaries in XYZ values in function of illuminant
* @param p primaries red, gree, blue
* @param Wx Wy white for illuminant
* @param pxyz return matrix XYZ
*/
static void primaries_to_xyz (double p[6], double Wx, double Wz, double *pxyz);
/**
* @brief Convert primaries in XYZ values in function of illuminant
* @param p primaries red, gree, blue
* @param Wx Wy white for illuminant
* @param pxyz return matrix XYZ
*/
static void primaries_to_xyz (double p[6], double Wx, double Wz, double *pxyz, int cat);
/**
* @brief Get HSV's hue from the Lab's hue

View File

@ -896,6 +896,7 @@ void Crop::update(int todo)
auto& locllmasCurve = parent->locllmasCurve;
auto& lochhmasCurve = parent->lochhmasCurve;
auto& lochhhmasCurve = parent->lochhhmasCurve;
auto& lochhhmascieCurve = parent->lochhhmascieCurve;
auto& locccmasexpCurve = parent->locccmasexpCurve;
auto& locllmasexpCurve = parent->locllmasexpCurve;
auto& lochhmasexpCurve = parent->lochhmasexpCurve;
@ -935,6 +936,7 @@ void Crop::update(int todo)
auto& locwavCurvejz = parent->locwavCurvejz;
auto& loclmasCurveblwav = parent->loclmasCurveblwav;
auto& loclmasCurvecolwav = parent->loclmasCurvecolwav;
auto& loclmasCurveciewav = parent->loclmasCurveciewav;
auto& loclevwavCurve = parent->loclevwavCurve;
auto& locconwavCurve = parent->locconwavCurve;
auto& loccompwavCurve = parent->loccompwavCurve;
@ -958,6 +960,7 @@ void Crop::update(int todo)
const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve);
const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve);
const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve);
const bool lhhmascieutili = lochhhmascieCurve.Set(params.locallab.spots.at(sp).HHhmaskciecurve);
const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve);
const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve);
const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve);
@ -993,6 +996,7 @@ void Crop::update(int todo)
const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav);
const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav);
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav);
const bool lmasutiliciewav = loclmasCurveciewav.Set(params.locallab.spots.at(sp).LLmaskciecurvewav);
const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve);
const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve);
const bool lhmaslcutili = lochhmaslcCurve.Set(params.locallab.spots.at(sp).HHmasklccurve);
@ -1056,6 +1060,10 @@ void Crop::update(int todo)
float stdretie = parent->stdretis[sp];
float fab = 1.f;
float maxicam = -1000.f;
float rdx, rdy, grx, gry, blx, bly = 0.f;
float meanx, meany, meanxe, meanye = 0.f;
int ill = 2;
float minCD;
float maxCD;
float mini;
@ -1073,6 +1081,9 @@ void Crop::update(int todo)
float Lnresi = 0.f;
float Lhighresi46 = 0.f;
float Lnresi46 = 0.f;
float contsig = params.locallab.spots.at(sp).contsigqcie;
float lightsig = params.locallab.spots.at(sp).lightsigqcie;
/* huerefp[sp] = huere;
chromarefp[sp] = chromare;
lumarefp[sp] = lumare;
@ -1111,7 +1122,7 @@ void Crop::update(int todo)
czlocalcurve2,localczutili,
czjzlocalcurve2,localczjzutili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, lochhhmascieCurve, lhhmascieutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
@ -1127,6 +1138,7 @@ void Crop::update(int todo)
lochhhmas_Curve, lhhmas_utili,
loclmasCurveblwav,lmasutiliblwav,
loclmasCurvecolwav,lmasutilicolwav,
loclmasCurveciewav,lmasutiliciewav,
locwavCurve, locwavutili,
locwavCurvejz, locwavutilijz,
loclevwavCurve, loclevwavutili,
@ -1141,7 +1153,7 @@ void Crop::update(int todo)
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav,
parent->previewDeltaE, parent->locallColorMask, parent->locallColorMaskinv, parent->locallExpMask, parent->locallExpMaskinv, parent->locallSHMask, parent->locallSHMaskinv, parent->locallvibMask, parent->localllcMask, parent->locallsharMask, parent->locallcbMask, parent->locallretiMask, parent->locallsoftMask, parent->localltmMask, parent->locallblMask,
parent->localllogMask, parent->locall_Mask, parent->locallcieMask, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
meantme, stdtme, meanretie, stdretie, fab,
meantme, stdtme, meanretie, stdretie, fab, maxicam,rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye,ill, contsig, lightsig,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
LocallabListener::locallabDenoiseLC denoiselc;
@ -1224,7 +1236,7 @@ void Crop::update(int todo)
czlocalcurve2,localczutili,
czjzlocalcurve2,localczjzutili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili,lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili,lochhhmasCurve, lhhmasutili, lochhhmascieCurve, lhhmascieutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
@ -1240,6 +1252,7 @@ void Crop::update(int todo)
loclmasCurveblwav,lmasutiliblwav,
loclmasCurvecolwav,lmasutilicolwav,
loclmasCurveciewav,lmasutiliciewav,
locwavCurve, locwavutili,
locwavCurvejz, locwavutilijz,
loclevwavCurve, loclevwavutili,
@ -1253,7 +1266,7 @@ void Crop::update(int todo)
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve2, localcutili, rgblocalcurve2, localrgbutili, localexutili, exlocalcurve2, hltonecurveloc2, shtonecurveloc2, tonecurveloc2, lightCurveloc2,
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
meantme, stdtme, meanretie, stdretie, fab,
meantme, stdtme, meanretie, stdretie, fab, maxicam, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, ill, contsig, lightsig,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
}
@ -1599,7 +1612,7 @@ void Crop::update(int todo)
parent->ipf.softLight(labnCrop, params.softlight);
if (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE) {
if (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params.icm.trcExp) {
const int GW = labnCrop->W;
const int GH = labnCrop->H;
std::unique_ptr<LabImage> provis;
@ -1623,8 +1636,52 @@ void Crop::update(int todo)
cmsHTRANSFORM cmsDummy = nullptr;
int ill = 0;
parent->ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, ill, 0, cmsDummy, true, false, false);
parent->ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone, illum, prim, cmsDummy, false, true, true);
int locprim = 0;
bool gamutcontrol = params.icm.gamut;
int catc = rtengine::toUnderlying(params.icm.wcat);
float rdx, rdy, grx, gry, blx, bly = 0.f;
float meanx, meany, meanxe, meanye = 0.f;
parent->ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, 0, ill, 0, 0, rdx, rdy, grx, gry, blx, bly,meanx, meany, meanxe, meanye, cmsDummy, true, false, false, false);
parent->ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone, catc, illum, prim, locprim, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, cmsDummy, false, true, true, gamutcontrol);
const int midton = params.icm.wmidtcie;
if(midton != 0) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[2] = midton;
params.bands[4] = 0;
params.bands[5] = 0;
int mid = abs(midton);
int threshmid = 50;
if(mid > threshmid) {
params.bands[1] = sign(midton) * (mid - threshmid);
params.bands[3] = sign(midton) * (mid - threshmid);
}
parent->ipf.toneEqualizer(tmpImage1.get(), params, prof, skip, false);
}
const bool smoothi = params.icm.wsmoothcie;
if(smoothi) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[1] = 0;
params.bands[2] = 0;
params.bands[3] = 0;
params.bands[4] = -40;//arbitrary value to adapt with WhiteEvjz - here White Ev # 10
params.bands[5] = -80;//8 Ev and above
bool Evsix = true;
if(Evsix) {//EV = 6 majority of images
params.bands[4] = -15;
}
parent->ipf.toneEqualizer(tmpImage1.get(), params, prof, skip, false);
}
parent->ipf.rgb2lab(*tmpImage1, *labnCrop, params.icm.workingProfile);
//labnCrop and provis

View File

@ -94,12 +94,50 @@ constexpr double xyz_jdcmax[3][3] = {//prim red 0.734702 0.265302 gr 0.021908 0.
{0.8394088, 0.0163780, 0.1084133},
{0.3031122, 0.6954651, 0.0014227},
{-0.000048, 0.0357376, 0.7891671}
/*
{0.878152, -0.035991, 0.122039},//stdA
{0.293869, 0.682893, 0.023238},
{0.020725, 0.025411, 0.778763}
*/
/*
{0.831816, 0.041363, 0.091021},//D80
{0.307370, 0.714525, -0.021895},
{-0.004335, 0.039442, 0.789793}
*/
};
constexpr double xyz_jdcmaxstdA[3][3] = {//prim red 0.734702 0.265302 gr 0.021908 0.930288 bl 0.120593 0.001583
{0.878152, -0.035991, 0.122039},//stdA
{0.293869, 0.682893, 0.023238},
{0.020725, 0.025411, 0.778763}
};
constexpr double jdcmaxstdA_xyz[3][3] = {
{1.1209647, 0.06568858, -0.177625},//stdA
{-0.481904, 1.437746, 0.03261678},
{-0.0141074, -0.0486617, 1.28775}
};
constexpr double jdcmax_xyz[3][3] = {
{1.1984508, -0.0197646, -0.1646037},
{-0.5223824, 1.4466349, 0.0691553},
{0.0236634, -0.0655113, 1.2640260}
/*
{1.1209647, 0.06568858, -0.177625},//stdA
{-0.481904, 1.437746, 0.03261678},
{-0.0141074, -0.0486617, 1.28775}
*/
/*
{1.2247276, -0.0630103, -0.142892},//D80
{-0.525835, 1.424446, 0.100089},
{0.032982, -0.0714782, 1.260371}
*/
};

View File

@ -197,9 +197,9 @@ cmsHPROFILE createXYZProfile()
return rtengine::ICCStore::createFromMatrix(mat, false, "XYZ");
}
const double(*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_jdcmax, xyz_beta, xyz_best, xyz_rec2020, xyz_ACESp0, xyz_ACESp1, xyz_bruce};//
const double(*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, jdcmax_xyz, beta_xyz, best_xyz, rec2020_xyz, ACESp0_xyz, ACESp1_xyz, bruce_xyz};//
const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "JDCmax", "Beta RGB", "BestRGB", "Rec2020", "ACESp0", "ACESp1", "BruceRGB"};//
const double(*wprofiles[])[3] = {xyz_sRGB, xyz_adobe, xyz_prophoto, xyz_widegamut, xyz_jdcmax, xyz_jdcmaxstdA, xyz_beta, xyz_best, xyz_rec2020, xyz_ACESp0, xyz_ACESp1, xyz_bruce};//
const double(*iwprofiles[])[3] = {sRGB_xyz, adobe_xyz, prophoto_xyz, widegamut_xyz, jdcmax_xyz, jdcmaxstdA_xyz, beta_xyz, best_xyz, rec2020_xyz, ACESp0_xyz, ACESp1_xyz, bruce_xyz};//
const char* wpnames[] = {"sRGB", "Adobe RGB", "ProPhoto", "WideGamut", "JDCmax", "JDCmax stdA", "Beta RGB", "BestRGB", "Rec2020", "ACESp0", "ACESp1", "BruceRGB"};//
//default = gamma inside profile
//BT709 g=2.22 s=4.5 sRGB g=2.4 s=12.92310
//linear g=1.0

View File

@ -875,8 +875,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
}
for (int sp = 0; sp < (int)params->locallab.spots.size(); sp++) {
if (params->locallab.spots.at(sp).expsharp && params->dirpyrequalizer.cbdlMethod == "bef") {
if (params->locallab.spots.at(sp).shardamping < 1) {
if(params->locallab.spots.at(sp).expsharp && params->dirpyrequalizer.cbdlMethod == "bef") {
if(params->locallab.spots.at(sp).shardamping < 1) {
params->locallab.spots.at(sp).shardamping = 1;
}
}
@ -904,9 +904,15 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
params->toneCurve.black, params->toneCurve.hlcompr, params->toneCurve.hlcomprthresh, params->toneCurve.hrenabled);
}
if (params->toneCurve.histmatching) {
if (params->toneCurve.histmatching ) {
bool exectrcexp = false;//store if Abstract profile enabled
exectrcexp = params->icm.trcExp;
if (!params->toneCurve.fromHistMatching) {
if(params->icm.trcExp) {
params->icm.trcExp = false;//disabled Abstract profile, if hismatching
}
imgsrc->getAutoMatchedToneCurve(params->icm, params->raw, params->wb.observer, params->toneCurve.curve);
params->icm.trcExp = exectrcexp;//restore Abstract profile
}
if (params->toneCurve.autoexp) {
@ -930,6 +936,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (params->locallab.enabled && !params->locallab.spots.empty()) {
const int sizespot = (int)params->locallab.spots.size();
const LocallabParams::LocallabSpot defSpot;
std::vector<LocallabListener::locallabcieBEF> locallciebef;
float *sourceg = nullptr;
sourceg = new float[sizespot];
@ -951,6 +958,14 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
Autogr = new bool[sizespot];
bool *autocie = nullptr;
autocie = new bool[sizespot];
int *whits = nullptr;
whits = new int[sizespot];
int *blacks = nullptr;
blacks = new int[sizespot];
int *whitslog = nullptr;
whitslog = new int[sizespot];
int *blackslog = nullptr;
blackslog = new int[sizespot];
float *locx = nullptr;
@ -975,6 +990,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
whiteev[sp] = params->locallab.spots.at(sp).whiteEv;
sourceg[sp] = params->locallab.spots.at(sp).sourceGray;
sourceab[sp] = params->locallab.spots.at(sp).sourceabs;
whits[sp] = params->locallab.spots.at(sp).whitescie;
blacks[sp] = params->locallab.spots.at(sp).blackscie;
whitslog[sp] = params->locallab.spots.at(sp).whiteslog;
blackslog[sp] = params->locallab.spots.at(sp).blackslog;
Autogr[sp] = params->locallab.spots.at(sp).Autogray;
targetg[sp] = params->locallab.spots.at(sp).targetGray;
locx[sp] = params->locallab.spots.at(sp).loc.at(0) / 2000.0;
@ -1011,9 +1030,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
xsta = 0.f;
xend = 1.f;
}
ipf.getAutoLogloc(sp, imgsrc, sourceg, blackev, whiteev, Autogr, sourceab, fw, fh, xsta, xend, ysta, yend, SCALE);
// printf("sp=%i sg=%f sab=%f\n", sp, sourceg[sp], sourceab[sp]);
ipf.getAutoLogloc(sp, imgsrc, sourceg, blackev, whiteev, Autogr, sourceab, whits, blacks, whitslog, blackslog, fw, fh, xsta, xend, ysta, yend, SCALE);
params->locallab.spots.at(sp).blackEv = blackev[sp];
params->locallab.spots.at(sp).whiteEv = whiteev[sp];
params->locallab.spots.at(sp).blackEvjz = blackev[sp];
@ -1022,10 +1039,25 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
params->locallab.spots.at(sp).sourceabs = sourceab[sp];
params->locallab.spots.at(sp).sourceGraycie = sourceg[sp];
params->locallab.spots.at(sp).sourceabscie = sourceab[sp];
params->locallab.spots.at(sp).whitescie = whits[sp];
params->locallab.spots.at(sp).blackscie = blacks[sp];
params->locallab.spots.at(sp).whiteslog = whitslog[sp];
params->locallab.spots.at(sp).blackslog = blackslog[sp];
float jz1 = defSpot.jz100;
LocallabListener::locallabcieBEF locciebef;
locciebef.blackevbef = blackev[sp];
locciebef.whiteevbef = whiteev[sp];
locciebef.sourcegbef = sourceg[sp];
locciebef.sourceabbef = sourceab[sp];
locciebef.targetgbef = targetg[sp];
locciebef.autocomputbef = autocomput[sp];
locciebef.autociebef = autocie[sp];
locciebef.jz1bef = jz1;
locallciebef.push_back(locciebef);
if (locallListener) {
locallListener->logencodChanged(blackev[sp], whiteev[sp], sourceg[sp], sourceab[sp], targetg[sp], autocomput[sp], autocie[sp], jz1);
locallListener->ciebefChanged(locallciebef,params->locallab.selspot);
}
}
}
@ -1043,6 +1075,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
delete [] blackev;
delete [] targetg;
delete [] sourceab;
delete [] whits;
delete [] blacks;
delete [] whitslog;
delete [] blackslog;
delete [] sourceg;
delete [] cie;
delete [] log;
@ -1092,6 +1128,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
float avge, meantme, stdtme, meanretie, stdretie;
//std::vector<LocallabListener::locallabRef> locallref;
std::vector<LocallabListener::locallabRetiMinMax> locallretiminmax;
std::vector<LocallabListener::locallabcieLC> locallcielc;
std::vector<LocallabListener::locallabcieSIG> locallciesig;
huerefs.resize(params->locallab.spots.size());
huerefblurs.resize(params->locallab.spots.size());
chromarefblurs.resize(params->locallab.spots.size());
@ -1124,7 +1162,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti) {
savenormreti.reset(new LabImage(*oprevl, true));
}
// Set local curves of current spot to LUT
locRETgainCurve.Set(params->locallab.spots.at(sp).localTgaincurve);
locRETtransCurve.Set(params->locallab.spots.at(sp).localTtranscurve);
@ -1138,6 +1176,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
const bool llmasutili = locllmasCurve.Set(params->locallab.spots.at(sp).LLmaskcurve);
const bool lhmasutili = lochhmasCurve.Set(params->locallab.spots.at(sp).HHmaskcurve);
const bool lhhmasutili = lochhhmasCurve.Set(params->locallab.spots.at(sp).HHhmaskcurve);
const bool lhhmascieutili = lochhhmascieCurve.Set(params->locallab.spots.at(sp).HHhmaskciecurve);
const bool llmasexputili = locllmasexpCurve.Set(params->locallab.spots.at(sp).LLmaskexpcurve);
const bool lcmasexputili = locccmasexpCurve.Set(params->locallab.spots.at(sp).CCmaskexpcurve);
const bool lhmasexputili = lochhmasexpCurve.Set(params->locallab.spots.at(sp).HHmaskexpcurve);
@ -1168,13 +1207,13 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
const bool llmascieutili = locllmascieCurve.Set(params->locallab.spots.at(sp).LLmaskciecurve);
const bool lcmascieutili = locccmascieCurve.Set(params->locallab.spots.at(sp).CCmaskciecurve);
const bool lhmascieutili = lochhmascieCurve.Set(params->locallab.spots.at(sp).HHmaskciecurve);
const bool lcmas_utili = locccmas_Curve.Set(params->locallab.spots.at(sp).CCmask_curve);
const bool llmas_utili = locllmas_Curve.Set(params->locallab.spots.at(sp).LLmask_curve);
const bool lhmas_utili = lochhmas_Curve.Set(params->locallab.spots.at(sp).HHmask_curve);
const bool lhhmas_utili = lochhhmas_Curve.Set(params->locallab.spots.at(sp).HHhmask_curve);
const bool lmasutiliblwav = loclmasCurveblwav.Set(params->locallab.spots.at(sp).LLmaskblcurvewav);
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params->locallab.spots.at(sp).LLmaskcolcurvewav);
const bool lmasutiliciewav = loclmasCurveciewav.Set(params->locallab.spots.at(sp).LLmaskciecurvewav);
const bool locwavutili = locwavCurve.Set(params->locallab.spots.at(sp).locwavcurve);
const bool locwavutilijz = locwavCurvejz.Set(params->locallab.spots.at(sp).locwavcurvejz);
const bool loclevwavutili = loclevwavCurve.Set(params->locallab.spots.at(sp).loclevwavcurve);
@ -1215,7 +1254,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
double shcompr = params->locallab.spots.at(sp).shcompr;
double br = params->locallab.spots.at(sp).lightness;
double cont = params->locallab.spots.at(sp).contrast;
float contsig = params->locallab.spots.at(sp).contsigqcie;
float lightsig = params->locallab.spots.at(sp).lightsigqcie;
if (black < 0. && params->locallab.spots.at(sp).expMethod == "pde") {
black *= 1.5;
}
@ -1232,6 +1274,10 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
meanretie = 0.f;
stdretie = 0.f;
float fab = 1.f;
float maxicam = -1000.f;
float rdx, rdy, grx, gry, blx, bly = 0.f;
float meanx, meany, meanxe, meanye = 0.f;
int ill = 2;
bool istm = params->locallab.spots.at(sp).equiltm && params->locallab.spots.at(sp).exptonemap;
bool isreti = params->locallab.spots.at(sp).equilret && params->locallab.spots.at(sp).expreti;
//preparation for mean and sigma on current RT-spot
@ -1257,7 +1303,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
yend = std::min(static_cast<float>(centy + locy), 1.f);
xsta = std::max(static_cast<float>(centx - locxl), 0.f);
xend = std::min(static_cast<float>(centx + locx), 1.f);
// printf("xsta=%f xend=%f ysta=%f yend=%f \n", xsta, xend, ysta, yend);
}
int ww = nprevl->W;
@ -1296,14 +1341,6 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
sca);
// Save Locallab mask curve references for current spot
/*
LocallabListener::locallabRef spotref;
spotref.huer = huer;
spotref.lumar = lumar;
spotref.chromar = chromar;
spotref.fab = 1.f;
locallref.push_back(spotref);
*/
// Locallab tools computation
/* Notes:
* - shbuffer is used as nullptr
@ -1328,7 +1365,11 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
float Lnresi = 0.f;
float Lhighresi46 = 0.f;
float Lnresi46 = 0.f;
Glib::ustring prof = params->icm.workingProfile;
if(params->locallab.spots.at(sp).complexcie == 2) {
params->locallab.spots.at(sp).primMethod = prof;//in Basic mode set to Working profile
}
ipf.Lab_Local(3, sp, (float**)shbuffer, nprevl, nprevl, reserv.get(), savenormtm.get(), savenormreti.get(), lastorigimp.get(), fw, fh, 0, 0, pW, pH, scale, locRETgainCurve, locRETtransCurve,
lllocalcurve, locallutili,
cllocalcurve, localclutili,
@ -1353,7 +1394,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
czlocalcurve, localczutili,
czjzlocalcurve, localczjzutili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, lochhhmascieCurve, lhhmascieutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
@ -1369,6 +1410,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
lochhhmas_Curve, lhhmas_utili,
loclmasCurveblwav, lmasutiliblwav,
loclmasCurvecolwav, lmasutilicolwav,
loclmasCurveciewav, lmasutiliciewav,
locwavCurve, locwavutili,
locwavCurvejz, locwavutilijz,
loclevwavCurve, loclevwavutili,
@ -1382,12 +1424,59 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
huerblu, chromarblu, lumarblu, huer, chromar, lumar, sobeler, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
meantm, stdtm, meanreti, stdreti, fab,
meantm, stdtm, meanreti, stdreti, fab, maxicam, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, ill, contsig, lightsig,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
fabrefp[sp] = fab;
//Illuminant
float w_x = 0.3f;
float w_y = 0.3f;
if(ill == 2) {
w_x = 0.3457f;
w_y = 0.3585f;
} else if(ill == 4) {
w_x = 0.3217f;
w_y = 0.3377f;
} else if(ill == 5) {
w_x = 0.3127f;
w_y = 0.3290f;
} else if(ill == 1) {
w_x = 0.376137f;
w_y = 0.374021f;
} else if(ill == 3) {
w_x = 0.332424f;
w_y = 0.347426f;
} else if(ill == 6) {
w_x = 0.293756f;
w_y = 0.309185f;
} else if(ill == 7) {//D120
w_x = 0.269669f;
w_y = 0.28078f;
} else if(ill == 8) {//stdA
w_x = 0.447573f;
w_y = 0.407440f;
} else if(ill == 9) {//2000K
w_x = 0.526591f;
w_y = 0.41331f;
} else if(ill == 10) {//1500K
w_x = 0.585703f;
w_y = 0.393157f;
} else if(ill == 20) {
w_x = 0.333333f;
w_y = 0.333333f;
}
//move white-point in GUI
double refin = params->locallab.spots.at(sp).refi;
double arefi = (w_y - meany) / (w_x - meanx);
double brefi = w_y - arefi * w_x;
double scalrefi = meanx - w_x;
w_x = w_x + scalrefi * refin;
w_y = w_x * arefi + brefi;
if (istm) { //calculate mean and sigma on full image for use by normalize_mean_dt
float meanf = 0.f;
float stdf = 0.f;
@ -1425,6 +1514,27 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
retiMinMax.Tmax = Tmax;
locallretiminmax.push_back(retiMinMax);
//save Locallab CIE primaries and white for current spot
LocallabListener::locallabcieLC loccielc;
loccielc.redxlc = rdx;
loccielc.redylc = rdy;
loccielc.grexlc = grx;
loccielc.greylc = gry;
loccielc.bluxlc = blx;
loccielc.bluylc = bly;
loccielc.wxlc = w_x;
loccielc.wylc = w_y;
loccielc.meanxlc = meanx;
loccielc.meanylc = meany;
loccielc.meanxelc = meanxe;
loccielc.meanyelc = meanye;
locallcielc.push_back(loccielc);
LocallabListener::locallabcieSIG locciesig;
locciesig.contsigq = contsig;
locciesig.lightsigq = lightsig;
locallciesig.push_back(locciesig);
// Recalculate references after
if (params->locallab.spots.at(sp).spotMethod == "exc") {
ipf.calc_ref(sp, reserv.get(), reserv.get(), 0, 0, pW, pH, scale, huerefblu, chromarefblu, lumarefblu, huer, chromar, lumar, sobeler, avg, locwavCurveden, locwavdenutili);
@ -1434,46 +1544,30 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
// Update Locallab reference values according to recurs parameter
if (params->locallab.spots.at(sp).recurs) {
/*
spotref.huer = huer;
spotref.lumar = lumar;
spotref.chromar = chromar;
spotref.fab = fab;
locallref.at(sp).chromar = chromar;
locallref.at(sp).lumar = lumar;
locallref.at(sp).huer = huer;
locallref.at(sp).fab = fab;
*/
huerefp[sp] = huer;
chromarefp[sp] = chromar;
lumarefp[sp] = lumar;
fabrefp[sp] = fab;
}
// spotref.fab = fab;
// locallref.at(sp).fab = fab;
// locallref.push_back(spotref);
if (locallListener) {
// locallListener->refChanged(locallref, params->locallab.selspot);
locallListener->refChanged2(huerefp, chromarefp, lumarefp, fabrefp, params->locallab.selspot);
locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot);
if (params->locallab.spots.at(sp).expprecam) {
locallListener->cieChanged(locallcielc,params->locallab.selspot);
}
locallListener->sigChanged(locallciesig,params->locallab.selspot);
}
}
delete [] huerefp;
delete [] chromarefp;
delete [] lumarefp;
delete [] fabrefp;
// Transmit Locallab reference values and Locallab Retinex min/max to LocallabListener
/*
if (locallListener) {
locallListener->refChanged(locallref, params->locallab.selspot);
locallListener->minmaxChanged(locallretiminmax, params->locallab.selspot);
}
*/
ipf.lab2rgb(*nprevl, *oprevi, params->icm.workingProfile);
//*************************************************************
// end locallab
@ -1886,7 +1980,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
ipf.softLight(nprevl, params->softlight);
if (params->icm.workingTRC != ColorManagementParams::WorkingTrc::NONE) {
if (params->icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params->icm.trcExp) {
const int GW = nprevl->W;
const int GH = nprevl->H;
std::unique_ptr<LabImage> provis;
@ -1903,15 +1997,58 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
const float gamtone = params->icm.workingTRCGamma;
const float slotone = params->icm.workingTRCSlope;
int illum = toUnderlying(params->icm.will);
const int prim = toUnderlying(params->icm.wprim);
Glib::ustring prof = params->icm.workingProfile;
cmsHTRANSFORM dummy = nullptr;
int ill = 0;
ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, ill, 0, dummy, true, false, false);
ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone, illum, prim, dummy, false, true, true);
bool gamutcontrol = params->icm.gamut;
int catc = toUnderlying(params->icm.wcat);
int locprim = 0;
float rdx, rdy, grx, gry, blx, bly = 0.f;
float meanx, meany, meanxe, meanye = 0.f;
ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, 0, ill, 0, 0, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, dummy, true, false, false, false);
ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone, catc, illum, prim, locprim, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, dummy, false, true, true, gamutcontrol);
const int midton = params->icm.wmidtcie;
if(midton != 0) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[2] = midton;
params.bands[4] = 0;
params.bands[5] = 0;
int mid = abs(midton);
int threshmid = 50;
if(mid > threshmid) {
params.bands[1] = sign(midton) * (mid - threshmid);
params.bands[3] = sign(midton) * (mid - threshmid);
}
ipf.toneEqualizer(tmpImage1.get(), params, prof, scale, false);
}
const bool smoothi = params->icm.wsmoothcie;
if(smoothi) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[1] = 0;
params.bands[2] = 0;
params.bands[3] = 0;
params.bands[4] = -40;//arbitrary value to adapt with WhiteEvjz - here White Ev # 10
params.bands[5] = -80;//8 Ev and above
bool Evsix = true;
if(Evsix) {//EV = 6 majority of images
params.bands[4] = -15;
}
ipf.toneEqualizer(tmpImage1.get(), params, prof, scale, false);
}
ipf.rgb2lab(*tmpImage1, *nprevl, params->icm.workingProfile);
@ -1934,7 +2071,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
tmpImage1.reset();
if (prim == 13) {//pass red gre blue xy in function of area dats Ciexy
if (prim == 14) {//pass red gre blue xy in function of area dats Ciexy
float redgraphx = params->icm.labgridcieALow;
float redgraphy = params->icm.labgridcieBLow;
float blugraphx = params->icm.labgridcieAHigh;
@ -2020,9 +2157,18 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
wy = 0.3932f;
break;
}
//move white point in GUI
double refin = params->icm.refi;
double arefi = (wy - meany) / (wx - meanx);
double brefi = wy - arefi * wx;
double scalrefi = meanx - wx;
wx = wx + scalrefi * refin;
wy = wx * arefi + brefi;
if (primListener) {
primListener->iprimChanged(r_x, r_y, b_x, b_y, g_x, g_y, wx, wy);
primListener->iprimChanged(r_x, r_y, b_x, b_y, g_x, g_y, wx, wy, meanx, meany);
}
}
}
@ -2116,6 +2262,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
}
double tempsym = 5003.;
double greensym = 1.;
int wmodel = 0;//wmodel allows - arbitrary - choice of illuminant and temp with choice
if (params->colorappearance.wbmodel == "RawT") {
@ -2128,28 +2275,37 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if (params->colorappearance.catmethod == "symg" && wmodel == 2) {
tempsym = params->wb.temperature;//force white balance in symmetric
} else {
} else if(params->colorappearance.autotempout) {
if (params->colorappearance.illum == "iA") {//otherwise force illuminant source
tempsym = 2856.;
greensym = 1.;
} else if (params->colorappearance.illum == "i41") {
tempsym = 4100.;
greensym = 1.;
} else if (params->colorappearance.illum == "i50") {
tempsym = 5003.;
greensym = 1.;
} else if (params->colorappearance.illum == "i55") {
tempsym = 5503.;
} else if (params->colorappearance.illum == "i60") {
tempsym = 6000. ;
greensym = 1.;
} else if (params->colorappearance.illum == "i65") {
tempsym = 6504.;
greensym = 1.;
} else if (params->colorappearance.illum == "i75") {
tempsym = 7504.;
greensym = 1.;
} else if (params->colorappearance.illum == "ifree") {
tempsym = params->wb.temperature;//force white balance in symmetric
greensym = 1.;
}
} else {
tempsym = params->colorappearance.tempout;
greensym = params->colorappearance.greenout;
}
if (params->colorappearance.enabled && params->colorappearance.autotempout) {
acListener->wbCamChanged(tempsym, 1.f); //real temp and tint = 1.
if (params->colorappearance.enabled) {
acListener->wbCamChanged(tempsym, greensym); //real temp and tint.
}
} else {

View File

@ -305,6 +305,7 @@ protected:
LocLLmaskCurve locllmasCurve;
LocHHmaskCurve lochhmasCurve;
LocHHmaskCurve lochhhmasCurve;
LocHHmaskCurve lochhhmascieCurve;
LocCCmaskCurve locccmasexpCurve;
LocLLmaskCurve locllmasexpCurve;
LocHHmaskCurve lochhmasexpCurve;
@ -343,6 +344,7 @@ protected:
LocwavCurve locwavCurve;
LocwavCurve loclmasCurveblwav;
LocwavCurve loclmasCurvecolwav;
LocwavCurve loclmasCurveciewav;
LocwavCurve loclevwavCurve;
LocwavCurve locconwavCurve;
LocwavCurve loccompwavCurve;

View File

@ -193,7 +193,8 @@ enum class BlurType {
void moyeqt(Imagefloat* working, float &moyS, float &eqty);
void luminanceCurve(LabImage* lold, LabImage* lnew, const LUTf &curve);
void ciecamloc_02float(const struct local_params& lp, int sp, LabImage* lab, int bfw, int bfh, int call, int sk, const LUTf& cielocalcurve, bool localcieutili, const LUTf& cielocalcurve2, bool localcieutili2, const LUTf& jzlocalcurve, bool localjzutili, const LUTf& czlocalcurve, bool localczutili, const LUTf& czjzlocalcurve, bool localczjzutili, const LocCHCurve& locchCurvejz, const LocHHCurve& lochhCurve, const LocLHCurve& loclhCurve, bool HHcurvejz, bool CHcurvejz, bool LHcurvejz, const LocwavCurve& locwavCurvejz, bool locwavutilijz);
void ciecamloc_02float(struct local_params& lp, int sp, LabImage* lab, int bfw, int bfh, int call, int sk, const LUTf& cielocalcurve, bool localcieutili, const LUTf& cielocalcurve2, bool localcieutili2, const LUTf& jzlocalcurve, bool localjzutili, const LUTf& czlocalcurve, bool localczutili, const LUTf& czjzlocalcurve, bool localczjzutili, const LocCHCurve& locchCurvejz, const LocHHCurve& lochhCurve, const LocLHCurve& loclhCurve, bool HHcurvejz, bool CHcurvejz, bool LHcurvejz,
const LocwavCurve& locwavCurvejz, bool locwavutilijz, float &maxicam, float &comtsig, float &lightsig);
void ciecam_02float(CieImage* ncie, float adap, int pW, int pwb, LabImage* lab, const procparams::ProcParams* params,
const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3,
@ -252,7 +253,7 @@ enum class BlurType {
float strumask, bool astool,
const LocCCmaskCurve & locccmasCurve, bool lcmasutili,
const LocLLmaskCurve & locllmasCurve, bool llmasutili,
const LocHHmaskCurve & lochhmasCurve, bool lhmasutili, const LocHHmaskCurve & lochhhmasCurve, bool lhhmasutili,
const LocHHmaskCurve & lochhmasCurve, bool lhmasutili, const LocHHmaskCurve & lochhhmasCurve, bool lhhmasutili,
bool multiThread, bool enaMask, bool showmaske, bool deltaE, bool modmask, bool zero, bool modif, float chrom, float rad, float lap, float gamma, float slope, float blendm, float blendmab, int shado, int highl, float amountcd, float anchorcd,
const LUTf& lmasklocalcurve, bool localmaskutili,
const LocwavCurve & loclmasCurvecolwav, bool lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr,
@ -270,10 +271,10 @@ enum class BlurType {
void loccont(int bfw, int bfh, LabImage* tmp1, float rad, float stren, int sk);
void rex_poisson_dct(float * data, size_t nx, size_t ny, double m);
void mean_dt(const float * data, size_t size, double& mean_p, double& dt_p);
void mean_dt(const float * data, int size, double& mean_p, double& dt_p, double nbstd);
float *cos_table(size_t size);
void normalize_mean_dt(float *data, const float *ref, size_t size, float mod, float sigm, float mdef, float sdef, float mdef2, float sdef2);
void normalize_mean_dt(float *data, const float *ref, int size, float mod, float sigm, float mdef, float sdef, float mdef2, float sdef2, double nbstd);
void retinex_pde(const float *datain, float * dataout, int bfw, int bfh, float thresh, float multy, float *dE, int show, int dEenable, int normalize);
void exposure_pde(float *dataor, float *datain, float * dataout, int bfw, int bfh, float thresh, float mod);
void fftw_convol_blur(float *input, float *output, int bfw, int bfh, float radius, int fftkern, int algo);
@ -291,7 +292,7 @@ enum class BlurType {
//3 functions from Alberto Griggio, adapted J.Desmis 2019
void filmGrain(Imagefloat *rgb, int isogr, int strengr, int scalegr,float divgr, int bfw, int bfh, int call, int fw, int fh);
void log_encode(Imagefloat *rgb, struct local_params & lp, bool multiThread, int bfw, int bfh);
void getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, float *sourceab, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE);
void getAutoLogloc(int sp, ImageSource *imgsrc, float *sourceg, float *blackev, float *whiteev, bool *Autogr, float *sourceab, int *whits, int *blacks, int *whitslog, int *blackslog, int fw, int fh, float xsta, float xend, float ysta, float yend, int SCALE);
void MSRLocal(int call, int sp, bool fftw, int lum, float** reducDE, LabImage * bufreti, LabImage * bufmask, LabImage * buforig, LabImage * buforigmas, LabImage * bufmaskorigreti, float** luminance, const float* const *originalLuminance,
const int width, const int height, int bfwr, int bfhr, const procparams::LocallabParams &loc, const int skip, const LocretigainCurve &locRETgainCcurve, const LocretitransCurve &locRETtransCcurve,
@ -331,7 +332,7 @@ enum class BlurType {
const LUTf& czlocalcurve, bool localczutili,
const LUTf& czjzlocalcurve, bool localczjzutili,
const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& llochhhmasCurve, bool lhhmasutili,
const LocCCmaskCurve& locccmasCurve, bool lcmasutili, const LocLLmaskCurve& locllmasCurve, bool llmasutili, const LocHHmaskCurve& lochhmasCurve, bool lhmasutili, const LocHHmaskCurve& llochhhmasCurve, bool lhhmasutili, const LocHHmaskCurve& llochhhmascieCurve, bool lhhmascieutili,
const LocCCmaskCurve& locccmasexpCurve, bool lcmasexputili, const LocLLmaskCurve& locllmasexpCurve, bool llmasexputili, const LocHHmaskCurve& lochhmasexpCurve, bool lhmasexputili,
const LocCCmaskCurve& locccmasSHCurve, bool lcmasSHutili, const LocLLmaskCurve& locllmasSHCurve, bool llmasSHutili, const LocHHmaskCurve& lochhmasSHCurve, bool lhmasSHutili,
const LocCCmaskCurve& locccmasvibCurve, bool lcmasvibutili, const LocLLmaskCurve& locllmasvibCurve, bool llmasvibutili, const LocHHmaskCurve& lochhmasvibCurve, bool lhmasvibutili,
@ -348,6 +349,7 @@ enum class BlurType {
const LocwavCurve& loclmasCurveblwav, bool lmasutiliblwav,
const LocwavCurve& loclmasCurvecolwav, bool lmasutilicolwav,
const LocwavCurve& loclmasCurveciewav, bool lmasutiliciewav,
const LocwavCurve& locwavCurve, bool locwavutili,
const LocwavCurve& locwavCurvejz, bool locwavutilijz,
const LocwavCurve& loclevwavCurve, bool loclevwavutili,
@ -362,10 +364,12 @@ enum class BlurType {
double& huerefblur, double &chromarefblur, double& lumarefblur, double &hueref, double &chromaref, double &lumaref, double &sobelref, int &lastsav,
bool prevDeltaE, int llColorMask, int llColorMaskinv, int llExpMask, int llExpMaskinv, int llSHMask, int llSHMaskinv, int llvibMask, int lllcMask, int llsharMask, int llcbMask, int llretiMask, int llsoftMask, int lltmMask, int llblMask, int lllogMask, int ll_Mask, int llcieMask,
float &minCD, float &maxCD, float &mini, float &maxi, float &Tmean, float &Tsigma, float &Tmin, float &Tmax,
float& meantm, float& stdtm, float& meanreti, float& stdreti, float &fab,
float& meantm, float& stdtm, float& meanreti, float& stdreti, float &fab, float &maxicam, float &rdx, float &rdy, float &grx, float &gry, float &blx, float &bly, float &meanx, float &meany, float &meanxe, float &meanye, int &ill, float &contsig, float &lightsig,
float &highresi, float &nresi, float &highresi46, float &nresi46, float &Lhighresi, float &Lnresi, float &Lhighresi46, float &Lnresi46);
void tone_eqdehaz(ImProcFunctions *ipf, Imagefloat *rgb, int whits, int blacks, const Glib::ustring &workingProfile, double scale, bool multithread);
void tone_eqcam2(ImProcFunctions *ipf, Imagefloat *rgb, int whits, int blacks, const Glib::ustring &workingProfile, double scale, bool multithread);
void tone_eqdehaz(ImProcFunctions *ipf, Imagefloat *rgb, int whits, int blacks, const Glib::ustring &workingProfile, double scale, bool multithread);
void tone_eqcam(ImProcFunctions *ipf, Imagefloat *rgb, int midtone, const Glib::ustring &workingProfile, double scale, bool multithread);
void addGaNoise(LabImage *lab, LabImage *dst, const float mean, const float variance, const int sk);
void BlurNoise_Localold(int call, const struct local_params& lp, LabImage* original, LabImage* transformed, const LabImage* const tmp1, int cx, int cy);
@ -507,7 +511,9 @@ enum class BlurType {
static void rgb2lab(std::uint8_t red, std::uint8_t green, std::uint8_t blue, float &L, float &a, float &b, const procparams::ColorManagementParams &icm, bool consider_histogram_settings = true);
Imagefloat* lab2rgbOut(LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm);
// CieImage *ciec;
void workingtrc(const Imagefloat* src, Imagefloat* dst, int cw, int ch, int mul, Glib::ustring &profile, double gampos, double slpos, int &illum, int prim, cmsHTRANSFORM &transform, bool normalizeIn = true, bool normalizeOut = true, bool keepTransForm = false) const;
void workingtrc(int sp, Imagefloat* src, Imagefloat* dst, int cw, int ch, int mul, Glib::ustring &profile, double gampos, double slpos, int cat, int &illum, int prim, int locprim,
float &rdx, float &rdy, float &grx, float &gry, float &blx, float &bly, float &meanx, float &meany, float &meanxe, float &meanye,
cmsHTRANSFORM &transform, bool normalizeIn = true, bool normalizeOut = true, bool keepTransForm = false, bool gamutcontrol = false) const;
void preserv(LabImage *nprevl, LabImage *provis, int cw, int ch);
bool transCoord(int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LensCorrection *pLCPMap = nullptr) const;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,11 @@ const std::vector<std::array<float, 3>> colormap = {
{1.f, 0.f, 0.f}, // whites
{1.f, 0.f, 0.f},
{1.f, 0.f, 0.f},
{1.f, 0.f, 0.f},
{1.f, 0.f, 0.f},
{1.f, 0.f, 0.f},
{1.f, 0.f, 0.f}
};
@ -72,16 +76,16 @@ void toneEqualizer(
};
// Build the luma channels: band-pass filters with gaussian windows of
// std 2 EV, spaced by 2 EV
const float centers[12] = {
const float centers[15] = {
-16.0f, -14.0f, -12.0f, -10.0f, -8.0f, -6.0f,
-4.0f, -2.0f, 0.0f, 2.0f, 4.0f, 6.0f
-4.0f, -2.0f, 0.0f, 2.0f, 4.0f, 6.0f, 8.0f, 10.0f, 12.0f
};
const auto conv = [&](int v, float lo, float hi) -> float {
const float f = v < 0 ? lo : hi;
return exp2(float(v) / 100.f * f);
};
const float factors[12] = {
const float factors[15] = {
conv(params.bands[0], 2.f, 3.f), // -16 EV
conv(params.bands[0], 2.f, 3.f), // -14 EV
conv(params.bands[0], 2.f, 3.f), // -12 EV
@ -93,7 +97,12 @@ void toneEqualizer(
conv(params.bands[4], 3.f, 2.f), // 0 EV
conv(params.bands[4], 3.f, 2.f), // 2 EV
conv(params.bands[4], 3.f, 2.f), // 4 EV
conv(params.bands[4], 3.f, 2.f) // 6 EV
conv(params.bands[4], 3.f, 2.f), // 6 EV
// this settings under are very rarely used...images with very high DR - I add a slider, but it's not the goal: the goal is white distribution (in very rare case)
// I have not change "main" Tone Equalizer.
conv(params.bands[5], 3.f, 2.f), // 8 EV Added for white distribution (Cam16 and Log encode) and images with very high DR
conv(params.bands[5], 3.f, 2.f), // 10 EV Added for white distribution(Cam16 and Log encode) and images with very high DR
conv(params.bands[5], 3.f, 2.f) // 12 EV Added for white distribution(Cam16 and Log encode) and images with very high DR
};
rtengine::TMatrix ws = rtengine::ICCStore::getInstance()->workingSpaceMatrix(workingProfile);
@ -125,7 +134,7 @@ void toneEqualizer(
#endif
for (int y = 0; y < H; ++y) {
for (int x = 0; x < W; ++x) {
float l = rtengine::LIM(log2(rtengine::max(Y[y][x], 1e-9f)), centers[0], centers[11]);
float l = rtengine::LIM(log2(rtengine::max(Y[y][x], 1e-9f)), centers[0], centers[13]);
float ll = round(l * base_posterization) / base_posterization;
Y2[y][x] = Y[y][x];
Y[y][x] = exp2(ll);
@ -145,12 +154,12 @@ void toneEqualizer(
// For every pixel luminance, the sum of the gaussian masks
float w_sum = 0.f;
for (int i = 0; i < 12; ++i) {
for (int i = 0; i < 15; ++i) {
w_sum += gauss(centers[i], 0.f);
}
constexpr float luma_lo = -14.f;
constexpr float luma_hi = 4.f;
constexpr float luma_hi = 6.f;
const auto process_pixel =
[&](float y) -> float {
@ -161,7 +170,7 @@ void toneEqualizer(
// luminance channel to current pixel
float correction = 0.0f;
for (int c = 0; c < 12; ++c)
for (int c = 0; c < 15; ++c)
{
correction += gauss(centers[c], luma) * factors[c];
}
@ -198,7 +207,7 @@ void toneEqualizer(
// build the correction as the sum of the contribution of each
// luminance channel to current pixel
for (int c = 0; c < 12; ++c) {
for (int c = 0; c < 15; ++c) {
float w = gauss(centers[c], luma);
for (int i = 0; i < 3; ++i) {
ret[i] += w * cur_colormap[c][i];
@ -213,10 +222,10 @@ void toneEqualizer(
#ifdef __SSE2__
vfloat vfactors[12];
vfloat vcenters[12];
vfloat vfactors[15];
vfloat vcenters[15];
for (int i = 0; i < 12; ++i) {
for (int i = 0; i < 15; ++i) {
vfactors[i] = F2V(factors[i]);
vcenters[i] = F2V(centers[i]);
}
@ -240,7 +249,7 @@ void toneEqualizer(
vfloat correction = zerov;
for (int c = 0; c < 12; ++c)
for (int c = 0; c < 15; ++c)
{
correction += vgauss(vcenters[c], luma) * vfactors[c];
}

View File

@ -1108,7 +1108,7 @@ enum ProcEventCode {
Evlocallabsigmoidldacie = 1078,
Evlocallabsigmoidthcie = 1079,
Evlocallabsigmoidblcie = 1080,
Evlocallabsigmoidqjcie = 1081,
Evlocallabcomprcieauto = 1081,
Evlocallabhuecie = 1082,
Evlocallabjabcie = 1083,
Evlocallablightjzcie = 1084,
@ -1177,6 +1177,7 @@ enum ProcEventCode {
Evlocallabsigjz = 1147,
Evlocallabsigq = 1148,
Evlocallablogcie = 1149,
NUMOFEVENTS
};

View File

@ -1886,7 +1886,7 @@ bool SHParams::operator !=(const SHParams& other) const
ToneEqualizerParams::ToneEqualizerParams() :
enabled(false),
bands{0, 0, 0, 0, 0},
bands{0, 0, 0, 0, 0, 0},
regularization(0),
show_colormap(false),
pivot(0)
@ -2390,17 +2390,24 @@ ColorManagementParams::ColorManagementParams() :
workingTRC(WorkingTrc::NONE),
will(Illuminant::DEFAULT),
wprim(Primaries::DEFAULT),
wcat(Cat::BRAD),
workingTRCGamma(2.4),//gamma sRGB
workingTRCSlope(12.92),
wmidtcie(0.),
wsmoothcie(false),
redx(0.7347),
redy(0.2653),
grex(0.1596),
grey(0.8404),
blux(0.0366),
bluy(0.0001),
refi(0.),
shiftx(0.),
shifty(0.),
preser(0.),
fbw(false),
gamut(false),
trcExp(false),
gamut(true),
labgridcieALow(0.51763),//Prophoto red = (0.7347+0.1) * 1.81818 - 1
labgridcieBLow(-0.33582),
labgridcieAHigh(-0.75163),//Prophoto blue
@ -2409,6 +2416,8 @@ ColorManagementParams::ColorManagementParams() :
labgridcieGy(-0.70909),//0.84
labgridcieWx(-0.18964),//D50 0.3457, 0.3585,
labgridcieWy(-0.16636),//
labgridcieMx(0.),//
labgridcieMy(0.),//
aRendIntent(RI_RELATIVE),
outputProfile(options.rtSettings.srgb),
outputIntent(RI_RELATIVE),
@ -2429,14 +2438,20 @@ bool ColorManagementParams::operator ==(const ColorManagementParams& other) cons
&& workingTRC == other.workingTRC
&& will == other.will
&& wprim == other.wprim
&& wcat == other.wcat
&& workingTRCGamma == other.workingTRCGamma
&& workingTRCSlope == other.workingTRCSlope
&& wmidtcie == other.wmidtcie
&& wsmoothcie == other.wsmoothcie
&& redx == other.redx
&& redy == other.redy
&& grex == other.grex
&& grey == other.grey
&& blux == other.blux
&& bluy == other.bluy
&& refi == other.refi
&& shiftx == other.shiftx
&& shifty == other.shifty
&& labgridcieALow == other.labgridcieALow
&& labgridcieBLow == other.labgridcieBLow
&& labgridcieAHigh == other.labgridcieAHigh
@ -2445,8 +2460,11 @@ bool ColorManagementParams::operator ==(const ColorManagementParams& other) cons
&& labgridcieGy == other.labgridcieGy
&& labgridcieWx == other.labgridcieWx
&& labgridcieWy == other.labgridcieWy
&& labgridcieMx == other.labgridcieMx
&& labgridcieMy == other.labgridcieMy
&& preser == other.preser
&& fbw == other.fbw
&& trcExp == other.trcExp
&& gamut == other.gamut
&& aRendIntent == other.aRendIntent
&& outputProfile == other.outputProfile
@ -2976,7 +2994,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
loc{150, 150, 150, 150},
centerX(0),
centerY(0),
circrad(18),
circrad(18.),
qualityMethod("enh"),
complexMethod("mod"),
transit(60.),
@ -3360,7 +3378,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
expshadhigh(false),
complexshadhigh(0),
shMethod("tone"),
multsh{0, 0, 0, 0, 0},
multsh{0, 0, 0, 0, 0, 0},
highlights(0),
h_tonalwidth(70),
shadows(0),
@ -4227,8 +4245,13 @@ LocallabParams::LocallabSpot::LocallabSpot() :
fullimage(true),
repar(100.0),
ciecam(false),
blackEv(-5.0),
whiteEv(10.0),
satlog(false),
blackEv(-5.00),
whiteEv(10.00),
whiteslog(0),
blackslog(0),
comprlog(0.4),
strelog(100.),
detail(0.6),
sensilog(60),
sursour("Average"),
@ -4400,6 +4423,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
// ciecam
visicie(false),
expcie(false),
expprecam(false),
complexcie(0),
reparcie(100.),
sensicie(60),
@ -4408,8 +4432,14 @@ LocallabParams::LocallabSpot::LocallabSpot() :
forcebw(true),
qtoj(false),
jabcie(true),
sigmoidqjcie(false),
comprcieauto(false),
normcie(true),
gamutcie(true),
sigcie(true),
logcie(false),
satcie(true),
logcieq(false),
smoothcie(false),
logjz(false),
sigjz(false),
sigq(false),
@ -4419,6 +4449,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
sursourcie("Average"),
modecie("com"),
modecam("cam16"),
bwevMethod("sig"),
saturlcie(0.),
rstprotectcie(0.),
chromlcie(0.),
@ -4550,8 +4581,10 @@ LocallabParams::LocallabSpot::LocallabSpot() :
lightlcie(0.),
lightjzcie(0.),
lightqcie(0.),
lightsigqcie(0.),
contlcie(0.),
contjzcie(0.),
detailciejz(30.),
adapjzcie(4.0),
jz100(0.25),
pqremap(120.),
@ -4578,33 +4611,60 @@ LocallabParams::LocallabSpot::LocallabSpot() :
},
csthresholdjz(0, 0, 7, 4, false),
contthrescie(0.),
blackEvjz(-5.0),
whiteEvjz(10.0),
blackEvjz(-5.00),
whiteEvjz(10.00),
targetjz(18.0),
sigmoidldacie(0.5),
sigmoidthcie(1.),
sigmoidblcie(1.),
sigmoidthcie(1.2),
sigmoidsenscie(0.9),
sigmoidblcie(0.75),
comprcie(0.4),
strcielog(80.),
comprcieth(6.),
gamjcie(2.4),
slopjcie(12.923),
slopesmo(1.),
midtcie(0),
grexl(0.1596),
greyl(0.8404),
bluxl(0.0366),
bluyl(0.0001),
redxl(0.7347),
redyl(0.2653),
refi(0.),
shiftxl(0.),
shiftyl(0.),
labgridcieALow(0.51763),//Prophoto red = (0.7347+0.1) * 1.81818 - 1
labgridcieBLow(-0.33582),
labgridcieAHigh(-0.75163),//Prophoto blue
labgridcieBHigh(-0.8180),
labgridcieGx(-0.528),//Prophoto green 0.1596
labgridcieGy(0.7096),//0.84
labgridcieWx(-0.18964),//D50 0.3457, 0.3585,
labgridcieWy(-0.16636),//
labgridcieMx(0.),
labgridcieMy(0.),//
whitescie(0),
blackscie(0),
illMethod("d50"),
smoothciemet("none"),
primMethod("pro"),
catMethod("brad"),
sigmoidldajzcie(0.5),
sigmoidthjzcie(1.),
sigmoidbljzcie(1.),
contqcie(0.),
contsigqcie(0.),
colorflcie(0.),
/*
lightlzcam(0.),
lightqzcam(0.),
contlzcam(0.),
contqzcam(0.),
contthreszcam(0.),
colorflzcam(0.),
saturzcam(0.),
chromzcam(0.),
*/
targabscie(16.),
targetGraycie(18.),
catadcie(0.),
detailcie(0.),
detailcie(30.),
surroundcie("Average"),
strgradcie(0.),
anggradcie(0.),
enacieMask(false),
enacieMaskall(false),
CCmaskciecurve{
static_cast<double>(FCT_MinMaxCPoints),
0.0,
@ -4650,6 +4710,22 @@ LocallabParams::LocallabSpot::LocallabSpot() :
0.35,
0.35
},
HHhmaskciecurve{
static_cast<double>(FCT_MinMaxCPoints),
0.0,
0.5,
0.35,
0.35,
0.50,
0.5,
0.35,
0.35,
1.00,
0.5,
0.35,
0.35
},
blendmaskcie(0),
radmaskcie(0.0),
chromaskcie(0.0),
@ -4666,8 +4742,27 @@ LocallabParams::LocallabSpot::LocallabSpot() :
recothrescie(1.),
lowthrescie(12.),
higthrescie(85.),
decaycie(2.)
decaycie(2.),
strumaskcie(0.),
toolcie(false),
fftcieMask(true),
contcie(0.),
blurcie(0.2),
highmaskcie(0.),
shadmaskcie(0.),
LLmaskciecurvewav{
static_cast<double>(FCT_MinMaxCPoints),
0.0,
0.5,
0.35,
0.35,
1.,
0.5,
0.35,
0.35
},
csthresholdcie(0, 0, 6, 5, false)
{
}
@ -4843,7 +4938,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& shMethod == other.shMethod
&& [this, &other]() -> bool
{
for (int i = 0; i < 5; ++i) {
for (int i = 0; i < 6; ++i) {
if (multsh[i] != other.multsh[i]) {
return false;
}
@ -5226,8 +5321,13 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& fullimage == other.fullimage
&& repar == other.repar
&& ciecam == other.ciecam
&& satlog == other.satlog
&& blackEv == other.blackEv
&& whiteEv == other.whiteEv
&& whiteslog == other.whiteslog
&& blackslog == other.blackslog
&& comprlog == other.comprlog
&& strelog == other.strelog
&& detail == other.detail
&& sensilog == other.sensilog
&& baselog == other.baselog
@ -5280,6 +5380,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
//ciecam
&& visicie == other.visicie
&& expcie == other.expcie
&& expprecam == other.expprecam
&& complexcie == other.complexcie
&& reparcie == other.reparcie
&& sensicie == other.sensicie
@ -5288,8 +5389,14 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& forcebw == other.forcebw
&& qtoj == other.qtoj
&& jabcie == other.jabcie
&& sigmoidqjcie == other.sigmoidqjcie
&& comprcieauto == other.comprcieauto
&& normcie == other.normcie
&& gamutcie == other.gamutcie
&& sigcie == other.sigcie
&& logcie == other.logcie
&& satcie == other.satcie
&& logcieq == other.logcieq
&& smoothcie == other.smoothcie
&& logjz == other.logjz
&& sigjz == other.sigjz
&& sigq == other.sigq
@ -5299,6 +5406,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& sursourcie == other.sursourcie
&& modecie == other.modecie
&& modecam == other.modecam
&& bwevMethod == other.bwevMethod
&& saturlcie == other.saturlcie
&& rstprotectcie == other.rstprotectcie
&& chromlcie == other.chromlcie
@ -5322,8 +5430,10 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& lightlcie == other.lightlcie
&& lightjzcie == other.lightjzcie
&& lightqcie == other.lightqcie
&& lightsigqcie == other.lightsigqcie
&& contlcie == other.contlcie
&& contjzcie == other.contjzcie
&& detailciejz == other.detailciejz
&& adapjzcie == other.adapjzcie
&& jz100 == other.jz100
&& pqremap == other.pqremap
@ -5345,30 +5455,59 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& targetjz == other.targetjz
&& sigmoidldacie == other.sigmoidldacie
&& sigmoidthcie == other.sigmoidthcie
&& sigmoidsenscie == other.sigmoidsenscie
&& sigmoidblcie == other.sigmoidblcie
&& comprcie == other.comprcie
&& strcielog == other.strcielog
&& comprcieth == other.comprcieth
&& gamjcie == other.gamjcie
&& slopjcie == other.slopjcie
&& slopesmo == other.slopesmo
&& midtcie == other.midtcie
&& redxl == other.redxl
&& redyl == other.redyl
&& grexl == other.grexl
&& greyl == other.greyl
&& bluxl == other.bluxl
&& bluyl == other.bluyl
&& refi == other.refi
&& shiftxl == other.shiftxl
&& shiftyl == other.shiftyl
&& labgridcieALow == other.labgridcieALow
&& labgridcieBLow == other.labgridcieBLow
&& labgridcieAHigh == other.labgridcieAHigh
&& labgridcieBHigh == other.labgridcieBHigh
&& labgridcieGx == other.labgridcieGx
&& labgridcieGy == other.labgridcieGy
&& labgridcieWx == other.labgridcieWx
&& labgridcieWy == other.labgridcieWy
&& labgridcieMx == other.labgridcieMx
&& labgridcieMy == other.labgridcieMy
&& whitescie == other.whitescie
&& blackscie == other.blackscie
&& illMethod == other.illMethod
&& smoothciemet == other.smoothciemet
&& primMethod == other.primMethod
&& catMethod == other.catMethod
&& sigmoidldajzcie == other.sigmoidldajzcie
&& sigmoidthjzcie == other.sigmoidthjzcie
&& sigmoidbljzcie == other.sigmoidbljzcie
&& contqcie == other.contqcie
&& contsigqcie == other.contsigqcie
&& colorflcie == other.colorflcie
/* && lightlzcam == other.lightlzcam
&& lightqzcam == other.lightqzcam
&& contlzcam == other.contlzcam
&& contqzcam == other.contqzcam
&& contthreszcam == other.contthreszcam
&& colorflzcam == other.colorflzcam
&& saturzcam == other.saturzcam
&& chromzcam == other.chromzcam
*/
&& targabscie == other.targabscie
&& targetGraycie == other.targetGraycie
&& catadcie == other.catadcie
&& detailcie == other.detailcie
&& strgradcie == other.strgradcie
&& anggradcie == other.anggradcie
&& surroundcie == other.surroundcie
&& enacieMask == other.enacieMask
&& enacieMaskall == other.enacieMaskall
&& CCmaskciecurve == other.CCmaskciecurve
&& LLmaskciecurve == other.LLmaskciecurve
&& HHmaskciecurve == other.HHmaskciecurve
&& HHhmaskciecurve == other.HHhmaskcurve
&& blendmaskcie == other.blendmaskcie
&& radmaskcie == other.radmaskcie
&& chromaskcie == other.chromaskcie
@ -5379,8 +5518,16 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& recothrescie == other.recothrescie
&& lowthrescie == other.lowthrescie
&& higthrescie == other.higthrescie
&& decaycie == other.decaycie;
&& decaycie == other.decaycie
&& strumaskcie == other.strumaskcie
&& toolcie == other.toolcie
&& blurcie == other.blurcie
&& contcie == other.contcie
&& highmaskcie == other.highmaskcie
&& shadmaskcie == other.shadmaskcie
&& fftcieMask == other.fftcieMask
&& LLmaskciecurvewav == other.LLmaskciecurvewav
&& csthresholdcie == other.csthresholdcie;
}
@ -6730,7 +6877,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->complexshadhigh, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, keyFile);
saveToKeyfile(!pedited || spot_edited->shMethod, "Locallab", "ShMethod_" + index_str, spot.shMethod, keyFile);
for (int j = 0; j < 5; j++) {
for (int j = 0; j < 6; j++) {
saveToKeyfile(!pedited || spot_edited->multsh[j], "Locallab", "Multsh" + std::to_string(j) + "_" + index_str, spot.multsh[j], keyFile);
}
@ -7114,8 +7261,13 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->fullimage, "Locallab", "Fullimage_" + index_str, spot.fullimage, keyFile);
saveToKeyfile(!pedited || spot_edited->repar, "Locallab", "Repart_" + index_str, spot.repar, keyFile);
saveToKeyfile(!pedited || spot_edited->ciecam, "Locallab", "Ciecam_" + index_str, spot.ciecam, keyFile);
saveToKeyfile(!pedited || spot_edited->satlog, "Locallab", "Satlog_" + index_str, spot.satlog, keyFile);
saveToKeyfile(!pedited || spot_edited->blackEv, "Locallab", "BlackEv_" + index_str, spot.blackEv, keyFile);
saveToKeyfile(!pedited || spot_edited->whiteEv, "Locallab", "WhiteEv_" + index_str, spot.whiteEv, keyFile);
saveToKeyfile(!pedited || spot_edited->whiteslog, "Locallab", "Whiteslog_" + index_str, spot.whiteslog, keyFile);
saveToKeyfile(!pedited || spot_edited->blackslog, "Locallab", "Blackslog_" + index_str, spot.blackslog, keyFile);
saveToKeyfile(!pedited || spot_edited->comprlog, "Locallab", "Comprlog_" + index_str, spot.comprlog, keyFile);
saveToKeyfile(!pedited || spot_edited->strelog, "Locallab", "Strelog_" + index_str, spot.strelog, keyFile);
saveToKeyfile(!pedited || spot_edited->detail, "Locallab", "Detail_" + index_str, spot.detail, keyFile);
saveToKeyfile(!pedited || spot_edited->sensilog, "Locallab", "Sensilog_" + index_str, spot.sensilog, keyFile);
saveToKeyfile(!pedited || spot_edited->baselog, "Locallab", "Baselog_" + index_str, spot.baselog, keyFile);
@ -7170,6 +7322,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
//ciecam
if ((!pedited || spot_edited->visicie) && spot.visicie) {
saveToKeyfile(!pedited || spot_edited->expcie, "Locallab", "Expcie_" + index_str, spot.expcie, keyFile);
saveToKeyfile(!pedited || spot_edited->expprecam, "Locallab", "Expprecam_" + index_str, spot.expprecam, keyFile);
saveToKeyfile(!pedited || spot_edited->complexcie, "Locallab", "Complexcie_" + index_str, spot.complexcie, keyFile);
saveToKeyfile(!pedited || spot_edited->reparcie, "Locallab", "Reparcie_" + index_str, spot.reparcie, keyFile);
saveToKeyfile(!pedited || spot_edited->sensicie, "Locallab", "Sensicie_" + index_str, spot.sensicie, keyFile);
@ -7178,8 +7331,14 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->forcebw, "Locallab", "Forcebw_" + index_str, spot.forcebw, keyFile);
saveToKeyfile(!pedited || spot_edited->qtoj, "Locallab", "Qtoj_" + index_str, spot.qtoj, keyFile);
saveToKeyfile(!pedited || spot_edited->jabcie, "Locallab", "jabcie_" + index_str, spot.jabcie, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidqjcie, "Locallab", "sigmoidqjcie_" + index_str, spot.sigmoidqjcie, keyFile);
saveToKeyfile(!pedited || spot_edited->comprcieauto, "Locallab", "comprcieauto_" + index_str, spot.comprcieauto, keyFile);
saveToKeyfile(!pedited || spot_edited->normcie, "Locallab", "normcie_" + index_str, spot.normcie, keyFile);
saveToKeyfile(!pedited || spot_edited->gamutcie, "Locallab", "gamutcie_" + index_str, spot.gamutcie, keyFile);
saveToKeyfile(!pedited || spot_edited->sigcie, "Locallab", "sigcie_" + index_str, spot.sigcie, keyFile);
saveToKeyfile(!pedited || spot_edited->logcie, "Locallab", "logcie_" + index_str, spot.logcie, keyFile);
saveToKeyfile(!pedited || spot_edited->satcie, "Locallab", "satcie_" + index_str, spot.satcie, keyFile);
saveToKeyfile(!pedited || spot_edited->logcieq, "Locallab", "logcieq_" + index_str, spot.logcieq, keyFile);
saveToKeyfile(!pedited || spot_edited->smoothcie, "Locallab", "smoothcie_" + index_str, spot.smoothcie, keyFile);
saveToKeyfile(!pedited || spot_edited->logjz, "Locallab", "Logjz_" + index_str, spot.logjz, keyFile);
saveToKeyfile(!pedited || spot_edited->sigjz, "Locallab", "Sigjz_" + index_str, spot.sigjz, keyFile);
saveToKeyfile(!pedited || spot_edited->sigq, "Locallab", "Sigq_" + index_str, spot.sigq, keyFile);
@ -7189,6 +7348,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->sursourcie, "Locallab", "Sursourcie_" + index_str, spot.sursourcie, keyFile);
saveToKeyfile(!pedited || spot_edited->modecie, "Locallab", "Modecie_" + index_str, spot.modecie, keyFile);
saveToKeyfile(!pedited || spot_edited->modecam, "Locallab", "Modecam_" + index_str, spot.modecam, keyFile);
saveToKeyfile(!pedited || spot_edited->bwevMethod, "Locallab", "bwevMethod_" + index_str, spot.bwevMethod, keyFile);
saveToKeyfile(!pedited || spot_edited->saturlcie, "Locallab", "Saturlcie_" + index_str, spot.saturlcie, keyFile);
saveToKeyfile(!pedited || spot_edited->rstprotectcie, "Locallab", "Rstprotectcie_" + index_str, spot.rstprotectcie, keyFile);
saveToKeyfile(!pedited || spot_edited->chromlcie, "Locallab", "Chromlcie_" + index_str, spot.chromlcie, keyFile);
@ -7212,8 +7372,10 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->lightlcie, "Locallab", "Lightlcie_" + index_str, spot.lightlcie, keyFile);
saveToKeyfile(!pedited || spot_edited->lightjzcie, "Locallab", "Lightjzcie_" + index_str, spot.lightjzcie, keyFile);
saveToKeyfile(!pedited || spot_edited->lightqcie, "Locallab", "Brightqcie_" + index_str, spot.lightqcie, keyFile);
saveToKeyfile(!pedited || spot_edited->lightsigqcie, "Locallab", "Brightsigqcie_" + index_str, spot.lightsigqcie, keyFile);
saveToKeyfile(!pedited || spot_edited->contlcie, "Locallab", "Contlcie_" + index_str, spot.contlcie, keyFile);
saveToKeyfile(!pedited || spot_edited->contjzcie, "Locallab", "Contjzcie_" + index_str, spot.contjzcie, keyFile);
saveToKeyfile(!pedited || spot_edited->detailciejz, "Locallab", "Detailciejz_" + index_str, spot.detailciejz, keyFile);
saveToKeyfile(!pedited || spot_edited->adapjzcie, "Locallab", "Adapjzcie_" + index_str, spot.adapjzcie, keyFile);
saveToKeyfile(!pedited || spot_edited->jz100, "Locallab", "Jz100_" + index_str, spot.jz100, keyFile);
saveToKeyfile(!pedited || spot_edited->pqremap, "Locallab", "PQremap_" + index_str, spot.pqremap, keyFile);
@ -7235,31 +7397,61 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->targetjz, "Locallab", "Targetjz_" + index_str, spot.targetjz, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidldacie, "Locallab", "Sigmoidldacie_" + index_str, spot.sigmoidldacie, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidthcie, "Locallab", "Sigmoidthcie_" + index_str, spot.sigmoidthcie, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidsenscie, "Locallab", "Sigmoidsenscie_" + index_str, spot.sigmoidsenscie, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidblcie, "Locallab", "Sigmoidblcie_" + index_str, spot.sigmoidblcie, keyFile);
saveToKeyfile(!pedited || spot_edited->comprcie, "Locallab", "comprcie_" + index_str, spot.comprcie, keyFile);
saveToKeyfile(!pedited || spot_edited->strcielog, "Locallab", "strcielog_" + index_str, spot.strcielog, keyFile);
saveToKeyfile(!pedited || spot_edited->comprcieth, "Locallab", "comprcieth_" + index_str, spot.comprcieth, keyFile);
saveToKeyfile(!pedited || spot_edited->gamjcie, "Locallab", "gamjcie_" + index_str, spot.gamjcie, keyFile);
saveToKeyfile(!pedited || spot_edited->slopjcie, "Locallab", "slopjcie_" + index_str, spot.slopjcie, keyFile);
saveToKeyfile(!pedited || spot_edited->slopesmo, "Locallab", "slopesmo_" + index_str, spot.slopesmo, keyFile);
saveToKeyfile(!pedited || spot_edited->midtcie, "Locallab", "midtcie_" + index_str, spot.midtcie, keyFile);
saveToKeyfile(!pedited || spot_edited->redxl, "Locallab", "redxl_" + index_str, spot.redxl, keyFile);
saveToKeyfile(!pedited || spot_edited->redyl, "Locallab", "redyl_" + index_str, spot.redyl, keyFile);
saveToKeyfile(!pedited || spot_edited->grexl, "Locallab", "grexl_" + index_str, spot.grexl, keyFile);
saveToKeyfile(!pedited || spot_edited->greyl, "Locallab", "greyl_" + index_str, spot.greyl, keyFile);
saveToKeyfile(!pedited || spot_edited->bluxl, "Locallab", "bluxl_" + index_str, spot.bluxl, keyFile);
saveToKeyfile(!pedited || spot_edited->bluyl, "Locallab", "bluyl_" + index_str, spot.bluyl, keyFile);
saveToKeyfile(!pedited || spot_edited->refi, "Locallab", "refi_" + index_str, spot.refi, keyFile);
saveToKeyfile(!pedited || spot_edited->shiftxl, "Locallab", "shiftxl_" + index_str, spot.shiftxl, keyFile);
saveToKeyfile(!pedited || spot_edited->shiftyl, "Locallab", "shiftyl_" + index_str, spot.shiftyl, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieALow, "Locallab", "labgridcieALow_" + index_str, spot.labgridcieALow, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieBLow, "Locallab", "labgridcieBLow_" + index_str, spot.labgridcieBLow, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieAHigh, "Locallab", "labgridcieAHigh_" + index_str, spot.labgridcieAHigh, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieBHigh, "Locallab", "labgridcieBHigh_" + index_str, spot.labgridcieBHigh, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieGx, "Locallab", "labgridcieGx_" + index_str, spot.labgridcieGx, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieGy, "Locallab", "labgridcieGy_" + index_str, spot.labgridcieGy, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieWx, "Locallab", "labgridcieWx_" + index_str, spot.labgridcieWx, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieWy, "Locallab", "labgridcieWy_" + index_str, spot.labgridcieWy, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieMx, "Locallab", "labgridcieMx_" + index_str, spot.labgridcieMx, keyFile);
saveToKeyfile(!pedited || spot_edited->labgridcieMy, "Locallab", "labgridcieMy_" + index_str, spot.labgridcieMy, keyFile);
saveToKeyfile(!pedited || spot_edited->whitescie, "Locallab", "whitescie_" + index_str, spot.whitescie, keyFile);
saveToKeyfile(!pedited || spot_edited->blackscie, "Locallab", "blackscie_" + index_str, spot.blackscie, keyFile);
saveToKeyfile(!pedited || spot_edited->illMethod, "Locallab", "illMethod_" + index_str, spot.illMethod, keyFile);
saveToKeyfile(!pedited || spot_edited->smoothciemet, "Locallab", "smoothciemet_" + index_str, spot.smoothciemet, keyFile);
saveToKeyfile(!pedited || spot_edited->primMethod, "Locallab", "primMethod_" + index_str, spot.primMethod, keyFile);
saveToKeyfile(!pedited || spot_edited->catMethod, "Locallab", "catMethod_" + index_str, spot.catMethod, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidldajzcie, "Locallab", "Sigmoidldajzcie_" + index_str, spot.sigmoidldajzcie, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidthjzcie, "Locallab", "Sigmoidthjzcie_" + index_str, spot.sigmoidthjzcie, keyFile);
saveToKeyfile(!pedited || spot_edited->sigmoidbljzcie, "Locallab", "Sigmoidbljzcie_" + index_str, spot.sigmoidbljzcie, keyFile);
saveToKeyfile(!pedited || spot_edited->contqcie, "Locallab", "Contqcie_" + index_str, spot.contqcie, keyFile);
saveToKeyfile(!pedited || spot_edited->contsigqcie, "Locallab", "Contsigqcie_" + index_str, spot.contsigqcie, keyFile);
saveToKeyfile(!pedited || spot_edited->colorflcie, "Locallab", "Colorflcie_" + index_str, spot.colorflcie, keyFile);
/*
saveToKeyfile(!pedited || spot_edited->lightlzcam, "Locallab", "Lightlzcam_" + index_str, spot.lightlzcam, keyFile);
saveToKeyfile(!pedited || spot_edited->lightqzcam, "Locallab", "Lightqzcam_" + index_str, spot.lightqzcam, keyFile);
saveToKeyfile(!pedited || spot_edited->contlzcam, "Locallab", "Contlzcam_" + index_str, spot.contlzcam, keyFile);
saveToKeyfile(!pedited || spot_edited->contqzcam, "Locallab", "Contqzcam_" + index_str, spot.contqzcam, keyFile);
saveToKeyfile(!pedited || spot_edited->contthreszcam, "Locallab", "Contthreszcam_" + index_str, spot.contthreszcam, keyFile);
saveToKeyfile(!pedited || spot_edited->colorflzcam, "Locallab", "Colorflzcam_" + index_str, spot.colorflzcam, keyFile);
saveToKeyfile(!pedited || spot_edited->saturzcam, "Locallab", "Saturzcam_" + index_str, spot.saturzcam, keyFile);
saveToKeyfile(!pedited || spot_edited->chromzcam, "Locallab", "Chromzcam_" + index_str, spot.chromzcam, keyFile);
*/
saveToKeyfile(!pedited || spot_edited->targabscie, "Locallab", "Targabscie_" + index_str, spot.targabscie, keyFile);
saveToKeyfile(!pedited || spot_edited->targetGraycie, "Locallab", "TargetGraycie_" + index_str, spot.targetGraycie, keyFile);
saveToKeyfile(!pedited || spot_edited->catadcie, "Locallab", "Catadcie_" + index_str, spot.catadcie, keyFile);
saveToKeyfile(!pedited || spot_edited->detailcie, "Locallab", "Detailcie_" + index_str, spot.detailcie, keyFile);
saveToKeyfile(!pedited || spot_edited->strgradcie, "Locallab", "Strgradcie_" + index_str, spot.strgradcie, keyFile);
saveToKeyfile(!pedited || spot_edited->anggradcie, "Locallab", "Anggradcie_" + index_str, spot.anggradcie, keyFile);
saveToKeyfile(!pedited || spot_edited->surroundcie, "Locallab", "Surroundcie_" + index_str, spot.surroundcie, keyFile);
saveToKeyfile(!pedited || spot_edited->enacieMask, "Locallab", "EnacieMask_" + index_str, spot.enacieMask, keyFile);
saveToKeyfile(!pedited || spot_edited->enacieMaskall, "Locallab", "EnacieMaskall_" + index_str, spot.enacieMaskall, keyFile);
saveToKeyfile(!pedited || spot_edited->CCmaskciecurve, "Locallab", "CCmaskcieCurve_" + index_str, spot.CCmaskciecurve, keyFile);
saveToKeyfile(!pedited || spot_edited->LLmaskciecurve, "Locallab", "LLmaskcieCurve_" + index_str, spot.LLmaskciecurve, keyFile);
saveToKeyfile(!pedited || spot_edited->HHmaskciecurve, "Locallab", "HHmaskcieCurve_" + index_str, spot.HHmaskciecurve, keyFile);
saveToKeyfile(!pedited || spot_edited->HHhmaskciecurve, "Locallab", "HHhmaskcieCurve_" + index_str, spot.HHhmaskciecurve, keyFile);
saveToKeyfile(!pedited || spot_edited->blendmaskcie, "Locallab", "Blendmaskcie_" + index_str, spot.blendmaskcie, keyFile);
saveToKeyfile(!pedited || spot_edited->radmaskcie, "Locallab", "Radmaskcie_" + index_str, spot.radmaskcie, keyFile);
saveToKeyfile(!pedited || spot_edited->chromaskcie, "Locallab", "Chromaskcie_" + index_str, spot.chromaskcie, keyFile);
@ -7271,11 +7463,19 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || spot_edited->lowthrescie, "Locallab", "Lowthrescie_" + index_str, spot.lowthrescie, keyFile);
saveToKeyfile(!pedited || spot_edited->higthrescie, "Locallab", "Higthrescie_" + index_str, spot.higthrescie, keyFile);
saveToKeyfile(!pedited || spot_edited->decaycie, "Locallab", "Decaycie_" + index_str, spot.decaycie, keyFile);
saveToKeyfile(!pedited || spot_edited->strumaskcie, "Locallab", "strumaskcie_" + index_str, spot.strumaskcie, keyFile);
saveToKeyfile(!pedited || spot_edited->toolcie, "Locallab", "toolcie_" + index_str, spot.toolcie, keyFile);
saveToKeyfile(!pedited || spot_edited->fftcieMask, "Locallab", "FftcieMask_" + index_str, spot.fftcieMask, keyFile);
saveToKeyfile(!pedited || spot_edited->contcie, "Locallab", "contcie_" + index_str, spot.contcie, keyFile);
saveToKeyfile(!pedited || spot_edited->blurcie, "Locallab", "blurcie_" + index_str, spot.blurcie, keyFile);
saveToKeyfile(!pedited || spot_edited->blurcie, "Locallab", "highmaskcie_" + index_str, spot.highmaskcie, keyFile);
saveToKeyfile(!pedited || spot_edited->blurcie, "Locallab", "shadmaskcie_" + index_str, spot.shadmaskcie, keyFile);
saveToKeyfile(!pedited || spot_edited->LLmaskciecurvewav, "Locallab", "LLmaskcieCurvewav_" + index_str, spot.LLmaskciecurvewav, keyFile);
saveToKeyfile(!pedited || spot_edited->csthresholdcie, "Locallab", "CSThresholdcie_" + index_str, spot.csthresholdcie.toVector(), keyFile);
}
}
}
@ -7374,7 +7574,8 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
{ColorManagementParams::Illuminant::D120, "D120"},
{ColorManagementParams::Illuminant::STDA, "stda"},
{ColorManagementParams::Illuminant::TUNGSTEN_2000K, "2000"},
{ColorManagementParams::Illuminant::TUNGSTEN_1500K, "1500"}
{ColorManagementParams::Illuminant::TUNGSTEN_1500K, "1500"},
{ColorManagementParams::Illuminant::E, "E"}
},
icm.will,
keyFile
@ -7393,6 +7594,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
{ColorManagementParams::Primaries::WIDE_GAMUT, "wid"},
{ColorManagementParams::Primaries::ACES_P0, "ac0"},
{ColorManagementParams::Primaries::JDC_MAX, "jdcmax"},
{ColorManagementParams::Primaries::JDC_MAXSTDA, "jdcmaxstdA"},
{ColorManagementParams::Primaries::BRUCE_RGB, "bru"},
{ColorManagementParams::Primaries::BETA_RGB, "bet"},
{ColorManagementParams::Primaries::BEST_RGB, "bst"},
@ -7402,14 +7604,34 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
icm.wprim,
keyFile
);
saveToKeyfile(
!pedited || pedited->icm.wcat,
"Color Management",
"Wcat",
{
{ColorManagementParams::Cat::BRAD, "brad"},
{ColorManagementParams::Cat::CAT16, "cat16"},
{ColorManagementParams::Cat::CAT02, "cat02"},
{ColorManagementParams::Cat::CAT_VK, "cat_vk"},
{ColorManagementParams::Cat::CAT_XYZ, "cat_xyz"}
},
icm.wcat,
keyFile
);
saveToKeyfile(!pedited || pedited->icm.workingTRCGamma, "Color Management", "WorkingTRCGamma", icm.workingTRCGamma, keyFile);
saveToKeyfile(!pedited || pedited->icm.workingTRCSlope, "Color Management", "WorkingTRCSlope", icm.workingTRCSlope, keyFile);
saveToKeyfile(!pedited || pedited->icm.wmidtcie, "Color Management", "Wmidtcie", icm.wmidtcie, keyFile);
saveToKeyfile(!pedited || pedited->icm.wsmoothcie, "Color Management", "Wsmoothcie", icm.wsmoothcie, keyFile);
saveToKeyfile(!pedited || pedited->icm.redx, "Color Management", "Redx", icm.redx, keyFile);
saveToKeyfile(!pedited || pedited->icm.redy, "Color Management", "Redy", icm.redy, keyFile);
saveToKeyfile(!pedited || pedited->icm.grex, "Color Management", "Grex", icm.grex, keyFile);
saveToKeyfile(!pedited || pedited->icm.grey, "Color Management", "Grey", icm.grey, keyFile);
saveToKeyfile(!pedited || pedited->icm.blux, "Color Management", "Blux", icm.blux, keyFile);
saveToKeyfile(!pedited || pedited->icm.bluy, "Color Management", "Bluy", icm.bluy, keyFile);
saveToKeyfile(!pedited || pedited->icm.refi, "Color Management", "Refi", icm.refi, keyFile);
saveToKeyfile(!pedited || pedited->icm.shiftx, "Color Management", "Shiftx", icm.shiftx, keyFile);
saveToKeyfile(!pedited || pedited->icm.shifty, "Color Management", "Shifty", icm.shifty, keyFile);
saveToKeyfile(!pedited || pedited->icm.labgridcieALow, "Color Management", "LabGridcieALow", icm.labgridcieALow, keyFile);
saveToKeyfile(!pedited || pedited->icm.labgridcieBLow, "Color Management", "LabGridcieBLow", icm.labgridcieBLow, keyFile);
saveToKeyfile(!pedited || pedited->icm.labgridcieAHigh, "Color Management", "LabGridcieAHigh", icm.labgridcieAHigh, keyFile);
@ -7418,8 +7640,11 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->icm.labgridcieGy, "Color Management", "LabGridcieGy", icm.labgridcieGy, keyFile);
saveToKeyfile(!pedited || pedited->icm.labgridcieWx, "Color Management", "LabGridcieWx", icm.labgridcieWx, keyFile);
saveToKeyfile(!pedited || pedited->icm.labgridcieWy, "Color Management", "LabGridcieWy", icm.labgridcieWy, keyFile);
saveToKeyfile(!pedited || pedited->icm.labgridcieMx, "Color Management", "LabGridcieMx", icm.labgridcieMx, keyFile);
saveToKeyfile(!pedited || pedited->icm.labgridcieMy, "Color Management", "LabGridcieMy", icm.labgridcieMy, keyFile);
saveToKeyfile(!pedited || pedited->icm.preser, "Color Management", "Preser", icm.preser, keyFile);
saveToKeyfile(!pedited || pedited->icm.fbw, "Color Management", "Fbw", icm.fbw, keyFile);
saveToKeyfile(!pedited || pedited->icm.trcExp, "Color Management", "TrcExp", icm.trcExp, keyFile);
saveToKeyfile(!pedited || pedited->icm.gamut, "Color Management", "Gamut", icm.gamut, keyFile);
saveToKeyfile(!pedited || pedited->icm.outputProfile, "Color Management", "OutputProfile", icm.outputProfile, keyFile);
saveToKeyfile(
@ -8742,6 +8967,11 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "ShapeMethod_" + index_str, spot.shapeMethod, spotEdited.shapeMethod);
if (keyFile.has_key("Locallab", "AvoidgamutMethod_" + index_str)) {
assignFromKeyfile(keyFile, "Locallab", "AvoidgamutMethod_" + index_str, spot.avoidgamutMethod, spotEdited.avoidgamutMethod);
/* if (ppVersion < 351) {
if(spot.avoidgamutMethod == "XYZ") {//5.10 default value
spot.avoidgamutMethod = "MUNS";//set to Munsell only
}
} */
} else if (keyFile.has_key("Locallab", "Avoid_" + index_str)) {
const bool avoid = keyFile.get_boolean("Locallab", "Avoid_" + index_str);
const bool munsell = keyFile.has_key("Locallab", "Avoidmun_" + index_str) && keyFile.get_boolean("Locallab", "Avoidmun_" + index_str);
@ -8927,7 +9157,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, spotEdited.complexshadhigh);
assignFromKeyfile(keyFile, "Locallab", "ShMethod_" + index_str, spot.shMethod, spotEdited.shMethod);
for (int j = 0; j < 5; j ++) {
for (int j = 0; j < 6; j ++) {
assignFromKeyfile(keyFile, "Locallab", "Multsh" + std::to_string(j) + "_" + index_str, spot.multsh[j], spotEdited.multsh[j]);
}
@ -9370,8 +9600,13 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Fullimage_" + index_str, spot.fullimage, spotEdited.fullimage);
assignFromKeyfile(keyFile, "Locallab", "Repart_" + index_str, spot.repar, spotEdited.repar);
assignFromKeyfile(keyFile, "Locallab", "Ciecam_" + index_str, spot.ciecam, spotEdited.ciecam);
assignFromKeyfile(keyFile, "Locallab", "Satlog_" + index_str, spot.satlog, spotEdited.satlog);
assignFromKeyfile(keyFile, "Locallab", "BlackEv_" + index_str, spot.blackEv, spotEdited.blackEv);
assignFromKeyfile(keyFile, "Locallab", "WhiteEv_" + index_str, spot.whiteEv, spotEdited.whiteEv);
assignFromKeyfile(keyFile, "Locallab", "Whiteslog_" + index_str, spot.whiteslog, spotEdited.whiteslog);
assignFromKeyfile(keyFile, "Locallab", "Blackslog_" + index_str, spot.blackslog, spotEdited.blackslog);
assignFromKeyfile(keyFile, "Locallab", "Comprlog_" + index_str, spot.comprlog, spotEdited.comprlog);
assignFromKeyfile(keyFile, "Locallab", "Strelog_" + index_str, spot.strelog, spotEdited.strelog);
assignFromKeyfile(keyFile, "Locallab", "Detail_" + index_str, spot.detail, spotEdited.detail);
assignFromKeyfile(keyFile, "Locallab", "Sensilog_" + index_str, spot.sensilog, spotEdited.sensilog);
assignFromKeyfile(keyFile, "Locallab", "Baselog_" + index_str, spot.baselog, spotEdited.baselog);
@ -9440,6 +9675,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
if (spot.visicie) {
spotEdited.visicie = true;
}
assignFromKeyfile(keyFile, "Locallab", "Expprecam_" + index_str, spot.expprecam, spotEdited.expprecam);
assignFromKeyfile(keyFile, "Locallab", "Complexcie_" + index_str, spot.complexcie, spotEdited.complexcie);
assignFromKeyfile(keyFile, "Locallab", "Reparcie_" + index_str, spot.reparcie, spotEdited.reparcie);
assignFromKeyfile(keyFile, "Locallab", "Sensicie_" + index_str, spot.sensicie, spotEdited.sensicie);
@ -9448,8 +9684,14 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Forcebw_" + index_str, spot.forcebw, spotEdited.forcebw);
assignFromKeyfile(keyFile, "Locallab", "Qtoj_" + index_str, spot.qtoj, spotEdited.qtoj);
assignFromKeyfile(keyFile, "Locallab", "jabcie_" + index_str, spot.jabcie, spotEdited.jabcie);
assignFromKeyfile(keyFile, "Locallab", "sigmoidqjcie_" + index_str, spot.sigmoidqjcie, spotEdited.sigmoidqjcie);
assignFromKeyfile(keyFile, "Locallab", "comprcieauto_" + index_str, spot.comprcieauto, spotEdited.comprcieauto);
assignFromKeyfile(keyFile, "Locallab", "normcie_" + index_str, spot.normcie, spotEdited.normcie);
assignFromKeyfile(keyFile, "Locallab", "gamutcie_" + index_str, spot.gamutcie, spotEdited.gamutcie);
assignFromKeyfile(keyFile, "Locallab", "sigcie_" + index_str, spot.sigcie, spotEdited.sigcie);
assignFromKeyfile(keyFile, "Locallab", "logcie_" + index_str, spot.logcie, spotEdited.logcie);
assignFromKeyfile(keyFile, "Locallab", "satcie_" + index_str, spot.satcie, spotEdited.satcie);
assignFromKeyfile(keyFile, "Locallab", "logcieq_" + index_str, spot.logcieq, spotEdited.logcieq);
assignFromKeyfile(keyFile, "Locallab", "smoothcie_" + index_str, spot.smoothcie, spotEdited.smoothcie);
assignFromKeyfile(keyFile, "Locallab", "Logjz_" + index_str, spot.logjz, spotEdited.logjz);
assignFromKeyfile(keyFile, "Locallab", "Sigjz_" + index_str, spot.sigjz, spotEdited.sigjz);
assignFromKeyfile(keyFile, "Locallab", "Sigq_" + index_str, spot.sigq, spotEdited.sigq);
@ -9459,8 +9701,9 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Sursourcie_" + index_str, spot.sursourcie, spotEdited.sursourcie);
assignFromKeyfile(keyFile, "Locallab", "Modecie_" + index_str, spot.modecie, spotEdited.modecie);
assignFromKeyfile(keyFile, "Locallab", "Modecam_" + index_str, spot.modecam, spotEdited.modecam);
assignFromKeyfile(keyFile, "Locallab", "bwevMethod_" + index_str, spot.bwevMethod, spotEdited.bwevMethod);
assignFromKeyfile(keyFile, "Locallab", "Saturlcie_" + index_str, spot.saturlcie, spotEdited.saturlcie);
assignFromKeyfile(keyFile, "Locallab", "Rstprotectcie_" + index_str, spot.rstprotectcie, spotEdited.rstprotectcie);
assignFromKeyfile(keyFile, "Locallab", "Rstprotectcie_" + index_str, spot.rstprotectcie, spotEdited.rstprotectcie);
assignFromKeyfile(keyFile, "Locallab", "Chromlcie_" + index_str, spot.chromlcie, spotEdited.chromlcie);
assignFromKeyfile(keyFile, "Locallab", "Huecie_" + index_str, spot.huecie, spotEdited.huecie);
assignFromKeyfile(keyFile, "Locallab", "ToneMethodcie_" + index_str, spot.toneMethodcie, spotEdited.toneMethodcie);
@ -9471,7 +9714,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Saturjzcie_" + index_str, spot.saturjzcie, spotEdited.saturjzcie);
assignFromKeyfile(keyFile, "Locallab", "Huejzcie_" + index_str, spot.huejzcie, spotEdited.huejzcie);
assignFromKeyfile(keyFile, "Locallab", "Softjzcie_" + index_str, spot.softjzcie, spotEdited.softjzcie);
assignFromKeyfile(keyFile, "Locallab", "strSoftjzcie_" + index_str, spot.strsoftjzcie, spotEdited.strsoftjzcie);
assignFromKeyfile(keyFile, "Locallab", "strSoftjzcie_" + index_str, spot.strsoftjzcie, spotEdited.strsoftjzcie);
assignFromKeyfile(keyFile, "Locallab", "Thrhjzcie_" + index_str, spot.thrhjzcie, spotEdited.thrhjzcie);
assignFromKeyfile(keyFile, "Locallab", "JzCurve_" + index_str, spot.jzcurve, spotEdited.jzcurve);
assignFromKeyfile(keyFile, "Locallab", "CzCurve_" + index_str, spot.czcurve, spotEdited.czcurve);
@ -9482,14 +9725,16 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Lightlcie_" + index_str, spot.lightlcie, spotEdited.lightlcie);
assignFromKeyfile(keyFile, "Locallab", "Lightjzcie_" + index_str, spot.lightjzcie, spotEdited.lightjzcie);
assignFromKeyfile(keyFile, "Locallab", "Brightqcie_" + index_str, spot.lightqcie, spotEdited.lightqcie);
assignFromKeyfile(keyFile, "Locallab", "Brightsigqcie_" + index_str, spot.lightsigqcie, spotEdited.lightsigqcie);
assignFromKeyfile(keyFile, "Locallab", "Contlcie_" + index_str, spot.contlcie, spotEdited.contlcie);
assignFromKeyfile(keyFile, "Locallab", "Contjzcie_" + index_str, spot.contjzcie, spotEdited.contjzcie);
assignFromKeyfile(keyFile, "Locallab", "Adapjzcie_" + index_str, spot.adapjzcie, spotEdited.adapjzcie);
assignFromKeyfile(keyFile, "Locallab", "Detailciejz_" + index_str, spot.detailciejz, spotEdited.detailciejz);
assignFromKeyfile(keyFile, "Locallab", "Adapjzcie_" + index_str, spot.adapjzcie, spotEdited.adapjzcie);
assignFromKeyfile(keyFile, "Locallab", "Jz100_" + index_str, spot.jz100, spotEdited.jz100);
assignFromKeyfile(keyFile, "Locallab", "PQremap_" + index_str, spot.pqremap, spotEdited.pqremap);
assignFromKeyfile(keyFile, "Locallab", "PQremapcam16_" + index_str, spot.pqremapcam16, spotEdited.pqremapcam16);
assignFromKeyfile(keyFile, "Locallab", "PQremapcam16_" + index_str, spot.pqremapcam16, spotEdited.pqremapcam16);
assignFromKeyfile(keyFile, "Locallab", "Hljzcie_" + index_str, spot.hljzcie, spotEdited.hljzcie);
assignFromKeyfile(keyFile, "Locallab", "Hlthjzcie_" + index_str, spot.hlthjzcie, spotEdited.hlthjzcie);
assignFromKeyfile(keyFile, "Locallab", "Hlthjzcie_" + index_str, spot.hlthjzcie, spotEdited.hlthjzcie);
assignFromKeyfile(keyFile, "Locallab", "Shjzcie_" + index_str, spot.shjzcie, spotEdited.shjzcie);
assignFromKeyfile(keyFile, "Locallab", "Shthjzcie_" + index_str, spot.shthjzcie, spotEdited.shthjzcie);
assignFromKeyfile(keyFile, "Locallab", "Radjzcie_" + index_str, spot.radjzcie, spotEdited.radjzcie);
@ -9514,32 +9759,61 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "WhiteEvjz_" + index_str, spot.whiteEvjz, spotEdited.whiteEvjz);
assignFromKeyfile(keyFile, "Locallab", "Targetjz_" + index_str, spot.targetjz, spotEdited.targetjz);
assignFromKeyfile(keyFile, "Locallab", "Sigmoidthcie_" + index_str, spot.sigmoidthcie, spotEdited.sigmoidthcie);
assignFromKeyfile(keyFile, "Locallab", "Sigmoidsenscie_" + index_str, spot.sigmoidsenscie, spotEdited.sigmoidsenscie);
assignFromKeyfile(keyFile, "Locallab", "Sigmoidblcie_" + index_str, spot.sigmoidblcie, spotEdited.sigmoidblcie);
assignFromKeyfile(keyFile, "Locallab", "comprcie_" + index_str, spot.comprcie, spotEdited.comprcie);
assignFromKeyfile(keyFile, "Locallab", "strcielog_" + index_str, spot.strcielog, spotEdited.strcielog);
assignFromKeyfile(keyFile, "Locallab", "comprcieth_" + index_str, spot.comprcieth, spotEdited.comprcieth);
assignFromKeyfile(keyFile, "Locallab", "gamjcie_" + index_str, spot.gamjcie, spotEdited.gamjcie);
assignFromKeyfile(keyFile, "Locallab", "slopjcie_" + index_str, spot.slopjcie, spotEdited.slopjcie);
assignFromKeyfile(keyFile, "Locallab", "slopesmo_" + index_str, spot.slopesmo, spotEdited.slopesmo);
assignFromKeyfile(keyFile, "Locallab", "midtcie_" + index_str, spot.midtcie, spotEdited.midtcie);
assignFromKeyfile(keyFile, "Locallab", "grexl_" + index_str, spot.grexl, spotEdited.grexl);
assignFromKeyfile(keyFile, "Locallab", "greyl_" + index_str, spot.greyl, spotEdited.greyl);
assignFromKeyfile(keyFile, "Locallab", "bluxl_" + index_str, spot.bluxl, spotEdited.bluxl);
assignFromKeyfile(keyFile, "Locallab", "bluyl_" + index_str, spot.bluyl, spotEdited.bluyl);
assignFromKeyfile(keyFile, "Locallab", "redxl_" + index_str, spot.redxl, spotEdited.redxl);
assignFromKeyfile(keyFile, "Locallab", "redyl_" + index_str, spot.redyl, spotEdited.redyl);
assignFromKeyfile(keyFile, "Locallab", "refi_" + index_str, spot.refi, spotEdited.refi);
assignFromKeyfile(keyFile, "Locallab", "shiftxl_" + index_str, spot.shiftxl, spotEdited.shiftxl);
assignFromKeyfile(keyFile, "Locallab", "shiftyl_" + index_str, spot.shiftyl, spotEdited.shiftyl);
assignFromKeyfile(keyFile, "Locallab", "labgridcieALow_" + index_str, spot.labgridcieALow, spotEdited.labgridcieALow);
assignFromKeyfile(keyFile, "Locallab", "labgridcieBLow_" + index_str, spot.labgridcieBLow, spotEdited.labgridcieBLow);
assignFromKeyfile(keyFile, "Locallab", "labgridcieAHigh_" + index_str, spot.labgridcieAHigh, spotEdited.labgridcieAHigh);
assignFromKeyfile(keyFile, "Locallab", "labgridcieBHigh_" + index_str, spot.labgridcieBHigh, spotEdited.labgridcieBHigh);
assignFromKeyfile(keyFile, "Locallab", "labgridcieGx_" + index_str, spot.labgridcieGx, spotEdited.labgridcieGx);
assignFromKeyfile(keyFile, "Locallab", "labgridcieGy_" + index_str, spot.labgridcieGy, spotEdited.labgridcieGy);
assignFromKeyfile(keyFile, "Locallab", "labgridcieWx_" + index_str, spot.labgridcieWx, spotEdited.labgridcieWx);
assignFromKeyfile(keyFile, "Locallab", "labgridcieWy_" + index_str, spot.labgridcieWy, spotEdited.labgridcieWy);
assignFromKeyfile(keyFile, "Locallab", "labgridcieMx_" + index_str, spot.labgridcieMx, spotEdited.labgridcieMx);
assignFromKeyfile(keyFile, "Locallab", "labgridcieMy_" + index_str, spot.labgridcieMy, spotEdited.labgridcieMy);
assignFromKeyfile(keyFile, "Locallab", "whitescie_" + index_str, spot.whitescie, spotEdited.whitescie);
assignFromKeyfile(keyFile, "Locallab", "blackscie_" + index_str, spot.blackscie, spotEdited.blackscie);
assignFromKeyfile(keyFile, "Locallab", "illMethod_" + index_str, spot.illMethod, spotEdited.illMethod);
assignFromKeyfile(keyFile, "Locallab", "smoothciemet_" + index_str, spot.smoothciemet, spotEdited.smoothciemet);
assignFromKeyfile(keyFile, "Locallab", "primMethod_" + index_str, spot.primMethod, spotEdited.primMethod);
assignFromKeyfile(keyFile, "Locallab", "catMethod_" + index_str, spot.catMethod, spotEdited.catMethod);
assignFromKeyfile(keyFile, "Locallab", "Sigmoidldajzcie_" + index_str, spot.sigmoidldajzcie, spotEdited.sigmoidldajzcie);
assignFromKeyfile(keyFile, "Locallab", "Sigmoidthjzcie_" + index_str, spot.sigmoidthjzcie, spotEdited.sigmoidthjzcie);
assignFromKeyfile(keyFile, "Locallab", "Sigmoidbljzcie_" + index_str, spot.sigmoidbljzcie, spotEdited.sigmoidbljzcie);
assignFromKeyfile(keyFile, "Locallab", "Contqcie_" + index_str, spot.contqcie, spotEdited.contqcie);
assignFromKeyfile(keyFile, "Locallab", "Contsigqcie_" + index_str, spot.contsigqcie, spotEdited.contsigqcie);
assignFromKeyfile(keyFile, "Locallab", "Colorflcie_" + index_str, spot.colorflcie, spotEdited.colorflcie);
/*
assignFromKeyfile(keyFile, "Locallab", "Lightlzcam_" + index_str, spot.lightlzcam, spotEdited.lightlzcam);
assignFromKeyfile(keyFile, "Locallab", "Lightqzcam_" + index_str, spot.lightqzcam, spotEdited.lightqzcam);
assignFromKeyfile(keyFile, "Locallab", "Contlzcam_" + index_str, spot.contlzcam, spotEdited.contlzcam);
assignFromKeyfile(keyFile, "Locallab", "Contqzcam_" + index_str, spot.contqzcam, spotEdited.contqzcam);
assignFromKeyfile(keyFile, "Locallab", "Contthreszcam_" + index_str, spot.contthreszcam, spotEdited.contthreszcam);
*/
assignFromKeyfile(keyFile, "Locallab", "Targabscie_" + index_str, spot.targabscie, spotEdited.targabscie);
assignFromKeyfile(keyFile, "Locallab", "TargetGraycie_" + index_str, spot.targetGraycie, spotEdited.targetGraycie);
assignFromKeyfile(keyFile, "Locallab", "Catadcie_" + index_str, spot.catadcie, spotEdited.catadcie);
assignFromKeyfile(keyFile, "Locallab", "Detailcie_" + index_str, spot.detailcie, spotEdited.detailcie);
/*
assignFromKeyfile(keyFile, "Locallab", "Colorflzcam_" + index_str, spot.colorflzcam, spotEdited.colorflzcam);
assignFromKeyfile(keyFile, "Locallab", "Saturzcam_" + index_str, spot.saturzcam, spotEdited.saturzcam);
assignFromKeyfile(keyFile, "Locallab", "Chromzcam_" + index_str, spot.chromzcam, spotEdited.chromzcam);
*/
assignFromKeyfile(keyFile, "Locallab", "EnacieMask_" + index_str, spot.enacieMask, spotEdited.enacieMask);
assignFromKeyfile(keyFile, "Locallab", "Surroundcie_" + index_str, spot.surroundcie, spotEdited.surroundcie);
assignFromKeyfile(keyFile, "Locallab", "Strgradcie_" + index_str, spot.strgradcie, spotEdited.strgradcie);
assignFromKeyfile(keyFile, "Locallab", "Anggradcie_" + index_str, spot.anggradcie, spotEdited.anggradcie);
assignFromKeyfile(keyFile, "Locallab", "EnacieMask_" + index_str, spot.enacieMask, spotEdited.enacieMask);
assignFromKeyfile(keyFile, "Locallab", "EnacieMaskall_" + index_str, spot.enacieMaskall, spotEdited.enacieMaskall);
assignFromKeyfile(keyFile, "Locallab", "CCmaskcieCurve_" + index_str, spot.CCmaskciecurve, spotEdited.CCmaskciecurve);
assignFromKeyfile(keyFile, "Locallab", "LLmaskcieCurve_" + index_str, spot.LLmaskciecurve, spotEdited.LLmaskciecurve);
assignFromKeyfile(keyFile, "Locallab", "HHmaskcieCurve_" + index_str, spot.HHmaskciecurve, spotEdited.HHmaskciecurve);
assignFromKeyfile(keyFile, "Locallab", "HHmaskcieCurve_" + index_str, spot.HHmaskciecurve, spotEdited.HHmaskciecurve);
assignFromKeyfile(keyFile, "Locallab", "HHhmaskcieCurve_" + index_str, spot.HHhmaskciecurve, spotEdited.HHhmaskciecurve);
assignFromKeyfile(keyFile, "Locallab", "Blendmaskcie_" + index_str, spot.blendmaskcie, spotEdited.blendmaskcie);
assignFromKeyfile(keyFile, "Locallab", "Radmaskcie_" + index_str, spot.radmaskcie, spotEdited.radmaskcie);
assignFromKeyfile(keyFile, "Locallab", "Chromaskcie_" + index_str, spot.chromaskcie, spotEdited.chromaskcie);
@ -9551,6 +9825,24 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Lowthrescie_" + index_str, spot.lowthrescie, spotEdited.lowthrescie);
assignFromKeyfile(keyFile, "Locallab", "Higthrescie_" + index_str, spot.higthrescie, spotEdited.higthrescie);
assignFromKeyfile(keyFile, "Locallab", "Decaycie_" + index_str, spot.decaycie, spotEdited.decaycie);
assignFromKeyfile(keyFile, "Locallab", "strumaskcie_" + index_str, spot.strumaskcie, spotEdited.strumaskcie);
assignFromKeyfile(keyFile, "Locallab", "toolcie_" + index_str, spot.toolcie, spotEdited.toolcie);
assignFromKeyfile(keyFile, "Locallab", "FftcieMask_" + index_str, spot.fftcieMask, spotEdited.fftcieMask);
assignFromKeyfile(keyFile, "Locallab", "contcie_" + index_str, spot.contcie, spotEdited.contcie);
assignFromKeyfile(keyFile, "Locallab", "blurcie_" + index_str, spot.blurcie, spotEdited.blurcie);
assignFromKeyfile(keyFile, "Locallab", "highmaskcie_" + index_str, spot.highmaskcie, spotEdited.highmaskcie);
assignFromKeyfile(keyFile, "Locallab", "shadmaskcie_" + index_str, spot.shadmaskcie, spotEdited.shadmaskcie);
assignFromKeyfile(keyFile, "Locallab", "LLmaskcieCurvewav_" + index_str, spot.LLmaskciecurvewav, spotEdited.LLmaskciecurvewav);
if (keyFile.has_key("Locallab", "CSThresholdcie_" + index_str)) {
const std::vector<int> thresh = keyFile.get_integer_list("Locallab", "CSThresholdcie_" + index_str);
if (thresh.size() >= 4) {
spot.csthresholdcie.setValues(thresh[0], thresh[1], min(thresh[2], 10), min(thresh[3], 10));
}
spotEdited.csthresholdcie = true;
}
// Append LocallabSpot and LocallabParamsEdited
locallab.spots.push_back(spot);
@ -9731,7 +10023,8 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
{"D120", ColorManagementParams::Illuminant::D120},
{"stda", ColorManagementParams::Illuminant::STDA},
{"2000", ColorManagementParams::Illuminant::TUNGSTEN_2000K},
{"1500", ColorManagementParams::Illuminant::TUNGSTEN_1500K}
{"1500", ColorManagementParams::Illuminant::TUNGSTEN_1500K},
{"E", ColorManagementParams::Illuminant::E}
},
icm.will,
pedited->icm.will
@ -9757,6 +10050,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
{"wid", ColorManagementParams::Primaries::WIDE_GAMUT},
{"ac0", ColorManagementParams::Primaries::ACES_P0},
{"jdcmax", ColorManagementParams::Primaries::JDC_MAX},
{"jdcmaxstdA", ColorManagementParams::Primaries::JDC_MAXSTDA},
{"bru", ColorManagementParams::Primaries::BRUCE_RGB},
{"bet", ColorManagementParams::Primaries::BETA_RGB},
{"bst", ColorManagementParams::Primaries::BEST_RGB},
@ -9772,8 +10066,33 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
pedited->icm.wprim = true;
}
}
assignFromKeyfile(keyFile, "Color Management", "WorkingTRCGamma", icm.workingTRCGamma, pedited->icm.workingTRCGamma);
if (
!assignFromKeyfile(
keyFile,
"Color Management",
"Wcat",
{
{"brad", ColorManagementParams::Cat::BRAD},
{"cat16", ColorManagementParams::Cat::CAT16},
{"cat02", ColorManagementParams::Cat::CAT02},
{"cat_vk", ColorManagementParams::Cat::CAT_VK},
{"cat_xyz", ColorManagementParams::Cat::CAT_XYZ}
},
icm.wcat,
pedited->icm.wcat
)
){
icm.wcat = ColorManagementParams::Cat::BRAD;
if (pedited) {
pedited->icm.wcat = true;
}
}
assignFromKeyfile(keyFile, "Color Management", "Gamut", icm.gamut, pedited->icm.gamut);
assignFromKeyfile(keyFile, "Color Management", "WorkingTRCSlope", icm.workingTRCSlope, pedited->icm.workingTRCSlope);
assignFromKeyfile(keyFile, "Color Management", "WorkingTRCGamma", icm.workingTRCGamma, pedited->icm.workingTRCGamma);
assignFromKeyfile(keyFile, "Color Management", "Wmidtcie", icm.wmidtcie, pedited->icm.wmidtcie);
assignFromKeyfile(keyFile, "Color Management", "Wsmoothcie", icm.wsmoothcie, pedited->icm.wsmoothcie);
assignFromKeyfile(keyFile, "Color Management", "Redx", icm.redx, pedited->icm.redx);
assignFromKeyfile(keyFile, "Color Management", "Redy", icm.redy, pedited->icm.redy);
@ -9781,9 +10100,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Color Management", "Grey", icm.grey, pedited->icm.grey);
assignFromKeyfile(keyFile, "Color Management", "Blux", icm.blux, pedited->icm.blux);
assignFromKeyfile(keyFile, "Color Management", "Bluy", icm.bluy, pedited->icm.bluy);
assignFromKeyfile(keyFile, "Color Management", "Refi", icm.refi, pedited->icm.refi);
assignFromKeyfile(keyFile, "Color Management", "Shiftx", icm.shiftx, pedited->icm.shiftx);
assignFromKeyfile(keyFile, "Color Management", "Shifty", icm.shifty, pedited->icm.shifty);
assignFromKeyfile(keyFile, "Color Management", "Preser", icm.preser, pedited->icm.preser);
assignFromKeyfile(keyFile, "Color Management", "Fbw", icm.fbw, pedited->icm.fbw);
assignFromKeyfile(keyFile, "Color Management", "Gamut", icm.gamut, pedited->icm.gamut);
assignFromKeyfile(keyFile, "Color Management", "TrcExp", icm.trcExp, pedited->icm.trcExp);
assignFromKeyfile(keyFile, "Color Management", "LabGridcieALow", icm.labgridcieALow, pedited->icm.labgridcieALow);
assignFromKeyfile(keyFile, "Color Management", "LabGridcieBLow", icm.labgridcieBLow, pedited->icm.labgridcieBLow);
assignFromKeyfile(keyFile, "Color Management", "LabGridcieAHigh", icm.labgridcieAHigh, pedited->icm.labgridcieAHigh);
@ -9792,6 +10114,8 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Color Management", "LabGridcieGy", icm.labgridcieGy, pedited->icm.labgridcieGy);
assignFromKeyfile(keyFile, "Color Management", "LabGridcieWx", icm.labgridcieWx, pedited->icm.labgridcieWx);
assignFromKeyfile(keyFile, "Color Management", "LabGridcieWy", icm.labgridcieWy, pedited->icm.labgridcieWy);
assignFromKeyfile(keyFile, "Color Management", "LabGridcieMx", icm.labgridcieMx, pedited->icm.labgridcieMx);
assignFromKeyfile(keyFile, "Color Management", "LabGridcieMy", icm.labgridcieMy, pedited->icm.labgridcieMy);
if (keyFile.has_key("Color Management", "aIntent")) {
Glib::ustring intent = keyFile.get_string("Color Management", "aIntent");

View File

@ -863,7 +863,7 @@ struct SHParams {
*/
struct ToneEqualizerParams {
bool enabled;
std::array<int, 5> bands;
std::array<int, 6> bands;
int regularization;
bool show_colormap;
double pivot;
@ -1223,7 +1223,7 @@ struct LocallabParams {
bool expshadhigh;
int complexshadhigh;
Glib::ustring shMethod; // std, tone
int multsh[5];
int multsh[6];
int highlights;
int h_tonalwidth;
int shadows;
@ -1592,8 +1592,13 @@ struct LocallabParams {
bool fullimage;
double repar;
bool ciecam;
bool satlog;
double blackEv;
double whiteEv;
int whiteslog;
int blackslog;
double comprlog;
double strelog;
double detail;
int sensilog;
Glib::ustring sursour;
@ -1646,6 +1651,7 @@ struct LocallabParams {
//ciecam
bool visicie;
bool expcie;
bool expprecam;
int complexcie;
double reparcie;
int sensicie;
@ -1654,8 +1660,14 @@ struct LocallabParams {
bool forcebw;
bool qtoj;
bool jabcie;
bool sigmoidqjcie;
bool comprcieauto;
bool normcie;
bool gamutcie;
bool sigcie;
bool logcie;
bool satcie;
bool logcieq;
bool smoothcie;
bool logjz;
bool sigjz;
bool sigq;
@ -1665,6 +1677,7 @@ struct LocallabParams {
Glib::ustring sursourcie;
Glib::ustring modecie;
Glib::ustring modecam;
Glib::ustring bwevMethod;
double saturlcie;
double rstprotectcie;
double chromlcie;
@ -1688,8 +1701,10 @@ struct LocallabParams {
double lightlcie;
double lightjzcie;
double lightqcie;
double lightsigqcie;
double contlcie;
double contjzcie;
double detailciejz;
double adapjzcie;
double jz100;
double pqremap;
@ -1711,31 +1726,60 @@ struct LocallabParams {
double targetjz;
double sigmoidldacie;
double sigmoidthcie;
double sigmoidsenscie;
double sigmoidblcie;
double comprcie;
double strcielog;
double comprcieth;
double gamjcie;
double slopjcie;
double slopesmo;
int midtcie;
double grexl;
double greyl;
double bluxl;
double bluyl;
double redxl;
double redyl;
double refi;
double shiftxl;
double shiftyl;
double labgridcieALow;
double labgridcieBLow;
double labgridcieAHigh;
double labgridcieBHigh;
double labgridcieGx;
double labgridcieGy;
double labgridcieWx;
double labgridcieWy;
double labgridcieMx;
double labgridcieMy;
int whitescie;
int blackscie;
Glib::ustring illMethod;
Glib::ustring smoothciemet;
Glib::ustring primMethod;
Glib::ustring catMethod;
double sigmoidldajzcie;
double sigmoidthjzcie;
double sigmoidbljzcie;
double contqcie;
double contsigqcie;
double colorflcie;
/*
double lightlzcam;
double lightqzcam;
double contlzcam;
double contqzcam;
double contthreszcam;
double colorflzcam;
double saturzcam;
double chromzcam;
*/
double targabscie;
double targetGraycie;
double catadcie;
double detailcie;
Glib::ustring surroundcie;
double strgradcie;
double anggradcie;
bool enacieMask;
bool enacieMaskall;
std::vector<double> CCmaskciecurve;
std::vector<double> LLmaskciecurve;
std::vector<double> HHmaskciecurve;
std::vector<double> HHhmaskciecurve;
int blendmaskcie;
double radmaskcie;
double chromaskcie;
@ -1747,7 +1791,16 @@ struct LocallabParams {
double lowthrescie;
double higthrescie;
double decaycie;
double strumaskcie;
bool toolcie;
bool fftcieMask;
double contcie;
double blurcie;
double highmaskcie;
double shadmaskcie;
std::vector<double> LLmaskciecurvewav;
Threshold<int> csthresholdcie;
LocallabSpot();
bool operator ==(const LocallabSpot& other) const;
@ -1947,7 +2000,8 @@ struct ColorManagementParams {
D120,
STDA,
TUNGSTEN_2000K,
TUNGSTEN_1500K
TUNGSTEN_1500K,
E
};
enum class Primaries {
@ -1960,6 +2014,7 @@ struct ColorManagementParams {
WIDE_GAMUT,
ACES_P0,
JDC_MAX,
JDC_MAXSTDA,
BRUCE_RGB,
BETA_RGB,
BEST_RGB,
@ -1967,6 +2022,14 @@ struct ColorManagementParams {
CUSTOM_GRID
};
enum class Cat {
BRAD,
CAT16,
CAT02,
CAT_VK,
CAT_XYZ
};
Glib::ustring inputProfile;
bool toneCurve;
bool applyLookTable;
@ -1978,16 +2041,23 @@ struct ColorManagementParams {
WorkingTrc workingTRC;
Illuminant will;
Primaries wprim;
Cat wcat;
double workingTRCGamma;
double workingTRCSlope;
double wmidtcie;
bool wsmoothcie;
double redx;
double redy;
double grex;
double grey;
double blux;
double bluy;
double refi;
double shiftx;
double shifty;
double preser;
bool fbw;
bool trcExp;
bool gamut;
double labgridcieALow;
double labgridcieBLow;
@ -1997,6 +2067,8 @@ struct ColorManagementParams {
double labgridcieGy;
double labgridcieWx;
double labgridcieWy;
double labgridcieMx;
double labgridcieMy;
RenderingIntent aRendIntent;
Glib::ustring outputProfile;

View File

@ -5290,7 +5290,7 @@ void RawImageSource::ItcWB(bool extra, double &tempref, double &greenref, double
itcwb_nopurple : false default - allow to bypass highlight recovery and inpait opposed when need flowers and not purple due to highlights...
itcwb_green - adjust green refinement
*/
BENCHFUN
// BENCHFUN
MyTime t1, t2, t3, t4, t5, t6, t7, t8;
t1.set();

View File

@ -1108,7 +1108,7 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
AUTOEXP, //Evlocallabsigmoidldacie
AUTOEXP, //Evlocallabsigmoidthcie
AUTOEXP, //Evlocallabsigmoidblcie
AUTOEXP, //Evlocallabsigmoidqjcie
HDR, //Evlocallabcomprcieauto
AUTOEXP, //Evlocallabhuecie
AUTOEXP, //Evlocallabjabcie
AUTOEXP, //Evlocallablightjzcie

View File

@ -424,12 +424,46 @@ public:
double Lnres46;
};
struct locallabcieBEF {
double blackevbef;
double whiteevbef;
double sourcegbef;
double sourceabbef;
double targetgbef;
bool autocomputbef;
bool autociebef;
double jz1bef;
};
struct locallabcieLC {
double redxlc;
double redylc;
double grexlc;
double greylc;
double bluxlc;
double bluylc;
double wxlc;
double wylc;
double meanxlc;
double meanylc;
double meanxelc;
double meanyelc;
};
struct locallabcieSIG {
double contsigq;
double lightsigq;
};
virtual ~LocallabListener() = default;
// virtual void refChanged(const std::vector<locallabRef> &ref, int selspot) = 0;
virtual void minmaxChanged(const std::vector<locallabRetiMinMax> &minmax, int selspot) = 0;
virtual void denChanged(const std::vector<locallabDenoiseLC> &denlc, int selspot) = 0;
virtual void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg, const bool autocomput, const bool autocie, const float jz1) = 0;
virtual void cieChanged(const std::vector<locallabcieLC> &cielc, int selspot) = 0;
virtual void sigChanged(const std::vector<locallabcieSIG> &ciesig, int selspot) = 0;
virtual void ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot) = 0;
virtual void refChanged2(float *huerefp, float *chromarefp, float *lumarefp, float *fabrefp, int selspot) = 0;
};
class AutoColorTonListener
@ -444,7 +478,7 @@ class AutoprimListener
public:
virtual ~AutoprimListener() = default;
virtual void primChanged(float rx, float ry, float bx, float by, float gx, float gy) = 0;
virtual void iprimChanged(float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y) = 0;
virtual void iprimChanged(float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y, float m_x, float m_y) = 0;
};

View File

@ -1534,7 +1534,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
ipf.softLight(labView, params.softlight);
if (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE) {
if (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params.icm.trcExp) {
const int GW = labView->W;
const int GH = labView->H;
std::unique_ptr<LabImage> provis;
@ -1558,8 +1558,49 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, eSensorT
cmsHTRANSFORM dummy = nullptr;
int ill = 0;
ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, ill, 0, dummy, true, false, false);
ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone, illum, prim, dummy, false, true, true);
int locprim = 0;
float rdx, rdy, grx, gry, blx, bly = 0.f;
float meanx, meany, meanxe, meanye = 0.f;
ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, 0, ill, 0, 0, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, dummy, true, false, false);
ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone,0, illum, prim, locprim, rdx, rdy, grx, gry, blx, bly,meanx, meany, meanxe, meanye, dummy, false, true, true);
const int midton = params.icm.wmidtcie;
if(midton != 0) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[2] = midton;
params.bands[4] = 0;
params.bands[5] = 0;
int mid = abs(midton);
int threshmid = 50;
if(mid > threshmid) {
params.bands[1] = sign(midton) * (mid - threshmid);
params.bands[3] = sign(midton) * (mid - threshmid);
}
ipf.toneEqualizer(tmpImage1.get(), params, prof, 1, false);
}
const bool smoothi = params.icm.wsmoothcie;
if(smoothi) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[1] = 0;
params.bands[2] = 0;
params.bands[3] = 0;
params.bands[4] = -40;//arbitrary value to adapt with WhiteEvjz - here White Ev # 10
params.bands[5] = -80;//8 Ev and above
bool Evsix = true;
if(Evsix) {//EV = 6 majority of images
params.bands[4] = -15;
}
ipf.toneEqualizer(tmpImage1.get(), params, prof, 1, false);
}
ipf.rgb2lab(*tmpImage1, *labView, params.icm.workingProfile);
// labView and provis

View File

@ -99,7 +99,7 @@ public:
bool itcwb_enable;
double itcwb_deltaspec;
double itcwb_powponder;
double basecorlog;
//wavelet levels
double edghi;
double edglo;

View File

@ -231,7 +231,8 @@ private:
bool autoContrast = imgsrc->getSensorType() == ST_BAYER ? params.raw.bayersensor.dualDemosaicAutoContrast : params.raw.xtranssensor.dualDemosaicAutoContrast;
double contrastThreshold = imgsrc->getSensorType() == ST_BAYER ? params.raw.bayersensor.dualDemosaicContrast : params.raw.xtranssensor.dualDemosaicContrast;
imgsrc->demosaic (params.raw, autoContrast, contrastThreshold, params.pdsharpening.enabled && pl);
imgsrc->demosaic(params.raw, autoContrast, contrastThreshold, params.pdsharpening.enabled && pl);
if (params.pdsharpening.enabled) {
imgsrc->captureSharpening(params.pdsharpening, false, params.pdsharpening.contrast, params.pdsharpening.deconvradius);
}
@ -272,6 +273,7 @@ private:
// set the color temperature
currWB = ColorTemp(params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method, params.wb.observer);
ColorTemp currWBitc;
if (params.wb.method == "autitcgreen" && flush) {
imgsrc->getrgbloc(0, 0, fh, fw, 0, 0, fh, fw, params.wb);
}
@ -349,6 +351,7 @@ private:
params.wb.green = currWB.getGreen();
params.wb.equal = currWB.getEqual();
}
//end WB auto
calclum = nullptr ;
@ -867,8 +870,8 @@ private:
}
// Spot Removal
if (params.spot.enabled && !params.spot.entries.empty ()) {
ipf.removeSpots (baseImg, imgsrc, params.spot.entries, pp, currWB, nullptr, tr);
if (params.spot.enabled && !params.spot.entries.empty()) {
ipf.removeSpots(baseImg, imgsrc, params.spot.entries, pp, currWB, nullptr, tr);
}
// at this stage, we can flush the raw data to free up quite an important amount of memory
@ -979,7 +982,7 @@ private:
}
ipf.transform(baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh,
imgsrc->getMetaData(), imgsrc->getRotateDegree(), true, true);
imgsrc->getMetaData(), imgsrc->getRotateDegree(), true, true);
if (trImg != baseImg) {
delete baseImg;
@ -995,14 +998,29 @@ private:
ImProcFunctions &ipf = * (ipf_p.get());
for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) {
if(params.locallab.spots.at(sp).expsharp && params.dirpyrequalizer.cbdlMethod == "bef") {
if(params.locallab.spots.at(sp).shardamping < 1) {
params.locallab.spots.at(sp).shardamping = 1;
}
}
}
if (params.locallab.spots.at(sp).expsharp && params.dirpyrequalizer.cbdlMethod == "bef") {
if (params.locallab.spots.at(sp).shardamping < 1) {
params.locallab.spots.at(sp).shardamping = 1;
}
}
}
if (params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) {
bool execcam = false;
//execcam => work around for pre-ciecam in LA: about 0.1 second
for (int sp = 0; sp < (int)params.locallab.spots.size(); sp++) {
if (params.locallab.spots.at(sp).expprecam) {
execcam = true;
}
}
if ((params.dirpyrequalizer.cbdlMethod == "bef") && (params.dirpyrequalizer.enabled || execcam) && !params.colorappearance.enabled) {
if (execcam && !params.dirpyrequalizer.enabled) {
params.dirpyrequalizer.enabled = true;
if (params.dirpyrequalizer.mult[0] == 1.) {
params.dirpyrequalizer.mult[0] = 1.01;
}
}
const int W = baseImg->getWidth();
const int H = baseImg->getHeight();
LabImage labcbdl(W, H);
@ -1037,6 +1055,7 @@ private:
LocLLmaskCurve locllmasCurve;
LocHHmaskCurve lochhmasCurve;
LocHHmaskCurve lochhhmasCurve;
LocHHmaskCurve lochhhmascieCurve;
LocCCmaskCurve locccmasexpCurve;
LocLLmaskCurve locllmasexpCurve;
LocHHmaskCurve lochhmasexpCurve;
@ -1075,6 +1094,7 @@ private:
LocwavCurve loclmasCurveblwav;
LocwavCurve loclmasCurvecolwav;
LocwavCurve loclmasCurveciewav;
LocwavCurve loclmasCurve_wav;
LocwavCurve locwavCurve;
LocwavCurve locwavCurvejz;
@ -1114,6 +1134,7 @@ private:
LUTf czjzlocalcurve(65536, LUT_CLIP_OFF);
array2D<float> shbuffer;
for (size_t sp = 0; sp < params.locallab.spots.size(); sp++) {
if (params.locallab.spots.at(sp).inverssha) {
shbuffer(fw, fh);
@ -1136,6 +1157,7 @@ private:
const bool llmasutili = locllmasCurve.Set(params.locallab.spots.at(sp).LLmaskcurve);
const bool lhmasutili = lochhmasCurve.Set(params.locallab.spots.at(sp).HHmaskcurve);
const bool lhhmasutili = lochhhmasCurve.Set(params.locallab.spots.at(sp).HHhmaskcurve);
const bool lhhmascieutili = lochhhmascieCurve.Set(params.locallab.spots.at(sp).HHhmaskciecurve);
const bool lcmasexputili = locccmasexpCurve.Set(params.locallab.spots.at(sp).CCmaskexpcurve);
const bool llmasexputili = locllmasexpCurve.Set(params.locallab.spots.at(sp).LLmaskexpcurve);
const bool lhmasexputili = lochhmasexpCurve.Set(params.locallab.spots.at(sp).HHmaskexpcurve);
@ -1171,6 +1193,7 @@ private:
const bool lhhmas_utili = lochhhmas_Curve.Set(params.locallab.spots.at(sp).HHhmask_curve);
const bool lmasutiliblwav = loclmasCurveblwav.Set(params.locallab.spots.at(sp).LLmaskblcurvewav);
const bool lmasutilicolwav = loclmasCurvecolwav.Set(params.locallab.spots.at(sp).LLmaskcolcurvewav);
const bool lmasutiliciewav = loclmasCurveciewav.Set(params.locallab.spots.at(sp).LLmaskciecurvewav);
const bool lcmaslcutili = locccmaslcCurve.Set(params.locallab.spots.at(sp).CCmasklccurve);
const bool llmaslcutili = locllmaslcCurve.Set(params.locallab.spots.at(sp).LLmasklccurve);
const bool lmasutili_wav = loclmasCurve_wav.Set(params.locallab.spots.at(sp).LLmask_curvewav);
@ -1215,10 +1238,15 @@ private:
double shcompr = params.locallab.spots.at(sp).shcompr;
double br = params.locallab.spots.at(sp).lightness;
double cont = params.locallab.spots.at(sp).contrast;
if (lblack < 0. && params.locallab.spots.at(sp).expMethod == "pde" ) {
if (lblack < 0. && params.locallab.spots.at(sp).expMethod == "pde") {
lblack *= 1.5;
}
float contsig = params.locallab.spots.at(sp).contsigqcie;
float lightsig = params.locallab.spots.at(sp).lightsigqcie;
// Reference parameters computation
double huere, chromare, lumare, huerefblu, chromarefblu, lumarefblu, sobelre;
int lastsav;
@ -1228,12 +1256,17 @@ private:
float meanretie;
float stdretie;
float fab = 1.f;
float maxicam = -1000.f;
float rdx, rdy, grx, gry, blx, bly = 0.f;
float meanx, meany, meanxe, meanye = 0.f;
int ill = 2;
if (params.locallab.spots.at(sp).spotMethod == "exc") {
ipf.calc_ref(sp, reservView.get(), reservView.get(), 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
} else {
ipf.calc_ref(sp, labView, labView, 0, 0, fw, fh, 1, huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, avge, locwavCurveden, locwavdenutili);
}
CurveFactory::complexCurvelocal(ecomp, lblack / 65535., lhlcompr, lhlcomprthresh, shcompr, br, cont, lumare,
hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc, avge,
1);
@ -1247,7 +1280,7 @@ private:
float Tmax;
float highresi = 0.f;
float nresi = 0.f;
float highresi46 =0.f;
float highresi46 = 0.f;
float nresi46 = 0.f;
float Lhighresi = 0.f;
float Lnresi = 0.f;
@ -1256,60 +1289,61 @@ private:
// No Locallab mask is shown in exported picture
ipf.Lab_Local(2, sp, shbuffer, labView, labView, reservView.get(), savenormtmView.get(), savenormretiView.get(), lastorigView.get(), fw, fh, 0, 0, fw, fh, 1, locRETgainCurve, locRETtransCurve,
lllocalcurve, locallutili,
cllocalcurve, localclutili,
lclocalcurve, locallcutili,
loclhCurve, lochhCurve, locchCurve,
lochhCurvejz, locchCurvejz,loclhCurvejz,
lmasklocalcurve, localmaskutili,
lmaskexplocalcurve, localmaskexputili,
lmaskSHlocalcurve, localmaskSHutili,
lmaskviblocalcurve, localmaskvibutili,
lmasktmlocalcurve, localmasktmutili,
lmaskretilocalcurve, localmaskretiutili,
lmaskcblocalcurve, localmaskcbutili,
lmaskbllocalcurve, localmaskblutili,
lmasklclocalcurve, localmasklcutili,
lmaskloglocalcurve, localmasklogutili,
lmasklocal_curve, localmask_utili,
lmaskcielocalcurve, localmaskcieutili,
cielocalcurve, localcieutili,
cielocalcurve2, localcieutili2,
jzlocalcurve, localjzutili,
czlocalcurve, localczutili,
czjzlocalcurve, localczjzutili,
lllocalcurve, locallutili,
cllocalcurve, localclutili,
lclocalcurve, locallcutili,
loclhCurve, lochhCurve, locchCurve,
lochhCurvejz, locchCurvejz, loclhCurvejz,
lmasklocalcurve, localmaskutili,
lmaskexplocalcurve, localmaskexputili,
lmaskSHlocalcurve, localmaskSHutili,
lmaskviblocalcurve, localmaskvibutili,
lmasktmlocalcurve, localmasktmutili,
lmaskretilocalcurve, localmaskretiutili,
lmaskcblocalcurve, localmaskcbutili,
lmaskbllocalcurve, localmaskblutili,
lmasklclocalcurve, localmasklcutili,
lmaskloglocalcurve, localmasklogutili,
lmasklocal_curve, localmask_utili,
lmaskcielocalcurve, localmaskcieutili,
cielocalcurve, localcieutili,
cielocalcurve2, localcieutili2,
jzlocalcurve, localjzutili,
czlocalcurve, localczutili,
czjzlocalcurve, localczjzutili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, lochhhmasCurve, lhhmasutili, lochhhmascieCurve, lhhmascieutili, locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili,
locccmasvibCurve, lcmasvibutili, locllmasvibCurve, llmasvibutili, lochhmasvibCurve, lhmasvibutili,
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili,
locccmasretiCurve, lcmasretiutili, locllmasretiCurve, llmasretiutili, lochhmasretiCurve, lhmasretiutili,
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili,
locccmasblCurve, lcmasblutili, locllmasblCurve, llmasblutili, lochhmasblCurve, lhmasblutili,
locccmaslcCurve, lcmaslcutili, locllmaslcCurve, llmaslcutili, lochhmaslcCurve, lhmaslcutili,
locccmaslogCurve, lcmaslogutili, locllmaslogCurve, llmaslogutili, lochhmaslogCurve, lhmaslogutili,
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
locccmascieCurve, lcmascieutili, locllmascieCurve, llmascieutili, lochhmascieCurve, lhmascieutili,
lochhhmas_Curve, lhhmas_utili,
loclmasCurveblwav,lmasutiliblwav,
loclmasCurvecolwav,lmasutilicolwav,
locwavCurve, locwavutili,
locwavCurvejz, locwavutilijz,
loclevwavCurve, loclevwavutili,
locconwavCurve, locconwavutili,
loccompwavCurve, loccompwavutili,
loccomprewavCurve, loccomprewavutili,
locwavCurvehue, locwavhueutili,
locwavCurveden, locwavdenutili,
locedgwavCurve, locedgwavutili,
loclmasCurve_wav,lmasutili_wav,
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
meantme, stdtme, meanretie, stdretie, fab,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46
);
locccmas_Curve, lcmas_utili, locllmas_Curve, llmas_utili, lochhmas_Curve, lhmas_utili,
locccmascieCurve, lcmascieutili, locllmascieCurve, llmascieutili, lochhmascieCurve, lhmascieutili,
lochhhmas_Curve, lhhmas_utili,
loclmasCurveblwav, lmasutiliblwav,
loclmasCurvecolwav, lmasutilicolwav,
loclmasCurveciewav, lmasutiliciewav,
locwavCurve, locwavutili,
locwavCurvejz, locwavutilijz,
loclevwavCurve, loclevwavutili,
locconwavCurve, locconwavutili,
loccompwavCurve, loccompwavutili,
loccomprewavCurve, loccomprewavutili,
locwavCurvehue, locwavhueutili,
locwavCurveden, locwavdenutili,
locedgwavCurve, locedgwavutili,
loclmasCurve_wav, lmasutili_wav,
LHutili, HHutili, CHutili, HHutilijz, CHutilijz, LHutilijz, cclocalcurve, localcutili, rgblocalcurve, localrgbutili, localexutili, exlocalcurve, hltonecurveloc, shtonecurveloc, tonecurveloc, lightCurveloc,
huerefblu, chromarefblu, lumarefblu, huere, chromare, lumare, sobelre, lastsav, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax,
meantme, stdtme, meanretie, stdretie, fab, maxicam, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, ill, contsig, lightsig,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46
);
if (sp + 1u < params.locallab.spots.size()) {
// do not copy for last spot as it is not needed anymore
@ -1407,7 +1441,7 @@ private:
ipf.rgbProc(baseImg, labView, nullptr, curve1, curve2, curve, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve, options.chunkSizeRGB, options.measure);
if (settings->verbose) {
printf ("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", static_cast<double>(autor), static_cast<double>(autog), static_cast<double>(autob));
printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", static_cast<double>(autor), static_cast<double>(autog), static_cast<double>(autob));
}
// if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS)
@ -1476,21 +1510,21 @@ private:
if (params.colorToning.enabled && params.colorToning.method == "LabGrid") {
ipf.colorToningLabGrid(labView, 0,labView->W , 0, labView->H, false);
ipf.colorToningLabGrid(labView, 0, labView->W, 0, labView->H, false);
}
ipf.shadowsHighlights(labView, params.sh.enabled, params.sh.lab,params.sh.highlights ,params.sh.shadows, params.sh.radius, 1, params.sh.htonalwidth, params.sh.stonalwidth);
ipf.shadowsHighlights(labView, params.sh.enabled, params.sh.lab, params.sh.highlights, params.sh.shadows, params.sh.radius, 1, params.sh.htonalwidth, params.sh.stonalwidth);
if (params.localContrast.enabled) {
// Alberto's local contrast
ipf.localContrast(labView, labView->L, params.localContrast, false, 1);//scale);
ipf.localContrast(labView, labView->L, params.localContrast, false, 1);//scale);
}
ipf.chromiLuminanceCurve(nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy);
if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) {
ipf.EPDToneMap (labView, 0, 1);
ipf.EPDToneMap(labView, 0, 1);
}
@ -1500,7 +1534,7 @@ private:
// for all treatments Defringe, Sharpening, Contrast detail ,Microcontrast they are activated if "CIECAM" function are disabled
if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) {
ipf.impulsedenoise (labView);
ipf.impulsedenoise(labView);
ipf.defringe(labView);
}
@ -1528,7 +1562,8 @@ private:
}
}
if ((params.wavelet.enabled)) {
int savestr = params.wavelet.strength;//work around for abstract profile: time about = 0.1 second
if ((params.wavelet.enabled) || (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params.icm.trcExp)) {
LabImage *unshar = nullptr;
WaveletParams WaveParams = params.wavelet;
WavCurve wavCLVCurve;
@ -1548,12 +1583,9 @@ private:
bool proton = WaveParams.exptoning;
bool pronois = WaveParams.expnoise;
/*
if(WaveParams.showmask) {
WaveParams.showmask = false;
WaveParams.expclari = true;
if(params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params.icm.trcExp) {
params.wavelet.strength = 0;
}
*/
if (WaveParams.softrad > 0.f) {
provradius = new LabImage(*labView, true);
}
@ -1614,6 +1646,7 @@ private:
tmpImage->b(ir, jr) = Z;
ble[ir][jr] = Y / 32768.f;
}
double epsilmax = 0.0001;
double epsilmin = 0.00001;
double aepsil = (epsilmax - epsilmin) / 100.f;
@ -1639,7 +1672,8 @@ private:
Color::XYZ2Lab(X, Y, Z, L, a, b);
labView->L[ir][jr] = L;
}
delete tmpImage;
delete tmpImage;
}
}
@ -1685,15 +1719,17 @@ private:
wavCLVCurve.Reset();
}
params.wavelet.strength = savestr;
ipf.softLight(labView, params.softlight);
if (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE) {
if (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params.icm.trcExp) {
const int GW = labView->W;
const int GH = labView->H;
std::unique_ptr<LabImage> provis;
const float pres = 0.01f * params.icm.preser;
if (pres > 0.f && params.icm.wprim != ColorManagementParams::Primaries::DEFAULT) {
provis.reset(new LabImage(GW, GH));
provis->CopyFrom(labView);
@ -1713,23 +1749,69 @@ private:
cmsHTRANSFORM dummy = nullptr;
int ill = 0;
ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, ill, 0, dummy, true, false, false);
ipf.workingtrc(tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone, illum, prim, dummy, false, true, true);
bool gamutcontrol = params.icm.gamut;
int catc = toUnderlying(params.icm.wcat);
int locprim = 0;
float rdx, rdy, grx, gry, blx, bly = 0.f;
float meanx, meany, meanxe, meanye = 0.f;
ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, -5, prof, 2.4, 12.92310, 0, ill, 0, 0, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, dummy, true, false, false, false);
ipf.workingtrc(0, tmpImage1.get(), tmpImage1.get(), GW, GH, 5, prof, gamtone, slotone, catc, illum, prim, locprim, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, dummy, false, true, true, gamutcontrol);
const int midton = params.icm.wmidtcie;
if(midton != 0) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[2] = midton;
params.bands[4] = 0;
params.bands[5] = 0;
int mid = abs(midton);
int threshmid = 50;
if(mid > threshmid) {
params.bands[1] = sign(midton) * (mid - threshmid);
params.bands[3] = sign(midton) * (mid - threshmid);
}
ipf.toneEqualizer(tmpImage1.get(), params, prof, 1, false);
}
const bool smoothi = params.icm.wsmoothcie;
if(smoothi) {
ToneEqualizerParams params;
params.enabled = true;
params.regularization = 0.f;
params.pivot = 0.f;
params.bands[0] = 0;
params.bands[1] = 0;
params.bands[2] = 0;
params.bands[3] = 0;
params.bands[4] = -40;//arbitrary value to adapt with WhiteEvjz - here White Ev # 10
params.bands[5] = -80;//8 Ev and above
bool Evsix = true;
if(Evsix) {//EV = 6 majority of images
params.bands[4] = -15;
}
ipf.toneEqualizer(tmpImage1.get(), params, prof, 1, false);
}
ipf.rgb2lab(*tmpImage1, *labView, params.icm.workingProfile);
// labView and provis
if(provis) {
if (provis) {
ipf.preserv(labView, provis.get(), GW, GH);
}
if(params.icm.fbw) {
if (params.icm.fbw) {
#ifdef _OPENMP
#pragma omp parallel for
#pragma omp parallel for
#endif
for (int x = 0; x < GH; x++)
for (int y = 0; y < GW; y++) {
labView->a[x][y] = 0.f;
labView->b[x][y] = 0.f;
}
for (int x = 0; x < GH; x++)
for (int y = 0; y < GW; y++) {
labView->a[x][y] = 0.f;
labView->b[x][y] = 0.f;
}
}
}
@ -1768,7 +1850,7 @@ private:
adap = 2000.;
}//if no exif data or wrong
else {
double E_V = fcomp + log2 ((fnum * fnum) / fspeed / (fiso / 100.f));
double E_V = fcomp + log2((fnum * fnum) / fspeed / (fiso / 100.f));
double kexp = 0.;
E_V += kexp * params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV
E_V += 0.5 * log2(params.raw.expos); // exposure raw white point ; log2 ==> linear to EV
@ -1780,7 +1862,7 @@ private:
float CAMMean = NAN;
float d, dj, yb;
ipf.ciecam_02float (cieView, float (adap), 1, 2, labView, &params, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 0, 1, true, d, dj, yb, 1);
ipf.ciecam_02float(cieView, float (adap), 1, 2, labView, &params, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 0, 1, true, d, dj, yb, 1);
}
delete cieView;
@ -1896,21 +1978,26 @@ private:
}
Exiv2Metadata info(imgsrc->getFileName());
switch (params.metadata.mode) {
case MetaDataParams::TUNNEL:
readyImg->setMetadata(std::move(info));
break;
case MetaDataParams::EDIT:
info.setExif(params.metadata.exif);
info.setIptc(params.metadata.iptc);
if (!(params.metadata.exifKeys.size() == 1 && params.metadata.exifKeys[0] == "*")) {
info.setExifKeys(&(params.metadata.exifKeys));
}
readyImg->setMetadata(std::move(info));
break;
default: // case MetaDataParams::STRIP
// nothing to do
break;
case MetaDataParams::TUNNEL:
readyImg->setMetadata(std::move(info));
break;
case MetaDataParams::EDIT:
info.setExif(params.metadata.exif);
info.setIptc(params.metadata.iptc);
if (!(params.metadata.exifKeys.size() == 1 && params.metadata.exifKeys[0] == "*")) {
info.setExifKeys(&(params.metadata.exifKeys));
}
readyImg->setMetadata(std::move(info));
break;
default: // case MetaDataParams::STRIP
// nothing to do
break;
}

View File

@ -888,7 +888,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited)
curveMode3Changed(); // This will set the correct sensitive state of depending Adjusters
nexttemp = pp->wb.temperature;
nextgreen = 1.; //pp->wb.green;
//nextgreen = 1.; //pp->wb.green;
nextgreen = pp->wb.green;
if (pedited) {
degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited);
@ -1519,7 +1520,7 @@ void ColorAppearance::catmethodChanged()
ybout->resetValue (false);
tempout->resetValue (false);
tempout->setAutoValue (true);
greenout->resetValue (false);
greenout->resetValue (true);
enableListener();
} else if (catmethod->get_active_row_number() == 2) {
disableListener();
@ -1887,8 +1888,10 @@ void ColorAppearance::wbCamChanged (double temp, double tin)
{
disableListener();
tempout->setValue(temp);
greenout->setValue(tin);
greenout->setValue(tin);
enableListener();
listener->panelChanged (EvCATgreenout, greenout->getTextValue());
listener->panelChanged (EvCATtempout, tempout->getTextValue());
return false;
}
);

View File

@ -647,7 +647,7 @@ void ColorToning::read (const ProcParams* pp, const ParamsEdited* pedited)
lastLumamode = pp->colorToning.lumamode;
labgrid->setParams(pp->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX, 0, 0, 0, 0,false);
labgrid->setParams(pp->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, pp->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX, 0, 0, 0, 0, 0, 0,false);
if (pedited && !pedited->colorToning.method) {
method->set_active (7);
@ -719,7 +719,7 @@ void ColorToning::write (ProcParams* pp, ParamsEdited* pedited)
double zerox = 0.;
double zeroy = 0.;
labgrid->getParams(pp->colorToning.labgridALow, pp->colorToning.labgridBLow, pp->colorToning.labgridAHigh, pp->colorToning.labgridBHigh, zerox, zeroy, zerox, zeroy);
labgrid->getParams(pp->colorToning.labgridALow, pp->colorToning.labgridBLow, pp->colorToning.labgridAHigh, pp->colorToning.labgridBHigh, zerox, zeroy, zerox, zeroy, zerox, zeroy);
pp->colorToning.labgridALow *= ColorToningParams::LABGRID_CORR_MAX;
pp->colorToning.labgridAHigh *= ColorToningParams::LABGRID_CORR_MAX;
pp->colorToning.labgridBLow *= ColorToningParams::LABGRID_CORR_MAX;
@ -835,7 +835,7 @@ void ColorToning::setDefaults (const ProcParams* defParams, const ParamsEdited*
hlColSat->setDefault<int> (defParams->colorToning.hlColSat);
shadowsColSat->setDefault<int> (defParams->colorToning.shadowsColSat);
strength->setDefault (defParams->colorToning.strength);
labgrid->setDefault(defParams->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX, 0, 0, 0, 0);
labgrid->setDefault(defParams->colorToning.labgridALow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBLow / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridAHigh / ColorToningParams::LABGRID_CORR_MAX, defParams->colorToning.labgridBHigh / ColorToningParams::LABGRID_CORR_MAX, 0, 0, 0, 0, 0, 0);
if (pedited) {
@ -1435,7 +1435,7 @@ void ColorToning::labRegionGet(int idx)
double la, lb;
double zerox = 0.;
double zeroy = 0.;
labRegionAB->getParams(la, lb, r.a, r.b, zerox, zeroy, zerox, zeroy);
labRegionAB->getParams(la, lb, r.a, r.b, zerox, zeroy, zerox, zeroy, zerox, zeroy);
r.saturation = labRegionSaturation->getValue();
r.slope = labRegionSlope->getValue();
r.offset = labRegionOffset->getValue();
@ -1573,7 +1573,7 @@ void ColorToning::labRegionShow(int idx, bool list_only)
rtengine::procparams::ColorToningParams::LabCorrectionRegion dflt;
auto &r = labRegionData[idx];
if (!list_only) {
labRegionAB->setParams(0, 0, r.a, r.b,0, 0, 0, 0, false);
labRegionAB->setParams(0, 0, r.a, r.b,0, 0, 0, 0, 0, 0, false);
labRegionSaturation->setValue(r.saturation);
labRegionSlope->setValue(r.slope);
labRegionOffset->setValue(r.offset);

View File

@ -66,15 +66,16 @@ ControlSpotPanel::ControlSpotPanel():
locYT_(Gtk::manage(new Adjuster(M("TP_LOCAL_HEIGHT_T"), 2, 3000, 1, 150))),
centerX_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CENTER_X"), -1000, 1000, 1, 0))),
centerY_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CENTER_Y"), -1000, 1000, 1, 0))),
circrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CIRCRADIUS"), 2, 150, 1, 18))),
circrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CIRCRADIUS"), 1.5, 150., 0.5, 18.))),
transit_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITVALUE"), 2., 100., 0.1, 60.))),
transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 25.0, 0.1, 1.0))),
transitgrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITGRAD"), -1.0, 1.0, 0.01, 0.0))),
feather_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FEATVALUE"), 10., 100., 0.1, 25.))),
struc_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRES"), 1.0, 12.0, 0.1, 4.0))),
thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 10.0, 0.1, 2.0))),
thresh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_THRESDELTAE"), 0.0, 15.0, 0.1, 2.0))),
iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 10.0, 0.1, 2.0))),
balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("circle-multicolor-small")), Gtk::manage(new RTImage("circle-white-small"))))),
// balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.05, 2.5, 0.05, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16")), Gtk::manage(new RTImage("circle-white-small"))))),
balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.05, 2.5, 0.05, 1.0, Gtk::manage(new RTImage("circle-yellow-small")), Gtk::manage(new RTImage("circle-white-small"))))),
balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("circle-multicolor-small")), Gtk::manage(new RTImage("circle-red-green-small"))))),
colorde_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORDE"), -15, 15, 2, 5, Gtk::manage(new RTImage("circle-blue-yellow-small")), Gtk::manage(new RTImage("circle-gray-green-small"))))),
colorscope_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORSCOPE"), 0., 100.0, 1., 30.))),
@ -1456,7 +1457,7 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval)
}
if (a == circrad_) {
row[spots_.circrad] = circrad_->getIntValue();
row[spots_.circrad] = circrad_->getValue();
updateControlSpotCurve(row);

View File

@ -32,7 +32,24 @@
#include "rtimage.h"
#include "rtwindow.h"
const char* sTRCPreset[] = {"BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9", "Lab_g3.0s9.03296"}; //gamma free
const char* sTRCPreset[] = {"BT709_g2.2_s4.5", "sRGB_g2.4_s12.92", "linear_g1.0", "standard_g2.2", "standard_g1.8", "High_g1.3_s3.35", "Low_g2.6_s6.9", "Lab_g3.0s9.03296" /*, "PQ", "HLG" */}; //gamma free
// code take in ART thanks to Alberto Griggio
cmsToneCurve *make_trc(size_t size, float (*trcFunc)(float, bool))
{
std::vector<float> values(size);
for (size_t i = 0; i < size; ++i) {
float x = float(i) / (size - 1);
float y = trcFunc(x, false); //, 1.0f);
values[i] = y;
}
cmsToneCurve *result = cmsBuildTabulatedToneCurveFloat(NULL, size, &values[0]);
return result;
}
///
ICCProfileCreator::ICCProfileCreator(RTWindow *rtwindow)
: Gtk::Dialog(M("MAIN_BUTTON_ICCPROFCREATOR"), *rtwindow, true)
@ -1305,6 +1322,10 @@ void ICCProfileCreator::savePressed()
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, 1.0);
} else if(gammaPreset == "Custom" && slope == 0.0) {
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildGamma(NULL, gamma);
// } else if(gammaPreset == "PQ") {
// GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = make_trc(4096, &rtengine::Color::eval_PQ_curve); //thanks to Alberto Griggio
// } else if(gammaPreset == "HLG") {
// GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = make_trc(4096, &rtengine::Color::eval_HLG_curve); //thanks to Alberto Griggio
} else {
GammaTRC[0] = GammaTRC[1] = GammaTRC[2] = cmsBuildParametricToneCurve(nullptr, 5, ga);
}

View File

@ -65,12 +65,20 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
EvICMLabGridciexy = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICL_LABGRIDCIEXY");
EvICMfbw = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_FBW");
EvICMgamut = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_GAMUT");
EvICMcat = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_CAT");
EvICMrefi = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_REFI");
EvICMtrcExp = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_TRCEXP");
EvICMshiftx = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_SHIFTX");
EvICMshifty = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_SHIFTY");
EvICMwmidtcie = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_MIDTCIE");
EvICMwsmoothcie = m->newEvent(LUMINANCECURVE, "HISTORY_MSG_ICM_SMOOTHCIE");
isBatchMode = lastToneCurve = lastApplyLookTable = lastApplyBaselineExposureOffset = lastApplyHueSatMap = false;
ipDialog = Gtk::manage(new MyFileChooserButton(M("TP_ICM_INPUTDLGLABEL"), Gtk::FILE_CHOOSER_ACTION_OPEN));
ipDialog->set_tooltip_text(M("TP_ICM_INPUTCUSTOM_TOOLTIP"));
bindCurrentFolder(*ipDialog, options.lastIccDir);
labgridcie = Gtk::manage(new LabGrid(EvICMLabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true));
labgridcie = Gtk::manage(new LabGrid(EvICMLabGridciexy, M("TP_ICM_LABGRID_CIEXY"), true, true, true));
// ------------------------------- Input profile
@ -205,12 +213,13 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
//-----------------gamma TRC working
// Gtk::Frame *trcFrame = Gtk::manage(new Gtk::Frame(M("TP_ICM_TRCFRAME")));
trcExp = Gtk::manage(new MyExpander(false, M("TP_ICM_TRCFRAME")));
trcExp = Gtk::manage(new MyExpander(true, M("TP_ICM_TRCFRAME")));
setExpandAlignProperties(trcExp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
// trcFrame->set_label_align(0.025, 0.5);
Gtk::Box *trcProfVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
trcExp->set_tooltip_text(M("TP_ICM_TRCFRAME_TOOLTIP"));
trcExp->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ICMPanel::foldAllButMe), trcExp) );
trcExpconn = trcExp->signal_enabled_toggled().connect(sigc::mem_fun(*this, &ICMPanel::trcExpChanged));
wTRCBox = Gtk::manage(new Gtk::Box());
@ -233,11 +242,19 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
wGamma = Gtk::manage(new Adjuster(M("TP_ICM_WORKING_TRC_GAMMA"), 0.40, 15.0, 0.001, 2.222));
wSlope = Gtk::manage(new Adjuster(M("TP_ICM_WORKING_TRC_SLOPE"), 0., 300., 0.01, 4.5));
wmidtcie = Gtk::manage(new Adjuster(M("TP_LOCALLAB_MIDTCIE"), -100., 100., 1., 0.));
wsmoothcie = Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_SMOOTHCIE")));
trcProfVBox->pack_start(*wGamma, Gtk::PACK_SHRINK);
wGamma->show();
trcProfVBox->pack_start(*wSlope, Gtk::PACK_SHRINK);
wSlope->show();
trcProfVBox->pack_start(*wmidtcie, Gtk::PACK_SHRINK);
wmidtcie->show();
trcProfVBox->pack_start(*wsmoothcie, Gtk::PACK_SHRINK);
wsmoothcie->show();
wsmoothcieconn = wsmoothcie->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::wsmoothcieChanged));
wsmoothcie->set_active(false);
willuBox = Gtk::manage(new Gtk::Box());
willulab = Gtk::manage(new Gtk::Label(M("TP_ICM_WORKING_ILLU") + ":"));
@ -257,6 +274,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
will->append(M("TP_ICM_WORKING_ILLU_STDA"));
will->append(M("TP_ICM_WORKING_ILLU_2000"));
will->append(M("TP_ICM_WORKING_ILLU_1500"));
will->append(M("TP_ICM_WORKING_ILLU_E"));
will->set_active(0);
will->set_tooltip_text(M("TP_ICM_ILLUMPRIM_TOOLTIP"));
@ -270,11 +288,11 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
fbw = Gtk::manage(new Gtk::CheckButton((M("TP_ICM_FBW"))));
fbw->set_active(true);
gamut = Gtk::manage(new Gtk::CheckButton((M("TP_ICM_GAMUT"))));
gamut->set_active(false);
gamut->set_active(true);
trcProfVBox->pack_start(*wprimBox, Gtk::PACK_EXPAND_WIDGET);
trcProfVBox->pack_start(*fbw, Gtk::PACK_EXPAND_WIDGET);
trcProfVBox->pack_start(*gamut, Gtk::PACK_EXPAND_WIDGET);
// trcProfVBox->pack_start(*gamut, Gtk::PACK_EXPAND_WIDGET);
neutral = Gtk::manage (new Gtk::Button (M ("TP_ICM_NEUTRAL")));
setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
@ -296,6 +314,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
wprim->append(M("TP_ICM_WORKING_PRIM_WID"));
wprim->append(M("TP_ICM_WORKING_PRIM_AC0"));
wprim->append(M("TP_ICM_WORKING_PRIM_JDCMAX"));
wprim->append(M("TP_ICM_WORKING_PRIM_JDCMAXSTDA"));
wprim->append(M("TP_ICM_WORKING_PRIM_BRU"));
wprim->append(M("TP_ICM_WORKING_PRIM_BET"));
wprim->append(M("TP_ICM_WORKING_PRIM_BST"));
@ -327,6 +346,10 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
redFrame->set_label_align(0.025, 0.5);
redFrame->set_tooltip_text(M("TP_ICM_WORKING_PRIMFRAME_TOOLTIP"));
colorFramecie = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_COLORFRAME")));
colorFramecie->set_label_align(0.025, 0.5);
colorFramecie->set_tooltip_text(M("TP_LOCALLAB_PRECAMREFIMAIN_TOOLTIP"));
Gtk::Box *redVBox = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL));
primCoordGrid = Gtk::manage(new Gtk::Grid());
primCoordGrid->set_column_homogeneous(true);
@ -355,22 +378,53 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
redVBox->pack_start(*cielab, Gtk::PACK_SHRINK);
redVBox->pack_start(*labgridcie, Gtk::PACK_EXPAND_WIDGET, 4);
redVBox->pack_start(*gamut, Gtk::PACK_EXPAND_WIDGET);
refi = Gtk::manage(new Adjuster(M("TC_PRIM_REFI"), -0.5, 1., 0.0001, 0.));
shiftx = Gtk::manage(new Adjuster(M("TC_LOCALLAB_PRIM_SHIFTX"), -0.2, 0.2, 0.0001, 0.));
shifty = Gtk::manage(new Adjuster(M("TC_LOCALLAB_PRIM_SHIFTY"), -0.2, 0.2, 0.0001, 0.));
wcatBox = Gtk::manage(new Gtk::Box());
wcatlab = Gtk::manage(new Gtk::Label(M("TP_ICM_WORKING_CAT") + ":"));
wcatBox->pack_start(*wcatlab, Gtk::PACK_SHRINK);
wcat = Gtk::manage(new MyComboBoxText());
wcatBox->pack_start(*wcat, Gtk::PACK_EXPAND_WIDGET);
wcat->append(M("TP_ICM_WORKING_CAT_BRAD"));
wcat->append(M("TP_ICM_WORKING_CAT_CAT16"));
wcat->append(M("TP_ICM_WORKING_CAT_CAT02"));
wcat->append(M("TP_ICM_WORKING_CAT_VK"));
wcat->append(M("TP_ICM_WORKING_CAT_XYZ"));
wcat->set_active(0);
redVBox->pack_start(*wcatBox, Gtk::PACK_SHRINK);
ToolParamBlock* const colorBox = Gtk::manage(new ToolParamBlock());
colorBox->pack_start(*refi, Gtk::PACK_EXPAND_WIDGET);
colorBox->pack_start(*shiftx, Gtk::PACK_EXPAND_WIDGET);
colorBox->pack_start(*shifty, Gtk::PACK_EXPAND_WIDGET);
colorFramecie->add(*colorBox);
redVBox->pack_start(*colorFramecie);
redFrame->add(*redVBox);
wGamma->setAdjusterListener(this);
wSlope->setLogScale(16, 0);
wSlope->setAdjusterListener(this);
wmidtcie->setAdjusterListener(this);
redx->setAdjusterListener(this);
redy->setAdjusterListener(this);
grex->setAdjusterListener(this);
grey->setAdjusterListener(this);
blux->setAdjusterListener(this);
bluy->setAdjusterListener(this);
refi->setAdjusterListener(this);
shiftx->setAdjusterListener(this);
shifty->setAdjusterListener(this);
wGamma->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
wSlope->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
wmidtcie->setDelay(std::max(options.adjusterMinDelay, options.adjusterMaxDelay));
// Rendering intent
riaHBox = Gtk::manage(new Gtk::Box());
@ -479,6 +533,7 @@ ICMPanel::ICMPanel() : FoldableToolPanel(this, TOOL_NAME, M("TP_ICM_LABEL")), iu
wtrcconn = wTRC->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wtrcinChanged));
willconn = will->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::willChanged));
wprimconn = wprim->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wprimChanged));
wcatconn = wcat->signal_changed().connect(sigc::mem_fun(*this, &ICMPanel::wcatChanged));
fbwconn = fbw->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::fbwChanged));
gamutconn = gamut->signal_toggled().connect(sigc::mem_fun(*this, &ICMPanel::gamutChanged));
@ -525,6 +580,8 @@ void ICMPanel::neutral_pressed ()
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::ACES_P0));
} else if (wProfNames->get_active_text() == "JDCmax") {
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::JDC_MAX));
} else if (wProfNames->get_active_text() == "JDCmax stdA") {
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::JDC_MAXSTDA));
} else if (wProfNames->get_active_text() == "BruceRGB") {
wprim->set_active(toUnderlying(ColorManagementParams::Primaries::BRUCE_RGB));
} else if (wProfNames->get_active_text() == "Beta RGB") {
@ -535,9 +592,11 @@ void ICMPanel::neutral_pressed ()
const ColorManagementParams defPar;
wGamma->setValue(defPar.workingTRCGamma);//2.4
wSlope->setValue(defPar.workingTRCSlope);//12.92
wmidtcie->setValue(defPar.wmidtcie);
preser->setValue(defPar.preser);
fbw->set_active(defPar.fbw);
gamut->set_active(defPar.gamut);
wsmoothcie->set_active(defPar.wsmoothcie);
wTRC->set_active(toUnderlying(ColorManagementParams::WorkingTrc::NONE));//reset to none
will->set_active(toUnderlying(ColorManagementParams::Illuminant::DEFAULT));//reset to default - after wprim
}
@ -614,7 +673,7 @@ void ICMPanel::primChanged (float rx, float ry, float bx, float by, float gx, fl
);
}
void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y)
void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y, float m_x, float m_y)
{//update CIE xy graph
nextrx = r_x;
nextry = r_y;
@ -624,6 +683,8 @@ void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g
nextgy = g_y;
nextwx = w_x;
nextwy = w_y;
nextmx = m_x;
nextmy = m_y;
//convert xy datas in datas for labgrid areas
nextrx = 1.81818f * (nextrx + 0.1f) - 1.f;
nextry = 1.81818f * (nextry + 0.1f) - 1.f;
@ -633,12 +694,14 @@ void ICMPanel::iprimChanged (float r_x, float r_y, float b_x, float b_y, float g
nextgy = 1.81818f * (nextgy + 0.1f) - 1.f;
nextwx = 1.81818f * (nextwx + 0.1f) - 1.f;
nextwy = 1.81818f * (nextwy + 0.1f) - 1.f;
nextmx = 1.81818f * (nextmx + 0.1f) - 1.f;
nextmy = 1.81818f * (nextmy + 0.1f) - 1.f;
idle_register.add(
[this]() -> bool
{
disableListener();
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, false);
labgridcie->setParams(nextrx, nextry, nextbx, nextby, nextgx, nextgy, nextwx, nextwy, nextmx, nextmy, false);
enableListener();
return false;
}
@ -793,6 +856,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
ConnectionBlocker obpcconn_(obpcconn);
ConnectionBlocker fbwconn_(fbwconn);
ConnectionBlocker gamutconn_(gamutconn);
ConnectionBlocker wsmoothcieconn_(wsmoothcieconn);
ConnectionBlocker ipc_(ipc);
ConnectionBlocker tcurveconn_(tcurveconn);
ConnectionBlocker ltableconn_(ltableconn);
@ -806,6 +870,9 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
ConnectionBlocker wtrcconn_(wtrcconn);
ConnectionBlocker willconn_(willconn);
ConnectionBlocker wprimconn_(wprimconn);
ConnectionBlocker wcatconn_(wcatconn);
ConnectionBlocker trcExpconn_(trcExpconn);
trcExp->set_expanded(false);
if (pp->icm.inputProfile.substr(0, 5) != "file:" && !ipDialog->get_filename().empty()) {
@ -847,10 +914,14 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
will->set_active(rtengine::toUnderlying(pp->icm.will));
wprim->set_active(rtengine::toUnderlying(pp->icm.wprim));
wcat->set_active(rtengine::toUnderlying(pp->icm.wcat));
wtrcinChanged();
willChanged();
wprimChanged();
wcatChanged();
gamutChanged();
wsmoothcieChanged();
if (pp->icm.outputProfile == ColorManagementParams::NoICMString) {
oProfNames->set_active_text(M("TP_ICM_NOICM"));
@ -867,7 +938,9 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
obpc->set_active(pp->icm.outputBPC);
fbw->set_active(pp->icm.fbw);
trcExp->setEnabled(pp->icm.trcExp);
gamut->set_active(pp->icm.gamut);
wsmoothcie->set_active(pp->icm.wsmoothcie);
ckbToneCurve->set_active(pp->icm.toneCurve);
lastToneCurve = pp->icm.toneCurve;
ckbApplyLookTable->set_active(pp->icm.applyLookTable);
@ -879,20 +952,26 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
wGamma->setValue(pp->icm.workingTRCGamma);
wSlope->setValue(pp->icm.workingTRCSlope);
wmidtcie->setValue(pp->icm.wmidtcie);
redx->setValue(pp->icm.redx);
redy->setValue(pp->icm.redy);
grex->setValue(pp->icm.grex);
grey->setValue(pp->icm.grey);
blux->setValue(pp->icm.blux);
bluy->setValue(pp->icm.bluy);
refi->setValue(pp->icm.refi);
shiftx->setValue(pp->icm.shiftx);
shifty->setValue(pp->icm.shifty);
preser->setValue(pp->icm.preser);
labgridcie->setParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, false);
labgridcie->setParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx, pp->icm.labgridcieMy, false);
if (pedited) {
iunchanged->set_active(!pedited->icm.inputProfile);
obpc->set_inconsistent(!pedited->icm.outputBPC);
fbw->set_inconsistent(!pedited->icm.fbw);
trcExp->set_inconsistent(!pedited->icm.trcExp);
gamut->set_inconsistent(!pedited->icm.gamut);
wsmoothcie->set_inconsistent(!pedited->icm.wsmoothcie);
ckbToneCurve->set_inconsistent(!pedited->icm.toneCurve);
ckbApplyLookTable->set_inconsistent(!pedited->icm.applyLookTable);
ckbApplyBaselineExposureOffset->set_inconsistent(!pedited->icm.applyBaselineExposureOffset);
@ -929,17 +1008,26 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
if (!pedited->icm.wprim) {
wprim->set_active_text(M("GENERAL_UNCHANGED"));
}
labgridcie->setEdited(pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy);
if (!pedited->icm.wcat) {
wcat->set_active_text(M("GENERAL_UNCHANGED"));
}
labgridcie->setEdited(pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy || pedited->icm.labgridcieMx || pedited->icm.labgridcieMy);
wGamma->setEditedState(pedited->icm.workingTRCGamma ? Edited : UnEdited);
wSlope->setEditedState(pedited->icm.workingTRCSlope ? Edited : UnEdited);
wmidtcie->setEditedState(pedited->icm.wmidtcie ? Edited : UnEdited);
redx->setEditedState(pedited->icm.redx ? Edited : UnEdited);
redy->setEditedState(pedited->icm.redy ? Edited : UnEdited);
grex->setEditedState(pedited->icm.grex ? Edited : UnEdited);
grey->setEditedState(pedited->icm.grey ? Edited : UnEdited);
blux->setEditedState(pedited->icm.blux ? Edited : UnEdited);
bluy->setEditedState(pedited->icm.bluy ? Edited : UnEdited);
refi->setEditedState(pedited->icm.refi ? Edited : UnEdited);
preser->setEditedState(pedited->icm.preser ? Edited : UnEdited);
shiftx->setEditedState(pedited->icm.shiftx ? Edited : UnEdited);
shifty->setEditedState(pedited->icm.shifty ? Edited : UnEdited);
}
@ -947,11 +1035,15 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
case ColorManagementParams::WorkingTrc::NONE: {
wSlope->set_sensitive(false);
wGamma->set_sensitive(false);
wmidtcie->set_sensitive(false);
will->set_sensitive(false);
willulab->set_sensitive(false);
wprim->set_sensitive(false);
wcat->set_sensitive(false);
wcatlab->set_sensitive(false);
fbw->set_sensitive(false);
gamut->set_sensitive(false);
wsmoothcie->set_sensitive(false);
wprimlab->set_sensitive(false);
riaHBox->set_sensitive(false);
redFrame->hide();
@ -962,8 +1054,17 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
if (gamut->get_active()) {
wcatBox->set_sensitive(true);
} else {
wcatBox->set_sensitive(false);
}
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
redFrame->hide();
@ -992,9 +1093,11 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
if (pp->icm.workingTRCGamma <= 1.) {
wGamma->set_sensitive(true);
wSlope->set_sensitive(false);
wmidtcie->set_sensitive(true);
} else {
wGamma->set_sensitive(true);
wSlope->set_sensitive(true);
wmidtcie->set_sensitive(true);
}
break;
}
@ -1002,14 +1105,24 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
case ColorManagementParams::WorkingTrc::BT709:
wGamma->setValue(2.222);
wSlope->setValue(4.5);
will->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
if (gamut->get_active()) {
wcatBox->set_sensitive(true);
} else {
wcatBox->set_sensitive(false);
}
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
wmidtcie->set_sensitive(true);
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
redFrame->hide();
} else {
@ -1020,14 +1133,23 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
case ColorManagementParams::WorkingTrc::SRGB:
wGamma->setValue(2.4);
wSlope->setValue(12.92);
will->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
if (gamut->get_active()) {
wcatBox->set_sensitive(true);
} else {
wcatBox->set_sensitive(false);
}
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
wmidtcie->set_sensitive(true);
riaHBox->set_sensitive(true);
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
redFrame->hide();
@ -1038,15 +1160,24 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
case ColorManagementParams::WorkingTrc::GAMMA_2_2:
wGamma->setValue(2.2);
wSlope->setValue(0.);
will->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
if (gamut->get_active()) {
wcatBox->set_sensitive(true);
} else {
wcatBox->set_sensitive(false);
}
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
redFrame->show();
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
wmidtcie->set_sensitive(true);
riaHBox->set_sensitive(true);
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
redFrame->hide();
@ -1057,11 +1188,19 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
case ColorManagementParams::WorkingTrc::GAMMA_1_8:
wGamma->setValue(1.8);
wSlope->setValue(0.);
will->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
if (gamut->get_active()) {
wcatBox->set_sensitive(true);
} else {
wcatBox->set_sensitive(false);
}
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
riaHBox->set_sensitive(true);
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
@ -1071,18 +1210,28 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
}
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
wmidtcie->set_sensitive(true);
break;
case ColorManagementParams::WorkingTrc::LINEAR:
wGamma->setValue(1.);
wSlope->setValue(1.);
will->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
if (gamut->get_active()) {
wcatBox->set_sensitive(true);
} else {
wcatBox->set_sensitive(false);
}
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
wmidtcie->set_sensitive(true);
riaHBox->set_sensitive(true);
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
redFrame->hide();
@ -1102,6 +1251,7 @@ void ICMPanel::read(const ProcParams* pp, const ParamsEdited* pedited)
case ColorManagementParams::Primaries::WIDE_GAMUT:
case ColorManagementParams::Primaries::ACES_P0:
case ColorManagementParams::Primaries::JDC_MAX:
case ColorManagementParams::Primaries::JDC_MAXSTDA:
case ColorManagementParams::Primaries::BRUCE_RGB:
case ColorManagementParams::Primaries::BETA_RGB:
case ColorManagementParams::Primaries::BEST_RGB: {
@ -1148,7 +1298,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
pp->icm.workingProfile = wProfNames->get_active_text();
pp->icm.dcpIlluminant = rtengine::max<int>(dcpIll->get_active_row_number(), 0);
labgridcie->getParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy);
labgridcie->getParams(pp->icm.labgridcieALow, pp->icm.labgridcieBLow, pp->icm.labgridcieAHigh, pp->icm.labgridcieBHigh, pp->icm.labgridcieGx, pp->icm.labgridcieGy, pp->icm.labgridcieWx, pp->icm.labgridcieWy, pp->icm.labgridcieMx, pp->icm.labgridcieMy);
if (oProfNames->get_active_text() == M("TP_ICM_NOICM")) {
pp->icm.outputProfile = ColorManagementParams::NoICMString;
@ -1175,6 +1325,7 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
pp->icm.workingTRC = ColorManagementParams::WorkingTrc(wTRC->get_active_row_number());
pp->icm.will = ColorManagementParams::Illuminant(will->get_active_row_number());
pp->icm.wprim = ColorManagementParams::Primaries(wprim->get_active_row_number());
pp->icm.wcat = ColorManagementParams::Cat(wcat->get_active_row_number());
pp->icm.toneCurve = ckbToneCurve->get_active();
pp->icm.applyLookTable = ckbApplyLookTable->get_active();
@ -1182,15 +1333,21 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
pp->icm.applyHueSatMap = ckbApplyHueSatMap->get_active();
pp->icm.outputBPC = obpc->get_active();
pp->icm.fbw = fbw->get_active();
pp->icm.trcExp = trcExp->getEnabled();
pp->icm.gamut = gamut->get_active();
pp->icm.wsmoothcie = wsmoothcie->get_active();
pp->icm.workingTRCGamma = wGamma->getValue();
pp->icm.workingTRCSlope = wSlope->getValue();
pp->icm.wmidtcie = wmidtcie->getValue();
pp->icm.redx = redx->getValue();
pp->icm.redy = redy->getValue();
pp->icm.grex = grex->getValue();
pp->icm.grey = grey->getValue();
pp->icm.blux = blux->getValue();
pp->icm.bluy = bluy->getValue();
pp->icm.refi = refi->getValue();
pp->icm.shiftx = shiftx->getValue();
pp->icm.shifty = shifty->getValue();
pp->toneCurve.fromHistMatching = false;
pp->icm.preser = preser->getValue();
@ -1202,7 +1359,9 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
pedited->icm.aRendIntent = aRendIntent->getSelected() < 4;
pedited->icm.outputBPC = !obpc->get_inconsistent();
pedited->icm.fbw = !fbw->get_inconsistent();
pedited->icm.trcExp = !trcExp->get_inconsistent();
pedited->icm.gamut = !gamut->get_inconsistent();
pedited->icm.wsmoothcie = !wsmoothcie->get_inconsistent();
pedited->icm.dcpIlluminant = dcpIll->get_active_text() != M("GENERAL_UNCHANGED");
pedited->icm.toneCurve = !ckbToneCurve->get_inconsistent();
pedited->icm.applyLookTable = !ckbApplyLookTable->get_inconsistent();
@ -1210,12 +1369,14 @@ void ICMPanel::write(ProcParams* pp, ParamsEdited* pedited)
pedited->icm.applyHueSatMap = !ckbApplyHueSatMap->get_inconsistent();
pedited->icm.workingTRCGamma = wGamma->getEditedState();
pedited->icm.workingTRCSlope = wSlope->getEditedState();
pedited->icm.wmidtcie = wmidtcie->getEditedState();
pedited->icm.workingTRC = wTRC->get_active_text() != M("GENERAL_UNCHANGED");
pedited->icm.will = will->get_active_text() != M("GENERAL_UNCHANGED");
pedited->icm.wprim = wprim->get_active_text() != M("GENERAL_UNCHANGED");
pedited->icm.wcat = wcat->get_active_text() != M("GENERAL_UNCHANGED");
pedited->icm.redx = redx->getEditedState();
pedited->icm.redy = redy->getEditedState();
pedited->icm.labgridcieALow = pedited->icm.labgridcieBLow = pedited->icm.labgridcieAHigh = pedited->icm.labgridcieBHigh = pedited->icm.labgridcieGx = pedited->icm.labgridcieGy = pedited->icm.labgridcieWx = pedited->icm.labgridcieWy = labgridcie->getEdited();
pedited->icm.labgridcieALow = pedited->icm.labgridcieBLow = pedited->icm.labgridcieAHigh = pedited->icm.labgridcieBHigh = pedited->icm.labgridcieGx = pedited->icm.labgridcieGy = pedited->icm.labgridcieWx = pedited->icm.labgridcieWy = pedited->icm.labgridcieMx = pedited->icm.labgridcieMy = labgridcie->getEdited();
}
}
@ -1223,36 +1384,48 @@ void ICMPanel::setDefaults(const ProcParams* defParams, const ParamsEdited* pedi
{
wGamma->setDefault(defParams->icm.workingTRCGamma);
wSlope->setDefault(defParams->icm.workingTRCSlope);
wmidtcie->setDefault(defParams->icm.wmidtcie);
redx->setDefault(defParams->icm.redx);
redy->setDefault(defParams->icm.redy);
grex->setDefault(defParams->icm.grex);
grey->setDefault(defParams->icm.grey);
blux->setDefault(defParams->icm.blux);
bluy->setDefault(defParams->icm.bluy);
refi->setDefault(defParams->icm.refi);
shiftx->setDefault(defParams->icm.shiftx);
shifty->setDefault(defParams->icm.shifty);
preser->setDefault(defParams->icm.preser);
labgridcie->setDefault(defParams->icm.labgridcieALow, defParams->icm.labgridcieBLow , defParams->icm.labgridcieAHigh, defParams->icm.labgridcieBHigh, defParams->icm.labgridcieGx, defParams->icm.labgridcieGy, defParams->icm.labgridcieWx, defParams->icm.labgridcieWy);
labgridcie->setDefault(defParams->icm.labgridcieALow, defParams->icm.labgridcieBLow , defParams->icm.labgridcieAHigh, defParams->icm.labgridcieBHigh, defParams->icm.labgridcieGx, defParams->icm.labgridcieGy, defParams->icm.labgridcieWx, defParams->icm.labgridcieWy, defParams->icm.labgridcieMx, defParams->icm.labgridcieMy);
if (pedited) {
wGamma->setDefaultEditedState(pedited->icm.workingTRCGamma ? Edited : UnEdited);
wSlope->setDefaultEditedState(pedited->icm.workingTRCSlope ? Edited : UnEdited);
wmidtcie->setDefaultEditedState(pedited->icm.wmidtcie ? Edited : UnEdited);
redx->setDefaultEditedState(pedited->icm.redx ? Edited : UnEdited);
redy->setDefaultEditedState(pedited->icm.redy ? Edited : UnEdited);
grex->setDefaultEditedState(pedited->icm.grex ? Edited : UnEdited);
grey->setDefaultEditedState(pedited->icm.grey ? Edited : UnEdited);
blux->setDefaultEditedState(pedited->icm.blux ? Edited : UnEdited);
bluy->setDefaultEditedState(pedited->icm.bluy ? Edited : UnEdited);
labgridcie->setEdited((pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy) ? Edited : UnEdited);
refi->setDefaultEditedState(pedited->icm.refi ? Edited : UnEdited);
shiftx->setDefaultEditedState(pedited->icm.shiftx ? Edited : UnEdited);
shifty->setDefaultEditedState(pedited->icm.shifty ? Edited : UnEdited);
labgridcie->setEdited((pedited->icm.labgridcieALow || pedited->icm.labgridcieBLow || pedited->icm.labgridcieAHigh || pedited->icm.labgridcieBHigh || pedited->icm.labgridcieGx || pedited->icm.labgridcieGy || pedited->icm.labgridcieWx || pedited->icm.labgridcieWy || pedited->icm.labgridcieMx || pedited->icm.labgridcieMy) ? Edited : UnEdited);
preser->setDefaultEditedState(pedited->icm.preser ? Edited : UnEdited);
} else {
wGamma->setDefaultEditedState(Irrelevant);
wSlope->setDefaultEditedState(Irrelevant);
wmidtcie->setDefaultEditedState(Irrelevant);
redx->setDefaultEditedState(Irrelevant);
redy->setDefaultEditedState(Irrelevant);
grex->setDefaultEditedState(Irrelevant);
grey->setDefaultEditedState(Irrelevant);
blux->setDefaultEditedState(Irrelevant);
bluy->setDefaultEditedState(Irrelevant);
refi->setDefaultEditedState(Irrelevant);
shiftx->setDefaultEditedState(Irrelevant);
shifty->setDefaultEditedState(Irrelevant);
preser->setDefaultEditedState(Irrelevant);
labgridcie->setEdited(Edited);
@ -1273,6 +1446,8 @@ void ICMPanel::adjusterChanged(Adjuster* a, double newval)
listener->panelChanged(EvICMgamm, costr2);
} else if (a == wSlope) {
listener->panelChanged(EvICMslop, costr2);
} else if (a == wmidtcie) {
listener->panelChanged(EvICMwmidtcie, costr2);
} else if (a == redx) {
listener->panelChanged(EvICMredx, costr2);
} else if (a == redy) {
@ -1287,6 +1462,12 @@ void ICMPanel::adjusterChanged(Adjuster* a, double newval)
listener->panelChanged(EvICMbluy, costr2);
} else if (a == preser) {
listener->panelChanged(EvICMpreser, costr2);
} else if (a == refi) {
listener->panelChanged(EvICMrefi, costr2);
} else if (a == shiftx) {
listener->panelChanged(EvICMshiftx, costr2);
} else if (a == shifty) {
listener->panelChanged(EvICMshifty, costr2);
}
}
@ -1305,11 +1486,13 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::WorkingTrc::NONE: {
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
wmidtcie->set_sensitive(false);
will->set_sensitive(false);
willulab->set_sensitive(false);
wprim->set_sensitive(false);
fbw->set_sensitive(false);
gamut->set_sensitive(false);
wsmoothcie->set_sensitive(false);
wprimlab->set_sensitive(false);
redFrame->hide();
riaHBox->set_sensitive(false);
@ -1319,8 +1502,12 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::WorkingTrc::CUSTOM: {
will->set_sensitive(false);
wprim->set_sensitive(true);
wmidtcie->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
willulab->set_sensitive(true);
if (ColorManagementParams::Primaries(wprim->get_active_row_number()) == ColorManagementParams::Primaries::DEFAULT) {
@ -1350,11 +1537,15 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::WorkingTrc::BT709: {
wGamma->setValue(2.222);
wSlope->setValue(4.5);
wmidtcie->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
@ -1376,11 +1567,15 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::WorkingTrc::SRGB: {
wGamma->setValue(2.4);
wSlope->setValue(12.92);
wmidtcie->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
riaHBox->set_sensitive(true);
@ -1403,11 +1598,15 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::WorkingTrc::GAMMA_2_2: {
wGamma->setValue(2.2);
wSlope->setValue(0.);
wmidtcie->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
@ -1431,11 +1630,15 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::WorkingTrc::GAMMA_1_8: {
wGamma->setValue(1.8);
wSlope->setValue(0.);
wmidtcie->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
@ -1459,11 +1662,15 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::WorkingTrc::LINEAR: {
wGamma->setValue(1.0);
wSlope->setValue(1.);
wmidtcie->set_sensitive(true);
will->set_sensitive(false);
willulab->set_sensitive(true);
wprim->set_sensitive(true);
wcat->set_sensitive(true);
wcatlab->set_sensitive(true);
fbw->set_sensitive(true);
gamut->set_sensitive(true);
wsmoothcie->set_sensitive(true);
wprimlab->set_sensitive(true);
wGamma->set_sensitive(false);
wSlope->set_sensitive(false);
@ -1485,6 +1692,7 @@ void ICMPanel::wtrcinChanged()
}
}
wprimChanged();
wcatChanged();
switch (ColorManagementParams::Primaries(wprim->get_active_row_number())) {
case ColorManagementParams::Primaries::DEFAULT:
@ -1496,6 +1704,7 @@ void ICMPanel::wtrcinChanged()
case ColorManagementParams::Primaries::WIDE_GAMUT:
case ColorManagementParams::Primaries::ACES_P0:
case ColorManagementParams::Primaries::JDC_MAX:
case ColorManagementParams::Primaries::JDC_MAXSTDA:
case ColorManagementParams::Primaries::BRUCE_RGB:
case ColorManagementParams::Primaries::BETA_RGB:
case ColorManagementParams::Primaries::BEST_RGB: {
@ -1519,6 +1728,8 @@ void ICMPanel::wtrcinChanged()
if (ColorManagementParams::WorkingTrc(wTRC->get_active_row_number()) == ColorManagementParams::WorkingTrc::NONE) {
redFrame->hide();
will->set_sensitive(false);
}
if (listener) {
@ -1538,6 +1749,7 @@ void ICMPanel::willChanged()
case ColorManagementParams::Primaries::WIDE_GAMUT:
case ColorManagementParams::Primaries::ACES_P0:
case ColorManagementParams::Primaries::JDC_MAX:
case ColorManagementParams::Primaries::JDC_MAXSTDA:
case ColorManagementParams::Primaries::BRUCE_RGB:
case ColorManagementParams::Primaries::BETA_RGB:
case ColorManagementParams::Primaries::BEST_RGB: {
@ -1663,6 +1875,17 @@ void ICMPanel::wprimChanged()
break;
}
case ColorManagementParams::Primaries::JDC_MAXSTDA: {
redx->setValue(0.734702);
redy->setValue(0.265302);
grex->setValue(0.021908);
grey->setValue(0.930288);
blux->setValue(0.120593);
bluy->setValue(0.001583);
will->set_active(toUnderlying(ColorManagementParams::Illuminant::STDA));
break;
}
case ColorManagementParams::Primaries::BRUCE_RGB: {
redx->setValue(0.64);
redy->setValue(0.33);
@ -1762,7 +1985,15 @@ void ICMPanel::wprimChanged()
grey->setValue(0.930288);
blux->setValue(0.120593);
bluy->setValue(0.001583);
will->set_active(toUnderlying(ColorManagementParams::Illuminant::D50));
will->set_active(toUnderlying(ColorManagementParams::Illuminant::D50));//D50
} else if (wProfNames->get_active_text() == "JDCmax stdA") {
redx->setValue(0.734702);
redy->setValue(0.265302);
grex->setValue(0.021908);
grey->setValue(0.930288);
blux->setValue(0.120593);
bluy->setValue(0.001583);
will->set_active(toUnderlying(ColorManagementParams::Illuminant::STDA));
} else if (wProfNames->get_active_text() == "BruceRGB") {
redx->setValue(0.64);
redy->setValue(0.33);
@ -1820,6 +2051,14 @@ void ICMPanel::wprimChanged()
}
}
void ICMPanel::wcatChanged()
{
if (listener) {
listener->panelChanged(EvICMcat, wcat->get_active_text());
}
}
void ICMPanel::dcpIlluminantChanged()
{
if (listener) {
@ -2066,6 +2305,20 @@ void ICMPanel::oBPCChanged()
}
}
void ICMPanel::trcExpChanged()
{
if (listener) {
if (trcExp->getEnabled()) {
listener->panelChanged(EvICMtrcExp, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(EvICMtrcExp, M("GENERAL_DISABLED"));
}
}
}
void ICMPanel::fbwChanged()
{
if (multiImage) {
@ -2106,11 +2359,17 @@ void ICMPanel::gamutChanged()
lastgamut = gamut->get_active();
}
if (gamut->get_active()) {
wcatBox->set_sensitive(true);
} else {
wcatBox->set_sensitive(false);
}
if (listener) {
if (gamut->get_inconsistent()) {
listener->panelChanged(EvICMgamut, M("GENERAL_UNCHANGED"));
} else if (fbw->get_active()) {
} else if (gamut->get_active()) {
listener->panelChanged(EvICMgamut, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(EvICMgamut, M("GENERAL_DISABLED"));
@ -2118,6 +2377,33 @@ void ICMPanel::gamutChanged()
}
}
void ICMPanel::wsmoothcieChanged()
{
if (multiImage) {
if (wsmoothcie->get_inconsistent()) {
wsmoothcie->set_inconsistent(false);
wsmoothcieconn.block(true);
wsmoothcie->set_active(false);
wsmoothcieconn.block(false);
} else if (lastwsmoothcie) {
wsmoothcie->set_inconsistent(true);
}
lastwsmoothcie = wsmoothcie->get_active();
}
if (listener) {
if (wsmoothcie->get_inconsistent()) {
listener->panelChanged(EvICMwsmoothcie, M("GENERAL_UNCHANGED"));
} else if (wsmoothcie->get_active()) {
listener->panelChanged(EvICMwsmoothcie, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(EvICMwsmoothcie, M("GENERAL_DISABLED"));
}
}
}
void ICMPanel::setRawMeta(bool raw, const rtengine::FramesData* pMeta)
{
@ -2230,12 +2516,16 @@ void ICMPanel::setBatchMode(bool batchMode)
dcpIll->append(M("GENERAL_UNCHANGED"));
wGamma->showEditedCB();
wSlope->showEditedCB();
wmidtcie->showEditedCB();
redx->showEditedCB();
redy->showEditedCB();
grex->showEditedCB();
grey->showEditedCB();
blux->showEditedCB();
bluy->showEditedCB();
refi->showEditedCB();
shiftx->showEditedCB();
shifty->showEditedCB();
preser->showEditedCB();
}

View File

@ -49,10 +49,13 @@ protected:
Gtk::Frame* dcpFrame;
Gtk::Frame* coipFrame;
Gtk::Frame* redFrame;
Gtk::Frame* colorFramecie;
MyExpander* trcExp;
Adjuster* wGamma;
Adjuster* wSlope;
Adjuster* wmidtcie;
Gtk::CheckButton* wsmoothcie;
Adjuster* redx;
Adjuster* redy;
Adjuster* grex;
@ -60,13 +63,19 @@ protected:
Adjuster* blux;
Adjuster* bluy;
Adjuster* preser;
Adjuster* refi;
Adjuster* shiftx;
Adjuster* shifty;
sigc::connection wsmoothcieconn;
bool lastwsmoothcie;
Gtk::Label* labmga;
Gtk::Box* gabox;
//Gtk::Label* blr;
//Gtk::Label* blg;
//Gtk::Label* blb;
Gtk::Button* neutral;
sigc::connection trcExpconn;
bool lasttrcExp;
sigc::connection neutralconn;
bool lastToneCurve;
@ -111,6 +120,13 @@ private:
rtengine::ProcEvent EvICMLabGridciexy;
rtengine::ProcEvent EvICMfbw;
rtengine::ProcEvent EvICMgamut;
rtengine::ProcEvent EvICMcat;
rtengine::ProcEvent EvICMrefi;
rtengine::ProcEvent EvICMtrcExp;
rtengine::ProcEvent EvICMshiftx;
rtengine::ProcEvent EvICMshifty;
rtengine::ProcEvent EvICMwmidtcie;
rtengine::ProcEvent EvICMwsmoothcie;
LabGrid *labgridcie;
IdleRegister idle_register;
@ -127,6 +143,10 @@ private:
Gtk::CheckButton* fbw;
Gtk::CheckButton* gamut;
Gtk::Box* wcatBox;
Gtk::Label* wcatlab;
Gtk::CheckButton* obpc;
Gtk::RadioButton* inone;
@ -149,6 +169,9 @@ private:
sigc::connection willconn;
MyComboBoxText* wprim;
sigc::connection wprimconn;
MyComboBoxText* wcat;
sigc::connection wcatconn;
std::unique_ptr<PopUpButton> aRendIntent;
sigc::connection arendintentconn;
@ -180,6 +203,8 @@ private:
float nextgy;
float nextwx;
float nextwy;
float nextmx;
float nextmy;
public:
static const Glib::ustring TOOL_NAME;
@ -193,18 +218,22 @@ public:
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr) override;
void adjusterChanged(Adjuster* a, double newval) override;
void primChanged (float rx, float ry, float bx, float by, float gx, float gy) override;
void iprimChanged (float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y) override;
void iprimChanged (float r_x, float r_y, float b_x, float b_y, float g_x, float g_y, float w_x, float w_y, float m_x, float m_y) override;
void neutral_pressed();
void wpChanged();
void wtrcinChanged();
void willChanged();
void wprimChanged();
void wcatChanged();
void trcExpChanged();
void opChanged();
void oiChanged(int n);
void aiChanged(int n);
void oBPCChanged();
void fbwChanged();
void wsmoothcieChanged();
void gamutChanged();
void ipChanged();
void ipSelectionChanged();

View File

@ -76,17 +76,19 @@ bool LabGridArea::notifyListener()
}
LabGridArea::LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy):
LabGridArea::LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy, bool mous):
Gtk::DrawingArea(),
evt(evt), evtMsg(msg),
litPoint(NONE),
low_a(0.f), high_a(0.f), low_b(0.f), high_b(0.f), gre_x(0.f), gre_y(0.f), whi_x(0.f), whi_y(0.f),//these variables are used as xy in Ciexy - no change labels
defaultLow_a(0.f), defaultHigh_a(0.f), defaultLow_b(0.f), defaultHigh_b(0.f), defaultgre_x(0.f), defaultgre_y(0.f), defaultwhi_x(0.f), defaultwhi_y(0.f),
low_a(0.f), high_a(0.f), low_b(0.f), high_b(0.f), gre_x(0.f), gre_y(0.f), whi_x(0.f), whi_y(0.f), me_x(0.f), me_y(0.f),//these variables are used as xy in Ciexy - no change labels
defaultLow_a(0.f), defaultHigh_a(0.f), defaultLow_b(0.f), defaultHigh_b(0.f), defaultgre_x(0.f), defaultgre_y(0.f), defaultwhi_x(0.f), defaultwhi_y(0.f), defaultme_x(0.f), defaultme_y(0.f),
listener(nullptr),
edited(false),
isDragged(false),
low_enabled(enable_low),
ciexy_enabled(ciexy)
ciexy_enabled(ciexy),
mous_enabled(mous)
{
set_can_focus(false); // prevent moving the grid while you're moving a point
@ -95,7 +97,7 @@ LabGridArea::LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool
get_style_context()->add_class("drawingarea");
}
void LabGridArea::getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy) const
void LabGridArea::getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my) const
{
la = low_a;
ha = high_a;
@ -105,11 +107,13 @@ void LabGridArea::getParams(double &la, double &lb, double &ha, double &hb, doub
gy = gre_y;
wx = whi_x;
wy = whi_y;
mx = me_x;
my = me_y;
// printf("la=%f ha=%f lb=%f hb=%f gx=%f gy=%f\n", la, ha, lb, hb, gx, gy);
}
void LabGridArea::setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, bool notify)
void LabGridArea::setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, bool notify)
{
const double lo = -1.0;
const double hi = 1.0;
@ -121,6 +125,8 @@ void LabGridArea::setParams(double la, double lb, double ha, double hb, double g
gre_y = rtengine::LIM(gy, lo, hi);
whi_x = rtengine::LIM(wx, lo, hi);
whi_y = rtengine::LIM(wy, lo, hi);
me_x = rtengine::LIM(mx, lo, hi);
me_y = rtengine::LIM(my, lo, hi);
queue_draw();
if (notify) {
@ -128,7 +134,7 @@ void LabGridArea::setParams(double la, double lb, double ha, double hb, double g
}
}
void LabGridArea::setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy)
void LabGridArea::setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my)
{
defaultLow_a = la;
defaultLow_b = lb;
@ -138,16 +144,18 @@ void LabGridArea::setDefault (double la, double lb, double ha, double hb, double
defaultgre_y = gy;
defaultwhi_x = wx;
defaultwhi_y = wy;
defaultme_x = mx;
defaultme_y = my;
}
void LabGridArea::reset(bool toInitial)
{
if (toInitial) {
setParams(defaultLow_a, defaultLow_b, defaultHigh_a, defaultHigh_b, defaultgre_x, defaultgre_y, defaultwhi_x, defaultwhi_y, true);
setParams(defaultLow_a, defaultLow_b, defaultHigh_a, defaultHigh_b, defaultgre_x, defaultgre_y, defaultwhi_x, defaultwhi_y, defaultme_x, defaultme_y, true);
} else {
// printf("RESET \n");
setParams(0., 0., 0., 0., 0., 0., 0., 0., true);
setParams(0., 0., 0., 0., 0., 0., 0., 0., 0., 0., true);
}
}
@ -322,6 +330,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
// Drawing the connection line
cr->set_antialias(Cairo::ANTIALIAS_DEFAULT);
// float loa, hia, lob, hib, grx, gry, whx, why, mex, mey;
const double loa = .5 * (static_cast<double>(width) + static_cast<double>(width) * low_a);
const double hia = .5 * (static_cast<double>(width) + static_cast<double>(width) * high_a);
const double lob = .5 * (static_cast<double>(height) + static_cast<double>(height) * low_b);
@ -330,7 +339,11 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
const double gry = .5 * (static_cast<double>(height) + static_cast<double>(height) * gre_y);
const double whx = .5 * (static_cast<double>(width) + static_cast<double>(width) * whi_x);
const double why = .5 * (static_cast<double>(height) + static_cast<double>(height) * whi_y);
double mex = .5 * (static_cast<double>(width) + static_cast<double>(width) * me_x);
double mey = .5 * (static_cast<double>(height) + static_cast<double>(height) * me_y);
cr->set_line_width(1.5);
mex = .5 * (width + width * me_x);
mey = .5 * (height + height * me_y);
cr->set_source_rgb(0.6, 0.6, 0.6);
cr->move_to(loa, lob);
cr->line_to(hia, hib);
@ -412,6 +425,12 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
cr->fill();
}
if (ciexy_enabled) {//Dominant
cr->set_source_rgb(0.3, 0.4, 0.3);
cr->arc(mex, mey, 3., 0, 2. * rtengine::RT_PI);
cr->fill();
}
cr->set_source_rgb(0.9, 0.9, 0.9);//white for blue en Ciexy
if (litPoint == HIGH) {
cr->arc(hia, hib, 5., 0., 2. * rtengine::RT_PI);
@ -426,7 +445,7 @@ bool LabGridArea::on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr)
bool LabGridArea::on_button_press_event(GdkEventButton *event)
{
if (event->button == 1) {
if (event->button == 1 && mous_enabled) {
if (!ciexy_enabled) {
if (event->type == GDK_2BUTTON_PRESS) {
switch (litPoint) {
@ -450,14 +469,15 @@ bool LabGridArea::on_button_press_event(GdkEventButton *event)
isDragged = true;
}
} else {
if (event->type == GDK_2BUTTON_PRESS) {
edited = true;
notifyListener();
queue_draw();
} else if (event->type == GDK_BUTTON_PRESS && litPoint != NONE) {
isDragged = true;
if(mous_enabled) {
if (event->type == GDK_2BUTTON_PRESS) {
edited = true;
notifyListener();
queue_draw();
} else if (event->type == GDK_BUTTON_PRESS && litPoint != NONE) {
isDragged = true;
}
}
}
return false;
}
@ -467,7 +487,7 @@ bool LabGridArea::on_button_press_event(GdkEventButton *event)
bool LabGridArea::on_button_release_event(GdkEventButton *event)
{
if (event->button == 1) {
if (event->button == 1 && mous_enabled) {
isDragged = false;
return false;
}
@ -591,12 +611,21 @@ void LabGridArea::setciexyEnabled(bool yes)
}
}
void LabGridArea::setmousEnabled(bool yes)
{
if (mous_enabled != yes) {
mous_enabled = yes;
queue_draw();
}
}
//-----------------------------------------------------------------------------
// LabGrid
//-----------------------------------------------------------------------------
LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy):
grid(evt, msg, enable_low, ciexy)
LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low, bool ciexy, bool mous):
grid(evt, msg, enable_low, ciexy, mous)
{
Gtk::Button *reset = Gtk::manage(new Gtk::Button());
reset->set_tooltip_markup(M("ADJUSTER_RESET_TO_DEFAULT"));
@ -611,7 +640,7 @@ LabGrid::LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_
reset->set_can_focus(false);
reset->set_size_request(-1, 20);
pack_start(grid, true, true);
pack_start(grid, true, true, true);
pack_start(*reset, false, false);
show_all_children();
}

View File

@ -58,7 +58,8 @@ private:
double gre_y;
double whi_x;
double whi_y;
double me_x;
double me_y;
double defaultLow_a;
double defaultHigh_a;
double defaultLow_b;
@ -67,6 +68,8 @@ private:
double defaultgre_y;
double defaultwhi_x;
double defaultwhi_y;
double defaultme_x;
double defaultme_y;
ToolPanelListener *listener;
bool edited;
@ -76,16 +79,17 @@ private:
bool low_enabled;
bool ciexy_enabled;
bool mous_enabled;
bool notifyListener();
void getLitPoint();
public:
LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false);
LabGridArea(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false, bool mous=false);
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy) const;
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, bool notify);
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy);
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my) const;
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, bool notify);
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my);
void setEdited(bool yes);
bool getEdited() const;
void reset(bool toInitial);
@ -95,6 +99,8 @@ public:
void setLowEnabled(bool yes);
bool ciexyEnabled() const;
void setciexyEnabled(bool yes);
bool mousEnabled() const;
void setmousEnabled(bool yes);
bool on_draw(const ::Cairo::RefPtr<Cairo::Context> &cr) override;
void on_style_updated () override;
@ -114,11 +120,11 @@ private:
bool resetPressed(GdkEventButton *event);
public:
LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false);
LabGrid(rtengine::ProcEvent evt, const Glib::ustring &msg, bool enable_low=true, bool ciexy=false, bool mous=true);
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy) const { return grid.getParams(la, lb, ha, hb, gx, gy, wx, wy); }
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, bool notify) { grid.setParams(la, lb, ha, hb, gx, gy, wx, wy, notify); }
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy) { grid.setDefault(la, lb, ha, hb, gx, gy, wx, wy); }
void getParams(double &la, double &lb, double &ha, double &hb, double &gx, double &gy, double &wx, double &wy, double &mx, double &my) const { return grid.getParams(la, lb, ha, hb, gx, gy, wx, wy, mx, my); }
void setParams(double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my, bool notify) { grid.setParams(la, lb, ha, hb, gx, gy, wx, wy, mx, my, notify); }
void setDefault (double la, double lb, double ha, double hb, double gx, double gy, double wx, double wy, double mx, double my) { grid.setDefault(la, lb, ha, hb, gx, gy, wx, wy, mx, my); }
void setEdited(bool yes) { grid.setEdited(yes); }
bool getEdited() const { return grid.getEdited(); }
void reset(bool toInitial) { grid.reset(toInitial); }
@ -127,5 +133,8 @@ public:
void setLowEnabled(bool yes) { grid.setLowEnabled(yes); }
bool ciexyEnabled() const { return grid.ciexyEnabled(); }
void setciexyEnabled(bool yes) { grid.setciexyEnabled(yes); }
bool mousEnabled() const { return grid.mousEnabled(); }
void setmousEnabled(bool yes) { grid.setmousEnabled(yes); }
};

View File

@ -1131,18 +1131,69 @@ void Locallab::denChanged(const std::vector<locallabDenoiseLC> &denlc, int selsp
}
void Locallab::logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg, const bool autocomput, const bool autocie, const float jz1)
void Locallab::sigChanged(const std::vector<locallabcieSIG> &ciesig, int selspot)
{
// Update Locallab Log Encoding and Ciecam accordingly
if(autocomput) {
explog.updateAutocompute(blackev, whiteev, sourceg, sourceab, targetg, jz1);
cie_sig = ciesig;
if (selspot < (int) cie_sig.size()) {
const double s1 = cie_sig.at(selspot).contsigq;
const double s2 = cie_sig.at(selspot).lightsigq;
expcie.updatesigloc(s1, s2);
}
if(autocie) {
expcie.updateAutocompute(blackev, whiteev, sourceg, sourceab, targetg, jz1);
}
void Locallab::ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot)
{
cie_bef = ciebef;
if (selspot < (int) cie_bef.size()) {
const double blackev = cie_bef.at(selspot).blackevbef;
const double whiteev = cie_bef.at(selspot).whiteevbef;
const double sourceg = cie_bef.at(selspot).sourcegbef;
const double sourceab = cie_bef.at(selspot).sourceabbef;
const double targetg = cie_bef.at(selspot).targetgbef;
const double jz1 = cie_bef.at(selspot).jz1bef;
const bool autocomput = cie_bef.at(selspot).autocomputbef;
const bool autocie = cie_bef.at(selspot).autociebef;
if(autocomput) {
explog.updateAutocompute(blackev, whiteev, sourceg, sourceab, targetg, jz1);
}
if(autocie) {
expcie.updateAutocompute(blackev, whiteev, sourceg, sourceab, targetg, jz1);
}
}
}
void Locallab::cieChanged(const std::vector<locallabcieLC> &cielc, int selspot)
{
// Saving transmitted min/max data
cie_lc = cielc;
//Update Locallab Denoise tool lum chro
if (selspot < (int) cie_lc.size()) {
const double r1 = cie_lc.at(selspot).redxlc;
const double r2 = cie_lc.at(selspot).redylc;
const double g1 = cie_lc.at(selspot).grexlc;
const double g2 = cie_lc.at(selspot).greylc;
const double b1 = cie_lc.at(selspot).bluxlc;
const double b2 = cie_lc.at(selspot).bluylc;
const double w1 = cie_lc.at(selspot).wxlc;
const double w2 = cie_lc.at(selspot).wylc;
const double m1 = cie_lc.at(selspot).meanxlc;
const double m2 = cie_lc.at(selspot).meanylc;
const double me1 = cie_lc.at(selspot).meanxelc;
const double me2 = cie_lc.at(selspot).meanyelc;
expcie.updateiPrimloc(r1, r2, g1, g2, b1, b2, w1, w2, m1, m2, me1, me2);
}
}
void Locallab::refChanged2(float *huerefp, float *chromarefp, float *lumarefp, float *fabrefp, int selspot)
{
const double huer = huerefp[selspot];

View File

@ -126,6 +126,13 @@ private:
// Locallab tools mask background management data
std::vector<locallabDenoiseLC> denoiselc;
std::vector<locallabcieBEF> cie_bef;
std::vector<locallabcieLC> cie_lc;
std::vector<locallabcieSIG> cie_sig;
// Locallab tools mask background management data
std::vector<locallabRef> maskBackRef;
@ -152,8 +159,14 @@ public:
// Locallab Retinex tool min/man management function
void denChanged(const std::vector<locallabDenoiseLC> &denlc, int selspot) override;
// Locallab Log Encoding autocompute function
void logencodChanged(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg, const bool autocomput, const bool autocie, const float jz1) override;
// Locallab CIE tool primaries function
void cieChanged(const std::vector<locallabcieLC> &cielc, int selspot) override;
// Locallab Log Encoding and Cam16 autocompute function
void ciebefChanged(const std::vector<locallabcieBEF> &ciebef, int selspot) override;
void sigChanged(const std::vector<locallabcieSIG> &ciesig, int selspot) override;
// Locallab tools mask background management function
// void refChanged(const std::vector<locallabRef> &ref, int selspot) override;

View File

@ -1165,7 +1165,7 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param
spot.labgridBLow / LocallabParams::LABGRIDL_CORR_MAX,
spot.labgridAHigh / LocallabParams::LABGRIDL_CORR_MAX,
spot.labgridBHigh / LocallabParams::LABGRIDL_CORR_MAX,
0, 0, 0, 0, false);
0, 0, 0, 0, 0, 0, false);
// printf("labgridlow=%f \n", spot.labgridALow);
if (spot.gridMethod == "one") {
gridMethod->set_active(0);
@ -1278,7 +1278,7 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param
labgridmerg->setParams(0, 0,
spot.labgridAHighmerg / LocallabParams::LABGRIDL_CORR_MAX,
spot.labgridBHighmerg / LocallabParams::LABGRIDL_CORR_MAX,
0, 0, 0, 0, false);
0, 0, 0, 0, 0, 0, false);
merlucol->setValue(spot.merlucol);
enaColorMask->set_active(spot.enaColorMask);
CCmaskshape->setCurve(spot.CCmaskcurve);
@ -1342,7 +1342,7 @@ void LocallabColor::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe
labgrid->getParams(spot.labgridALow,
spot.labgridBLow,
spot.labgridAHigh,
spot.labgridBHigh, zerox, zeroy, zerox, zeroy);
spot.labgridBHigh, zerox, zeroy, zerox, zeroy, zerox, zeroy);
spot.labgridALow *= LocallabParams::LABGRIDL_CORR_MAX;
spot.labgridAHigh *= LocallabParams::LABGRIDL_CORR_MAX;
spot.labgridBLow *= LocallabParams::LABGRIDL_CORR_MAX;
@ -1461,7 +1461,7 @@ void LocallabColor::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe
labgridmerg->getParams(spot.labgridALowmerg,
spot.labgridBLowmerg,
spot.labgridAHighmerg,
spot.labgridBHighmerg, zerox1, zeroy1, zerox1, zeroy1);
spot.labgridBHighmerg, zerox1, zeroy1, zerox1, zeroy1, zerox1, zeroy1);
spot.labgridALowmerg *= LocallabParams::LABGRIDL_CORR_MAX;
spot.labgridAHighmerg *= LocallabParams::LABGRIDL_CORR_MAX;
spot.labgridBLowmerg *= LocallabParams::LABGRIDL_CORR_MAX;
@ -1508,7 +1508,7 @@ void LocallabColor::setDefaults(const rtengine::procparams::ProcParams* defParam
labgrid->setDefault(defSpot.labgridALow / LocallabParams::LABGRIDL_CORR_MAX,
defSpot.labgridBLow / LocallabParams::LABGRIDL_CORR_MAX,
defSpot.labgridAHigh / LocallabParams::LABGRIDL_CORR_MAX,
defSpot.labgridBHigh / LocallabParams::LABGRIDL_CORR_MAX, 0, 0, 0, 0);
defSpot.labgridBHigh / LocallabParams::LABGRIDL_CORR_MAX, 0, 0, 0, 0, 0, 0);
strengthgrid->setDefault((double) defSpot.strengthgrid);
sensi->setDefault((double)defSpot.sensi);
structcol->setDefault((double)defSpot.structcol);
@ -1524,7 +1524,7 @@ void LocallabColor::setDefaults(const rtengine::procparams::ProcParams* defParam
labgridmerg->setDefault(defSpot.labgridALowmerg / LocallabParams::LABGRIDL_CORR_MAX,
defSpot.labgridBLowmerg / LocallabParams::LABGRIDL_CORR_MAX,
defSpot.labgridAHighmerg / LocallabParams::LABGRIDL_CORR_MAX,
defSpot.labgridBHighmerg / LocallabParams::LABGRIDL_CORR_MAX, 0, 0, 0, 0);
defSpot.labgridBHighmerg / LocallabParams::LABGRIDL_CORR_MAX, 0, 0, 0, 0, 0, 0);
merlucol->setDefault(defSpot.merlucol);
strumaskcol->setDefault(defSpot.strumaskcol);
contcol->setDefault(defSpot.contcol);
@ -2002,7 +2002,7 @@ void LocallabColor::convertParamToNormal()
labgridmerg->setParams(0, 0,
defSpot.labgridAHighmerg / LocallabParams::LABGRIDL_CORR_MAX,
defSpot.labgridBHighmerg / LocallabParams::LABGRIDL_CORR_MAX,
0, 0, 0, 0, false);
0, 0, 0, 0, 0, 0, false);
merlucol->setValue(defSpot.merlucol);
strumaskcol->setValue(defSpot.strumaskcol);
toolcol->set_active(defSpot.toolcol);
@ -4014,16 +4014,16 @@ LocallabShadow::LocallabShadow():
// Shadow highlight specific widgets
shMethod(Gtk::manage(new MyComboBoxText())),
reparsh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LOGREPART"), 1.0, 100.0, 1., 100.0))),
multipliersh([]() -> std::array<Adjuster *, 5>
multipliersh([]() -> std::array<Adjuster *, 6>
{
std::array<Adjuster*, 5> res = {};
std::array<Adjuster*, 6> res = {};
for (unsigned int i = 0; i < res.size(); ++i) {
Glib::ustring ss = Glib::ustring::format(i);
if (i == 0) {
ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMADARKEST"));
} else if (i == 4) {
} else if (i == 5) {
ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMAWHITESEST"));
}
@ -4416,7 +4416,7 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para
shMethod->set_active(1);
}
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 6; i++) {
multipliersh[i]->setValue((double)spot.multsh[i]);
}
recothress->setValue((double)spot.recothress);
@ -4486,7 +4486,7 @@ void LocallabShadow::write(rtengine::procparams::ProcParams* pp, ParamsEdited* p
spot.shMethod = "tone";
}
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 6; i++) {
spot.multsh[i] = multipliersh[i]->getIntValue();
}
@ -4535,7 +4535,7 @@ void LocallabShadow::setDefaults(const rtengine::procparams::ProcParams* defPara
const LocallabParams::LocallabSpot& defSpot = defParams->locallab.spots.at(index);
// Set default values for adjuster widgets
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 6; i++) {
multipliersh[i]->setDefault(defSpot.multsh[i]);
}
@ -4573,15 +4573,16 @@ void LocallabShadow::setDefaults(const rtengine::procparams::ProcParams* defPara
void LocallabShadow::adjusterChanged(Adjuster* a, double newval)
{
if (isLocActivated && exp->getEnabled()) {
if (a == multipliersh[0] || a == multipliersh[1] || a == multipliersh[2] || a == multipliersh[3] || a == multipliersh[4]) {
if (a == multipliersh[0] || a == multipliersh[1] || a == multipliersh[2] || a == multipliersh[3] || a == multipliersh[4] || a == multipliersh[5]) {
if (listener) {
listener->panelChanged(EvlocallabEqualizersh,
Glib::ustring::compose("%1, %2, %3, %4, %5",
Glib::ustring::compose("%1, %2, %3, %4, %5, %6",
Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[0]->getIntValue()),
Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[1]->getIntValue()),
Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[2]->getIntValue()),
Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[3]->getIntValue()),
Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[4]->getIntValue())) + " (" + escapeHtmlChars(getSpotName()) + ")");
Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[4]->getIntValue()),
Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[5]->getIntValue())) + " (" + escapeHtmlChars(getSpotName()) + ")");
}
}

View File

@ -55,7 +55,59 @@ protected:
Normal = 1,
Simple = 2
};
rtengine::ProcEvent Evlocallabnormcie;
rtengine::ProcEvent Evlocallabstrumaskcie;
rtengine::ProcEvent EvLocallabtoolcie;
rtengine::ProcEvent EvLocallabfftcieMask;
rtengine::ProcEvent Evlocallabcontcie;
rtengine::ProcEvent Evlocallabblurcie;
rtengine::ProcEvent Evlocallabhighmaskcie;
rtengine::ProcEvent Evlocallabshadmaskcie;
rtengine::ProcEvent Evlocallabsigmoidsenscie;
rtengine::ProcEvent EvlocallabLLmaskcieshapewav;
rtengine::ProcEvent EvlocallabcsThresholdcie;
rtengine::ProcEvent Evlocallabcomprcie;
rtengine::ProcEvent Evlocallabstrcielog;
rtengine::ProcEvent Evlocallabsatcie;
rtengine::ProcEvent Evlocallablogcieq;
rtengine::ProcEvent Evlocallabcomprcieth;
rtengine::ProcEvent EvlocallabHHhmaskcieshape;
rtengine::ProcEvent EvlocallabbwevMethod;
rtengine::ProcEvent Evlocallabgamjcie;
rtengine::ProcEvent Evlocallabslopjcie;
rtengine::ProcEvent Evlocallabmidtcie;
rtengine::ProcEvent Evlocallabslopesmo;
rtengine::ProcEvent Evlocallabsmoothcie;
rtengine::ProcEvent Evlocallabsmoothciemet;
rtengine::ProcEvent Evlocallabsigcie;
rtengine::ProcEvent Evlocallabillcie;
rtengine::ProcEvent Evlocallabprimcie;
rtengine::ProcEvent Evlocallabcatcie;
rtengine::ProcEvent Evlocallabwhitescie;
rtengine::ProcEvent Evlocallabblackscie;
rtengine::ProcEvent Evlocallabwhiteslog;
rtengine::ProcEvent Evlocallabblackslog;
rtengine::ProcEvent Evlocallabcomprlog;
rtengine::ProcEvent Evlocallabsatlog;
rtengine::ProcEvent Evlocallabstrelog;
rtengine::ProcEvent Evlocallabredxl;
rtengine::ProcEvent Evlocallabredyl;
rtengine::ProcEvent Evlocallabgrexl;
rtengine::ProcEvent Evlocallabgreyl;
rtengine::ProcEvent Evlocallabbluxl;
rtengine::ProcEvent Evlocallabbluyl;
rtengine::ProcEvent EvlocallabGridciexy;
rtengine::ProcEvent Evlocallabgamutcie;
rtengine::ProcEvent Evlocallabexpprecam;
rtengine::ProcEvent Evlocallablightsigqcie;
rtengine::ProcEvent Evlocallabcontsigqcie;
rtengine::ProcEvent Evlocallabrefi;
rtengine::ProcEvent Evlocallabshiftxl;
rtengine::ProcEvent Evlocallabshiftyl;
rtengine::ProcEvent Evlocallabanggradcie;
rtengine::ProcEvent Evlocallabstrgradcie;
rtengine::ProcEvent Evlocallabdetailciejz;
rtengine::ProcEvent EvlocallabenacieMaskall;
// LocallabTool parameters
bool needMode;
bool isLocActivated;
@ -452,7 +504,7 @@ private:
// Shadow highlight specific widgets
MyComboBoxText* const shMethod;
Adjuster* const reparsh;
const std::array<Adjuster*, 5> multipliersh;
const std::array<Adjuster*, 6> multipliersh;
Adjuster* const detailSH;
Adjuster* const tePivot;
Adjuster* const highlights;
@ -1339,8 +1391,15 @@ private:
Gtk::CheckButton* const ciecam;
Gtk::ToggleButton* const autocompute;
Gtk::Frame* const logPFrame;
Gtk::Frame* const logPFrame2;
Adjuster* const blackEv;
Adjuster* const whiteEv;
Adjuster* const whiteslog;
Adjuster* const blackslog;
Adjuster* const comprlog;
Adjuster* const strelog;
Gtk::CheckButton* const satlog;
Gtk::CheckButton* const fullimage;
Gtk::Frame* const logFrame;
Gtk::CheckButton* const Autogray;
@ -1395,7 +1454,7 @@ private:
DiagonalCurveEditor* const LmaskshapeL;
sigc::connection autoconn, ciecamconn, fullimageConn, AutograyConn;
sigc::connection surroundconn, sursourconn;
sigc::connection surroundconn, sursourconn, satlogconn;
sigc::connection showmaskLMethodConn, enaLMaskConn;
public:
LocallabLog();
@ -1409,6 +1468,7 @@ public:
void surroundChanged();
void sursourChanged();
void setDefaultExpanderVisibility() override;
void satlogChanged();
void disableListener() override;
void enableListener() override;
@ -1543,6 +1603,8 @@ private:
Gtk::Box* const modeHBoxcam;
Gtk::Box* const modeHBoxcie;
Gtk::Frame* const cieFrame;
MyExpander* const expcamscene;
Gtk::CheckButton* const Autograycie;
Adjuster* const sourceGraycie;
Adjuster* const sourceabscie;
@ -1586,10 +1648,13 @@ private:
Adjuster* const clarisoftjz;
MyExpander* const expcam16;
MyExpander* const expcamviewing;
Adjuster* const lightqcie;
Adjuster* const contlcie;
Adjuster* const contqcie;
Adjuster* const lightsigqcie;
Adjuster* const contsigqcie;
Adjuster* const contthrescie;
Gtk::Frame* const logjzFrame;
Gtk::CheckButton* const logjz;
@ -1598,15 +1663,71 @@ private:
Adjuster* const targetjz;
Gtk::Frame* const bevwevFrame;
Gtk::CheckButton* const forcebw;
ToolParamBlock* const sigBox;
Gtk::Frame* const sigmoidFrame;
Gtk::Frame* const sigmoidnormFrame;
Gtk::CheckButton* const sigq;
Adjuster* const sigmoidldacie;
Adjuster* const sigmoidthcie;
Adjuster* const sigmoidsenscie;
Adjuster* const sigmoidblcie;
Gtk::CheckButton* const sigmoidqjcie;
Gtk::Box* autocomprHBox;
Gtk::ToggleButton* const comprcieauto;
Gtk::CheckButton* const normcie;
Gtk::Box* const modeHBoxbwev;
MyComboBoxText* const bwevMethod;
Gtk::Frame* const logcieFrame;
Gtk::CheckButton* const logcie;
ToolParamBlock* const comprBox;
Adjuster* const comprcie;
Adjuster* const strcielog;
Gtk::CheckButton* const satcie;
Gtk::CheckButton* const logcieq;
Adjuster* const comprcieth;
MyExpander* const expprecam;
Adjuster* const gamjcie;
Adjuster* const slopjcie;
Adjuster* const midtcie;
Gtk::CheckButton* const smoothcie;
ToolParamBlock* const ciesmoothBox;
Gtk::Box* smoothBox;
MyComboBoxText* const smoothciemet;
Adjuster* const slopesmo;
Adjuster* const whitescie;
Adjuster* const blackscie;
Gtk::Box* willBox;
MyComboBoxText* const illMethod;
Gtk::Box* wprimBox;
MyComboBoxText* const primMethod;
Gtk::Grid* primCoordGridl;
Gtk::Frame* trcFrame;
Gtk::Frame* smoothFrame;
Gtk::Frame* primillFrame;
ToolParamBlock* const redBox;
Adjuster* const redxl;
Adjuster* const redyl;
Adjuster* const grexl;
Adjuster* const greyl;
Adjuster* const bluxl;
Adjuster* const bluyl;
Adjuster* const refi;
Gtk::Frame* const gridFramecie;
LabGrid* const labgridcie;
Gtk::Frame* const colorFramecie;
Gtk::Box* catBox;
MyComboBoxText* const catMethod;
Gtk::Box* gamutcieBox;
Gtk::CheckButton* const gamutcie;
Adjuster* const shiftxl;
Adjuster* const shiftyl;
Gtk::Frame* const sigmoidjzFrame;
Gtk::Frame* const sigmoid2Frame;
Gtk::CheckButton* const sigcie;
Gtk::CheckButton* const sigjz;
Adjuster* const sigmoidldajzcie;
Adjuster* const sigmoidthjzcie;
@ -1645,26 +1766,20 @@ private:
Gtk::CheckButton* const chjzcie;
Adjuster* const strsoftjzcie;
/*
Gtk::Frame* const ciezFrame;
Adjuster* const lightlzcam;
Adjuster* const lightqzcam;
Adjuster* const contlzcam;
Adjuster* const contqzcam;
Adjuster* const contthreszcam;
Adjuster* const colorflzcam;
Adjuster* const saturzcam;
Adjuster* const chromzcam;
*/
MyExpander* const expLcie;
Gtk::Frame* const cie2Frame;
Adjuster* const targetGraycie;
Adjuster* const targabscie;
Adjuster* const detailcie;
Adjuster* const detailciejz;
Adjuster* const catadcie;
MyComboBoxText* const surroundcie;
Gtk::Box* const surrHBoxcie;
MyExpander* const expgradcie;
Adjuster* const strgradcie;
Adjuster* const anggradcie;
MyExpander* const exprecovcie;
Gtk::Label* const maskusablecie;
Gtk::Label* const maskunusablecie;
@ -1676,25 +1791,46 @@ private:
MyExpander* const expmaskcie;
MyComboBoxText* const showmaskcieMethod;
Gtk::CheckButton* const enacieMask;
Gtk::CheckButton* const enacieMaskall;
CurveEditorGroup* const maskcieCurveEditorG;
FlatCurveEditor* const CCmaskcieshape;
FlatCurveEditor* const LLmaskcieshape;
FlatCurveEditor* const HHmaskcieshape;
Gtk::Frame* const struFramecie;
Adjuster* const strumaskcie;
Gtk::CheckButton* const toolcie;
Gtk::Frame* const blurFramecie;
Gtk::CheckButton* const fftcieMask;
Adjuster* const contcie;
Adjuster* const blurcie;
Adjuster* const blendmaskcie;
Adjuster* const radmaskcie;
Adjuster* const lapmaskcie;
Adjuster* const chromaskcie;
Adjuster* const gammaskcie;
Adjuster* const slomaskcie;
Adjuster* const highmaskcie;
Adjuster* const shadmaskcie;
CurveEditorGroup* const maskcieHCurveEditorG;
FlatCurveEditor* const HHhmaskcieshape;
CurveEditorGroup* const mask2cieCurveEditorG;
DiagonalCurveEditor* const Lmaskcieshape;
sigc::connection AutograycieConn, forcejzConn, forcebwConn, qtojConn, showmaskcieMethodConn, enacieMaskConn, jabcieConn, sursourcieconn, surroundcieconn, modecieconn, modecamconn, sigmoidqjcieconn, logcieconn, logjzconn, sigjzconn, sigqconn, chjzcieconn, toneMethodcieConn, toneMethodcieConn2;
Gtk::Frame* const wavFramecie;
CurveEditorGroup* const mask2cieCurveEditorGwav;
FlatCurveEditor* const LLmaskcieshapewav;
Gtk::Box* const quaHcieBox;
ThresholdAdjuster* const csThresholdcie;
int nextcomprciecount = 0;
sigc::connection AutograycieConn, primMethodconn, illMethodconn, smoothciemetconn, catMethodconn, forcejzConn, forcebwConn, qtojConn, showmaskcieMethodConn, enacieMaskConn, enacieMaskallConn, jabcieConn, sursourcieconn, surroundcieconn, modecieconn, modecamconn, comprcieautoconn, normcieconn, logcieconn, satcieconn, logcieqconn,smoothcieconn, logjzconn, sigjzconn, sigqconn, chjzcieconn, toneMethodcieConn, toneMethodcieConn2, toolcieConn, bwevMethodConn, fftcieMaskConn, gamutcieconn, expprecamconn, sigcieconn;
public:
Locallabcie();
~Locallabcie();
void setListener(ToolPanelListener* tpl) override;
bool isMaskViewActive() override;
void resetMaskView() override;
void getMaskView(int &colorMask, int &colorMaskinv, int &expMask, int &expMaskinv, int &shMask, int &shMaskinv, int &vibMask, int &softMask, int &blMask, int &tmMask, int &retiMask, int &sharMask, int &lcMask, int &cbMask, int &logMask, int &maskMask, int &cieMask) override;
@ -1721,7 +1857,11 @@ public:
void curveChanged(CurveEditor* ce) override;
void toneMethodcieChanged();
void toneMethodcie2Changed();
void bwevMethodChanged();
void updateAutocompute(const float blackev, const float whiteev, const float sourceg, const float sourceab, const float targetg, const float jz1);
void updatePrimloc(const float redx, const float redy, const float grex, const float grey, const float blux, const float bluy);
void updateiPrimloc(const float r_x, const float r_y, const float g_x, const float g_y, const float b_x, const float b_y, const float w_x, const float w_y, const float m_x, const float m_y, const float me_x, const float me_y);
void updatesigloc(const float cont_sig, const float light_sig);
private:
void enabledChanged() override;
@ -1734,8 +1874,18 @@ private:
void forcebwChanged();
void qtojChanged();
void jabcieChanged();
void sigmoidqjcieChanged();
void comprcieautoChanged();
void normcieChanged();
void gamutcieChanged();
void illMethodChanged();
void smoothciemetChanged();
void primMethodChanged();
void catMethodChanged();
void logcieChanged();
void satcieChanged();
void logcieqChanged();
void smoothcieChanged();
void sigcieChanged();
void logjzChanged();
void sigjzChanged();
void sigqChanged();
@ -1744,6 +1894,23 @@ private:
void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer, const double normHuerjz) override;
void showmaskcieMethodChanged();
void enacieMaskChanged();
void enacieMaskallChanged();
void enacieMaskallChanged2();
void guijzczhz();
void toolcieChanged();
void fftcieMaskChanged();
void expprecamChanged();
float nextrx;
float nextry;
float nextbx;
float nextby;
float nextgx;
float nextgy;
float nextwx;
float nextwy;
float nextmx;
float nextmy;
};

File diff suppressed because it is too large Load Diff

View File

@ -633,6 +633,7 @@ void Options::setDefaults()
rtSettings.previewselection = 5;//between 1 to 40
rtSettings.cbdlsensi = 1.0;//between 0.001 to 1
rtSettings.fftwsigma = true; //choice between sigma^2 or empirical formula
rtSettings.basecorlog = 0.12;//reduction max Q in Cam16 sigmoid Log encoding between 0.05 and 0.5
// end locallab
rtSettings.itcwb_enable = true;
rtSettings.itcwb_deltaspec = 0.075;
@ -1977,6 +1978,10 @@ void Options::readFromFile(Glib::ustring fname)
rtSettings.cbdlsensi = keyFile.get_double("Color Management", "Cbdlsensi");
}
if (keyFile.has_key("Color Management", "Besecorlog")) {//sensi base log for Q
rtSettings.basecorlog = keyFile.get_double("Color Management", "Basecorlog");
}
}
@ -2662,6 +2667,7 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_string("Color Management", "ClutsDirectory", clutsDir);
keyFile.set_integer("Color Management", "Previewselection", rtSettings.previewselection);
keyFile.set_double("Color Management", "Cbdlsensi", rtSettings.cbdlsensi);
keyFile.set_double("Color Management", "Basecorlog", rtSettings.basecorlog);
keyFile.set_double("Wavelet", "Edghi", rtSettings.edghi);
keyFile.set_double("Wavelet", "Edglo", rtSettings.edglo);

View File

@ -459,14 +459,20 @@ void ParamsEdited::set(bool v)
icm.outputBPC = v;
icm.workingTRCGamma = v;
icm.workingTRCSlope = v;
icm.wmidtcie = v;
icm.wsmoothcie = v;
icm.redx = v;
icm.redy = v;
icm.grex = v;
icm.grey = v;
icm.blux = v;
icm.bluy = v;
icm.refi = v;
icm.shiftx = v;
icm.shifty = v;
icm.preser = v;
icm.fbw = v;
icm.trcExp = v;
icm.gamut = v;
icm.labgridcieALow = v;
icm.labgridcieBLow = v;
@ -476,10 +482,13 @@ void ParamsEdited::set(bool v)
icm.labgridcieGy = v;
icm.labgridcieWx = v;
icm.labgridcieWy = v;
icm.labgridcieMx = v;
icm.labgridcieMy = v;
icm.aRendIntent = v;
icm.workingTRC = v;
icm.will = v;
icm.wprim = v;
icm.wcat = v;
raw.bayersensor.method = v;
raw.bayersensor.border = v;
raw.bayersensor.imageNum = v;
@ -1278,7 +1287,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).complexshadhigh = locallab.spots.at(j).complexshadhigh && pSpot.complexshadhigh == otherSpot.complexshadhigh;
locallab.spots.at(j).shMethod = locallab.spots.at(j).shMethod && pSpot.shMethod == otherSpot.shMethod;
for (int k = 0; k < 5; k++) {
for (int k = 0; k < 6; k++) {
locallab.spots.at(j).multsh[k] = locallab.spots.at(j).multsh[k] && pSpot.multsh[k] == otherSpot.multsh[k];
}
@ -1653,10 +1662,15 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).Autogray = locallab.spots.at(j).Autogray && pSpot.Autogray == otherSpot.Autogray;
locallab.spots.at(j).fullimage = locallab.spots.at(j).fullimage && pSpot.fullimage == otherSpot.fullimage;
locallab.spots.at(j).ciecam = locallab.spots.at(j).ciecam && pSpot.ciecam == otherSpot.ciecam;
locallab.spots.at(j).satlog = locallab.spots.at(j).satlog && pSpot.satlog == otherSpot.satlog;
locallab.spots.at(j).enaLMask = locallab.spots.at(j).enaLMask && pSpot.enaLMask == otherSpot.enaLMask;
locallab.spots.at(j).repar = locallab.spots.at(j).repar && pSpot.repar == otherSpot.repar;
locallab.spots.at(j).blackEv = locallab.spots.at(j).blackEv && pSpot.blackEv == otherSpot.blackEv;
locallab.spots.at(j).whiteEv = locallab.spots.at(j).whiteEv && pSpot.whiteEv == otherSpot.whiteEv;
locallab.spots.at(j).whiteslog = locallab.spots.at(j).whiteslog && pSpot.whiteslog == otherSpot.whiteslog;
locallab.spots.at(j).blackslog = locallab.spots.at(j).blackslog && pSpot.blackslog == otherSpot.blackslog;
locallab.spots.at(j).comprlog = locallab.spots.at(j).comprlog && pSpot.comprlog == otherSpot.comprlog;
locallab.spots.at(j).strelog = locallab.spots.at(j).strelog && pSpot.strelog == otherSpot.strelog;
locallab.spots.at(j).detail = locallab.spots.at(j).detail && pSpot.detail == otherSpot.detail;
locallab.spots.at(j).sursour = locallab.spots.at(j).sursour && pSpot.sursour == otherSpot.sursour;
locallab.spots.at(j).surround = locallab.spots.at(j).surround && pSpot.surround == otherSpot.surround;
@ -1710,6 +1724,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
//ciecam
locallab.spots.at(j).visicie = locallab.spots.at(j).visicie && pSpot.visicie == otherSpot.visicie;
locallab.spots.at(j).expcie = locallab.spots.at(j).expcie && pSpot.expcie == otherSpot.expcie;
locallab.spots.at(j).expprecam = locallab.spots.at(j).expprecam && pSpot.expprecam == otherSpot.expprecam;
locallab.spots.at(j).complexcie = locallab.spots.at(j).complexcie && pSpot.complexcie == otherSpot.complexcie;
locallab.spots.at(j).reparcie = locallab.spots.at(j).reparcie && pSpot.reparcie == otherSpot.reparcie;
locallab.spots.at(j).sensicie = locallab.spots.at(j).sensicie && pSpot.sensicie == otherSpot.sensicie;
@ -1718,8 +1733,14 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).forcebw = locallab.spots.at(j).forcebw && pSpot.forcebw == otherSpot.forcebw;
locallab.spots.at(j).qtoj = locallab.spots.at(j).qtoj && pSpot.qtoj == otherSpot.qtoj;
locallab.spots.at(j).jabcie = locallab.spots.at(j).jabcie && pSpot.jabcie == otherSpot.jabcie;
locallab.spots.at(j).sigmoidqjcie = locallab.spots.at(j).sigmoidqjcie && pSpot.sigmoidqjcie == otherSpot.sigmoidqjcie;
locallab.spots.at(j).comprcieauto = locallab.spots.at(j).comprcieauto && pSpot.comprcieauto == otherSpot.comprcieauto;
locallab.spots.at(j).normcie = locallab.spots.at(j).normcie && pSpot.normcie == otherSpot.normcie;
locallab.spots.at(j).gamutcie = locallab.spots.at(j).gamutcie && pSpot.gamutcie == otherSpot.gamutcie;
locallab.spots.at(j).sigcie = locallab.spots.at(j).sigcie && pSpot.sigcie == otherSpot.sigcie;
locallab.spots.at(j).logcie = locallab.spots.at(j).logcie && pSpot.logcie == otherSpot.logcie;
locallab.spots.at(j).satcie = locallab.spots.at(j).satcie && pSpot.satcie == otherSpot.satcie;
locallab.spots.at(j).logcieq = locallab.spots.at(j).logcieq && pSpot.logcieq == otherSpot.logcieq;
locallab.spots.at(j).smoothcie = locallab.spots.at(j).smoothcie && pSpot.smoothcie == otherSpot.smoothcie;
locallab.spots.at(j).logjz = locallab.spots.at(j).logjz && pSpot.logjz == otherSpot.logjz;
locallab.spots.at(j).sigjz = locallab.spots.at(j).sigjz && pSpot.sigjz == otherSpot.sigjz;
locallab.spots.at(j).sigq = locallab.spots.at(j).sigq && pSpot.sigq == otherSpot.sigq;
@ -1728,6 +1749,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).sourceabscie = locallab.spots.at(j).sourceabscie && pSpot.sourceabscie == otherSpot.sourceabscie;
locallab.spots.at(j).sursourcie = locallab.spots.at(j).sursourcie && pSpot.sursourcie == otherSpot.sursourcie;
locallab.spots.at(j).modecam = locallab.spots.at(j).modecam && pSpot.modecam == otherSpot.modecam;
locallab.spots.at(j).bwevMethod = locallab.spots.at(j).bwevMethod && pSpot.bwevMethod == otherSpot.bwevMethod;
locallab.spots.at(j).modecie = locallab.spots.at(j).modecie && pSpot.modecie == otherSpot.modecie;
locallab.spots.at(j).saturlcie = locallab.spots.at(j).saturlcie && pSpot.saturlcie == otherSpot.saturlcie;
locallab.spots.at(j).rstprotectcie = locallab.spots.at(j).rstprotectcie && pSpot.rstprotectcie == otherSpot.rstprotectcie;
@ -1752,8 +1774,10 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).lightlcie = locallab.spots.at(j).lightlcie && pSpot.lightlcie == otherSpot.lightlcie;
locallab.spots.at(j).lightjzcie = locallab.spots.at(j).lightjzcie && pSpot.lightjzcie == otherSpot.lightjzcie;
locallab.spots.at(j).lightqcie = locallab.spots.at(j).lightqcie && pSpot.lightqcie == otherSpot.lightqcie;
locallab.spots.at(j).lightsigqcie = locallab.spots.at(j).lightsigqcie && pSpot.lightsigqcie == otherSpot.lightsigqcie;
locallab.spots.at(j).contlcie = locallab.spots.at(j).contlcie && pSpot.contlcie == otherSpot.contlcie;
locallab.spots.at(j).contjzcie = locallab.spots.at(j).contjzcie && pSpot.contjzcie == otherSpot.contjzcie;
locallab.spots.at(j).detailciejz = locallab.spots.at(j).detailciejz && pSpot.detailciejz == otherSpot.detailciejz;
locallab.spots.at(j).adapjzcie = locallab.spots.at(j).adapjzcie && pSpot.adapjzcie == otherSpot.adapjzcie;
locallab.spots.at(j).jz100 = locallab.spots.at(j).jz100 && pSpot.jz100 == otherSpot.jz100;
locallab.spots.at(j).pqremap = locallab.spots.at(j).pqremap && pSpot.pqremap == otherSpot.pqremap;
@ -1769,31 +1793,62 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).targetjz = locallab.spots.at(j).targetjz && pSpot.targetjz == otherSpot.targetjz;
locallab.spots.at(j).sigmoidldacie = locallab.spots.at(j).sigmoidldacie && pSpot.sigmoidldacie == otherSpot.sigmoidldacie;
locallab.spots.at(j).sigmoidthcie = locallab.spots.at(j).sigmoidthcie && pSpot.sigmoidthcie == otherSpot.sigmoidthcie;
locallab.spots.at(j).sigmoidsenscie = locallab.spots.at(j).sigmoidsenscie && pSpot.sigmoidsenscie == otherSpot.sigmoidsenscie;
locallab.spots.at(j).sigmoidblcie = locallab.spots.at(j).sigmoidblcie && pSpot.sigmoidblcie == otherSpot.sigmoidblcie;
locallab.spots.at(j).comprcie = locallab.spots.at(j).comprcie && pSpot.comprcie == otherSpot.comprcie;
locallab.spots.at(j).strcielog = locallab.spots.at(j).strcielog && pSpot.strcielog == otherSpot.strcielog;
locallab.spots.at(j).comprcieth = locallab.spots.at(j).comprcieth && pSpot.comprcieth == otherSpot.comprcieth;
locallab.spots.at(j).gamjcie = locallab.spots.at(j).gamjcie && pSpot.gamjcie == otherSpot.gamjcie;
locallab.spots.at(j).slopjcie = locallab.spots.at(j).slopjcie && pSpot.slopjcie == otherSpot.slopjcie;
locallab.spots.at(j).slopesmo = locallab.spots.at(j).slopesmo && pSpot.slopesmo == otherSpot.slopesmo;
locallab.spots.at(j).midtcie = locallab.spots.at(j).midtcie && pSpot.midtcie == otherSpot.midtcie;
locallab.spots.at(j).grexl = locallab.spots.at(j).grexl && pSpot.grexl == otherSpot.grexl;
locallab.spots.at(j).greyl = locallab.spots.at(j).greyl && pSpot.greyl == otherSpot.greyl;
locallab.spots.at(j).redxl = locallab.spots.at(j).redxl && pSpot.redxl == otherSpot.redxl;
locallab.spots.at(j).redyl = locallab.spots.at(j).redyl && pSpot.redyl == otherSpot.redyl;
locallab.spots.at(j).bluxl = locallab.spots.at(j).bluxl && pSpot.bluxl == otherSpot.bluxl;
locallab.spots.at(j).bluyl = locallab.spots.at(j).bluyl && pSpot.bluyl == otherSpot.bluyl;
locallab.spots.at(j).refi = locallab.spots.at(j).refi && pSpot.refi == otherSpot.refi;
locallab.spots.at(j).shiftxl = locallab.spots.at(j).shiftxl && pSpot.shiftxl == otherSpot.shiftxl;
locallab.spots.at(j).shiftyl = locallab.spots.at(j).shiftyl && pSpot.shiftyl == otherSpot.shiftyl;
locallab.spots.at(j).labgridcieALow = locallab.spots.at(j).labgridcieALow && pSpot.labgridcieALow == otherSpot.labgridcieALow;
locallab.spots.at(j).labgridcieBLow = locallab.spots.at(j).labgridcieBLow && pSpot.labgridcieBLow == otherSpot.labgridcieBLow;
locallab.spots.at(j).labgridcieAHigh = locallab.spots.at(j).labgridcieAHigh && pSpot.labgridcieAHigh == otherSpot.labgridcieAHigh;
locallab.spots.at(j).labgridcieBHigh = locallab.spots.at(j).labgridcieBHigh && pSpot.labgridcieBHigh == otherSpot.labgridcieBHigh;
locallab.spots.at(j).labgridcieGx = locallab.spots.at(j).labgridcieGx && pSpot.labgridcieGx == otherSpot.labgridcieGx;
locallab.spots.at(j).labgridcieGy = locallab.spots.at(j).labgridcieGy && pSpot.labgridcieGy == otherSpot.labgridcieGy;
locallab.spots.at(j).labgridcieWx = locallab.spots.at(j).labgridcieWx && pSpot.labgridcieWx == otherSpot.labgridcieWx;
locallab.spots.at(j).labgridcieWy = locallab.spots.at(j).labgridcieWy && pSpot.labgridcieWy == otherSpot.labgridcieWy;
locallab.spots.at(j).labgridcieMx = locallab.spots.at(j).labgridcieMx && pSpot.labgridcieMx == otherSpot.labgridcieMx;
locallab.spots.at(j).labgridcieMy = locallab.spots.at(j).labgridcieMy && pSpot.labgridcieMy == otherSpot.labgridcieMy;
locallab.spots.at(j).whitescie = locallab.spots.at(j).whitescie && pSpot.whitescie == otherSpot.whitescie;
locallab.spots.at(j).blackscie = locallab.spots.at(j).blackscie && pSpot.blackscie == otherSpot.blackscie;
locallab.spots.at(j).illMethod = locallab.spots.at(j).illMethod && pSpot.illMethod == otherSpot.illMethod;
locallab.spots.at(j).smoothciemet = locallab.spots.at(j).smoothciemet && pSpot.smoothciemet == otherSpot.smoothciemet;
locallab.spots.at(j).primMethod = locallab.spots.at(j).primMethod && pSpot.primMethod == otherSpot.primMethod;
locallab.spots.at(j).catMethod = locallab.spots.at(j).catMethod && pSpot.catMethod == otherSpot.catMethod;
locallab.spots.at(j).sigmoidldajzcie = locallab.spots.at(j).sigmoidldajzcie && pSpot.sigmoidldajzcie == otherSpot.sigmoidldajzcie;
locallab.spots.at(j).sigmoidthjzcie = locallab.spots.at(j).sigmoidthjzcie && pSpot.sigmoidthjzcie == otherSpot.sigmoidthjzcie;
locallab.spots.at(j).sigmoidbljzcie = locallab.spots.at(j).sigmoidbljzcie && pSpot.sigmoidbljzcie == otherSpot.sigmoidbljzcie;
locallab.spots.at(j).contqcie = locallab.spots.at(j).contqcie && pSpot.contqcie == otherSpot.contqcie;
locallab.spots.at(j).contsigqcie = locallab.spots.at(j).contsigqcie && pSpot.contsigqcie == otherSpot.contsigqcie;
locallab.spots.at(j).colorflcie = locallab.spots.at(j).colorflcie && pSpot.colorflcie == otherSpot.colorflcie;
locallab.spots.at(j).targabscie = locallab.spots.at(j).targabscie && pSpot.targabscie == otherSpot.targabscie;
locallab.spots.at(j).targetGraycie = locallab.spots.at(j).targetGraycie && pSpot.targetGraycie == otherSpot.targetGraycie;
locallab.spots.at(j).catadcie = locallab.spots.at(j).catadcie && pSpot.catadcie == otherSpot.catadcie;
locallab.spots.at(j).detailcie = locallab.spots.at(j).detailcie && pSpot.detailcie == otherSpot.detailcie;
locallab.spots.at(j).surroundcie = locallab.spots.at(j).surroundcie && pSpot.surroundcie == otherSpot.surroundcie;
/*
locallab.spots.at(j).lightlzcam = locallab.spots.at(j).lightlzcam && pSpot.lightlzcam == otherSpot.lightlzcam;
locallab.spots.at(j).lightqzcam = locallab.spots.at(j).lightqzcam && pSpot.lightqzcam == otherSpot.lightqzcam;
locallab.spots.at(j).contlzcam = locallab.spots.at(j).contlzcam && pSpot.contlzcam == otherSpot.contlzcam;
locallab.spots.at(j).contqzcam = locallab.spots.at(j).contqzcam && pSpot.contqzcam == otherSpot.contqzcam;
locallab.spots.at(j).contthreszcam = locallab.spots.at(j).contthreszcam && pSpot.contthreszcam == otherSpot.contthreszcam;
locallab.spots.at(j).colorflzcam = locallab.spots.at(j).colorflzcam && pSpot.colorflzcam == otherSpot.colorflzcam;
locallab.spots.at(j).saturzcam = locallab.spots.at(j).saturzcam && pSpot.saturzcam == otherSpot.saturzcam;
locallab.spots.at(j).chromzcam = locallab.spots.at(j).chromzcam && pSpot.chromzcam == otherSpot.chromzcam;
*/
locallab.spots.at(j).enacieMask = locallab.spots.at(j).enaSHMask && pSpot.enaSHMask == otherSpot.enaSHMask;
locallab.spots.at(j).strgradcie = locallab.spots.at(j).strgradcie && pSpot.strgradcie == otherSpot.strgradcie;
locallab.spots.at(j).anggradcie = locallab.spots.at(j).anggradcie && pSpot.anggradcie == otherSpot.anggradcie;
locallab.spots.at(j).enacieMask = locallab.spots.at(j).enacieMask && pSpot.enacieMask == otherSpot.enacieMask;
locallab.spots.at(j).enacieMaskall = locallab.spots.at(j).enacieMaskall && pSpot.enacieMaskall == otherSpot.enacieMaskall;
locallab.spots.at(j).CCmaskciecurve = locallab.spots.at(j).CCmaskciecurve && pSpot.CCmaskciecurve == otherSpot.CCmaskciecurve;
locallab.spots.at(j).LLmaskciecurve = locallab.spots.at(j).LLmaskciecurve && pSpot.LLmaskciecurve == otherSpot.LLmaskciecurve;
locallab.spots.at(j).HHmaskciecurve = locallab.spots.at(j).HHmaskciecurve && pSpot.HHmaskciecurve == otherSpot.HHmaskciecurve;
locallab.spots.at(j).HHhmaskciecurve = locallab.spots.at(j).HHhmaskciecurve && pSpot.HHhmaskciecurve == otherSpot.HHhmaskciecurve;
locallab.spots.at(j).blendmaskcie = locallab.spots.at(j).blendmaskcie && pSpot.blendmaskcie == otherSpot.blendmaskcie;
locallab.spots.at(j).radmaskcie = locallab.spots.at(j).radmaskcie && pSpot.radmaskcie == otherSpot.radmaskcie;
locallab.spots.at(j).chromaskcie = locallab.spots.at(j).chromaskcie && pSpot.chromaskcie == otherSpot.chromaskcie;
@ -1811,6 +1866,15 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).clarilresjz = locallab.spots.at(j).clarilresjz && pSpot.clarilresjz == otherSpot.clarilresjz;
locallab.spots.at(j).claricresjz = locallab.spots.at(j).claricresjz && pSpot.claricresjz == otherSpot.claricresjz;
locallab.spots.at(j).clarisoftjz = locallab.spots.at(j).clarisoftjz && pSpot.clarisoftjz == otherSpot.clarisoftjz;
locallab.spots.at(j).strumaskcie = locallab.spots.at(j).strumaskcie && pSpot.strumaskcie == otherSpot.strumaskcie;
locallab.spots.at(j).toolcie = locallab.spots.at(j).toolcie && pSpot.toolcie == otherSpot.toolcie;
locallab.spots.at(j).fftcieMask = locallab.spots.at(j).fftcieMask && pSpot.fftcieMask == otherSpot.fftcieMask;
locallab.spots.at(j).blurcie = locallab.spots.at(j).blurcie && pSpot.blurcie == otherSpot.blurcie;
locallab.spots.at(j).contcie = locallab.spots.at(j).contcie && pSpot.contcie == otherSpot.contcie;
locallab.spots.at(j).highmaskcie = locallab.spots.at(j).highmaskcie && pSpot.highmaskcie == otherSpot.highmaskcie;
locallab.spots.at(j).shadmaskcie = locallab.spots.at(j).shadmaskcie && pSpot.shadmaskcie == otherSpot.shadmaskcie;
locallab.spots.at(j).LLmaskciecurvewav = locallab.spots.at(j).LLmaskciecurvewav && pSpot.LLmaskciecurvewav == otherSpot.LLmaskciecurvewav;
locallab.spots.at(j).csthresholdcie = locallab.spots.at(j).csthresholdcie && pSpot.csthresholdcie == otherSpot.csthresholdcie;
}
@ -1890,12 +1954,17 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
icm.outputBPC = icm.outputBPC && p.icm.outputBPC == other.icm.outputBPC ;
icm.workingTRCGamma = icm.workingTRCGamma && p.icm.workingTRCGamma == other.icm.workingTRCGamma;
icm.workingTRCSlope = icm.workingTRCSlope && p.icm.workingTRCSlope == other.icm.workingTRCSlope;
icm.wmidtcie = icm.wmidtcie && p.icm.wmidtcie == other.icm.wmidtcie;
icm.wsmoothcie = icm.wsmoothcie && p.icm.wsmoothcie == other.icm.wsmoothcie;
icm.redx = icm.redx && p.icm.redx == other.icm.redx;
icm.redy = icm.redy && p.icm.redy == other.icm.redy;
icm.grex = icm.grex && p.icm.grex == other.icm.grex;
icm.grey = icm.grey && p.icm.grey == other.icm.grey;
icm.blux = icm.blux && p.icm.blux == other.icm.blux;
icm.bluy = icm.bluy && p.icm.bluy == other.icm.bluy;
icm.refi = icm.refi && p.icm.refi == other.icm.refi;
icm.shiftx = icm.shiftx && p.icm.shiftx == other.icm.shiftx;
icm.shifty = icm.shifty && p.icm.shifty == other.icm.shifty;
icm.labgridcieALow = icm.labgridcieALow && p.icm.labgridcieALow == other.icm.labgridcieALow;
icm.labgridcieBLow = icm.labgridcieBLow && p.icm.labgridcieBLow == other.icm.labgridcieBLow;
icm.labgridcieAHigh = icm.labgridcieAHigh && p.icm.labgridcieAHigh == other.icm.labgridcieAHigh;
@ -1904,13 +1973,17 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
icm.labgridcieGy = icm.labgridcieGy && p.icm.labgridcieGy == other.icm.labgridcieGy;
icm.labgridcieWx = icm.labgridcieWx && p.icm.labgridcieWx == other.icm.labgridcieWx;
icm.labgridcieWy = icm.labgridcieWy && p.icm.labgridcieWy == other.icm.labgridcieWy;
icm.labgridcieMx = icm.labgridcieMx && p.icm.labgridcieMx == other.icm.labgridcieMx;
icm.labgridcieMy = icm.labgridcieMy && p.icm.labgridcieMy == other.icm.labgridcieMy;
icm.preser = icm.preser && p.icm.preser == other.icm.preser;
icm.fbw = icm.fbw && p.icm.fbw == other.icm.fbw;
icm.trcExp = icm.trcExp && p.icm.trcExp == other.icm.trcExp;
icm.gamut = icm.gamut && p.icm.gamut == other.icm.gamut;
icm.aRendIntent = icm.aRendIntent && p.icm.aRendIntent == other.icm.aRendIntent;
icm.workingTRC = icm.workingTRC && p.icm.workingTRC == other.icm.workingTRC;
icm.will = icm.will && p.icm.will == other.icm.will;
icm.wprim = icm.wprim && p.icm.wprim == other.icm.wprim;
icm.wcat = icm.wcat && p.icm.wcat == other.icm.wcat;
raw.bayersensor.method = raw.bayersensor.method && p.raw.bayersensor.method == other.raw.bayersensor.method;
raw.bayersensor.border = raw.bayersensor.border && p.raw.bayersensor.border == other.raw.bayersensor.border;
raw.bayersensor.imageNum = raw.bayersensor.imageNum && p.raw.bayersensor.imageNum == other.raw.bayersensor.imageNum;
@ -4155,7 +4228,7 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).shMethod = mods.locallab.spots.at(i).shMethod;
}
for (int j = 0; j < 5; j++) {
for (int j = 0; j < 6; j++) {
if (locallab.spots.at(i).multsh[j]) {
toEdit.locallab.spots.at(i).multsh[j] = mods.locallab.spots.at(i).multsh[j];
}
@ -5606,6 +5679,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).ciecam = mods.locallab.spots.at(i).ciecam;
}
if (locallab.spots.at(i).satlog) {
toEdit.locallab.spots.at(i).satlog = mods.locallab.spots.at(i).satlog;
}
if (locallab.spots.at(i).enaLMask) {
toEdit.locallab.spots.at(i).enaLMask = mods.locallab.spots.at(i).enaLMask;
}
@ -5622,6 +5699,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).whiteEv = mods.locallab.spots.at(i).whiteEv;
}
if (locallab.spots.at(i).whiteslog) {
toEdit.locallab.spots.at(i).whiteslog = mods.locallab.spots.at(i).whiteslog;
}
if (locallab.spots.at(i).blackslog) {
toEdit.locallab.spots.at(i).blackslog = mods.locallab.spots.at(i).blackslog;
}
if (locallab.spots.at(i).comprlog) {
toEdit.locallab.spots.at(i).comprlog = mods.locallab.spots.at(i).comprlog;
}
if (locallab.spots.at(i).strelog) {
toEdit.locallab.spots.at(i).strelog = mods.locallab.spots.at(i).strelog;
}
if (locallab.spots.at(i).detail) {
toEdit.locallab.spots.at(i).detail = mods.locallab.spots.at(i).detail;
}
@ -5816,6 +5909,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).expcie = mods.locallab.spots.at(i).expcie;
}
if (locallab.spots.at(i).expprecam) {
toEdit.locallab.spots.at(i).expprecam = mods.locallab.spots.at(i).expprecam;
}
if (locallab.spots.at(i).complexcie) {
toEdit.locallab.spots.at(i).complexcie = mods.locallab.spots.at(i).complexcie;
}
@ -5848,14 +5945,39 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).jabcie = mods.locallab.spots.at(i).jabcie;
}
if (locallab.spots.at(i).sigmoidqjcie) {
toEdit.locallab.spots.at(i).sigmoidqjcie = mods.locallab.spots.at(i).sigmoidqjcie;
if (locallab.spots.at(i).comprcieauto) {
toEdit.locallab.spots.at(i).comprcieauto = mods.locallab.spots.at(i).comprcieauto;
}
if (locallab.spots.at(i).normcie) {
toEdit.locallab.spots.at(i).normcie = mods.locallab.spots.at(i).normcie;
}
if (locallab.spots.at(i).gamutcie) {
toEdit.locallab.spots.at(i).gamutcie = mods.locallab.spots.at(i).gamutcie;
}
if (locallab.spots.at(i).sigcie) {
toEdit.locallab.spots.at(i).sigcie = mods.locallab.spots.at(i).sigcie;
}
if (locallab.spots.at(i).logcie) {
toEdit.locallab.spots.at(i).logcie = mods.locallab.spots.at(i).logcie;
}
if (locallab.spots.at(i).satcie) {
toEdit.locallab.spots.at(i).satcie = mods.locallab.spots.at(i).satcie;
}
if (locallab.spots.at(i).logcieq) {
toEdit.locallab.spots.at(i).logcieq = mods.locallab.spots.at(i).logcieq;
}
if (locallab.spots.at(i).smoothcie) {
toEdit.locallab.spots.at(i).smoothcie = mods.locallab.spots.at(i).smoothcie;
}
if (locallab.spots.at(i).logjz) {
toEdit.locallab.spots.at(i).logjz = mods.locallab.spots.at(i).logjz;
}
@ -5888,6 +6010,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).modecam = mods.locallab.spots.at(i).modecam;
}
if (locallab.spots.at(i).bwevMethod) {
toEdit.locallab.spots.at(i).bwevMethod = mods.locallab.spots.at(i).bwevMethod;
}
if (locallab.spots.at(i).modecie) {
toEdit.locallab.spots.at(i).modecie = mods.locallab.spots.at(i).modecie;
}
@ -5980,6 +6106,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).lightqcie = mods.locallab.spots.at(i).lightqcie;
}
if (locallab.spots.at(i).lightsigqcie) {
toEdit.locallab.spots.at(i).lightsigqcie = mods.locallab.spots.at(i).lightsigqcie;
}
if (locallab.spots.at(i).contlcie) {
toEdit.locallab.spots.at(i).contlcie = mods.locallab.spots.at(i).contlcie;
}
@ -5988,6 +6118,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).contjzcie = mods.locallab.spots.at(i).contjzcie;
}
if (locallab.spots.at(i).detailciejz) {
toEdit.locallab.spots.at(i).detailciejz = mods.locallab.spots.at(i).detailciejz;
}
if (locallab.spots.at(i).adapjzcie) {
toEdit.locallab.spots.at(i).adapjzcie = mods.locallab.spots.at(i).adapjzcie;
}
@ -6048,10 +6182,142 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).sigmoidthcie = mods.locallab.spots.at(i).sigmoidthcie;
}
if (locallab.spots.at(i).sigmoidsenscie) {
toEdit.locallab.spots.at(i).sigmoidsenscie = mods.locallab.spots.at(i).sigmoidsenscie;
}
if (locallab.spots.at(i).sigmoidblcie) {
toEdit.locallab.spots.at(i).sigmoidblcie = mods.locallab.spots.at(i).sigmoidblcie;
}
if (locallab.spots.at(i).comprcie) {
toEdit.locallab.spots.at(i).comprcie = mods.locallab.spots.at(i).comprcie;
}
if (locallab.spots.at(i).strcielog) {
toEdit.locallab.spots.at(i).strcielog = mods.locallab.spots.at(i).strcielog;
}
if (locallab.spots.at(i).comprcieth) {
toEdit.locallab.spots.at(i).comprcieth = mods.locallab.spots.at(i).comprcieth;
}
if (locallab.spots.at(i).gamjcie) {
toEdit.locallab.spots.at(i).gamjcie = mods.locallab.spots.at(i).gamjcie;
}
if (locallab.spots.at(i).slopjcie) {
toEdit.locallab.spots.at(i).slopjcie = mods.locallab.spots.at(i).slopjcie;
}
if (locallab.spots.at(i).slopesmo) {
toEdit.locallab.spots.at(i).slopesmo = mods.locallab.spots.at(i).slopesmo;
}
if (locallab.spots.at(i).midtcie) {
toEdit.locallab.spots.at(i).midtcie = mods.locallab.spots.at(i).midtcie;
}
if (locallab.spots.at(i).grexl) {
toEdit.locallab.spots.at(i).grexl = mods.locallab.spots.at(i).grexl;
}
if (locallab.spots.at(i).greyl) {
toEdit.locallab.spots.at(i).greyl = mods.locallab.spots.at(i).greyl;
}
if (locallab.spots.at(i).redxl) {
toEdit.locallab.spots.at(i).redxl = mods.locallab.spots.at(i).redxl;
}
if (locallab.spots.at(i).redyl) {
toEdit.locallab.spots.at(i).redyl = mods.locallab.spots.at(i).redyl;
}
if (locallab.spots.at(i).bluxl) {
toEdit.locallab.spots.at(i).bluxl = mods.locallab.spots.at(i).bluxl;
}
if (locallab.spots.at(i).bluyl) {
toEdit.locallab.spots.at(i).bluyl = mods.locallab.spots.at(i).bluyl;
}
if (locallab.spots.at(i).refi) {
toEdit.locallab.spots.at(i).refi = mods.locallab.spots.at(i).refi;
}
if (locallab.spots.at(i).shiftxl) {
toEdit.locallab.spots.at(i).shiftxl = mods.locallab.spots.at(i).shiftxl;
}
if (locallab.spots.at(i).shiftyl) {
toEdit.locallab.spots.at(i).shiftyl = mods.locallab.spots.at(i).shiftyl;
}
if (locallab.spots.at(i).labgridcieALow) {
toEdit.locallab.spots.at(i).labgridcieALow = mods.locallab.spots.at(i).labgridcieALow;
}
if (locallab.spots.at(i).labgridcieBLow) {
toEdit.locallab.spots.at(i).labgridcieBLow = mods.locallab.spots.at(i).labgridcieBLow;
}
if (locallab.spots.at(i).labgridcieAHigh) {
toEdit.locallab.spots.at(i).labgridcieAHigh = mods.locallab.spots.at(i).labgridcieAHigh;
}
if (locallab.spots.at(i).labgridcieBHigh) {
toEdit.locallab.spots.at(i).labgridcieBHigh = mods.locallab.spots.at(i).labgridcieBHigh;
}
if (locallab.spots.at(i).labgridcieGx) {
toEdit.locallab.spots.at(i).labgridcieGx = mods.locallab.spots.at(i).labgridcieGx;
}
if (locallab.spots.at(i).labgridcieGy) {
toEdit.locallab.spots.at(i).labgridcieGy = mods.locallab.spots.at(i).labgridcieGy;
}
if (locallab.spots.at(i).labgridcieWx) {
toEdit.locallab.spots.at(i).labgridcieWx = mods.locallab.spots.at(i).labgridcieWx;
}
if (locallab.spots.at(i).labgridcieWy) {
toEdit.locallab.spots.at(i).labgridcieWy = mods.locallab.spots.at(i).labgridcieWy;
}
if (locallab.spots.at(i).labgridcieMx) {
toEdit.locallab.spots.at(i).labgridcieMx = mods.locallab.spots.at(i).labgridcieMx;
}
if (locallab.spots.at(i).labgridcieMy) {
toEdit.locallab.spots.at(i).labgridcieMy = mods.locallab.spots.at(i).labgridcieMy;
}
if (locallab.spots.at(i).whitescie) {
toEdit.locallab.spots.at(i).whitescie = mods.locallab.spots.at(i).whitescie;
}
if (locallab.spots.at(i).blackscie) {
toEdit.locallab.spots.at(i).blackscie = mods.locallab.spots.at(i).blackscie;
}
if (locallab.spots.at(i).illMethod) {
toEdit.locallab.spots.at(i).illMethod = mods.locallab.spots.at(i).illMethod;
}
if (locallab.spots.at(i).smoothciemet) {
toEdit.locallab.spots.at(i).smoothciemet = mods.locallab.spots.at(i).smoothciemet;
}
if (locallab.spots.at(i).primMethod) {
toEdit.locallab.spots.at(i).primMethod = mods.locallab.spots.at(i).primMethod;
}
if (locallab.spots.at(i).catMethod) {
toEdit.locallab.spots.at(i).catMethod = mods.locallab.spots.at(i).catMethod;
}
if (locallab.spots.at(i).sigmoidldajzcie) {
toEdit.locallab.spots.at(i).sigmoidldajzcie = mods.locallab.spots.at(i).sigmoidldajzcie;
}
@ -6069,42 +6335,13 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).contqcie = mods.locallab.spots.at(i).contqcie;
}
if (locallab.spots.at(i).contsigqcie) {
toEdit.locallab.spots.at(i).contsigqcie = mods.locallab.spots.at(i).contsigqcie;
}
if (locallab.spots.at(i).colorflcie) {
toEdit.locallab.spots.at(i).colorflcie = mods.locallab.spots.at(i).colorflcie;
}
/*
if (locallab.spots.at(i).lightlzcam) {
toEdit.locallab.spots.at(i).lightlzcam = mods.locallab.spots.at(i).lightlzcam;
}
if (locallab.spots.at(i).lightqzcam) {
toEdit.locallab.spots.at(i).lightqzcam = mods.locallab.spots.at(i).lightqzcam;
}
if (locallab.spots.at(i).contlzcam) {
toEdit.locallab.spots.at(i).contlzcam = mods.locallab.spots.at(i).contlzcam;
}
if (locallab.spots.at(i).contqzcam) {
toEdit.locallab.spots.at(i).contqzcam = mods.locallab.spots.at(i).contqzcam;
}
if (locallab.spots.at(i).contthreszcam) {
toEdit.locallab.spots.at(i).contthreszcam = mods.locallab.spots.at(i).contthreszcam;
}
if (locallab.spots.at(i).colorflzcam) {
toEdit.locallab.spots.at(i).colorflzcam = mods.locallab.spots.at(i).colorflzcam;
}
if (locallab.spots.at(i).saturzcam) {
toEdit.locallab.spots.at(i).saturzcam = mods.locallab.spots.at(i).saturzcam;
}
if (locallab.spots.at(i).chromzcam) {
toEdit.locallab.spots.at(i).chromzcam = mods.locallab.spots.at(i).chromzcam;
}
*/
if (locallab.spots.at(i).targabscie) {
toEdit.locallab.spots.at(i).targabscie = mods.locallab.spots.at(i).targabscie;
}
@ -6149,10 +6386,22 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).surroundcie = mods.locallab.spots.at(i).surroundcie;
}
if (locallab.spots.at(i).strgradcie) {
toEdit.locallab.spots.at(i).strgradcie = mods.locallab.spots.at(i).strgradcie;
}
if (locallab.spots.at(i).anggradcie) {
toEdit.locallab.spots.at(i).anggradcie = mods.locallab.spots.at(i).anggradcie;
}
if (locallab.spots.at(i).enacieMask) {
toEdit.locallab.spots.at(i).enacieMask = mods.locallab.spots.at(i).enacieMask;
}
if (locallab.spots.at(i).enacieMaskall) {
toEdit.locallab.spots.at(i).enacieMaskall = mods.locallab.spots.at(i).enacieMaskall;
}
if (locallab.spots.at(i).CCmaskciecurve) {
toEdit.locallab.spots.at(i).CCmaskciecurve = mods.locallab.spots.at(i).CCmaskciecurve;
}
@ -6165,6 +6414,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).HHmaskciecurve = mods.locallab.spots.at(i).HHmaskciecurve;
}
if (locallab.spots.at(i).HHhmaskciecurve) {
toEdit.locallab.spots.at(i).HHhmaskciecurve = mods.locallab.spots.at(i).HHhmaskciecurve;
}
if (locallab.spots.at(i).blendmaskcie) {
toEdit.locallab.spots.at(i).blendmaskcie = mods.locallab.spots.at(i).blendmaskcie;
}
@ -6209,6 +6462,42 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).decaycie = mods.locallab.spots.at(i).decaycie;
}
if (locallab.spots.at(i).strumaskcie) {
toEdit.locallab.spots.at(i).strumaskcie= mods.locallab.spots.at(i).strumaskcie;
}
if (locallab.spots.at(i).toolcie) {
toEdit.locallab.spots.at(i).toolcie = mods.locallab.spots.at(i).toolcie;
}
if (locallab.spots.at(i).fftcieMask) {
toEdit.locallab.spots.at(i).fftcieMask = mods.locallab.spots.at(i).fftcieMask;
}
if (locallab.spots.at(i).blurcie) {
toEdit.locallab.spots.at(i).blurcie = mods.locallab.spots.at(i).blurcie;
}
if (locallab.spots.at(i).contcie) {
toEdit.locallab.spots.at(i).contcie = mods.locallab.spots.at(i).contcie;
}
if (locallab.spots.at(i).highmaskcie) {
toEdit.locallab.spots.at(i).highmaskcie = mods.locallab.spots.at(i).highmaskcie;
}
if (locallab.spots.at(i).shadmaskcie) {
toEdit.locallab.spots.at(i).shadmaskcie = mods.locallab.spots.at(i).shadmaskcie;
}
if (locallab.spots.at(i).LLmaskciecurvewav) {
toEdit.locallab.spots.at(i).LLmaskciecurvewav = mods.locallab.spots.at(i).LLmaskciecurvewav;
}
if (locallab.spots.at(i).csthresholdcie) {
toEdit.locallab.spots.at(i).csthresholdcie = mods.locallab.spots.at(i).csthresholdcie;
}
}
if (spot.enabled) {
@ -6461,6 +6750,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.icm.workingTRCSlope = mods.icm.workingTRCSlope;
}
if (icm.wmidtcie) {
toEdit.icm.wmidtcie = mods.icm.wmidtcie;
}
if (icm.wsmoothcie) {
toEdit.icm.wsmoothcie = mods.icm.wsmoothcie;
}
if (icm.redx) {
toEdit.icm.redx = mods.icm.redx;
}
@ -6485,6 +6782,18 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.icm.bluy = mods.icm.bluy;
}
if (icm.refi) {
toEdit.icm.refi = mods.icm.refi;
}
if (icm.shiftx) {
toEdit.icm.shiftx = mods.icm.shiftx;
}
if (icm.shifty) {
toEdit.icm.shifty = mods.icm.shifty;
}
if (icm.preser) {
toEdit.icm.preser = mods.icm.preser;
}
@ -6493,6 +6802,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.icm.fbw = mods.icm.fbw;
}
if (icm.trcExp) {
toEdit.icm.trcExp = mods.icm.trcExp;
}
if (icm.gamut) {
toEdit.icm.gamut = mods.icm.gamut;
}
@ -6529,6 +6842,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.icm.labgridcieWy = mods.icm.labgridcieWy;
}
if (icm.labgridcieMx) {
toEdit.icm.labgridcieMx = mods.icm.labgridcieMx;
}
if (icm.labgridcieMy) {
toEdit.icm.labgridcieMy = mods.icm.labgridcieMy;
}
if (icm.aRendIntent) {
toEdit.icm.aRendIntent = mods.icm.aRendIntent;
}
@ -6545,6 +6866,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.icm.wprim = mods.icm.wprim;
}
if (icm.wcat) {
toEdit.icm.wcat = mods.icm.wcat;
}
if (raw.bayersensor.method) {
toEdit.raw.bayersensor.method = mods.raw.bayersensor.method;
}
@ -7685,7 +8010,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
expshadhigh(v),
complexshadhigh(v),
shMethod(v),
multsh{v, v, v, v, v, v},
multsh{v, v, v, v, v, v, v},
highlights(v),
h_tonalwidth(v),
shadows(v),
@ -8054,8 +8379,13 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
fullimage(v),
repar(v),
ciecam(v),
satlog(v),
blackEv(v),
whiteEv(v),
whiteslog(v),
blackslog(v),
comprlog(v),
strelog(v),
detail(v),
sursour(v),
surround(v),
@ -8108,6 +8438,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
visicie(v),
complexcie(v),
expcie(v),
expprecam(v),
reparcie(v),
sensicie(v),
Autograycie(v),
@ -8115,8 +8446,14 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
forcebw(v),
qtoj(v),
jabcie(v),
sigmoidqjcie(v),
comprcieauto(v),
normcie(v),
gamutcie(v),
sigcie(v),
logcie(v),
satcie(v),
logcieq(v),
smoothcie(v),
logjz(v),
sigjz(v),
sigq(v),
@ -8125,6 +8462,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
sourceabscie(v),
sursourcie(v),
modecam(v),
bwevMethod(v),
modecie(v),
saturlcie(v),
rstprotectcie(v),
@ -8149,8 +8487,10 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
lightlcie(v),
lightjzcie(v),
lightqcie(v),
lightsigqcie(v),
contlcie(v),
contjzcie(v),
detailciejz(v),
adapjzcie(v),
jz100(v),
pqremap(v),
@ -8166,31 +8506,59 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
targetjz(v),
sigmoidldacie(v),
sigmoidthcie(v),
sigmoidsenscie(v),
sigmoidblcie(v),
comprcie(v),
strcielog(v),
comprcieth(v),
gamjcie(v),
slopjcie(v),
slopesmo(v),
midtcie(v),
redxl(v),
redyl(v),
grexl(v),
greyl(v),
bluxl(v),
bluyl(v),
refi(v),
shiftxl(v),
shiftyl(v),
labgridcieALow(v),
labgridcieBLow(v),
labgridcieAHigh(v),
labgridcieBHigh(v),
labgridcieGx(v),
labgridcieGy(v),
labgridcieWx(v),
labgridcieWy(v),
labgridcieMx(v),
labgridcieMy(v),
whitescie(v),
blackscie(v),
illMethod(v),
smoothciemet(v),
primMethod(v),
catMethod(v),
sigmoidldajzcie(v),
sigmoidthjzcie(v),
sigmoidbljzcie(v),
contqcie(v),
contsigqcie(v),
colorflcie(v),
/*
lightlzcam(v),
lightqzcam(v),
contlzcam(v),
contqzcam(v),
contthreszcam(v),
colorflzcam(v),
saturzcam(v),
chromzcam(v),
*/
targabscie(v),
targetGraycie(v),
catadcie(v),
detailcie(v),
surroundcie(v),
strgradcie(v),
anggradcie(v),
enacieMask(v),
enacieMaskall(v),
CCmaskciecurve(v),
LLmaskciecurve(v),
HHmaskciecurve(v),
HHhmaskciecurve(v),
blendmaskcie(v),
radmaskcie(v),
sigmalcjz(v),
@ -8207,8 +8575,17 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
recothrescie(v),
lowthrescie(v),
higthrescie(v),
decaycie(v)
decaycie(v),
strumaskcie(v),
toolcie(v),
fftcieMask(v),
contcie(v),
blurcie(v),
highmaskcie(v),
shadmaskcie(v),
LLmaskciecurvewav(v),
csthresholdcie(v)
{
}
@ -8380,7 +8757,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
complexshadhigh = v;
shMethod = v;
for (int i = 0; i < 5; i++) {
for (int i = 0; i < 6; i++) {
multsh[i] = v;
}
@ -8755,8 +9132,13 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
fullimage = v;
repar = v;
ciecam = v;
satlog = v;
blackEv = v;
whiteEv = v;
whiteslog = v;
blackslog = v;
comprlog = v;
strelog = v;
detail = v;
sursour = v;
surround = v;
@ -8809,6 +9191,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
visicie= v;
complexcie= v;
expcie = v;
expprecam = v;
reparcie = v;
sensicie = v;
Autograycie = v;
@ -8816,8 +9199,14 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
forcebw = v;
qtoj = v;
jabcie = v;
sigmoidqjcie = v;
comprcieauto = v;
normcie = v;
gamutcie = v;
sigcie = v;
logcie = v;
satcie = v;
logcieq = v;
smoothcie = v;
logjz = v;
sigjz = v;
sigq = v;
@ -8826,6 +9215,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
sourceabscie = v;
sursourcie = v;
modecam = v;
bwevMethod = v;
modecie = v;
saturlcie = v;
rstprotectcie = v;
@ -8850,8 +9240,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
lightlcie = v;
lightjzcie = v;
lightqcie = v;
lightsigqcie = v;
contlcie = v;
contjzcie = v;
detailciejz = v;
adapjzcie = v;
jz100 = v;
pqremap = v;
@ -8867,31 +9259,59 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
targetjz = v;
sigmoidldacie = v;
sigmoidthcie = v;
sigmoidsenscie = v;
sigmoidblcie = v;
comprcie = v;
strcielog = v;
comprcieth = v;
gamjcie = v;
slopjcie = v;
slopesmo = v;
midtcie = v;
redxl = v;
redyl = v;
grexl = v;
greyl = v;
bluxl = v;
bluyl = v;
refi = v;
shiftxl = v;
shiftyl = v;
labgridcieALow = v;
labgridcieBLow = v;
labgridcieAHigh= v;
labgridcieBHigh = v;
labgridcieGx = v;
labgridcieGy = v;
labgridcieWx = v;
labgridcieWy = v;
labgridcieMx = v;
labgridcieMy = v;
whitescie = v;
blackscie = v;
illMethod = v;
smoothciemet = v;
primMethod = v;
catMethod = v;
sigmoidldajzcie = v;
sigmoidthjzcie = v;
sigmoidbljzcie = v;
contqcie = v;
contsigqcie = v;
colorflcie = v;
/*
lightlzcam = v;
lightqzcam = v;
contlzcam = v;
contqzcam = v;
contthreszcam = v;
colorflzcam = v;
saturzcam = v;
chromzcam = v;
*/
targabscie = v;
targetGraycie = v;
catadcie = v;
detailcie = v;
surroundcie = v;
anggradcie = v;
strgradcie = v;
enacieMask = v;
enacieMaskall = v;
CCmaskciecurve = v;
LLmaskciecurve = v;
HHmaskciecurve = v;
HHhmaskciecurve = v;
blendmaskcie = v;
radmaskcie = v;
sigmalcjz = v;
@ -8909,6 +9329,15 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
lowthrescie = v;
higthrescie = v;
decaycie = v;
strumaskcie = v;
toolcie = v;
fftcieMask = v;
contcie = v;
blurcie = v;
highmaskcie = v;
shadmaskcie = v;
LLmaskciecurvewav = v;
csthresholdcie = v;
}

View File

@ -577,7 +577,7 @@ public:
bool expshadhigh;
bool complexshadhigh;
bool shMethod;
bool multsh[6];
bool multsh[7];
bool highlights;
bool h_tonalwidth;
bool shadows;
@ -946,8 +946,13 @@ public:
bool fullimage;
bool repar;
bool ciecam;
bool satlog;
bool blackEv;
bool whiteEv;
bool whiteslog;
bool blackslog;
bool comprlog;
bool strelog;
bool detail;
bool sursour;
bool surround;
@ -1000,6 +1005,7 @@ public:
bool visicie;
bool complexcie;
bool expcie;
bool expprecam;
bool reparcie;
bool sensicie;
bool Autograycie;
@ -1007,8 +1013,14 @@ public:
bool forcebw;
bool qtoj;
bool jabcie;
bool sigmoidqjcie;
bool comprcieauto;
bool normcie;
bool gamutcie;
bool sigcie;
bool logcie;
bool satcie;
bool logcieq;
bool smoothcie;
bool logjz;
bool sigjz;
bool sigq;
@ -1017,6 +1029,7 @@ public:
bool sourceabscie;
bool sursourcie;
bool modecam;
bool bwevMethod;
bool modecie;
bool saturlcie;
bool rstprotectcie;
@ -1041,8 +1054,10 @@ public:
bool lightlcie;
bool lightjzcie;
bool lightqcie;
bool lightsigqcie;
bool contlcie;
bool contjzcie;
bool detailciejz;
bool adapjzcie;
bool jz100;
bool pqremap;
@ -1058,31 +1073,61 @@ public:
bool targetjz;
bool sigmoidldacie;
bool sigmoidthcie;
bool sigmoidsenscie;
bool sigmoidblcie;
bool comprcie;
bool strcielog;
bool comprcieth;
bool gamjcie;
bool slopjcie;
bool slopesmo;
bool midtcie;
bool redxl;
bool redyl;
bool grexl;
bool greyl;
bool bluxl;
bool bluyl;
bool refi;
bool shiftxl;
bool shiftyl;
bool labgridcieALow;
bool labgridcieBLow;
bool labgridcieAHigh;
bool labgridcieBHigh;
bool labgridcieGx;
bool labgridcieGy;
bool labgridcieWx;
bool labgridcieWy;
bool labgridcieMx;
bool labgridcieMy;
bool whitescie;
bool blackscie;
bool illMethod;
bool smoothciemet;
bool primMethod;
bool catMethod;
bool sigmoidldajzcie;
bool sigmoidthjzcie;
bool sigmoidbljzcie;
bool contqcie;
bool contsigqcie;
bool colorflcie;
/*
bool lightlzcam;
bool lightqzcam;
bool contlzcam;
bool contqzcam;
bool contthreszcam;
bool colorflzcam;
bool saturzcam;
bool chromzcam;
*/
bool targabscie;
bool targetGraycie;
bool catadcie;
bool detailcie;
bool surroundcie;
bool strgradcie;
bool anggradcie;
bool enacieMask;
bool enacieMaskall;
bool CCmaskciecurve;
bool LLmaskciecurve;
bool HHmaskciecurve;
bool HHhmaskciecurve;
bool blendmaskcie;
bool radmaskcie;
bool sigmalcjz;
@ -1100,7 +1145,16 @@ public:
bool lowthrescie;
bool higthrescie;
bool decaycie;
bool strumaskcie;
bool toolcie;
bool fftcieMask;
bool contcie;
bool blurcie;
bool highmaskcie;
bool shadmaskcie;
bool LLmaskciecurvewav;
bool csthresholdcie;
LocallabSpotEdited(bool v);
void set(bool v);
@ -1242,16 +1296,23 @@ struct ColorManagementParamsEdited {
bool workingTRC;
bool workingTRCGamma;
bool workingTRCSlope;
bool wmidtcie;
bool wsmoothcie;
bool will;
bool wprim;
bool wcat;
bool redx;
bool redy;
bool grex;
bool grey;
bool blux;
bool bluy;
bool refi;
bool shiftx;
bool shifty;
bool preser;
bool fbw;
bool trcExp;
bool gamut;
bool labgridcieALow;
bool labgridcieBLow;
@ -1261,6 +1322,8 @@ struct ColorManagementParamsEdited {
bool labgridcieGy;
bool labgridcieWx;
bool labgridcieWy;
bool labgridcieMx;
bool labgridcieMy;
bool aRendIntent;
bool outputProfile;
bool outputIntent;

View File

@ -1749,7 +1749,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
strend->setValue(pp->wavelet.strend);
detend->setValue(pp->wavelet.detend);
thrend->setValue(pp->wavelet.thrend);
labgrid->setParams(pp->wavelet.labgridALow / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridBLow / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridAHigh / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridBHigh / WaveletParams::LABGRID_CORR_MAX, 0, 0, 0, 0, false);
labgrid->setParams(pp->wavelet.labgridALow / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridBLow / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridAHigh / WaveletParams::LABGRID_CORR_MAX, pp->wavelet.labgridBHigh / WaveletParams::LABGRID_CORR_MAX, 0, 0, 0, 0, 0, 0, false);
sigm->setValue(pp->wavelet.sigm);
levden->setValue(pp->wavelet.levden);
@ -2212,7 +2212,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
pp->wavelet.chromco = chromco->getValue();
double zerox = 0.;
double zeroy = 0.;
labgrid->getParams(pp->wavelet.labgridALow, pp->wavelet.labgridBLow, pp->wavelet.labgridAHigh, pp->wavelet.labgridBHigh, zerox, zeroy, zerox, zeroy);
labgrid->getParams(pp->wavelet.labgridALow, pp->wavelet.labgridBLow, pp->wavelet.labgridAHigh, pp->wavelet.labgridBHigh, zerox, zeroy, zerox, zeroy, zerox, zeroy);
pp->wavelet.labgridALow *= WaveletParams::LABGRID_CORR_MAX;
pp->wavelet.labgridAHigh *= WaveletParams::LABGRID_CORR_MAX;
pp->wavelet.labgridBLow *= WaveletParams::LABGRID_CORR_MAX;
@ -2672,7 +2672,7 @@ void Wavelet::setDefaults(const ProcParams* defParams, const ParamsEdited* pedit
balchrom->setDefault(defParams->wavelet.balchrom);
chromfi->setDefault(defParams->wavelet.chromfi);
chromco->setDefault(defParams->wavelet.chromco);
labgrid->setDefault(defParams->wavelet.labgridALow / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridBLow / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridAHigh / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridBHigh / WaveletParams::LABGRID_CORR_MAX, 0, 0, 0, 0);
labgrid->setDefault(defParams->wavelet.labgridALow / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridBLow / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridAHigh / WaveletParams::LABGRID_CORR_MAX, defParams->wavelet.labgridBHigh / WaveletParams::LABGRID_CORR_MAX, 0, 0, 0, 0, 0, 0);
greenlow->setDefault(defParams->wavelet.greenlow);
bluelow->setDefault(defParams->wavelet.bluelow);