MCPcopy Create free account
hub / github.com/PeterFWS/Structure-PLP-SLAM / TEST

Function TEST

test/PLPSLAM/match/base.cc:11–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace PLPSLAM;
10
11TEST(base, compute_hamming_distance_1)
12{
13 cv::Mat desc_1(1, 32, CV_8U);
14 cv::Mat desc_2(1, 32, CV_8U);
15
16 for (int i = 0; i < desc_1.rows; ++i)
17 {
18 desc_1.row(i) = 0b01010101;
19 }
20
21 for (int i = 0; i < desc_2.rows; ++i)
22 {
23 desc_2.row(i) = 0b01010101;
24 }
25
26 EXPECT_EQ(match::compute_descriptor_distance_32(desc_1, desc_2), 0);
27 EXPECT_EQ(match::compute_descriptor_distance_64(desc_1, desc_2), 0);
28}
29
30TEST(base, compute_hamming_distance_2)
31{

Callers

nothing calls this directly

Tested by

no test coverage detected