OpenCV's ArUco Marker Detection module adapted for Unity 5.
This project has been developed as part of the master thesis of Erwan Normand and was supported by the ÉTS - École de Technologie Supérieure.
- Retrieve the ArucoUnity package on the Unity Asset Store (available soon). Or you can build the library source code (see the Build section), then copy
<aruco_unity_source_directory>/src/aruco_unity_package/Assets
folder into your Unity project. - Open your Unity project and use the prefabs of the ArucoUnity package.
Use CMake to configurate the ArUco Unity library. By default, it will retrieve and build OpenCV with the ArUco module. Run the following commands, it will take several minutes:
$ cd <aruco_unity_build_directory>
$ cmake <aruco_unity_source_directory>
If you want to provide your own version of OpenCV, add the following options to the above cmake configuration command:
-DAUTO_BUILD_OPENCV=OFF -DOpenCV_DIR=<opencv_install_dir>
. Your OpenCV version must be built with the ArUco module. Follow these instructions: https://github.com/opencv/opencv_contrib
After configuration, open and compile the solution generated by cmake, or run the following commands:
$ cd <aruco_unity_build_directory>
$ cmake --build .
After building, compile the INSTALL
target on the solution generated by cmake, or run the following commands:
$ cd <aruco_unity_build_directory>
$ make install
The library will be copied into the <aruco_unity_source_directory>/bin
and <aruco_unity_source_directory>/lib
folders, and into the <aruco_unity_source_directory>/src/aruco_unity_package/Assets/Plugins
folder.
If you want to build and execute the tests, run the following commands:
$ cd <aruco_unity_build_directory>
$ cmake -DBUILD_TESTS=ON <aruco_unity_source_directory>
$ ctest
All tests should pass.
The documentation of available online:
- The library: https://enormand.github.io/aruco-unity/group__aruco__unity__lib.html
- The Unity package: https://enormand.github.io/aruco-unity/group__aruco__unity__package.html
See the LICENSE file for license rights and limitations (3-clause BSD license).
See the 3rdparty folder for licenses of the third-party dependencies. ArUco Unity makes use of the following projects:
- OpenCV and its ArUco Marker Detection extra module.
- Google Test