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

Function ThrowCheckFeatureTypesMatch

src/colmap/feature/sift.cc:97–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void ThrowCheckFeatureTypesMatch(const FeatureMatcher::Image& image1,
98 const FeatureMatcher::Image& image2,
99 bool check_keypoints = false) {
100 THROW_CHECK_NOTNULL(image1.descriptors);
101 THROW_CHECK_NOTNULL(image2.descriptors);
102 THROW_CHECK_EQ(image1.descriptors->type, FeatureExtractorType::SIFT);
103 THROW_CHECK_EQ(image2.descriptors->type, FeatureExtractorType::SIFT);
104 THROW_CHECK_EQ(image1.descriptors->data.cols(), kSiftDescriptorDim);
105 THROW_CHECK_EQ(image2.descriptors->data.cols(), kSiftDescriptorDim);
106 if (check_keypoints) {
107 THROW_CHECK_NOTNULL(image1.camera);
108 THROW_CHECK_NOTNULL(image2.camera);
109 THROW_CHECK_NOTNULL(image1.keypoints);
110 THROW_CHECK_NOTNULL(image2.keypoints);
111 THROW_CHECK_EQ(image1.descriptors->data.rows(), image1.keypoints->size());
112 THROW_CHECK_EQ(image2.descriptors->data.rows(), image2.keypoints->size());
113 }
114}
115
116// VLFeat uses a different convention to store its descriptors. This transforms
117// the VLFeat format into the original SIFT format that is also used by SiftGPU.

Callers 4

MatchMethod · 0.85
MatchGuidedMethod · 0.85
MatchMethod · 0.85
MatchGuidedMethod · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected