GitHunt
AZ

azr/phash

A simple perceptual hash library in pure Go.

phash
Coverage
ci.yml

A simple perceptual hashing library in Go.

Usage :

f, err := os.Open("image.jpg")
if err != nil {
    panic(err)
}
defer f.Close()
img, _, err := image.Decode(f)
if err != nil {
    panic(err)
}
hash1 := phash.DTC(img)
hash2 := phash.DTC(img)

if phash.Distance(hash1, hash2) == 0 {
    fmt.Println("these images sure do look alike.")
}

Languages

Go100.0%

Contributors

Latest Release

v0.2.0July 23, 2022
MIT License
Created April 13, 2014
Updated December 22, 2025
azr/phash | GitHunt