MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/H2-Mapping / BriefExtractor

Method BriefExtractor

src/dvins/pose_graph/src/keyframe.cpp:580–598  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580BriefExtractor::BriefExtractor(const std::string &pattern_file)
581{
582 // The DVision::BRIEF extractor computes a random pattern by default when
583 // the object is created.
584 // We load the pattern that we used to build the vocabulary, to make
585 // the descriptors compatible with the predefined vocabulary
586
587 // loads the pattern
588 cv::FileStorage fs(pattern_file.c_str(), cv::FileStorage::READ);
589 if(!fs.isOpened()) throw string("Could not open file ") + pattern_file;
590
591 vector<int> x1, y1, x2, y2;
592 fs["x1"] >> x1;
593 fs["x2"] >> x2;
594 fs["y1"] >> y1;
595 fs["y2"] >> y2;
596
597 m_brief.importPairs(x1, y1, x2, y2);
598}
599
600

Callers

nothing calls this directly

Calls 1

importPairsMethod · 0.80

Tested by

no test coverage detected