How can I implement colors in MATLAB xyY ?

1 visualización (últimos 30 días)
matpsyc
matpsyc el 3 de Abr. de 2017
Abierta de nuevo: Walter Roberson el 22 de Dic. de 2018
I have written a code for a color-naming task in which participants will be randomly presented a set of 12 stimuli and will be asked to report whether the stimulus is green or blue. I display colored squares for this purpose by using the Screen command. I wanted to ask whether it is possible to directly implement colours in xyY colour without converting to RGB.
Thanks in advance.

Respuesta aceptada

Walter Roberson
Walter Roberson el 3 de Abr. de 2017
"I wanted to ask whether it is possible to directly implement colours in xyY colour without converting to RGB."
No, it is not. MATLAB just sends pixel data to the graphics libraries; it does not have any control over how those pixels are converted into light.
xyY is a model of how humans would perceive theoretical light; it does not deal how to generate light from a real system such that the light actually generated matches the desired properties.
If you are working with perception models to that degree then you should be using calibrated displays and setting up hardware profiles to meet your targets. That might call, for example, for using one of the Eizo self-calibrating displays
  3 comentarios
Walter Roberson
Walter Roberson el 3 de Abr. de 2017
Your question is really more one about Psychtoolbox as Screen() is part of that rather than part of MATLAB . Screen() with 'fillrect' only takes rgb or rgba; see http://docs.psychtoolbox.org/FillRect
You might want to look at RenderDemo which puts up an xyY patch.
Stephen23
Stephen23 el 3 de Abr. de 2017
Of course you could use MATLAB to specify the xyY values that you want to display, even if you have to write the toolbox yourself. It is not very likely that you will find any monitor or TV that accepts xyY input though, so you will have to anyway convert to sRGB, or YCbCr, or some other supported color encoding.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by