How can i find orientation using fft? Here is the idea (reference paper)
1. Find the fft2 x(u,v)=fft2(x(x,y))
2. ur=sqrt(u.^2+V.^2),theta=atan2(v,u)
3. X(ur,theta)=x(ur*cos(theta),ur*sin(theta))
4. power of dft p(ur,theta)=abs(X(ur,theta).^2)
5. found the angular DFT by summing the power of annual band between radial frequency ur1 and ur2
A(theta)=sum(p(ur,theta))
My problem is how can I implement the last step? Here is the code that I tried but could not understand the last step. Matlab code:
t=imread('untitled5.png');
fontSize=12
[m,n]=size(t);
img=fftshift(t(:,:,2));
g=fft2(img);
c = g .* conj(g) ;
d=fft2(c);