wenig
This commit is contained in:
@@ -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}')
|
||||
|
||||
|
||||
# ------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user