在生成sfm_data.bin
文件后,在文件目录下执行
$ openMVG_main_ConvertSfM_DataFormat binary -i yoursfm_data.bin -o sfm-data.json -V -I -E
命令的解释如下:
Usage: openMVG_main_ConvertSfM_DataFormat
[-i|--input_file] path to the input SfM_Data scene
[-o|--output_file] path to the output SfM_Data scene
.json, .bin, .xml, .ply
[Options to export partial data (by default all data are exported)]
Usable for json/bin/xml format
[-V|--VIEWS] export views
[-I|--INTRINSICS] export intrinsics
[-E|--EXTRINSICS] export extrinsics (view poses)
[-S|--STRUCTURE] export structure
[-C|--CONTROL_POINTS] export control points
得到sfm_bin.json
文件,可以读取相机位姿。
ref:https://github.com/openMVG/openMVG/issues/693