
colormap('jet');
A = zeros(32); 
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));
pause

A = ones(32); 
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));
pause

A = zeros(32); 
A(1:3,1:3) = ones(3);
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));
pause

A = zeros(32); 
A(14:16,14:16) = ones(3);
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));
pause

A = zeros(32); 
A(11:21,11:21) = ones(11);
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));
pause

A = zeros(32); 
A(1:2,1:32) = 1;
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));
pause

A = zeros(32); 
A(15:16,1:32) = 1;
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));

A = zeros(32); 
A(1:32,15:16) = 1;
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));

A = zeros(32); 
A(1:32,1:15) = 1;
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));

A = zeros(32); 
A(1:32,1:2) = 1;
A(1:32,6:7) = 1;
A(1:32,11:12) = 1;
A(1:32,16:17) = 1;
A(1:32,21:22) = 1;
A(1:32,26:27) = 1;
A(1:32,31:32) = 1;
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));

B = imrotate(A, -45, 'bilinear', 'crop');
figure, imshow(B, 'notruesize');
y = fftshift(fft2(B, 256, 256));
figure, mesh(abs(y));


A = zeros(32); 
A = imnoise(A, 'gaussian', 0.5, 0.1);
%A(1:3,1:3) = ones(3);
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(log(abs(y)));

A = zeros(32); 
A = imnoise(A, 'salt & pepper');
%A(1:3,1:3) = ones(3);
figure, imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(abs(y));

cd /home/ich/research/omr
A = imread('levysmall.png');
imshow(A, 'notruesize');
y = fftshift(fft2(A, 256, 256));
figure, mesh(log(abs(y)));

B = A < 190;
imshow(B, 'notruesize');
%y = fftshift(fft2(B, 256, 256));
y = fftshift(fft2(B));
figure, mesh(log(abs(y)));

