From f1cb2431b85880f7e726c2a7aad1461eb86b09e6 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Tue, 25 Oct 2011 12:42:08 +0000 Subject: [PATCH] Fixed small bugs in Stitcher class --- modules/stitching/include/opencv2/stitching/stitcher.hpp | 2 +- modules/stitching/src/stitcher.cpp | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/stitching/include/opencv2/stitching/stitcher.hpp b/modules/stitching/include/opencv2/stitching/stitcher.hpp index 136269b01..352f2384e 100644 --- a/modules/stitching/include/opencv2/stitching/stitcher.hpp +++ b/modules/stitching/include/opencv2/stitching/stitcher.hpp @@ -119,7 +119,7 @@ public: Ptr exposureCompensator() { return exposure_comp_; } const Ptr exposureCompensator() const { return exposure_comp_; } - void setExposureCompenstor(Ptr exposure_comp) + void setExposureCompensator(Ptr exposure_comp) { exposure_comp_ = exposure_comp; } Ptr seamFinder() { return seam_finder_; } diff --git a/modules/stitching/src/stitcher.cpp b/modules/stitching/src/stitcher.cpp index 14c1ce4b5..9cc7b53a7 100644 --- a/modules/stitching/src/stitcher.cpp +++ b/modules/stitching/src/stitcher.cpp @@ -70,10 +70,10 @@ Stitcher Stitcher::createDefault(bool try_use_gpu) { stitcher.setFeaturesFinder(new detail::SurfFeaturesFinder()); stitcher.setWarper(new SphericalWarper()); - stitcher.setSeamFinder(new detail::GraphCutSeamFinder()); + stitcher.setSeamFinder(new detail::GraphCutSeamFinder(detail::GraphCutSeamFinderBase::COST_COLOR)); } - stitcher.setExposureCompenstor(new detail::BlocksGainCompensator()); + stitcher.setExposureCompensator(new detail::BlocksGainCompensator()); stitcher.setBlender(new detail::MultiBandBlender(try_use_gpu)); return stitcher; @@ -444,11 +444,10 @@ void Stitcher::estimateCameraParams() } sort(focals.begin(), focals.end()); - float warped_image_scale; if (focals.size() % 2 == 1) - warped_image_scale = static_cast(focals[focals.size() / 2]); + warped_image_scale_ = static_cast(focals[focals.size() / 2]); else - warped_image_scale = static_cast(focals[focals.size() / 2 - 1] + focals[focals.size() / 2]) * 0.5f; + warped_image_scale_ = static_cast(focals[focals.size() / 2 - 1] + focals[focals.size() / 2]) * 0.5f; if (do_wave_correct_) {