pub struct RegionProps<T>where
T: Float,{Show 20 fields
pub label: usize,
pub area: usize,
pub centroid: (T, T),
pub weighted_centroid: (T, T),
pub bounding_box: (usize, usize, usize, usize),
pub perimeter: T,
pub eccentricity: T,
pub orientation: T,
pub equivalent_diameter: T,
pub major_axis_length: T,
pub minor_axis_length: T,
pub euler_number: i32,
pub solidity: T,
pub extent: T,
pub mean_intensity: T,
pub min_intensity: T,
pub max_intensity: T,
pub hu_moments: [T; 7],
pub central_moments: [T; 8],
pub normalized_moments: [T; 7],
}Expand description
Comprehensive properties of a single labeled region
Fields§
§label: usizeLabel value
area: usizeNumber of pixels
centroid: (T, T)Geometric centroid (row, col)
weighted_centroid: (T, T)Intensity-weighted centroid (row, col)
bounding_box: (usize, usize, usize, usize)Bounding box (min_row, min_col, max_row_exclusive, max_col_exclusive)
perimeter: TPerimeter length (boundary pixel count, 4-connected)
eccentricity: TEccentricity of equivalent ellipse (0 = circle, approaching 1 = line)
orientation: TOrientation angle in radians of major axis
equivalent_diameter: TDiameter of a circle with the same area
major_axis_length: TLength of the major axis of the equivalent ellipse
minor_axis_length: TLength of the minor axis of the equivalent ellipse
euler_number: i32Euler number: #objects - #holes (4-connected topology)
solidity: TSolidity: area / convex_hull_area
extent: TExtent: area / bounding_box_area
mean_intensity: TMean intensity
min_intensity: TMinimum intensity
max_intensity: TMaximum intensity
hu_moments: [T; 7]7 Hu invariant moments (translation, scale, rotation invariant)
central_moments: [T; 8]Raw central moments (mu_00, mu_20, mu_11, mu_02, mu_30, mu_21, mu_12, mu_03)
normalized_moments: [T; 7]Normalized central moments (nu_20, nu_11, nu_02, nu_30, nu_21, nu_12, nu_03)
Trait Implementations§
Source§impl<T> Clone for RegionProps<T>
impl<T> Clone for RegionProps<T>
Source§fn clone(&self) -> RegionProps<T>
fn clone(&self) -> RegionProps<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> Freeze for RegionProps<T>where
T: Freeze,
impl<T> RefUnwindSafe for RegionProps<T>where
T: RefUnwindSafe,
impl<T> Send for RegionProps<T>where
T: Send,
impl<T> Sync for RegionProps<T>where
T: Sync,
impl<T> Unpin for RegionProps<T>where
T: Unpin,
impl<T> UnsafeUnpin for RegionProps<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for RegionProps<T>where
T: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.