now all the samples and opencv_contrib compile!
This commit is contained in:
@@ -22,9 +22,9 @@ int main(void)
|
||||
vector<KeyPoint> kpts1, kpts2;
|
||||
Mat desc1, desc2;
|
||||
|
||||
AKAZE akaze;
|
||||
akaze(img1, noArray(), kpts1, desc1);
|
||||
akaze(img2, noArray(), kpts2, desc2);
|
||||
Ptr<AKAZE> akaze = AKAZE::create();
|
||||
akaze->detectAndCompute(img1, noArray(), kpts1, desc1);
|
||||
akaze->detectAndCompute(img2, noArray(), kpts2, desc2);
|
||||
|
||||
BFMatcher matcher(NORM_HAMMING);
|
||||
vector< vector<DMatch> > nn_matches;
|
||||
|
@@ -41,7 +41,7 @@ protected:
|
||||
void Tracker::setFirstFrame(const Mat frame, vector<Point2f> bb, string title, Stats& stats)
|
||||
{
|
||||
first_frame = frame.clone();
|
||||
(*detector)(first_frame, noArray(), first_kp, first_desc);
|
||||
detector->detectAndCompute(first_frame, noArray(), first_kp, first_desc);
|
||||
stats.keypoints = (int)first_kp.size();
|
||||
drawBoundingBox(first_frame, bb);
|
||||
putText(first_frame, title, Point(0, 60), FONT_HERSHEY_PLAIN, 5, Scalar::all(0), 4);
|
||||
@@ -52,7 +52,7 @@ Mat Tracker::process(const Mat frame, Stats& stats)
|
||||
{
|
||||
vector<KeyPoint> kp;
|
||||
Mat desc;
|
||||
(*detector)(frame, noArray(), kp, desc);
|
||||
detector->detectAndCompute(frame, noArray(), kp, desc);
|
||||
stats.keypoints = (int)kp.size();
|
||||
|
||||
vector< vector<DMatch> > matches;
|
||||
@@ -135,9 +135,9 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
fs["bounding_box"] >> bb;
|
||||
Ptr<Feature2D> akaze = Feature2D::create("AKAZE");
|
||||
Ptr<Feature2D> akaze = AKAZE::create();
|
||||
akaze->set("threshold", akaze_thresh);
|
||||
Ptr<Feature2D> orb = Feature2D::create("ORB");
|
||||
Ptr<Feature2D> orb = ORB::create();
|
||||
Ptr<DescriptorMatcher> matcher = DescriptorMatcher::create("BruteForce-Hamming");
|
||||
Tracker akaze_tracker(akaze, matcher);
|
||||
Tracker orb_tracker(orb, matcher);
|
||||
|
Reference in New Issue
Block a user