distance function
This commit is contained in:
+7
-3
@@ -7,7 +7,11 @@ fn main() {
|
||||
let img0 = image::open("img/meowl.jpg").unwrap();
|
||||
let img1 = image::open("img/nyameowl.jpg").unwrap();
|
||||
let img2 = image::open("img/armmeowl.jpg").unwrap();
|
||||
println!("{:#x}", desc.describe(img0));
|
||||
println!("{:#x}", desc.describe(img1));
|
||||
println!("{:#x}", desc.describe(img2));
|
||||
let img0_phash = desc.describe(img0);
|
||||
let img1_phash = desc.describe(img1);
|
||||
let img2_phash = desc.describe(img2);
|
||||
println!("{:#x}", img0_phash);
|
||||
println!("{:#x}", img1_phash);
|
||||
println!("{:#x}", img2_phash);
|
||||
println!("meowl and armmeowl are {} different", desc.distance(img0_phash, img2_phash));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user