Rafael Fernandez | 11 Jul 05:59 2008

Adding noise to screen

Hello,

I am trying to add noise over a display. I am currently creating TextureStimulus objects randomly all over the screen. However, this is VERY slow. Does anyone have any idea on how to achieve this?

Thank you,
Rafael Fernández 

--
Rafael E. Fernández
Computer Science major
University of Illinois at Urbana-Champaign
Eamon Caddigan | 11 Jul 16:28 2008
Picon

Re: Adding noise to screen

If you're using VisionEgg 1.1, use Numpy to create a random array,  
otherwise, use numeric. You can create a Texture object directly from  
this data, or a PIL image (which can then be used to initialize a  
Texture object).

-Eamon

On Jul 10, 2008, at 10:59 PM, Rafael Fernandez wrote:

> Hello,
>
> I am trying to add noise over a display. I am currently creating  
> TextureStimulus objects randomly all over the screen. However, this  
> is VERY slow. Does anyone have any idea on how to achieve this?
>
> Thank you,
> Rafael Fernández
>
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
Dave Bissig | 11 Jul 17:22 2008
Picon

Re: Adding noise to screen

Hi,

How does the display need to look?  IF it's a matter of putting noise over part of the screen (like over text displayed in the center), I might be able to dig up an old script I tried out that worked well.  Basically, you get 5-10 tall narrow images (.jpg, .bmp) of noise/snow, then place them side by side over the text with a low opacity AND randomize the y value for the anchor(leaving x constant, so you don't have overlapping semi-opaque blocks of noise).  Finally, to make things neat looking, you just "frame" the text with some stationary fully opaque rectangles laid over top of the moving noise images, (usually whatever the background color is).
In this set up, you could have different opacities for each "strip" of noise, or e.g. fix the x values to gaze if you're doing an eye tracking experiment.
If I remember right, this method CAN work for a whole screen, but you need to make compromises on how long the strips are (i.e. the variety of the noise), and things would probably go too slow to e.g. have mouse or eye-position -related movement of noise be convincing.

-Dave

On Thu, Jul 10, 2008 at 11:59 PM, Rafael Fernandez <rfernan3-nzINlOoChub2fBVCVOL8/A@public.gmane.org> wrote:
Hello,

I am trying to add noise over a display. I am currently creating TextureStimulus objects randomly all over the screen. However, this is VERY slow. Does anyone have any idea on how to achieve this?

Thank you,
Rafael Fernández 

--
Rafael E. Fernández
Computer Science major
University of Illinois at Urbana-Champaign

Andrew Straw | 11 Jul 18:47 2008
Picon

Re: Adding noise to screen

I have no idea what kind of noise you want. (What domain, what
distribution, and so on.) But, I suggest looking and the
visual_jitter.py demo which displays luminance white noise updated very
quickly.

-Andrew

Rafael Fernandez wrote:
> Hello,
>
> I am trying to add noise over a display. I am currently creating
> TextureStimulus objects randomly all over the screen. However, this is
> VERY slow. Does anyone have any idea on how to achieve this?
>
> Thank you,
> Rafael Fernández 
>
> -- 
> Rafael E. Fernández
> Computer Science major
> University of Illinois at Urbana-Champaign

======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Gmane