I give you a photo to test.
You have to put ‘color propagation’
IMG_3346.DNG (18.3 MB)
I tried with the patch Alberto @agriggio. there are always artifacts
But, If I replace CLIP by clipL
with
constexpr float clipL(float x)
{
return rtengine::LIM(x, 100.f, 65535.f);
}
Only is changed the low limit… 100.f, instead of 0.f
No artefacts (at least on this image)
But it not fixed IMG_3346.DNG
Jacques
Then, If now we change Guidedfilter parameter…artefacts are gone on IMG_3346.DNG
// guidedFilter(guide, mask, mask, 2, 0.001f, true, 1);
guidedFilter(guide, mask, mask, 3, 0.1f, true, 1);
jacques
Sorry, my previous “fix” was not enough… can you try this one?
diff --git a/rtengine/hilite_recon.cc b/rtengine/hilite_recon.cc
--- a/rtengine/hilite_recon.cc
+++ b/rtengine/hilite_recon.cc
@@ -946,12 +946,17 @@
rescaleNearest(gsrc, gbuf, true);
rescaleNearest(bsrc, bbuf, true);
+ LUTf gamma(65536);
+ for (int i = 0; i < 65536; ++i) {
+ gamma[i] = pow_F(float(i)/65535.f, 2.2f);
+ }
+
#ifdef _OPENMP
# pragma omp parallel for
#endif
for (int y = 0; y < H2; ++y) {
for (int x = 0; x < W2; ++x) {
- guide[y][x] = Color::igamma_srgb(Color::rgbLuminance(rbuf[y][x], gbuf[y][x], bbuf[y][x], imatrices.xyz_cam));
+ guide[y][x] = gamma[CLIP(Color::rgbLuminance(rbuf[y][x], gbuf[y][x], bbuf[y][x], imatrices.xyz_cam))];
}
}
}
Alberto
I just tested with your patch, no more artifacts with the 2 images IMG_3346.dng and S7_09850.ARW
jacques
I just open an issue with a fix - thanks to Alberto @agriggio
Color Propagation -fixed artifacts · Issue #6107 · Beep6581/RawTherapee · GitHub
jacques
Thanks a bunch everyone can’t wait to download the appimage with the fix
I this supposed to be fixed in RT dev? I recompiled yesterday evening but saw artifacts in overexposed sky that disappeared when switching to blend highlight reconstruct.
No, but perhaps in branch hilitrecon
, which also speeds up colour propagation…
Edit: for reference:
The Rawtherapee team has just released a notable improvement for “Color propagation” - commit in “dev” - de15da1
Now you have a multiple choice (5) using a slider :
- at "zero : the “old” very good algorithm, but which can bring artifacts into transitions
- at “4” : the algorithm coming from ART without black blotch, this algorithm brings a rather pronounced blur, but totally reduces artifacts.
- between the two, you can choose the level of blur
Note a noticeable increase in execution as soon as the slider is not at zero - compared to previously (ART algorithm)
awesome can’t wait for the appimage
@Carmelo_DrRaw are you maintaining the appimages at Release Automated Builds · Beep6581/RawTherapee · GitHub ? Any idea when to expect the new one? sorry not trying to be a jerk