telespazio-tim / karios

Python application based on KLT Algorithm for Registration of Images from Observing Systems (KARIOS)
Apache License 2.0
10 stars 5 forks source link

Reported CE90 is incorrect if images have different geotransforms #4

Closed DFEvans closed 1 month ago

DFEvans commented 4 months ago

Karios computes offsets - dx and dy - using pixel coordinates only. This therefore assumes that a perfectly matched image will match in both pixel space and world space. However, if the geotransforms of two images are different - the world offsets of pixel (0,0) and the image resolution/orientation - objects that are identically located in world space will be differently located in pixel space.

Karios will therefore give erroneously large values of CE90 if the geotransforms of the two input images are different.

This should be noted as a limitation of the module. There is a warning buried deep in the output if the resolutions differ, but no action is taken.

It is also not too difficult to add as functionality. The x0, y0 and x1, y1 coordinates of matched features would need to be converted to world coordinates using the geotransform of ref_img and mon_img to get (world_x0, world_y0) and (world_x1, world_y1), and then (dx, dy) calculated from those world coordinates. Later logic to convert pixels to meters could then be removed. This would require that:

telespazio-tim commented 2 months ago

Hi @DFEvans,

Karios is supposed to compare images that are comparable, this means images having same geotransform (EPSG code) and footprint. In the case input images does have geotransform information, It is the responsablity to the user to prepare its inputs images to make them comparable with Karios.

We are keeping this idea aside, but for now, we will just add a "disclaimer" in the "Geometric Error Distribution" output and improve the documentation.

Sample of disclaimer : image