Feature #9774

Banding noise

Added by Robert Richard over 6 years ago. Updated almost 6 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
git development version
hardware architecture:


The noise correction module are very efficient but more than luma noise, one of the problem with digital camera is banding noise.
Banding appears as straight line all along the image (vertically or horizontally) and might be due to radiation of the electric circuit behind the sensor (well that's what I read).
Some software (like Dfine) can correct this noise which appears as a change of exposure from on line of pixel to another line.
It seems to me that this is some kind of baseline correction and I think that such module would be great.

_MG_0646.jpg (12.7 MB) _MG_0646.jpg Robert Richard, 01/15/2014 08:24 PM
_MG_0646.CR2 (29.5 MB) _MG_0646.CR2 Robert Richard, 01/15/2014 08:24 PM


#1 Updated by Robert Richard over 6 years ago

  • Assignee set to Developers

I have starting developping a code for banding noise removal. The code is under Matlab. Is there anyone interested in porting it in Darktable?

#2 Updated by Pascal de Bruijn over 6 years ago

Can you upload/attach a RAW sample, with steps to reproduce a concrete problem case?

(I would like to mention, we do already have a dither module, which may or may not be helpful)

#3 Updated by Robert Richard over 6 years ago

Ah... I've never tried the dither module... I'll give a try. Meanwhile I join a .jpg and I'll join the raw.
You'll see at the top of the picture horizontal lines whith slightly different exposure. This kind of noise is called banding as far as I know and is for me one of the most annoying one since it's really a sensor effect (wrong baseline correction).

#4 Updated by Robert Richard over 6 years ago

I tried the module but it's not doing it well. If you want to reproduce, import the picture, apply noise reduction with the non local method, put luma to 0 and chroma to max and size 2 or 4. Then you'll see the "bands" appearing more easily.

#5 Updated by Tobias Ellinghaus over 6 years ago

Dithering has nothing to do with the problem at hand. It might be possible to fix this by doing line-by-line blacklevel computations as done for dual iso. Maybe some day we will try that.

#6 Updated by Robert Richard over 6 years ago

ok, I started coding a bit on Matlab, I was able to subtract artificial baseline (black level). I did a projection along one axis, and determined a correction when the difference in intensity between two points was higher than x % an applying a correction over a certain range of point. That worked but this is not a robust method.
My first attempt was to using an FT along a certain direction and filter high freq would do the job but no...

I did a bit of search, and there are apparently 2 ways:
1 - is described here

and consists in removing an the median value over a band of a couple of pixels

2 - I also found that which gives hints on how to proceed.

This kind of noise is a plague on Canon until 5DIII at high iso while Nikon/Sony fixed that after D200.
Thanks for your answer.

#7 Updated by Tobias Ellinghaus over 6 years ago

At least the Canon raw files have some black regions around the image. What Magic Lantern does is going over the part on the left (?), top to bottom, averaging over the few black pixels, and using that as the black level for that scanline. Maybe that would be enough already?

#8 Updated by Robert Richard over 6 years ago

Hum, that sounds like a good first approach... I didn't know about that. If there is a black pixels on each side of the picture, I can average the black level value and subtract it for each color channel.. I'm away from my lab for the week end but on Sunday I can give a try.
I used Dfine2 at the moment and it's able to apply a banding correction in a quite efficient way, but this software has a sloppy gui...

#9 Updated by gnujsa _ over 6 years ago

There is a filter in gmic for gimp, called "Repair / Banding denoise", and sometime it work well for this type of noise. I don't know how it work, but it's not automatic. With wrong parameters, it can add banding noise instead of removing it.

#10 Updated by Robert Richard over 6 years ago

Pretty cool! Thanks for the link, there are sources available which may require to dig into the code a bit!The fact it is not automatic is not a problem. In the script I wrote, it wasn't automatic. Actually there are from a french research institute. I guess we can as for reference for that.

I did have time to test the black level yet but soon as I do it, I'll notify you.

#11 Updated by Robert Richard over 6 years ago

A bit of update: I contacted the guy that in charge of the project butI understood that I should contact Lain Fergusson who developed it. At the moment I played around it and it's not working perfectly, mainly if the bands are large but that would be still a nice addition to darktable.

#12 Updated by Roman Lebedev almost 6 years ago

  • bitness set to 64-bit
  • System set to all
  • Affected Version set to git development version
  • Assignee deleted (Developers)

Also available in: Atom PDF

Go to top