Struct edge_detection::Edge
source · [−]pub struct Edge { /* private fields */ }
Expand description
The computed result for a single pixel.
Implementations
sourceimpl Edge
impl Edge
sourcepub fn angle(&self) -> f32
pub fn angle(&self) -> f32
The direction of the gradient in radians.
This is a convenience function for atan2(direction)
.
sourcepub fn dir_norm(&self) -> (f32, f32)
pub fn dir_norm(&self) -> (f32, f32)
Returns a normalized vector of the direction of the change in brightness
The vector will point away from the detected line. E.g. a vertical line separating a dark area on the left and light area on the right will have it’s direction point towards the light area on the right.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more