GithubHelp home page GithubHelp logo

Comments (6)

KelSolaar avatar KelSolaar commented on June 12, 2024

Those are unfortunately expected and related to #1227 as the model fitting does not match exactly yield the input whitepoint which can be verified by converting Lightness J=100 to CIE XYZ:

import colour

print(
    colour.xy_to_XYZ(
        colour.CCS_ILLUMINANTS["CIE 1931 2 Degree Standard Observer"]["D65"]
    )
)

XYZ = colour.sRGB_to_XYZ([1, 1, 1])
print(XYZ)

XYZ = colour.CIECAM02_to_XYZ(
    colour.CAM_Specification_CIECAM02(100, 0, 0),
    **colour.appearance.CAM_KWARGS_CIECAM02_sRGB
)
print(XYZ / XYZ[1])

XYZ = colour.CIECAM16_to_XYZ(
    colour.CAM_Specification_CIECAM16(100, 0, 0),
    **colour.appearance.CAM_KWARGS_CIECAM02_sRGB
)
print(XYZ / XYZ[1])
[ 0.95045593  1.          1.08905775]
[ 0.9505  1.      1.089 ]
[ 0.95854868  1.          1.07335032]
[ 0.95857463  1.          1.07307191]

Cheers,

Thomas

from colour.

mesvam avatar mesvam commented on June 12, 2024

I don't quite understand. Are you saying this is a problem inherent in the model specification of CIECAM16? or just this specific package's implementation?

from colour.

KelSolaar avatar KelSolaar commented on June 12, 2024

The model itself.

from colour.

mesvam avatar mesvam commented on June 12, 2024

It's actually a pretty big difference, dE2000 > 2

import colour
CAM_white = colour.convert([1,0,0], 'CIECAM16 JMh', 'CIE XYZ')
sRGB_white = colour.convert([1,1,1], 'sRGB', 'CIE XYZ')
colour.difference.delta_E_CIE2000(
    colour.convert(CAM_white, 'CIE XYZ', 'CIE Lab')*100,
    colour.convert(sRGB_white, 'CIE XYZ', 'CIE Lab')*100,
)
2.2151311708854311

And it happens no matter the reference white point.

D50 = colour.TVS_ILLUMINANTS['CIE 1931 2 Degree Standard Observer']['D50']/100
CAM_white = colour.convert([1,0,0], 'CIECAM16 JMh', 'CIE XYZ', XYZ_w=D50)
colour.difference.delta_E_CIE2000(
    colour.convert(D50, 'CIE XYZ', 'CIE Lab')*100,
    colour.convert(CAM_white, 'CIE XYZ', 'CIE Lab')*100
)
1.6821909479182446

I'm pretty unnerved to be honest. Isn't the model supposed to use the given white point as the reference? How could it be so far off?

So what's the correct way of dealing with this if we actually want M=0 to correspond to the given white point? When I use discount_illuminant=True, the value is much closer.

colour.convert([1,0,0], 'CIECAM16 JMh', 'sRGB', discount_illuminant=True)
array([ 0.99993111,  1.00004358,  1.00003272])

But is that the correct way to do it? I'm not sure what the interpretation is here.

from colour.

tjdcs avatar tjdcs commented on June 12, 2024

from colour.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.