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

Home » Public Forums » archive » help needed in understanding correl_images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: help needed in understanding correl_images [message #93639 is a reply to message #93637] Tue, 20 September 2016 01:00 Go to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Tuesday, September 20, 2016 at 3:51:58 AM UTC+2, sid wrote:
> On Monday, September 19, 2016 at 3:41:19 PM UTC+5:30, Helder wrote:
>> On Monday, September 19, 2016 at 10:19:25 AM UTC+2, sid wrote:
>>> Hello all,
>>> I have taken two images
>>> image1(701,501)
>>> image2(701,501)
>>>
>>> I need to find the xshift in these two images and have used the
>>> correl_images it gives a 15 by 15 pixel output.
>>>
>>> But couldnt understand what this output array is.
>>>
>>> Can anybody pls explain this.
>>> thanks
>>
>> Hi,
>> my guess, is that what you *really* want is correl_optimize. This uses correl_images and corrmat_analyze to give you the x,y-shift.
>> The alternative is to use phase correlation (https://en.wikipedia.org/wiki/Phase_correlation).
>>
>> Helder
>
> Thank you for the idea. But the problem is, I have a scattered region so this correlation method doesn't work properly. It gives some very high value of xoffset and yoffset which is not expected. So can you please let me know is there any other method to find the shift between images.
>
> Is it a good idea to make use of centroid.
>
> thanks

Hi,
I don't know what your images *really* look like (signal/noise,...), but what I use for *my* images is the phase correlation approach.
Here is roughly what I do:
- select from the images the sub-region you want to compare
- window these images (multiply by a function with 1 in the middle and zero at the edges) with either a sin function or something like a hamming window.
- make the fft of both
- multiply the fft of the first by the conj() of the fft of the second
- find the position of the max of the real_part()
- convert this to 2d array indices

It might seem tricky, but it's good to learn with.

Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL structure problem
Next Topic: Meaning of the expression

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

Current Time: Wed Oct 08 15:36:49 PDT 2025

Total time taken to generate the page: 0.00176 seconds