Hi,
I tried to copy an image from a Matlab matrix onto
the screen using Screen('PutImage') and changed the lookup table using
Screen('SetClut'). This worked perfectly on the Mac platform, however, the
changed lookup table didn't seem to apply to the image on the Windows platform.
Can you please help me with this? I attached the code below. Thank you.
clear all; close all;
whichScreen=0;
[window, screenRect]=screen(whichScreen,
'OpenWindow', 0);
onClut=(0:255)' * [1 1 1];
offClut=zeros(256,3);
matlabClut=screen(window, 'GetClut');
testImage=ones(340,340)*128;
screen(window, 'SetClut', onClut);
screen(window, 'PutImage', testImage); % a gray
square
getChar;
screen(window, 'SetClut', offClut);
screen(window, 'PutImage', testImage); % Mac: black
screen; Win: still a gray square
getChar;
CmdWInToUpperLeft(window, matlabClut);
screen('CloseAll');
Regards,
Xu Cheng