pub struct LShapeFitting {
pub criteria: Criteria,
pub min_dist_of_closeness_criteria: f64,
pub d_theta: f64,
pub r0: f64,
pub rd: f64,
}Expand description
Configuration and entry point for the L-shape rectangle fitting algorithm.
Fields§
§criteria: CriteriaWhich criterion to optimise.
min_dist_of_closeness_criteria: f64Minimum distance clamp for the closeness criterion [m].
d_theta: f64Angular search step [rad].
r0: f64Base range for adaptive segmentation [m].
rd: f64Range-dependent factor for adaptive segmentation [m].
Implementations§
Source§impl LShapeFitting
impl LShapeFitting
Sourcepub fn fitting(
&self,
ox: &[f64],
oy: &[f64],
) -> Vec<(RectangleData, Vec<usize>)>
pub fn fitting( &self, ox: &[f64], oy: &[f64], ) -> Vec<(RectangleData, Vec<usize>)>
Run the full fitting pipeline: segment the points, then fit a rectangle to each cluster.
Returns a vector of (RectangleData, Vec<usize>) pairs where
the second element contains the point indices belonging to that
cluster.
Sourcepub fn rectangle_search(&self, x: &[f64], y: &[f64]) -> RectangleData
pub fn rectangle_search(&self, x: &[f64], y: &[f64]) -> RectangleData
Fit a single rectangle to the given points (without segmentation).
Trait Implementations§
Source§impl Clone for LShapeFitting
impl Clone for LShapeFitting
Source§impl Debug for LShapeFitting
impl Debug for LShapeFitting
Auto Trait Implementations§
impl Freeze for LShapeFitting
impl RefUnwindSafe for LShapeFitting
impl Send for LShapeFitting
impl Sync for LShapeFitting
impl Unpin for LShapeFitting
impl UnsafeUnpin for LShapeFitting
impl UnwindSafe for LShapeFitting
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.