Image difference hash (dHash)
ID image_dhash
This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).
Perceptual hash of an image, described by Neal Krawetz: the image is reduced to 9x8 pixels in grayscale, and each of the 64 bits compares the brightness of a pixel with its right neighbour. Similar images give hashes that differ in few bits, so the Hamming distance between two hashes measures visual similarity. It is written as 16 hexadecimal digits. VirusTotal stores the dHash of the icon of files (main_icon.dhash) and of the favicon of domains (favicon.dhash), and its search finds files with similar icons by it. The value alone looks like any other 64-bit hexadecimal number.
- Categories
- Media and entertainment, Software development
- Countries
- Global (not tied to a country)
- Languages
- Common to most languages
- Quality
- 75/100 · missing: mapping (Wikidata, Schema.org, ...), translation, detector coverage
- Metacrafter rules
- no detection rule yet
- Supported by tools
- no tool record lists this type yet
Regular expression
^[0-9a-f]{16}$
Python re syntax.
Examples
| Value | Description |
|---|---|
| 3a6c6565498da525 | Example hash in Neal Krawetz's article |
| 71f0cc989386ba80 | Favicon dHash in the example domain object of the VirusTotal API documentation |
| 3a6c6565498da5 invalid | 14 digits (56 bits) |
Sources
- doc: https://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html
- other: https://virustotal.readme.io/reference/files
Use this record
- Page URL:
https://registry.apicrafter.io/datatype/image_dhash - JSON: API v1 · legacy shape (used by metacrafter) · Markdown (for LLMs)
- Improve it: edit
data/datatypes/any/media/image_dhash.yamlon GitHub