Re: [Lcms-user] Creating equivalent matrix-shaper and 3D LUT profiles, problem with BPC
An ICC-based CMM for color management
Brought to you by:
mm2
From: Pekka P. <pek...@ha...> - 2024-03-21 15:29:49
|
On Tue, 19 Mar 2024 10:16:12 +0100 <mar...@li...> wrote: > Hi, > > > I have understood that LittleCMS has already made that decision for me, > for > > the v4 perceptual rendering intent: > > https://github.com/mm2/Little- > > CMS/blob/46355888b823b563db928faec59b0312a05e1143/src/cmscnvrt. > > c#L1129-L1133 > > That was a long time ago. You probably know about V4 and perceptual PCS. > For V4, ICC decided to define a different PCS for perceptual and saturation > intents. This PCS is almost identical to relative colorimetric but with a > perceptual black point. This decision messed out things to incredible > levels, converting some combined transforms in a big mess. Just consider a > scanner to printer going rel. colorimetric in scanner and perceptual on > printer. > To make things worse, I found a lot of matrix-shaper profiles claiming to be > V4 and providing only one set of matrix-curves. Obviously, this cannot give > zero and perceptual black at same time, so I reported the issue to ICC (I > was in the committee at that time) and get the answer "all those profiles > are wrong". Does that mean that it is basically illegal to craft a v4 profile with only TRC and Colorant tags, without any BToA0/BToD0 tags? Looking at ICC v4.4, there is no requirement for any *To* tags for a three-channel Display class profile. They really should say if more tags are required. > Then, since I could not discard such big number of profiles, I tried to > imagine a way to automatically do the rescaling from different PCS. And > found BPC to work fine for that. So, the idea behind this change is to > increase inter-operability and fix broken profiles. Given the spec, your decision does make sense to me. I actually had been wondering "which PCS" should win when a profile contains only TRC and Colorant tags, but no *To*0 tags, and why the ICC spec does not seem to say. I see now. I have understood that the cLUT profiles I generate are badly formed when they (the perceptual tags) do not map device black to the v4 perceptual PCS black. This causes my tests to fail. Therefore when constructing my cLUT, I am adding a BPC step that matches what LittleCMS would do. Then the device black point matches PCS expectations, and my both matrix-shaper and cLUT profiles produce identical results via LittleCMS. I've also wondered why BPC is not done twice: from source to PCS and PCS to destination. I suppose if PCS by definition has that hardcoded non-zero black point, then any conversion to/from PCS already has the PCS black point, and BPC would do nothing. But... uh... Thanks, pq |