Image:Antialiased-sinc.png
From Wikipedia, the free encyclopedia

Antialiased-sinc.png (128 × 128 pixel, file size: 13 KB, MIME type: image/png)
sinc filter antialiased chessboard
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
Subject to disclaimers.
If the current image is the same as when I (Loisel 23:40 14 Jul 2003 (UTC)) wrote this comment, the following Matlab code was used to generate the image:
function Z=filteredchessboard(n,a); foo=(1:n)*128.0/n; m=size(foo,2); disp('Initializing X, Y') for i=1:m X(:,i)=(foo-64.0)'; Y(i,:)=foo; end disp('Generating unfiltered chessboard') T=1.0./(Y/2048.0+0.001); Z=T.*(X/128.0); I0=floor(T); J0=floor(Z); K=I0+J0; C=mod(K,2); disp('Calculating Fhat') Fhat=fft2(C); f1=floor(m/a); f2=n-f1; f1=f1+1; f2=f2+1; disp('Zeroing middle frequencies') Fhat(f1:f2,:)=0; Fhat(:,f1:f2)=0; disp('Inverse Fourier transform & output') Z=real(ifft2(Fhat));
The returned matrix (e.g. from filteredchessboard(1024,20)) can be viewed with, eg,
image(10*Z')
I then clamped the image like so:
X=max(min(1,Z),0);
in Matlab. Then I took a submatrix of size 128 (e.g., X(1:10:(10*128),1:10:(10*128))) and I wrote it to a file using dlmwrite. Then I wrote a short C program to extract the floating point numbers and convert them into a .pgm file. Lastly, using Gimp, I converted the image to rotate the image 90 degrees and save it to png.
File history
Legend: (cur) = this is the current file, (del) = delete
this old version, (rev) = revert to this old version.
Click on date to download the file or see the image uploaded on that date.
- (del) (cur) 13:34, 30 September 2005 . . Riumplus (Talk | contribs) . . 128×128 (12,995 bytes) (Losslessly recompressed the image, shrinking file size by 2%)
- (del) (rev) 01:01, 15 July 2003 . . Loisel (Talk | contribs) . . 128×128 (13,271 bytes) (bugfix)
- Edit this file using an external application
See the setup instructions for more information.