diff --git a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp index 5d77ad996e6ed06c8d8034e1ede3b60b7078717d..991f01d5f8ee05d6598b419e8d21da1d0bf547ee 100644 --- a/modules/stitching/include/opencv2/stitching/detail/matchers.hpp +++ b/modules/stitching/include/opencv2/stitching/detail/matchers.hpp @@ -169,7 +169,7 @@ protected: class CV_EXPORTS BestOf2NearestMatcher : public FeaturesMatcher { public: - BestOf2NearestMatcher(bool try_use_gpu = false, float match_conf = 0.65f, int num_matches_thresh1 = 6, + BestOf2NearestMatcher(bool try_use_gpu = false, float match_conf = 0.3f, int num_matches_thresh1 = 6, int num_matches_thresh2 = 6); void collectGarbage(); diff --git a/modules/stitching/src/matchers.cpp b/modules/stitching/src/matchers.cpp index ad697f9cd248029aa55e7158db43fe87f43b0ed3..1cc630e88e291489256c0a15636b62038474a1dd 100644 --- a/modules/stitching/src/matchers.cpp +++ b/modules/stitching/src/matchers.cpp @@ -351,9 +351,9 @@ void SurfFeaturesFinder::find(const Mat &image, ImageFeatures &features) } else { - vector descriptors; + Mat descriptors; (*surf)(gray_image, Mat(), features.keypoints, descriptors); - features.descriptors = Mat(descriptors, true).reshape(1, (int)features.keypoints.size()); + features.descriptors = descriptors.reshape(1, (int)features.keypoints.size()); } } diff --git a/samples/cpp/stitching_detailed.cpp b/samples/cpp/stitching_detailed.cpp index 1849142fb850256153fdad4098e2658ef251b33e..26e3694ad2566161d7ea8e381b901a8c7ccf2921 100644 --- a/samples/cpp/stitching_detailed.cpp +++ b/samples/cpp/stitching_detailed.cpp @@ -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;