This module provide tools to localize images into an existing Structure from Motion scene.


$ openMVG_main_SfM_Localization -i [] -m [] -o [] -q []

Arguments description:

Required parameters:

  • [-i|–input_file] The input SfM_Data scene (must contains a structure and camera poses,eg.the sfm_data.bin generated by SfM)
  • [-m|–match_dir] path to the matches that corresponds to the provided SfM_Data scene
  • [-o|–out_dir] path to save the found camera position
  • [-u|–match_out_dir] path to the directory where new matches will be stored. If empty matches are stored in match_dir directory.
  • [-q|–query_image_dir] path to an image OR to the directory containing the images that must be localized (the directory can also contain the images from the initial reconstruction)

Optional parameters:

  • [-r|–residual_error] upper bound of the residual error tolerance
  • [-s|–single_intrinsics] (switch) when switched on, the program will check if the input sfm_data contains a single intrinsics and, if so, take this value as intrinsics for the query images. (OFF by default)
  • [-e|–export_structure] (switch) when switched on, the program will also export structure to output sfm_data while OFF will only export VIEWS, INTRINSICS and EXTRINSICS. (OFF by default)
  • [-n|–numThreads] number of thread(s)
// Example
$ openMVG_main_SfM_Localization -i /home/user/Dataset/ImageDataset_SceauxCastle/reconstruction/sfm_data.bin -m /home/user/Dataset/ImageDataset_SceauxCastle/matches -o ./ -q /home/user/Dataset/ImageDataset_SceauxCastle/images/100_7100.JPG