Browse Source

Resolving merge conflicts

develop
Drew Short 8 years ago
parent
commit
961953b3d1
  1. 11
      src/hash/phash.rs
  2. 12
      src/lib.rs

11
src/hash/phash.rs

@ -49,13 +49,7 @@ impl<'a> PerceptualHash for PHash<'a> {
Some(matrix) => matrix,
None => {
let matrix = create_data_matrix(width, height, &image);
// Store this DFT in the cache
<<<<<<< HEAD
match c.put_matrix_in_cache(&Path::new(self.prepared_image
.orig_path),
=======
match c.put_matrix_in_cache(&Path::new(self.prepared_image.orig_path),
>>>>>>> master
width as u32,
&matrix) {
Ok(_) => {}
@ -113,12 +107,7 @@ fn create_data_matrix(width: usize,
for y in 0..height {
let pos_x = x as u32;
let pos_y = y as u32;
<<<<<<< HEAD
data_matrix[x].push(image.get_pixel(pos_x, pos_y)
.channels()[0] as f64);
=======
data_matrix[x].push(image.get_pixel(pos_x, pos_y).channels()[0] as f64);
>>>>>>> master
}
}

12
src/lib.rs

@ -25,15 +25,9 @@ pub struct PIHash<'a> {
impl<'a> PIHash<'a> {
/**
<<<<<<< HEAD
* Create a new pihash library, and initialize a cache of a path is passed.
* If none is passed then no cache is initialized or used with the library
*/
=======
* Create a new pihash library, and initialize a cache of a path is passed.
* If none is passed then no cache is initialized or used with the library
*/
>>>>>>> master
pub fn new(cache_path: Option<&'a str>) -> PIHash<'a> {
match cache_path {
Some(path) => {
@ -223,9 +217,9 @@ mod tests {
}
/**
* Updated test function. Assumes 3 images to a set and no hamming distances.
* We don't need to confirm that the hamming distance calculation works in these tests.
*/
* Updated test function. Assumes 3 images to a set and no hamming distances.
* We don't need to confirm that the hamming distance calculation works in these tests.
*/
fn test_imageset_hash(hash_type: hash::HashType,
hash_precision: hash::Precision,
max_hamming_distance: u64,

Loading…
Cancel
Save