PDA

View Full Version : Problem with TWAIN RAW->TIFF


dblunt
9th of March 2003 (Sun), 21:48
Hi,

I've been using the TWAIN driver to convert RAW images taken on my D60 to TIFF. This has worked without trouble until tonight.

I had been changing white balance settings and converting images to (linear) 16-bit TIFF. After successfully doing this on a few images all of a sudden the resultant TIFF images are dark. Not only that, but the pull down menus to adjust white balance, exposure, etc. are gone...

I uninstalled the TWAIN driver as per the docs and reinstalled it from the CD. This fixed the disappearing menus but anything I save as 16-bit TIFF is still really dark! When I convert to Exif-JPEG or strip out the mid-fine JPEG in the RAW image they both look fine - not dark at all.

I haven't been following the list closely - has anyone else had this problem? More importantly, is there a fix? I'm assuming a complete uninstall including removing possibly corrupt driver settings files might be in order... Let me know, thanks,

Dave.

Roger_Cavanagh
10th of March 2003 (Mon), 05:24
Dave,

Linear TIFF's are supposed to be dark: they represent the image data as seen by the camera. The gamma (brightness) has not been adjusted.

If you have been getting converted images that look OK, I doubt that you have been using linear conversion.

Try converting an image without the linear option checked under Preferences to see whether there is a difference.

Regards,

dblunt
10th of March 2003 (Mon), 09:31
Aargh. I could have sworn that I'd always had linear checked - but you are correct that an image with linear unchecked does appear at the brightness I would have expected.

So, sorry for using this as further education, but putting words into your mouth... are you saying that the RAW data for these typical outdoors shots at ISO 100 are not using anywhere near the sensors' dynamic range of light sensitivity and thus when the image is stored, a gamma is also stored alongside that data? (the gamma essentially coming from the exposure meter and other settings) When the preview image is computed in the TWAIN driver that gamma is applied, or when the mid-fine JPEG the camera wrote into the file is displayed the camera used that gamma in computing that JPEG?

If this is all correct then I guess I understand. Thanks,


Dave.

Roger_Cavanagh
10th of March 2003 (Mon), 16:02
dblunt wrote:
Aargh. I could have sworn that I'd always had linear checked - but you are correct that an image with linear unchecked does appear at the brightness I would have expected.

Oh well, we've all been there and done that, or something similar. :)

So, sorry for using this as further education, but putting words into your mouth... are you saying that the RAW data for these typical outdoors shots at ISO 100 are not using anywhere near the sensors' dynamic range of light sensitivity and thus when the image is stored, a gamma is also stored alongside that data? (the gamma essentially coming from the exposure meter and other settings) When the preview image is computed in the TWAIN driver that gamma is applied, or when the mid-fine JPEG the camera wrote into the file is displayed the camera used that gamma in computing that JPEG?

If this is all correct then I guess I understand. Thanks,


Sorry, Dave, I'm not quite sure what you're driving at here. Rather than me answer the wrong question, can you rephrase?

Regards,

dblunt
10th of March 2003 (Mon), 16:40
Hi,

I wanted you to confirm my understanding of linear and why the linear TIFF is dark - sometimes I end up writing really long sentences...

The sensor is a light detector that counts photons hitting each element/pixel. The counters that store this information can count up to a certain limit - it might be 10,000,000. After the shutter closes, you've got these counts of photons on each element. Unless you've pointed your camera at the sun for a long time, it's unlikely that any counter is anywhere near 10,000,000 - right?

When the camera or your PC software converts this to a JPEG it rescales this dynamic range (0-10,000,000 in the above example) to 0-255 (8 bit) or 0-65,335 (16 bit), correcting with the gamma value you're talking about? So that 'white' is 255 (or 65,335)? (I'm ignoring separation of color into RGB channels here).

Converting linearly to TIFF ignores the gamma value and doesn't do any rescaling of the raw data. Is that right?

Finally, the gamma value must be recorded somewhere in the RAW file and be based on the exposure settings you selected?

Roger_Cavanagh
11th of March 2003 (Tue), 03:38
Dave,

I belivee you're right about data not being re-scaled. But I don't know the logic of how linear is transformed into non-linear in the camera, but never being one not to blather when given the opportunity... :)

The following is speculation: Since gamma in linear space is 1, this doesn't need to be recorded, and once the data has been captured the amount of light measured by each sensor site is fixed, so shutter and f/stop are not needed (except as historical reference data).

One piece of evidence to support this speculation: when you are processing a linear file you don't use the exposure data to adjust processing in any way. Both LinearSharpen and LinearPro Batch apply curves to increase the gamma of the image. These curves are the same for every picture.

A final point is that raw data is actually 12-bit not 16-bit, so has a range of 4096 values, which is mapped into 16-bit during conversion.

Regards,

marcel wouters
17th of March 2003 (Mon), 01:56
Dave,
looking a linear image in a small non linear gamut like srgb space give a very dark look.
To display properly your image before adjustement you need 2 things.
First assign as working space a bigger gamut linear space like "aim rgb pro gamma 1", your image will look much brighter.
Second assign to your image the correct camera profile, your image must look much better!