# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import cv2
import cv2.aruco as aruco
import numpy as np

cv2.__version__

aruco_dict = aruco.Dictionary_get(aruco.DICT_6X6_1000)
mb_dict = aruco.Dictionary_create(4096, 5)

print(len(aruco_dict))

marker_id = 2
pixel_size = 700
img = aruco.drawMarker(aruco_dict, marker_id, pixel_size)

pfn = "marker/marker_6x6_1000_{0:04d} .png".format(marker_id)
print(pfn)
cv2.imwrite(pfn, img)

"various precisions: {0:6.2f} or {0:6.3f}".format(1.4148) 



StarcoderdataJupyterScriptsDedupFiltered