The perceptual-hashes Reference Manual

This is the perceptual-hashes Reference Manual, version 0.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 17:31:54 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 perceptual-hashes

Perceptual hash algorithms for images

Author

Vasily Postnicov <>

License

2-clause BSD

Version

0.3

Dependencies
  • imago/pngload (system).
  • imago/jpeg-turbo (system).
  • array-operations (system).
  • alexandria (system).
  • serapeum (system).
Source

perceptual-hashes.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 perceptual-hashes/perceptual-hashes.asd

Source

perceptual-hashes.asd.

Parent Component

perceptual-hashes (system).

ASDF Systems

perceptual-hashes.


3.1.2 perceptual-hashes/package.lisp

Source

perceptual-hashes.asd.

Parent Component

perceptual-hashes (system).

Packages

perceptual-hashes.


3.1.3 perceptual-hashes/resize.lisp

Dependency

package.lisp (file).

Source

perceptual-hashes.asd.

Parent Component

perceptual-hashes (system).

Internals

thumbnail (function).


3.1.4 perceptual-hashes/hashes.lisp

Dependency

resize.lisp (file).

Source

perceptual-hashes.asd.

Parent Component

perceptual-hashes (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 perceptual-hashes

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Ordinary functions

Function: ahash (image)

Return aHash (average hash) of an @c(image) which can be a string, a pathname or an @c(imago:image) object. If @c(image) is a string or a pathname, the image is loaded using this pathname.
This algorithm is based on whenever a pixel is brighter or darker than the average luminance of all pixels.

Package

perceptual-hashes.

Source

hashes.lisp.

Function: dhash (image)

Return dHash (gradient hash) of an @c(image) which can be a string, a pathname or an @c(imago:image) object. If @c(image) is a string or a pathname, the image is loaded using this pathname.
This algorithm is based on whenever a pixel is brighter or darker than the neighbour pixels.

Package

perceptual-hashes.

Source

hashes.lisp.

Function: hamming-distance (hash1 hash2)

Calculate Hamming distance between two hashes.

Package

perceptual-hashes.

Source

hashes.lisp.


5.2 Internals


5.2.1 Constants

Constant: +thumb-size+

The image will be resized to a small square with a side +thumb-size+ before a hash is calculated.

Package

perceptual-hashes.

Source

hashes.lisp.


5.2.2 Ordinary functions

Function: get-image (image)
Package

perceptual-hashes.

Source

hashes.lisp.

Function: thumbnail (image thumb-size)

Convert an image into a small thumbnail array of pixel intensity.

Package

perceptual-hashes.

Source

resize.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables

Jump to:   +  
C  
Index Entry  Section

+
+thumb-size+: Private constants

C
Constant, +thumb-size+: Private constants