-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refractor code for feture extractor generator
- Loading branch information
1 parent
a500d90
commit 02d8732
Showing
11 changed files
with
102 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#include "vio_hw/internal/feat/good_feature_impl.hpp" | ||
|
||
namespace viohw { | ||
GoodFeature2Tracker::GoodFeature2Tracker(const FeatureBase::FeatureExtractorOptions &options) { | ||
kps_min_distance_ = options.kps_max_distance_; | ||
max_kps_number_ = options.kps_max_distance_; | ||
kps_quality_level_ = options.kps_quality_level_; | ||
GoodFeature2Tracker::GoodFeature2Tracker( const GoodFeature2TrackerConfig &options ) { | ||
feature_extract_config_ = options; | ||
tobe_extractor_kps_num_ = options.max_kps_num_; | ||
} | ||
|
||
bool GoodFeature2Tracker::detect(const cv::Mat &image, std::vector<cv::KeyPoint> &kps, cv::Mat mask, | ||
cv::Mat desc) { | ||
bool GoodFeature2Tracker::detect( const cv::Mat &image, std::vector<cv::KeyPoint> &kps, | ||
cv::Mat mask, cv::Mat desc ) { | ||
std::vector<cv::Point2f> points; | ||
feat::goodFeaturesToTrack(image, points, max_kps_number_, kps_quality_level_, kps_min_distance_, | ||
mask); | ||
cv::KeyPoint::convert(points, kps); | ||
feat::goodFeaturesToTrack( image, points, tobe_extractor_kps_num_, | ||
feature_extract_config_.kps_quality_level_, | ||
feature_extract_config_.kps_min_distance_, mask ); | ||
cv::KeyPoint::convert( points, kps ); | ||
return true; | ||
} | ||
} // namespace viohw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
#include "vio_hw/internal/feat/orb_slam_impl.hpp" | ||
|
||
namespace viohw { | ||
bool ORBSLAMExtractor::detect(const cv::Mat &image, | ||
std::vector<cv::KeyPoint> &kps, cv::Mat mask, | ||
cv::Mat desc) { | ||
bool ORBSLAMExtractor::detect( const cv::Mat &image, std::vector<cv::KeyPoint> &kps, cv::Mat mask, | ||
cv::Mat desc ) { | ||
orb_extractor_->Detect( image, mask, kps ); | ||
return true; | ||
} | ||
|
||
ORBSLAMExtractor::ORBSLAMExtractor( const ORBSLAMExtractorConfig &option ) { | ||
orb_extractor_.reset( new feat::ORBextractor( option.max_kps_, option.scale_factor_, | ||
option.level_, option.iniThFAST_, | ||
option.minThFAST_ ) ); | ||
} | ||
|
||
} // namespace viohw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters