9 #include <torch/torch.h> 10 #include <opencv2/opencv.hpp> 14 #ifdef EIGEN_MPL2_ONLY 15 #undef EIGEN_MPL2_ONLY 25 std::vector<torch::Tensor>
forward(torch::Tensor x);
51 SPDetector(
const std::string & modelPath,
float threshold = 0.2
f,
bool nms =
true,
int minDistance = 4,
bool cuda =
false);
53 std::vector<cv::KeyPoint> detect(
const cv::Mat &img);
54 cv::Mat compute(
const std::vector<cv::KeyPoint> &keypoints);
57 void SetNMS(
bool enabled) {nms_ = enabled;}
std::shared_ptr< SuperPoint > model_
void setMinDistance(float minDistance)
std::vector< torch::Tensor > forward(torch::Tensor x)
void SetNMS(bool enabled)
void setThreshold(float threshold)