| OpenCV 3.4.8 Open Source Computer Vision

Public Types | Public Member Functions | Static Public Member Functions | List of all members
cv::Stitcher Class Reference
Images stitching

High level image stitcher. More...

`#include <opencv2/stitching.hpp>`

## Public Types
enum | { ORIG_RESOL = -1 }
enum | Mode { PANORAMA = 0, SCANS = 1 }
enum | Status { OK = 0, ERR_NEED_MORE_IMGS = 1, ERR_HOMOGRAPHY_EST_FAIL = 2, ERR_CAMERA_PARAMS_ADJUST_FAIL = 3 }

## Public Member Functions
Ptr< detail::Blender > | blender ()
const Ptr< detail::Blender > | blender () const
Ptr< detail::BundleAdjusterBase > | bundleAdjuster ()
const Ptr< detail::BundleAdjusterBase > | bundleAdjuster () const
std::vector< detail::CameraParams > | cameras () const
std::vector< int > | component () const
Status | composePanorama (OutputArray pano)
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. More...
double | compositingResol () const
Status | estimateTransform (InputArrayOfArrays images)
Status | estimateTransform (InputArrayOfArrays images, const std::vector< std::vector< Rect > > &rois)
| These functions try to match the given images and to estimate rotations of each camera. More...
Ptr< detail::ExposureCompensator > | exposureCompensator ()
const Ptr< detail::ExposureCompensator > | exposureCompensator () const
Ptr< detail::FeaturesFinder > | featuresFinder ()
const Ptr< detail::FeaturesFinder > | featuresFinder () const
Ptr< detail::FeaturesMatcher > | featuresMatcher ()
const Ptr< detail::FeaturesMatcher > | featuresMatcher () const
const cv::UMat & | matchingMask () const
double | panoConfidenceThresh () const
double | registrationResol () const
double | seamEstimationResol () const
Ptr< detail::SeamFinder > | seamFinder ()
const Ptr< detail::SeamFinder > | seamFinder () const
void | setBlender (Ptr< detail::Blender > b)
void | setBundleAdjuster (Ptr< detail::BundleAdjusterBase > bundle_adjuster)
void | setCompositingResol (double resol_mpx)
void | setExposureCompensator (Ptr< detail::ExposureCompensator > exposure_comp)
void | setFeaturesFinder (Ptr< detail::FeaturesFinder > features_finder)
void | setFeaturesMatcher (Ptr< detail::FeaturesMatcher > features_matcher)
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)
void | setWarper (Ptr< WarperCreator > creator)
void | setWaveCorrection (bool flag)
void | setWaveCorrectKind (detail::WaveCorrectKind kind)
Status | stitch (InputArrayOfArrays images, OutputArray pano)
Status | stitch (InputArrayOfArrays images, const std::vector< std::vector< Rect > > &rois, OutputArray pano)
| These functions try to stitch the given images. More...
Ptr< WarperCreator > | warper ()
const Ptr< WarperCreator > | warper () const
bool | waveCorrection () const
detail::WaveCorrectKind | waveCorrectKind () const
double | workScale () const

## Static Public Member Functions
static Ptr< Stitcher > | create (Mode mode=PANORAMA, bool try_use_gpu=false)
| Creates a Stitcher configured in one of the stitching modes. More...
static Stitcher | createDefault (bool try_use_gpu=false)
| Creates a stitcher with the default parameters. More...

## Detailed Description

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.

Note
  - A basic example on image stitching can be found at opencv_source_code/samples/cpp/stitching.cpp
    - A detailed example on image stitching can be found at opencv_source_code/samples/cpp/stitching_detailed.cpp

## Member Enumeration Documentation

## § anonymous enum

anonymous enum

Enumerator
ORIG_RESOL |

## § Mode

enum cv::Stitcher::Mode

Enumerator
PANORAMA | Mode for creating photo panoramas. Expects images under perspective transformation and projects resulting pano to sphere. See also detail::BestOf2NearestMatcher SphericalWarper
SCANS | Mode for composing scans. Expects images under affine transformation does not compensate exposure by default. See also detail::AffineBestOf2NearestMatcher AffineWarper

## § Status

enum cv::Stitcher::Status

Enumerator
OK |
ERR_NEED_MORE_IMGS |
ERR_HOMOGRAPHY_EST_FAIL |
ERR_CAMERA_PARAMS_ADJUST_FAIL |

## Member Function Documentation

## § 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<detail::CameraParams> cv::Stitcher::cameras | ( |  | ) | const
| inline

## § component()

std::vector<int> cv::Stitcher::component | ( |  | ) | const
| inline

## § composePanorama() [1/2]

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

Python:
| retval, pano | = | cv.Stitcher.composePanorama( | [, pano] | )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § composePanorama() [2/2]

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

Python:
| retval, pano | = | cv.Stitcher.composePanorama( | [, 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.

Note
  Use the functions only if you're aware of the stitching pipeline, otherwise use Stitcher::stitch.

Parameters

  images | Input images.
  pano | Final pano.

Returns
  Status code.

## § compositingResol()

double cv::Stitcher::compositingResol | ( |  | ) | const
| inline

Python:
| retval | = | cv.Stitcher.compositingResol( |  | )

## § create()

static Ptr<Stitcher> cv::Stitcher::create | ( | Mode | mode = `PANORAMA`,
|  | bool | try_use_gpu = `false`
| ) |  |
| static

Creates a Stitcher configured in one of the stitching modes.

Parameters

  mode | Scenario 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.
  try_use_gpu | Flag indicating whether GPU should be used whenever it's possible.

Returns
  Stitcher class instance.

## § createDefault()

static Stitcher cv::Stitcher::createDefault | ( | bool | try_use_gpu = `false` | ) |
| static

Creates a stitcher with the default parameters.

Parameters

  try_use_gpu | Flag indicating whether GPU should be used whenever it's possible.

Returns
  Stitcher class instance.

## § estimateTransform() [1/2]

Status cv::Stitcher::estimateTransform | ( | InputArrayOfArrays | images | ) |

Python:
| retval | = | cv.Stitcher.estimateTransform( | images | )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

## § estimateTransform() [2/2]

Status cv::Stitcher::estimateTransform | ( | InputArrayOfArrays | images,
|  | const std::vector< std::vector< Rect > > & | rois
| ) |  |

Python:
| retval | = | cv.Stitcher.estimateTransform( | images | )

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

Note
  Use the functions only if you're aware of the stitching pipeline, otherwise use Stitcher::stitch.

Parameters

  images | Input images.
  rois | Region of interest rectangles.

Returns
  Status code.

## § 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<detail::FeaturesFinder> cv::Stitcher::featuresFinder | ( |  | ) |
| inline

## § featuresFinder() [2/2]

const Ptr<detail::FeaturesFinder> cv::Stitcher::featuresFinder | ( |  | ) | const
| inline

## § featuresMatcher() [1/2]

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

## § featuresMatcher() [2/2]

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

## § matchingMask()

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

## § panoConfidenceThresh()

double cv::Stitcher::panoConfidenceThresh | ( |  | ) | const
| inline

Python:
| retval | = | cv.Stitcher.panoConfidenceThresh( |  | )

## § registrationResol()

double cv::Stitcher::registrationResol | ( |  | ) | const
| inline

Python:
| retval | = | cv.Stitcher.registrationResol( |  | )

## § seamEstimationResol()

double cv::Stitcher::seamEstimationResol | ( |  | ) | const
| inline

Python:
| retval | = | cv.Stitcher.seamEstimationResol( |  | )

## § 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:
| None | = | cv.Stitcher.setCompositingResol( | resol_mpx | )

## § setExposureCompensator()

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

## § setFeaturesFinder()

void cv::Stitcher::setFeaturesFinder | ( | Ptr< detail::FeaturesFinder > | features_finder | ) |
| inline

## § setFeaturesMatcher()

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

## § setMatchingMask()

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

## § setPanoConfidenceThresh()

void cv::Stitcher::setPanoConfidenceThresh | ( | double | conf_thresh | ) |
| inline

Python:
| None | = | cv.Stitcher.setPanoConfidenceThresh( | conf_thresh | )

## § setRegistrationResol()

void cv::Stitcher::setRegistrationResol | ( | double | resol_mpx | ) |
| inline

Python:
| None | = | cv.Stitcher.setRegistrationResol( | resol_mpx | )

## § setSeamEstimationResol()

void cv::Stitcher::setSeamEstimationResol | ( | double | resol_mpx | ) |
| inline

Python:
| None | = | cv.Stitcher.setSeamEstimationResol( | resol_mpx | )

## § setSeamFinder()

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

## § setWarper()

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

## § setWaveCorrection()

void cv::Stitcher::setWaveCorrection | ( | bool | flag | ) |
| inline

Python:
| None | = | cv.Stitcher.setWaveCorrection( | flag | )

## § setWaveCorrectKind()

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

## § stitch() [1/2]

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

Python:
| retval, pano | = | cv.Stitcher.stitch( | images[, pano] | )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Examples:
  samples/cpp/stitching.cpp.

## § stitch() [2/2]

Status cv::Stitcher::stitch | ( | InputArrayOfArrays | images,
|  | const std::vector< std::vector< Rect > > & | rois,
|  | OutputArray | pano
| ) |  |

Python:
| retval, pano | = | cv.Stitcher.stitch( | images[, pano] | )

These functions try to stitch the given images.

Parameters

  images | Input images.
  rois | Region of interest rectangles.
  pano | Final pano.

Returns
  Status code.

## § 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:
| retval | = | cv.Stitcher.waveCorrection( |  | )

## § waveCorrectKind()

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

## § workScale()

double cv::Stitcher::workScale | ( |  | ) | const
| inline

Python:
| retval | = | cv.Stitcher.workScale( |  | )

The documentation for this class was generated from the following file:

- opencv2/stitching.hpp