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: f64Edge of the averaging voxel. Default 0.03 m; 0.005..=1.
max_voxels: u32Voxel 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: u32Neighbourhood for voxel normals: 1 = the 26 neighbours, 2 = 124. Default 1.
min_neighbors: u32Occupied voxels (including the voxel itself) a normal needs. Default 6.
max_seed_curvature: f64Seeds 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: f64A 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: f64Robust 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: f64A 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: f64Planes with a smaller estimated area are dropped. Default 0.25 m^2.
classification_angle_degrees: f64Horizontal 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: u32At most this many planes are reported, largest first. Default 10,000.
detect_cylinders: boolLook 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: f64A group must fit a candidate with at least this share of its voxels. Default 0.6.
min_cylinder_arc_degrees: f64Refuse cylinders whose inliers cover less of the circumference. Default 90 degrees.
min_cylinder_length_metres: f64Refuse cylinders shorter than this along the axis. Default 0.3 m.
cylinder_draws: u32RANSAC draws per candidate. Default 256; 1..=4,096.
cylinder_score_sample: u32Voxels each draw is scored on (an evenly strided subsample). Default 2,048; 16..=65,536.
max_cylinder_groups: u32Largest non-planar groups examined for cylinders. Default 1,024.
Trait Implementations§
Source§impl Clone for ScanSegmentationOptions
impl Clone for ScanSegmentationOptions
Source§fn clone(&self) -> ScanSegmentationOptions
fn clone(&self) -> ScanSegmentationOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScanSegmentationOptions
impl Debug for ScanSegmentationOptions
Source§impl Default for ScanSegmentationOptions
impl Default for ScanSegmentationOptions
Source§impl<'de> Deserialize<'de> for ScanSegmentationOptionswhere
ScanSegmentationOptions: Default,
impl<'de> Deserialize<'de> for ScanSegmentationOptionswhere
ScanSegmentationOptions: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ScanSegmentationOptions
impl PartialEq for ScanSegmentationOptions
Source§impl Serialize for ScanSegmentationOptions
impl Serialize for ScanSegmentationOptions
impl StructuralPartialEq for ScanSegmentationOptions
Auto Trait Implementations§
impl Freeze for ScanSegmentationOptions
impl RefUnwindSafe for ScanSegmentationOptions
impl Send for ScanSegmentationOptions
impl Sync for ScanSegmentationOptions
impl Unpin for ScanSegmentationOptions
impl UnwindSafe for ScanSegmentationOptions
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
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 moreSource§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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
impl<T> Pointable for T
§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>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.