Ad
Ad
Ad
Pages: [1]   Bottom of Page
Print
Author Topic: Why are ForwardMatrix1 same as ForwardMatrix2 in Adobe's DCP files?  (Read 1896 times)
torger
Sr. Member
****
Offline Offline

Posts: 1580


« on: November 15, 2013, 11:33:46 AM »
ReplyReply

A technical question. I'm implementing some DCP handling code and did just some dual illuminant handling according to the DNG specification with matrix interpolation and all for intermediate whitepoint temperatures.

Only to discover that all(?) Adobe profiles have exactly equal ForwardMatrix1 and ForwardMatrix2, ie the same matrix for StdA and D65, which means that interpolation has no effect.

Someone who knows why the profiles are this way?
Logged
Vladimirovich
Sr. Member
****
Offline Offline

Posts: 1320


« Reply #1 on: November 15, 2013, 12:27:24 PM »
ReplyReply

Only to discover that all(?) Adobe profiles have exactly equal ForwardMatrix1 and ForwardMatrix2

all profiles that I saw(bothered to decompile using dcptool from SandyMc) had different matrices... which specific Adobe-supplied profile has it equal for example ?

Logged
torger
Sr. Member
****
Offline Offline

Posts: 1580


« Reply #2 on: November 15, 2013, 01:59:00 PM »
ReplyReply

Need to double check after the weekend, but I'm indeed quite sure they are the same. Dcp tool and my software says the same :-). I've looked at various profiles bundled with the dng converter.

What is indeed different is the color matrices (ColorMatrix1 and ColorMatrix2 tags), but these are only used for deriving the white balance when forward matrices are available (which they always are these days). The forward matrices are used for the actual color rendering, and those two are the same.

Logged
Vladimirovich
Sr. Member
****
Offline Offline

Posts: 1320


« Reply #3 on: November 15, 2013, 02:37:33 PM »
ReplyReply

Need to double check after the weekend, but I'm indeed quite sure they are the same. Dcp tool and my software says the same :-). I've looked at various profiles bundled with the dng converter.
so any specific camera in mind ? you looked through many, so you can give an example...

here is D800e for example from dcptool :

  <ForwardMatrix1 Rows="3" Cols="3">
    <Element Row="2" Col="2">1.083800</Element>
    <Element Row="2" Col="1">-0.294500</Element>
    <Element Row="2" Col="0">0.035900</Element>
    <Element Row="1" Col="2">-0.129600</Element>
    <Element Row="1" Col="1">0.887500</Element>
    <Element Row="1" Col="0">0.242100</Element>
    <Element Row="0" Col="2">0.071400</Element>
    <Element Row="0" Col="1">0.169200</Element>
    <Element Row="0" Col="0">0.723700</Element>
  </ForwardMatrix1>
  <ForwardMatrix2 Rows="3" Cols="3">
    <Element Row="2" Col="2">0.969000</Element>
    <Element Row="2" Col="1">-0.167900</Element>
    <Element Row="2" Col="0">0.024000</Element>
    <Element Row="1" Col="2">-0.289600</Element>
    <Element Row="1" Col="1">1.016800</Element>
    <Element Row="1" Col="0">0.272800</Element>
    <Element Row="0" Col="2">-0.053000</Element>
    <Element Row="0" Col="1">0.306100</Element>
    <Element Row="0" Col="0">0.711100</Element>
  </ForwardMatrix2>


OR Olympus E-M1

  <ForwardMatrix1 Rows="3" Cols="3">
    <Element Row="2" Col="2">0.648800</Element>
    <Element Row="2" Col="1">0.002200</Element>
    <Element Row="2" Col="0">0.174100</Element>
    <Element Row="1" Col="2">0.034400</Element>
    <Element Row="1" Col="1">0.768100</Element>
    <Element Row="1" Col="0">0.197600</Element>
    <Element Row="0" Col="2">0.117700</Element>
    <Element Row="0" Col="1">0.446200</Element>
    <Element Row="0" Col="0">0.400500</Element>
  </ForwardMatrix1>
  <ForwardMatrix2 Rows="3" Cols="3">
    <Element Row="2" Col="2">0.641900</Element>
    <Element Row="2" Col="1">0.002100</Element>
    <Element Row="2" Col="0">0.181100</Element>
    <Element Row="1" Col="2">0.054600</Element>
    <Element Row="1" Col="1">0.635100</Element>
    <Element Row="1" Col="0">0.310300</Element>
    <Element Row="0" Col="2">0.175000</Element>
    <Element Row="0" Col="1">0.274100</Element>
    <Element Row="0" Col="0">0.515200</Element>
  </ForwardMatrix2>
Logged
torger
Sr. Member
****
Offline Offline

Posts: 1580


« Reply #4 on: November 15, 2013, 04:03:04 PM »
ReplyReply

Thanks for the data. I must have something wrong in mine somewhere because I actually looked at d800 and they were the same. I'll report back when I find out what the problem was. Thanks for helping.
Logged
Vladimirovich
Sr. Member
****
Offline Offline

Posts: 1320


« Reply #5 on: November 15, 2013, 04:21:30 PM »
ReplyReply

indeed it will be highly improbable for Adobe to do this for many cameras, for one obscure model as some bug may be... and dcptool is used by many, so bugs there shall be also long time since found
Logged
madmanchan
Sr. Member
****
Offline Offline

Posts: 2110


« Reply #6 on: November 15, 2013, 07:20:42 PM »
ReplyReply

The ForwardMatrix tags are used to transform white-balance linear camera coordinates to CIE XYZ space (D50 reference illuminant).  In many cases these tags perform the majority of the color correction (e.g., a matrix that performs the color transform). 

The advantage of the matrix is that it's a very smooth transform and also very efficient.  A disadvantage of the matrix is that some colors can clip.  Therefore, in some cases we instead use an empty (null transform) matrix and perform the bulk of the color correction using tables.  This helps to preserve detail in saturated colors.  In the cases where we use an empty/null transform matrix, you'll see the same values used for both ForwardMatrix1 and ForwardMatrix2.
Logged

torger
Sr. Member
****
Offline Offline

Posts: 1580


« Reply #7 on: November 15, 2013, 09:49:28 PM »
ReplyReply

Thanks! I think my dcp files are a bit strange though too. Found none that had different matrices and I looked at many files. Shall verify when I get back to my station.

When reading the dng spec I also noted that while interpolation formulas for white point and temperature are well specified, there is no table of what the calibration illuminants temperatures are. That d65 is 6500 is natural but there are others that are less clear. I looked in the reference code though and use those values. But maybe the spec too should contain those values otherwise the interpolation is still up for free interpretation :-)
Logged
Vladimirovich
Sr. Member
****
Offline Offline

Posts: 1320


« Reply #8 on: November 16, 2013, 09:36:10 AM »
ReplyReply

Thanks! I think my dcp files are a bit strange though too. Found none that had different matrices and I looked at many files. Shall verify when I get back to my station.
I see - you were checking the profiles that Adobe uses to simulate OEM-rendering... there indeed are many like this vs Adobe Standard profiles.
Logged
torger
Sr. Member
****
Offline Offline

Posts: 1580


« Reply #9 on: November 16, 2013, 11:56:23 AM »
ReplyReply

I see - you were checking the profiles that Adobe uses to simulate OEM-rendering... there indeed are many like this vs Adobe Standard profiles.

My development box is a bit of a mess, I've moved around DCP files for testing so I'm not 100% sure where they come from. I thought it didn't really matter but I guess I have to rethink that :-). The files I've been looking at should either be from Adobe Dng Converter of some year-old OS X installation or from my fairly recent Lightroom Windows 8 installation, but DNG Converter is a more likely source (I'm developing mostly on Linux, the software is cross-platform). I'll make sure too look at the ones bundled with Lightroom when I get back, as I suppose those are the "state of the art" concerning dual illuminant DCPs.
Logged
torger
Sr. Member
****
Offline Offline

Posts: 1580


« Reply #10 on: November 17, 2013, 04:58:29 AM »
ReplyReply

Got to my workstation and looked around a bit.

When developing I have looked in the "Camera" directory with the profiles there (Standard, Neutral, Landscape, etc) and not the "Adobe Standard" directory. In the Camera directory the DCPs seems to have equal forward matrices and only a look table, ie there can only be one type of rendering despite dual illuminants.

However in the Adobe Standard directory the profiles have separate forward matrices, two HueSatDeltas tables and a look table.

I had been thinking against better knowledge that "Adobe Standard" contained basic simplistic profiles and the more advanced would be found in the "Camera" directory, but obviously I was wrong, it's the other way around Smiley
« Last Edit: November 17, 2013, 05:06:42 AM by torger » Logged
Pages: [1]   Top of Page
Print
Jump to:  

Ad
Ad
Ad