Closed jiahao closed 9 years ago
Images defines arithmetic on all AbstractRGBs, and I'm pretty sure it's going to stay that way. But for this package, this might indeed be the best thing to do. CC also @dcjones.
We also need to put some effort into increasing the efficiency of conversions. See discussion (not implementation) in #48.
Cool! LMS is also a linear vector space, so it is safe to define these operations for it, too, unless we want to keep XYZ as a common intermediary for these sorts of operations.
EDIT: Ignore what was in this box here. I need sleep. Will hopefully have clearer thoughts after that...
CIECAM02 is not an “LMS system”, but a color appearance space, as you already mentioned in your post. The LMS space can be linearly transformed to XYZ and vice versa, there are no nonlinearities involved.
CIECAM02 uses the linear CMCCAT2000 transform, but then several nonlinear factors, like the involvement of viewing conditions, adaptation and a nonlinear post-adaptation response compression are involved, too.
On 29.09.2014 21:37, Robert J. Ennis wrote:
Oh wait, ignore that. I see that the intention is to implement the CIECAM02 colour appearance model as the LMS system. As far as I can tell, it is only partially implemented? If that is the case, then, once fully implemented, that LMS model is not linear.
— Reply to this email directly or view it on GitHub https://github.com/JuliaLang/Color.jl/pull/64#issuecomment-57216174.
Ah, okay, I didn't know the name of the sole transform, only the full model. Thanks for the info!
I suppose this can be merged now?
I've added some tests. It looks like the Lab and LMS ColorValues behave like a linear vector space too (up to floating-point roundoff); does that look right?
Lab is also non-linear. It basically applies a cube root transform to each of the X, Y, and Z values. But, yes, LMS is a linear vector space.
cc @rennis250 @timholy