Newbie question on linearity between radiant intensity and counts


Posting rules: It shouldn't need saying, but... play nice. Please keep your discussions civil. You can disagree, just don't be disagreeable. And, of course, all of the usual stuff like no spamming. Tex adds: I'll be rigorously enforcing this as we go along. We're probably going to be a small community in a little lifeboat, so we can't have members at each others' throats. This is for the sake of the project as a whole. So when you post, pretend you're speaking in person with your very wealthy auntie who has always treated you wonderfully and currently lists you prominently in her will. I won't be tossing anyone out of the forums because we are all in this together (except spammers: immediate membership cancelation), but I'll delete suspect posts right away.


8 posts / 0 new
Last post
ses_bnl_gov
Newbie question on linearity between radiant intensity and counts

Hello I am new to this forum. Perhaps this is a FAQ. We are doing technical  photography in which we want output counts (after converting RAW to 16-bit Tiff) to be linear in radiant intensity hitting the pixel. To be more specific, we are using Fujifilm Finepix S1 (an amazing camera, 50 x zoom, effective 35 mm focal length 24 mm to 1200 mm) and have been using provided proprietary software "Silkypix". We had assumed that the transfer function is linear, but have been questioned on this. So I discovered this site, actually also DCRaw, which led me to this. I see on the DCRaw page that the S1 is supported, so I assume that is the case with the Mac port (I am a mac guy).

So certainly I intend to compare some images obtained with the Silkypix Raw converter and the Lightzone port of DCRaw. But the more general question is over the linearity of output counts in tiff file (0-65535) vs radiant intensity in.

As I say, maybe a FAQ, and if there are links to any pertinent discussions, that would help, as well as any specific response.

And is there a way to access older posts in a thread? I could only access what seems to be the most recent two pages.

Thanks - steve

tex
Sorry I can't help you...

Even though I help run this site and have been using LZ since 2006, I have never needed to know what you are asking.  I am hoping someone else here can tell you.

On the second matter, I am curious to hear about page access.  Thanks for alerting us, will check into it.

ses_bnl_gov
thanks, tex; I have since

thanks, tex; I have since been in correspondence with dave coffin on this. Short summary: it's complicated. He suggests doing some linearity tests, which should be straightforward as we have an optics lab, with integrating sphere and calibrated photodiode. Put in a neutral density filter and see if counts go down by expected factor. If not, we have a way to back out a correction.

I did some comparisons of LightZone vs the Raw to Tiff converter software supplied with our camera (Silkypix; Fujifilm FinePix s1). There are some quite unsettling differences in plot of counts from one software vs counts from the other on a pixel by pixel basis. Something going on under the hood that needs to be understood. -steve

Doug
I'm not sure what you're trying to do

The Raw file contains linear counts. A Raw converter, like LightZone or SilkyPix, then creatively interprets that data using various algorithms guided by user input such as white balance setting, to produce an RGB image. Because the algorithms are different between different Raw converters, the RGB image data will be different. Even with the same basic algorithm, different Raw converters have different ways of applying white balance and other user inputs.

RGB image files such as JPEG and TIFF are encoded to a specific color space, so that a given data value has a rigorously defined color meaning. The most common color space is sRGB, with Adobe RGB 1998 in a distant second place and almost no other color space routinely being used for image files. RGB color spaces have a gamma curve associated with them, intentionally introducing non-linearity. This non-linearity is desirable for retaining detail in the shadows, and essentially every output device expects this kind of non-linear data in RGB images.

Furthermore, data in RGB image files such as JPEG and TIFF generally aren't actually in RGB format. They're typically in Y'Cb'Cr' format (the ' marks denote the use of a gamma curve).

If you just want the raw sensor data, then you should be looking at the Raw file. If you need a somewhat more standardized format for the Raw file, you can convert it to a DNG file using Adobe's free DNG Converter (or Lightroom or Adobe Camera Raw), or you can convert it to a PPM file using dcraw.

sfink16
Doug: Non-linearity

So if I wan to retain detail in shadows, should I consider using TIFF over JPG?

 

Steve

Doug
Consider 16-bit

8-bit TIFF won't gain you anything over JPEG except eliminating the compression. 16-bit TIFF gives a much larger data range.

On the other hand, with the usual (sRGB or Adobe RGB) gamma curve applied, even 8-bit data can still contain a lot of shadow detail. It depends on how much detail you captured and how much you want to retain.

For most people's workflows, TIFF doesn't offer anything useful. Original files are either Raw or JPEG, and [converted] output files usually need to be sRGB JPEG for emailing, posting on the web, and commercial printing. For home printing, you can print directly from LightZone without making an intermediate file.

sfink16
Thanks Doug

I alwasy wondered what I gained if I was just converting it back to JPG for the reasons you mentioned.  I was trying to use 16-bit TIFF but for some reason LZ was hanging and/or crashing.  If it doesn't gain me that much unless printing from LZ at home perhaps I'll stop looking at it further.

 

Thanks again Doug for clearing that up!

 

Steve

tex
And I would add that

unless you are doing very critical artwork or art repro, some form of hyper critical forensic photography, highest quality commercial product, fashion or architectural photography, 16 bit TIFF's are most likely serious overkill.  It's definitely overkill for personal photography, no matter how precious the subject.  It's like lenses: you can get a really good lens for $800-$1,500 usd, or one that is demonstrably better for 2-3x that---but it's only maybe less than 10% better.  Yes, it's demonstrably better, but....