Near-uniform images (sand close-ups, solid-color shots, blank frames)
have almost no gradient transitions so their dHash has very few set bits.
These match many unrelated photos because "low contrast ≈ low contrast."
- Skip photos whose pHash has <8 or >56 set bits out of 64 before
comparing — they can't be reliably compared by dHash
- Lower default threshold 5 → 3 (≤3 differing bits = genuinely near-
identical, e.g. same photo saved at different compression levels)
- Report "N compared" in scan result so skipped photos are visible
Run "Scan library" to replace existing pairs with clean results.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>