hash

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateDistance

func CalculateDistance(x, y uint64) int

CalculateDistance calculates the hamming distance from two hashes.

func FindMean

func FindMean(img image.Image) uint32

FindMean finds the mean from the image.

func Grayscale

func Grayscale(img image.Image) *image.Gray

Grayscale converts image to grayscale.

func LoadAsImage

func LoadAsImage(path string) (image.Image, error)

LoadAsImage loads image from the path.

func Resize

func Resize(width, height uint, img image.Image) image.Image

Resize resizes the image and returns it.

Types

type AvgHash

type AvgHash struct{}

func NewAverageHash

func NewAverageHash() *AvgHash

func (*AvgHash) GenerateHash

func (ah *AvgHash) GenerateHash(img image.Image) uint64

GenerateHash generates the hash value using average hash.

Jump to

Keyboard shortcuts

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