Make an image appear on screen
3 次查看(过去 30 天)
显示 更早的评论
Hi, I'm really new to this and what I want is for an image from a .png file to appear on screen at a location of my choice. This is what I have so far:
Code for fixation cross:
screenNum=0;
[window, rect] = Screen('OpenWindow', screenNum, 1);
[X,Y] = RectCenter(rect);
FixCross = [X-1,Y-40,X+1,Y+40;X-40,Y-1,X+40,Y+1];
Screen('FillRect', window, [255,255,255], FixCross');
Screen('Flip', window);
HideCursor;
WaitSecs(2);
name associated with the image:
green_down = 'GreenDown.png'; green_downarrow = imread(green_down);
I want the image(green_down) to appear in a particular quadrant on the same screen as the fixation cross. I tried using imshow, but that causes a new window to open and that isn't what I want. Also, I am using psychtoolbox, if that means anything.
Any help would be greatly appreciated, thanks,
Brett
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image display and manipulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!