Skip to content

Latest commit

 

History

History
82 lines (66 loc) · 3.02 KB

parameter_module_setup.md

File metadata and controls

82 lines (66 loc) · 3.02 KB

Setup Parameter and module of OpenCV's stitcher

Before read this docs, this docs from another guys can help you
Basic Stitching Pipeline

and, Please see previous docs
Simply call stitch
Estimation and compose
Get camera parameters

What is difference?

The purpose of this docs is for setting up custom stitcher So, in this example, We try to apply setup method of stitcher

structure

How to setup

Mat output;
Ptr<Stitcher> stitcher = Stitcher::create(Stitcher::PANORAMA, try_gpu);

stitcher->setRegistrationResol(0.5);
stitcher->setSeamEstimationResol(0.1);
stitcher->setCompositingResol(Stitcher::ORIG_RESOL);
stitcher->setPanoConfidenceThresh(1.0);
stitcher->setWaveCorrection(true);
stitcher->setWaveCorrectKind(detail::WAVE_CORRECT_HORIZ);

stitcher->setFeaturesFinder(makePtr<detail::OrbFeaturesFinder>());
stitcher->setFeaturesMatcher(makePtr<detail::BestOf2NearestMatcher>(try_gpu));
stitcher->setBundleAdjuster(makePtr<detail::BundleAdjusterRay>());
stitcher->setWarper(makePtr<SphericalWarper>());
stitcher->setExposureCompensator(makePtr<detail::BlocksGainCompensator>());
stitcher->setSeamFinder(makePtr<detail::VoronoiSeamFinder>());
stitcher->setBlender(makePtr<detail::MultiBandBlender>());

Stitcher::Status status = stitcher->stitch(imgs, output);

Stitcher API's parameter and module setup methods start with 'set'

Parameter setup

  • setRegistrationResol
    For speed up, resize images. argument is ratio of resized image
    ex) 0.5 means image will resized to half of area of original size
  • setSeamEstimationResol
    For speed up, resize images for Seam finder. argument is ratio of resized image
    ex) 0.1 means image will resized to 10 percent of area of original size
  • setCompositingResol
    For speed up, resize images when compose panorama. argument is ratio of resized image
    ex) ORIG_RESOL means images will not be resized
  • setPanoConfidenceThresh
    Threshold for bundle adjustment module
  • setWaveCorrection
    Do wave correction or not, for preventing wavy effect of panorama image
  • setWaveCorrectKind
    Type of wave correction

Module setup

  • setFeaturesFinder
    Set module to find feature point and calculate descriptor of feature
  • setFeaturesMatcher
    Set module to match found features
  • setBundleAdjuster
    Set module to bundle adjustment
  • setWarper
    Set module to warp images according to found camera parameter
  • setExposureCompensator
    Set module to compensate exposure
  • setSeamFinder
    Set module to find seam from warped images
  • setBlender
    Set module to blend warped and seam found images

Why resize image?

Some modules like Seam finder and Exposure compensator takes too much time if work with original image So, They resize images for that modules

resize