comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » similarity of two images, identifying overlapping regions
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
similarity of two images, identifying overlapping regions [message #54931] Wed, 18 July 2007 03:52 Go to next message
Thomas Nehls is currently offline  Thomas Nehls
Messages: 24
Registered: March 2004
Junior Member
Hi there,


the case: There are two different images from X-Ray imagery showing
both parts, but not exactly the same, of a soil sample. The two images
were taken with different wavelengths L1 and L2, showing the
distribution of different elements.
The purpose is to calculate with these element distributions later.

Because the images show not the same part of the sample, a second
wavelength L3 was detected both times parallel to the different
wavelengts(L1+L3 and then L2+L3), showing the distribution of iron in
the soil sample.
By the Iron images, we have a reference. Based on the Iron reference,
the overlapping image regions should be identified.
Now the problem: it is not clear, whether one of the iron images is
distorted compared to the other.
Furthermore, the two Iron images do not look completely similar. That
means I need to write a routine, in which I can find the best fit of
the two images in order to see whether there is a distortion or not.

I thought about holding one of the images and moving the other before
the first row by row, then column by column (like the doctors do it on
the light screen with the photograps of our bones or brains :-)

Then I would collect the sum of squared distance of the individual
pixels in the two images and see, which position of the second image
fits best. If the error function has two minima, there is a
distortion...

May be such a routine alsready exists?
Thanks in adavnce
Thomas
Re: similarity of two images, identifying overlapping regions [message #54976 is a reply to message #54931] Sun, 22 July 2007 00:07 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
thomas.nehls@tu-berlin.de writes:
> Hi there,
>
>
> the case: There are two different images from X-Ray imagery showing
> both parts, but not exactly the same, of a soil sample. The two images
> were taken with different wavelengths L1 and L2, showing the
> distribution of different elements.
> The purpose is to calculate with these element distributions later.
...
> I thought about holding one of the images and moving the other before
> the first row by row, then column by column (like the doctors do it on
> the light screen with the photograps of our bones or brains :-)

You are talking about doing an image cross correlation, which can be
done quickly using an FFT. The trick to using the FFT will be to
zero-pad the images to at least double their original size.

Such an FFT can handle a shift but not a rotation or scale factor.
You also mention that the images may be distorted.

I believe that cartographers have to deal with this kind of situation
-- matching distorted images -- and I believe they solve it by
brute-force. Namely, picking and matching a good sample of control
points in both images, and spline-resampling one image to the grid of
the other.

Good luck!
Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: I've got rings around my iPlot!
Next Topic: who ate my byte?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:23:43 PDT 2025

Total time taken to generate the page: 0.00450 seconds