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,
const cv::Mat &
mask = cv::Mat());
54 cv::Mat compute(
const std::vector<cv::KeyPoint> &keypoints);
57 void SetNMS(
bool enabled) {nms_ = enabled;}
GLM_FUNC_DECL genIType mask(genIType const &count)
std::shared_ptr< SuperPoint > model_
std::vector< torch::Tensor > forward(torch::Tensor x)
void setThreshold(float threshold)
void SetNMS(bool enabled)
void setMinDistance(float minDistance)