diff --git a/akaze/Cargo.toml b/akaze/Cargo.toml index 96a27334..aa885c1c 100644 --- a/akaze/Cargo.toml +++ b/akaze/Cargo.toml @@ -13,15 +13,15 @@ readme = "README.md" [dependencies] cv-core = { version = "0.15.0", path = "../cv-core" } -image = { version = "0.24", default-features = false } +image = { version = "0.25", default-features = false } log = { version = "0.4.14", default-features = false } primal = { version = "0.3.0", default-features = false } derive_more = { version = "0.99.17", default-features = false } -nshare = { git = "https://github.com/rust-cv/nshare.git", rev = "cd4a5c007ecf4ef62c938a6ac64fd90edf895360", default-features = false, features = [ +nshare = { version = "0.10", default-features = false, features = [ "ndarray", "image", ] } -ndarray = { version = "0.15.4", default-features = false } +ndarray = { version = "0.16", default-features = false } float-ord = { version = "0.3.2", default-features = false } space = "0.17.0" bitarray = "0.9.0" @@ -41,9 +41,9 @@ rand = "0.8.4" rand_pcg = "0.3.1" criterion = "0.3.5" pretty_env_logger = "0.4.0" -image = "0.24" +image = "0.25" bitarray = { version = "0.9.0", features = ["space"] } -imageproc = "0.23.0" +imageproc = "0.25.0" [[bench]] name = "criterion" diff --git a/akaze/src/image.rs b/akaze/src/image.rs index 6909b0a1..d0d143c3 100644 --- a/akaze/src/image.rs +++ b/akaze/src/image.rs @@ -2,7 +2,7 @@ use derive_more::{Deref, DerefMut}; use image::{DynamicImage, ImageBuffer, Luma, Pixel}; use log::*; use ndarray::{azip, s, Array2, ArrayView2, ArrayViewMut2}; -use nshare::{MutNdarray2, RefNdarray2}; +use nshare::{AsNdarray2, AsNdarray2Mut}; use std::f32; use wide::f32x4; @@ -116,11 +116,11 @@ impl GrayFloatImage { } pub fn ref_array2(&self) -> ArrayView2 { - self.0.ref_ndarray2() + self.0.as_ndarray2() } pub fn mut_array2(&mut self) -> ArrayViewMut2 { - self.0.mut_ndarray2() + self.0.as_ndarray2_mut() } pub fn zero_array(&self) -> Array2 { diff --git a/cv-sfm/Cargo.toml b/cv-sfm/Cargo.toml index 3606fafd..dce66a69 100644 --- a/cv-sfm/Cargo.toml +++ b/cv-sfm/Cargo.toml @@ -28,9 +28,9 @@ space = { version = "0.17.0", default-features = false } maplit = { version = "1.0.2", default-features = false } log = { version = "0.4.14", default-features = false } itertools = { version = "0.10.3", default-features = false } -image = { version = "0.24", default-features = false } +image = { version = "0.25", default-features = false } ply-rs = { version = "0.1.3", default-features = false } -imageproc = "0.23" +imageproc = "0.25" conv = { version = "0.3.3", default-features = false } bitarray = { version = "0.9.0", default-features = false, features = ["space"] } serde = { version = "1.0.136", features = ["derive"], optional = true } diff --git a/cv-sfm/src/bicubic.rs b/cv-sfm/src/bicubic.rs index 12442799..c3c771e2 100644 --- a/cv-sfm/src/bicubic.rs +++ b/cv-sfm/src/bicubic.rs @@ -5,10 +5,7 @@ use conv::ValueInto; use image::{GenericImageView, Pixel}; -use imageproc::{ - definitions::{Clamp, Image}, - math::cast, -}; +use imageproc::definitions::{Clamp, Image}; fn blend_cubic

(px0: &P, px1: &P, px2: &P, px3: &P, x: f32) -> P where @@ -18,10 +15,10 @@ where let mut outp = *px0; for i in 0..(P::CHANNEL_COUNT as usize) { - let p0 = cast(px0.channels()[i]); - let p1 = cast(px1.channels()[i]); - let p2 = cast(px2.channels()[i]); - let p3 = cast(px3.channels()[i]); + let p0 = px0.channels()[i].value_into().unwrap(); + let p1 = px1.channels()[i].value_into().unwrap(); + let p2 = px2.channels()[i].value_into().unwrap(); + let p3 = px3.channels()[i].value_into().unwrap(); #[rustfmt::skip] let pval = p1 + 0.5 * x * (p2 - p0 + x * (2.0 * p0 - 5.0 * p1 + 4.0 * p2 - p3 + x * (3.0 * (p1 - p2) + p3 - p0))); outp.channels_mut()[i] =

::Subpixel::clamp(pval); diff --git a/cv/Cargo.toml b/cv/Cargo.toml index 0d6868d2..48fa0906 100644 --- a/cv/Cargo.toml +++ b/cv/Cargo.toml @@ -59,8 +59,8 @@ hgg = { version = "0.4.1", optional = true } levenberg-marquardt = { version = "0.12.0", optional = true } arrsac = { version = "0.10.0", optional = true } bitarray = { version = "0.9.0", features = ["space"], optional = true } -image = { version = "0.24", default-features = false, optional = true } -imageproc = { version = "0.23", default-features = false, optional = true } +image = { version = "0.25", default-features = false, optional = true } +imageproc = { version = "0.25", default-features = false, optional = true } eye = { version = "0.4.1", optional = true } ndarray-vision = { version = "0.3.0", default-features = false, optional = true } diff --git a/kpdraw/Cargo.toml b/kpdraw/Cargo.toml index e977ec16..efd0c542 100644 --- a/kpdraw/Cargo.toml +++ b/kpdraw/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" [dependencies] akaze = { version = "0.7.0", path = "../akaze" } structopt = "0.3.26" -image = { version = "0.24", features = ["png", "jpeg"] } -imageproc = "0.23" +image = { version = "0.25", features = ["png", "jpeg"] } +imageproc = "0.25" diff --git a/kpdraw/src/main.rs b/kpdraw/src/main.rs index fb571df4..7ceb1cab 100644 --- a/kpdraw/src/main.rs +++ b/kpdraw/src/main.rs @@ -1,4 +1,3 @@ -use image::ImageOutputFormat; use std::{ io::{Cursor, Write}, path::PathBuf, @@ -36,7 +35,7 @@ fn main() { } else { let mut output = Cursor::new(Vec::new()); image - .write_to(&mut output, ImageOutputFormat::Png) + .write_to(&mut output, image::ImageFormat::Png) .expect("failed to write image to stdout"); stdout .lock() diff --git a/tutorial-code/chapter3-akaze-feature-extraction/Cargo.toml b/tutorial-code/chapter3-akaze-feature-extraction/Cargo.toml index 083e1e5e..e1d0536c 100644 --- a/tutorial-code/chapter3-akaze-feature-extraction/Cargo.toml +++ b/tutorial-code/chapter3-akaze-feature-extraction/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dependencies] cv = { version = "0.6.0", path = "../../cv" } -image = "0.24" -imageproc = "0.23" +image = "0.25" +imageproc = "0.25" open = "2.0.2" tempfile = "3.3.0" diff --git a/tutorial-code/chapter4-feature-matching/Cargo.toml b/tutorial-code/chapter4-feature-matching/Cargo.toml index c0917406..c169c5e8 100644 --- a/tutorial-code/chapter4-feature-matching/Cargo.toml +++ b/tutorial-code/chapter4-feature-matching/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" [dependencies] cv = { version = "0.6.0", path = "../../cv" } -image = "0.24" -imageproc = "0.23" +image = "0.25" +imageproc = "0.25" open = "2.0.2" tempfile = "3.3.0" itertools = "0.10.3" diff --git a/tutorial-code/chapter5-geometric-verification/Cargo.toml b/tutorial-code/chapter5-geometric-verification/Cargo.toml index 8979b7ee..a6fc485b 100644 --- a/tutorial-code/chapter5-geometric-verification/Cargo.toml +++ b/tutorial-code/chapter5-geometric-verification/Cargo.toml @@ -5,8 +5,8 @@ edition = "2021" [dependencies] cv = { version = "0.6.0", path = "../../cv" } -image = "0.24" -imageproc = "0.23" +image = "0.25" +imageproc = "0.25" open = "2.0.2" tempfile = "3.3.0" itertools = "0.10.3" diff --git a/vslam-sandbox/Cargo.toml b/vslam-sandbox/Cargo.toml index ac3974cb..66a45ab5 100644 --- a/vslam-sandbox/Cargo.toml +++ b/vslam-sandbox/Cargo.toml @@ -19,7 +19,7 @@ eight-point = { version = "0.8.0", path = "../eight-point" } arrsac = "0.10.0" structopt = "0.3.26" serde = { version = "1.0.136", features = ["derive"] } -image = "0.24" +image = "0.25" rand = "0.8.4" rand_xoshiro = "0.6.0" log = "0.4.14"