Hi-
I am simply trying to create multiple images with different numbers of black dots on a grey background. I have the code working, yet there are some aliasing effects around the edges of the dots I just can’t get rid of. I have set the multisampling parameter to 8, but this has no observable effect. I have also selected dot types 2 and 3, neither of which help. Is this a limitation of my hardware? I should add, I am only creating these stimuli to save to file - I’m not presenting them in PTB. Perhaps this allows for an alternative resolution?
I am using Mac OS X Catalina with the inbuilt Intel Iris Plus Graphics 645 1536 MB graphics. I’m using MATLAB 2020a. Here are the relevant parts of my code:
% Open screen with grey background
[w, rect] = Screen('OpenWindow', screenNumber,...
[255/2,255/2,255/2],[], [], 2,[],6);
% Set useful parameters
KbName('UnifyKeyNames');
AssertOpenGL;
PsychVideoDelayLoop('SetAbortKeys', KbName('Escape'));
HideCursor();
Priority(MaxPriority(w));
Screen('BlendFunction', w, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
for i = 0:4
% Define the numeral used in the cue
numeral = i;
for j = 1:20 % 20 images of each dot number
% Create dot cue
[dots(i+1, j),centeredRect] = dotCues(numeral,rect,w);
% Draw dot cue
if numeral > 0
Screen('DrawDots', w, dots(i+1, j).position, dots(i+1, j).size,...
dots(i+1, j).colour, [], 2);
end
Screen('Flip', w);
% Save dot cue
im = Screen('GetImage', w, centeredRect);
imwrite(im, fullfile(imDir, sprintf("Dots%d_%d.jpg", i, j)));
end
end