Struct visioncortex::color_clusters::Cluster [−][src]
Fields
indices: Vec<u32>
holes: Vec<u32>
num_holes: u32
depth: u32
sum: ColorSum
residue_sum: ColorSum
rect: BoundingRect
merged_into: ClusterIndex
Implementations
impl Cluster
[src]
pub fn new() -> Self
[src]
pub fn add(&mut self, i: u32, color: &Color, x: i32, y: i32)
[src]
pub fn area(&self) -> usize
[src]
pub fn iter(&self) -> impl Iterator<Item = &u32>
[src]
pub fn color(&self) -> Color
[src]
pub fn residue_color(&self) -> Color
[src]
pub fn perimeter(&self, parent: &ClustersView<'_>) -> u32
[src]
pub fn to_image(&self, parent: &ClustersView<'_>) -> BinaryImage
[src]
pub fn to_image_with_hole(
&self,
parent: &ClustersView<'_>,
hole: bool
) -> BinaryImage
[src]
&self,
parent: &ClustersView<'_>,
hole: bool
) -> BinaryImage
pub fn render_to_binary_image(
&self,
parent: &ClustersView<'_>,
image: &mut BinaryImage
)
[src]
&self,
parent: &ClustersView<'_>,
image: &mut BinaryImage
)
pub fn render_to_color_image(
&self,
parent: &ClustersView<'_>,
image: &mut ColorImage
)
[src]
&self,
parent: &ClustersView<'_>,
image: &mut ColorImage
)
pub fn render_to_color_image_with_color(
&self,
parent: &ClustersView<'_>,
image: &mut ColorImage,
color: &Color
)
[src]
&self,
parent: &ClustersView<'_>,
image: &mut ColorImage,
color: &Color
)
pub fn to_shape(&self, parent: &ClustersView<'_>) -> Shape
[src]
pub fn to_compound_path(
&self,
parent: &ClustersView<'_>,
hole: bool,
mode: PathSimplifyMode,
corner_threshold: f64,
length_threshold: f64,
max_iterations: usize,
splice_threshold: f64
) -> CompoundPath
[src]
&self,
parent: &ClustersView<'_>,
hole: bool,
mode: PathSimplifyMode,
corner_threshold: f64,
length_threshold: f64,
max_iterations: usize,
splice_threshold: f64
) -> CompoundPath
pub fn neighbours(&self, parent: &ClustersView<'_>) -> Vec<ClusterIndex>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnwindSafe for Cluster
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,