Noise behavior in extreme lowlight raw image

Hi everyone,

TL;DR: I’m trying to process the image below, shot close to the limit of what poor old 550D could do, and have a lot of questions about it :smiley:

IMG_6004.CR2 (29.4 MB) (Licensed under CC BY-SA 4.0)

I’m well aware the conditions are not ideal (and I should have gotten a dark frame or two while shooting!), but for the sake of experimenting I’d like to see how far I can go.


My most successful attempt was to minimize exposure adjustments so that the noise is not too visible, which gives my best result so far:


IMG_6004_05.CR2.xmp (14.0 KB)


In another attempt, I tried to push the exposure a bit more to see what I could do and gave it a more “cartoony look”. Pushing saturation a bit too far for visibility (ugh!):

image
IMG_6004_04.CR2.xmp (25.4 KB)

When exported at low resolution (the above is actually a screenshot of the Darktable editing window at very low zoom), you can clearly see color in the grass ; however it’s completely drowned out in the noise in the final exported picture, and is no longer visible when the exported JPEG is viewed later, at any resolution:

Most notably, and this brings me to my main point, the lowres preview is clearly different from the fullres exported image.


I would be perfectly happy to trade off a lower resolution with a little more colors and less noise. In this case it makes no sense to run a full demosaicing, so I could even bin Bayer pixels together to get great noise reduction for “free” and potentially get rid of some of that annoying pattern noise.

Technically I can get similar results to the preview by telling the export module to limit the output resolution, but:

  • Where does the resolution change happen in the pipe if I do this? Before/after Demosaic?
  • Is there somewhere a rescale operator that I can insert in the pipeline just for this image so I don’t have to change the settings globally in the Export module?
  • Can I tell the Demosaic module to not do any fancy algorithm, just bin pixels to reduce noise?
  • Do you have any tips regarding how to process this image?

On a side note, I tried to add an option in the Demosaicing module and got “some” results ; by which I mean that I can currently get a lower-resolution output if I select my custom “binning” algorithm (great!) but wrong clip coordinates (duh…).

This is my first time trying out Darktable’s source code, so I am still a little unsure about how a crop is defined using dt_iop_roi_t, and how to make the Demosaicing module change the resolution in the middle of the pipeline. Any pointers on where to start?


That’s it, if you’re still there, thanks for having listened to my ramblings :wink:

1 Like

Hello fxt, welcome the forum!

The issue you adressed is, as you describe in your post, not only related to noise removal. It’s the behaviour of the preview image, that doesn’t always match the output or even differs between 100% zoom and other zoom levels:

See for example:


As far as I understand the reason is hidden somewhere deep down in dt’s code and not easy to fix as it touches many different parts of the software. The solution you propose falls a bit close out of my scope but may be worth considering anyway.

This is done when exporting, so: No, rescaling is done in lighttable view with the export module after you’re done editing.

You don’t mention which version you are using, but the latest development version has much better demosaic options, some of which come in handy when dealing with an image like the one you posted.

You did not provide a nonrestrictive license so I’m not going to post the end result but just the xmp (extreme.low.light.cr2.xmp / dt 3.5.0). There might be stuff in the sidecar that could be of use to you, assuming you can load this one properly (it being created in a development version)

Those are all the answers I have. I’m not a developer, but a normal user so any source code related stuff I do not care about to be honest :wink:

Thank you all for the answers!

Just adressing one comment (will look at the rest in detail later, especially regarding the improvements in 3.5 and the proposed edits).

You did not provide a nonrestrictive license

You’re right, an oversight on my part. I’m perfectly fine with a CC license, should I edit my post to add that?

That is up to you: Do you want/need visual examples? This isn’t PlayRaw and I don’t mind only supplying the sidecar, others might want to show the end result though.

The image is very noisy, here is the best I could achieve

IMG_6004.CR2.xmp (10.1 KB)

Usually I prefer to start with demosaic module parameters. But this time it totally ruined it (if not more). Full and local average made this… Probably I need to report it as bug.

Same here, and it is how I started my above posted edit. I am curious though: Which dt version are you using?

This is 3.5:


The three white dots top right will disappear when you enable the hot pixels module.

3.4.1

OK, that explains it. You will be in for a pleasant surprise once the new stable version arrives. Demosaic has got some nice new options. :grin:

I was a bit surprised by the result. I used those parameters pretty safely before without lighting stars.

Just looked at 3.4.1 and I think you ran into something that I’ve run into before:

When editing images that are primarily very dark I’ve noticed that when you use the match greens setting and choose either local average or full and local average you’ll end up with ugly artefacts. Using disabled or full average work nicely though.

No need to file a bug report though, checked in 3.5 using VNG and AMAZE and this doesn’t happen.

Known issue, fixed in master.

RCD is often a safer bet with high ISO images … (many/most others too) and it’s much faster :slight_smile:

@hannoschwalm I’ll wait for the next stable release. Too much troubles for one day. Just noticed that I lost spot removal information at some point in some of my old edits due to https://github.com/darktable-org/darktable/issues/8373
:joy:

Thank you all again for the insights and edits!

@pass712

The issue you adressed is, as you describe in your post, not only related to noise removal. It’s the behaviour of the preview image.

I thought so, but he issues you linked do confirm this.

@Jade_NL

This is done when exporting, so: No, rescaling is done in lighttable view with the export module after you’re done editing.

That also confirms what I thought.

You did not provide a nonrestrictive license so I’m not going to post the end result but just the xmp

I also learned a couple of things on how you use the modules with your sidecar, that was quite useful. Namely you’re much less heavy-handed than I am on the corrections, probably something I should work on!

I updated the initial post with an explicit license, hopefully I did it correctly.

You don’t mention which version you are using, but the latest development version has much better demosaic options, some of which come in handy when dealing with an image like the one you posted.

I was using 3.4.1, but quickly built the latest 3.5 to test. The new options are nice! High/low frequency demosaicing was something Darktable was missing, glad to see it added :grinning_face_with_smiling_eyes:

However I don’t see a lot of difference when switching the threshold slider, I suspect that it’s because my crappy raw is way beyond the designed use case for these algorithms, can’t really blame them.

@MarcoNex

The image is very noisy, here is the best I could achieve

Yup, I’m having a lot of trouble too was you can see. ISO 6400 and 30" exposure was the max I could do, and even that is barely workable.

One thing I note is that you used the NL-Means mode, which I generally don’t because it’s so slow. I should probably get used to it at some point.

@Timur

Usually I prefer to start with demosaic module parameters. But this time it totally ruined it (if not more). Full and local average made this… Probably I need to report it as bug.

Haha yes, strangely enough I never saw this kind of effect when I played on the demosaic parameters. Since it’s apparently fixed in master I guess we’re all set :wink:

@hannoschwalm

RCD is often a safer bet with high ISO images

Good thing to know, thanks!