diff --git a/modules/stitching/include/opencv2/stitching.hpp b/modules/stitching/include/opencv2/stitching.hpp index 0cda452d7a..42f63df1e0 100644 --- a/modules/stitching/include/opencv2/stitching.hpp +++ b/modules/stitching/include/opencv2/stitching.hpp @@ -283,6 +283,7 @@ public: std::vector component() const { return indices_; } std::vector 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 seam_est_imgs_; std::vector indices_; std::vector cameras_; + UMat result_mask_; double work_scale_; double seam_scale_; double seam_work_aspect_; diff --git a/modules/stitching/src/stitcher.cpp b/modules/stitching/src/stitcher.cpp index df8b4c8df0..3229a87546 100644 --- a/modules/stitching/src/stitcher.cpp +++ b/modules/stitching/src/stitcher.cpp @@ -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");