Skip to content

feat: perceptual hashes (aHash/dHash) - #70

Merged
0717lee merged 1 commit into
mainfrom
feat/phash
Jul 31, 2026
Merged

feat: perceptual hashes (aHash/dHash)#70
0717lee merged 1 commit into
mainfrom
feat/phash

Conversation

@0717lee

@0717lee 0717lee commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Adds Image::average_hash(), Image::difference_hash() -> UInt64 and hamming_distance(a, b). Thumbnails use exact region-mean luma (integer accumulation) so hashes are deterministic across backends. 6 new tests: hand-computed half/half aHash (exactly the 32 right bits), 4x upscale invariance, inversion flips all 64 bits, dHash gradient signatures (64 vs 0), brightness-shift invariance, Hamming arithmetic. 157/157 tests passing. Closes #67

@0717lee
0717lee merged commit a5f26a5 into main Jul 31, 2026
1 check passed
@0717lee
0717lee deleted the feat/phash branch July 31, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perceptual hashes (aHash/dHash) + Hamming distance

1 participant