# blur .jpg image

**URL:** <https://psychtoolbox.discourse.group/t/blur-jpg-image/1990>\
**Category:** Uncategorized\
**Created:** [August 5, 2008, 2:59pm UTC](https://psychtoolbox.discourse.group/t/blur-jpg-image/1990 "2008-08-05T14:59:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [August 5, 2008, 2:59pm UTC](https://psychtoolbox.discourse.group/t/blur-jpg-image/1990/1 "2008-08-05T14:59:38Z")

</div>

hello,   
i am a beginner in programming with matlab and i am using the   
psychotoolbox oneself for the first time.  
  
i have just question on blurring images in jpg-format. as i am a   
beginner my qusestions are very basic.   
  
first i displayed an .jpg image using the following programm:  
  
function ShowImage3  
  
screenNum=0;  
res=[1280 1024];  
clrdepth=32;  
[wPtr, rect]=Screen('OpenWindow', screenNum, 0, [0 0 res(1) res(2)],   
clrdepth);  
  
img = imread ('Face2', 'JPG');  
textureIndex=Screen('MakeTexture', wPtr, double(img));  
Screen('DrawTexture', wPtr, textureIndex);  
Screen(wPtr, 'Flip');  
  
WaitSecs(8);  
  
  
Displaying the image works. but i have real problems to blur is.  
i found the following proposal in the psychtoolbox forum:  
  
Image=imread('');  
  
rAng=angle(fft2(randn(size(Image))));  
Noise1=real(ifft2(abs(fft2(Image)).\*(cos(rAng)+sin(rAng).\*i)));  
  
how can i implement it?  
  
best wishes  
  
bernadette
