removes default implementation of info
This commit is contained in:
@@ -103,6 +103,9 @@ impl DCT {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Descriptor for DCT {
|
impl Descriptor for DCT {
|
||||||
|
fn info(&self) -> String {
|
||||||
|
"DCT".to_string()
|
||||||
|
}
|
||||||
fn describe(&self, img: &image::DynamicImage) -> u64 {
|
fn describe(&self, img: &image::DynamicImage) -> u64 {
|
||||||
let resized = self.resize(img);
|
let resized = self.resize(img);
|
||||||
let mut dct_values = self.dct(&resized);
|
let mut dct_values = self.dct(&resized);
|
||||||
|
|||||||
@@ -2,9 +2,8 @@
|
|||||||
//! If two images are (almost) the same, their descriptions will be the same.
|
//! If two images are (almost) the same, their descriptions will be the same.
|
||||||
|
|
||||||
pub trait Descriptor {
|
pub trait Descriptor {
|
||||||
fn info(&self) -> String {
|
/// Print the name of the descriptor,
|
||||||
"Descriptor".to_string()
|
fn info(&self) -> String;
|
||||||
}
|
|
||||||
fn resize(&self, img: &image::DynamicImage) -> image::DynamicImage {
|
fn resize(&self, img: &image::DynamicImage) -> image::DynamicImage {
|
||||||
img.grayscale().thumbnail_exact(8, 8)
|
img.grayscale().thumbnail_exact(8, 8)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user