How to do georegistration and fusion images


  1. How I can do geo registration for image in SNAP?
    I have reference image (with geo information) and image without it.
    in ENVI software it was called “Image to Image”

  2. Also how I can do fusion or pansharpening images (to do fusion multispecter and panchrome images) ?

Thank at advance

1 Like

You probably mean the co-registration. It works fine with radar data (where geometric information is stored in orbit files) or data that is already projected. If an image totally lacks of any spatial reference it won’t work.
What images do you have?

I have old optical images

Do you know the spatial reference details? The simplest approach may be to create a new “navigated” image (I often use bathymetry) with the same geometry and CRS as the old image, then load both images and copy the the georeference data from
the “nav” image to the old image and save to a format that preserves the georeference information:

import sys
import numpy
from beampy import String
from beampy import Product
from beampy import ProductData
from beampy import ProductIO
from beampy import ProductUtils
if len(sys.argv) != 4:
    print("usage: %s <source_file> <nav_file> <outfile>" % sys.argv[0]);

sourceProduct = ProductIO.readProduct(sys.argv[1])
width = sourceProduct.getSceneRasterWidth()
height = sourceProduct.getSceneRasterHeight()
name = sourceProduct.getName()
description = sourceProduct.getDescription()
band_names = sourceProduct.getBandNames()
print("sourceProduct: %s, %d x %d pixels, %s" % (name, width, height, description))
print("Bands:   %s" % (list(band_names)))
navProduct = ProductIO.readProduct(sys.argv[2])
ProductUtils.copyGeoCoding(navProduct, sourceProduct)
ProductIO.writeProduct(sourceProduct,  sys.argv[3], 'NetCDF4-CF')

An image to image registration is currently not possible. But it is in the pipeline and will come sometime next year.
Pansharpening is currently also something we are missing.

@marpet Is it still not possible to do image to image registration within snap? For instance if I wanted to register a band from landsat-8 with band 1 of sentinel 2 could I do this using snap?

According to the documentation, GeFolki is able to do this: GeFolki coregistration

1 Like

@Abraun okay I will definitely have a deeper look into this but as it stands I do not believe that there is a single function that does this feature. Neither the collocation nor the coregistration functions that are available in snap can do this. I would love if you could correct me if I am wrong. With regards to the synchronization function, all it does is synchronises the products if their coordinate system is exactly the same.

I wasn’t successful either but according to their materials, the data can be flipped, skewed, whatever and still be co-registered.

In a previous post you mentioned that one of your students would try to use the gefolki implementation in python? Did he/she succeed in using this implementation to maybe register sentinel 2 with landsat 8 data?

he used AutoSync of ERDAS Imagine before I could suggest it to him :innocent:

Again, just to go sure - simple collocation is not enough for you?

@ABraun My idea is that I need to perform sub-pixel registration between landsat 8 and sentinel 2 data using a specific feature in snap then actually quantify the amount of misregistration performed by snap as the images will still not be perfectly registered and implement an algorithm that improves that misregistration. This is what the job of my current masters by research entails. And currently my issue is that I am not sure which function in snap actually does that or whether it is provided at all. When I did test out the collocation between Sentinel-2 products I barely saw any difference in the result. The resulting slave images looked exactly the same as the master images. It did not give me the impression in qualitative manner that any form of image registration was performed.

A similar paper that does the job of the feature that I am investigating within snap is the following:

1 Like

now I understand, thank you.
I would be interested in this as well.

@ABraun SO do you think collocation does the task of that paper specifically for landsat 8 and sentinel 2 data? Or is gefolki supposedly better for this task?

I think collocation simply uses the geolocation of both rasters and resamples them to a common resolution, so no co-registering is involved.

@ABraun Yes, exactly as I thought. The only function that seems to do something similar is coregistration which is only exclusive to InSar products i.e. Sentinel-1 products.

did you try to input optical data in the coregistration tool and use “Geolocation” instead of “Orbit” as the initial offset method?

@Abraun whilst using sentinel-2 and landsat-8 products? Rather than sentinel 1 products?

yes. They are geocoded (as long as they are in the same coordinate reference system) so technically it should work. It could take some time if all bands are cross-correlated against each other though. So maybe you make a subset with the blue band of L8 and S2 and test with it.

1 Like

Yes, it does make sense as they both use the same coordinate system which is WGS. I honestly did not, tomorrow I will test it out and if you want I get back with this attempt :slight_smile: Thank you so much for your replies.