From 14f266a93a463d1f59c87fab909bdcd9eb2af841 Mon Sep 17 00:00:00 2001 From: cospectrum Date: Sun, 10 Mar 2024 22:12:24 +0300 Subject: [PATCH] fix some typos (#553) --- src/contours.rs | 2 +- src/filter/mod.rs | 2 +- src/region_labelling.rs | 2 +- src/stats.rs | 2 +- src/utils.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/contours.rs b/src/contours.rs index 42a24b7d..9f79b740 100644 --- a/src/contours.rs +++ b/src/contours.rs @@ -8,7 +8,7 @@ use std::collections::VecDeque; /// Whether a border of a foreground region borders an enclosing background region or a contained background region. #[derive(Debug, Copy, Clone, PartialEq, Eq)] pub enum BorderType { - /// A border between a foreground region and the backround region enclosing it. + /// A border between a foreground region and the background region enclosing it. /// All points in the border lie within the foreground region. Outer, /// A border between a foreground region and a background region contained within it. diff --git a/src/filter/mod.rs b/src/filter/mod.rs index 4c8c0fcc..5a457405 100644 --- a/src/filter/mod.rs +++ b/src/filter/mod.rs @@ -937,7 +937,7 @@ mod tests { } /// Baseline implementation of Gaussian blur is that provided by image::imageops. - /// We can also use this to validate correctnes of any implementations we add here. + /// We can also use this to validate correctness of any implementations we add here. fn gaussian_baseline_rgb(image: &I, stdev: f32) -> Image> where I: GenericImage>, diff --git a/src/region_labelling.rs b/src/region_labelling.rs index e0e842b9..8a1cd83e 100644 --- a/src/region_labelling.rs +++ b/src/region_labelling.rs @@ -274,7 +274,7 @@ mod tests { } // One huge component with eight-way connectivity, loads of - // isolated components with four-way conectivity. + // isolated components with four-way connectivity. fn chessboard(width: u32, height: u32) -> GrayImage { ImageBuffer::from_fn(width, height, |x, y| { if (x + y) % 2 == 0 { diff --git a/src/stats.rs b/src/stats.rs index 1fd57ea6..811fbefc 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -116,7 +116,7 @@ where } /// Returns the peak signal to noise ratio for a clean image and its noisy -/// aproximation. All channels are considered equally. If you do not want this +/// approximation. All channels are considered equally. If you do not want this /// (e.g. if using RGBA) then change image formats first. /// See also [peak signal-to-noise ratio (wikipedia)](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio). pub fn peak_signal_to_noise_ratio(original: &I, noisy: &J) -> f64 diff --git a/src/utils.rs b/src/utils.rs index f7c0a428..2285fada 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -332,7 +332,7 @@ where } /// Human readable description of some of the pixels that differ -/// signifcantly (according to provided function) between left +/// significantly (according to provided function) between left /// and right, or None if all pixels match. pub fn significant_pixel_diff_summary( actual: &I,