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

Method FromShapeParameters

src/colmap/feature/types.cc:65–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 : x(x_), y(y_), a11(a11_), a12(a12_), a21(a21_), a22(a22_) {}
64
65FeatureKeypoint FeatureKeypoint::FromShapeParameters(const float x,
66 const float y,
67 const float scale_x,
68 const float scale_y,
69 const float orientation,
70 const float shear) {
71 THROW_CHECK_GE(scale_x, 0.0);
72 THROW_CHECK_GE(scale_y, 0.0);
73 return FeatureKeypoint(x,
74 y,
75 scale_x * std::cos(orientation),
76 -scale_y * std::sin(orientation + shear),
77 scale_x * std::sin(orientation),
78 scale_y * std::cos(orientation + shear));
79}
80
81void FeatureKeypoint::Rescale(const float scale) { Rescale(scale, scale); }
82

Callers

nothing calls this directly

Calls 1

FeatureKeypointClass · 0.85

Tested by

no test coverage detected