Documentation ¶
Index ¶
- Variables
- type DB
- func (db *DB) Add(img image.Image) (PHash, error)
- func (db *DB) AddFile(reader io.Reader) (hash PHash, err error)
- func (db *DB) AddHash(hash PHash) error
- func (db *DB) Load(reader io.Reader) error
- func (db *DB) MarshalBinary() ([]byte, error)
- func (db *DB) Save(writer io.Writer) error
- func (db *DB) Search(img image.Image, maxDistance int) (matches []PHash, err error)
- func (db *DB) SearchByFile(reader io.Reader, maxDistance int) (matches []PHash, err error)
- func (db *DB) SearchByHash(hash PHash, maxDistance int) ([]PHash, error)
- func (db *DB) UnmarshalBinary(buf []byte) error
- type ImageInfo
- type Index
- type LinearIndex
- type Node
- func (n *Node) Decode(reader io.Reader) error
- func (n *Node) Encode(writer io.Writer) error
- func (n *Node) Equal(other *Node) bool
- func (n *Node) Insert(value *Node)
- func (n *Node) IsLeaf() bool
- func (n *Node) Match(value PHash) (length uint8)
- func (n *Node) Search(search PHash, match PHash, distance int) []PHash
- func (n *Node) String() string
- type PHash
- type RadixIndex
- type SearchCriteria
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("Image not found") ErrNotSupported = errors.New("Underlying index does not support loading or saving") )
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) MarshalBinary ¶
func (*DB) SearchByFile ¶
func (*DB) UnmarshalBinary ¶
type LinearIndex ¶
type LinearIndex struct {
// contains filtered or unexported fields
}
func NewLinearIndex ¶
func NewLinearIndex() *LinearIndex
func (*LinearIndex) Insert ¶
func (li *LinearIndex) Insert(phash PHash) error
func (*LinearIndex) MarshalBinary ¶
func (li *LinearIndex) MarshalBinary() ([]byte, error)
func (*LinearIndex) Search ¶
func (li *LinearIndex) Search(phash PHash, maxDistance int) ([]PHash, error)
func (*LinearIndex) UnmarshalBinary ¶
func (li *LinearIndex) UnmarshalBinary(buf []byte) error
type RadixIndex ¶
type RadixIndex struct {
// contains filtered or unexported fields
}
func NewRadixIndex ¶
func NewRadixIndex() *RadixIndex
func (*RadixIndex) Insert ¶
func (ri *RadixIndex) Insert(hash PHash) error
func (*RadixIndex) MarshalBinary ¶
func (ri *RadixIndex) MarshalBinary() ([]byte, error)
func (*RadixIndex) UnmarshalBinary ¶
func (ri *RadixIndex) UnmarshalBinary(buf []byte) error
type SearchCriteria ¶
Click to show internal directories.
Click to hide internal directories.