18 #ifndef VISION_COMMON_FEATURE_IMAGE_H_
19 #define VISION_COMMON_FEATURE_IMAGE_H_
21 #include <opencv2/core.hpp>
22 #include <opencv2/features2d.hpp>
30 feature_detector.detectAndCompute(image_, cv::Mat(), keypoints_, descriptors_);
31 cv::KeyPoint::convert(keypoints_, feature_points_);
33 const cv::Mat&
image()
const {
return image_; }
34 const int rows()
const {
return image_.rows; }
35 const int cols()
const {
return image_.cols; }
36 const std::vector<cv::KeyPoint>&
keypoints()
const {
return keypoints_; }
37 const std::vector<cv::Point2f>&
feature_points()
const {
return feature_points_; }
42 std::vector<cv::KeyPoint> keypoints_;
43 std::vector<cv::Point2f> feature_points_;
48 #endif // VISION_COMMON_FEATURE_IMAGE_H_