Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the perceptual-hashes Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 05:31:30 2022 GMT+0.
Next: Systems, Previous: The perceptual-hashes Reference Manual, Up: The perceptual-hashes Reference Manual [Contents][Index]
perceptual-hashes library computes perceptual hashes for images (supported formats include formats supported by imago + jpeg). Perceptual hashes are a measure of similarity between images.
You can install perceptual-hashes from Ultralisp repository. Add Ultralisp repository to quicklisp (if you haven't already):
(ql-dist:install-dist "http://dist.ultralisp.org/"
:prompt nil)
and install perceptual-hashes:
(ql:quickload :perceptual-hashes)
The following algorithms are supported:
You can find more information here.
(defconstant +threshold+ 45
"The distance between hashes can vary from 0 to (length hash) =
1024. If it is small enough (<= ~45) the images are similar")
(defun images-similar-p (image-name-1 image-name-2)
(let ((hash1 (perceptual-hashes:ahash image-name-1))
(hash2 (perceptual-hashes:ahash image-name-2)))
(< (perceptual-hashes:hamming-distance hash1 hash2)
+threshold+)))
Next: Files, Previous: Introduction, Up: The perceptual-hashes Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Perceptual hash algorithms for images
Vasily Postnicov <shamaz.mazum@gmail.com>
2-clause BSD
0.1
Next: Packages, Previous: Systems, Up: The perceptual-hashes Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: perceptual-hashes/src/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
perceptual-hashes (system).
Next: perceptual-hashes/src/conditions.lisp, Previous: perceptual-hashes/perceptual-hashes.asd, Up: Lisp [Contents][Index]
perceptual-hashes (system).
Next: perceptual-hashes/src/load-image.lisp, Previous: perceptual-hashes/src/package.lisp, Up: Lisp [Contents][Index]
src/package.lisp (file).
perceptual-hashes (system).
Next: perceptual-hashes/src/hashes.lisp, Previous: perceptual-hashes/src/conditions.lisp, Up: Lisp [Contents][Index]
src/conditions.lisp (file).
perceptual-hashes (system).
read-jpeg-grayscale (function).
Previous: perceptual-hashes/src/load-image.lisp, Up: Lisp [Contents][Index]
src/load-image.lisp (file).
perceptual-hashes (system).
Next: Definitions, Previous: Files, Up: The perceptual-hashes Reference Manual [Contents][Index]
Packages are listed by definition order.
Next: Indexes, Previous: Packages, Up: The perceptual-hashes Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Conditions, Previous: Public Interface, Up: Public Interface [Contents][Index]
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.
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.
Calculate Hamming distance between two hashes.
Previous: Ordinary functions, Up: Public Interface [Contents][Index]
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Ordinary functions, Previous: Internals, Up: Internals [Contents][Index]
The image will be resized to a small square with a side +thumb-size+ before a hash is calculated.
Previous: Definitions, Up: The perceptual-hashes Reference Manual [Contents][Index]
Jump to: | A D F G H R T |
---|
Jump to: | A D F G H R T |
---|
Next: Data types, Previous: Functions, Up: Indexes [Contents][Index]
Jump to: | +
C |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
+ | |||
+thumb-size+ : | Private constants | ||
| |||
C | |||
Constant, +thumb-size+ : | Private constants | ||
|
Jump to: | +
C |
---|
Jump to: | C F H P S |
---|
Jump to: | C F H P S |
---|