What does an unprocessed RAW file look like?
petapixel.com
petapixel.com
It is a pretty big mess actually. Each manufacturer has different constants that need to be applied to the data, so the raw data from one device is not comparable to another. Convincing dcraw that you actually want the unaltered data is not straight forward.
Anyways, if you really do want to see the raw image, there are a few undocumented flags you can use.
> dcraw -E -4 -T *.CR2
This will give you an unprocessed 16-bit tiff file containing the "raw" data.
What is interesting is that some camera sensors capture data slightly beyond the image you are presented with. The camera will crop in and debayer the image for you, as will your image editor.
See this thread for hilarious lengths people go to in order to get unaltered data from their sensors (monochorme converting a dslr):
https://stargazerslounge.com/topic/166334-debayering-a-dslrs...
Why are the 16-bit RAW values so limited in their dynamic range? Wouldn't sensor manufacturers want to have their pixels able to return values that range the whole way from 0x0000 to 0xffff?
Most cameras use 12 or 14 bit ADCs, so they only use 2^12 or 2^14 of the available values.
Generally, the RAW files aren't actually 16 bit, but rather a packed structure of the native ADC size. In this case, they're using 16-bit intermediate bitmaps. They're not 16 bit from the RAW.
------
Fujifilm actually has a few cameras with a sensor that can be put in 16-bit mode, but IIRC it's not enabled in software.
There's also the effect of pixel well depth. I forget the exact interplay, but I believe this usually ends up being the limiting factor before ADC resolution.
Regarding pixel well depth, I suppose we can have a sensor with greater pixel size and low pixel count, like a 3840 x 2160 sensor in a full-frame camcorder. Since this would be sold as a video-oriented camera, lack of higher resolution will be a problem problem than in a still-oriented camera.
Otherwise, you can't strongly delineate between actual scene artifacts and noise.
"dark current"?
And even at base ISO, noise is well above the 14-bit LSB quantization level.
While I can accept that there isn't a universal RAW -> RGB standard, it seems strange to me that 'compute how this photo should appear' is left as an exercise as a reader.
Photographers often view their work as a form of art, and artists are very particular about even the smallest details of their work.
Why, then, would Nikon, Canon, and especially Leica, not have their own definable standards of how to process RAW photos for their particular cameras?
Of course, software people know that it would be tedious but technically straightforward to concoct a fake RAW file from another 'raw' format such as a PPM image. The stakes in these competitions can be quite high so it's a bit disconcerting that they rely on a presumption that converting RAW files to editable images is a one-way process.
Next level is to make it look plausible on its own, with plausible imperfections. This is a bit more involved and tedious.
The really hard part is to make it look like it came from the exact same individual purported camera body the photographer allegedly used. This is really hard.
An analogy would perhaps be taking a picture of a room:
Now, build another room that would make the same picture. Make sure everything in the room is plausible yet renders exactly the same picture as the first room. (The room is the RAW file.)
Edit: (I'm not saying all the competitions have the time and know how to verify a RAW file.)
Again, this is not about faking a RAW file from scratch, just being able to edit it in place.
On top of that, you have diffraction effects in the optics, chromtic aberration, and even some birefringence effects.
Algorithms exist which can detect if an image has been cropped, and what region of the original it came from. I'll leave as an exercise to the reader how that works :) hint: keyword is "media forensics"
Pretty sure they do. Aren't those the manufacturer-specific import profiles in programs like Lightroom?
Phase One, Adobe, Photo Mechanic etc all reverse engineer the manufacturers formats, which is why the results differ.
Anecdotally, Capture One is (for me) way more responsive when working with Nikon .nef files than with Fuji .raf.
That's not necessarily true and paints way too broad a brush of artists and art. Art and artists need not necessarily be concerned about the smallest details. Particularly if it is an intermediate medium which never is shown to the art viewer/participant.
Canon can't make Adobe or Phase One use their algorithm for decoding RAWs though.
[1]: https://en.wikipedia.org/wiki/Digital_Negative
[2]: https://www.bhphotovideo.com/c/product/1082939-REG/leica_108...
Processing the raw file is almost as much a creative art as composition and photography itself! So if a application processes raw images in a way the photographer likes better than the algorithms another app uses, then all the better. They’re going to export it in the end anyway.
The camera manufacturers of course do release specifications and probably proprietary code for processing raw images from their cameras to companies like Adobe to use in Lightroom under NDA, which I assume they use as a basis, but all these apps have their own ways of doing adjustment and extra processing too.
Film is superior to digital for those issues, for now.
If you nail all these, I wouldn't call it crappy even at 1:1.
But there is a residual imperfection from the Bayer pattern on the sensor, since each pixel records only one color (R, G, or B) and the other two values for that pixel have to be guesstimated from neighboring pixels, so the de-bayering process isn't perfect.
One way to fix it is to use a monochrome sensor and color filters, taking 3-4 exposures (luminance/mono plus R/G/B) and stack them.
A few cameras on the market have a pixel shift feature that can do something similar - multiple exposures, shifting the sensor one pixel between exposures so each pixel get a true R/G/B sample, and stack them in camera or in post.
Edit: Forgot to mention the anti-aliasing filter. It sits in front of the sensor and deliberately blurs the image at the pixel level. This is done to avoid aliasing and moiré artifacts, but obviously has the side effect of not-so-great image quality at the pixel peeping level. The fix for this is to get a camera without an AA filter, many modern high-resolution cameras don't have them.
https://www.outdoorphotographer.com/photography-gear/cameras...
Indeed amazing things can be achieved through that. Sony has released a camera called a7s with 12 Megapixels (while its resolution-focused counter part a7r has 42), that is crazy sensitive. You can film at night and have the results look like you filmed at day.
f(R, G, B, T_from, T_to) -> (R, G, B)
which relies on the model of blackbody radiation and a model of the wavelength distribution definitions behind the (R, G, B) values, i.e. the particular color space you're working in. When working with a manufacturer's RAW format,Auto white-balancing is finding `T_to` so that the color values are "most balanced". It is up to the manufacturer how this is decided (and might be proprietary secret sauce). Custom white-balancing is taking a known white or grayscale object and finding `T_to` which would yield something close to (1, 1, 1) for pixels of that object.
When working with a manufacturer's RAW format, there is a defined way to get the values (R, G, B, T_from) as a result of demosaicing. For example, in the author's photo post-demosaicing, the manufacturer calibrates the final data to obtain (I'm completely making this up) T_from = 2700K. Then using that information, you can correctly adjust the temperature to any other temperature using `f` above.
/s