- Install the Machine Vision Toolbox (MVTB) by opening MATLAB_AprilTag3 GitHub's file
MVTB-4.3.mltbx
from MATLAB GUI, or download the latest version at:
https://petercorke.com/download/28/mvtb/1109/mvtb-4-3.mltbx - Create auxiliary environmental variables from command line:
MLTBX_DIR="$HOME/Documents/MATLAB/Add-Ons/Toolboxes" MVTB="$MLTBX_DIR/Machine Vision Toolbox for MATLAB" MVTB_MEX="$MVTB/vision/mex" MVTB_APRILTAG="$MVTB_MEX/apriltag"
- Download MATLAB_AprilTag3 GitHub's file
AprilTag3.tar.gz
(the AprilTag3 source code) and uncompress it, or download the latest version at:
https://codeload.github.com/AprilRobotics/apriltags/zip/master - Rename the uncompressed directory to
apriltag
to match the wrapper path. - Copy latter
apriltag
directory toMVTB_MEX
by running from command line:
cp -pr apriltag "$MVTB_MEX"
- Download MATLAB_AprilTag3 GitHub's directory
apriltag
atMachine Vision Toolbox for MATLAB/vision/mex/apriltag/
and copy it intoMVTB_MEX
directory:cp -pr apriltag "$MVTB_MEX"
- Compile the AprilTag library:
cd "$MVTB_APRILTAG" make sudo make install
- Download MATLAB_AprilTag3 GitHub's directory
Machine Vision Toolbox for MATLAB
and copy it intoMLTBX_DIR
directory:cp -pr "Machine Vision Toolbox for MATLAB" "$MLTBX_DIR"
- Compile the MEX file:
cd "$MVTB_MEX" mex apriltags.c -I"$MVTB_APRILTAG" -I"$MVTB_APRILTAG"/common -L"$MVTB_APRILTAG" -lapriltag
- Compile the remaining MVTB libraries from MATLAB's command line:
make
N.B.: MATLAB_AprilTag3 detector only works with "tag36h11" tag family!
-
Download and uncompress MATLAB_AprilTag3 GitHub's file
tag36h11.tar.gz
gunzip -dc tag36h11.tar.gz | tar xvf -
-
Open a PNG tag file using an appropriate image editor, e.g., Inkscape.
-
Choose the tag dimensions before printing.
-
Enjoy! =})