/aruco-unity

OpenCV ArUco module for Unity 5.

Primary LanguageC#OtherNOASSERTION

ArUco Unity

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.

Usage

  1. 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.
  2. Open your Unity project and use the prefabs of the ArucoUnity package.

Build

Configuration

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

Building

After configuration, open and compile the solution generated by cmake, or run the following commands:

$ cd <aruco_unity_build_directory>
$ cmake --build .

Installation

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.

Tests

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.

Documentation

The documentation of available online:

Licenses

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: