From f85eb23c3baf9a4019a71e5a6c9599617fd7948e Mon Sep 17 00:00:00 2001 From: GilLevi Date: Sat, 16 May 2015 21:15:09 +0300 Subject: [PATCH] sample for LATCH --- samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp b/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp index 1967c7a26..08ee6c1e2 100644 --- a/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp +++ b/samples/cpp/tutorial_code/xfeatures2D/LATCH_match.cpp @@ -19,7 +19,7 @@ int main(void) Mat img1 = imread("../data/graf1.png", IMREAD_GRAYSCALE); Mat img2 = imread("../data/graf3.png", IMREAD_GRAYSCALE); - + Mat homography; FileStorage fs("../data/H1to3p.xml", FileStorage::READ); @@ -77,6 +77,7 @@ int main(void) Mat res; drawMatches(img1, inliers1, img2, inliers2, good_matches, res); imwrite("../../samples/data/latch_res.png", res); + double inlier_ratio = inliers1.size() * 1.0 / matched1.size(); cout << "LATCH Matching Results" << endl;