影象處理——特徵檢測涉及到的資料結構和匹配方法
阿新 • • 發佈:2019-01-26
FeatureMatchTest::FeatureMatchTest(std::shared_ptr<Pattern> left, std::shared_ptr<Pattern> right, std::shared_ptr<cv::DescriptorMatcher> matcher) : leftPattern(left), rightPattern(right), matcher(matcher) { //step1:Create detector int minHessian = 400; SurfFeatureDetector detector(minHessian);//step2:Detecte keypoint detector.detect(leftPattern->image, leftPattern->keypoints); detector.detect(rightPattern->image, rightPattern->keypoints); //step3:Compute descriptor detector.compute(leftPattern->image, leftPattern->keypoints, leftPattern->descriptors); detector.compute(rightPattern->image, rightPattern->keypoints, rightPattern->descriptors); }