Created
September 8, 2012 12:24
-
-
Save laclefyoshi/3674378 to your computer and use it in GitHub Desktop.
cpp code using phash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2012/09/08 | |
**/ | |
#include<cstdio> | |
#include<pHash.h> | |
int main(int argc, char* argv[]) { | |
ulong64 hash1, hash2; | |
int distance; | |
ph_dct_imagehash(argv[1], hash1); | |
ph_dct_imagehash(argv[2], hash2); | |
distance = ph_hamming_distance(hash1, hash2); | |
printf("distance: %d\n", distance); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment