Author Topic: LV colorimetry  (Read 2812 times)

markanini

  • New to the forum
  • *
  • Posts: 35
LV colorimetry
« on: September 24, 2016, 05:13:11 PM »
On my 600D H264 uses BT.601 color matrix. Jpegs use sRGB (BT.709 equivalent). Does anyone know if LV in shoot mode uses a consistent sRGB/BT.709 colorimetry?
Gear: Canon 600D + EF-S 18-55mm IS II, Yongnuo YN560IV.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10704
  • 5D Mark Free
Re: LV colorimetry
« Reply #1 on: September 24, 2016, 05:27:37 PM »
Hm, so far only 5D3 and 6D are configured to use BT.709 in ML, and all others assume BT.601. I bet more recent cameras may use BT.709, although nobody checked it, to my knowledge.

This affects RGB overlays and some previews (e.g. screenshots), and it's probably not obvious to the average user.

You can find out by dumping the YUV image buffers from the Debug menu (422 format) and trying to interpret them as either 709 or 601 - the right matrix should probably match Canon's JPEG or H.264. There are converters for the 422 format around.

markanini

  • New to the forum
  • *
  • Posts: 35
Re: LV colorimetry
« Reply #2 on: September 29, 2016, 10:12:21 PM »
I placed red objects on a table and dumped the image buffers and converted with 422ToImage v1.9.2. Then loaded the jpeg into avisynth:
Code: [Select]
Y = JpegSource(source, rec=0, channel=0)
U = JpegSource(source, rec=0, channel=1).Spline36Resize(Y.width(), Y.height())
V = JpegSource(source, rec=0, channel=2).Spline36Resize(Y.width(), Y.height())
YToUV(U,V,Y)
ConvertToRGB32(matrix = "PC.601")

and compared to the last line replaced with

Code: [Select]
ConvertToRGB32(matrix = "PC.709")
The first one looked more correct. The second had red shift to yellow, which would be expected from a BT.601 image interpreted as BT.709.

The conslusion I can draw from this: 600D assumes a BT.601 output device. This may also explain why I was adding too much magenta when monitoring on my phone display which is calibrated to sRGB (which shares primaries with BT.709). In case color remapping cant be done effectively in camera I have raised the issue with Chainfire, developer of DSLR Controller: http://forum.xda-developers.com/showpost.php?p=68892617&postcount=3787
Gear: Canon 600D + EF-S 18-55mm IS II, Yongnuo YN560IV.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10704
  • 5D Mark Free
Re: LV colorimetry
« Reply #3 on: September 29, 2016, 10:33:13 PM »
Nice find.

Would be nice to run the same test on all other cameras (so ML should know what color matrix to use). Volunteers?

markanini

  • New to the forum
  • *
  • Posts: 35
Re: LV colorimetry
« Reply #4 on: September 30, 2016, 12:06:36 AM »
Nice find.

Would be nice to run the same test on all other cameras (so ML should know what color matrix to use). Volunteers?

What can ML do with matrix data at this point?
Gear: Canon 600D + EF-S 18-55mm IS II, Yongnuo YN560IV.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10704
  • 5D Mark Free
Re: LV colorimetry
« Reply #5 on: September 30, 2016, 12:10:08 AM »
Exactly what I've mentioned in first post (nothing realtime).

markanini

  • New to the forum
  • *
  • Posts: 35
Re: LV colorimetry
« Reply #6 on: September 30, 2016, 02:13:40 AM »
A custom picture style could be used for realtime. With REC PicStyle enabled you can simulate  BT.709 while setting up a shoot. Or if you skip REC PicStyle it actually becomes BT.709 conversion, just edit the file headers afterwords, you lose some color range though. Lately I'm checking the picture style hacking thread daily :)
Gear: Canon 600D + EF-S 18-55mm IS II, Yongnuo YN560IV.

markanini

  • New to the forum
  • *
  • Posts: 35
Re: LV colorimetry
« Reply #7 on: December 08, 2016, 10:36:19 PM »
It seems DSLR Controller dev is working on implementing color conversions for LV mirroring: http://forum.xda-developers.com/showpost.php?p=69952745&postcount=3854
Gear: Canon 600D + EF-S 18-55mm IS II, Yongnuo YN560IV.