{
  "id": "image_dhash",
  "kind": "datatype",
  "status": "draft",
  "name": "Image difference hash (dHash)",
  "doc": "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.",
  "is_pii": false,
  "categories": [
    "media",
    "software"
  ],
  "langs": [
    "common"
  ],
  "classification": "identifier",
  "regexp": "^[0-9a-f]{16}$",
  "examples": [
    {
      "value": "3a6c6565498da525",
      "description": "Example hash in Neal Krawetz's article",
      "valid": true
    },
    {
      "value": "71f0cc989386ba80",
      "description": "Favicon dHash in the example domain object of the VirusTotal API documentation",
      "valid": true
    },
    {
      "value": "3a6c6565498da5",
      "description": "14 digits (56 bits)",
      "valid": false
    }
  ],
  "links": [
    {
      "type": "doc",
      "url": "https://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html"
    },
    {
      "type": "other",
      "url": "https://virustotal.readme.io/reference/files"
    }
  ],
  "quality": {
    "score": 75,
    "missing": [
      "mapping (Wikidata, Schema.org, ...)",
      "translation",
      "detector coverage"
    ]
  },
  "source": {
    "path": "data/datatypes/any/media/image_dhash.yaml",
    "url": "https://github.com/apicrafter/metacrafter-registry/blob/main/data/datatypes/any/media/image_dhash.yaml",
    "edit_url": "https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/media/image_dhash.yaml"
  },
  "urls": {
    "html": "https://registry.apicrafter.io/datatype/image_dhash",
    "json": "https://registry.apicrafter.io/api/v1/datatypes/image_dhash.json"
  }
}