That page mentions that Duv should be very small so I think this is a good thing. To get it to work nicely I had to scale Duv quite a bit. The optimiser now solves for x and y that both satisfies your function and also minimises Duv. It also gives a way to calculate Duv and so I added that to my optimiser and voila! The problem with your function is that it has approximately infinite solutions, so to solve it nicely you need more constraints, but what? Ol Sen's reference discusses it in some detail and then mentions that you want a Duv to be zero. This fits your function perfectly except for a region in the middle (temp from 256 to 316) where it deviates a bit. To keep it simple I edited most of that out and just give you the final result. This has been through so many revisions and ideas. This seems to work fine with CCT between 200, but maybe confusing is CCT is given in Kelvin here. so for sure Phillips hue temperature given in ct between 153-500 is not a good starting point Kelvin lookupKelvinByMired //max 500 Mired + 1 safe indexįor (Kelvin k = 0 k 25000) fprintf(stderr, "Correlated colour temperature must be in domain, unpredictable results may occur! \n") įloat cct_3 = pow(cct, 3) //(cct*cct*cct) Mired lookupMiredByKelvin //max 6500 Kelvin + 1 safe index Reminder so the following is not a solution, but to find an reverse algo the code may help. The following is not a solution, it's just simple concept of a lookup table.Īnd as the CIE 1931 xy to CCT Formula by McCamy suggests found here it is possible to use a lookup table to find x and y as well.Ī table can be found here but i am not sure if that is the right lookup table. Quite sure Phillips uses a lookup table as a lot CIE algorithms do because there are just 347 indexes in this range from 153 to 500. Mired means micro reciprocal degree wikipedia.Ĭt is possibly used because it is not 100% Mired. Given in ct as color temperature but can be thought as actually being Mired.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |