s2p icon indicating copy to clipboard operation
s2p copied to clipboard

cartosat data produces incorrect output

Open kbalakrish opened this issue 7 years ago • 4 comments

I have used S2P previously from the older repository (installed in January 2016), and it worked fine with Cartosat data. Carlo had very kindly added support for Cartosat in that version. But yesterday I reinstalled S2P from this new github repository and the output is not quite right.

Attaching two dsm files (in zipped folder named dsm_error.zip).

  1. The file named dsm_original.tif is the output I got with the old installation
  2. The file named 5m_carto_dsm22feb.tif is what I get with the new installation Also attaching the .json file (stereo.json) so you can see the settings used to run S2P (also in zipped folder). dsm_error.zip

The cartosat image pair is available here: https://www.dropbox.com/s/4sj8akfoui2les0/152904411.zip?dl=0

Thank you

kbalakrish avatar Feb 23 '18 11:02 kbalakrish

Hi Krishna, If you can provide the commit hash of the version that worked fine it could help us track down the cause of the difference.

Best

carlodef avatar Feb 24 '18 15:02 carlodef

Hi Carlo, This should be the one that worked: aa989b214fe9c6aecd93f1f145e6d87d2a4e4a53 Let me know if you need any other information,

Thanks, Krishna

kbalakrish avatar Feb 24 '18 18:02 kbalakrish

Hi Krishna,

Thank you very much for raising this issue. After a bit of analysis, it turns out that the problem is caused by an optimisation that was introduced in s2p to speed-up the search for SIFT matches. This optimisation assumes that the stereo-rectification computed blindly from the RPC camera models is correct up to 10 pixels and restricts the search area to a narrow stripe of 10 pixels around epipolar lines.

On this pair of Cartosat images the pointing error is larger than 10 pixels, hence all SIFT matches are wrongly rejected.

I've added a parameter called max_pointing_error for tuning this value. It defaults to 10 pixels (to keep the previous behaviour). On this pair of Cartosat images you can safely set it to 100 pixels to get the pipeline work correctly. Just add "max_pointing_error": 100 in the json input configuration file.

As a side note, I'd recommend also adding the parameter "register_with_shear": true to reduce the disparity range and speed-up the whole processing.

Best, Carlo

carlodef avatar Jun 14 '18 08:06 carlodef

Dear Carlo, Thank you very much for fixing this! So far I was using my old installation (from 2 years back) which was still working. Now I will switch to the latest version.

Best Regards

Krishna

On Thu, Jun 14, 2018 at 2:27 PM, Carlo de Franchis <[email protected]

wrote:

Hi Krishna,

Thank you very much for raising this issue. After a bit of analysis, it turns out that the problem is caused by an optimisation that was introduced in s2p to speed-up the search for SIFT matches. This optimisation assumes that the stereo-rectification computed blindly from the RPC camera models is correct up to 10 pixels and restricts the search area to a narrow stripe of 10 pixels around epipolar lines.

On this pair of Cartosat images the pointing error is larger than 10 pixels, hence all SIFT matches are wrongly rejected.

I've added a parameter called max_pointing_error for tuning this value. It defaults to 10 pixels (to keep the previous behaviour). On this pair of Cartosat images you can safely set it to 100 pixels to make the pipeline work. Just add "max_pointing_error": 100 in the json input configuration file.

As a side note, I'd recommend adding also the option "register_with_shear": true to reduce the disparity range and speed-up the whole processing.

Best, Carlo

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MISS3D/s2p/issues/146#issuecomment-397223097, or mute the thread https://github.com/notifications/unsubscribe-auth/AjDzIX3Y8UUiM1DAklReOGj9eg-BoEkNks5t8iV8gaJpZM4SQwej .

kbalakrish avatar Jun 15 '18 08:06 kbalakrish