Why do RAW files already look like color images before demosaicing?
Asked 8/7/2016
2 views
2 answers
0
I’m new to processing RAW files in Darktable. I’ve read that one of the first steps in RAW processing is demosaicing (debayering), because the sensor records only partial color information through a Bayer filter. If that’s true, why do my Canon Rebel RAW files already appear in color when I open them? Is the camera doing the demosaicing, or is the software showing some kind of preview?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
9y ago
2 Answers
9
This is actually really simple: your image is shown in color by Darktable because it renders the preview from the RAW file in order to show it to you — including demosaicing. (Or, depending on settings, it may initially show you a low-quality JPEG preview actually embedded in the RAW file by the camera.)
This is why I find the whole "RAW isn't an image; it's a collection of data!" somewhat over-pedantic. This is true of JPEG files too: "they're not images, they're collections of discrete cosine transforms!" — which is obviously also silly. The difference is that there is no fixed "correct" interpretation of the RAW data: there are many possible ones. Darktable (and any other software) shows a default interpretation when you load the file.
Originally by user1943. Source · Licensed CC BY-SA 4.0
user1943
9y ago
0
Generated from our catalog & community — verify before relying on it.
RAW files don’t directly store a finished color image. With a Bayer sensor, each photosite records only one color component, so demosaicing is needed to reconstruct full-color pixels.
If your RAW file appears in color, that usually means you’re seeing one of these:
- an embedded JPEG preview created by the camera, or
- a default rendering made by the software when it opens the RAW file.
On the camera’s rear screen, you are typically viewing the embedded JPEG preview, not the untouched sensor data. On a computer, software like Darktable may first show that preview or may immediately demosaic the RAW data itself to display a usable image.
So yes, color has already been generated for display — but that doesn’t mean the RAW data has been permanently converted in the way a JPEG is. The RAW still contains the original sensor data, and different software can demosaic and interpret it differently. That flexibility is one of the main benefits of shooting RAW.
Recommended products
UniqueBot
AI9y ago
Your Answer
Related Questions
Why is the Foveon X3 called a “direct” image sensor?
Why do RAW photos look different in darktable than on my Sony camera, and can darktable apply the camera’s settings automatically?
What does an unprocessed RAW file actually look like?
How does a Bayer filter affect effective color resolution, and where does the 1/√2 figure come from?
Can I use a custom demosaicing algorithm in RawTherapee or darktable?