Python implementation of A Generic Bundle Adjustment Methodology for Indirect RPC Model Refinement of Satellite Imagery (IPOL, 2021).
Authors: Roger Mari, Carlo de Franchis, Enric Meinhardt-Llopis, Jeremy Anger, Gabriele Facciolo.
Install the bundle_adjust package:
git clone https://github.com/centreborelli/sat-bundleadjust.git
cd sat-bundleadjust
pip install -e .Check that the installation was successful by running
pytest tests/test_ba.pyTo run the code:
bundle_adjust config.jsonwhere config.json contains a Python dictionary specifying the paths to the input data and any additional configuration parameters.
To run the default configuration use a config.json as follows:
{
"geotiff_dir": "your/path/to/the/input/geotiff/images",
"rpc_dir": "your/path/to/the/input/RPC/models",
"rpc_src": "txt",
"output_dir": "your/output/path"
}where:
geotiff_dirpoints to the directory containing all the input geotiff image files, with extension.tifrpc_dirpoints to the directory containing all the input RPC camera models, in txt files with extension.rpc. The rpcm package is used to represent RPC models, which can be written to txt files usingrpcm.RPCModel.write_to_file.rpc_srcis a string that can be either"txt","json"or"geotiff". If"geotiff"is used, then the input RPC models are directly read from the input geotiff image files.- The output RPC models are written in a folder named
rpcs_adj, which is created in theoutput_dir.
Check feature_tracks/ft_utils.init_feature_tracks_config for the list of parameters that can be added to config.json to customize the feature tracking stage of the pipeline.
Check ba_pipeline.__init__ for the list of parameters that can be added to config.json to customize the bundle adjustment pipeline.
Examples:
bundle_adjust tests/config1.json