SWIG generated Python wrappers for ArUco library. Works with OpenCV Python module cv2 resp. numpy array data types.
Tested on Linux Mint 17.1 x86_64, OpenCV 3.2.0, ArUco 2.0.19, Python 2.7.6 and NumPy 1.10.4
- Install / compile OpenCV >= 2.4.9 with Python2 support
- download, compile and install ArUco: http://www.uco.es/investiga/grupos/ava/node/26,
also install
libeigenheaders for ArUco 2.0:sudo apt-get install libeigen3-dev - Install swig3:
sudo apt-get install swig3.0for Debian/Ubuntu like systems - Install NumPy
sudo pip install numpy(maybe you already need it for OpenCV Python support) or install via system packet manager - run
./swigbuild.sh: it compiles the shared library (_aruco.so) and generates Python wrappers (aruco.py) - run
sudo python setup.py installto install the library globally
Tested on Ubuntu 14.04, OpenCV3.3, Python3.4, Aruco 2.0.19
- Install / compile OpenCV >= 2.4.9 with Python3 support. Install-OpenCV script helps to install the latest version.
- download, compile and install ArUco: http://www.uco.es/investiga/grupos/ava/node/26:
also install
libeigenheaders for ArUco 2.0:sudo apt-get install libeigen3-dev. Note that the instructions are wrong on the readme, the recommended commands needed are:cd aruco; mkdir build; cd build; cmake ..; make -j4; sudo checkinstall. Choose 2 and choose "aruco" and the package will be installed as Aruco for easy uninstall or sharing the deb installer file. - Install swig3:
sudo apt-get install swig3.0for Debian/Ubuntu like systems. On 14.04 and other older systems you will need to go to "Software Sources" and check backports in the Updates tab, and reload before installing. - Install NumPy
sudo pip3 install numpy(maybe you already need it for OpenCV Python support) or install via system package manager. - run
./swigbuild.sh python3: it compiles the shared library (_aruco.so) and generates Python3 wrappers (aruco.py) - run
sudo python3 setup.py installto install the library globally
open a prompt in example/ and run: python ./example.py or python3 ./example.py for Python3 (depends on your default Python interpreter)
If the Python doesn't find some shared objects, add the library location to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH
This wrapper is totally in beta state. I just tested some basic functions with example/example.py.
Please report errors and problems.