Live edge-detection overlay while aiming #4

Closed
opened 2026-07-13 18:38:18 +02:00 by sam · 0 comments
Owner

Show the detected document quadrilateral as a live overlay on the camera preview before capture (like Microsoft Lens), so the user can frame the document and see that it will be cropped correctly.

Approach: add a CameraX ImageAnalysis use case, run EdgeDetector on downscaled frames on a background thread, and draw the resulting quad over the PreviewView (mapping analysis coordinates to view coordinates). Throttle to keep it smooth.

Show the detected document quadrilateral as a **live overlay** on the camera preview *before* capture (like Microsoft Lens), so the user can frame the document and see that it will be cropped correctly. **Approach:** add a CameraX `ImageAnalysis` use case, run `EdgeDetector` on downscaled frames on a background thread, and draw the resulting quad over the `PreviewView` (mapping analysis coordinates to view coordinates). Throttle to keep it smooth.
sam added the enhancement label 2026-07-13 18:39:51 +02:00
sam added this to the (deleted) milestone 2026-07-13 18:39:54 +02:00
sam closed this issue 2026-07-13 19:08:50 +02:00
sam modified the milestone from (deleted) to v0.2.0 2026-07-13 19:10:58 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/paperscan#4