That would actually explain it, since you don’t even need to turn reconstruction off, you just have to switch it to Blend for the black blotches to go away.
I can confirm all @heckflosse’s comments and more:
Using the latest development version:
- It only shows when using amaze+bilinear,
- Turning off highlight reconstruction fixes it (only colour propagation shows this),
- Turning off chromatic aberration-> auto-correction fixes it,
- Turning off capture sharpening fixes it.
Also tried all the other modules that are turned on in @stefan.chirila’s pp3. None of those show any effect.
I can reproduce this even more generally:
- Start from Neutral
- Choose any demosaicer you like
- Push the White Point up to 5 or something high (this aggravates the effect)
- Set Highlight reconstruction to Color propagation
Boom, artifacts.
I have traced it to this commit by @jdc backporting something from ART, so @agriggio might also want to have a look for himself Improve HLreconstruction color propagation - best transitions - code … · Beep6581/RawTherapee@b554f52 · GitHub
What I don’t understand is why a core method was casually changed without mention anywhere.
That I also don’t understand. Even more, by that change it got a serious slowdown…
Sorry, its my fault.
Probably the best solution is to disabled this improvment
Promised, i won’t do it again
Sorry again
Jacques
Well, let’s Alberto have a look first. If things are not problematic in ART, then we might as well revert. But if things can be fixed, there may be a very nice improvement to the reconstruction.
This change followed a discussion on Darktable in january, and Alberto @agriggio made proposals to improve HR. They have been tested by ART users, and by myself. The improvement is significant.
But, it leads to a slowdown and in some cases to bad behaviour.
Considering the positive opinions, I didn’t go through the “issue” stage of RT, it’s a mistake? but who doesn’t make mistakes?
Sorry again
Jacques
I tried reproducing in ART but I couldn’t, fwiw
I’ve also seen this. I use RCD/vng demosaic. It appears in the highlights with colour propagation.
@agriggio I can reproduce it in (edit: current dev build of) ART, can you try with this arp? S7_09850.ARW.arp (10.8 KB)
Confirmed, thanks! Here’s a fix (the patch is for ART, might need to be adapted for RT):
diff --git a/rtengine/hilite_recon.cc b/rtengine/hilite_recon.cc
--- a/rtengine/hilite_recon.cc
+++ b/rtengine/hilite_recon.cc
@@ -951,7 +951,7 @@
#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] = CLIP(Color::igamma_srgb(Color::rgbLuminance(rbuf[y][x], gbuf[y][x], bbuf[y][x], imatrices.xyz_cam)));
}
}
}
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