Function efd::normalize_efd[][src]

pub fn normalize_efd<'a, A>(
    coeffs: A,
    norm: bool
) -> (Array2<f64>, f64, f64, f64) where
    A: AsArray<'a, f64, Ix2>, 
Expand description

Normalize the Elliptical Fourier Descriptor coefficients for a polygon.

Implements Kuhl and Giardina method of normalizing the coefficients An, Bn, Cn, Dn. Performs 3 separate normalizations. First, it makes the data location invariant by re-scaling the data to a common origin. Secondly, the data is rotated with respect to the major axis. Thirdly, the coefficients are normalized with regard to the absolute value of A_1. This code is adapted from the pyefd module.

If norm optional is true, this function will normalize all coefficients by first one.

Return the coefficients, axis rotation, shift angle and scale factor applied to the normalized contour. (the angles are in radians)