sony colors mystery

I search thru about 300 raw files:

$  exiftool -H -a  -G1 */*.ARW | grep -i "828d\|828e\|c61d\|7310\|787f" | sort -u
[SR2SubIFD]     0x7310 Black Level                     : 512 512 512 512
[SR2SubIFD]     0x787f White Level                     : 15360 15360 15360
[SubIFD]        0x828d CFA Repeat Pattern Dim          : 2 2
[SubIFD]        0x828e CFA Pattern 2                   : 0 1 1 2
[SubIFD]        0xc61d White Level                     : 16380. <only 1>
[SubIFD]        0xc61d White Level                     : 16383

and it looks all those values are the same.

For some reason, there is a single outlier for tag 0xc61d White Level.

The question is which value is correct 15360 or 16383?

This has come up before
 2^14 = 16384 so I doubt the sensor would be that good and that linear basically up to the max possible value
 I suspect the other values for the Sony cameras ie 15300 - 15700 are more likely right

RT’s camconst.json file has a treatise on specifying and determining a camera’s white level:

https://github.com/Beep6581/RawTherapee/blob/dev/rtengine/camconst.json#L133

1 Like

yet another value:

- Sony ARW2: no scaling. Generally black level around 512, and white level 16350 and to be conservative say 16300.

It also looks like the max value is ISO dependent.

Empirically, 15360: if you use 16383 (darktable default) with an image with overexposed areas (sky), you get the effects of clipping (magenta) without the raw clipping indicator showing any over-exposed areas.
Set the raw white point to 15360, and the areas indicated by the clipping indicator correspond to the visually over-exposed areas (more or less).

@priort : the sensor doesn’t fill up to a specific digital value, that’s the job of the amplifier/ADC circuitry. I guess it’s much easier to make sure the valid values are somewhere high enough, and then indicate the maximum reliable value, than to tweak the circuitry to exactly fill up the available range of values


2 Likes

What you say makes intuitive sense to me, but there are also lots of entries in cameras.xml where black = zero and white = 2^N exactly.

I am new to dt and trying to make sense of the RAW & EXIF data so am still unclear as what is completely raw or perhaps massaged-raw data to make a product perform/look good.

1 Like

I would trust the exif data
. Problem for some cameras is they don’t offer a white value at all
the sony ones have it, its just in the maker notes


You can of course do the simple thing and try both but I suspect the one in the maker notes lower that the max possible sensor data is correct


Some of the Canon ones can be even more confusing as they provide no white level or it changes with iso and they give a value around 10000 as max linear ie I assume something like it is linear up to that limit
. But I really don’t know about how this linear value gets used if at all by any raw editors


1 Like

(deleted, wrong thread)

(deleted, wrong thread
)

Well I suspect you could apply offsets or gains or whatever across that 2^14 range and there would be the question of how linear it is across that range
in the end you are going to have in theory 2^14 available for resolution from the sensor but I wonder if most sensors vary enough or batch to batch there is some variability and so this gets pulled back a bit for safety??

1 Like

Apparently this varies based on design - MOST cameras have the ADC clip point set before the sensor saturates, but apparently not all. There was a recent post somewhere on DPR regarding this and “extended ISO” from one particular Panasonic camera - for that camera, the “extended ISO” actually exposed a region of sensor performance where the response was nonlinear.

Aha - found it - How to Measure Full Well Capacity (1) « Harvest Imaging Blog was linked to by Iliah Borg of libraw fame from dpreview recently

2 Likes

Did you want this in the G90 Post??

(deleted, wrong thread)

No just that you were in the parallel post for the G90 and that was talking black point
this was Sony but you might have been crossing over with your comments
 I wasn’t sure


Oh crap, wrong thread. Too many windows


Use the command line flag that lists the groups.
You’ll see that there are multiple sources for metadata inside a raw file , and these white level tags are inside different sources of the same file .

In the cheatsheet is an example to ‘list all tags’, because otherwise exiftool will only list one of these kind of duplicate tags.

Anyway, for Sony there is one in the exif data. That’s the 16384 one . And that is somewhat meant to tell the theoretical max white value you could encounter , based on the bitdepth and file format.

The later one is inside ‘maker notes’, a manufacturer set of tags , that differ per camera maker. For instance it can describe settings of your Sony camera at the time of the shot .

The white level there is IN THIS CASE the better one, because it tells the maximum THIS MODEL can do with these settings.

Fuji has a film simulation bracketing setting:

1 Like

I believe you can also reprocess raw files on the camera or using Fuji’s software.

2 Likes

Yeah, you can, but I think it’s model-dependent.