Building Camera Features in a Snap
summary
Targets Camera2-only apps and shows code that reads YUV_420_888 previews (1920×1080 ≈ 3 MB) instead of RGB888 (6 MB), implements kernel convolution and a Sobel-based edge detector, then runs a Hough transform to find four card edges and confirm a debit card on screen. Performance wins come from no copying of byte arrays, reusing buffers, inlining hot kernels (Kotlin inline), and splitting camera code into a library plus a small sample app for fast iteration and visual unit tests.
AI-written summary · about
chapters (13)
- 0:00Introduction to camera features
- 1:12Camera intent approach
- 2:38Building camera from scratch
- 3:20How camera hardware works
- 4:46Understanding color formats
- 9:20YUV color format explained
- 12:34Camera APIs overview
- 16:28Image processing basics
- 18:56Kernels and edge detection
- 22:03Hough transform for line detection
- 25:14Optimizing frame processing
- 28:12Quick iteration techniques
- 29:56Testing and debugging tips
related talks
41mCreating delightful camera experiences
42mCamera2 API and beyond
35mBuilding Camera Apps on Android Today
39mBuilding Camera and Media Apps That Run Anywhere
31mBuild a universal camera app
27mGetting Started with CameraX
29mGetting to know CameraX
47mCamera 2.0: The New Camera Hardware Interface in Android 4.2
