Merge pull request #13504 from Tytan:stitcher_result_mask

This commit is contained in:
Alexander Alekhin 2018-12-26 10:27:38 +00:00
commit e267342108
2 changed files with 4 additions and 2 deletions

View File

@ -283,6 +283,7 @@ public:
std::vector<int> component() const { return indices_; } std::vector<int> component() const { return indices_; }
std::vector<detail::CameraParams> cameras() const { return cameras_; } std::vector<detail::CameraParams> cameras() const { return cameras_; }
CV_WRAP double workScale() const { return work_scale_; } CV_WRAP double workScale() const { return work_scale_; }
UMat resultMask() const { return result_mask_; }
private: private:
Status matchImages(); Status matchImages();
@ -313,6 +314,7 @@ private:
std::vector<cv::UMat> seam_est_imgs_; std::vector<cv::UMat> seam_est_imgs_;
std::vector<int> indices_; std::vector<int> indices_;
std::vector<detail::CameraParams> cameras_; std::vector<detail::CameraParams> cameras_;
UMat result_mask_;
double work_scale_; double work_scale_;
double seam_scale_; double seam_scale_;
double seam_work_aspect_; double seam_work_aspect_;

View File

@ -357,8 +357,8 @@ Stitcher::Status Stitcher::composePanorama(InputArrayOfArrays images, OutputArra
#if ENABLE_LOG #if ENABLE_LOG
int64 blend_t = getTickCount(); int64 blend_t = getTickCount();
#endif #endif
UMat result, result_mask; UMat result;
blender_->blend(result, result_mask); blender_->blend(result, result_mask_);
LOGLN("blend time: " << ((getTickCount() - blend_t) / getTickFrequency()) << " sec"); LOGLN("blend time: " << ((getTickCount() - blend_t) / getTickFrequency()) << " sec");
LOGLN("Compositing, time: " << ((getTickCount() - t) / getTickFrequency()) << " sec"); LOGLN("Compositing, time: " << ((getTickCount() - t) / getTickFrequency()) << " sec");