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
impl Stitcher
pub const ORIG_RESOL: f64 = -1f64
Sourcepub fn default() -> Stitcher
pub fn default() -> Stitcher
Creates a default instance of the class by calling the default constructor
Sourcepub fn create(mode: Stitcher_Mode) -> Result<Ptr<Stitcher>>
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
Sourcepub fn create_def() -> Result<Ptr<Stitcher>>
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
impl Boxed for Stitcher
Source§unsafe fn from_raw(ptr: <Stitcher as OpenCVFromExtern>::ExternReceive) -> Self
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
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
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
fn as_raw_mut( &mut self, ) -> <Stitcher as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
Source§impl StitcherTrait for Stitcher
impl StitcherTrait for Stitcher
fn as_raw_mut_Stitcher(&mut self) -> *mut c_void
fn set_registration_resol(&mut self, resol_mpx: f64) -> Result<()>
fn set_seam_estimation_resol(&mut self, resol_mpx: f64) -> Result<()>
fn set_compositing_resol(&mut self, resol_mpx: f64) -> Result<()>
fn set_pano_confidence_thresh(&mut self, conf_thresh: f64) -> Result<()>
fn set_wave_correction(&mut self, flag: bool) -> Result<()>
fn set_interpolation_flags( &mut self, interp_flags: InterpolationFlags, ) -> Result<()>
fn set_wave_correct_kind(&mut self, kind: Detail_WaveCorrectKind) -> Result<()>
fn features_finder_1(&mut self) -> Result<Ptr<Feature2D>>
fn set_features_finder(&mut self, features_finder: Ptr<Feature2D>) -> Result<()>
fn features_matcher_1(&mut self) -> Result<Ptr<Detail_FeaturesMatcher>>
fn set_features_matcher( &mut self, features_matcher: Ptr<Detail_FeaturesMatcher>, ) -> Result<()>
fn set_matching_mask(&mut self, mask: &impl UMatTraitConst) -> Result<()>
fn bundle_adjuster_1(&mut self) -> Result<Ptr<Detail_BundleAdjusterBase>>
fn set_bundle_adjuster( &mut self, bundle_adjuster: Ptr<Detail_BundleAdjusterBase>, ) -> Result<()>
fn estimator_1(&mut self) -> Result<Ptr<Detail_Estimator>>
fn set_estimator(&mut self, estimator: Ptr<Detail_Estimator>) -> Result<()>
fn warper_1(&mut self) -> Result<Ptr<WarperCreator>>
fn set_warper(&mut self, creator: Ptr<WarperCreator>) -> Result<()>
fn exposure_compensator_1(&mut self) -> Result<Ptr<Detail_ExposureCompensator>>
fn set_exposure_compensator( &mut self, exposure_comp: Ptr<Detail_ExposureCompensator>, ) -> Result<()>
fn seam_finder_1(&mut self) -> Result<Ptr<Detail_SeamFinder>>
fn set_seam_finder(&mut self, seam_finder: Ptr<Detail_SeamFinder>) -> Result<()>
fn blender_1(&mut self) -> Result<Ptr<Detail_Blender>>
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>
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>
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>
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>
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>
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>
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>
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>
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
impl StitcherTraitConst for Stitcher
fn as_raw_Stitcher(&self) -> *const c_void
fn registration_resol(&self) -> Result<f64>
fn seam_estimation_resol(&self) -> Result<f64>
fn compositing_resol(&self) -> Result<f64>
fn pano_confidence_thresh(&self) -> Result<f64>
fn wave_correction(&self) -> Result<bool>
fn interpolation_flags(&self) -> Result<InterpolationFlags>
fn wave_correct_kind(&self) -> Result<Detail_WaveCorrectKind>
fn features_finder(&self) -> Result<Ptr<Feature2D>>
fn features_matcher(&self) -> Result<Ptr<Detail_FeaturesMatcher>>
fn matching_mask(&self) -> Result<UMat>
fn bundle_adjuster(&self) -> Result<Ptr<Detail_BundleAdjusterBase>>
fn estimator(&self) -> Result<Ptr<Detail_Estimator>>
fn warper(&self) -> Result<Ptr<WarperCreator>>
fn exposure_compensator(&self) -> Result<Ptr<Detail_ExposureCompensator>>
fn seam_finder(&self) -> Result<Ptr<Detail_SeamFinder>>
fn blender(&self) -> Result<Ptr<Detail_Blender>>
Source§fn component(&self) -> Result<Vector<i32>>
fn component(&self) -> Result<Vector<i32>>
Returns indeces of input images used in panorama stitching
Source§fn cameras(&self) -> Result<Vector<Detail_CameraParams>>
fn cameras(&self) -> Result<Vector<Detail_CameraParams>>
Returns estimated camera parameters for all stitched images
fn work_scale(&self) -> Result<f64>
impl Send for Stitcher
Auto Trait Implementations§
impl Freeze for Stitcher
impl RefUnwindSafe for Stitcher
impl !Sync for Stitcher
impl Unpin for Stitcher
impl UnwindSafe for Stitcher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
Source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
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