>temp = pow(abs(x))
>out = copysign(temp, x)

Yes, this is reasonable. But it should be placed in the profile by the
profile creator, not performed by the CMM. 
CMM should never "guess" data. If the profile gives a valid math expression
for negative numbers, the CMM is free to use it and deal with negative
numbers, or to clip to zero as many CMMs does.  
But this does not work in the inverse way: if the profile does NOT give any
clue on what to do on negative numbers,  then the CMM has to clip them to
zero. This is a sort of critical thing for inter-operability sake.

Regards
Marti Maria
The LittleCMS project
http://www.littlecms.com 

-----Original Message-----
From: Kevin Wheatley [mailto:kevin.j.wheat...@gmail.com] 
Sent: miƩrcoles, 17 de agosto de 2016 11:05
To: LCMS mailing list <lcms-user@lists.sourceforge.net>
Subject: Re: [Lcms-user] Negative channel values are clipped upon floating
point conversions to profiles with true gamma TRCs

besides the cases already covered with gamut mapping etc, you can also get
"negative" values due to uncertainty of where black is. Take for example the
case of a digital sensor in a camera, if you capture with the lens cap on,
noise will mean you will get a range of values about a mean value, if this
is value considered as 0 then there will be some pixels where the value is
less than zero, throwing away this by clipping degrades the quality of the
images.

on the subject of extending/extrapolating trc, one approach is to mirror the
function similar to Elle's suggestion using

temp = pow(abs(x))
out = copysign(temp, x)

this tends to be reasonable as it gives a continuous gradient.

Kevin

----------------------------------------------------------------------------
--
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user


------------------------------------------------------------------------------
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to