Skip to content

Commit 2f4bc91

Browse files
committed
undistort-image: kornia-image semver bug
See kornia/kornia-rs#557
1 parent 04cf000 commit 2f4bc91

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

geometry/undistort-image/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ edition = "2021"
55

66
[dependencies]
77
eyre.workspace = true
8-
kornia-image = "0.1.8"
8+
kornia-image = "0.1.10"
99
kornia-imgproc = "0.1.8"
1010
kornia-tensor = "0.1.8"
1111
machine-vision-formats.workspace = true

geometry/undistort-image/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ pub fn undistort_image(
6060
let rgb8 = decoded.into_pixel_format::<pixel_format::RGB8>().unwrap();
6161
let data_u8: &[u8] = rgb8.image_data();
6262
let data_f32: Vec<f32> = data_u8.iter().map(|x| *x as f32).collect();
63-
let image = kornia_image::image::Image::<f32, 3>::new(
63+
let image = kornia_image::image::Image::<f32, 3, _>::new(
6464
kornia_image::image::ImageSize { width, height },
6565
data_f32,
66+
kornia_image::allocator::CpuAllocator,
6667
)?;
67-
let mut undistorted_img = kornia_image::image::Image::<f32, 3>::from_size_val(
68+
let mut undistorted_img = kornia_image::image::Image::<f32, 3, _>::from_size_val(
6869
kornia_image::image::ImageSize { width, height },
6970
0.0,
71+
kornia_image::allocator::CpuAllocator,
7072
)?;
7173
kornia_imgproc::interpolation::remap(
7274
&image,

0 commit comments

Comments
 (0)