Re-introduce demosaic algorithm VNG4 to avoid noise artifacts of Pentax K200D
today I noticed some artifacts in the image noise and I couldn't find any report on this.
The problem is very subtle and occured to me in another program that displayed a thumbnail of an developed image. A strong rectangular moiree pattern was visible. When I zoomed into the image there was indeed a strange pattern of short vertical and horitonzal patches that are not visible in the camera's JPG or a developed image from e.g. RawTherapee. I attached 3 samples below, you have to zoom in to see the difference. They display the same area of the image developed with different applications.
I tested this with Darktable 1.0.5 as well as 1.1-rc1 without OpenCL support. All modules were turned off before exporting the image and both demosaic methods, Amaze as well as ppg, produces this. Oh, and I have a Pentax K200D by the way.
Has anyone else seen this?
#2 Updated by Thomas Heßling about 5 years ago
Sure, the files are attached below. I also added a screenshot of the moiree pattern that made me aware of the issue. The samples are all 200px squares taken at (200,200).
The RAW file was too big and can be downloaded here:
If there's anything I can do let me know.
#3 Updated by Ulrich Pegelow about 5 years ago
Thank you for submitting your raw file. If I am not mistaken, you are referring to the fact that
the noise in your image sample does not look dot-like, evenly distributed but more like a pattern of small sticks.
At least that's like it looks here.
I cross-checked your raw file with ufraw which delivers a very similar pattern (though slightly differing in
color distribution). OTOH I checked one of my raw files (Canon 5DMk II) with a similar patch taken in a homogeneously
sky-blue part of an image. Here the noise is distributed fully randomly without any obvious pattern.
That leads me to the assumption that this noise pattern is a property of your sensor. Quite possible that other raw
converters and your camera apply a little bit of denoising by default in order to remove that. At least the output of RawTherapee
looks a bit like that.
#5 Updated by Ulrich Pegelow about 5 years ago
- % Done changed from 20 to 0
- Status changed from Incomplete to New
- Subject changed from Noise artifacts to Re-introduce demosaic algorithm VNG4 to avoid noise artifacts of Pentax K200D
- Tracker changed from Bug to Feature
Some further investigation with ufraw shows that these artifacts can be avoided by using algorithm VNG4 for demosaicing.
All other supported algorithms reveal the artifacts in a more or less pronounced way.
Darktable used to support more demosaicing algorithms in the past (IIRC also VNG4) but we dropped them mainly for performance
I convert this ticket into a feature request with an appropriate name.
#6 Updated by Thomas Heßling about 5 years ago
Thanks a lot for your efforts in looking into this! The stick-like features in the noise are what I was referring to, that's right. I can also confirm that the VNG4 algorithm in UFRaw is the only one not showing these features. It would be really helpful if gets re-added to darktable at some point.
#8 Updated by Pascal de Bruijn about 5 years ago
As far as I can tell this has nothing to do with unequal green channels (that only affects pixel level stuff, and is typically only visible at 200% zoom), and thus will not be solved with VNG4.
When I load the RAW into Darktable1.1rc1 and export to JPEG at default settings I cannot reproduce this issue.
When I use the XMP it is reproducable. Disabling the equalizer makes the issue "disappear".
So I'm guessing the equalizer exposes this because of the local contrast effect applied.
#9 Updated by Pascal de Bruijn about 5 years ago
Small note, this camera (like so many others) is affected by unequal green channels. This can be fixed using the "Match Greens" option in the demosaic plugin (This does however not work well in noisy images).
But that said, as far as I can tell the Green issue is unrelated to the artifacts shown in the sample images.
#10 Updated by Ulrich Pegelow about 5 years ago
I find the artifacts quite noticeable even if equalizer is off (only basecurve and sharpen activated). Fully zoomed in the
image looks a bit like printed on a textile canvas.
Green equilibration quite obviously helps a lot. Noise remains of course but structural artifacts are gone.