Introduction to Aruco Markers
- General Description goes here
Theory and comments on open cv are found at the image_processing package description
How Aruco Markers are created
Aruco Markers are printed in DINA2. The following Aruco Marker are created and could be loaded via Python by executing the following function. Please note, that the final results are customized, but this should serve as an example:image_aruco.py
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.
Below is an image of which Aruco Markers are used. This is as said important to know each ID. The edge sizes are saved to the according aruco marker id in a dictionary wihtin the image processing node. Of course given the same aruco dictionary
aruco.DICT_6X6_250 as given in code above will be used.