High Level Functionality ======================== .. highlight:: cpp Stitcher -------- .. ocv:class:: Stitcher High level image stitcher. It's possible to use this class without being aware of the entire stitching pipeline. However, to be able to achieve higher stitching stability and quality of the final images at least being familiar with the theory is recommended. :: class CV_EXPORTS Stitcher { public: enum { ORIG_RESOL = -1 }; enum Status { OK, ERR_NEED_MORE_IMGS }; // Creates stitcher with default parameters static Stitcher createDefault(bool try_use_gpu = false); Status estimateTransform(InputArray images); Status estimateTransform(InputArray images, const std::vector > &rois); Status composePanorama(OutputArray pano); Status composePanorama(InputArray images, OutputArray pano); Status stitch(InputArray images, OutputArray pano); Status stitch(InputArray images, const std::vector > &rois, OutputArray pano); double registrationResol() const { return registr_resol_; } void setRegistrationResol(double resol_mpx) { registr_resol_ = resol_mpx; } double seamEstimationResol() const { return seam_est_resol_; } void setSeamEstimationResol(double resol_mpx) { seam_est_resol_ = resol_mpx; } double compositingResol() const { return compose_resol_; } void setCompositingResol(double resol_mpx) { compose_resol_ = resol_mpx; } double panoConfidenceThresh() const { return conf_thresh_; } void setPanoConfidenceThresh(double conf_thresh) { conf_thresh_ = conf_thresh; } bool waveCorrection() const { return do_wave_correct_; } void setWaveCorrection(bool flag) { do_wave_correct_ = flag; } detail::WaveCorrectKind waveCorrectKind() const { return wave_correct_kind_; } void setWaveCorrectKind(detail::WaveCorrectKind kind) { wave_correct_kind_ = kind; } Ptr featuresFinder() { return features_finder_; } const Ptr featuresFinder() const { return features_finder_; } void setFeaturesFinder(Ptr features_finder) { features_finder_ = features_finder; } Ptr featuresMatcher() { return features_matcher_; } const Ptr featuresMatcher() const { return features_matcher_; } void setFeaturesMatcher(Ptr features_matcher) { features_matcher_ = features_matcher; } const cv::Mat& matchingMask() const { return matching_mask_; } void setMatchingMask(const cv::Mat &mask) { CV_Assert(mask.type() == CV_8U && mask.cols == mask.rows); matching_mask_ = mask.clone(); } Ptr bundleAdjuster() { return bundle_adjuster_; } const Ptr bundleAdjuster() const { return bundle_adjuster_; } void setBundleAdjuster(Ptr bundle_adjuster) { bundle_adjuster_ = bundle_adjuster; } Ptr warper() { return warper_; } const Ptr warper() const { return warper_; } void setWarper(Ptr warper) { warper_ = warper; } Ptr exposureCompensator() { return exposure_comp_; } const Ptr exposureCompensator() const { return exposure_comp_; } void setExposureCompensator(Ptr exposure_comp) { exposure_comp_ = exposure_comp; } Ptr seamFinder() { return seam_finder_; } const Ptr seamFinder() const { return seam_finder_; } void setSeamFinder(Ptr seam_finder) { seam_finder_ = seam_finder; } Ptr blender() { return blender_; } const Ptr blender() const { return blender_; } void setBlender(Ptr blender) { blender_ = blender; } private: /* hidden */ }; WarperCreator ------------- .. ocv:class:: WarperCreator Image warper factories base class. :: class WarperCreator { public: virtual ~WarperCreator() {} virtual Ptr create(float scale) const = 0; }; PlaneWarper ----------- .. ocv:class:: PlaneWarper Plane warper factory class. :: class PlaneWarper : public WarperCreator { public: Ptr create(float scale) const { return new detail::PlaneWarper(scale); } }; .. seealso:: :ocv:class:`detail::PlaneWarper` CylindricalWarper ----------------- .. ocv:class:: CylindricalWarper Cylindrical warper factory class. :: class CylindricalWarper: public WarperCreator { public: Ptr create(float scale) const { return new detail::CylindricalWarper(scale); } }; .. seealso:: :ocv:class:`detail::CylindricalWarper` SphericalWarper --------------- .. ocv:class:: SphericalWarper Spherical warper factory class. :: class SphericalWarper: public WarperCreator { public: Ptr create(float scale) const { return new detail::SphericalWarper(scale); } }; .. seealso:: :ocv:class:`detail::SphericalWarper`