Issues with ossim sensor model
Mantis Issue 257, reported by ebarthelet, assigned to jmichel, created: 2011-03-18
Hi all,
When dealing with sensor models (in my case a TerraSar-X sensor model), I've noticed that the application of a forward projection (image to world coordinates) followed by an inverse projection (world to image coordinates) leads to an unexpected result... that is, we don't land on our feet ! The resulting image coordinates are (in my case) 10 pixels far from the initial image coordinates.
In the method ossimSensorModel::worldToLineSample, the method lineSampleHeightToWorld is iteratively called with a fixed height (the height of the world point given as argument of ossimSensorModel::worldToLineSample) what I think is not correct. I've run tests where I replaced calls to lineSampleHeightToWorld with calls to lineSampleToWorld (lines 346, 347 & 348 of file ossimSensorModel.cpp) and the results are much better (the resulting image coordinates are less than 0.1 pixel far from the initial ones).
The call to lineSampleHeightToWorld could be a voluntary choice made by the software developer in order to have a less time-consuming method (?). Indeed, lineSampleToWorld implements an iterative intersection between a ray and the DEM whereas lineSampleHeightToWorld does not. However, I think it's worth it because the location accuracy (from world to image) would be (greatly) improved.
You can find the suggested modification in attached file.
Thank you for your answers,
Best regards,
Edouard
1429254924 - julienHas this patch been reported to ossim ?
1447151480 - julienPull request to ossim created: https://github.com/ossimlabs/ossim/pull/5