Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to calculate the angle between two images?
Replies: 41   Last Post: Dec 8, 2012 11:02 PM

 Messages: [ Previous | Next ]
 khoo Posts: 63 Registered: 8/9/08
Re: How to calculate the angle between two images?
Posted: Apr 6, 2009 10:48 AM

> > Bro Dave, when i rotate the images, i don't think the actual image boundaries will rotate...ABout the other spikes bear, i no sure about it but how to set the zero degree spike to zero??
>
> im8(0) = 0;
>
> Maybe
>
> Regards
>
> Dave Robinson

Bro Dave, still cannot...this is my currently code after i set zero spike to zero...but the graph still like the graph i get jz now..

clear all;clc

im11=rgb2gray(im1);
im111=im2double(im11);
p1=atan2(dy,dx);
im1111=edge(p1,'canny');
bw1 = bwmorph(im1111,'dilate');
im11111=p1.*bw1;
im6=hist(im11111(:),256);
im66=fft(im6);

im22=rgb2gray(im2);
im222=im2double(im22);
im333=zeros(size(im111));
im333(1:size(im2,1),1:size(im2,2))=im222;
p2=atan2(dy,dx);
im2222=edge(p2,'canny');
bw2 = bwmorph(im2222,'dilate');
im22222=p2.*bw2;
im7=hist(im22222(:),256);
im77=conj(fft(im7));
im8=real(ifft(im66.*im77));
plot(im8)
im8(1)=0;

izit my FFT there got problem?? cause normally FFT graph, the peak will at left side..but after IFFT the graph should be back like before FFT..but my graph's peak still at left side..can help me check my code got wrong at anywhere??

Date Subject Author
4/3/09 khoo
4/3/09 Dave Robinson
4/3/09 khoo
4/3/09 Dave Robinson
4/3/09 khoo
4/3/09 Dave Robinson
4/3/09 khoo
4/3/09 khoo
4/4/09 khoo
4/4/09 Dave Robinson
4/4/09 khoo
4/4/09 khoo
4/5/09 khoo
4/5/09 Dave Robinson
4/5/09 khoo
4/5/09 khoo
4/5/09 Dave Robinson
4/5/09 khoo
4/6/09 khoo
4/6/09 Dave Robinson
4/6/09 khoo
4/6/09 Dave Robinson
4/6/09 khoo
4/6/09 Dave Robinson
4/6/09 khoo
4/6/09 khoo
4/6/09 khoo
4/7/09 khoo
4/7/09 khoo
4/7/09 Dave Robinson
12/8/12 Jeff
4/3/09 Skeptic
4/3/09 Dave Robinson
4/3/09 Roger Stafford
4/3/09 khoo
4/3/09 Roger Stafford
4/3/09 ImageAnalyst
4/3/09 khoo
4/4/09 khoo
4/6/09 Matt
4/6/09 khoo
4/6/09 Matt