Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions akaze/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions akaze/src/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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;

Expand Down Expand Up @@ -110,17 +110,17 @@

pub fn from_array2(arr: Array2<f32>) -> Self {
Self(
ImageBuffer::from_raw(arr.dim().1 as u32, arr.dim().0 as u32, arr.into_raw_vec())

Check warning on line 113 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / clippy

use of deprecated method `ndarray::impl_owned_array::<impl ndarray::ArrayBase<ndarray::OwnedRepr<A>, D>>::into_raw_vec`: Use .into_raw_vec_and_offset() instead

Check warning on line 113 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / tests

use of deprecated method `ndarray::impl_owned_array::<impl ndarray::ArrayBase<ndarray::OwnedRepr<A>, D>>::into_raw_vec`: Use .into_raw_vec_and_offset() instead

Check warning on line 113 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / tests

use of deprecated method `ndarray::impl_owned_array::<impl ndarray::ArrayBase<ndarray::OwnedRepr<A>, D>>::into_raw_vec`: Use .into_raw_vec_and_offset() instead
.expect("raw vector didn't have enough pixels for the image"),
)
}

pub fn ref_array2(&self) -> ArrayView2<f32> {

Check warning on line 118 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / clippy

lifetime flowing from input to output with different syntax can be confusing

Check warning on line 118 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / tests

lifetime flowing from input to output with different syntax can be confusing

Check warning on line 118 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / tests

lifetime flowing from input to output with different syntax can be confusing
self.0.ref_ndarray2()
self.0.as_ndarray2()
}

pub fn mut_array2(&mut self) -> ArrayViewMut2<f32> {

Check warning on line 122 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / clippy

lifetime flowing from input to output with different syntax can be confusing

Check warning on line 122 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / tests

lifetime flowing from input to output with different syntax can be confusing

Check warning on line 122 in akaze/src/image.rs

View workflow job for this annotation

GitHub Actions / tests

lifetime flowing from input to output with different syntax can be confusing
self.0.mut_ndarray2()
self.0.as_ndarray2_mut()
}

pub fn zero_array(&self) -> Array2<f32> {
Expand Down
4 changes: 2 additions & 2 deletions cv-sfm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
13 changes: 5 additions & 8 deletions cv-sfm/src/bicubic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<P>(px0: &P, px1: &P, px2: &P, px3: &P, x: f32) -> P
where
Expand All @@ -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] = <P as Pixel>::Subpixel::clamp(pval);
Expand Down
4 changes: 2 additions & 2 deletions cv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
4 changes: 2 additions & 2 deletions kpdraw/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
3 changes: 1 addition & 2 deletions kpdraw/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use image::ImageOutputFormat;
use std::{
io::{Cursor, Write},
path::PathBuf,
Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions tutorial-code/chapter3-akaze-feature-extraction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions tutorial-code/chapter4-feature-matching/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions tutorial-code/chapter5-geometric-verification/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion vslam-sandbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading