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

Function KeypointsToMatrix

src/colmap/feature/types.cc:222–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222FeatureKeypointsMatrix KeypointsToMatrix(
223 const FeatureKeypoints& feature_keypoints) {
224 const size_t num_features = feature_keypoints.size();
225 FeatureKeypointsMatrix keypoints(num_features, kKeypointMatrixCols);
226 for (size_t i = 0; i < num_features; ++i) {
227 keypoints(i, 0) = feature_keypoints[i].x;
228 keypoints(i, 1) = feature_keypoints[i].y;
229 keypoints(i, 2) = feature_keypoints[i].ComputeScale();
230 keypoints(i, 3) = feature_keypoints[i].ComputeOrientation();
231 }
232 return keypoints;
233}
234
235FeatureKeypoints KeypointsFromMatrix(
236 const Eigen::Ref<const FeatureKeypointsMatrix>& keypoints) {

Callers 2

ExtractMethod · 0.85
TESTFunction · 0.85

Calls 3

sizeMethod · 0.80
ComputeScaleMethod · 0.80
ComputeOrientationMethod · 0.80

Tested by 1

TESTFunction · 0.68