diff options
author | Théo de la Hogue | 2023-06-21 09:03:41 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-06-21 09:03:41 +0200 |
commit | a594afb5bb17798cd138f1632dcfc53f4eaac09f (patch) | |
tree | ac3527627e4171e6fd545c73e0cc81f49dfe6a94 /docs/user_guide/aruco_markers | |
parent | 0354377903fbc8a828b5735b2d25e1c5bc02c768 (diff) | |
download | argaze-a594afb5bb17798cd138f1632dcfc53f4eaac09f.zip argaze-a594afb5bb17798cd138f1632dcfc53f4eaac09f.tar.gz argaze-a594afb5bb17798cd138f1632dcfc53f4eaac09f.tar.bz2 argaze-a594afb5bb17798cd138f1632dcfc53f4eaac09f.tar.xz |
Replacing frame word by image when it is about drawing or detecting.
Diffstat (limited to 'docs/user_guide/aruco_markers')
-rw-r--r-- | docs/user_guide/aruco_markers/camera_calibration.md | 12 | ||||
-rw-r--r-- | docs/user_guide/aruco_markers/markers_detection.md | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/docs/user_guide/aruco_markers/camera_calibration.md b/docs/user_guide/aruco_markers/camera_calibration.md index 7bff480..1019fc1 100644 --- a/docs/user_guide/aruco_markers/camera_calibration.md +++ b/docs/user_guide/aruco_markers/camera_calibration.md @@ -24,7 +24,7 @@ Then, the calibration process needs to make many different captures of an [ArUco ![Calibration step](../../img/camera_calibration_step.png) -The sample of code below shows how to detect board corners into camera frames, store detected corners then process them to build calibration data and, finally, save it into a JSON file: +The sample of code below shows how to detect board corners into camera images, store detected corners then process them to build calibration data and, finally, save it into a JSON file: ``` python from argaze.ArUcoMarkers import ArUcoMarkersDictionary, ArUcoOpticCalibrator, ArUcoBoard, ArUcoDetector @@ -42,19 +42,19 @@ expected_aruco_board = ArUcoBoard.ArUcoBoard(7, 5, 5, 3, aruco_dictionary) # Create ArUco detector aruco_detector = ArUcoDetector.ArUcoDetector(dictionary=aruco_dictionary, marker_size=3) -# Capture frames from a live Full HD video stream (1920x1080) +# Capture images from a live Full HD video stream (1920x1080) while video_stream.is_alive(): - frame = video_stream.read() + image = video_stream.read() - # Detect all board corners in frame - aruco_detector.detect_board(frame, expected_aruco_board, expected_aruco_board.markers_number) + # Detect all board corners in image + aruco_detector.detect_board(image, expected_aruco_board, expected_aruco_board.markers_number) # If board corners are detected if aruco_detector.board_corners_number > 0: # Draw board corners to show that board tracking succeeded - aruco_detector.draw_board(frame) + aruco_detector.draw_board(image) # Append tracked board data for further calibration processing aruco_optic_calibrator.store_calibration_data(aruco_detector.board_corners, aruco_detector.board_corners_identifier) diff --git a/docs/user_guide/aruco_markers/markers_detection.md b/docs/user_guide/aruco_markers/markers_detection.md index 3851cb4..9a3bc9f 100644 --- a/docs/user_guide/aruco_markers/markers_detection.md +++ b/docs/user_guide/aruco_markers/markers_detection.md @@ -29,14 +29,14 @@ Here is [DetectorParameters](../../../argaze/#argaze.ArUcoMarkers.ArUcoDetector. } ``` -The [ArUcoDetector](../../../argaze/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) processes frame to detect markers and allows to draw detection results onto it: +The [ArUcoDetector](../../../argaze/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) processes image to detect markers and allows to draw detection results onto it: ``` python -# Detect markers into a frame and draw them -aruco_detector.detect_markers(frame) -aruco_detector.draw_detected_markers(frame) +# Detect markers into image and draw them +aruco_detector.detect_markers(image) +aruco_detector.draw_detected_markers(image) -# Get corners position into frame related to each detected markers +# Get corners position into image related to each detected markers for marker_id, marker in aruco_detector.detected_markers.items(): print(f'marker {marker_id} corners: ', marker.corners) |