Skip to content

Commit

Permalink
MAINT: remove old code.
Browse files Browse the repository at this point in the history
  • Loading branch information
oddkiva committed May 21, 2024
1 parent 3f4449f commit b42ad5e
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 867 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
#include <DO/Sara/MultiViewGeometry/MinimalSolvers/RelativePoseSolver.hpp>
#include <DO/Sara/MultiViewGeometry/Miscellaneous.hpp>
#include <DO/Sara/RANSAC/RANSAC.hpp>
#include <DO/Sara/SfM/Helpers/EssentialMatrixEstimation.hpp>
#include <DO/Sara/SfM/Helpers/FundamentalMatrixEstimation.hpp>
#include <DO/Sara/SfM/Helpers/KeypointMatching.hpp>
#include <DO/Sara/SfM/Helpers/Triangulation.hpp>
#include <DO/Sara/SfM/Helpers.hpp>

#include <filesystem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include <DO/Sara/MultiViewGeometry/BundleAdjustmentProblem.hpp>
#include <DO/Sara/MultiViewGeometry/Miscellaneous.hpp>
#include <DO/Sara/RANSAC/RANSAC.hpp>
#include <DO/Sara/SfM/Helpers/EssentialMatrixEstimation.hpp>
#include <DO/Sara/SfM/Helpers/FundamentalMatrixEstimation.hpp>
#include <DO/Sara/SfM/Helpers/KeypointMatching.hpp>
#include <DO/Sara/SfM/Helpers/Triangulation.hpp>

Expand Down Expand Up @@ -101,33 +99,6 @@ struct ReprojectionError
};


auto map_feature_gid_to_match_gid(const EpipolarEdgeAttributes& epipolar_edges)
{
auto mapping = std::multimap<FeatureGID, MatchGID>{};
for (const auto& ij : epipolar_edges.edge_ids)
{
const auto view_i = epipolar_edges.edges[ij].first;
const auto view_j = epipolar_edges.edges[ij].second;
const auto& M_ij = epipolar_edges.matches[ij];
const auto& E_inliers_ij = epipolar_edges.E_inliers[ij];
const auto& two_view_geometry_ij = epipolar_edges.two_view_geometries[ij];

for (auto m = 0; m < int(M_ij.size()); ++m)
{
if (E_inliers_ij(m) && two_view_geometry_ij.cheirality(m))
{
mapping.insert(
{FeatureGID{view_i, M_ij[m].x_index()}, MatchGID{ij, m}});
mapping.insert(
{FeatureGID{view_j, M_ij[m].y_index()}, MatchGID{ij, m}});
}
}
}

return mapping;
}


GRAPHICS_MAIN()
{
auto& logger = Logger::get();
Expand Down
7 changes: 4 additions & 3 deletions cpp/src/DO/Sara/MultiViewGeometry/BundleAdjustmentProblem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#pragma once

#include <DO/Sara/Core/Tensor.hpp>
#include <DO/Sara/MultiViewGeometry/Graph/FeatureGraph.hpp>

#include <vector>

Expand Down Expand Up @@ -69,6 +68,7 @@ namespace DO::Sara {
const T* parameters;
};

#if 0
//! @brief Observation reference class.
struct ObservationRef
{
Expand Down Expand Up @@ -158,10 +158,10 @@ namespace DO::Sara {
const auto p = match_index.find(*track->begin())->second.m;
const auto point_p = two_view_geometry.X.col(p);
points_view.col(t) = point_p.hnormalized();
#if DEBUG
# if DEBUG
SARA_DEBUG << "Point[" << t << "] = " //
<< points_view.col(t).transpose() << std::endl;
#endif
# endif
}
}

Expand Down Expand Up @@ -260,6 +260,7 @@ namespace DO::Sara {
populate_camera_parameters(two_view_geometry);
}
};
#endif

//! @}

Expand Down
Loading

0 comments on commit b42ad5e

Please sign in to comment.