macamp0328/photo-signal
Recognizes images and plays music
What's novel
No qr codes, art exhibit supplement
Code Analysis
10 files read · 3 roundsA mobile-first camera app that recognizes printed photographs via client-side DCT-based perceptual hashing (pHash) with perspective rectification, then plays the associated concert audio with crossfading and displays metadata.
Strengths
Genuinely deep computer vision implementation (DCT pHash, homography-based perspective rectification, Sobel/morphological rectangle detection) all written from scratch with performance optimizations (precomputed cosine tables, SWAR popcount, Welford's algorithm, OffscreenCanvas in Web Workers). The recognition pipeline is multi-tiered with adaptive delays, quality gating, cross-concert margin checking, and blur hysteresis — production-grade logic, not a toy.
Weaknesses
The 75KB usePhotoRecognition hook, while well-organized, concentrates a large amount of stateful orchestration logic in a single React hook, making it harder to reason about and test in isolation compared to a more decomposed state machine or reducer approach. The rectangle detection, while impressive, uses a simplified Canny (single-threshold Sobel) and basic flood-fill contour tracing that may be less robust than a proper Canny + RANSAC pipeline for heavily occluded or low-contrast photos.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
1126
Contributors
5
Files
329
Active weeks
24
Repository
Language
TypeScript
Stars
1
Forks
0
License
—