sunpy / sunkit-image

A image processing toolbox for Solar Physics
https://docs.sunpy.org/projects/sunkit-image/en/stable/
BSD 2-Clause "Simplified" License
35 stars 45 forks source link

Add a coalignment example to the gallery #103

Open wtbarnes opened 3 years ago

wtbarnes commented 3 years ago

We have quite a few examples in the gallery for doing coalignment between two images using reproject. However, there is a fair bit of code in sunpy.image.coalignment for doing image alignment based on performing a cross-correlation between a layer and a template (using skimage.feature.match_template) rather than reprojection using information about the WCS.

There are quite a few functions in that subpackage and a gallery example would help better guide users on how to effectively make use of them.

Alternatively, if we think some of this functionality can be replaced by reproject, then we should do so.

dstansby commented 3 years ago

Alternatively, if we think some of this functionality can be replaced by reproject, then we should do so.

It is common to use cross-correlation like alignment techniques to align images where the pointing is uncertain (e.g. aligning AIA maps and EIS maps, where there is a pointing uncertainty that means the WCS information is not correct at the desired precision). So there are distinct use cases for using reprojection and cross-correlation, and we should keep both.

wafels commented 3 years ago

A few things....

  1. I wonder if SunPy's co-alignment functionality should be moved out of SunPy and into sunkit-image?
  2. I may have missed them, but I don't think there are any examples of the use of the existing co-alignment functionality. Such examples could highlight uses of reproject in conjunction with the co-alignment functionality.
  3. The existing co-alignment algorithm was written with the idea of co-aligning a set of similar images taken by the same instrument, with the additional assumption that there is a template image that shows a feature that can be found somewhere in each of the similar set of images. I'd be interested to know if it performs at all well in any other circumstances, for example, with AIA and EIS maps.
  4. This algorithm in scikit-image looks useful for the case when both images you want to register against each other have the same dimension. This covers a number of use cases.
wtbarnes commented 1 year ago

Note that all of this functionality now lives in sunkit_image.coalignment.

Deus1704 commented 5 months ago

I just wanted to be clear that this issue mentioned in the gsoc list is aiming to add a new example that demonstrates the co-alignment process on a set of similar images captured by different instruments, such as AIA and EIS? or is it looking for something else?

nabobalis commented 5 months ago

Yeah that sounds good.

Deus1704 commented 5 months ago

Yeah that sounds good.

Thanks for the confirmation.