Warning! Original pHash library is unmaintained. Many users face build problems with it and this wrapper. You have been warned.
go-phash is a simple pHash wrapper library for the Go programming language.
You can view documentation on godoc.org.
First of all, install go-phash as usual: go get github.com/kavu/go-phash
.
Now you can use go-phash:
package main
import "github.com/kavu/go-phash"
func main() {
hash, _ := phash.ImageHashDCT("~/my_cat.jpg")
println(hash)
}