Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract Profile - Contrast enhancement -- Selective Editing Cam16 and JzCzHz - improvments #7111

Merged
merged 192 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
192 commits
Select commit Hold shift + click to select a range
b75a2bf
Init levels trc GUI
Desmis May 31, 2024
abfd78a
Levels TRC
Desmis Jun 1, 2024
01ffb68
Complete with gamma based attenuation
Desmis Jun 2, 2024
cd0a5e4
Merge sith dev
Desmis Jun 2, 2024
649dc41
Limit RGB channel Slope with checkbox
Desmis Jun 2, 2024
100f58d
Improve GUI and code channel TRC
Desmis Jun 2, 2024
b067b4f
Change default values - compexity levels RGB channels
Desmis Jun 3, 2024
e530b42
Relative gamma mode RGB channel TRC
Desmis Jun 3, 2024
54cf9a1
Change label and ponderation rolloff
Desmis Jun 3, 2024
ddba528
Change rolloff level
Desmis Jun 3, 2024
a9a7ba1
Threshold attenuation
Desmis Jun 4, 2024
fe8fabb
Threshold attenuation 2 part
Desmis Jun 4, 2024
4537703
GUI Link R G B
Desmis Jun 5, 2024
752d547
Linked RGB with Green slope - RGB channels
Desmis Jun 5, 2024
bc98fd9
Set Freeman TM functions with ImProcFunctions
Desmis Jun 5, 2024
8057dea
First GUI Abstract profile highlight attenuation
Desmis Jun 5, 2024
b647e96
GUI AP part 2
Desmis Jun 5, 2024
a3a7ec3
Restore olg GUI AP
Desmis Jun 7, 2024
415f3c1
Expander AP primaries adn illuminant
Desmis Jun 8, 2024
21d7536
Disable RGB channel TRC
Desmis Jun 8, 2024
3fdad23
Expander contrast AP
Desmis Jun 8, 2024
6741622
Slider attenuation response
Desmis Jun 8, 2024
64a5d63
Save work GUI local contrast
Desmis Jun 8, 2024
1521236
Save GUI part 2 AP curve
Desmis Jun 8, 2024
a455e44
Local contrast GUI Abstract Profile
Desmis Jun 10, 2024
21408fe
Move Abstract profile in toolpanel and ICMpanel
Desmis Jun 10, 2024
500200b
rtengine variable contrast
Desmis Jun 11, 2024
d1a8f4b
Variable contrast 2
Desmis Jun 11, 2024
99c1f87
Variable contrast engine 3
Desmis Jun 11, 2024
18d9d84
Variable contrast engine 4
Desmis Jun 11, 2024
d86131f
Variable contrast engine
Desmis Jun 11, 2024
8fc082b
Detail levels pyramid
Desmis Jun 12, 2024
e667f8c
Engine residual contrast
Desmis Jun 12, 2024
d33566d
Residual contrast
Desmis Jun 12, 2024
ac98302
Change settings detail levels
Desmis Jun 13, 2024
f860acd
Expander refinement - new tooltips - low resid contrast
Desmis Jun 13, 2024
ca425b7
Change contrast profile and labels
Desmis Jun 13, 2024
06ee852
Remove warning message GUI Gtk
Desmis Jun 13, 2024
c02e09f
Gamutcontrol code - disabled
Desmis Jun 14, 2024
a89b574
Improve with calceffect
Desmis Jun 15, 2024
45140ad
Other improvement variable contrast
Desmis Jun 15, 2024
3e13385
Merge with dev
Desmis Jun 16, 2024
5d40446
Offset variable contrast
Desmis Jun 16, 2024
8cc132d
Range offset - comment code
Desmis Jun 16, 2024
9aee67c
Parametric inva fot lut
Desmis Jun 16, 2024
9737f9d
Clean cmakelist.txt
Desmis Jun 16, 2024
4e14e27
Change contrast profiles
Desmis Jun 17, 2024
09293f1
Comment code ipwavelet
Desmis Jun 17, 2024
064fe9a
Added orthogonal Daubechies scaling D20
Desmis Jun 17, 2024
d3fb000
merge with dev
Desmis Jun 17, 2024
2b24964
Change strenght curve - tooltip Daubechies
Desmis Jun 18, 2024
deebe39
Forgotten changes
Desmis Jun 18, 2024
c4873be
Comment code
Desmis Jun 18, 2024
82412d5
Move variable in process - take into account highlight attenuation
Desmis Jun 18, 2024
09187f0
Display label maximum preview and preset selection
Desmis Jun 19, 2024
3f2ce7e
Remove console message
Desmis Jun 19, 2024
5505bf2
harmonize levels wavelets iplocallab
Desmis Jun 19, 2024
ec3e5f9
Tooltips contrast enhancement
Desmis Jun 20, 2024
370835c
Change tooltip Contrast profile
Desmis Jun 21, 2024
e8b2a96
Chnage tooltip Contrast
Desmis Jun 21, 2024
5ff0f53
Message warning preview size
Desmis Jun 21, 2024
2621623
Change gamma TRC values in GUI
Desmis Jun 22, 2024
ed6308b
Remove itanium architecture support for windows as PR 7105
Desmis Jun 22, 2024
00a738e
merge with dev
Desmis Jun 23, 2024
d26c867
Change windows.yml and appimage.yml
Desmis Jun 23, 2024
5eec1e5
Windows.yml apseimprov
Desmis Jun 23, 2024
c83dafd
Clean and comment ipwavelet
Desmis Jun 23, 2024
2b6a55b
Clean comment icmpanel.cc
Desmis Jun 23, 2024
528317e
Harmonize local contrast wavelet Selective editing with Abstract profile
Desmis Jun 24, 2024
90b73e9
Harmonize with AP - offset
Desmis Jun 24, 2024
93d5e57
vanishing moment D20 - Selective editing wavelet
Desmis Jun 24, 2024
2f8e7ab
Offset only in advanced mode
Desmis Jun 25, 2024
860cbd7
GUI expander contrast enable and pyrwavtrc
Desmis Jun 29, 2024
9e9bd05
Clean and comment code
Desmis Jun 29, 2024
9b07b0f
merge with dev
Desmis Jul 1, 2024
6138d5f
merge with dev
Desmis Jul 1, 2024
9e7beca
merge with dev
Desmis Jul 5, 2024
3e770cc
merge with dev
Desmis Jul 21, 2024
6b37056
merge with dev
Desmis Jul 21, 2024
8b8eac6
Prepare sigmoid based
Desmis Jul 21, 2024
6429498
Contrast sigmoid GUI
Desmis Jul 21, 2024
38425d7
Skew sigmoid GUI
Desmis Jul 21, 2024
2106ef2
Sigmoid tone mapper in iplocallab
Desmis Jul 21, 2024
35e8aaf
Change GUI settings
Desmis Jul 21, 2024
619e07e
White-point and black-point auto
Desmis Jul 21, 2024
1d95806
Change EvDCP to ALLNORAW as others events DCP
Desmis Jul 21, 2024
45d0409
Change default skew
Desmis Jul 21, 2024
18c39e1
Change settings - enable scale Yb
Desmis Jul 22, 2024
8ab6fdc
Merge with dev
Desmis Jul 22, 2024
1a41855
Display white point - advanced mode
Desmis Jul 26, 2024
cc44e44
Improve GUI
Desmis Jul 26, 2024
99f81d5
merge with dev
Desmis Aug 5, 2024
86f7cde
Clean unused variable
Desmis Aug 5, 2024
30419e7
new sigmoid Q in cam16
Desmis Aug 5, 2024
68f7a1a
Change tooltips and default sigmoid Q settings
Desmis Aug 5, 2024
1939000
Sigmoid Jz
Desmis Aug 6, 2024
131702b
Clean code Jz and sigmoid
Desmis Aug 6, 2024
a88e8d7
Harmonize Sigmoid Q and Sigmoid RGB
Desmis Aug 7, 2024
52e3af8
Harmonize Sigmoid Jz
Desmis Aug 7, 2024
9a1463b
merge with dev
Desmis Aug 7, 2024
7c5688b
Clean code
Desmis Aug 7, 2024
2648a6d
Improve labels wit cd/m2
Desmis Aug 8, 2024
a66db79
Slope base Q methode first
Desmis Aug 12, 2024
7f702b6
GUI slope based Q
Desmis Aug 12, 2024
46c59a6
Change default settings and tooltips
Desmis Aug 12, 2024
137659f
Change tooltips
Desmis Aug 12, 2024
f5a31c8
Clean code - change default setting
Desmis Aug 13, 2024
b9eabaa
Change default local contrast & wavelet to wavelet & basic mode
Desmis Aug 13, 2024
4f153b9
Fixed bad assignation slopesmoq
Desmis Aug 16, 2024
e837e1b
Improve sigmoid and slope based Q - GUI for Log encoding Color appear…
Desmis Aug 18, 2024
ccdf798
Remove wrong change
Desmis Aug 18, 2024
9e1589c
various small improvments
Desmis Aug 21, 2024
cafff3d
Allows black and white AP and SDA in basic mode
Desmis Aug 22, 2024
0aa56dd
Change the writing of wGamma and wSlope - attenuates the effect of t…
Desmis Aug 23, 2024
912cad0
Clean code wgamma wslope
Desmis Aug 23, 2024
050a96a
Set curve Cam16 in basic mode
Desmis Aug 24, 2024
1b5d235
Change position curve in GUI cam16
Desmis Aug 24, 2024
0db8114
Enable tonecurve1 in colorappearance & lighting in standard mode
Desmis Aug 26, 2024
5cae2fb
Fixed bug scale yb scene - ciecam curve - change default contrast enh…
Desmis Aug 26, 2024
69262ca
not reset curve shape ciecam in strandard
Desmis Aug 27, 2024
5c614be
Change label Tone mapping operators and tooltips
Desmis Aug 27, 2024
09c99e0
Change some labels and tooltips - Appearance - Mask and Mofifications…
Desmis Aug 28, 2024
deafb76
Forgotten changes
Desmis Aug 28, 2024
e2a2104
merge with dev
Desmis Sep 1, 2024
8228a14
Clean locallabtools2.cc
Desmis Sep 4, 2024
16b5ab4
merge with dev
Desmis Sep 17, 2024
534e68c
Merge with dev
Desmis Nov 14, 2024
1c78363
Maxlevel wavelet minimum to 5
Desmis Nov 16, 2024
316c0a3
Reset mask and modifications in SE wavelet and all tools in Global
Desmis Nov 17, 2024
8d246c5
Show modified areas SE wavelet
Desmis Nov 17, 2024
e0bde0f
Tooltip show wavelets decomposition
Desmis Nov 17, 2024
94e62af
Fixed another bad behavior in Global - changes also in color & light …
Desmis Nov 18, 2024
1b74c89
merge with dev
Desmis Nov 24, 2024
29f59f9
Merge with dev
Desmis Nov 25, 2024
7fb55a8
Change behavior fullimage - global as in PR GHS
Desmis Dec 13, 2024
54624da
Disable all mask and modifications in Global but remain active in ful…
Desmis Dec 14, 2024
815af43
Set expander expanded = true
Desmis Dec 15, 2024
31986d3
Chane contrast enhancement coef
Desmis Dec 22, 2024
f9b4fb0
Replace VBox trcWavVBox by ToolParamBlock trcWavFBox
Desmis Dec 22, 2024
552566a
Forgotten code in icmpanel read pedited opacityShapeWLI - hope solve …
Desmis Dec 22, 2024
60e230e
Change RGB Slope behavior with link
Desmis Dec 22, 2024
07f8ced
No access to last level contrast enhancement
Desmis Dec 23, 2024
b9c4b61
Move Abstract Profile tooltip to title
Lawrence37 Dec 28, 2024
6b108da
Improve Color Management expanders behavior
Lawrence37 Dec 28, 2024
02bf60e
Merge branch 'dev' into apseimprov
Lawrence37 Dec 29, 2024
e3f42b5
Fix RGB slope tone mapping RGB linkage
Lawrence37 Dec 29, 2024
8f52751
Fix SE CAM tone mapping slider defocus
Lawrence37 Dec 29, 2024
9f5e30a
Delete history kslopesmo - remove IcmOpacityCurveWL
Desmis Dec 31, 2024
3bad953
change the tooltips as suggested by Lawrence
Desmis Dec 31, 2024
98bd287
Review L37 - change strengthjz strengthlc - MIDDLE_GREY MIDDLE_GREYjz…
Desmis Jan 2, 2025
fca90a8
Change name Tone map freeman functions
Desmis Jan 2, 2025
813f384
Remove gamutcont - rename localcont - change allocation memory wdspot
Desmis Jan 2, 2025
4ac5724
Clean procparams
Desmis Jan 2, 2025
2ae0ccb
remove sigmoidsenscie - logcieq
Desmis Jan 2, 2025
0b3946a
Added * to three labels 'sigmoid' - change tooltip which shows the in…
Desmis Jan 3, 2025
9d33c7f
Forgotten correction suggested by Lawrence
Desmis Jan 4, 2025
9f5e67d
Compatibility 5.11 log encoding - sigmoid part 1
Desmis Jan 8, 2025
b1b5845
Compatibility 5.11 part 2
Desmis Jan 8, 2025
4675dc6
Compatibility 5.11 - step 3
Desmis Jan 8, 2025
b2501cb
Compatibility 5.11 - step 4
Desmis Jan 8, 2025
441d327
Compatibility 5.11 step xx
Desmis Jan 9, 2025
ea7ead4
Compatibility 5.11 - combobox operators Q and J
Desmis Jan 9, 2025
3f2f46f
Compatibility 5.11 Cam16 GUI first part
Desmis Jan 9, 2025
beca37a
Improve GUI Cam16 sigmoid compatibility
Desmis Jan 9, 2025
dced396
Compatibility 5.11 Jz - sigmoid - step 1
Desmis Jan 9, 2025
55f2c52
Compatibility 5.11 Jz gui step 2
Desmis Jan 10, 2025
856f3fb
Compatibility 5.11 Jz GUI step x
Desmis Jan 10, 2025
225508a
Compatibility 5.11 Jz - history - etc.
Desmis Jan 10, 2025
c4b16fb
Various change labels - history ...
Desmis Jan 10, 2025
24e46a2
Improve GUI - hide show 5.11 5.12
Desmis Jan 10, 2025
42f6237
Jz 5.11 in iplocallab - step 1
Desmis Jan 10, 2025
4baba9e
Compatibility 5.11 iplocallab cam16 step 1
Desmis Jan 10, 2025
614d614
Improve GUI hide show 511 512
Desmis Jan 10, 2025
cbc1c4f
Solved - I hope - GUI problem with tone mapper Q and J 5.11 and 5.12
Desmis Jan 11, 2025
3676fbc
Compatibility 5.11 iplocallab Cam16 step 2
Desmis Jan 11, 2025
44a1c43
Improve GUI compatibility 5.11 labels tooltips
Desmis Jan 11, 2025
775fe9b
Small improvments GUI - labels - history...
Desmis Jan 11, 2025
dfae0bd
Fixed typo in paramsedited.cc clcurve issue 7283
Desmis Jan 12, 2025
de5d73c
Change tooltips method 5.12 - 5.11 for cam16 and Jz brightness Q or J
Desmis Jan 13, 2025
ee22781
Clean and refine code
Desmis Jan 13, 2025
0d011a5
Various change dafult language and CAM16 CAM02 replace by Cam16 Cam02
Desmis Jan 14, 2025
bc23858
Change modeQJ method for 5.11 in function ppversion
Desmis Jan 14, 2025
479dec9
Change labels as suggested by Wayne PR 7111
Desmis Jan 16, 2025
a3986a5
Others changes suggested for label
Desmis Jan 16, 2025
b1df9f2
Change tooltips as suggested in PR
Desmis Jan 16, 2025
c7731d3
Use unique pointer instead of manual management
Lawrence37 Jan 17, 2025
20141ec
Update rtdata/languages/default
Desmis Jan 17, 2025
9b963bf
Change all Cam16 references to CAM16
Desmis Jan 17, 2025
d3cbe69
Change convention uppercase and lowercase in frame - checkbox
Desmis Jan 17, 2025
eca88b8
Improve tooltips for Tone Mapping Operators
Desmis Jan 18, 2025
43055bd
Another change CIECAM and uppercase lowercase in checkbox
Desmis Jan 18, 2025
28183d9
Remove appimage and windows yml
Desmis Jan 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
288 changes: 184 additions & 104 deletions rtdata/languages/default

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions rtengine/cplx_wavelet_dec.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
*
* 2010 Ilya Popov <[email protected]>
* 2012 Emil Martinec <[email protected]>
* 2024 Jacques Desmis <[email protected]>
*/
#pragma once

Expand Down Expand Up @@ -170,14 +172,14 @@ wavelet_decomposition::wavelet_decomposition(
//n=0 lopass, n=1 hipass
}
}
/* } else if(wavfilt_len == 22) {
} else if(wavfilt_len == 22) {
for (int n = 0; n < 2; n++) {
for (int i = 0; i < wavfilt_len; i++) {
wavfilt_anal[wavfilt_len * (n) + i] = Daub4_anal22[n][i];
wavfilt_synth[wavfilt_len * (n) + i] = Daub4_anal22[n][wavfilt_len - 1 - i];
//n=0 lopass, n=1 hipass
}
} */
}
} else if(wavfilt_len == 4) {
for (int n = 0; n < 2; n++) {
for (int i = 0; i < wavfilt_len; i++) {
Expand Down
10 changes: 5 additions & 5 deletions rtengine/cplx_wavelet_filter_coeffs.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* along with RawTherapee. If not, see <https://www.gnu.org/licenses/>.
*
* 2012 Emil Martinec <[email protected]>
* 2014 Jacques Desmis <[email protected]>
* 2014 - 2024 Jacques Desmis <[email protected]>
*/
#pragma once

Expand Down Expand Up @@ -49,13 +49,13 @@ const float Daub4_anal16[2][16] ALIGNED16 = {//Daub 14
{ -0.0002501134f, -0.0012739524f, -0.0003037575f, 0.008874895f, 0.01171997f , -0.026891225f, -0.057001725f, 0.05042335f, 0.158417505f, -0.10175691f, -0.33218624f, 0.515574245f, -0.28039564f, 0.055049715f, 0.f, 0.f}
};

const float Daub4_anal22[2][22] ALIGNED16 = {//Daub 20
const float Daub4_anal22[2][22] ALIGNED16 = {//Daub 20 - verified good 6 - 2024
{0.f, 0.f, 0.01885858f, 0.13306109f, 0.37278535f, 0.48681406f, 0.19881887f, -0.1766681f, -0.13855494f, 0.09006372f, 0.0658015f, -0.05048328f, -0.02082962f,
0.0234849f, 0.002550218f, -0.0075895f, 0.0009866627f, 0.001408843f, -0.000484973f, -0.0000823545f, 0.0000661271f, -0.00000939f},
{0.00000939f, -0.0000661271f, 0.0000823545f, 0.000484973f, -0.001408843f, -0.0009866627f, 0.0075895f, -0.002550218f, -0.0234849f,
0.02082962f, 0.05048328f, -0.0658015f, -0.09006372f, 0.13855494f, 0.1766681f, -0.19881887f, -0.48681406f, -0.37278535f, -0.13306109f, -0.01885858f, 0.f, 0.f}
{0.00000939f, 0.0000661271f, 0.0000823545f, -0.000484973f, -0.001408843f, 0.0009866627f, 0.0075895f, 0.002550218f, -0.0234849f,
-0.02082962f, 0.05048328f, 0.0658015f, -0.09006372f, -0.13855494f, 0.1766681f, 0.19881887f, -0.48681406f, 0.37278535f, -0.13306109f, 0.01885858f, 0.f, 0.f}

};

// if necessary ?? we can add D20 !!
}

29 changes: 23 additions & 6 deletions rtengine/dcrop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,8 @@ void Crop::update(int todo)
float Lhighresi46 = 0.f;
float Lnresi46 = 0.f;
float contsig = params.locallab.spots.at(sp).contsigqcie;

float slopeg = 1.f;
bool linkrgb = true;
float lightsig = params.locallab.spots.at(sp).lightsigqcie;
/* huerefp[sp] = huere;
chromarefp[sp] = chromare;
Expand Down Expand Up @@ -1163,7 +1164,7 @@ void Crop::update(int todo)
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, maxicam,rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, prim, ill, contsig, lightsig,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46, slopeg, linkrgb);

LocallabListener::locallabDenoiseLC denoiselc;
denoiselc.highres = highresi;
Expand Down Expand Up @@ -1276,7 +1277,7 @@ void Crop::update(int todo)
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, prim, ill, contsig, lightsig,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46, slopeg, linkrgb);
}


Expand Down Expand Up @@ -1449,7 +1450,6 @@ void Crop::update(int todo)
WavOpacityCurveBY waOpacityCurveBY;
WavOpacityCurveW waOpacityCurveW;
WavOpacityCurveWL waOpacityCurveWL;

LUTf wavclCurve;

params.wavelet.getCurves(wavCLVCurve, wavdenoise, wavdenoiseh, wavblcurve, waOpacityCurveRG, waOpacityCurveSH, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL);
Expand Down Expand Up @@ -1628,6 +1628,23 @@ void Crop::update(int todo)
if (params.icm.workingTRC != ColorManagementParams::WorkingTrc::NONE && params.icm.trcExp) {
const int GW = labnCrop->W;
const int GH = labnCrop->H;
if(params.icm.trcExp) {//local contrast
int level_hr = 7;
int maxlevpo = 9;
bool wavcurvecont = false;
WaveletParams WaveParams = params.wavelet;
ColorManagementParams Colparams = params.icm;
WavOpacityCurveWL icmOpacityCurveWL;
Colparams.getCurves(icmOpacityCurveWL);
parent->ipf.complete_local_contrast(labnCrop, labnCrop, WaveParams, Colparams, icmOpacityCurveWL, skip, level_hr, maxlevpo, wavcurvecont);
bool enall = false;
enall = wavcurvecont && Colparams.wavExp;//enable message only if curve enable and Expander on
if (parent->primListener) {
parent->primListener->wavlocChanged(float (maxlevpo), float (level_hr), enall);
}

}

std::unique_ptr<LabImage> provis;
const float pres = 0.01f * params.icm.preser;
if (pres > 0.f && params.icm.wprim != ColorManagementParams::Primaries::DEFAULT) {
Expand All @@ -1639,8 +1656,8 @@ void Crop::update(int todo)

parent->ipf.lab2rgb(*labnCrop, *tmpImage1, params.icm.workingProfile);

const float gamtone = parent->params->icm.workingTRCGamma;
const float slotone = parent->params->icm.workingTRCSlope;
const float gamtone = parent->params->icm.wGamma;
const float slotone = parent->params->icm.wSlope;

int illum = rtengine::toUnderlying(params.icm.will);
const int prim = rtengine::toUnderlying(params.icm.wprim);
Expand Down
20 changes: 16 additions & 4 deletions rtengine/improccoordinator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1402,7 +1402,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
if(params->locallab.spots.at(sp).complexcie == 2) {
params->locallab.spots.at(sp).primMethod = prof;//in Basic mode set to Working profile
}

float slopeg = 1.f;
bool linkrgb = true;
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,
Expand Down Expand Up @@ -1458,7 +1459,7 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
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, maxicam, rdx, rdy, grx, gry, blx, bly, meanx, meany, meanxe, meanye, prim, ill, contsig, lightsig,
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46);
highresi, nresi, highresi46, nresi46, Lhighresi, Lnresi, Lhighresi46, Lnresi46, slopeg, linkrgb);


fabrefp[sp] = fab;
Expand Down Expand Up @@ -1561,6 +1562,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
loccielc.meanylc = meany;
loccielc.meanxelc = meanxe;
loccielc.meanyelc = meanye;
loccielc.slopeglc = slopeg;
loccielc.linkrgblc = linkrgb;
locallcielc.push_back(loccielc);

LocallabListener::locallabcieSIG locciesig;
Expand Down Expand Up @@ -2080,6 +2083,15 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)
const int GH = nprevl->H;
std::unique_ptr<LabImage> provis;
const float pres = 0.01f * params->icm.preser;
if(params->icm.trcExp) {//local contrast
int level_hr = 7;
int maxlevpo = 9;
bool wavcurvecont = false;
WaveletParams WaveParams = params->wavelet;
ColorManagementParams Colparams = params->icm;
Colparams.getCurves(icmOpacityCurveWL);
ipf.complete_local_contrast(nprevl, nprevl, WaveParams,Colparams, icmOpacityCurveWL, scale, level_hr, maxlevpo, wavcurvecont);
}

if (pres > 0.f && params->icm.wprim != ColorManagementParams::Primaries::DEFAULT) {
provis.reset(new LabImage(GW, GH));
Expand All @@ -2090,8 +2102,8 @@ void ImProcCoordinator::updatePreviewImage(int todo, bool panningRelatedChange)

ipf.lab2rgb(*nprevl, *tmpImage1, params->icm.workingProfile);

const float gamtone = params->icm.workingTRCGamma;
const float slotone = params->icm.workingTRCSlope;
const float gamtone = params->icm.wGamma;
const float slotone = params->icm.wSlope;
int illum = toUnderlying(params->icm.will);
const int prim = toUnderlying(params->icm.wprim);

Expand Down
1 change: 1 addition & 0 deletions rtengine/improccoordinator.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class ImProcCoordinator final : public StagedImageProcessor, public HistogramObs
WavOpacityCurveBY waOpacityCurveBY;
WavOpacityCurveW waOpacityCurveW;
WavOpacityCurveWL waOpacityCurveWL;
WavOpacityCurveWL icmOpacityCurveWL;
RetinextransmissionCurve dehatransmissionCurve;
RetinexgaintransmissionCurve dehagaintransmissionCurve;

Expand Down
6 changes: 4 additions & 2 deletions rtengine/improcfun.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1228,8 +1228,10 @@ void ImProcFunctions::ciecam_02float(CieImage* ncie, float adap, int pW, int pwb
Qpro = (Qpro == 0.f ? epsil : Qpro); // avoid division by zero
spro = 100.0f * sqrtf(Mpro / Qpro);

if (Jpro > 99.9f) {
Jpro = 99.9f;
if(settings->autocielab) {//avoid artifacts
if (Jpro > 99.9f) {
Jpro = 99.9f;
}
}
Comment on lines +1231 to 1235
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Options that affect the image must be in the processing parameters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix put in "Preferences" is a collective choice made in 2012 I think (or 2013?). We - designers and very limited users were confronted with the artifacts of the first version of ciecam02 (the very first). We put it in "settings" to not weigh down the already very busy Ciecam interface.
It only concerns Ciecam02.
Should it be removed from "Preferences" or kept for compatibility... Certainly Ciecam02 is obsolete - especially the first version - but RT must I think (nostalgia?) preserve traces of the past (Feedback)


Jpro = CAMBrightCurveJ[(float)(Jpro * 327.68f)]; //lightness CIECAM02 + contrast
Expand Down
13 changes: 11 additions & 2 deletions rtengine/improcfun.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,19 @@ enum class BlurType {
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 &maxicam, float &rdx, float &rdy, float &grx, float &gry, float &blx, float &bly, float &meanx, float &meany, float &meanxe, float &meanye, int &prim, int &ill, float &contsig, float &lightsig,
float &highresi, float &nresi, float &highresi46, float &nresi46, float &Lhighresi, float &Lnresi, float &Lhighresi46, float &Lnresi46);
float &highresi, float &nresi, float &highresi46, float &nresi46, float &Lhighresi, float &Lnresi, float &Lhighresi46, float &Lnresi46, float &slopeg, bool &linkrgb);

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 tonemapFreeman(float target_slope, float target_sloper, float target_slopeg , float target_slopeb, float white_point, float black_point, float mid_gray_scene, float mid_gray_view, bool rolloff, float smooththreshold, bool limslope, LUTf& lut, LUTf& lutr, LUTf& lutg, LUTf& lutb, int mode, bool scale, bool takeyb);
void tonemapFreemanQ(float Q, float &Qout, float target_slope, float white_point, float black_point, float mid_gray_scene, float mid_gray_view, bool rolloff, bool takeyb);

float get_freeman_parameters(float x, bool rolloff_, float mid_gray_scene, float gamma, float slopelim, float dr, float b, float c, float kmid);
float rolloff_freeman_function(float x, float dr, float b, float c, float kmid);
float scene_referred_contrast(float x, float mid_gray_scene, float gamma);
void sigmoid_main(float r, float g, float b, float &rout, float &gout, float &bout, float middle_grey_contrast, float contrast_skewness, /* float white_point,*/ float middle_grey, float black_point, float white_point_disp);
void sigmoid_QJ(float Q, float &Qout, float middle_grey_contrast, float contrast_skewness, float middle_grey, float black_point, float white_point_disp);

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);
Expand All @@ -417,7 +425,7 @@ enum class BlurType {
const LocwavCurve & loccomprewavCurve, bool loccomprewavutili,
float radlevblur, int process, float chromablu, float thres, float sigmadc, float deltad);

void wavlc(wavelet_decomposition& wdspot, int level_bl, int level_hl, int maxlvl, int level_hr, int level_br, float ahigh, float bhigh, float alow, float blow, float sigmalc, float strength, const LocwavCurve & locwavCurve, int numThreads);
void wavlc(wavelet_decomposition& wdspot, int level_bl, int level_hl, int maxlvl, int level_hr, int level_br, float ahigh, float bhigh, float alow, float blow, float sigmalc, float offslc, float strength, const LocwavCurve & locwavCurve, int numThreads);

void wavcbd(wavelet_decomposition &wdspot, int level_bl, int maxlvl,
const LocwavCurve& locconwavCurve, bool locconwavutili, float sigm, float offs, float chromalev, int sk);
Expand Down Expand Up @@ -463,6 +471,7 @@ enum class BlurType {
int W_ab, int H_ab, const bool useChannelA, float *meanab, float *sigmaab);
void Evaluate2(const wavelet_decomposition &WaveletCoeffs_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, int numThreads);
void Eval2(const float* const* WavCoeffs_L, int level, int W_L, int H_L, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, int numThreads);
void complete_local_contrast (LabImage * lab, LabImage * dst, const procparams::WaveletParams & waparams, const procparams::ColorManagementParams & cmparams, const WavOpacityCurveWL & cmOpacityCurveWL, int skip, int &level_hr, int &maxlevpo, bool &wavcurvecont);

void calceffect(int level, float *mean, float *sigma, float *mea, float effect, float offs);
std::unique_ptr<LUTf> buildMeaLut(const float inVals[11], const float mea[10], float& lutFactor);
Expand Down
Loading
Loading