dhash

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2021 License: BSD-2-Clause Imports: 4 Imported by: 2

README

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(h1, h2 Hash) int

Distance returns the number of bits different between two Hash values.

Types

type Hash

type Hash [2]uint64

A Hash is a 128-bit perceptual hash.

func New

func New(img image.Image) Hash

New returns a hash of img. The algorithm is the difference hash from http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html.

func Parse

func Parse(s string) (h Hash, err error)

Parse takes the string representation of a Hash, and returns the corresponding Hash value.

func (Hash) String

func (h Hash) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL