ScanSegmentationOptions

Struct ScanSegmentationOptions 

Source
pub struct ScanSegmentationOptions {
Show 25 fields pub voxel_size_metres: f64, pub max_voxels: u32, pub normal_neighbor_rings: u32, pub min_neighbors: u32, pub max_seed_curvature: f64, pub max_normal_angle_degrees: f64, pub max_plane_distance_metres: f64, pub mad_scale: f64, pub max_bend_per_metre: f64, pub min_plane_area_square_metres: f64, pub classification_angle_degrees: f64, pub up_axis: [f64; 3], pub scanner_position: Option<[f64; 3]>, pub origin: [f64; 3], pub region: Option<ScanRegion>, pub max_planes: u32, pub detect_cylinders: bool, pub min_cylinder_radius_metres: Option<f64>, pub max_cylinder_radius_metres: f64, pub min_cylinder_inlier_fraction: f64, pub min_cylinder_arc_degrees: f64, pub min_cylinder_length_metres: f64, pub cylinder_draws: u32, pub cylinder_score_sample: u32, pub max_cylinder_groups: u32,
}

Fields§

§voxel_size_metres: f64

Edge of the averaging voxel. Default 0.03 m; 0.005..=1.

§max_voxels: u32

Voxel budget: past it the voxel size doubles and existing voxels fold into the coarser lattice (exactly). Default 1,500,000; 1,000..=8,000,000. Working memory is roughly 180 bytes per voxel: the 8,000,000 maximum with two normal rings measured 1.42 GB native RSS, too much for a browser tab, so wasm callers should stay near the default.

§normal_neighbor_rings: u32

Neighbourhood for voxel normals: 1 = the 26 neighbours, 2 = 124. Default 1.

§min_neighbors: u32

Occupied voxels (including the voxel itself) a normal needs. Default 6.

§max_seed_curvature: f64

Seeds are voxels whose curvature (smallest eigenvalue / eigenvalue sum of the neighbourhood scatter) is at most this, or at most the curvature of the flattest 5 % of voxels when that is larger (noise of 0.4 voxel edges lifts even flat surfaces above 0.02). Default 0.02.

§max_normal_angle_degrees: f64

A voxel joins a region when its normal is within this of the region’s plane; also the coplanar-merge angle. Default 10 degrees; (0, 45].

§max_plane_distance_metres: f64

… and its mean lies within this of the region’s plane; also the coplanar-merge offset. Default 0.02 m.

§mad_scale: f64

Robust refit keeps voxels within mad_scale * 1.4826 * MAD of the median residual, never tighter than half max_plane_distance_metres. Default 2.5.

§max_bend_per_metre: f64

A region whose voxel normals turn faster than this across it (1 / radius of curvature) is a curved surface such as a column, not a plane. Default 1.0 per metre. Wider columns grow as strips of planes, which rings of planes about a common axis reassemble (#6893).

§min_plane_area_square_metres: f64

Planes with a smaller estimated area are dropped. Default 0.25 m^2.

§classification_angle_degrees: f64

Horizontal within this of up_axis, vertical within this of perpendicular, sloped otherwise. Default 10 degrees.

§up_axis: [f64; 3]

Up direction of the positions’ frame. Default +Z ([0, 0, 1]); the viewer’s Y-up reservoir sample passes [0, 1, 0].

§scanner_position: Option<[f64; 3]>

Scanner station: when given, every plane normal faces it.

§origin: [f64; 3]

Added to every output coordinate. Default [0, 0, 0].

§region: Option<ScanRegion>

Only points inside this box take part.

§max_planes: u32

At most this many planes are reported, largest first. Default 10,000.

§detect_cylinders: bool

Look for cylinders (columns, pipes) among the non-planar voxels. Default true.

§min_cylinder_radius_metres: Option<f64>

Accepted radius range. The minimum defaults to two voxel edges (after any coarsening; 0.06 m at the default voxel): below that a circumference has too few voxels to carry its curvature and radii come out biased (a half-visible r 0.05 m pipe fitted r 0.0685). The maximum defaults to 2 m (1.5 m before #6893, which refused about half the fits of a column of exactly 1.5 m for a millimetre over the bound).

§max_cylinder_radius_metres: f64§min_cylinder_inlier_fraction: f64

A group must fit a candidate with at least this share of its voxels. Default 0.6.

§min_cylinder_arc_degrees: f64

Refuse cylinders whose inliers cover less of the circumference. Default 90 degrees.

§min_cylinder_length_metres: f64

Refuse cylinders shorter than this along the axis. Default 0.3 m.

§cylinder_draws: u32

RANSAC draws per candidate. Default 256; 1..=4,096.

§cylinder_score_sample: u32

Voxels each draw is scored on (an evenly strided subsample). Default 2,048; 16..=65,536.

§max_cylinder_groups: u32

Largest non-planar groups examined for cylinders. Default 1,024.

Trait Implementations§

Source§

impl Clone for ScanSegmentationOptions

Source§

fn clone(&self) -> ScanSegmentationOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ScanSegmentationOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ScanSegmentationOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ScanSegmentationOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for ScanSegmentationOptions

Source§

fn eq(&self, other: &ScanSegmentationOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ScanSegmentationOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ScanSegmentationOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

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

Checks if self is actually part of its subset T (and can be converted to it).
§

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

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,