Documentation
¶
Index ¶
- type ExtImageHash
- func AverageHashExtend(img image.Image, hashSize int) (*ExtImageHash, error)
- func DifferenceHashExtend(img image.Image, hashSize int) (*ExtImageHash, error)
- func ExtImageHashFromString(s string) (*ExtImageHash, error)
- func NewExtImageHash(hash []uint64, kind Kind) *ExtImageHash
- func PerceptionHashExtend(img image.Image, hashSize int) (*ExtImageHash, error)
- type ImageHash
- type Kind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtImageHash ¶ added in v0.3.0
type ExtImageHash struct {
// contains filtered or unexported fields
}
ExtImageHash is a struct of big hash computation.
func AverageHashExtend ¶ added in v0.3.0
func AverageHashExtend(img image.Image, hashSize int) (*ExtImageHash, error)
AverageHashExtend function returns ahash of which the size can be set larger than uint64 Support 64bits ahash (hashSize=8) and 256bits ahash (hashSize=16)
func DifferenceHashExtend ¶ added in v0.3.0
func DifferenceHashExtend(img image.Image, hashSize int) (*ExtImageHash, error)
DifferenceHashExtend function returns dhash of which the size can be set larger than uint64 Support 64bits dhash (hashSize=8) and 256bits dhash (hashSize=16)
func ExtImageHashFromString ¶ added in v0.3.0
func ExtImageHashFromString(s string) (*ExtImageHash, error)
ExtImageHashFromString returns a big hash from a hex representation
func NewExtImageHash ¶ added in v0.3.0
func NewExtImageHash(hash []uint64, kind Kind) *ExtImageHash
NewExtImageHash function creates a new big hash
func PerceptionHashExtend ¶ added in v0.3.0
func PerceptionHashExtend(img image.Image, hashSize int) (*ExtImageHash, error)
PerceptionHashExtend function returns phash of which the size can be set larger than uint64 Some variable name refer to https://github.com/JohannesBuchner/imagehash/blob/master/imagehash/__init__.py Support 64bits phash (hashSize=8) and 256bits phash (hashSize=16)
func (*ExtImageHash) Distance ¶ added in v0.3.0
func (h *ExtImageHash) Distance(other *ExtImageHash) (int, error)
Distance method returns a distance between two big hashes
func (*ExtImageHash) GetHash ¶ added in v0.3.0
func (h *ExtImageHash) GetHash() []uint64
GetHash method returns a big hash value
func (*ExtImageHash) GetKind ¶ added in v0.3.0
func (h *ExtImageHash) GetKind() Kind
GetKind method returns a kind of big hash
func (*ExtImageHash) ToString ¶ added in v0.3.0
func (h *ExtImageHash) ToString() string
ToString returns a hex representation of big hash
type ImageHash ¶
type ImageHash struct {
// contains filtered or unexported fields
}
ImageHash is a struct of hash computation.
func AverageHash ¶
AverageHash fuction returns a hash computation of average hash. Implementation follows http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
func DifferenceHash ¶
DifferenceHash function returns a hash computation of difference hash. Implementation follows http://www.hackerfactor.com/blog/?/archives/529-Kind-of-Like-That.html
func ImageHashFromString ¶
ImageHashFromString returns an image hash from a hex representation
func NewImageHash ¶
NewImageHash function creates a new image hash.
func PerceptionHash ¶
PerceptionHash function returns a hash computation of phash. Implementation follows http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html