openMVG / SfM_quality_evaluation

SfM Camera trajectory quality evaluation
81 stars 47 forks source link

Error when calling openMVG_main_evalQuality: "The input SfM_Data file "/path/to/sfm_data.json" cannot be read." #1

Open biesseck opened 7 years ago

biesseck commented 7 years ago

I got the following error message when running EvaluationLauncher.py: "The input SfM_Data file "/path/to/sfm_data.json" cannot be read.".

In line 98 of this python script "outGlobal_dir" is passed as argument to openMVG_main_evalQuality program, but "matches_dir" should be used because "sfm_data.json" file is stored in "/path/to/SfM_quality_evaluation/Benchmarking_Camera_Calibration_2008_out/evaluation_output/fountain-P11/matching" directory. For my understanding the line 98 should be written as

command = command + " -c " + matches_dir + "/sfm_data.json"

instead of

command = command + " -c " + outGlobal_dir + "/sfm_data.json"

Hope this helps!

pmoulon commented 7 years ago

Hi @biesseck Thank you for your feedback. I just tried back on my side and your right I did not update this script for OpenMVG v1.x

You must change the line: https://github.com/openMVG/SfM_quality_evaluation/blob/master/EvaluationLauncher.py#L89 from command = command + " -f 0" # Do not refine intrinsics to command = command + " -f NONE" # Do not refine intrinsics

and the line https://github.com/openMVG/SfM_quality_evaluation/blob/master/EvaluationLauncher.py#L98 from command = command + " -c " + outGlobal_dir + "/sfm_data.json" to command = command + " -c " + outGlobal_dir + "/sfm_data.bin"

And it will work.