ERROR: [main_SfM.cpp:409] Cannot load the match file.
Hello, I encountered the following error while using tutorial demo. py in Release V2.0. It seems that the matches. f. bin file was not generated, and I am not sure what the reason is Code: print ("1. Intrinsics analysis") pIntrisics = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_SfMInit_ImageListing"), "-i", input_dir, "-o", matches_dir, "-d", camera_file_params, "-c", "3"] ) pIntrisics.wait()
print ("2. Compute features") pFeatures = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeFeatures"), "-i", matches_dir+"/sfm_data.json", "-o", matches_dir, "-m", "SIFT", "-f" , "1"] ) pFeatures.wait()
print ("2. Compute matches") pMatches = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeMatches"), "-i", matches_dir+"/sfm_data.json", "-o", matches_dir+"/matches.putative.bin", "-f", "1", "-n", "AUTO"] ) pMatches.wait()
print ("2. Filter matches" ) pFiltering = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_GeometricFilter"), "-i", matches_dir+"/sfm_data.json", "-m", matches_dir+"/matches.putative.bin" , "-g" , "f" , "-o" , matches_dir+"/matches.f.bin" ] ) pFiltering.wait()
reconstruction_dir = os.path.join(output_dir,"reconstruction_sequential") print ("3. Do Incremental/Sequential reconstruction") #set manually the initial pair to avoid the prompt question pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_SfM"), "--sfm_engine", "INCREMENTAL", "--input_file", matches_dir+"/sfm_data.json", "--match_dir", matches_dir, "--output_dir", reconstruction_dir] ) pRecons.wait()
print ("5. Colorize Structure") pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/sfm_data.bin", "-o", os.path.join(reconstruction_dir,"colorized.ply")] ) pRecons.wait()
print ("4. Structure from Known Poses (robust triangulation)") pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeStructureFromKnownPoses"), "-i", reconstruction_dir+"/sfm_data.bin", "-m", matches_dir, "-o", os.path.join(reconstruction_dir,"robust.ply")] ) pRecons.wait()
Reconstruction for the global SfM pipeline
- global SfM pipeline use matches filtered by estimating essential matrices
- here we reuse photometric matches and perform only the essential matrix filering
print ("2. Filter matches (for the global SfM Pipeline)") pFiltering = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_GeometricFilter"), "-i", matches_dir+"/sfm_data.json", "-m", matches_dir+"/matches.putative.bin" , "-g" , "e" , "-o" , matches_dir+"/matches.e.bin" ] ) pFiltering.wait()
reconstruction_dir = os.path.join(output_dir,"reconstruction_global") print ("3. Do Global reconstruction") pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_SfM"), "--sfm_engine", "GLOBAL", "--input_file", matches_dir+"/sfm_data.json", "--match_file", matches_dir+"/matches.e.bin", "--output_dir", reconstruction_dir] ) pRecons.wait()
print ("5. Colorize Structure") pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeSfM_DataColor"), "-i", reconstruction_dir+"/sfm_data.bin", "-o", os.path.join(reconstruction_dir,"colorized.ply")] ) pRecons.wait()
print ("4. Structure from Known Poses (robust triangulation)") pRecons = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_ComputeStructureFromKnownPoses"), "-i", reconstruction_dir+"/sfm_data.bin", "-m", matches_dir, "-o", os.path.join(reconstruction_dir,"robust.ply")] ) pRecons.wait()
Operation information:
- Intrinsics analysis INFO: [main_SfMInit_ImageListing.cpp:197] You called : ./openMVG_main_SfMInit_ImageListing --imageDirectory d:\sfm\ReleaseV2.0\ImageDataset_SceauxCastle\images --sensorWidthDatabase ./sensor_width_database\sensor_width_camera_database.txt --outputDirectory d:\sfm\ReleaseV2.0\tutorial_out\matches --focal -1 --intrinsics --camera_model 3 --group_camera_model 1 --use_pose_prior 0 --prior_weights 1.0;1.0;1.0 --gps_to_xyz_method 0 INFO: [loggerprogress.hpp:79] [- Listing images -] 100% WARNING: [main_SfMInit_ImageListing.cpp:458] Warning & Error messages: K.txt: Unkown image file format. Readme.txt: Unkown image file format.
INFO: [main_SfMInit_ImageListing.cpp:478] SfMInit_ImageListing report: listed #File(s): 13 usable #File(s) listed in sfm_data: 11 usable #Intrinsic(s) listed in sfm_data: 1 2. Compute features INFO: [main_ComputeFeatures.cpp:121] You called : ./openMVG_main_ComputeFeatures --input_file d:\sfm\ReleaseV2.0\tutorial_out\matches/sfm_data.json --outdir d:\sfm\ReleaseV2.0\tutorial_out\matches --describerMethod SIFT --upright 0 --describerPreset NORMAL --force 1 --numThreads 0
INFO: [loggerprogress.hpp:79] [- EXTRACT FEATURES -] 100% INFO: [main_ComputeFeatures.cpp:344] Task done in (s): 8 2. Compute matches INFO: [main_ComputeMatches.cpp:114] You called : ./openMVG_main_ComputeMatches --input_file d:\sfm\ReleaseV2.0\tutorial_out\matches/sfm_data.json --output_file d:\sfm\ReleaseV2.0\tutorial_out\matches/matches.putative.bin --pair_list Optional parameters: --force 1 --ratio 0.8 --nearest_matching_method AUTO --cache_size unlimited --preemptive_feature_used/count 0 / 200 INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100% INFO: [main_ComputeMatches.cpp:217] - PUTATIVE MATCHES - INFO: [main_ComputeMatches.cpp:238] Using FAST_CASCADE_HASHING_L2 matcher INFO: [main_ComputeMatches.cpp:307] No input pair file set. Use exhaustive match by default. INFO: [main_ComputeMatches.cpp:317] Running matching on #pairs: 55 INFO: [Cascade_Hashing_Matcher_Regions.cpp:238] Using the OPENMP thread interface 2. Filter matches INFO: [main_GeometricFilter.cpp:130] You called : ./openMVG_main_GeometricFilter --input_file: d:\sfm\ReleaseV2.0\tutorial_out\matches/sfm_data.json --matches: d:\sfm\ReleaseV2.0\tutorial_out\matches/matches.putative.bin --output_file: d:\sfm\ReleaseV2.0\tutorial_out\matches/matches.f.bin Optional parameters: --input_pairs --output_pairs --force false --geometric_model f --guided_matching 0 --cache_size unlimited INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100% 3. Do Incremental/Sequential reconstruction
INFO: [main_SfM.cpp:135]
Structure from Motion:
INFO: [loggerprogress.hpp:79] [- Features Loading -] 100% ERROR: [main_SfM.cpp:409] Cannot load the match file. 5. Colorize Structure ERROR: [main_ComputeSfM_DataColor.cpp:69] The input SfM_Data file "d:\sfm\ReleaseV2.0\tutorial_out\reconstruction_sequential/sfm_data.bin" cannot be read. 4. Structure from Known Poses (robust triangulation) INFO: [main_ComputeStructureFromKnownPoses.cpp:57] Compute Structure from the provided poses ERROR: [main_ComputeStructureFromKnownPoses.cpp:132] The input SfM_Data file "d:\sfm\ReleaseV2.0\tutorial_out\reconstruction_sequential/sfm_data.bin" cannot be read. 2. Filter matches (for the global SfM Pipeline) INFO: [main_GeometricFilter.cpp:130] You called : ./openMVG_main_GeometricFilter --input_file: d:\sfm\ReleaseV2.0\tutorial_out\matches/sfm_data.json --matches: d:\sfm\ReleaseV2.0\tutorial_out\matches/matches.putative.bin --output_file: d:\sfm\ReleaseV2.0\tutorial_out\matches/matches.e.bin Optional parameters: --input_pairs --output_pairs --force false --geometric_model e --guided_matching 0 --cache_size unlimited INFO: [loggerprogress.hpp:79] [- Regions Loading -] 100% 3. Do Global reconstruction
INFO: [main_SfM.cpp:135]
Structure from Motion:
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: d:\sfm\ReleaseV2.0\ImageDataset_SceauxCastle\images\100_7100.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: d:\sfm\ReleaseV2.0\ImageDataset_SceauxCastle\images\100_7101.JPG
ERROR: [sfm_features_provider.hpp:62] Invalid feature files for the view: d:\sfm\ReleaseV2.0\ImageDataset_SceauxCastle\images\100_7102.JPG
ERROR: [main_SfM.cpp:395] Cannot load view corresponding features in directory: .
5. Colorize Structure
ERROR: [main_ComputeSfM_DataColor.cpp:69] The input SfM_Data file "d:\sfm\ReleaseV2.0\tutorial_out\reconstruction_global/sfm_data.bin" cannot be read.
4. Structure from Known Poses (robust triangulation)
INFO: [main_ComputeStructureFromKnownPoses.cpp:57] Compute Structure from the provided poses
ERROR: [main_ComputeStructureFromKnownPoses.cpp:132] The input SfM_Data file "d:\sfm\ReleaseV2.0\tutorial_out\reconstruction_global/sfm_data.bin" cannot be read.
Source: openMVG/openMVG