MCPcopy Create free account
hub / github.com/AutonomousFieldRoboticsLab/SVIn / BriefExtractor

Method BriefExtractor

pose_graph/src/pose_graph/Keyframe.cpp:591–608  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589}
590
591BriefExtractor::BriefExtractor(const std::string& pattern_file) {
592 // The DVision::BRIEF extractor computes a random pattern by default when
593 // the object is created.
594 // We load the pattern that we used to build the vocabulary, to make
595 // the descriptors compatible with the predefined vocabulary
596
597 // loads the pattern
598 cv::FileStorage fs(pattern_file.c_str(), cv::FileStorage::READ);
599 if (!fs.isOpened()) throw std::string("Could not open file ") + pattern_file;
600
601 std::vector<int> x1, y1, x2, y2;
602 fs["x1"] >> x1;
603 fs["x2"] >> x2;
604 fs["y1"] >> y1;
605 fs["y2"] >> y2;
606
607 m_brief.importPairs(x1, y1, x2, y2);
608}
609
610// void Keyframe::setRelocalizationPCLCallback(const PointCloudCallback& pcl_callback) {
611// relocalization_pcl_callback_ = pcl_callback;

Callers

nothing calls this directly

Calls 1

importPairsMethod · 0.45

Tested by

no test coverage detected