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

Home » Public Forums » archive » Re: Coadd images that contain no stars
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: Coadd images that contain no stars [message #80314 is a reply to message #80312] Wed, 30 May 2012 04:53 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Wednesday, May 30, 2012 1:17:57 PM UTC+2, Mats Löfdahl wrote:
> Den onsdagen den 30:e maj 2012 kl. 10:58:53 UTC+2 skrev Helder:
>>> http://en.wikipedia.org/wiki/Phase_correlation
>>
>> Hi Russel and IDLers,
>> the phase correlation method basically calculates the correlation by using FFT() operations:
>> FFT_ImgA = FFT(ImgA,-1)
>> FFT_ImgB = FFT(ImgB,-1)
>> FFT_ImgA*CONJ(FFT_ImgB) / ABS(FFT_ImgA*CONJ(FFT_ImgB))
>> and then locating the maximum (with an appropriate function for higher accuracy).
>>
>> On the other hand the Astro-Library Correl_Images function "computes the 2-D cross-correlation function of two images for a range of (x,y) shifting by pixels of one image relative to the other". This is done using FOR loops for the pixel shifting.
>> This is generally speaking not the "IDL-way", but I guess there is no direct way around this. As far as I could see, the Astro I've looked a bit into this and found that the IDL CORREL() function is quite similar but not identical (but maybe I used the wrong keywords...).
>>
>> Now the question: how do these two methods compare? FFT procedures will perform well for images with sizes of 2^n, whereas the Astro-Library uses a recursive method to "zoom" in and this might give better accuracy.
>>
>> Does anybody have a better idea about how these two methods? When should they be used and when should they not be used?
>
>
> There are a couple of issues related to the wrap-around caused by the FFT assumption that the image is just one tile in an infinite mosaic of identical tiles. The magnitude of the problems depend on the kind of scene present in your image and the size of the image compared to the expected shifts. If the images are large compared to the expected shifts, the FFT method should be safe and accurate.
>
> Because of the FFT wrap-around, this happens/can happen if your images are small:
> * The peak corresponding to the actual shift is attenuated because part of the scene is not matched to features in the same "tile" but to features being wrapped in from the other side of the image. This effect is greater the larger the shift really is. It might be negligible if the scene consists mainly of some small but bright features entirely within the field of view (FOV) and more serious if the scene is extended with features that are about as strong over the entire FOV.
> * The correlation peak can also be attenuated if the matching feature is small in extent compared to the pixels and fall differently on the pixel grid in one image compared to the other.
> * There may be false peaks caused by features on one side of the FOV being similar to features wrapping in from the other side. These false peaks should normally be weaker than the peak corresponding to the true match but if the true peak is attenuated by the effect explained above, the false peak may be higher. (In most situations the risk that this happens should be small.)
> * The wrapping in of features from the other side of the image also affects the _shape_ of the correlation peak because the side of the peak corresponding to too large shifts is more attenuated than the side corresponding to too small shifts. If you are interested in interpolation of the peak in order to reach subpixel accuracy, this effect moves the peak toward smaller shifts and therefore causes a small but systematic underestimation of the shifts.
>
> Calculating your correlation function in the image domain is safe from these effects also for small images (although you have to sacrifice some of the FOV so you evaluate the correlation also for the largest considered shifts with actual scene within the evaluation window for both images). In addition you can consider other metrics than correlation for the best match.
>
> I looked into matters of this sort a couple of years ago, there is a paper in A&A that you might find useful: http://adsabs.harvard.edu/abs/2010A%26A...524A..90L
> I had a particular application in mind of course, but some of the methods and reasoning should be relevant to other situations. In addition to some methods used for calculating the correlation peak, I also discuss different methods for interpolating the peak in order to get shifts with subpixel accuracy.

Well, thank! Really happy for the answer. I've been banging my head on a wall for so much time that it's starting to hurt seriously!
It's also nice to find out that some of the methods I used for subpixel interpolation are also the same used in your paper... At least I was not that far away from a decent solution!

Cheers, Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Lion Time Machine error
Next Topic: VM Save File Problem

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

Current Time: Fri Oct 10 15:19:24 PDT 2025

Total time taken to generate the page: 0.16341 seconds