Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the example Chromacity files - issue with chromaticities #686

Closed
darkyellow opened this issue Mar 10, 2020 · 2 comments
Closed

Using the example Chromacity files - issue with chromaticities #686

darkyellow opened this issue Mar 10, 2020 · 2 comments
Assignees
Labels
Needs Discussion To be discussed in the technical steering committee
Milestone

Comments

@darkyellow
Copy link

I am trying to read the some images with Chromaticities in so I can process them correctly.

In the example images that you can download from github there is a Chromaticities folder with Rec709.exr and XYZ.exr. These should display the same.

The XYZ file has chromaticities provided, the head has this info in

file format version: 2, flags 0x0
channels (type chlist):
B, 16-bit floating-point, sampling 1 1
G, 16-bit floating-point, sampling 1 1
R, 16-bit floating-point, sampling 1 1
chromaticities (type chromaticities):
red (1 0)
green (0 1)
blue (0 0)
white (0.333333 0.333333)
compression (type compression): piz
dataWindow (type box2i): (0 0) - (609 405)
displayWindow (type box2i): (0 0) - (609 405)
lineOrder (type lineOrder): increasing y
owner (type string): "Copyright 2006 Industrial Light & Magic"
pixelAspectRatio (type float): 1
screenWindowCenter (type v2f): (0 0)
screenWindowWidth (type float): 1
type (type string): "scanlineimage"

When I use the XYZtoRGB function with a Y value of 1 the matrix returned is the identity matrix (some minor rounding issues but it basically is). If I convert XYX values to RGB I basically get yellowy petals which is the same as doing no conversion. GIMP produces the same image.

Are the Chromatic values correct here?

@cary-ilm cary-ilm added the Needs Discussion To be discussed in the technical steering committee label Apr 2, 2020
@peterhillman peterhillman self-assigned this Apr 2, 2020
@peterhillman
Copy link
Contributor

Hi @darkyellow.
To display OpenEXR images correctly, you must convert from the file chromaticities to your display's chromaticities. The matrix to do that conversion is given by
RGBtoXYZ( inputChromaticities , 1.0 ) * XYZtoRGB( outputChromaticities , 1.0 )
where inputChromaticities are the file chromaticities and outputChromaticities are the display chromaticities.
If I apply that transform to both Rec709.exr and XYZ.exr, the pictures look the same. Treating the display as Rec709 (the default value for Chromaticities) gives an identity matrix for the Rec709.exr image in this case.

When combined multiple files which have different chromaticities, you should conform them all to the same chromaticities, as your "working space". You may then do a second conversion to the display's chromaticities to display your output correctly.

The example files may be a little misleading, because the XYZ in RGBtoXYZ and XYZtoRGB is merely a transitional space to join the two matrices together, but it happens that one of the example files is in XYZ space.

@cary-ilm
Copy link
Member

Assuming this resolves the issue for now, but feel free to reopen or post another question if you'd like to continue the discussion.

@cary-ilm cary-ilm added this to the v2.5.0 milestone Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion To be discussed in the technical steering committee
Projects
None yet
Development

No branches or pull requests

3 participants