[−][src]Struct visioncortex::BinaryImage
Image with 1 bit per pixel
Fields
pixels: BitVec
width: usize
height: usize
Implementations
impl BinaryImage
[src]
pub fn operation(
&self,
other: &BinaryImage,
operator: impl FnMut((&mut u8, &u8))
) -> BinaryImage
[src]
&self,
other: &BinaryImage,
operator: impl FnMut((&mut u8, &u8))
) -> BinaryImage
pub fn negative(&self) -> BinaryImage
[src]
pub fn diff(&self, other: &BinaryImage) -> BinaryImage
[src]
pub fn union(&self, other: &BinaryImage) -> BinaryImage
[src]
pub fn intersect(&self, other: &BinaryImage) -> BinaryImage
[src]
pub fn clustered_diff(&self, other: &BinaryImage) -> u32
[src]
pub fn significance(&self, area: u64, threshold: u32) -> u32
[src]
early return if diff >= threshold, so maximum return value is equal to threshold
pub fn diff_and_count(&self, other: &BinaryImage) -> usize
[src]
pub fn popcount(i: u32) -> u32
[src]
pub fn stroke(&self, s: u32) -> BinaryImage
[src]
expand a binary image using a circular brush
impl BinaryImage
[src]
pub fn to_skeleton(&self) -> Skeleton
[src]
An extremely fast implementation of skeletonization
impl BinaryImage
[src]
pub fn to_clusters(&self, diagonal: bool) -> Clusters
[src]
impl BinaryImage
[src]
pub fn new_w_h(width: usize, height: usize) -> BinaryImage
[src]
pub fn get_pixel_at(&self, p: PointI32) -> bool
[src]
pub fn get_pixel(&self, x: usize, y: usize) -> bool
[src]
pub fn get_pixel_at_safe(&self, p: PointI32) -> bool
[src]
pub fn get_pixel_safe(&self, x: i32, y: i32) -> bool
[src]
pub fn set_pixel(&mut self, x: usize, y: usize, v: bool)
[src]
pub fn set_pixel_at(&mut self, p: PointI32, v: bool)
[src]
pub fn set_pixel_index(&mut self, i: usize, v: bool)
[src]
pub fn set_pixel_safe(&mut self, x: i32, y: i32, v: bool) -> bool
[src]
pub fn set_pixel_at_safe(&mut self, p: PointI32, v: bool)
[src]
pub fn bounding_rect(&self) -> BoundingRect
[src]
pub fn area(&self) -> u64
[src]
pub fn crop(&self) -> BinaryImage
[src]
crop image to fit content
pub fn crop_with_rect(&self, rect: BoundingRect) -> BinaryImage
[src]
crop a specific area from image
pub fn uncrop(&self, new_width: usize, new_height: usize) -> BinaryImage
[src]
expand the image while center original image so that there will be more space surrounding
pub fn from_string(string: &str) -> Self
[src]
pub fn rotate(&mut self, angle: f64) -> BinaryImage
[src]
pub fn paste_from(&mut self, src: &BinaryImage, offset: PointI32)
[src]
Paste the content of src
into self
, with offset
with respective to the upper-left corner.
Trait Implementations
impl Clone for BinaryImage
[src]
pub fn clone(&self) -> BinaryImage
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BinaryImage
[src]
impl Default for BinaryImage
[src]
pub fn default() -> BinaryImage
[src]
impl Display for BinaryImage
[src]
impl From<BinaryImage> for Shape
[src]
pub fn from(image: BinaryImage) -> Self
[src]
Auto Trait Implementations
impl RefUnwindSafe for BinaryImage
[src]
impl Send for BinaryImage
[src]
impl Sync for BinaryImage
[src]
impl Unpin for BinaryImage
[src]
impl UnwindSafe for BinaryImage
[src]
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,