![]() |
LMS color space <--> RGB
I found this:
Code:
but I don't understand how to use these matrixes to make XYZ from it and then RGB (XYZ <--> RGB I already have). Please F1.
http://en.wikipedia.org/wiki/LMS_color_space
|
AW: LMS color space <--> RGB
According to the Wiki, there is not "one" way of transforming, but a multitude. Which one to chose would then depend on the standard you want your operations to adhere to, which seems to be a matter of choice and specific use. Other than that, it's simple matrix-vector multiplication (and inverting a matrix for the reverse transformations).
|
Re: LMS color space <--> RGB
After multiplication 3x3*3x1 I'll get another 3x3 matrix :?:
|
AW: Re: LMS color space <--> RGB
Zitat:
![]() |
Re: LMS color space <--> RGB
Yes, of course, my mistake ;)
I have this:
Delphi-Quellcode:
Now I'll try make reverse transformation. :)
var
L, M, S: Double; XYZ: TXYZ; begin XYZ := RGBToXYZ(RGB(130, 113, 222)); L := (0.4002 * XYZ.X) + (0.7076 * XYZ.Y) + (-0.0808 * XYZ.Z); M := (-0.2263 * XYZ.X) + (1.1653 * XYZ.Y) + (0.0457 * XYZ.Z); S := (0 * XYZ.X) + (0 * XYZ.Y) + (0.9182 * XYZ.Z); ShowMessage(Format('%f %f %f', [L, M, S])); // 20,97 22,32 65,95 end; |
Re: LMS color space <--> RGB
I did and it working :D
Just another question, how matrixes from Wikipedia was computed? |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:11 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz