pub struct Edge { /* private fields */ }
Expand description
The computed result for a single pixel.
Implementations§
Source§impl 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 Freeze for Edge
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnwindSafe for Edge
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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