Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Image rotation detection probelm
Replies: 32   Last Post: Aug 8, 2013 10:46 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Phillip

Posts: 12
Registered: 8/2/10
Re: Image rotation detection probelm
Posted: Dec 21, 2010 5:56 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> while trying this code i got this error....can you tell me WHY ?????
>
> ??? Error using ==> times
> Matrix dimensions must agree.
>

> > for ii = 1:length(thetas)
> > b = P2(:,ii);
> > this_correlation = abs(ifft(P1.*conj(b)));
> > angle_scores(ii) = max(max(this_correlation));
> > end


Make sure that P1 is a column vector and P2 has the same number of rows as P1.

However, I've changed the way I solve this problem now. Two points to note for anybody stumbling on this:

1) What I said about only needing one radon projection for the reference might be true in theory, but I found in practice with noisy data that this was not so good. I've actually abandoned the radon approach.

2) I now solve my rotation problem in an entirely different way. I'm not sure how generally applicable this solution is, but it worked well for my application (very large images, only small angles of rotation possible, very precise estimate of rotation necessary).

I find the polar transforms of the reference and acquired images, and then do a typical registration between these using cross-correlation. The shift required in the theta dimension tells you the rotation required (the other dimension has radius info which I don't use).
I got a Matlab function for creating a polar transform from this page:

http://www.csse.uwa.edu.au/~pk/Research/MatlabFns/

This function lets you specify the sampling in both the theta and radial dimensions. I upsample quite a bit in the theta dimension (better precision on the angle estimate) and downsample in the radial dimension (to keep memory costs down - my images are quite large).

Hope this approach is useful to others.


Date Subject Author
6/19/09
Read Image rotation detection probelm
Pradyumna A
6/19/09
Read Re: Image rotation detection probelm
Matt
9/16/09
Read Re: Image rotation detection probelm
Hamid Reza Mohseni Nejad
8/2/10
Read Re: Image rotation detection probelm
Phillip
12/21/10
Read Re: Image rotation detection probelm
chee ali
12/21/10
Read Re: Image rotation detection probelm
Phillip
12/21/10
Read Re: Image rotation detection probelm
Matt J
12/21/10
Read Re: Image rotation detection probelm
Phillip
11/14/12
Read Re: Image rotation detection probelm
Darren g
11/14/12
Read Re: Image rotation detection probelm
Phillip
11/19/12
Read Re: Image rotation detection probelm
Darren g
11/19/12
Read Re: Image rotation detection probelm
Phillip
11/20/12
Read Re: Image rotation detection probelm
Darren g
11/20/12
Read Re: Image rotation detection probelm
Phillip
11/26/12
Read Re: Image rotation detection probelm
Darren g
11/26/12
Read Re: Image rotation detection probelm
Phillip
11/27/12
Read Re: Image rotation detection probelm
Darren g
11/28/12
Read Re: Image rotation detection probelm
Phillip
11/29/12
Read Re: Image rotation detection probelm
Darren g
12/2/12
Read Re: Image rotation detection probelm
Phillip
12/3/12
Read Re: Image rotation detection probelm
Darren g
12/4/12
Read Re: Image rotation detection probelm
Phillip
12/11/12
Read Re: Image rotation detection probelm
Darren g
12/11/12
Read Re: Image rotation detection probelm
Phillip
12/12/12
Read Re: Image rotation detection probelm
Darren g
12/12/12
Read Re: Image rotation detection probelm
Steven Lord
2/6/13
Read Re: Image rotation detection probelm
Darren g
12/20/12
Read Re: Image rotation detection probelm
Phillip
12/20/12
Read Re: Image rotation detection probelm
Kev
12/20/12
Read Re: Image rotation detection probelm
Kev
7/7/13
Read Re: Image rotation detection probelm
xmlfor
8/8/13
Read Re: Image rotation detection probelm
jacaboo

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.