Fixed bug #1693. Also corrected default parameters for stitching.
authorAlexey Spizhevoy <no@email>
Mon, 19 Mar 2012 11:51:18 +0000 (11:51 +0000)
committerAlexey Spizhevoy <no@email>
Mon, 19 Mar 2012 11:51:18 +0000 (11:51 +0000)
modules/stitching/include/opencv2/stitching/detail/matchers.hpp
modules/stitching/src/matchers.cpp
samples/cpp/stitching_detailed.cpp

index 5d77ad9..991f01d 100644 (file)
@@ -169,7 +169,7 @@ protected:
 class CV_EXPORTS BestOf2NearestMatcher : public FeaturesMatcher\r
 {\r
 public:\r
-    BestOf2NearestMatcher(bool try_use_gpu = false, float match_conf = 0.65f, int num_matches_thresh1 = 6,\r
+    BestOf2NearestMatcher(bool try_use_gpu = false, float match_conf = 0.3f, int num_matches_thresh1 = 6,\r
                           int num_matches_thresh2 = 6);\r
 \r
     void collectGarbage();\r
index ad697f9..1cc630e 100644 (file)
@@ -351,9 +351,9 @@ void SurfFeaturesFinder::find(const Mat &image, ImageFeatures &features)
     }\r
     else\r
     {\r
-        vector<float> descriptors;\r
+        Mat descriptors;\r
         (*surf)(gray_image, Mat(), features.keypoints, descriptors);\r
-        features.descriptors = Mat(descriptors, true).reshape(1, (int)features.keypoints.size());\r
+        features.descriptors = descriptors.reshape(1, (int)features.keypoints.size());\r
     }\r
 }\r
 \r
index 1849142..26e3694 100644 (file)
@@ -135,7 +135,7 @@ bool save_graph = false;
 std::string save_graph_to;
 string warp_type = "spherical";
 int expos_comp_type = ExposureCompensator::GAIN_BLOCKS;
-float match_conf = 0.65f;
+float match_conf = 0.3f;
 string seam_find_type = "gc_color";
 int blend_type = Blender::MULTI_BAND;
 float blend_strength = 5;