Skip to contents

Creates perceptual image hashes (pHash) for all artwork variants to enable duplicate detection and similarity search across the platform. Hashes are stored in artwork_hash table.

Usage

create_artwork_hash(artist, artwork, new_utc = NULL)

Arguments

artist

Character. Artist UUID identifying the creator.

artwork

Character. Artwork UUID for this piece.

new_utc

POSIXct. Timestamp for added_utc field. Defaults to now.

Value

data.table with columns: art_hash, art_binary, artist_uuid, art_uuid, variant_id, added_utc. Returns NULL if no variants found in CDN.

data.table with columns: art_hash, art_binary, artist_uuid, art_uuid, variant_id, added_utc. Returns NULL if no variants found.

Details

Perceptual hashing generates fingerprints that remain similar for visually similar images, unlike cryptographic hashes. This enables finding: - Exact duplicates (same artwork uploaded twice) - Near-duplicates (cropped, resized, or recompressed versions) - Potentially plagiarized works

Functions

  • create_artwork_hash(): Generate perceptual hashes for all artwork variants

See also

[artpixeltrace::image_phash()] for the hashing algorithm

Other pipeline functions: build-record, commit_artwork(), create_gallery_images(), frame-analytics, frame-metrics, render_certificate(), validate_table_list()

Examples

if (FALSE) { # \dontrun{
hashes <- create_artwork_hash(
  artist = "746b8207-72f5-4ab6-8d19-a91d03daec3d",
  artwork = "99a61148-1d3b-4340-8cf6-92ad26046b0f"
)
} # }