Skip to content

Updated dependencies #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 29, 2018
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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "imageproc"
version = "0.15.0"
version = "0.16.0"
authors = ["theotherphil"]
license = "MIT"
description = "Image processing operations"
Expand All @@ -10,12 +10,12 @@ exclude = ["examples/*.ttf"]

[dependencies]
conv = "0.3.1"
image = "0.19.0"
image = "0.20.0"
itertools = "0.7.0"
nalgebra = "0.16.0"
num = "0.1.27"
num = "0.2.0"
quickcheck = "0.6"
rand = "0.4"
rand = "0.4.0"
rusttype = "0.5"
rayon = "1.0"

Expand Down
2 changes: 1 addition & 1 deletion src/affine.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Functions for affine transformations of images.

use image::{Pixel, GenericImage, ImageBuffer};
use image::{Pixel, GenericImage, GenericImageView, ImageBuffer};
use definitions::{Clamp, HasBlack, Image};
use math::cast;
use nalgebra::{Affine2, Point2};
Expand Down
2 changes: 1 addition & 1 deletion src/corners.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Functions for detecting corners, also known as interest points.

use image::{GrayImage, GenericImage};
use image::{GrayImage, GenericImageView};
use definitions::{Position, Score};

/// A location and score for a detected corner.
Expand Down
2 changes: 1 addition & 1 deletion src/definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::{u8, u16, i16};
// TODO: This produces a compiler warning about trait bounds
// TODO: not being enforced in type definitions. In this case
// TODO: they are. Can we get rid of the warning?
pub type Image<P: Pixel> = ImageBuffer<P, Vec<P::Subpixel>>;
pub type Image<P: Pixel> = ImageBuffer<P, Vec<<P as Pixel>::Subpixel>>;

/// Pixels which have a named Black value.
pub trait HasBlack {
Expand Down
2 changes: 1 addition & 1 deletion src/distance_transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use std::cmp::min;
use std::{u8, f64};
use image::{GenericImage, GrayImage, ImageBuffer, Luma};
use image::{GenericImage, GenericImageView, GrayImage, ImageBuffer, Luma};
use definitions::Image;

/// How to measure distance between coordinates.
Expand Down
2 changes: 1 addition & 1 deletion src/edges.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Functions for detecting edges in images.

use std::f32;
use image::{GenericImage, GrayImage, ImageBuffer, Luma};
use image::{GenericImageView, GrayImage, ImageBuffer, Luma};
use gradients::{vertical_sobel, horizontal_sobel};
use definitions::{HasWhite, HasBlack};
use filter::gaussian_blur_f32;
Expand Down
2 changes: 1 addition & 1 deletion src/filter/median.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use image::{GenericImage, Pixel};
use image::{GenericImageView, Pixel};
use definitions::Image;
use std::cmp::{min, max};

Expand Down
2 changes: 1 addition & 1 deletion src/filter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
mod median;
pub use self::median::median_filter;

use image::{GrayImage, GenericImage, ImageBuffer, Luma, Pixel, Primitive};
use image::{GrayImage, GenericImage, GenericImageView, ImageBuffer, Luma, Pixel, Primitive};

use integral_image::{column_running_sum, row_running_sum};
use map::{WithChannel, ChannelMap};
Expand Down
2 changes: 1 addition & 1 deletion src/gradients.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Functions for computing gradients of image intensities.

use image::{GenericImage, GrayImage, Luma, Pixel};
use image::{GenericImage, GenericImageView, GrayImage, Luma, Pixel};
use definitions::{HasBlack, Image};
use filter::filter3x3;
use itertools::multizip;
Expand Down
2 changes: 1 addition & 1 deletion src/haar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! [Haar-like features]: https://en.wikipedia.org/wiki/Haar-like_features

use definitions::{HasBlack, HasWhite, Image};
use image::{GenericImage, ImageBuffer, Luma};
use image::{GenericImage, GenericImageView, ImageBuffer, Luma};
use itertools::Itertools;
use std::marker::PhantomData;
use std::ops::Range;
Expand Down
2 changes: 1 addition & 1 deletion src/hough.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! [Hough transform]: https://en.wikipedia.org/wiki/Hough_transform

use image::{GenericImage, GrayImage, Luma, ImageBuffer, Pixel};
use image::{GenericImage, GenericImageView, GrayImage, Luma, ImageBuffer, Pixel};
use drawing::draw_line_segment_mut;
use definitions::Image;
use suppress::suppress_non_maximum;
Expand Down
2 changes: 1 addition & 1 deletion src/integral_image.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Functions for computing [integral images](https://en.wikipedia.org/wiki/Summed_area_table)
//! and running sums of rows and columns.

use image::{Luma, GrayImage, GenericImage, Pixel};
use image::{Luma, GrayImage, GenericImageView, Pixel};
use definitions::Image;
use map::{ChannelMap, WithChannel};

Expand Down
2 changes: 1 addition & 1 deletion src/region_labelling.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Functions for finding and labelling connected components of an image.

use image::{GenericImage, ImageBuffer, Luma};
use image::{GenericImage, GenericImageView, ImageBuffer, Luma};

use definitions::Image;
use union_find::DisjointSetForest;
Expand Down
6 changes: 4 additions & 2 deletions src/template_matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use image::Primitive;
use definitions::Image;
use rect::Rect;
use integral_image::{integral_squared_image, sum_image_pixels};
use image::{GenericImage, GrayImage, Luma};
use image::{GrayImage, Luma};

/// Method used to compute the matching score between a template and an image region.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
Expand All @@ -26,6 +26,8 @@ pub enum MatchTemplateMethod {
/// If either dimension of `template` is not strictly less than the corresponding dimension
/// of `image`.
pub fn match_template(image: &GrayImage, template: &GrayImage, method: MatchTemplateMethod) -> Image<Luma<f32>> {
use image::GenericImageView;

let (image_width, image_height) = image.dimensions();
let (template_width, template_height) = template.dimensions();

Expand Down Expand Up @@ -258,4 +260,4 @@ mod tests {

assert_eq!(find_extremes(&image), expected);
}
}
}
6 changes: 3 additions & 3 deletions src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Utils for testing and debugging.

use image::{DynamicImage, GenericImage, GrayImage, Luma, open, Pixel, Rgb, RgbImage};
use image::{DynamicImage, GenericImage, GenericImageView, GrayImage, Luma, open, Pixel, Rgb, RgbImage};

use std::u32;
use std::fmt;
Expand Down Expand Up @@ -341,8 +341,8 @@ where
// Can't just call $image.pixels(), as that needn't hit the
// trait pixels method - ImageBuffer defines its own pixels
// method with a different signature
GenericImage::pixels(actual)
.zip(GenericImage::pixels(expected))
GenericImageView::pixels(actual)
.zip(GenericImageView::pixels(expected))
.filter(|&(p, q)| is_diff(p, q))
.map(|(p, q)| {
assert!(p.0 == q.0 && p.1 == q.1, "Pixel locations do not match");
Expand Down