From b21314bccd60ec86b9fce1fba33c0b7a79e48e7c Mon Sep 17 00:00:00 2001 From: Victor Erukhimov Date: Sat, 12 Jun 2010 05:52:43 +0000 Subject: [PATCH] Fixing a couple of bugs --- samples/cpp/matcher_simple.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/cpp/matcher_simple.cpp b/samples/cpp/matcher_simple.cpp index 74c791b395..6e235ea8a7 100644 --- a/samples/cpp/matcher_simple.cpp +++ b/samples/cpp/matcher_simple.cpp @@ -13,8 +13,8 @@ int main(int argc, char** argv) return -1; } - Mat img1 = imread(argv[1]); - Mat img2 = imread(argv[2]); + Mat img1 = imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE); + Mat img2 = imread(argv[2], CV_LOAD_IMAGE_GRAYSCALE); if(img1.empty() || img2.empty()) { printf("Can't read one of the images\n"); @@ -36,8 +36,8 @@ int main(int argc, char** argv) // matching descriptors BruteForceMatcher > matcher; vector matches; - matcher.add(descriptors1); - matcher.match(descriptors2, matches); + matcher.add(descriptors2); + matcher.match(descriptors1, matches); // drawing the results namedWindow("matches", 1);