Skip to content

Problem with GCP patch extraction on SPOT 2 scene #28

@MatteaE

Description

@MatteaE

I am trying to orthorectify a SPOT 2 scene using a Sentinel-2 reference. I have a set of 50 good tie points computed via image matching with the Ames Stereo Pipeline.
While doing RSM refinement (cGCPOptimization), in some cases some of the GCP patches computed for the raw image include spurious values equal or close to 65535, which squish everything else to black (see attachments - the white specks) and disrupt the correlation, so that model refinement fails (large coregistration error of several pixels, not improving with any iteration).

The SPOT scene is a bit special compared to others, in that it has an inaccurate initial geotransform (off by ~60 km) and its original data type is Float32 instead of UInt8.

I have already tested the following, with no success:

  • converting the SPOT scene to UInt8, with various rescaling/combinations for the NA flag value
  • enlarging the extent of the reference orthoimage and DEM to provide a large margin on all sides
  • changing the extent of the SPOT scene (correcting the GCPs in the GeoTiff image and also the GCPs and location model in the METADATA.DIM file - but not the XYZ satellite location)
  • different versions of geoCosiCorr3D (the old dd4b7a6 and the current c531c22).

Code and data to reproduce are here: https://drive.switch.ch/index.php/s/LsrfwhvJe0YZHfg

Run with
$ python cosicorr_refinement.py Spot2 10 1993-09-20_06-34-29 007-009_S2_187-270-0_1993-09-20-06-34-29_HRV-2_P_DT_RR 1993-09-20_06-34-29/ref_ortho.tif 1993-09-20_06-34-29/ref_dem.tif 1993-09-20_06-34-29/tps_final.txt

I am on Kubuntu 22.04, gdal 3.6.4, pyproj 3.6.1, geopandas 0.14.3, rasterio 1.3.9.

0c3286fd-d641-4fcf-85a6-a045c22e93a9_loop_5
3b1509fe-37b5-44f6-b53b-62b442efb67f_loop_7
3b1509fe-37b5-44f6-b53b-62b442efb67f_loop_8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions