Last active
August 29, 2015 14:12
-
-
Save OTL/83723bb23c38e58b926c to your computer and use it in GitHub Desktop.
ArUco用マーカーを一斉に作る ref: http://qiita.com/OTL/items/798e21ba54c57693eab8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# create aruco markers in one jpeg file | |
# requirement: imagemagick, aruco | |
INITIAL_MARKER_ID=100 | |
MARKER_NUM=20 | |
MARKER_PIXEL_SIZE=100 | |
OUTPUT_FILE=output.jpg | |
MARKER_BORDER=50 | |
OUTPUT_DIR=/tmp/aruco_tpm | |
export LD_LIBRARY_PATH=/usr/local/lib | |
mkdir -p "${OUTPUT_DIR}" | |
pushd "${OUTPUT_DIR}" | |
rm -f *.jpg | |
for i in $(seq ${MARKER_NUM}) | |
do | |
marker_id=$((i + ${INITIAL_MARKER_ID})) | |
echo $marker_id | |
aruco_create_marker "${marker_id}" "${marker_id}.jpg" "${MARKER_PIXEL_SIZE}" | |
done | |
popd | |
montage -border "${MARKER_BORDER}" -tile 4x5 -background white -bordercolor white ${OUTPUT_DIR}/*.jpg "${OUTPUT_FILE}" | |
display "${OUTPUT_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment