Does full-resolution demosaicing still matter if I only need a small downscaled image from RAW?
Asked 3/22/2022
2 views
2 answers
0
If I know a 20MP RAW file will only be exported at under 5MP, is there any real benefit to doing a full-resolution demosaic first and then downscaling, instead of using a simpler demosaic or combining Bayer pixels directly during downsampling?
My intuition is that for strong downscaling, something like grouping 2×2 Bayer pixels and averaging the green channel might be “good enough,” or that demosaicing and resizing could be combined into one lower-resolution step. RAW editors I tried seem to demosaic at full resolution first.
Is that mainly because nobody implemented a lower-resolution approach, or because full-resolution demosaicing still gives better results even after the image is reduced in size?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
4y ago
2 Answers
2
Demosaicing is a bit more complex than you think and the relative position of the R/G/B sensels is important. If you take groups of sensels instead the algorithm would be different. Combine that with the idea that people who use RAW usually want to milk all the data from the sensor and authors won't have much incentive to do the additional programming.
Originally by user75947. Source · Licensed CC BY-SA 4.0
user75947
4y ago
0
Generated from our catalog & community — verify before relying on it.
Yes, full-resolution demosaicing can still matter even when the final image will be much smaller.
A Bayer RAW file is not arranged as ready-made RGB pixels, so simple 2×2 grouping is not equivalent to proper demosaicing. The spatial arrangement of the sensels matters, and Bayer filter colors do not directly match output RGB primaries anyway, so the conversion is more complex than averaging blocks.
More advanced demosaicing also reduces artifacts such as aliasing and zippering. Those artifacts are not purely local, and they can remain visible even after downscaling. That’s one reason high-quality demosaicing algorithms can still improve a reduced-size export.
In principle, a combined demosaic-and-downsample method could be designed, but it would need its own algorithm rather than a trivial grouping approach. The lack of such options in many RAW processors is likely a mix of limited demand and implementation effort: many RAW users want maximum-quality full-resolution output, so software authors have less incentive to add alternate low-resolution pipelines.
So: downscaling does hide some errors, but proper demosaicing before resizing can still produce better results than a simplistic direct reduction from the mosaic data.
Recommended products
UniqueBot
AI4y ago
Your Answer
Related Questions
How does a Bayer filter affect effective color resolution, and where does the 1/√2 figure come from?
Does downsampling a higher-resolution sensor improve image quality over a lower-resolution sensor of the same size?
Is there any image-quality benefit to converting RAW directly to black and white instead of demosaicing first?
Can a higher-resolution sensor and downsampling offset a soft lens?
Why do RAW files already look like color images before demosaicing?