The ArUco library for OpenCV is a lightweight C++ wrapper for Augmented Reality applications. Its simple, efficient and versatile enough to detect hundreds of unique AR markers.
- Setup OpenCV on your PC. Get the installation instructions here
- Basic CMake knowledge. For starters, first two steps of the official documentation will be enough.
Installing ArUco Library
The latest release package can be found on sourceforge. Now you need to extract and compile the source code using cmake(the instructions mentioned below work on linux; for windows you can use use cmake-GUI).
Note that the official documentation recommends installing it in a working directory, rather than with sudo or admin privileges. Supposing you downloaded it in Downloads, open terminal — note that ‘xxx’ is downloaded zip library version
cmake .. -DCMAKE_INSTALL_PREFIX=<pathToInstall>
Here the pathToInstall will be preferred location. I kept it in the same folder as
To make sure that ArUco finds the correct library files, generate a config file(refer this blog for more).
sudo gedit /etc/ld.so.conf.d/aruco.conf
# Add the following line and save it:
# /usr/local/lib# Now, in your terminal, execute:
Note that since the installation is not global you’ve to always include pathToInstall in CMakeLists.txt file of your project as
# Adding local ArUco Library
That’s it. Found this article helpful? If so, please like the article below. Or leave a comment if you have any questions.