|
|
# Aruco Markers
|
|
|
|
|
|
Aruco Markers are printed in DINA2. The following Aruco Marker are created and could be loaded via Python by executing the following function.
|
|
|
|
|
|
```python
|
|
|
from cv2 import aruco
|
|
|
import matplotlib.pyplot as plt
|
|
|
import matplotlib as mpl
|
|
|
|
|
|
def proposal_aruco():
|
|
|
# Create some example Aruco Markers
|
|
|
aruco_dict = aruco.Dictionary_get(aruco.DICT_6X6_250)
|
|
|
|
|
|
fig = plt.figure()
|
|
|
nx = 3
|
|
|
ny = 3
|
|
|
# ratio = [3, 2, 3]
|
|
|
ratio = [2, 1, 2]
|
|
|
gs = mpl.gridspec.GridSpec(ny, nx, width_ratios=ratio, height_ratios=ratio)
|
|
|
gs.update(wspace=0.00, hspace=0.00)
|
|
|
for i in range(1, nx * ny + 1):
|
|
|
if i % 2 == 0:
|
|
|
continue
|
|
|
# ax = fig.add_subplot(ny, nx, i)
|
|
|
ax = plt.subplot(gs[i-1])
|
|
|
img = aruco.drawMarker(aruco_dict, i, 700)
|
|
|
plt.imshow(img, cmap=mpl.cm.gray, interpolation="nearest")
|
|
|
ax.axis("off")
|
|
|
|
|
|
plt.savefig("markers2.pdf")
|
|
|
|
|
|
```
|
|
|
|
|
|
Each Aruco Marker has its own ID. Thus, it can be tracked which Aruco Marker is detected and this is important, since they have different edge sizes. The different edge sizes are done in case the drone flies closer to the markers and still have a visible marker in the center of the image processing. |
|
|
\ No newline at end of file |