aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/ar_environment/environment_exploitation.md
diff options
context:
space:
mode:
authorThéo de la Hogue2023-06-07 14:34:14 +0200
committerThéo de la Hogue2023-06-07 14:34:14 +0200
commitc4552e04e1271a9210a934233beae5be1943d034 (patch)
treea44041e544bc700976237bfea9058ec06f9a2904 /docs/user_guide/ar_environment/environment_exploitation.md
parentbd9cd27c9d44c072164f564ffffeb22e37106b89 (diff)
downloadargaze-c4552e04e1271a9210a934233beae5be1943d034.zip
argaze-c4552e04e1271a9210a934233beae5be1943d034.tar.gz
argaze-c4552e04e1271a9210a934233beae5be1943d034.tar.bz2
argaze-c4552e04e1271a9210a934233beae5be1943d034.tar.xz
Writing User guide and use cases section.
Diffstat (limited to 'docs/user_guide/ar_environment/environment_exploitation.md')
-rw-r--r--docs/user_guide/ar_environment/environment_exploitation.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/docs/user_guide/ar_environment/environment_exploitation.md b/docs/user_guide/ar_environment/environment_exploitation.md
new file mode 100644
index 0000000..db40385
--- /dev/null
+++ b/docs/user_guide/ar_environment/environment_exploitation.md
@@ -0,0 +1,36 @@
+Environment exploitation
+========================
+
+Once loaded, AR environment assets can be exploited as illustrated below:
+
+```python
+# Access to AR environment ArUco detector passing it a frame where to detect ArUco markers
+ar_environment.aruco_detector.detect_markers(frame)
+
+# Access to an AR environment scene
+my_first_scene = ar_environment.scenes['my first AR scene']
+
+try:
+
+ # Try to estimate AR scene pose from detected markers
+ tvec, rmat, consistent_markers = my_first_scene.estimate_pose(ar_environment.aruco_detector.detected_markers)
+
+ # Project AR scene into camera frame according estimated pose
+ # Optional visual_hfov argument is set to 160° to clip AOI scene according a cone vision
+ aoi2D_scene = my_first_scene.project(tvec, rmat, visual_hfov=160)
+
+ # Draw estimated AR scene axis
+ my_first_scene.draw_axis(frame)
+
+ # Draw AOI2D scene projection
+ aoi2D_scene.draw(frame)
+
+ # Do something with AOI2D scene projection
+ ...
+
+# Catch exceptions raised by estimate_pose and project methods
+except (ArFeatures.PoseEstimationFailed, ArFeatures.SceneProjectionFailed) as e:
+
+ print(e)
+
+```