ExifTool Forum

General => Metadata => Topic started by: adrian_bacon on July 12, 2019, 07:28:47 PM

Title: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 12, 2019, 07:28:47 PM
I'm a long time exiftool user and recently ran into something where I'm not sure if it's a bug, a feature needing a request, or if it's information that just isn't available.

I have a Canon EOS M5 and have my own raw processor that I use. I don't have any problems with extracting the sample bias, but for some reason, white level, specular white level and max level seem to be incognito and I for the life of me can't seem to get exiftool to extract those tags. On my 80D (and every other canon DSLR I own that info is there and exiftool has no problem getting it out. That being said, this is my first Canon camera with their digic 7 processor, all my other ones are older processors. So my question is: is this something that Canon changed and that info isn't in the file, or is this something that exiftool could do if somebody asked to have it added?

I can supply sample images if needed.
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: Phil Harvey on July 14, 2019, 08:46:25 PM
That information is likely available.  I'll see what I can do and post back here if I need some samples.  Give me a week or so.

- Phil
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 15, 2019, 10:57:33 AM
Thank you.  If it helps I plugged the 80D white levels into my raw processor for the M5 images and that seems to render correctly for the images I've taken so far, though, I'd still prefer to extract it from the image files if it's available as sometimes the values change depending on ISO, etc.
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: Phil Harvey on July 15, 2019, 11:10:40 AM
Looking through the masses of unknown values in the Canon ColorData5 record for the M5, there are two that look interesting.  Try this command:

exiftool -U -Canon_ColorData5_0x0569 -Canon_ColorData5_0x056a FILE.cr2

Could these possibly be the NormalWhiteLevel and SpecularWhiteLevel?

- Phil
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: Phil Harvey on July 15, 2019, 11:20:43 AM
I ran some tests by altering these values and looking at the results in DPP4.  I think these are the values we are looking for.  If you agree, then I'll add support for decoding these in the next release.

- Phil
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 15, 2019, 11:04:14 PM
That seems logical, but boy, do they sure seem low... I'd be more inclined to think the specular white would be Canon_ColorData5_0x0589 as I had through some experimentation tried out the 12800, and didn't get magenta highlights with it (see attachment, hugely over exposed, telling my raw processor to clip things off at 12800 minus the sample bias, no magenta poking out anywhere)

Canon_ColorData5_0x0569 would most likely be the max linear level as Canon usually has those right around the 10000 mark, with Canon_ColorData5_0x056a maybe the normal white, or it could also possibly be Canon_ColorData5_0x0794...

All this being said, you're a lot more knowledgeable about how this stuff is laid out than me.  I know 12800 minus the sample bias doesn't show magenta anywhere if you clip things off there, and that's close to the highest reasonable value I'd expect to see that didn't mean anything else in the colordata5 stuff.

I have a handful of images similar to the attached screenshot where I can submit the cr2s if you want them.  I made them for trying to determine where the specular white was, as I was also spelunking through the unknown tags trying to find something that seemed to make sense.  There's really three values I care about besides the sample bias: Max Linear, Normal White, and Specular White.  I care about the max linear because I have a highlight rebuilding algorithm that pays attention to that to try to avoid color casts when re-building any highlights where the green channel is clipped and the red and blue are below the max linear.  Above the max linear, it does something different (and yes, my raw processor outputs DNG files, which is why you see it as a DNG in the screenshot, floating point dng is it's native output).
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: Phil Harvey on July 16, 2019, 07:50:34 AM
What sample bias are you using?

I looked again through all of the -U ColorData5 values in my sample, and the ones I identified are the only two values in the range 10000-15000, so if these aren't them then I don't think they are stored there.  The only other value that is close could perhaps be the LinearityUpperMargin?:

Canon Color Data 5 0x02db       : 9994

In my sample, Canon_ColorData5_0x0794 has a value of -1, so I don't think this could be it.

I am definitely not the expert on raw development.  All the identification of these types of tags has been thanks to LibRaw.

- Phil
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 16, 2019, 02:17:11 PM
For the screenshot, the sample bias is 512. Starting with the 80D, all  ISOs 400 or less use 511 or 512, and everything above ISO 400 uses 2047 or 2048 for the bias, at least for the bodies I have.

So for the screenshot, the actual clipping value would be 12800 - 512.
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 16, 2019, 02:30:16 PM
When I get some time later today or tomorrow, I'm going to progressively walk the value up from 12800 to see where magenta really starts poking out. Using lower values doesn't do bad things to the image, but it does leave highlight headroom on the table.

Also, my M5 body has the 1.0.1 firmware.
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 16, 2019, 03:39:55 PM
One last observation, if you take the CR2 and import it directly into Lightroom and have Lightroom make a DNG, Lightroom sets the white level at 16000.
Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 20, 2019, 12:57:39 AM
Sorry, been busy.... So I ran this against my sample images that I created and came up with this (see below).  The initial values you came up with Dave appear to change from exposure to exposure, so it looks like that they very well just might be what we're looking for.  It also appears that the bias level cutoff point between 512 and 2048 has been changed so that 320 and up uses 2048, and ISO 250 and lower use 512.  If you want, I can zip up these files and make them available to download for your uses.  There isn't anything special about them other than they are meant to be used for looking at the meta-data.

exiftool -U -Canon_ColorData5_0x0569 -Canon_ColorData5_0x056a -Canon_ColorData5_0x02db -PerChannelBlackLevel -ISO *.CR2
======== 20190628_0001.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 800
======== 20190628_0002.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 320
======== 20190628_0003.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 250
======== 20190628_0004.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 250
======== 20190628_0005.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 800
======== 20190628_0006.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 2000
======== 20190628_0007.CR2
Canon Color Data 5 0x0569       : 11435
Canon Color Data 5 0x056a       : 11892
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 100
======== 20190628_0008.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 250
======== 20190628_0009.CR2
Canon Color Data 5 0x0569       : 11435
Canon Color Data 5 0x056a       : 11892
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 125
======== 20190628_0010.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 320
======== 20190628_0011.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 320
======== 20190628_0012.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 320
======== 20190628_0013.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0014.CR2
Canon Color Data 5 0x0569       : 11435
Canon Color Data 5 0x056a       : 11892
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 100
======== 20190628_0015.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0016.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0017.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0018.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0019.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0020.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 500
======== 20190628_0021.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 5000
======== 20190628_0022.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0023.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0024.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0025.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0026.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0027.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0028.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0030.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0031.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0032.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0033.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0034.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0035.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0036.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0038.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 20190628_0039.CR2
Canon Color Data 5 0x0569       : 11435
Canon Color Data 5 0x056a       : 11892
Canon Color Data 5 0x02db       : 9949
Per Channel Black Level         : 512 512 512 512
ISO                             : 100

Title: Re: Canon EOS M5 white level, specular white level, etc.
Post by: adrian_bacon on July 20, 2019, 01:10:01 AM
More interestingness:

exiftool -U -Canon_ColorData5_0x0569 -Canon_ColorData5_0x056a -Canon_ColorData5_0x02db -PerChannelBlackLevel -ISO *.CR2
======== 2019071900_0394.CR2
Canon Color Data 5 0x0569       : 11435
Canon Color Data 5 0x056a       : 11892
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 100
======== 2019071900_0395.CR2
Canon Color Data 5 0x0569       : 11435
Canon Color Data 5 0x056a       : 11892
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 125
======== 2019071900_0396.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 160
======== 2019071900_0397.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 200
======== 2019071900_0398.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 512 512 512 512
ISO                             : 250
======== 2019071900_0399.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 320
======== 2019071900_0400.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 400
======== 2019071900_0401.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 500
======== 2019071900_0402.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 640
======== 2019071900_0403.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 800
======== 2019071900_0404.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 1000
======== 2019071900_0405.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 1250
======== 2019071900_0406.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 1600
======== 2019071900_0407.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 2000
======== 2019071900_0408.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 2500
======== 2019071900_0409.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 3200
======== 2019071900_0410.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 4000
======== 2019071900_0411.CR2
Canon Color Data 5 0x0569       : 10336
Canon Color Data 5 0x056a       : 10749
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 5000
======== 2019071900_0412.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 6400
======== 2019071900_0413.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 8000
======== 2019071900_0414.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 10000
======== 2019071900_0415.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 12800
======== 2019071900_0416.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 16000
======== 2019071900_0417.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 20000
======== 2019071900_0418.CR2
Canon Color Data 5 0x0569       : 13035
Canon Color Data 5 0x056a       : 14338
Canon Color Data 5 0x02db       : 9932
Per Channel Black Level         : 2048 2048 2048 2048
ISO                             : 25600