From: Matt J on
"Parag S. Chandakkar" <parag2489(a)gmail.com> wrote in message <107f494e-6ab7-4351-b303-dc30f8034967(a)s36g2000prf.googlegroups.com>...
> I am mosaicing two coplanar images which are rotated and scaled. I am
> able to recover rotation sucessfully but can anybody tell me how to
> recover scaling. I have tried one solution:
>
> 1. Take FFT of both images
> 2. Then find out the maximum abs value of both FFTs.
> 3. Divide them to recover scaling
>
> This gives me somewhat inaccurate ans as scaling goes beyond 1.4. For
> ex. for scaling of 2 I get ans as 1.77.
=======================

Possibly, it's because the maximum value is susceptible to sampling error,or to any noise you have in the images. It would be better to divide the integrals (as approximated by the discrete sums) of both images. This is equivalent to the FFT ratio strategy that you are already using, but on the condition that the max absolute value is attained at DC. I don't know if you verified that.


From: Parag S. Chandakkar on
On Feb 21, 9:29 pm, "Matt J " <mattjacREM...(a)THISieee.spam> wrote:
> "ParagS.Chandakkar" <parag2...(a)gmail.com> wrote in message <107f494e-6ab7-4351-b303-dc30f8034...(a)s36g2000prf.googlegroups.com>...> I am mosaicing two coplanar images which are rotated and scaled. I am
> > able to recover rotation sucessfully but can anybody tell me how to
> > recover scaling. I have tried one solution:
>
> > 1. Take FFT of both images
> > 2. Then find out the maximum abs value of both FFTs.
> > 3. Divide them to recover scaling
>
> > This gives me somewhat inaccurate ans as scaling goes beyond 1.4. For
> > ex. for scaling of 2 I get ans as 1.77.
>
> =======================
>
> Possibly, it's because the maximum value is susceptible to sampling error,or to any noise you have in the images. It would be better to divide the integrals (as approximated by the discrete sums) of both images. This is equivalent to the FFT ratio strategy that you are already using, but on the condition that the max absolute value is attained at DC. I don't know if you verified that.

------------------------------------------------------------------------------------------------

To reduce the noise and the other errors, I read that you should do
windowing of images. So I am using Kaiser window. I will test my
program after that.

I didn't completely understand what you said. Can you explain me in
detail.

Thank You.
From: Dave Robinson on
"Parag S. Chandakkar" <parag2489(a)gmail.com> wrote in message <99ab77f9-5645-48e5-92fc-5825b20aee9b(a)u5g2000prd.googlegroups.com>...
> On Feb 22, 6:41 pm, ImageAnalyst <imageanal...(a)mailinator.com> wrote:
> ---------------------------------------------------------------------------------------------------------
<snip>
> So can you please tell me how to recover the scale using the above
> property? An algorithm is also sufficient, I will try to implement it.
> Thank You.

Very many years ago I had a similar problem - trouble is I have forgotten the detail of the solution, however I remember it amounted to plotting the two images on logarithmic x & y axes. The relative scaling came out as a shift, or offset that I was able to measure using cross correlation.

If I am not confused, it was rather sensitive to having the centroid of the two images coincident, and to get a really good result I needed to apply the correlation process iteratively. i.e. measure the scale, correct image by this result, and then measure the log offset again.

Hope that is of some help - sorry I have no code.

Regards

Dave Robinson
From: ImageAnalyst on
On Feb 22, 9:16 am, "Parag S. Chandakkar" <parag2...(a)gmail.com> wrote:
> So can you please tell me how to recover the scale using the above
> property? An algorithm is also sufficient, I will try to implement it.
> Thank You.
--------------------------------------------------------------------
It's not trivial. When an image is rotated and scaled, there are
differences in what information is there, out near the border of the
image. Stuff gets scaled in, or rotated in, for example, so that only
part of the image is the "same," -- not the same actually, but a
scaled version. But still, only a portion of the image is similar,
and of course that "similar" portion gets smaller as the scaling
factor increases making the problem even more difficult.

Here's a paper on it that may help you:
http://www.computer.org/portal/web/csdl/doi/10.1109/34.67648

From: Parag S. Chandakkar on
On Feb 22, 8:39 pm, "Dave Robinson" <dave.robin...(a)somewhere.biz>
wrote:
> "Parag S. Chandakkar" <parag2...(a)gmail.com> wrote in message <99ab77f9-5645-48e5-92fc-5825b20ae...(a)u5g2000prd.googlegroups.com>...
>
> > On Feb 22, 6:41 pm, ImageAnalyst <imageanal...(a)mailinator.com> wrote:
> > --------------------------------------------------------------------------- ------------------------------
> <snip>
> > So can you please tell me how to recover the scale using the above
> > property? An algorithm is also sufficient, I will try to implement it.
> > Thank You.
>
> Very many years ago I had a similar problem - trouble is I have forgotten the detail of the solution, however I remember it amounted to plotting the two images on logarithmic x & y axes. The relative scaling came out as a shift, or offset that I was able to measure using cross correlation.
>
> If I am not confused, it was rather sensitive to having the centroid of the two images coincident, and to get a really good result I needed to apply the correlation process iteratively. i.e. measure the scale, correct image by this result, and then measure the log offset again.
>
> Hope that is of some help - sorry I have no code.
>
> Regards
>
> Dave Robinson

I have successfully plotted images on logarithmic x and y axis. Also
find out the relative shift using Fourier Shift Theorem. According to
the paper titled "An FFT-Based Technique for Translation, Rotation,
and Scale-Invariant Image Registration", the translation can be used
to get scale as given below:

a= exp(c); b=exp(d)............ where c,d are translations and a,b are
scaling factors.
now my problem is I get translation as c=27, d=199,
so how to find out scale factors? I know I am wrong somewhere...

Thank you.