Fixed small bugs in Stitcher class

This commit is contained in:
Andrey Kamaev 2011-10-25 12:42:08 +00:00
parent 28e006ad4f
commit f1cb2431b8
2 changed files with 5 additions and 6 deletions

View File

@ -119,7 +119,7 @@ public:
Ptr<detail::ExposureCompensator> exposureCompensator() { return exposure_comp_; }
const Ptr<detail::ExposureCompensator> exposureCompensator() const { return exposure_comp_; }
void setExposureCompenstor(Ptr<detail::ExposureCompensator> exposure_comp)
void setExposureCompensator(Ptr<detail::ExposureCompensator> exposure_comp)
{ exposure_comp_ = exposure_comp; }
Ptr<detail::SeamFinder> seamFinder() { return seam_finder_; }

View File

@ -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<float>(focals[focals.size() / 2]);
warped_image_scale_ = static_cast<float>(focals[focals.size() / 2]);
else
warped_image_scale = static_cast<float>(focals[focals.size() / 2 - 1] + focals[focals.size() / 2]) * 0.5f;
warped_image_scale_ = static_cast<float>(focals[focals.size() / 2 - 1] + focals[focals.size() / 2]) * 0.5f;
if (do_wave_correct_)
{