NeoGeographyToolkit / StereoPipeline

The NASA Ames Stereo Pipeline is a suite of automated geodesy & stereogrammetry tools designed for processing planetary imagery captured from orbiting and landed robotic explorers on other planets.
Apache License 2.0
493 stars 173 forks source link

bundle_adjust with num-passes 2 stops on encountering an empty match file from the first pass #251

Closed ShashankBice closed 5 years ago

ShashankBice commented 5 years ago

bundle_adjust with multiple passes fails to complete if it tries to open an empty match from the first pass. Ideally it should have ignored the empty match file and proceed with the next run. This occurs when I run bundle_adjust with multiple images, with the empty match files corresponding to the image pairs with no overlap. This should be easy to look into.

An example error message:

Outlier statistics: b = -0.0904264, e = 0.141634.
Removing as outliers points with mean reprojection error > 2.
Removed 0 outliers by reprojection error.
Now have 29225 points remaining.
Removed 0 outliers based on disparity of ip.
Writing: run_ba_dshean_params_outlier_removed_20181203_20190101_high_ip_noresthres_num_pass_2/run-20181203_041019_0f33_1B_AnalyticMS_b4__20181203_041020_0f33_1B_AnalyticMS_b4-clean.match
Removed 0 outliers based on disparity of ip.
Writing: run_ba_dshean_params_outlier_removed_20181203_20190101_high_ip_noresthres_num_pass_2/run-20181203_041019_0f33_1B_AnalyticMS_b4__20181203_042413_101f_1B_AnalyticMS_b4-clean.match
Removed 0 outliers based on disparity of ip.
Writing: run_ba_dshean_params_outlier_removed_20181203_20190101_high_ip_noresthres_num_pass_2/run-20181203_041019_0f33_1B_AnalyticMS_b4__20181203_042414_101f_1B_AnalyticMS_b4-clean.match
Removed 0 outliers based on disparity of ip.
Writing: run_ba_dshean_params_outlier_removed_20181203_20190101_high_ip_noresthres_num_pass_2/run-20181203_041019_0f33_1B_AnalyticMS_b4__20181203_042415_101f_1B_AnalyticMS_b4-clean.match
Removed 0 outliers based on disparity of ip.
Writing: run_ba_dshean_params_outlier_removed_20181203_20190101_high_ip_noresthres_num_pass_2/run-20181203_041019_0f33_1B_AnalyticMS_b4__20190101_040517_100d_1B_AnalyticMS_b4-clean.match
Removed 0 outliers based on disparity of ip.
Writing: run_ba_dshean_params_outlier_removed_20181203_20190101_high_ip_noresthres_num_pass_2/run-20181203_041019_0f33_1B_AnalyticMS_b4__20190101_040518_100d_1B_AnalyticMS_b4-clean.match

VW Error: Failed to open match file: run_ba_dshean_params_outlier_removed_20181203_20190101_high_ip_noresthres_num_pass_2/run-20181203_041019_0f33_1B_AnalyticMS_b4__20190101_040519_100d_1B_AnalyticMS_b4.match
Traceback (most recent call last):
  File "/opt/StereoPipeline/libexec/parallel_bundle_adjust", line 413, in <module>
    run_job('bundle_adjust', args, instance_index=-1, msg='%d: Optimizing' % step)
  File "/opt/StereoPipeline/libexec/parallel_bundle_adjust", line 227, in run_job
    raise Exception('Bundle adjust step ' + kw['msg'] + ' failed')
Exception: Bundle adjust step 2: Optimizing failed

Here, the empty match file which fails to load up is run-20181203_041019_0f33_1B_AnalyticMS_b4__20190101_040519_100d_1B_AnalyticMS_b4.match

I am sharing the 8 images and their camera models and the ba ouput folder on gdrive in a moment.

oleg-alexandrov commented 5 years ago

This got fixed.