Skip to content

Commit

Permalink
[test] Suppose that views are not longer ordered by their id (this is…
Browse files Browse the repository at this point in the history
… the case if we use an unordered_map).
  • Loading branch information
pmoulon committed Apr 22, 2016
1 parent c560446 commit e9212e3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/openMVG/sfm/pipelines/sequential/sequential_SfM_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ TEST(SEQUENTIAL_SFM, Known_Intrinsics) {
// Configure reconstruction parameters (intrinsic parameters are held constant)
sfmEngine.Set_Intrinsics_Refinement_Type(cameras::Intrinsic_Parameter_Type::NONE);

// Will use view ids (0,1) as the initial pair
Views::const_iterator iter_view_0 = sfm_data_2.GetViews().begin();
Views::const_iterator iter_view_1 = sfm_data_2.GetViews().begin();
std::advance(iter_view_1, 1);
sfmEngine.setInitialPair(
Pair(iter_view_0->second.get()->id_view, iter_view_1->second.get()->id_view));

EXPECT_TRUE (sfmEngine.Process());

const double dResidual = RMSE(sfmEngine.Get_SfM_Data());
Expand Down Expand Up @@ -128,6 +135,13 @@ TEST(SEQUENTIAL_SFM, Partially_Known_Intrinsics) {
// Configure reconstruction parameters (intrinsic parameters are held constant)
sfmEngine.Set_Intrinsics_Refinement_Type(cameras::Intrinsic_Parameter_Type::NONE);

// Will use view ids (0,1) as the initial pair
Views::const_iterator iter_view_0 = sfm_data_2.GetViews().begin();
Views::const_iterator iter_view_1 = sfm_data_2.GetViews().begin();
std::advance(iter_view_1, 1);
sfmEngine.setInitialPair(Pair(iter_view_0->second.get()->id_view,
iter_view_1->second.get()->id_view));

EXPECT_TRUE (sfmEngine.Process());

const double dResidual = RMSE(sfmEngine.Get_SfM_Data());
Expand Down

0 comments on commit e9212e3

Please sign in to comment.