Difference between revisions of "Pattern Noise"
Line 42: | Line 42: | ||
http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-totally-raw-crop.jpg http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-no-blackcol-crop.jpg | http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-totally-raw-crop.jpg http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-no-blackcol-crop.jpg | ||
----- | ----- | ||
Line 48: | Line 50: | ||
http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-crop.jpg http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-fixrn-crop.jpg | http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-crop.jpg http://files.apertus.org/AXIOM-Beta/snapshots/pattern-noise/10ms+4-fixrn-crop.jpg | ||
----- | ----- |
Revision as of 20:30, 6 February 2016
The CMV12000 sensor suffers from dynamic row noise.
That means, a scalar offset gets added to each row. The offset is not correlated between different frames, so we can't remove it using a calibration frame (dark frame or whatever).
One can observe this noise by looking at the difference between two images taken at identical settings. There are two main components that appear obvious in such a difference frame: random noise (per pixel, increases on brighter pixels) and row noise (per line).
There are two ways to deal with this noise, after performing Black Calibration:
- use info from black reference columns to reduce dynamic row noise without guessing anything (fast, can be implemented in real-time, see Raw_preprocessing)
- use denoising techniques to reduce the remaining row noise (the guesswork part, slow)
1 Reducing row noise using black reference columns
2 Reducing the remaining row noise by image filtering
- Filter the image with an edge-aware vertical blur (bilateral filter on pixels from the same column)
- Subtract the blurred image; the residuals will reveal the row noise
- Mask out highlights and strong edges
- Take the median value from each row of the residuals image
- Subtract these values from each row of the original image
Note: because of the way images are stored in memory, it is easier to perform the filtering horizontally. Therefore, the implementation from raw2dng actually filters column noise, and transposes the image for row noise.
3 Usage
The methods discussed here are implemented in raw2dng.
- black reference columns are used by default, as long as you use a dark frame (since this method is fast and has no side effects)
- to reduce the remaining row noise, use raw2dng --fixrn
- if the image also suffers from column noise, use raw2dng --fixpn
Tip: the algorithm for filtering row noise is also available in mlvfs, so you can use it on MLV videos (recorded with Magic Lantern) as well.
4 Samples
Half-res images (ufraw --shrink=2).
Left: raw sensor data (adjusted black level manually). Right: after dark frame subtraction, but without correction from black columns. Note: in the raw data, even and odd rows have different black offsets; that's why we have wrong colors.
Left: after dark frame and black columns correction. Right: after row noise reduction (--fixrn).
Algorithm internals:
Left: denoised image. Right: noise image, revealing FPN.