OpenCV453
公開型 | 公開メンバ関数 | 静的公開メンバ関数 | 静的公開変数類 | 全メンバ一覧
cv::Stitcher クラス

High level image stitcher. [詳解]

#include <stitching.hpp>

公開型

enum  Status { OK = 0 , ERR_NEED_MORE_IMGS = 1 , ERR_HOMOGRAPHY_EST_FAIL = 2 , ERR_CAMERA_PARAMS_ADJUST_FAIL = 3 }
 
enum  Mode { PANORAMA = 0 , SCANS = 1 }
 

公開メンバ関数

CV_WRAP double registrationResol () const
 
CV_WRAP void setRegistrationResol (double resol_mpx)
 
CV_WRAP double seamEstimationResol () const
 
CV_WRAP void setSeamEstimationResol (double resol_mpx)
 
CV_WRAP double compositingResol () const
 
CV_WRAP void setCompositingResol (double resol_mpx)
 
CV_WRAP double panoConfidenceThresh () const
 
CV_WRAP void setPanoConfidenceThresh (double conf_thresh)
 
CV_WRAP bool waveCorrection () const
 
CV_WRAP void setWaveCorrection (bool flag)
 
CV_WRAP InterpolationFlags interpolationFlags () const
 
CV_WRAP void setInterpolationFlags (InterpolationFlags interp_flags)
 
detail::WaveCorrectKind waveCorrectKind () const
 
void setWaveCorrectKind (detail::WaveCorrectKind kind)
 
Ptr< Feature2DfeaturesFinder ()
 
const Ptr< Feature2DfeaturesFinder () const
 
void setFeaturesFinder (Ptr< Feature2D > features_finder)
 
Ptr< detail::FeaturesMatcherfeaturesMatcher ()
 
const Ptr< detail::FeaturesMatcherfeaturesMatcher () const
 
void setFeaturesMatcher (Ptr< detail::FeaturesMatcher > features_matcher)
 
const cv::UMatmatchingMask () const
 
void setMatchingMask (const cv::UMat &mask)
 
Ptr< detail::BundleAdjusterBasebundleAdjuster ()
 
const Ptr< detail::BundleAdjusterBasebundleAdjuster () const
 
void setBundleAdjuster (Ptr< detail::BundleAdjusterBase > bundle_adjuster)
 
Ptr< detail::Estimatorestimator ()
 
const Ptr< detail::Estimatorestimator () const
 
void setEstimator (Ptr< detail::Estimator > estimator)
 
Ptr< WarperCreatorwarper ()
 
const Ptr< WarperCreatorwarper () const
 
void setWarper (Ptr< WarperCreator > creator)
 
Ptr< detail::ExposureCompensatorexposureCompensator ()
 
const Ptr< detail::ExposureCompensatorexposureCompensator () const
 
void setExposureCompensator (Ptr< detail::ExposureCompensator > exposure_comp)
 
Ptr< detail::SeamFinderseamFinder ()
 
const Ptr< detail::SeamFinderseamFinder () const
 
void setSeamFinder (Ptr< detail::SeamFinder > seam_finder)
 
Ptr< detail::Blenderblender ()
 
const Ptr< detail::Blenderblender () const
 
void setBlender (Ptr< detail::Blender > b)
 
CV_WRAP Status estimateTransform (InputArrayOfArrays images, InputArrayOfArrays masks=noArray())
 These functions try to match the given images and to estimate rotations of each camera. [詳解]
 
Status setTransform (InputArrayOfArrays images, const std::vector< detail::CameraParams > &cameras, const std::vector< int > &component)
 These function restors camera rotation and camera intrinsics of each camera that can be got with Stitcher::cameras call [詳解]
 
Status setTransform (InputArrayOfArrays images, const std::vector< detail::CameraParams > &cameras)
 
CV_WRAP Status composePanorama (OutputArray pano)
 
CV_WRAP Status composePanorama (InputArrayOfArrays images, OutputArray pano)
 These functions try to compose the given images (or images stored internally from the other function calls) into the final pano under the assumption that the image transformations were estimated before. [詳解]
 
CV_WRAP Status stitch (InputArrayOfArrays images, OutputArray pano)
 
CV_WRAP Status stitch (InputArrayOfArrays images, InputArrayOfArrays masks, OutputArray pano)
 These functions try to stitch the given images. [詳解]
 
std::vector< int > component () const
 
std::vector< detail::CameraParamscameras () const
 
CV_WRAP double workScale () const
 
UMat resultMask () const
 

静的公開メンバ関数

static CV_WRAP Ptr< Stitchercreate (Mode mode=Stitcher::PANORAMA)
 Creates a Stitcher configured in one of the stitching modes. [詳解]
 

静的公開変数類

static const double ORIG_RESOL
 

詳解

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.

覚え書き
  • A basic example on image stitching can be found at opencv_source_code/samples/cpp/stitching.cpp
  • A basic example on image stitching in Python can be found at opencv_source_code/samples/python/stitching.py
  • A detailed example on image stitching can be found at opencv_source_code/samples/cpp/stitching_detailed.cpp

列挙型メンバ詳解

◆ Mode

列挙値
PANORAMA 

Mode for creating photo panoramas. Expects images under perspective transformation and projects resulting pano to sphere.

参照
detail::BestOf2NearestMatcher SphericalWarper
SCANS 

Mode for composing scans. Expects images under affine transformation does not compensate exposure by default.

参照
detail::AffineBestOf2NearestMatcher AffineWarper

関数詳解

◆ composePanorama() [1/2]

CV_WRAP Status cv::Stitcher::composePanorama ( InputArrayOfArrays  images,
OutputArray  pano 
)

These functions try to compose the given images (or images stored internally from the other function calls) into the final pano under the assumption that the image transformations were estimated before.

覚え書き
Use the functions only if you're aware of the stitching pipeline, otherwise use Stitcher::stitch.
引数
imagesInput images.
panoFinal pano.
戻り値
Status code.

◆ composePanorama() [2/2]

CV_WRAP Status cv::Stitcher::composePanorama ( OutputArray  pano)

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

◆ create()

static CV_WRAP Ptr< Stitcher > cv::Stitcher::create ( Mode  mode = Stitcher::PANORAMA)
static

Creates a Stitcher configured in one of the stitching modes.

引数
modeScenario for stitcher operation. This is usually determined by source of images to stitch and their transformation. Default parameters will be chosen for operation in given scenario.
戻り値
Stitcher class instance.

◆ estimateTransform()

CV_WRAP Status cv::Stitcher::estimateTransform ( InputArrayOfArrays  images,
InputArrayOfArrays  masks = noArray() 
)

These functions try to match the given images and to estimate rotations of each camera.

覚え書き
Use the functions only if you're aware of the stitching pipeline, otherwise use Stitcher::stitch.
引数
imagesInput images.
masksMasks for each input image specifying where to look for keypoints (optional).
戻り値
Status code.

◆ setTransform() [1/2]

Status cv::Stitcher::setTransform ( InputArrayOfArrays  images,
const std::vector< detail::CameraParams > &  cameras 
)

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

◆ setTransform() [2/2]

Status cv::Stitcher::setTransform ( InputArrayOfArrays  images,
const std::vector< detail::CameraParams > &  cameras,
const std::vector< int > &  component 
)

These function restors camera rotation and camera intrinsics of each camera that can be got with Stitcher::cameras call

引数
imagesInput images.
camerasEstimated rotation of cameras for each of the input images.
componentIndices (0-based) of images constituting the final panorama (optional).
戻り値
Status code.

◆ stitch() [1/2]

CV_WRAP Status cv::Stitcher::stitch ( InputArrayOfArrays  images,
InputArrayOfArrays  masks,
OutputArray  pano 
)

These functions try to stitch the given images.

引数
imagesInput images.
masksMasks for each input image specifying where to look for keypoints (optional).
panoFinal pano.
戻り値
Status code.

◆ stitch() [2/2]

CV_WRAP Status cv::Stitcher::stitch ( InputArrayOfArrays  images,
OutputArray  pano 
)

これはオーバーロードされたメンバ関数です。利便性のために用意されています。元の関数との違いは引き数のみです。

メンバ詳解

◆ ORIG_RESOL

const double cv::Stitcher::ORIG_RESOL
static

When setting a resolution for stitching, this values is a placeholder for preserving the original resolution.


このクラス詳解は次のファイルから抽出されました: