Open chaserstrong opened 1 year ago
I have two pictures which look vary similar:
The original image link is below: https://user-images.githubusercontent.com/18061322/230870421-1a6b4b6d-e2c3-42d6-be9a-4393a56166f2.png https://user-images.githubusercontent.com/18061322/230870522-a20d7b6e-f2e5-4713-a3c9-b4e338ecf33f.png
And by the code, phash is 0.21875 which is too big in my opinion
this is my code:
var imgUrls = require("./constant"); var Jimp = require("jimp"); (async () => { let img1 = await Jimp.read(imgUrls.closeIcon1); let img2 = await Jimp.read(imgUrls.closeIcon2); let hash1 = img1.pHash(); let hash2 = img2.pHash(); console.log(img2.distanceFromHash(hash1)); // 0.21875 console.log(Jimp.diff(img1, img2).percent); // 0 })();
Screenshots
@hipstersmoothie
if you have a bug fix feel free to submit a pr!
Expected Behavior
I have two pictures which look vary similar:
The original image link is below: https://user-images.githubusercontent.com/18061322/230870421-1a6b4b6d-e2c3-42d6-be9a-4393a56166f2.png https://user-images.githubusercontent.com/18061322/230870522-a20d7b6e-f2e5-4713-a3c9-b4e338ecf33f.png
And by the code, phash is 0.21875 which is too big in my opinion
Current Behavior
this is my code:
Failure Information (for bugs)
Steps to Reproduce
Screenshots
Context
Failure Logs