Hi Stuart,

There was a slightly wrong assumption on 1.12, which was fixed in 1.13

The assumption was to use tetrahedral interpolation on any colorspace. 
This worked well on average, but was giving small errors on some special 
spaces,  like Lab.

The reason is, Lab holds luma in the left channel, so, on several cases,
tetrahedral was using only one gridpoint of L* and remaining 3 on a, b. 
Tetrahedral works well *only* if luma is centered, RGB or CMY for 
example. For other cases, the CMM must use trilinear. In 1.13, the 
interpolation method is dynamically choosen on depending of space. 
Also, the precision of interpolation was improved in 1.13 

This would explain half of the weird results you are reporting.

The another half is due to the "smoothing" that precalculation does 
apply to transforms.So, in low res precalc and high res precalc, the 
smoothing was somehow correcting the wrong interpolation. 

Let's try with 1.13:

F:\lcms>icctrans -c0 -i*Lab  -o "sRGB Color Space Profile.icm"
little cms ColorSpace conversion calculator - v1.7

Enter values, 'q' to quit
L*? 0.4
a*? -0.1
b*? 0.3

R=1.32 G=1.67 B=0.77

That is right. Using different precal methods (-c0, -c1, -c2 and -c3)  gives 
small differences, due to the smoothing induced by the precalculated LUT, 
and the fact  Lab not is well centered in ICC PCS, but all inside expected 
tolerances. 

So, the conclusion would be: use 1.13 instead :-)

Regards,
Marti.

----- Original Message ----- 
From: "Stuart Nixon" <[EMAIL PROTECTED]>
To: "Marti Maria" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 16, 2004 5:55 PM
Subject: [Lcms-user] cmsFLAGS_LOWRESPRECALC generates better near-black results than 
the normal CLUT?


Marti,

Wondering if you have any clues on a problem with near-black
rendering. Using 1.12 I've been seeing a strange problem I
keep meaning to ask you about:

Processing is 16 bits/channel input/output, Perceptual, Black Point
compensation, going from PCS to a common profile such as Adobe RGB or sRGB:

When rendering, I've found that unless cmsFLAGS_LOWRESPRECALC
or cmsFLAGS_HIGHRESPRECALC is present, then near-black values are 
rendering to black.

Yet when turning cmsFLAGS_[LOW|HIGH]RESPRECALC on, I get results that are
closer to the expected values.   I've done some testing, and
this happens pretty much regardless of output profile, and
also regardless of if Black Point compensation is on or off, and in
all 4 rendering intents (although it may be that not all profiles
have all 4 intents and so are using the same BtoA's).

The values getting reduced to pure black are values that have Lab
with less than about 0.5 L (measured in 0 to 100 range as 16 bit
values).  For example:

With cmsFLAGS_LOWRESPRECALC or cmsFLAGS_HIGHRESPRECALC:
Lab(0.4,-0.1,0.3)    -> sRGB    RGB(0x0202, 0x01a0, 0x00cb)

Without either of these flags set, the same Lab value goes to output RGB(0,0,0)


Any ideas?  As you know, I optimised cmsTrilinearInterp16 with
that loop unrolling and fast double to int code I sent you, but that
does not seem to be the cause (I just retested with the original code
and the problem is still there).


It seems a bit strange to me.  I thought the default CLUT was 33 point,
and that cmsFLAGS_HIGHRESPRECALC used a 48 point CLUT and LOWRES
uses a smaller one.  So why would the problem only occur if you don't
specify either of the two PRECALC flags?


Regards,

Stuart

p.s. The problem is present with or without dwFlags |= cmsFLAGS_NOTPRECALC;




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Lcms-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to