• Please use real names.

    Greetings to all who have registered to OPF and those guests taking a look around. Please use real names. Registrations with fictitious names will not be processed. REAL NAMES ONLY will be processed

    Firstname Lastname

    Register

    We are a courteous and supportive community. No need to hide behind an alia. If you have a genuine need for privacy/secrecy then let me know!
  • Welcome to the new site. Here's a thread about the update where you can post your feedback, ask questions or spot those nasty bugs!

Just for Fun No C&C will be given: Can we 'see' a raw file?

StuartRae

New member
Just passing interest; no need to reply unless you're so overcome with excitement that you can't help yourself.
Those who are interested in such things will have seen it before; those who aren't won't be.

At one time I would have said "No of course you can't view a raw file because it's only a collection of data representing the amount of light falling on each sensel". But then a grayscale image is only a collection of brightness values. What if I could extract the raw data and use it to construct a grayscale TIFF? I fiddled about, on and off, for a week or so and having proved that it could be done promptly forgot about it.
Then last year I was trying out a gui for the latest version of DCRaw and found it would do exqactly what I'd tried to do a couple of years previously.
If you choose 'Document mode no scaling' DCRaw just writes the raw data to the output file with no demosaicing.
The 16-bit linear TIFF (-D -4 -T) closely resembles a picture of a black cat in a coal cellar, but an 8-bit TIFF with a gamma curve applied (-D -T) provides a recognisable image.

Here's a 100% crop:

gamma-raw.png


And here's part of it zoomed in:

gamma-raw-zoom.png



Regards,

Stuart
 
Last edited:

Doug Kerr

Well-known member
Hi, Stuart,

Just passing interest; no need to reply unless you're so overcome with excitement that you can't help yourself.
Those who are interested in such things will have seen it before; those who aren't won't be.

At one time I would have said "No of course you can't view a raw file because it's only a collection of data representing the amount of light falling on each sensel". But then a grayscale image is only a collection of brightness values. What if I could extract the raw data and use it to construct a grayscale TIFF? I fiddled about, on and off, for a week or so and having proved that it could be done promptly forgot about it.
Then last year I was trying out a gui for the latest version of DCRaw and found it would do exqactly what I'd tried to do a couple of years previously.
If you choose 'Document mode no scaling' DCRaw just writes the raw data to the output file with no demosaicing.
The 16-bit linear TIFF (-D -4 -T) closely resembles a picture of a black cat in a coal cellar, but an 8-bit TIFF with a gamma curve applied (-D -T) provides a recognisable image.
Thanks for the information on those operations.

I've never actually worked with DCRaw, although I have recently done a lot of analysis on information derived by others (Laurent Clévy, for one) from its code.

Once can get a similar presentation using the image manipulation and analysis program Iris, which is widely used by astrophotographers but can be quite useful beyond that field.
 

StuartRae

New member
Thanks Doug.

I've never actually worked with DCRaw.....
Conversely, although I know of Iris I've never looked at it.

When I first used DCRaw it had few options, but when I looked at it again last year it had sprouted many more. A full list can be found here

If you're not a command-line junkie there's a GUI for it here

Regards,

Stuart
 

StuartRae

New member
Hi Doug,

I've neglected to thank you for the link to Iris. My excuse is that my back went twang while putting my socks on, since when I've been unable to concentrate on anything other than how I'm going to get out of this chair.

Yes, it seems to provide a very similar raw + gamma image but not the really linear raw of DCRaw.

To complete the set, here are a few more images.

1. The really linear raw. If your monitor black-point is set accurately you can just make out the boundary between hills and sky. (the -D switch - document mode without scaling)

linear-raw.png


2. Document mode (-d) presumably with scaling. Is the correct term 'normalisation'?

linear-raw-scaling.png


3. The final RGB output. DCRaw does a fine job with well exposed images.

gamma-RGB.jpg


Regards,

Stuart
 
Top