Sharpness Ranking & Duplicate Detection
Rank a shoot by focus accuracy and group near-identical frames, entirely in your browser.
All processing runs in your browser. No file leaves this device.
Sharpness is scored by the variance of the Laplacian response. A frame in focus carries rich high-frequency detail, so the Laplacian response spreads widely; defocus or camera shake flattens those frequencies and the variance collapses. It is deterministic, it is fast, and it needs no model.
One honest limit: a shallow-depth-of-field portrait with a heavily blurred background scores low overall even when the subject itself is tack sharp. Use the ranking to sort and shortlist, not as a verdict.
Duplicate detection uses a DCT perceptual hash. The image is reduced to a 32×32 grey field, the low-frequency 8×8 block of its DCT is compared against its own median, and the result is a 64-bit fingerprint. Because only low frequencies participate, the hash survives scaling, mild cropping and compression changes — which is exactly what you need to catch the near-identical frames in a burst. The DC term is excluded so that an underexposed frame and a correctly exposed one of the same composition still register as duplicates.