Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <hto714$m3d$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1275070149 28075 172.30.248.38 (28 May 2010 18:09:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 28 May 2010 18:09:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:640268

"Ja-yun " <silodraw@gmail.com> wrote in message <hto714$m3d$1@fred.mathworks.com>...
> 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 http://img231.imageshack.us/img231/7269/dogk.png
> and 
> fig 2 http://img541.imageshack.us/img541/5199/dog90.png
> 
> instead , it works for fig1 and 
> fig 3 http://img706.imageshack.us/img706/1601/dog45.png
> , 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