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

    fn estimate_transformation(
        &mut self,
        src: &dyn ToInputArray,
        dst: &dyn ToInputArray,
        alpha_phi_st: &mut dyn ToOutputArray,
        dist: &mut f64,
        fd_contour: bool
    ) -> Result<()> { ... } fn estimate_transformation_1(
        &mut self,
        src: &dyn ToInputArray,
        dst: &dyn ToInputArray,
        alpha_phi_st: &mut dyn 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> { ... } }

Required Methods

Provided Methods

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

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

set number of Fourier descriptors used in estimateTransformation

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

set number of Fourier descriptors when estimateTransformation used vector

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

number of fourier descriptors

Returns

number of fourier descriptors used for optimal curve matching

Implementors