telespazio-tim / karios

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

What is the suggested/required range of image values? #7

Open DFEvans opened 3 months ago

DFEvans commented 3 months ago

Inputting images which are normalised to the range 0-1, I get very few/no matches, and warnings about low contrast images:

/home/danielevans/repositories/karios/karios/klt_matcher/matcher.py:269: UserWarning: /home/danielevans/repositories/karios/results/20230724T063758000_visual_40_hotsat1_prod_20230724T063758000_visual_40_hotsat1_S2_resampled/mon_laplacian_0_0_1437_1290.tif is a low contrast image
  io.imsave(
/home/danielevans/repositories/karios/karios/klt_matcher/matcher.py:273: UserWarning: /home/danielevans/repositories/karios/results/20230724T063758000_visual_40_hotsat1_prod_20230724T063758000_visual_40_hotsat1_S2_resampled/ref_laplacian_0_0_1437_1290.tif is a low contrast image

Manually rescaling the images before inputs can improve (or degrade) the results.

Is the the tool be expected to handle images of arbitrary pixel depth/dtype/range? If not, is there any guidance on what pixel dtype and value range must be supplied to the tool?

DFEvans commented 2 months ago

By way of example, comparing one of our images to Sentinel-2 L2A, we see CE90 varying by a factor of two (and, in some cases, crashes due to low KPs) depending on exactly how we normalise the inputs. Blanks indicate that the data were unscaled.

image