From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to find the rotation angle of two template?
Date: Fri, 28 May 2010 18:09:09 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 19
Message-ID: <htp0s5$rdb$>
References: <hto714$m3d$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1275070149 28075 (28 May 2010 18:09:09 GMT)
NNTP-Posting-Date: Fri, 28 May 2010 18:09:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:640268

"Ja-yun " <> wrote in message <hto714$m3d$>...
> i want to find the rotation angle of the contents in two template
> i tried radon transform method, but it doesn't work for 
> fig 1
> and 
> fig 2
> instead , it works for fig1 and 
> fig 3
> , and the angle can be found
> Is there  any way to find a rotation angle between fig1 and fing 2?  thanks a million

  The radon transform is based on integrating a function along a line until the line finally enters a region where the function remains all zero.  Since the white background in a grey level picture is by definition up at some maximum value rather than zero, the line would have to be infinitely long, so your analysis would fail.

  Just subtract your levels from the maximum background level and perform the radon transform on that.  Your success with figure 3 is a strong hint in that direction.

Roger Stafford