Last active
November 13, 2022 09:53
-
-
Save Merwanski/5efe804ec43ba16340889a00ab5250dd to your computer and use it in GitHub Desktop.
aruco marker generator
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
import cv2 | |
import cv2.aruco as aruco | |
# Select type of aruco marker (size) | |
aruco_dict = aruco.Dictionary_get(aruco.DICT_5X5_1000) | |
# Create an image from the marker | |
# second param is the ID number | |
# last param is the image size | |
img = aruco.drawMarker(aruco_dict, 2, 700) | |
cv2.imwrite("test_marker.jpg", img) | |
# Display the image | |
cv2.imshow('frame', img) | |
# Exit | |
cv2.waitKey(0) | |
cv2.destroyAllWindows() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment