This commit is contained in:
chk
2026-06-19 06:44:46 +02:00
parent 773e32c51c
commit 908eb19c8d
20 changed files with 11436 additions and 9 deletions

View File

@@ -351,6 +351,12 @@ def main():
required=True
)
parser.add_argument(
'--saveDebugImage',
action='store_true',
help='Speichert ein Debug-JPG mit eingezeichneten Marker-Rahmen'
)
args = parser.parse_args()
out_dir = resolve_path(args.outDir)
@@ -404,6 +410,9 @@ def main():
detector_tuple
)
# ids_raw: original numpy array für drawDetectedMarkers
ids_raw = ids
detections = []
# --------------------------------------------------------
@@ -601,6 +610,25 @@ def main():
print(f'Saved: {out_json}')
# --------------------------------------------------------
# Debug-Bild mit Marker-Rahmen
# --------------------------------------------------------
if args.saveDebugImage:
debug_img = image.copy()
if corners_list and ids_raw is not None:
cv2.aruco.drawDetectedMarkers(debug_img, corners_list, ids_raw)
debug_path = os.path.join(
out_dir,
f'{input_base}_debug.jpg'
)
cv2.imwrite(debug_path, debug_img)
print(f'Saved debug: {debug_path}')
# ------------------------------------------------------------