AR
Finding and fixing the sources of error in an AR app that overlays a 3D CAD model on a physical part.
Problem
An AR inspection app overlays a part's 3D CAD model on the real part, so the inspector can compare the two. The overlay landed several millimetres away from where it should be, while the goal was sub-millimetre accuracy, and nobody could say which link in the chain caused the error.
Solution
Before touching the tracker we built a way to measure: a printable ChArUco calibration board, a capture protocol, a validator for the captures and a calibration solver that reports its own uncertainty. A diagnostic Android app records ARCore and Camera2 data, a second path captures from an Intel RealSense depth camera, and an error-budget tool splits the total error into its causes, in millimetres.
The first delivery was a drop-in set of C# files for the client's Unity app. Once per session it reads the phone's factory lens calibration and maps it onto the ARCore camera stream, so the tracker works with the real camera geometry. The formulas are checked against shared test vectors in both Python and C#. Later stages moved on to a model-based tracker in C++ that matches edges and silhouettes, with Python bindings for testing and a native Android library.
Stack
- C++
- OpenCV
- Python
- Unity
- C#
- ARCore
- Android NDK
Result
The client received a camera foundation that was compiled and tested in a real Unity project, a repeatable way to measure the overlay error, and a breakdown of where the millimetres come from instead of guesswork.