stitcher result mask getter
authorQuentin Chateau <quentin.chateau@gmail.com>
Fri, 21 Dec 2018 22:21:22 +0000 (23:21 +0100)
committerQuentin Chateau <quentin.chateau@gmail.com>
Fri, 21 Dec 2018 22:21:22 +0000 (23:21 +0100)
modules/stitching/include/opencv2/stitching.hpp
modules/stitching/src/stitcher.cpp

index 0cda452..42f63df 100644 (file)
@@ -283,6 +283,7 @@ public:
     std::vector<int> component() const { return indices_; }
     std::vector<detail::CameraParams> cameras() const { return cameras_; }
     CV_WRAP double workScale() const { return work_scale_; }
+    UMat resultMask() const { return result_mask_; }
 
 private:
     Status matchImages();
@@ -313,6 +314,7 @@ private:
     std::vector<cv::UMat> seam_est_imgs_;
     std::vector<int> indices_;
     std::vector<detail::CameraParams> cameras_;
+    UMat result_mask_;
     double work_scale_;
     double seam_scale_;
     double seam_work_aspect_;
index df8b4c8..3229a87 100644 (file)
@@ -357,8 +357,8 @@ Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArra
 #if ENABLE_LOG
         int64 blend_t = getTickCount();
 #endif
-    UMat result, result_mask;
-    blender_->blend(result, result_mask);
+    UMat result;
+    blender_->blend(result, result_mask_);
     LOGLN("blend time: " << ((getTickCount() - blend_t) / getTickFrequency()) << " sec");
 
     LOGLN("Compositing, time: " << ((getTickCount() - t) / getTickFrequency()) << " sec");