From 317a27e9eba4258de51c970f1f7fea246b730d1d Mon Sep 17 00:00:00 2001 From: Alexey Spizhevoy Date: Tue, 25 Sep 2012 16:07:49 +0400 Subject: [PATCH] fixed the bug #2385 --- modules/stitching/src/stitcher.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/stitching/src/stitcher.cpp b/modules/stitching/src/stitcher.cpp index b8d57f4cb..f8b58d3e0 100644 --- a/modules/stitching/src/stitcher.cpp +++ b/modules/stitching/src/stitcher.cpp @@ -381,7 +381,16 @@ Stitcher::Status Stitcher::matchImages() if (rois_.empty()) (*features_finder_)(img, features_[i]); else - (*features_finder_)(img, features_[i], rois_[i]); + { + vector rois(rois_[i].size()); + for (size_t j = 0; j < rois_[i].size(); ++j) + { + Point tl(cvRound(rois_[i][j].x * work_scale_), cvRound(rois_[i][j].y * work_scale_)); + Point br(cvRound(rois_[i][j].br().x * work_scale_), cvRound(rois_[i][j].br().y * work_scale_)); + rois[j] = Rect(tl, br); + } + (*features_finder_)(img, features_[i], rois); + } features_[i].img_idx = (int)i; LOGLN("Features in image #" << i+1 << ": " << features_[i].keypoints.size());