Psychtoolbox 颜色无法按照[r, g, b]显示。
Show older comments
我在绘制随机颜色的小球的时候,发现很多颜色的[r, g, b]数值实际显示成白色,比如如下代码
sca; clc;clear
Screen('Preference', 'SkipSyncTests', 2);
% 载入默认设置
PsychDefaultSetup ( 2 );
% 设定需要操作的屏幕
screen = max ( Screen ( 'Screens' ) );
white = WhiteIndex ( screen );
black = BlackIndex ( screen );
grey = white / 2;
[ win, rect ] = PsychImaging ( 'OpenWindow', screen, black );
Screen( 'FillOval', win, [100,100,255], [ 1260, 700, 1300, 740] );% 颜色值[100,100,255],但是显示白色
Screen ('Flip', win );
% 等待按任意键
KbStrokeWait;
sca;
这是怎么回事
Accepted Answer
More Answers (0)
Categories
Find more on Timing and presenting 2D and 3D stimuli in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!