What is the source file for noise reduction?

Integer arithmetic

Mind you; Not so infuriating if you realize that this is only true for large values of 9 or very small values of 24!

:wink:

2 Likes

It was meant to be a joke. You guys are so technical. Have a :cake:.

How much memory does it use, anyway?

If it’s less than the Filmulation algorithm, I might just cut out the tiling.

Depends on the number of wavelet levels. Let’s call this number wl. Then iirc it needs 2 * wl * 4 * width * height byte for chroma denoise (roughly)

Sounds like I need to leave it in then.

@CarVac I was wrong. It’s more like width * height * 8 + (wl - 1) * width * height * 2

Then I can probably get away with removing it, which is beneficial because I don’t exactly understand the way it’s feathering. It looks like it blends the tiles in RGB space, whereas I want to leave the output in Lab.

Iirc the feathering is ony for luminance noise…

@CarVac Concerning the tiling: the code first tries to allocate memory for a not tiled processing. Only if that fails, it falls back to a processing of 9 tiles to reduce memory usage.

Okay, now I’ve got it running, but I can’t seem to get quite the same results. When I look at the pp3, the chroma, Redchro, and Bluechro values are not the same as the ones in the UI, but redchro and bluechro seem to depend on the raw file? Maybe this depends on white balance?

For me, I’m giving it 0 redchro and bluchro, and the chroma ranging from 0.3 to 1. It doesn’t seem to do anything at all below 0.31, but above that it immediately becomes very strong.

What sort of range of Lab values goes in to the function in RawTherapee? I’m feeding it stuff from roughly -1 to 1…

Additionally, merging the L channel from nlmeans and the ab channels from directional pyramid is not yielding the result I expect. That may take some tweaking, though.

One issue solved… by multiplying the lab values by 100 prior to noise reduction, a range of 0-100 for chroma works nicely, and it doesn’t have the same smearing as before.

The L/ab channel merge still isn’t cooperating though, but I’m hoping that’s solved by impulse noise reduction.

1 Like

Another update:

I figured out that instead of merging the L channel of nlmeans and the AB channel of the directional pyramid denoising, I can run directional pyramid denoising on the nlmeans output.

It’s pretty good, but it has some weird artifacts that remind me of a color-inverted blue-ringed octopus

Screenshot_20210614_210721

The better parts actually look quite fine, though, and it is in my opinion quite outstanding on images that are not as noisy (this is ISO 25600 on an a7r4).

Looks like some discontinuity in the blending. I get this sometimes in my experiments.

It’s not blended right now, it’s applied sequentially.

My next attept will be swapping the order—perform directional pyramid denoising, then convert back to RGB and do nonlocal means, then go back to lab for impulse noise reduction.

What images are you using for your tests?

I’ve been using the DPR test scene shots from the D5 at 12800 with the incandescent illumination and the A7R4 at 12800 and 25600 with daylight illumination, and two of my own 60D shots (incandescent illumination, iso 6400 and 12800).

Do you have any advice on how to avoid it?

In hindsight, I do think it is essentially blending, since the chroma noise reduction only touches the chroma.

Noise reduction isn’t my forte: I can only tell you the symptoms. I don’t know how much of it is JPEG compression but this is what I get from two basic conversions:

srgb2rgb rgb2lch

L*C*h° left to right

As you can see, the noise type and patterns for each channel after noise reduction are noticeably different and unrelated, which makes the filtered image problematic and means that your methods or parameters are unsuitable for this sample.

1 Like

I tried it on this image taken from a playraw and it did a nice job esp on the yellow flowers but took forever and ever on my older machine. I have 32GB but that may not be enough …also when I turned NR off and then back on to see the effects it crashes and closes the program…maybe I am running out of memory…but I suspect this is a use case Ie checking with NR on and off so maybe caching in some way the last set of NR settings so that it doesn’t have to run all over again might be a nice addition…
IMG_3868.CR2 (27.7 MB)