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 
Switch to threaded view of this topic Create a new topic Submit Reply
help needed in understanding correl_images [message #93635] Mon, 19 September 2016 01:19 Go to next message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
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
Re: help needed in understanding correl_images [message #93636 is a reply to message #93635] Mon, 19 September 2016 03:11 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
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
Re: help needed in understanding correl_images [message #93637 is a reply to message #93636] Mon, 19 September 2016 18:51 Go to previous messageGo to next message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
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
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
  Switch to threaded view of this topic Create a new topic Submit Reply
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 13:31:43 PDT 2025

Total time taken to generate the page: 0.00432 seconds