now all the samples and opencv_contrib compile!

This commit is contained in:
Vadim Pisarevsky
2014-10-16 16:34:22 +04:00
parent 09df1a286b
commit 06d4aa6060
9 changed files with 197 additions and 157 deletions

View File

@@ -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;

View File

@@ -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);