pub struct EuclideanRGB {}
Expand description
Euclidean RGB distance.
§Example
use graph_based_image_segmentation::{Distance, EuclideanRGB, ImageNodeColor};
let a = ImageNodeColor::new_bgr(0, 0, 0);
let b = ImageNodeColor::new_bgr(255, 255, 255);
let distance = EuclideanRGB::default();
assert_eq!(distance.distance(&a, &b), 1.0);
Trait Implementations§
Source§impl Clone for EuclideanRGB
impl Clone for EuclideanRGB
Source§fn clone(&self) -> EuclideanRGB
fn clone(&self) -> EuclideanRGB
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for EuclideanRGB
impl Debug for EuclideanRGB
Source§impl Default for EuclideanRGB
impl Default for EuclideanRGB
Source§impl Distance for EuclideanRGB
impl Distance for EuclideanRGB
Source§fn distance(&self, n: &ImageNodeColor, m: &ImageNodeColor) -> f32
fn distance(&self, n: &ImageNodeColor, m: &ImageNodeColor) -> f32
Compute the distance given two nodes. Read more
impl Copy for EuclideanRGB
impl Send for EuclideanRGB
impl Sync for EuclideanRGB
Auto Trait Implementations§
impl Freeze for EuclideanRGB
impl RefUnwindSafe for EuclideanRGB
impl Unpin for EuclideanRGB
impl UnwindSafe for EuclideanRGB
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