3 releases

new 0.2.2 Oct 23, 2024
0.2.1 Jun 6, 2024
0.2.0 May 17, 2024

#549 in Machine learning


Used in f3l

MIT/Apache

140KB
3K SLoC

F3l Features

Data Features.

Bounding

  • AABB
  • OBB
let obb = OBB::compute(&vertices);
// Get OBB 8 corners
let p0 = obb.center
    - obb.primary * obb.length[0]
    - obb.secondary * obb.length[1]
    - obb.tertiary * obb.length[2];
let p1 = p0 + obb.primary * obb.length[0] * 2.;
let p2 = p0 + obb.secondary * obb.length[1] * 2.;
let p3 = p0 + obb.tertiary * obb.length[2] * 2.;
let p4 = p2 + obb.primary * obb.length[0] * 2.;
let p5 = p1 + obb.tertiary * obb.length[2] * 2.;
let p6 = p2 + obb.tertiary * obb.length[2] * 2.;
let p7 = p4 + obb.tertiary * obb.length[2] * 2.;

Normal Estimate

  1. For each point search neighbors.
  2. Compute eigenvector of neighbors.
  3. The smallest eigenvalue one is which normal.

Normal Search Method [KDTree]

// Radius
let mut estimator = NormalEstimation::new(SearchBy::Radius(0.08f32));
// KNN
let mut estimator = NormalEstimation::new(SearchBy::Count(10));
// Compute!
if !estimator.compute(&vertices) {
    println!("Compute Normal Failed. Exit...");
    return;
}
let normals = estimator.normals();

Dependencies

~5–12MB
~260K SLoC