centreborelli / s2p

Satellite Stereo Pipeline
GNU Affero General Public License v3.0
199 stars 67 forks source link

Run on collection of images? MVS example? #103

Open dbonafilia opened 2 years ago

dbonafilia commented 2 years ago

Hi! I'm interested in running this code on a collection of satellite images, such as the data from the IARPA MVS Challenge that it says this repo was used to win.

Is the approach from "Automatic 3d reconstruction from multi-date satellite images" included in this repo? For example, the ranking of potential image pairs and the post-matching merging of all these pairs? If so, is there any documentation or examples of how to do this? Maybe the example code/config used to win the IARPA MVS Challenge?

Sorry if I'm missing something obvious and thanks for the help!

mnhrdt commented 2 years ago

The code in this repo produces a point cloud from a single stereo pair (or triplet). There is no logic here for dealing with large series of images, choosing the good pairs, and merging the results.

The program used for the IARPA MVS challenge was an ad-hoc bash/python script that called regular s2p several times and then merged the results. If I recall correctly, the "good pairs" of images were hardcoded in the script since it was only intended for a single, fixed, worldview collection. There is a docker image around named "s2p-iarpa" that contains the whole script, together with the (very old) version of s2p that was used at the time. You can docker run -it into it and see what it does, but unfortunately there is no further documentation for this script.

dbonafilia commented 2 years ago

thanks!

dbonafilia commented 2 years ago

Do you know how the angle between photos and the incidence angle are calculated/found on the IARPA images? When I run gdalinfo on the .NTF files, there's no incidence angle, and the paper doesn't explain how angle between two photos is computed.

Here's all the angle related metadata I get. Any idea how to go from this to incidence angle or angle between photos? NITF_CSEXRA_ANGLE_TO_NORTH=270.000 NITF_CSEXRA_AZ_OF_OBLIQUITY=094.550 NITF_CSEXRA_GSD_BETA_ANGLE=089.0 NITF_CSEXRA_OBLIQUITY_ANGLE=24.340 NITF_STDIDC_ACQUISITION_DATE=20150630135323 NITF_USE00A_ANGLE_TO_NORTH=270 NITF_USE00A_OBL_ANG=24.34 NITF_USE00A_ROLL_ANG=+24.28

Thanks

carlodef commented 2 years ago

Hi @dbonafilia, these angles are computed with the rpcm package (pip install rpcm). For example using the function rpcm.angle_between_views:

https://github.com/centreborelli/rpcm/blob/master/rpcm/__init__.py#L196