Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmake/FindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ endif()
message(STATUS "Configuring PoseLib... done")

# COLMAP
set(LSD_ENABLED OFF CACHE BOOL "Disable LSD in COLMAP" FORCE)
FetchContent_Declare(COLMAP
GIT_REPOSITORY https://github.com/colmap/colmap.git
GIT_TAG c9097b031ee00da22609c7ac4b3f6b45b4178de2
Expand All @@ -70,7 +71,7 @@ message(STATUS "Configuring COLMAP... done")
# JLinkage
FetchContent_Declare(JLinkage
GIT_REPOSITORY https://github.com/B1ueber2y/JLinkage.git
GIT_TAG 452d67eda005db01a02071a5af8f0eced0a02079
GIT_TAG 75dadd555f81b1cf1b0f016d8cac76f3b554ba9b
EXCLUDE_FROM_ALL
)
message(STATUS "Configuring JLinkage...")
Expand Down
6 changes: 3 additions & 3 deletions limap/base/bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -804,19 +804,19 @@ void bind_camera(py::module &m) {
.def(py::init<bool>(), R"(
Default constructor: identity pose
)",
py::arg("initialized") = false)
py::arg("init") = false)
.def(py::init<const CameraPose &>(), R"(
Copy constructor
)",
py::arg("campose"))
.def(py::init<V4D, V3D, bool>(), R"(
Constructor from a quaternion vector and a translation vector
)",
py::arg("qvec"), py::arg("tvec"), py::arg("initialized") = true)
py::arg("qvec"), py::arg("tvec"), py::arg("init") = true)
.def(py::init<M3D, V3D, bool>(), R"(
Constructor from a rotation matrix and a translation vector
)",
py::arg("R"), py::arg("tvec"), py::arg("initialized") = true)
py::arg("R"), py::arg("tvec"), py::arg("init") = true)
.def(py::init<py::dict>(), R"(
Constructor from a Python dict
)",
Expand Down
9 changes: 4 additions & 5 deletions limap/base/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ class Camera : public colmap::Camera {

class CameraPose {
public:
CameraPose(bool initialized = false) : initialized(initialized) {}
CameraPose(V4D qvec, V3D tvec, bool initialized = true)
: qvec(qvec.normalized()), tvec(tvec), initialized(initialized) {}
CameraPose(M3D R, V3D T, bool initiallized = true)
: tvec(T), initialized(initialized) {
CameraPose(bool init = false) : initialized(init) {}
CameraPose(V4D qvec, V3D tvec, bool init = true)
: qvec(qvec.normalized()), tvec(tvec), initialized(init) {}
CameraPose(M3D R, V3D t, bool init = true) : tvec(t), initialized(init) {
qvec = RotationMatrixToQuaternion(R);
}
CameraPose(py::dict dict);
Expand Down
4 changes: 4 additions & 0 deletions limap/base/line_dists.cc
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ double compute_distance<Line2d>(const Line2d &l1, const Line2d &l2,
case LineDistType::ENDPOINTS_SCALEINV:
throw std::runtime_error(
"Type error. Scale invariance distance is not supported for Line2d.");
default:
throw std::runtime_error("Distance type not supported.");
}
return -1.0;
}
Expand Down Expand Up @@ -260,6 +262,8 @@ double compute_distance<Line3d>(const Line3d &l1, const Line3d &l2,
return dist_endpoints_scaleinv_oneway(l1, l2);
case LineDistType::ENDPOINTS_SCALEINV:
return dist_endpoints_scaleinv(l1, l2);
default:
throw std::runtime_error("Distance type not supported.");
}
return -1.0;
}
Expand Down
4 changes: 2 additions & 2 deletions limap/util/simple_logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class LogProgressbar : public progressbar {
if (update_is_called)
progress += inc;
std::string out = get_update_str();
if (out.c_str() != "\r") {
if (out != "\r") {
STDLOG(CERR) << out;
}
}
Expand All @@ -189,7 +189,7 @@ class SyncLogProgressbar : public progressbar {
if (update_is_called)
progress += inc;
std::string out = get_update_str();
if (out.c_str() != "\r") {
if (out != "\r") {
SYNC_LOG(CERR) << out;
}
}
Expand Down