Documentation ¶
Overview ¶
Package imagehash processes a Perception hash and Average hash from an image.
Index ¶
- Constants
- Variables
- type Ahash
- type Phash
- func (ph *Phash) Decode(buf []byte)
- func (z *Phash) DecodeMsg(dc *msgp.Reader) (err error)
- func (ph Phash) Distance(hash Phash) uint8
- func (ph Phash) Encode(buf []byte)
- func (z Phash) EncodeMsg(en *msgp.Writer) (err error)
- func (z Phash) MarshalMsg(b []byte) (o []byte, err error)
- func (z Phash) Msgsize() (s int)
- func (ph Phash) String() string
- func (z *Phash) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
const ( NilPhash Phash = 0 NilAhash Ahash = 0 LengthPHash = 8 )
Constants
Variables ¶
var (
ErrImageObject = errors.New("image object can not be nil")
)
Variables
Functions ¶
This section is empty.
Types ¶
type Ahash ¶
type Ahash uint64
Ahash is a 64bit Average Hash
func NewAHash ¶
NewAHash is an Average Hash fuction that returns a hash computation of average hash. Implementation follows http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
func (Ahash) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type Phash ¶
type Phash uint64
Phash is a 64bit Perception Hash
func NewPHash ¶
NewPHash is a Perception Hash function returns a hash computation of phash. Implementation follows http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
func NewPHashFast ¶
NewPHashFast is a Perception Hash function returns a hash computation of phash. Implementation follows http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html Has been manually optimized for perforance and reduced memory footprint.
func (Phash) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
Directories ¶
Path | Synopsis |
---|---|
Package transforms provides the transformations for imagehash
|
Package transforms provides the transformations for imagehash |