5

Part of a combined effort for "social" and "spontaneous" photography is to use a compact mirrorless camera and available light.

I've looked at a few tools for noise reduction including Neat Images which uses a noise profile for the camera and exposure settings.

But it occurs to me that a specific pattern of noise in the sensor needs to be done before color correcting, sharpening, and lens distortion correction; even the debayering will spread noise around and between channels.

Is there anything (not expensive) out there that operates on Raw files directly, and produces another raw (or dng) file as a result?

Am I right in thinking that noise patterns, as in probability distributions not specific hot sensor wells, can be better addressed in a form that presents the actual sensor pixels?

  • relevant? photo.stackexchange.com/questions/483/… – MikeW May 11 '15 at 4:24
  • @mikew 5 years old with some updates, doesn't discuss denpise directly in the raw data. – JDługosz May 11 '15 at 8:55
  • Most of RAW development software have some noise reduction options. I'm not sure if this is done directly on the RAW data but I'd expect that. You can export denoised photographs into 48bpp TIFF for further processing. – user681768917 May 11 '15 at 13:22
  • Before demosaicing, color looks a lot like noise I guess :) – rackandboneman Aug 17 '18 at 14:31
5

darktable has a "raw denoise" module that does noise reduction before the demosaic step. In practice, it is rarely better than the other modules that work on the demosaiced image.

Most noise reduction options in raw development software work between the demosaic step and the sharpening.

5

Except for dark frame subtraction, which helps get rid of (non-random) pattern noise,no noise reduction is done at the pre-demosaiced level. There are simply too many variables that come between the raw sensel data and a rendered image. However, there are a couple of demosaicing algorithms (LMMSE and IGV) that are optimized to deal with noisy data, and many algorithms also have a setting for false color reduction.

4

Demosaicing and noise reduction should be done simultaneously. It's best to use the DCRaw program to extract the raw pixel data and then to tackle the problem of reconstructing the image from first principles instead of using the standard algorithms which won't yield the best possible reconstruction of the image.

In such a first principle treatment, you frame the problem as a so-called inverse problem where you calculate the most likely picture given incomplete information in the form of the sensor data. You then need to build a model based on measurements that gives the probability P(Y|X) for getting sensor data Y given that the real image data is X. Once you have a good model for this function, you want to find the probability P(X|Y) for the probability that the image is X given that the sensor data is Y. The relation between the two is given by Bayes' theorem and it involves the prior probability P(X) for the image. This prior can be described using a simple model appropriate for case at hand.

If you choose your models simple enough e.g. Gaussian noise, Gaussian priors, with only local correlations ( e.g. only correlations between between nearest and next nearest neighbors), then the model will be exactly solvable. It is then possible to write down the image X that maximizes P(X|Y) in a pixelwise fashion, the solution for the optimal pixel value at some point is then given as a weighted summation over the sensor data. Such models are too simplistic to yield very good results, but they already are quite good compared to what the raw processors have to offer.

E.g. I've implemented a simple noise filter that is based on defining P(X) on the basis of how least squarest deviations of 3rd degree polynomial fits to 6 by 6 blocks. So, given some arbitrary picture defined by pixels values p_{n,m} chop it up into 6 by 6 blocks and write down the formal expression of the sum of all the least squarest deviations when fitting the polynomials to each of the blocks in terms of p_{n,m}. The expression S you get is a quadratic function of all the p_{n,m}. I then assume that the probability P(X) is proportional to exp(-a S) where a is some parameter that can be fixed later. Because S is a quadratic expression, it is a Gaussian model and can be solved exactly (when imposing periodic boundary conditions, translational invariance allows you to solve the model using Fourier transforms).

The result is then a filter that ends up reducing the noise averaging over neigboring pixels, but it does so using both positive and negative weights. The reason the negative weight enter is to undo the effects of blurring that you would get if all the weights were positive (it's similar to how the unsharp mask works using negative weights). But this comes out of the math, you don't put anything in here on an ad hoc basis, other than your assumption of the prior P(X) and a noise model.

But you can do much better by writing down realistic models tuned to whatever scene you are photographing and the sharpness. The picture that maximizes P(X|Y) then won't have an analytic solution but you can then solve it using numerical methods involving successive approximations that get better and better.

2

Take a look at DxO Optics Pro, their DxO PRIME denoise feature works exclusively on RAW photo, and it's like black magic :).

Main drawbacks:

  • For supported camera only, most DSLR are supported; no DNG.
  • Processing time, for even a single 12 MP picture

Old version, like Optics Pro 9 or 10 is now free.

  • This doesn't operate on RAW data prior to demosaicing. – junkyardsparkle Aug 15 '18 at 0:19
  • 1
    Is there any source that confirms your conclusion? I think PRIME at least is a kind of de-Bayer algorithm tuned specific for denoising, if not a denoise algorithm working on RAW data – Minh Nghĩa Aug 16 '18 at 4:08
  • 1
    Fair enough (is there one that supports yours?). It doesn't produce undemosaiced output, which I was reading as the point of the question, but reading it again, it's not clear how important this is to the OP, so... I retract the objection. :) – junkyardsparkle Aug 16 '18 at 10:21
  • PRIME operates before demoisaicing on RAW data, and you can output a DNG. – Raffi Jan 6 at 18:11
  • @Raffi Can it now? I remember years ago playing with the version 10 or 11 on my mom i3-2310M laptop,... It indeed gave me DNG when used as a Lightroom plugin back then, but I found out later that it could just be a linear, demosaiced DNG. – Minh Nghĩa Apr 1 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.