How can I implement colors in MATLAB xyY ?
2 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
Walter Roberson
2017 年 4 月 3 日
"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 件のコメント
Walter Roberson
2017 年 4 月 3 日
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
Stephen23
2017 年 4 月 3 日
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!