Dropbox implements augmented camera preview for Android document scanner using ML-based edge detection
Implementing real-time document edge detection on the fragmented Android hardware landscape required processing each camera frame within 80ms — a constraint that the standard NV21-to-RGBA conversion method, taking 300-500ms per frame, could not meet.
Converting NV21 camera frames to RGBA bitmaps using the standard Java method took 300-500ms per 1920x1080 frame, making it unacceptable for a pipeline requiring under 80ms per cycle.
Using RenderScript intrinsics reduced frame conversion to 10-25ms; the TextureView approach achieved 5-15ms for the 200x200 input; the complete system achieves at least 15 FPS on most Android devices.
Show all 6 reported metrics
Frequently asked questions
What did this team achieve with this AI workflow?
Using RenderScript intrinsics reduced frame conversion to 10-25ms; the TextureView approach achieved 5-15ms for the 200x200 input; the complete system achieves at least 15 FPS on most Android devices.
What tools did this team use?
RenderScript, ScriptIntrinsicResize, ScriptIntrinsicYuvtoRGB, JNI, TextureView.
What results were reported?
Frame conversion time (standard method): 300-500 ms; frame conversion time (RenderScript): 10-25 ms; TextureView getBitmap processing time: 5-15ms; Document detector call time: 20-100ms (source-reported, not independently verified).
What failed first in this deployment?
Converting NV21 camera frames to RGBA bitmaps using the standard Java method took 300-500ms per 1920x1080 frame, making it unacceptable for a pipeline requiring under 80ms per cycle.
How is this data entry ops AI workflow structured?
Camera frame arrives → Frame conversion to RGBA → ML document detection → Quad coordinates returned → Augmented overlay rendered.