pub trait ContourFittingTrait: AlgorithmTrait + ContourFittingTraitConst {
    // Required method
    fn as_raw_mut_ContourFitting(&mut self) -> *mut c_void;

    // Provided methods
    fn estimate_transformation(
        &mut self,
        src: &impl ToInputArray,
        dst: &impl ToInputArray,
        alpha_phi_st: &mut impl ToOutputArray,
        dist: &mut f64,
        fd_contour: bool
    ) -> Result<()> { ... }
    fn estimate_transformation_1(
        &mut self,
        src: &impl ToInputArray,
        dst: &impl ToInputArray,
        alpha_phi_st: &mut impl ToOutputArray,
        dist: &mut f64,
        fd_contour: bool
    ) -> Result<()> { ... }
    fn set_ctr_size(&mut self, n: i32) -> Result<()> { ... }
    fn set_fd_size(&mut self, n: i32) -> Result<()> { ... }
    fn get_ctr_size(&mut self) -> Result<i32> { ... }
    fn get_fd_size(&mut self) -> Result<i32> { ... }
}
Expand description

Mutable methods for crate::ximgproc::ContourFitting

Required Methods§

Provided Methods§

source

fn estimate_transformation( &mut self, src: &impl ToInputArray, dst: &impl ToInputArray, alpha_phi_st: &mut impl ToOutputArray, dist: &mut f64, fd_contour: bool ) -> Result<()>

Fit two closed curves using fourier descriptors. More details in PersoonFu1977 and BergerRaghunathan1998

Parameters
  • src: Contour defining first shape.
  • dst: Contour defining second shape (Target).
  • alphaPhiST: : inline formula=alphaPhiST(0,0), inline formula=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
  • dist: distance between src and dst after matching.
  • fdContour: false then src and dst are contours and true src and dst are fourier descriptors.
C++ default parameters
  • dist: 0
  • fd_contour: false
source

fn estimate_transformation_1( &mut self, src: &impl ToInputArray, dst: &impl ToInputArray, alpha_phi_st: &mut impl ToOutputArray, dist: &mut f64, fd_contour: bool ) -> Result<()>

Fit two closed curves using fourier descriptors. More details in PersoonFu1977 and BergerRaghunathan1998

Parameters
  • src: Contour defining first shape.
  • dst: Contour defining second shape (Target).
  • alphaPhiST: : inline formula=alphaPhiST(0,0), inline formula=alphaPhiST(0,1) (in radian), s=alphaPhiST(0,2), Tx=alphaPhiST(0,3), Ty=alphaPhiST(0,4) rotation center
  • dist: distance between src and dst after matching.
  • fdContour: false then src and dst are contours and true src and dst are fourier descriptors.
C++ default parameters
  • fd_contour: false
source

fn set_ctr_size(&mut self, n: i32) -> Result<()>

set number of Fourier descriptors used in estimateTransformation

Parameters
  • n: number of Fourier descriptors equal to number of contour points after resampling.
source

fn set_fd_size(&mut self, n: i32) -> Result<()>

set number of Fourier descriptors when estimateTransformation used vector

Parameters
  • n: number of fourier descriptors used for optimal curve matching.
source

fn get_ctr_size(&mut self) -> Result<i32>

Returns

number of fourier descriptors

source

fn get_fd_size(&mut self) -> Result<i32>

Returns

number of fourier descriptors used for optimal curve matching

Implementors§