Managing color noise with Haze Removal, Denoise module ignoring masks, bug?

Hi there,

I’m relatively new to Darktable and raw processing in general. I was testing it out on a challenging file today.

After using the Haze Removal module, I noticed excess colour noise, particularly in the centre of the image. Maybe I’m pushing this too hard or expecting too much from this module?

I intended on tackling this by using the Denoise Profiled module with wavelets and strength set to 1.

When I applied this, it seemed to mess around with the highlight reconstruction and color reconstruction on the sun. I tried applying the Denoise module with a parametric mask to exclude the brightest pixels, but for some reason, it seems to be ignoring this and applying the denoise to the whole image. I have also tried using a drawn mask to exclude the area with the sun to no avail.

Any help much appreciated!

Here is a screenshot with the denoise module disabled:

With the module enabled (look at the effect on the sun!):

Finally, here is the parametric mask, showing the sun is excluded from the module’s effect:

Any pointers, very much appreciated.

Here is a link to the raw and xmp if anyone can tell me what’s going on.

RAW: https://drive.google.com/file/d/1iFP71t3NJ0BBqVaViduOhq6-QBvG2B8a/view?usp=sharing

XMP: https://drive.google.com/file/d/1D_q1O2dg6NP3ZCuy4CVd515l68Nao0gQ/view?usp=sharing

Go easy, I’m new to this!

Thanks,

Euan

PS: I’ve found this image particularly difficult to work on!

Hi Euan,

strange effect indeed. Looks as if masking doesn’t work for the raw-clipped regions of the image.

If you crank up the strength of denoising and watch a sharp border of the mask (set the sliders so there is no gradient) you can see that masking works for the unclipped parts of the image.

Greets
Jürgen

Thanks for your response Jürgen. This looks very much like a bug to me.

I’ll look into how to report this over the weekend.

darktable moduls work in different color spaces. Conversion could create color artefacts in some cases. Maybe that is the cause? You could try to switch “gamut clipping” on in the input color module like descripted in the manual.

https://www.darktable.org/usermanual/en/color_management.html#unbounded_colors

Thanks, I’ll give that a try Christian and see if that helps with the color noise.

I’m still confused as to why the mask didn’t work as expected though!

Thanks,

Euan.

My pure guess is that turning on the module forces a color space conversion on the module input. The modul ouput is blended with the pixels of the mask. Outside the mask there is no blending of the pixels, but still the color space conversion is happening.

i can confirm this “bug”.
it only appears when you use negative values in exposure module or other modules and color or lightness blending in denoise module

try with blend mode HSV Color or HSV Lightness in denoise module.

or exclude the highlights in exposure module, haze removal and color reconstruction with parametric mask.

Hi Norman,

tested with HSV color. Works fine. Good to know :sunglasses:.

Thx
Jürgen

Perfect, thanks Jürgen, Norman and Christian for all your help.

HSV Color solves this problem!