removing shared ptr, iostream, renaming

release/4.3a0
akrishnan86 2020-10-02 23:44:55 -07:00
parent f11ce11678
commit 03ca905342
3 changed files with 2 additions and 6 deletions

View File

@ -7,8 +7,6 @@
#include <gtsam/sfm/MFAS.h> #include <gtsam/sfm/MFAS.h>
#include <boost/shared_ptr.hpp>
#include <algorithm> #include <algorithm>
#include <map> #include <map>
#include <unordered_map> #include <unordered_map>

View File

@ -9,8 +9,6 @@
#include <CppUnitLite/TestHarness.h> #include <CppUnitLite/TestHarness.h>
#include <iostream>
using namespace std; using namespace std;
using namespace gtsam; using namespace gtsam;

View File

@ -59,7 +59,7 @@ def get_data() -> Tuple[gtsam.Values, List[gtsam.BinaryMeasurementUnit3]]:
return wRc_values, i_iZj_list return wRc_values, i_iZj_list
def prune_to_inliers(w_iZj_list: gtsam.BinaryMeasurementsUnit3) -> gtsam.BinaryMeasurementsUnit3: def filter_outliers(w_iZj_list: gtsam.BinaryMeasurementsUnit3) -> gtsam.BinaryMeasurementsUnit3:
"""Removes outliers from a list of Unit3 measurements that are the """Removes outliers from a list of Unit3 measurements that are the
translation directions from camera i to camera j in the world frame.""" translation directions from camera i to camera j in the world frame."""
@ -120,7 +120,7 @@ def estimate_poses(i_iZj_list: gtsam.BinaryMeasurementsUnit3,
i_iZj.key1(), i_iZj.key2(), w_iZj, i_iZj.noiseModel())) i_iZj.key1(), i_iZj.key2(), w_iZj, i_iZj.noiseModel()))
# Remove the outliers in the unit translation directions. # Remove the outliers in the unit translation directions.
w_iZj_inliers = prune_to_inliers(w_iZj_list) w_iZj_inliers = filter_outliers(w_iZj_list)
# Run the optimizer to obtain translations for normalized directions. # Run the optimizer to obtain translations for normalized directions.
wtc_values = gtsam.TranslationRecovery(w_iZj_inliers).run() wtc_values = gtsam.TranslationRecovery(w_iZj_inliers).run()