Commit b21314bc authored by Victor Erukhimov's avatar Victor Erukhimov

Fixing a couple of bugs

parent 2b116981
...@@ -13,8 +13,8 @@ int main(int argc, char** argv) ...@@ -13,8 +13,8 @@ int main(int argc, char** argv)
return -1; return -1;
} }
Mat img1 = imread(argv[1]); Mat img1 = imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE);
Mat img2 = imread(argv[2]); Mat img2 = imread(argv[2], CV_LOAD_IMAGE_GRAYSCALE);
if(img1.empty() || img2.empty()) if(img1.empty() || img2.empty())
{ {
printf("Can't read one of the images\n"); printf("Can't read one of the images\n");
...@@ -36,8 +36,8 @@ int main(int argc, char** argv) ...@@ -36,8 +36,8 @@ int main(int argc, char** argv)
// matching descriptors // matching descriptors
BruteForceMatcher<L2<float> > matcher; BruteForceMatcher<L2<float> > matcher;
vector<int> matches; vector<int> matches;
matcher.add(descriptors1); matcher.add(descriptors2);
matcher.match(descriptors2, matches); matcher.match(descriptors1, matches);
// drawing the results // drawing the results
namedWindow("matches", 1); namedWindow("matches", 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment