help with a graphical signal-to-noise test - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

help with a graphical signal-to-noise test

DahannDahann Posts: 1Member
Heya
I'm developing a kind of a visual acuity test in which people have to distinguish the direction of movement of some bars (signal) from white noise (ie. black and white pixels just jumping around randomly)

Now the thing is this: my script works pretty much as I want it to... BUT the image quality is not very nice - there are white "blinks" between frames which make it all look sloppy.

If you have any ideas or suggestions, please let me know. Here's my script if you wanna try it out:

function sig2noiseratio(percentsig)
%this function outputs a stimulus that's made up of
%signal over noise, in a percent signal defined in the input
%and called percentsig
%choose percentsig between 0 and 100, preferably in the 20's
figure
colormap(gray)
speed=rand;
speed=round(speed)*2-1;

for k=1:100
noise=rand(200,200);
% a is a 200X200 matrix with random numbers btw 0 and 1

signal=[1-speed*k:200-speed*k];
signal=sin(signal/5);
signal=(signal+1)/2;
signal=repmat(signal,200,1);

output=signal*percentsig/100+noise*(100-percentsig)/100;
output=round(output);
% b is a 200x200 matrix in binary
output=output*255;
image(output);
pause(0.001);
end

thanks a lot
Dan

Sign In or Register to comment.