Fixed small bugs in Stitcher class
This commit is contained in:
parent
28e006ad4f
commit
f1cb2431b8
@ -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_; }
|
||||
|
@ -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_)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user