I’m trying to refine the sensor model of nighttime Jilin imagery. In order to do this here is my workflow :
Generate .geom file using ReadImageInfo -outkwl
Create GCP file with QGIS georeferencer
Extract row,col index of pixels to match with GCP using Python
Refine sensor model in UTM, use SRTM z points and geoid file
Apply new sensor model to image using OrthoRectification -io.in “image.tif?&geom=newfile.geom” and SRTM data
The refinement seems to work OK, but the ortho result is wrong : the image is rotated 90° counter-clockwise (but not flipped !). I mean the [row,col] shape is preserved but pixel values moved as if lat and long axis were swapped.
I tried to add ?&skipcarto=true but it does not change anything since the source image isn’t projected at all.
System is Ubuntu 22.04, I tried this with several OTB versions (6.6, 7.2, 7.4).
Any idea what could cause this ? Am I doing something wrong or is it due to Jilin’s awful metadata ? Do you want me to upload some data / debug log file ?
About the RefineSensorModel app, do you plan to re-introduce it now that you’ve removed OSSIM ?
Yes, this is strange. I’m using rasterio.transform to obtain row,col values using x,y coordinates as exported by the qgis georeferencer. I’ve already used this function for something else and it’s working as expected.
I found this row/col thing quite confusing. Like “a row is horizontal, thus it is indexed on the vertical axis”
Are you on the same page than me here ? I mean :
I don’t think this is related, since I tried with older version of OTB : 6.6 shipped with GDAL 2.2… and gave me the exact same result than 7.4 / GDAL 3.
It seems like this row/col inversion is old, but if everyone is using this RefineSensorModel app with HomologousPointsExtraction outputs, I guess the same inversion can be found there, so the process work as expected. But it fails when building the GCP file from scratch, as I did.