diff options
author | Théo de la Hogue | 2024-01-23 14:54:30 +0100 |
---|---|---|
committer | Théo de la Hogue | 2024-01-23 14:54:30 +0100 |
commit | d904b99cc969c977f911d36cfeb2279544c528e5 (patch) | |
tree | ff23c5f0a3279581a86aafe98f86a2894d9f00f1 /docs/user_guide/aruco_markers_pipeline | |
parent | 8d0a2f7c4f3483aac55603a141e23e1dcc5b0dca (diff) | |
download | argaze-d904b99cc969c977f911d36cfeb2279544c528e5.zip argaze-d904b99cc969c977f911d36cfeb2279544c528e5.tar.gz argaze-d904b99cc969c977f911d36cfeb2279544c528e5.tar.bz2 argaze-d904b99cc969c977f911d36cfeb2279544c528e5.tar.xz |
Defing PipelineStepObject and PipelineStepMethod to assess time execution. Removing exception managment to let the user catch them into the script.
Diffstat (limited to 'docs/user_guide/aruco_markers_pipeline')
-rw-r--r-- | docs/user_guide/aruco_markers_pipeline/advanced_topics/scripting.md | 26 | ||||
-rw-r--r-- | docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md | 30 |
2 files changed, 37 insertions, 19 deletions
diff --git a/docs/user_guide/aruco_markers_pipeline/advanced_topics/scripting.md b/docs/user_guide/aruco_markers_pipeline/advanced_topics/scripting.md index c79c8b5..99f52ee 100644 --- a/docs/user_guide/aruco_markers_pipeline/advanced_topics/scripting.md +++ b/docs/user_guide/aruco_markers_pipeline/advanced_topics/scripting.md @@ -78,30 +78,26 @@ for name, aruco_scene in aruco_camera.scenes.items(): # Assuming that timestamped images are available ...: - # Watch image with ArUco camera - detection_time, projection_time, exception = aruco_camera.watch(timestamp, image) + try: - # Do something with pipeline times - ... + # Watch image with ArUco camera + aruco_camera.watch(timestamp, image) # Do something with pipeline exception - if exception: + except Exception as e: + ... + + # Do something with detected_markers + ... aruco_camera.aruco_detector.detected_markers + ``` Let's understand the meaning of each returned data. -### *detection_time* - -ArUco marker detection time in ms. - -### *projection_time* - -Scenes projection time in ms. - -### *exception* +### *aruco_camera.aruco_detector.detected_markers* -A [python Exception](https://docs.python.org/3/tutorial/errors.html#exceptions) object raised during pipeline execution. +A dictionary containing all detected markers provided by [ArUcoDetector](../../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector) class. ## Setup ArUcoCamera image parameters diff --git a/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md b/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md index 43bb64e..5b740dc 100644 --- a/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md +++ b/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md @@ -97,12 +97,23 @@ The usual [ArFrame visualisation parameters](../gaze_analysis_pipeline/visualisa Pass each camera image to [ArUcoCamera.watch](../../argaze.md/#argaze.ArFeatures.ArCamera.watch) method to execute the whole pipeline dedicated to ArUco markers detection, scene pose estimation and 3D AOI projection. +!!! warning "Mandatory" + + [ArUcoCamera.watch](../../argaze.md/#argaze.ArFeatures.ArCamera.watch) method must be called from a *try* block to catch pipeline exceptions. + ```python # Assuming that Full HD (1920x1080) timestamped images are available ...: - # Detect ArUco markers, estimate scene pose then, project 3D AOI into camera frame - aruco_camera.watch(timestamp, image) + try: + + # Detect ArUco markers, estimate scene pose then, project 3D AOI into camera frame + aruco_camera.watch(timestamp, image) + + # Do something with pipeline exception + except Exception as e: + + ... # Display ArUcoCamera frame image to display detected ArUco markers, scene pose, 2D AOI projection and ArFrame visualisation. ... aruco_camera.image() @@ -114,12 +125,23 @@ As mentioned above, [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCame Particularly, timestamped gaze positions can be passed one by one to [ArUcoCamera.look](../../argaze.md/#argaze.ArFeatures.ArFrame.look) method to execute the whole pipeline dedicated to gaze analysis. +!!! warning "Mandatory" + + [ArUcoCamera.look](../../argaze.md/#argaze.ArFeatures.ArFrame.look) method must be called from a *try* block to catch pipeline exceptions. + ```python # Assuming that timestamped gaze positions are available ... - # Look ArUcoCamera frame at a timestamped gaze position - aruco_camera.look(timestamp, gaze_position) + try: + + # Look ArUcoCamera frame at a timestamped gaze position + aruco_camera.look(timestamp, gaze_position) + + # Do something with pipeline exception + except Exception as e: + + ... ``` !!! note "" |