Problem
Every screen still is written to disk and enqueued for OCR even when the screen hasn't changed — wasting disk I/O, storage, and OCR quota on identical frames.
Solution
Implement perceptual dHash (difference hash) to compare each new frame against the last saved frame. Frames that are visually identical (Hamming distance below threshold) are skipped before any file write.
Algorithm
- Resize thumbnail to 9×8 using Electron's NativeImage API (no extra deps)
- Compare each pixel's grayscale to its right neighbour → 64-bit BigInt
- Hamming distance: 0 = identical, 10+ = meaningful change
- Threshold is configurable via
deduplication.threshold in settings
Acceptance criteria
Problem
Every screen still is written to disk and enqueued for OCR even when the screen hasn't changed — wasting disk I/O, storage, and OCR quota on identical frames.
Solution
Implement perceptual dHash (difference hash) to compare each new frame against the last saved frame. Frames that are visually identical (Hamming distance below threshold) are skipped before any file write.
Algorithm
deduplication.thresholdin settingsAcceptance criteria
frame-hash.jsexportscomputeDHash,hammingDistance,isSimilarFrame