MCPcopy Create free account
hub / github.com/colmap/colmap / ProjectPoint

Function ProjectPoint

src/colmap/mvs/texture_mapping.cc:117–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117Eigen::Vector2f ProjectPoint(const float* P, const Eigen::Vector3f& point) {
118 const Eigen::Map<const Eigen::Matrix<float, 3, 4, Eigen::RowMajor>> P_m(P);
119 const Eigen::Vector4f ph(point.x(), point.y(), point.z(), 1.0f);
120 const Eigen::Vector3f proj = P_m * ph;
121 return Eigen::Vector2f(proj(0) / proj(2), proj(1) / proj(2));
122}
123
124float ProjectPointDepth(const float* P, const Eigen::Vector3f& point) {
125 const Eigen::Map<const Eigen::Matrix<float, 3, 4, Eigen::RowMajor>> P_m(P);

Callers 3

SelectViewsFunction · 0.85
ComputeRegionProjectionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected