Renesas / opencv-lib

Dependents:   RZ_A2M_Mbed_samples

Embed: (wiki syntax)

« Back to documentation index

Stitcher Class Reference

High level image stitcher. More...

#include <stitching.hpp>

Public Types

enum  Mode { PANORAMA = 0, SCANS = 1 }

Public Member Functions

CV_WRAP 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.
CV_WRAP 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.
CV_WRAP 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.

Static Public Member Functions

static Stitcher createDefault (bool try_use_gpu=false)
 Creates a stitcher with the default parameters.
static Ptr< Stitchercreate (Mode mode=PANORAMA, bool try_use_gpu=false)
 Creates a Stitcher configured in one of the stitching modes.

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

Definition at line 124 of file stitching.hpp.


Member Enumeration Documentation

enum 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

Definition at line 135 of file stitching.hpp.


Member Function Documentation

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.

Note:
Use the functions only if you're aware of the stitching pipeline, otherwise use Stitcher::stitch.
Parameters:
imagesInput images.
panoFinal pano.
Returns:
Status code.
CV_WRAP Status composePanorama ( OutputArray  pano )

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

static Ptr<Stitcher> create ( Mode  mode = PANORAMA,
bool  try_use_gpu = false 
) [static]

Creates a Stitcher configured in one of the stitching modes.

Parameters:
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.
try_use_gpuFlag indicating whether GPU should be used whenever it's possible.
Returns:
Stitcher class instance.
static Stitcher createDefault ( bool  try_use_gpu = false ) [static]

Creates a stitcher with the default parameters.

Parameters:
try_use_gpuFlag indicating whether GPU should be used whenever it's possible.
Returns:
Stitcher class instance.
CV_WRAP Status estimateTransform ( InputArrayOfArrays  images )

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

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.

Note:
Use the functions only if you're aware of the stitching pipeline, otherwise use Stitcher::stitch.
Parameters:
imagesInput images.
roisRegion of interest rectangles.
Returns:
Status code.
CV_WRAP Status stitch ( InputArrayOfArrays  images,
OutputArray  pano 
)

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

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

These functions try to stitch the given images.

Parameters:
imagesInput images.
roisRegion of interest rectangles.
panoFinal pano.
Returns:
Status code.