ArucoUnity Architecture
ArucoUnity is made of three parts:
- A plugin that wraps into a C interface the aruco, calib3d and ccalib modules of OpenCV.
- A C# interface (ArucoUnity.Plugin namespace) using the plugin to reproduce the OpenCV modules classes and functions.
- Unity C# scripts to calibrate cameras and to track markers directly in the editor with good performances.
You can code directly with the OpenCV C# equivalent interface but we advise you to work with and extend the Unity scripts. The Unity scripts were originally one camera display and tracking script and one calibration script. For performances and to support multiple types of camera (fisheye, stereoscopic) we decoupled these scripts (Fig.1).
Fig.1: Overview class diagram of the Unity scripts.