ArucoGenerator

This commit is contained in:
ChK
2026-05-14 13:06:40 +02:00
parent bc904c1db2
commit fc425fc8c0
264 changed files with 577 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
import sys
import cv2
def main():
if len(sys.argv) != 2:
print("Usage: python3 readAruco.py input.jpg")
sys.exit(1)
input_path = sys.argv[1]
output_path = input_path.replace(".jpg", "_recognized.jpg")
output_path = input_path.replace(".JPG", "_recognized.jpg")
img = cv2.imread(input_path)
if img is None:
print("Fehler: Bild konnte nicht geladen werden")
sys.exit(1)
aruco = cv2.aruco
dictionary = aruco.getPredefinedDictionary(aruco.DICT_5X5_250)
parameters = aruco.DetectorParameters_create()
corners, ids, rejected = aruco.detectMarkers(img, dictionary, parameters=parameters)
if ids is not None:
aruco.drawDetectedMarkers(img, corners, ids)
print(f"Gefunden: {len(ids)} Marker")
else:
print("Keine Marker gefunden")
cv2.imwrite(output_path, img)
print("Gespeichert:", output_path)
if __name__ == "__main__":
main()