OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项
cv::Stitcher 类参考

高级图像拼接器。更多...

#include <opencv2/stitching.hpp>

cv::Stitcher 的协作图

公共类型

枚举  模式 {
  PANORAMA = 0 ,
  SCANS = 1
}
 
枚举  状态 {
  OK = 0 ,
  ERR_NEED_MORE_IMGS = 1 ,
  ERR_HOMOGRAPHY_EST_FAIL = 2 ,
  ERR_CAMERA_PARAMS_ADJUST_FAIL = 3
}
 

公共成员函数

Ptr< detail::Blenderblender (混合器) ()
 
const Ptr< detail::Blenderblender () const
 
Ptr< detail::BundleAdjusterBasebundleAdjuster (光束法平差器) ()
 
const Ptr< detail::BundleAdjusterBasebundleAdjuster () const
 
std::vector< cv::detail::CameraParamscameras () const
 
std::vector< int > component () const
 返回全景拼接中使用的输入图像的索引。
 
Status composePanorama (InputArrayOfArrays images, OutputArray pano)
 这些函数尝试将给定图像(或通过其他函数调用内部存储的图像)组合成最终的全景图,前提是图像变换已在之前估算过。
 
Status composePanorama (OutputArray pano)
 
double compositingResol () const
 
Status estimateTransform (InputArrayOfArrays images, InputArrayOfArrays masks=noArray())
 这些函数尝试匹配给定图像并估计每个相机的旋转。
 
Ptr< detail::Estimatorestimator ()
 
const Ptr< detail::Estimatorestimator () const
 
Ptr< detail::ExposureCompensatorexposureCompensator (曝光补偿器) ()
 
const Ptr< detail::ExposureCompensatorexposureCompensator () const
 
Ptr< Feature2DfeaturesFinder ()
 
Ptr< Feature2DfeaturesFinder () const
 
Ptr< detail::FeaturesMatcherfeaturesMatcher (特征匹配器) ()
 
Ptr< detail::FeaturesMatcherfeaturesMatcher () const
 
InterpolationFlags interpolationFlags () const
 
const cv::UMatmatchingMask () const
 
double panoConfidenceThresh () const
 
double registrationResol () const
 
UMat resultMask () const
 返回全景图的掩码。
 
double seamEstimationResol () const
 
Ptr< detail::SeamFinderseamFinder (接缝查找器) ()
 
const Ptr< detail::SeamFinderseamFinder () const
 
void setBlender (Ptr< detail::Blender > b)
 
void setBundleAdjuster (Ptr< detail::BundleAdjusterBase > bundle_adjuster)
 
void setCompositingResol (double resol_mpx)
 
void setEstimator (Ptr< detail::Estimator > estimator)
 
void setExposureCompensator (Ptr< detail::ExposureCompensator > exposure_comp)
 
void setFeaturesFinder (Ptr< Feature2D > features_finder)
 
void setFeaturesMatcher (Ptr< detail::FeaturesMatcher > features_matcher)
 
void setInterpolationFlags (InterpolationFlags interp_flags)
 
void setMatchingMask (const cv::UMat &mask)
 
void setPanoConfidenceThresh (double conf_thresh)
 
void setRegistrationResol (double resol_mpx)
 
void setSeamEstimationResol (double resol_mpx)
 
void setSeamFinder (Ptr< detail::SeamFinder > seam_finder)
 
Status setTransform (InputArrayOfArrays images, const std::vector< detail::CameraParams > &cameras)
 
Status setTransform (InputArrayOfArrays images, const std::vector< detail::CameraParams > &cameras, const std::vector< int > &component)
 这些函数恢复了通过 Stitcher::cameras 调用可获得的每个相机的旋转和相机内参。
 
void setWarper (Ptr< WarperCreator > creator)
 
void setWaveCorrection (bool flag)
 
void setWaveCorrectKind (detail::WaveCorrectKind kind)
 
Status stitch (InputArrayOfArrays images, InputArrayOfArrays masks, OutputArray pano)
 这些函数尝试拼接给定图像。
 
Status stitch (InputArrayOfArrays images, OutputArray pano)
 
Ptr< WarperCreatorwarper (图像变形器) ()
 
const Ptr< WarperCreatorwarper () const
 
bool waveCorrection () const
 
detail::WaveCorrectKind waveCorrectKind () const
 
double workScale () const
 

静态公共成员函数

static Ptr< Stitchercreate (Mode mode=Stitcher::PANORAMA)
 创建一个配置为其中一种拼接模式的 Stitcher
 

静态公共属性

static const double ORIG_RESOL (原始分辨率)
 

详细描述

高级图像拼接器。

即使不了解整个拼接流程,也可以使用此类别。但是,为了获得更高的拼接稳定性和最终图像质量,建议至少熟悉其理论。

注意
  • 图像拼接的基本示例可在 opencv_source_code/samples/cpp/stitching.cpp 中找到
  • Python 图像拼接的基本示例可在 opencv_source_code/samples/python/stitching.py 中找到
  • 图像拼接的详细示例可在 opencv_source_code/samples/cpp/stitching_detailed.cpp 中找到

成员枚举文档

◆ 模式

枚举器
PANORAMA 

创建照片全景图的模式。期望图像进行透视变换,并将结果全景图投影到球体上。

另请参见
detail::BestOf2NearestMatcher SphericalWarper
SCANS 

用于合成扫描的模式。期望图像进行仿射变换,默认情况下不补偿曝光。

另请参见
detail::AffineBestOf2NearestMatcher AffineWarper

◆ 状态

枚举器
OK 
ERR_NEED_MORE_IMGS 
ERR_HOMOGRAPHY_EST_FAIL 
ERR_CAMERA_PARAMS_ADJUST_FAIL 

成员函数文档

◆ blender() [1/2]

Ptr< detail::Blender > cv::Stitcher::blender ( )
inline

◆ blender() [2/2]

const Ptr< detail::Blender > cv::Stitcher::blender ( ) const
inline

◆ bundleAdjuster() [1/2]

Ptr< detail::BundleAdjusterBase > cv::Stitcher::bundleAdjuster ( )
inline

◆ bundleAdjuster() [2/2]

const Ptr< detail::BundleAdjusterBase > cv::Stitcher::bundleAdjuster ( ) const
inline

◆ cameras()

std::vector< cv::detail::CameraParams > cv::Stitcher::cameras ( ) const
inline
Python
cv.Stitcher.cameras() -> retval

返回所有拼接图像的估计相机参数

◆ component()

std::vector< int > cv::Stitcher::component ( ) const
inline
Python
cv.Stitcher.component() -> retval

返回全景拼接中使用的输入图像的索引。

◆ composePanorama() [1/2]

Status cv::Stitcher::composePanorama ( InputArrayOfArrays images,
OutputArray pano )
Python
cv.Stitcher.composePanorama([, pano]) -> retval, pano
cv.Stitcher.composePanorama(images[, pano]) -> retval, pano

这些函数尝试将给定图像(或通过其他函数调用内部存储的图像)组合成最终的全景图,前提是图像变换已在之前估算过。

注意
仅当您了解拼接流程时才使用这些函数,否则请使用 Stitcher::stitch
参数
images输入图像。
pano最终全景图。
返回
状态码。

◆ composePanorama() [2/2]

Status cv::Stitcher::composePanorama ( OutputArray pano)
Python
cv.Stitcher.composePanorama([, pano]) -> retval, pano
cv.Stitcher.composePanorama(images[, pano]) -> retval, pano

这是一个重载成员函数,为方便起见提供。它与上述函数的唯一区别在于其接受的参数。

◆ compositingResol()

double cv::Stitcher::compositingResol ( ) const
inline
Python
cv.Stitcher.compositingResol() -> retval

◆ create()

static Ptr< Stitcher > cv::Stitcher::create ( 模式 mode = Stitcher::PANORAMA)
static
Python
cv.Stitcher.create([, mode]) -> retval
cv.Stitcher_create([, mode]) -> retval

创建一个配置为其中一种拼接模式的 Stitcher

参数
mode拼接器操作的场景。这通常由要拼接的图像源及其变换决定。在给定场景下,将选择默认参数进行操作。
返回
Stitcher 类实例。

◆ estimateTransform()

Status cv::Stitcher::estimateTransform ( InputArrayOfArrays images,
InputArrayOfArrays masks = noArray() )
Python
cv.Stitcher.estimateTransform(images[, masks]) -> retval

这些函数尝试匹配给定图像并估计每个相机的旋转。

注意
仅当您了解拼接流程时才使用这些函数,否则请使用 Stitcher::stitch
参数
images输入图像。
遮罩指定每个输入图像中查找关键点位置的掩码(可选)。
返回
状态码。
此函数的调用图如下

◆ estimator() [1/2]

Ptr< detail::Estimator > cv::Stitcher::estimator ( )
inline

◆ estimator() [2/2]

const Ptr< detail::Estimator > cv::Stitcher::estimator ( ) const
inline

◆ exposureCompensator() [1/2]

Ptr< detail::ExposureCompensator > cv::Stitcher::exposureCompensator ( )
inline

◆ exposureCompensator() [2/2]

const Ptr< detail::ExposureCompensator > cv::Stitcher::exposureCompensator ( ) const
inline

◆ featuresFinder() [1/2]

Ptr< Feature2D > cv::Stitcher::featuresFinder ( )
inline

◆ featuresFinder() [2/2]

Ptr< Feature2D > cv::Stitcher::featuresFinder ( ) const
inline

◆ featuresMatcher() [1/2]

Ptr< detail::FeaturesMatcher > cv::Stitcher::featuresMatcher ( )
inline

◆ featuresMatcher() [2/2]

Ptr< detail::FeaturesMatcher > cv::Stitcher::featuresMatcher ( ) const
inline

◆ interpolationFlags()

InterpolationFlags cv::Stitcher::interpolationFlags ( ) const
inline
Python
cv.Stitcher.interpolationFlags() -> retval

◆ matchingMask()

const cv::UMat & cv::Stitcher::matchingMask ( ) const
inline

◆ panoConfidenceThresh()

double cv::Stitcher::panoConfidenceThresh ( ) const
inline
Python
cv.Stitcher.panoConfidenceThresh() -> retval

◆ registrationResol()

double cv::Stitcher::registrationResol ( ) const
inline
Python
cv.Stitcher.registrationResol() -> retval

◆ resultMask()

UMat cv::Stitcher::resultMask ( ) const
inline

返回全景图的掩码。

该掩码是一个 8U UMat,其中:被输入图像填充的像素值为 0xFF(白色),未使用的像素值为 0(黑色)。它可用作修复的掩码。

返回
掩码。

◆ seamEstimationResol()

double cv::Stitcher::seamEstimationResol ( ) const
inline
Python
cv.Stitcher.seamEstimationResol() -> retval

◆ seamFinder() [1/2]

Ptr< detail::SeamFinder > cv::Stitcher::seamFinder ( )
inline

◆ seamFinder() [2/2]

const Ptr< detail::SeamFinder > cv::Stitcher::seamFinder ( ) const
inline

◆ setBlender()

void cv::Stitcher::setBlender ( Ptr< detail::Blender > b)
inline

◆ setBundleAdjuster()

void cv::Stitcher::setBundleAdjuster ( Ptr< detail::BundleAdjusterBase > bundle_adjuster)
inline

◆ setCompositingResol()

void cv::Stitcher::setCompositingResol ( double resol_mpx)
inline
Python
cv.Stitcher.setCompositingResol(resol_mpx) ->

◆ setEstimator()

void cv::Stitcher::setEstimator ( Ptr< detail::Estimator > estimator)
inline

◆ setExposureCompensator()

void cv::Stitcher::setExposureCompensator ( Ptr< detail::ExposureCompensator > exposure_comp)
inline

◆ setFeaturesFinder()

void cv::Stitcher::setFeaturesFinder ( Ptr< Feature2D > features_finder)
inline

◆ setFeaturesMatcher()

void cv::Stitcher::setFeaturesMatcher ( Ptr< detail::FeaturesMatcher > features_matcher)
inline

◆ setInterpolationFlags()

void cv::Stitcher::setInterpolationFlags ( InterpolationFlags interp_flags)
inline
Python
cv.Stitcher.setInterpolationFlags(interp_flags) ->

◆ setMatchingMask()

void cv::Stitcher::setMatchingMask ( const cv::UMat & mask)
inline

◆ setPanoConfidenceThresh()

void cv::Stitcher::setPanoConfidenceThresh ( double conf_thresh)
inline
Python
cv.Stitcher.setPanoConfidenceThresh(conf_thresh) ->

◆ setRegistrationResol()

void cv::Stitcher::setRegistrationResol ( double resol_mpx)
inline
Python
cv.Stitcher.setRegistrationResol(resol_mpx) ->

◆ setSeamEstimationResol()

void cv::Stitcher::setSeamEstimationResol ( double resol_mpx)
inline
Python
cv.Stitcher.setSeamEstimationResol(resol_mpx) ->

◆ setSeamFinder()

void cv::Stitcher::setSeamFinder ( Ptr< detail::SeamFinder > seam_finder)
inline

◆ 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 )

这些函数恢复了通过 Stitcher::cameras 调用可获得的每个相机的旋转和相机内参。

参数
images输入图像。
cameras每个输入图像的相机估计旋转。
component构成最终全景图的图像索引(从 0 开始计数,可选)。
返回
状态码。

◆ setWarper()

void cv::Stitcher::setWarper ( Ptr< WarperCreator > creator)
inline

◆ setWaveCorrection()

void cv::Stitcher::setWaveCorrection ( bool flag)
inline
Python
cv.Stitcher.setWaveCorrection(flag) ->

◆ setWaveCorrectKind()

void cv::Stitcher::setWaveCorrectKind ( detail::WaveCorrectKind kind)
inline

◆ stitch() [1/2]

Status cv::Stitcher::stitch ( InputArrayOfArrays images,
InputArrayOfArrays 遮罩,
OutputArray pano )
Python
cv.Stitcher.stitch(images[, pano]) -> retval, pano
cv.Stitcher.stitch(images, masks[, pano]) -> retval, pano

这些函数尝试拼接给定图像。

参数
images输入图像。
遮罩指定每个输入图像中查找关键点位置的掩码(可选)。
pano最终全景图。
返回
状态码。

◆ stitch() [2/2]

Status cv::Stitcher::stitch ( InputArrayOfArrays images,
OutputArray pano )
Python
cv.Stitcher.stitch(images[, pano]) -> retval, pano
cv.Stitcher.stitch(images, masks[, pano]) -> retval, pano

这是一个重载成员函数,为方便起见提供。它与上述函数的唯一区别在于其接受的参数。

◆ warper() [1/2]

Ptr< WarperCreator > cv::Stitcher::warper ( )
inline

◆ warper() [2/2]

const Ptr< WarperCreator > cv::Stitcher::warper ( ) const
inline

◆ waveCorrection()

bool cv::Stitcher::waveCorrection ( ) const
inline
Python
cv.Stitcher.waveCorrection() -> retval

◆ waveCorrectKind()

detail::WaveCorrectKind cv::Stitcher::waveCorrectKind ( ) const
inline

◆ workScale()

double cv::Stitcher::workScale ( ) const
inline
Python
cv.Stitcher.workScale() -> retval

成员数据文档

◆ ORIG_RESOL

const double cv::Stitcher::ORIG_RESOL
static

在设置拼接分辨率时,此值是用于保留原始分辨率的占位符。


此类的文档生成自以下文件