Skip to content

Commit 0347715

Browse files
committed
remove useless code & add "Open Sparse Model"
1 parent de4bf1d commit 0347715

28 files changed

+70
-1317
lines changed

3rdparty/SiftGPU/CuTexImage.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// Permission to use, copy, modify and distribute this software and its
1010
// documentation for educational, research and non-profit purposes, without
1111
// fee, and without a written agreement is hereby granted, provided that
12-
// the above copyright notice and the following paragraph appear in all copies.
12+
// the above copyright notice and the following paragraph appear in all copies.
1313
//
1414
// The University of North Carolina at Chapel Hill make no representations
1515
// about the suitability of this software for any purpose. It is provided

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ add_library(xrsfm
133133
src/ui/resources.qrc
134134
)
135135

136+
qt5_add_resources(RESOURCES src/ui/resources.qrc)
136137

137138
target_include_directories(xrsfm
138139
PUBLIC
@@ -163,7 +164,7 @@ else ()
163164
sift_gpu
164165
${Qt5Core_LIBRARIES}
165166
${Qt5OpenGL_LIBRARIES}
166-
${Qt5Widgets_LIBRARIES}
167+
${Qt5Widgets_LIBRARIES}
167168
)
168169
endif()
169170

@@ -190,3 +191,4 @@ target_link_libraries(rec_kitti xrsfm)
190191

191192
add_executable(test_gui src/test_gui.cc)
192193
target_link_libraries(test_gui xrsfm)
194+
target_sources(test_gui PRIVATE ${RESOURCES})

src/geometry/colmap/estimators/absolute_pose.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "absolute_pose.h"
3333

3434
#include <Eigen/Eigen>
35+
#include <glog/logging.h>
3536

36-
#include "geometry/colmap/util/logging.h"
3737
#include "polynomial.h"
3838

3939
namespace colmap {

src/geometry/colmap/estimators/absolute_pose.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
#include <array>
3737
#include <vector>
3838

39-
#include "geometry/colmap/util/types.h"
39+
// #include "geometry/colmap/util/types.h"
40+
41+
namespace Eigen {
42+
typedef Eigen::Matrix<double, 3, 4> Matrix3x4d;
43+
}
4044

4145
namespace colmap {
4246

src/geometry/colmap/estimators/fundamental_matrix.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include <vector>
3737

3838
#include "optim/ransac.h"
39-
#include "util/types.h"
39+
// #include "util/types.h"
4040

4141
namespace colmap {
4242

src/geometry/colmap/estimators/polynomial.cc

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
#include "polynomial.h"
3333

3434
#include <Eigen/Eigenvalues>
35-
36-
#include "geometry/colmap/util/logging.h"
35+
#include <glog/logging.h>
3736

3837
namespace colmap {
3938
namespace {

src/geometry/colmap/estimators/polynomial.h

-49
Original file line numberDiff line numberDiff line change
@@ -36,42 +36,6 @@
3636

3737
namespace colmap {
3838

39-
// All polynomials are assumed to be the form:
40-
//
41-
// sum_{i=0}^N polynomial(i) x^{N-i}.
42-
//
43-
// and are given by a vector of coefficients of size N + 1.
44-
//
45-
// The implementation is based on COLMAP's old polynomial functionality and is
46-
// inspired by Ceres-Solver's/Theia's implementation to support complex
47-
// polynomials. The companion matrix implementation is based on NumPy.
48-
49-
// Evaluate the polynomial for the given coefficients at x using the Horner
50-
// scheme. This function is templated such that the polynomial may be evaluated
51-
// at real and/or imaginary points.
52-
template <typename T>
53-
T EvaluatePolynomial(const Eigen::VectorXd &coeffs, const T &x);
54-
55-
// Find the root of polynomials of the form: a * x + b = 0.
56-
// The real and/or imaginary variable may be NULL if the output is not needed.
57-
bool FindLinearPolynomialRoots(const Eigen::VectorXd &coeffs,
58-
Eigen::VectorXd *real, Eigen::VectorXd *imag);
59-
60-
// Find the roots of polynomials of the form: a * x^2 + b * x + c = 0.
61-
// The real and/or imaginary variable may be NULL if the output is not needed.
62-
bool FindQuadraticPolynomialRoots(const Eigen::VectorXd &coeffs,
63-
Eigen::VectorXd *real, Eigen::VectorXd *imag);
64-
65-
// Find the roots of a polynomial using the Durand-Kerner method, based on:
66-
//
67-
// https://en.wikipedia.org/wiki/Durand%E2%80%93Kerner_method
68-
//
69-
// The Durand-Kerner is comparatively fast but often unstable/inaccurate.
70-
// The real and/or imaginary variable may be NULL if the output is not needed.
71-
bool FindPolynomialRootsDurandKerner(const Eigen::VectorXd &coeffs,
72-
Eigen::VectorXd *real,
73-
Eigen::VectorXd *imag);
74-
7539
// Find the roots of a polynomial using the companion matrix method, based on:
7640
//
7741
// R. A. Horn & C. R. Johnson, Matrix Analysis. Cambridge,
@@ -83,19 +47,6 @@ bool FindPolynomialRootsCompanionMatrix(const Eigen::VectorXd &coeffs,
8347
Eigen::VectorXd *real,
8448
Eigen::VectorXd *imag);
8549

86-
////////////////////////////////////////////////////////////////////////////////
87-
// Implementation
88-
////////////////////////////////////////////////////////////////////////////////
89-
90-
template <typename T>
91-
T EvaluatePolynomial(const Eigen::VectorXd &coeffs, const T &x) {
92-
T value = 0.0;
93-
for (Eigen::VectorXd::Index i = 0; i < coeffs.size(); ++i) {
94-
value = value * x + coeffs(i);
95-
}
96-
return value;
97-
}
98-
9950
} // namespace colmap
10051

10152
#endif // COLMAP_SRC_BASE_POLYNOMIAL_H_

src/geometry/colmap/optim/loransac.h

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include "random_sampler.h"
4141
#include "ransac.h"
4242
#include "support_measurement.h"
43-
#include "../util/logging.h"
4443

4544
namespace colmap {
4645

src/geometry/colmap/optim/ransac.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
#include <random>
3737
#include <stdexcept>
3838
#include <vector>
39+
#include <glog/logging.h>
3940

4041
#include "random_sampler.h"
4142
#include "support_measurement.h"
42-
#include "../util/logging.h"
4343

4444
namespace colmap {
4545

src/geometry/colmap/optim/sampler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include <cstddef>
3636
#include <vector>
3737

38-
#include "../util/logging.h"
38+
#include <glog/logging.h>
3939

4040
namespace colmap {
4141

src/geometry/colmap/util/endian.h

-153
This file was deleted.

src/geometry/colmap/util/logging.cc

-63
This file was deleted.

0 commit comments

Comments
 (0)