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

Function ValidateKeypoints

src/colmap/feature/sift_test.cc:71–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void ValidateKeypoints(const FeatureKeypoints& keypoints,
72 const Bitmap& bitmap) {
73 for (size_t i = 0; i < keypoints.size(); ++i) {
74 EXPECT_GE(keypoints[i].x, 0);
75 EXPECT_GE(keypoints[i].y, 0);
76 EXPECT_LE(keypoints[i].x, bitmap.Width());
77 EXPECT_LE(keypoints[i].y, bitmap.Height());
78 EXPECT_GT(keypoints[i].ComputeScale(), 0);
79 EXPECT_GT(keypoints[i].ComputeOrientation(), -M_PI);
80 EXPECT_LT(keypoints[i].ComputeOrientation(), M_PI);
81 }
82}
83
84void ValidateDescriptorNorms(const FeatureDescriptors& descriptors) {
85 EXPECT_EQ(descriptors.type, FeatureExtractorType::SIFT);

Callers 2

TEST_PFunction · 0.85
TESTFunction · 0.85

Calls 5

sizeMethod · 0.80
ComputeScaleMethod · 0.80
ComputeOrientationMethod · 0.80
WidthMethod · 0.45
HeightMethod · 0.45

Tested by

no test coverage detected