# Anti-aliasing

**URL:** <https://psychtoolbox.discourse.group/t/anti-aliasing/960>\
**Category:** Uncategorized\
**Created:** [January 8, 2002, 12:44am UTC](https://psychtoolbox.discourse.group/t/anti-aliasing/960 "2002-01-08T00:44:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pbdelahunt](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pbdelahunt](https://psychtoolbox.discourse.group/u/pbdelahunt)\
**Post date:** [January 8, 2002, 12:44am UTC](https://psychtoolbox.discourse.group/t/anti-aliasing/960/1 "2002-01-08T00:44:16Z")

</div>

I have written a program using the PsychToolbox to make Landolt rings  
to test visual acuity. I made the rings and gaps using FrameOval and  
DrawLine. The program works well until the rings get less then 10  
pixels in diameter (with a 2 pixel gap). I believe this problem can  
be overcome using anti-aliasing. How can I use anti-aliasing with the  
PsychToolbox?  
  
Thanks  
Peter Delahunt

---

<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:** [January 8, 2002, 1:18am UTC](https://psychtoolbox.discourse.group/t/anti-aliasing/960/2 "2002-01-08T01:18:39Z")

</div>

Peter,  
  
See messages 635. 627, 632, 633, 634, and 640  
in the forum for useful information.  
  
(These messages were turned up simply by searching  
the forum with the term "anit-alias".)  
  
DB

---

<div class="post-metadata">

**Author:** ![pbdelahunt](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pbdelahunt](https://psychtoolbox.discourse.group/u/pbdelahunt)\
**Post date:** [January 8, 2002, 8:48pm UTC](https://psychtoolbox.discourse.group/t/anti-aliasing/960/3 "2002-01-08T20:48:09Z")

</div>

Thanks David, it works great.  
  
Peter  
  

> --- In psychtoolbox@y..., David Brainard \<brainard@p...\> wrote:  
> \>   
> \> Peter,  
> \>   
> \> See messages 635. 627, 632, 633, 634, and 640  
> \> in the forum for useful information.  
> \>   
> \> (These messages were turned up simply by searching  
> \> the forum with the term "anit-alias".)  
> \>   
> \> DB

---

<div class="post-metadata">

**Author:** ![denispelli](https://avatars.discourse-cdn.com/v4/letter/d/cdc98d/32.png) [@denispelli](https://psychtoolbox.discourse.group/u/denispelli)\
**Post date:** [November 3, 2005, 7:27pm UTC](https://psychtoolbox.discourse.group/t/anti-aliasing/960/4 "2005-11-03T19:27:58Z")

</div>

i don't know what the "vsg" software does, but i can say something   
about anti aliasing.  
  
the idea is that if you have only a finite set of regularly spaced   
samples then you can accurately reproduce an arbitrary image only up   
to the nyquist frequency. attempts to reproduce higher frequencies in   
the source image will result in errors at sub-nyquist frequencies.   
thus you may want to "anti alias". you do this by low pass filtering,   
removing all frequencies at nyquist and higher, from the source   
before you sample it. that's it.  
  
in the particular examples you provide you might want to use a 2d fft   
to low pass filter with a steep cut off, but that will produce   
ringing in your image, so you are probably better off using a lower   
cut off frequency and a softer filter, e.g. convolviing with a   
gaussian. you may want to use the very nice software written by eero   
simoncelli to implement the gaussian pyramid of burt and adelson.   
(googling on pyramid and simoncelli should be enough to find it).   
eero's package is matlab with extensions that run on several platforms.  
  
hope that helps  
  
best  
  
denis  
  

> On May 17, 2005, at 12:16 PM, clemlac\_69 wrote:  
>    
> \> Hi, I have the same problem ; I draw Landolt Rings using vsgDrawOval  
> \> and vsgDrawBar and the vsg Anti aliasing function doesn't seem to work  
> \> to prevent aliasing. Would you have any advice to give me about that?  
> \> Thank you,  
> \> Clement Lacroute  
> \>  
> \> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "pbdelahunt" \<pbdelahunt@u...\>   
> \> wrote:  
> \>\> I have written a program using the PsychToolbox to make Landolt rings  
> \>\> to test visual acuity. I made the rings and gaps using FrameOval and  
> \>\> DrawLine. The program works well until the rings get less then 10  
> \>\> pixels in diameter (with a 2 pixel gap). I believe this problem   
> \>\> can  
> \>\> be overcome using anti-aliasing. How can I use anti-aliasing with   
> \>\> the  
> \>\> PsychToolbox?  
> \>\>  
> \>\> Thanks  
> \>\> Peter Delahunt  
> \>  
> \>  
> \>  
> \>  
> \> Post your message to: [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com)  
> \> Please indicate OS9, OSX, or WIN version, and include your full name.  
> \> Denis Pelli, David Brainard, and Allen Ingling.  
> \> [http://psychtoolbox.org](http://psychtoolbox.org)  
> \>  
> \> Yahoo! Groups Links  
> \>  
> \>  
> \>  
> \>  
> \>  
> \>  
>    
> Denis Pelli  
> Professor of Psychology and Neural Science  
> [http://psych.nyu.edu/pelli/](http://psych.nyu.edu/pelli/)
