예제 #1
0
// HammingDistanceForHashes returns a Hamming Distance between two images' DCT pHashes.
func HammingDistanceForHashes(hasha uint64, hashb uint64) (int, error) {
	d, err := C.ph_hamming_distance(C.ulong64(hasha), C.ulong64(hashb))

	return int(d), err
}
예제 #2
0
파일: phash.go 프로젝트: dahernan/phash
// for benchmarks
func hammingDistanceC(h1, h2 uint64) int {
	return int(C.ph_hamming_distance(C.ulong64(h1), C.ulong64(h2)))
}