Expand description
This crate implements 2D/3D Elliptical Fourier Descriptor (EFD) and its related functions.
This crate support both Vec<[f64; D]> and &[[f64; D]] as input type via
Cow<[[f64; D]]> ([CowCurve]), and the first coordinate must be close to
the last with [closed_curve()].
let curve = vec![
[0., 0.],
[1., 1.],
[2., 2.],
[3., 3.],
[2., 2.],
[1., 1.],
[0., 0.],
];
let described_curve = efd::Efd2::from_curve(curve).unwrap().generate(20);Features
This crate support no-std solution via using “libm”, a crate provide pure-rust math functions. Disable the “std” feature will automatic enable it.
Re-exports
Structs
- Elliptical Fourier Descriptor coefficients. Provide transformation between discrete points and coefficients.
- An error type for EFD coefficients. Raised when the input array width is not correct to its dimension.
- Transform type.
Traits
- Copy-on-write curve type.
- Trait for EFD dimension.
- A trait used in inner type of
Transform.
Functions
- Coordinate difference between two curves using interpolation and cross-correlation.
Type Definitions
- Alias for evaluate
EfdDim::Trans::CoordfromD. - 2D EFD dimension type.
- 3D EFD dimension type.
- 2D EFD coefficients type.
- 3D EFD coefficients type.
- 2D transformation inner type.
- 3D transformation inner type.
- 2D transformation type.
- 3D transformation type.