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

Function NormalizeFeatureKeypoints

src/colmap/feature/sift.cc:1010–1024  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008}
1009
1010FeatureKeypoints NormalizeFeatureKeypoints(const Camera& camera,
1011 const FeatureKeypoints& keypoints) {
1012 FeatureKeypoints normalized_keypoints(keypoints.size());
1013 for (size_t i = 0; i < keypoints.size(); ++i) {
1014 const FeatureKeypoint& keypoint = keypoints[i];
1015 if (const auto cam_point =
1016 camera.CamFromImg(Eigen::Vector2d(keypoint.x, keypoint.y))) {
1017 normalized_keypoints[i] = FeatureKeypoint(cam_point->x(), cam_point->y());
1018 } else {
1019 // Set to large values to ensure that associated matches are rejected.
1020 normalized_keypoints[i] = FeatureKeypoint(1e6f, 1e6f);
1021 }
1022 }
1023 return normalized_keypoints;
1024}
1025
1026double ComputeNormalizedGuidedMatchingMaxResidual(const Camera& camera1,
1027 const Camera& camera2,

Callers 2

MatchGuidedMethod · 0.85
MatchGuidedMethod · 0.85

Calls 3

FeatureKeypointClass · 0.85
sizeMethod · 0.80
CamFromImgMethod · 0.80

Tested by

no test coverage detected