% f(r,\theta+\theta_0) <=> F(\omega,\phi+\theta_0)

B = zeros(256);
B(103:152,116:140) = ones(50,25);
F_B = abs(fftshift(fft2(B)));
Z = log(1+F_B);
mx = max(max(Z));
c = 255/mx;
Z_B = c*log(1+F_B);

C = imrotate(B,30,'crop');
F_C = abs(fftshift(fft2(C)));
Z = log(1+F_C);
mx = max(max(Z));
c = 255/mx;
Z_C = c*log(1+F_C);

subplot(2,2,1);
imagesc( B )
colormap( gray ( 256 ) )
axis image
subplot(2,2,2);
imagesc( Z_B )
colormap( gray ( 256 ) )
axis image
subplot(2,2,3);
imagesc( C )
colormap( gray ( 256 ) )
axis image
subplot(2,2,4);
imagesc( Z_C )
colormap( gray ( 256 ) )
axis image
