Libraw and the radiometric response function

I want to understand how the raw files output from Libraw relate to a camera's radiometric response function.

According to various sources (e.g. https://link.springer.com/referenceworkentry/10.1007/978-0-387-31439-6_5....), a camera's radiometric response function (RRF from here on) is a function that transforms sensor irradiance (sensor irradiance has its own definition) into measured intensities (levels/digital numbers) that are the output from the camera. Are these the values we get from the raw files decoded by Libraw? Or are the values transformed somehow?

From what I've read, the RRF is invertible. Applying the inverse of this function to these digital values gives us the sensor irradiance values (or a linear relationship thereof). I believe this is commonly called "linearization", but I'm not sure. Does Libraw (always) output these kinds of "linearized" RAW files, where the inverse RRF has been applied?

I found some forum posts via Google that may be related. For example, in the following post

https://www.libraw.org/node/2003

there are references to an embedded "tone curve" or "linearization curve". Are these the RRF? Are they the inverse of the RRF? Are they something else?

Sorry if this has already been answered or documented. I found no results for "radiometric response function libraw" on Google.

I suspect the answer may not be so simple.

Thank you.

Forums: 

Unprocessed /linearized RAW

Unprocessed /linearized RAW values (after LibRaw::unpack() ) is probably what is you're looking for.

-- Alex Tutubalin @LibRaw LLC

raw files output

These days consumer cameras don't record raw, they record RAW. Big difference, as RAW is processed, sometimes heavily, sometimes using lossy compression.

--
Iliah Borg

Hi Iliah,

Hi Iliah,

This is the first time I've heard anyone refer to "raw" and "RAW" as different things. I use these terms interchangeably, and sometimes "Raw". To me, they all refer to the pixel data encoded in the file. And recovering that pixel data is what a raw decoder is for.

Can you expand a bit on what kind of processing you're referring to with "RAW" data? I know that lossy compression can be applied. So in that sense, yes, I understand that the RAW file loses some information.

Cheers.

I've done more reading on the

I've done more reading on the subject. For one thing, the radiometric response function is also called the camera response function. There are (at least) a couple of references to linearization in DNG. Neither of these is related to the RRF.

There are many papers on the subject of inverting or reversing the camera capture pipeline. That is, starting from the RAW file, applying inverse transforms to recover the sensor irradiance at each pixel.

I think that is the kind of thing I'm looking for. So it would appear that a simple RAW decoder—one that simply decodes and decompresses a camera RAW file—neither applies nor unapplies a RRF. That is, unless it's part of some particular camera's inherent RAW processing. However, that does not appear to be the case with NEF, at least.

Cheers.

> a simple RAW decoder—one

> a simple RAW decoder—one that simply decodes and decompresses a camera RAW file—neither applies nor unapplies a RRF

Correct.

> unless it's part of some particular camera's inherent RAW processing. However, that does not appear to be the case with NEF, at least.

White balance pre-conditioning? Noise reduction? Tricks with black level? etc, etc...

--
Iliah Borg