Stitcher

Struct Stitcher 

Source
pub struct Stitcher { /* private fields */ }
Expand 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 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

Implementations§

Source§

impl Stitcher

Source

pub const ORIG_RESOL: f64 = -1f64

Source

pub fn default() -> Stitcher

Creates a default instance of the class by calling the default constructor

Source

pub fn create(mode: Stitcher_Mode) -> Result<Ptr<Stitcher>>

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.
§Returns

Stitcher class instance.

§C++ default parameters
  • mode: Stitcher::PANORAMA
Source

pub fn create_def() -> Result<Ptr<Stitcher>>

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.
§Returns

Stitcher class instance.

§Note

This alternative version of Stitcher::create function uses the following default values for its arguments:

  • mode: Stitcher::PANORAMA

Trait Implementations§

Source§

impl Boxed for Stitcher

Source§

unsafe fn from_raw(ptr: <Stitcher as OpenCVFromExtern>::ExternReceive) -> Self

Wrap the specified raw pointer Read more
Source§

fn into_raw(self) -> <Stitcher as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying raw pointer while consuming this wrapper. Read more
Source§

fn as_raw(&self) -> <Stitcher as OpenCVTypeExternContainer>::ExternSend

Return the underlying raw pointer. Read more
Source§

fn as_raw_mut( &mut self, ) -> <Stitcher as OpenCVTypeExternContainer>::ExternSendMut

Return the underlying mutable raw pointer Read more
Source§

impl Debug for Stitcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Stitcher

Source§

fn default() -> Self

Forwards to infallible Self::default()

Source§

impl Drop for Stitcher

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl StitcherTrait for Stitcher

Source§

fn as_raw_mut_Stitcher(&mut self) -> *mut c_void

Source§

fn set_registration_resol(&mut self, resol_mpx: f64) -> Result<()>

Source§

fn set_seam_estimation_resol(&mut self, resol_mpx: f64) -> Result<()>

Source§

fn set_compositing_resol(&mut self, resol_mpx: f64) -> Result<()>

Source§

fn set_pano_confidence_thresh(&mut self, conf_thresh: f64) -> Result<()>

Source§

fn set_wave_correction(&mut self, flag: bool) -> Result<()>

Source§

fn set_interpolation_flags( &mut self, interp_flags: InterpolationFlags, ) -> Result<()>

Source§

fn set_wave_correct_kind(&mut self, kind: Detail_WaveCorrectKind) -> Result<()>

Source§

fn features_finder_1(&mut self) -> Result<Ptr<Feature2D>>

Source§

fn set_features_finder(&mut self, features_finder: Ptr<Feature2D>) -> Result<()>

Source§

fn features_matcher_1(&mut self) -> Result<Ptr<Detail_FeaturesMatcher>>

Source§

fn set_features_matcher( &mut self, features_matcher: Ptr<Detail_FeaturesMatcher>, ) -> Result<()>

Source§

fn set_matching_mask(&mut self, mask: &impl UMatTraitConst) -> Result<()>

Source§

fn bundle_adjuster_1(&mut self) -> Result<Ptr<Detail_BundleAdjusterBase>>

Source§

fn set_bundle_adjuster( &mut self, bundle_adjuster: Ptr<Detail_BundleAdjusterBase>, ) -> Result<()>

Source§

fn estimator_1(&mut self) -> Result<Ptr<Detail_Estimator>>

Source§

fn set_estimator(&mut self, estimator: Ptr<Detail_Estimator>) -> Result<()>

Source§

fn warper_1(&mut self) -> Result<Ptr<WarperCreator>>

Source§

fn set_warper(&mut self, creator: Ptr<WarperCreator>) -> Result<()>

Source§

fn exposure_compensator_1(&mut self) -> Result<Ptr<Detail_ExposureCompensator>>

Source§

fn set_exposure_compensator( &mut self, exposure_comp: Ptr<Detail_ExposureCompensator>, ) -> Result<()>

Source§

fn seam_finder_1(&mut self) -> Result<Ptr<Detail_SeamFinder>>

Source§

fn set_seam_finder(&mut self, seam_finder: Ptr<Detail_SeamFinder>) -> Result<()>

Source§

fn blender_1(&mut self) -> Result<Ptr<Detail_Blender>>

Source§

fn set_blender(&mut self, b: Ptr<Detail_Blender>) -> Result<()>

Source§

fn estimate_transform( &mut self, images: &impl ToInputArray, masks: &impl ToInputArray, ) -> Result<Stitcher_Status>

These functions try to match the given images and to estimate rotations of each camera. Read more
Source§

fn estimate_transform_def( &mut self, images: &impl ToInputArray, ) -> Result<Stitcher_Status>

These functions try to match the given images and to estimate rotations of each camera. Read more
Source§

fn set_transform( &mut self, images: &impl ToInputArray, cameras: &Vector<Detail_CameraParams>, component: &Vector<i32>, ) -> Result<Stitcher_Status>

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

fn set_transform_1( &mut self, images: &impl ToInputArray, cameras: &Vector<Detail_CameraParams>, ) -> Result<Stitcher_Status>

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

fn compose_panorama( &mut self, pano: &mut impl ToOutputArray, ) -> Result<Stitcher_Status>

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. Read more
Source§

fn compose_panorama_images( &mut self, images: &impl ToInputArray, pano: &mut impl ToOutputArray, ) -> Result<Stitcher_Status>

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. Read more
Source§

fn stitch( &mut self, images: &impl ToInputArray, pano: &mut impl ToOutputArray, ) -> Result<Stitcher_Status>

These functions try to stitch the given images. Read more
Source§

fn stitch_mask( &mut self, images: &impl ToInputArray, masks: &impl ToInputArray, pano: &mut impl ToOutputArray, ) -> Result<Stitcher_Status>

These functions try to stitch the given images. Read more
Source§

impl StitcherTraitConst for Stitcher

Source§

impl Send for Stitcher

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Mat> ModifyInplace for Mat
where Mat: Boxed,

Source§

unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res

Helper function to call OpenCV functions that allow in-place modification of a Mat or another similar object. By passing a mutable reference to the Mat to this function your closure will get called with the read reference and a write references to the same Mat. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data, but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place modification is imgproc::threshold. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.