Issue with black blotches (help!)

@heckflosse in my case, using version g8bb06c2_20210121 I tested all the demosaic methods and they all gave the issue :frowning:

Disabling highlight reconstruction fixes it here.

Can confirm disabling highlights reconstruction does fix it. Yet version 5.8-2735-g8bb06c2_20210121 had no issue even with highlights reconstruction.

There was a change to highlight reconstruction method colour propagation not long ago
@jdc

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.

1 Like

That I also don’t understand. Even more, by that change it got a serious slowdown…

1 Like

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.

@Thanatomanic @heckflosse

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

1 Like

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 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

@stefan.chirila Nice image BTW.

1 Like

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