AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi LMS color space <--> RGB

LMS color space <--> RGB

Ein Thema von WojTec · begonnen am 5. Jul 2012 · letzter Beitrag vom 6. Jul 2012
Antwort Antwort
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#1

LMS color space <--> RGB

  Alt 5. Jul 2012, 15:29
I found this:

Code:
http://en.wikipedia.org/wiki/LMS_color_space
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.
  Mit Zitat antworten Zitat
Medium

Registriert seit: 23. Jan 2008
3.679 Beiträge
 
Delphi 2007 Enterprise
 
#2

AW: LMS color space <--> RGB

  Alt 5. Jul 2012, 16:05
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).
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#3

Re: LMS color space <--> RGB

  Alt 5. Jul 2012, 18:26
After multiplication 3x3*3x1 I'll get another 3x3 matrix
  Mit Zitat antworten Zitat
Benutzerbild von BUG
BUG

Registriert seit: 4. Dez 2003
Ort: Cottbus
2.094 Beiträge
 
#4

AW: Re: LMS color space <--> RGB

  Alt 5. Jul 2012, 18:39
After multiplication 3x3*3x1 I'll get another 3x3 matrix
No way Just do a matrix multiplication.
Intellekt ist das Verstehen von Wissen. Verstehen ist der wahre Pfad zu Einsicht. Einsicht ist der Schlüssel zu allem.
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#5

Re: LMS color space <--> RGB

  Alt 5. Jul 2012, 20:31
Yes, of course, my mistake

I have this:

Delphi-Quellcode:
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;
Now I'll try make reverse transformation.
  Mit Zitat antworten Zitat
WojTec

Registriert seit: 17. Mai 2007
480 Beiträge
 
Delphi XE6 Professional
 
#6

Re: LMS color space <--> RGB

  Alt 6. Jul 2012, 11:51
I did and it working

Just another question, how matrixes from Wikipedia was computed?
  Mit Zitat antworten Zitat
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:15 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz