aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user_guide')
-rw-r--r--docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md102
-rw-r--r--docs/user_guide/aruco_markers_pipeline/aoi_frame.md64
2 files changed, 102 insertions, 64 deletions
diff --git a/docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md b/docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md
new file mode 100644
index 0000000..47dc73c
--- /dev/null
+++ b/docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md
@@ -0,0 +1,102 @@
+Define a 3D AOI as a frame
+==========================
+
+When an 3D AOI of the scene contains others coplanar 3D AOI, like a screen with GUI elements displayed on, it is better to described them as 2D AOI inside 2D coordinates system related to the containing 3D AOI.
+
+## Add ArFrame to ArUcoScene
+
+The [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) class defines a rectangular area where timestamped gaze positions are projected in and inside which they need to be analyzed.
+
+Here is the previous extract where "MyScreen" AOI is defined as a frame into [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) configuration:
+
+```json
+{
+ "name": "My FullHD camera",
+ "size": [1920, 1080],
+ ...
+ "scenes": {
+ "MyScene" : {
+ "aruco_markers_group": {
+ ...
+ },
+ "layers": {
+ "MyLayer": {
+ "aoi_scene": {
+ "MyScreen": [[2.5, 2.5, -0.5], [37.5, 2.5, -0.5], [37.5, 27.5, -0.5], [2.5, 27.5, -0.5]]
+ }
+ }
+ },
+ "frames": {
+ "MyScreen": {
+ "size": [350, 250],
+ "layers": {
+ "MyLayer": {
+ "aoi_scene": {
+ "BlueTriangle": [[100, 50], [250, 50], [175, 200]]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ...
+}
+```
+Now, let's understand the meaning of each JSON entry.
+
+### *frames*
+
+An [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) instance can contains multiples [ArFrames](../../argaze.md/#argaze.ArFeatures.ArFrame) stored by name.
+
+### MyScreen
+
+The name of a 3D AOI **and** of an [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame). Basically useful for visualisation purpose.
+
+!!! warning "AOI / Frame names policy"
+
+ An [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) layer 3D AOI is defined as an [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) frame, **provided they have the same name**.
+
+!!! warning "Layer name policy"
+
+ An [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) frame layer is projected into [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) layer, **provided they have the same name**.
+
+!!! note
+
+ [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) frame layers are projected into their dedicated [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) layers when the JSON configuration file is loaded.
+
+## Pipeline execution
+
+### Map ArUcoCamera image into ArUcoScene frames
+
+After camera image is passed to [ArUcoCamera.watch](../../argaze.md/#argaze.ArFeatures.ArCamera.watch) method, it is possible to apply a perpective transformation in order to project watched image into each [ArUcoScenes](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) [frames background](../../argaze.md/#argaze.ArFeatures.ArFrame) image.
+
+```python
+# Assuming that Full HD (1920x1080) video stream or file is opened
+...
+
+# Assuming that the video reading is handled in a looping code block
+...:
+
+ # Capture image from video stream of file
+ image = video_capture.read()
+
+ # Detect ArUco markers, estimate scene pose then, project 3D AOI into camera frame
+ aruco_camera.watch(image)
+
+ # Map watched image into ArUcoScenes frames background
+ aruco_camera.map()
+```
+
+### Display each ArUcoScenes frames
+
+All [ArUcoScenes](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) frames image can be displayed as any [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame).
+
+```python
+ ...
+
+ # Display all ArUcoScenes frames
+ for frame in aruco_camera.scene_frames:
+
+ ... frame.image()
+``` \ No newline at end of file
diff --git a/docs/user_guide/aruco_markers_pipeline/aoi_frame.md b/docs/user_guide/aruco_markers_pipeline/aoi_frame.md
deleted file mode 100644
index 6b87d52..0000000
--- a/docs/user_guide/aruco_markers_pipeline/aoi_frame.md
+++ /dev/null
@@ -1,64 +0,0 @@
-Define an AOI as a frame
-========================
-
-
-
-
-## Add ArFrame to ArUcoScene
-
-The [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) class defines a rectangular area where timestamped gaze positions are projected in and inside which they need to be analyzed. An [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) instance can contains multiples [ArFrames](../../argaze.md/#argaze.ArFeatures.ArFrame).
-
-Here is the previous extract where the "GrayRectangle" AOI is defined as a frame into the [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) configuration:
-
-```json
-{
- "name": "My FullHD camera",
- "size": [1920, 1080],
- ...
- "scenes": {
- "MyScene" : {
- "aruco_markers_group": {
- ...
- },
- "layers": {
- "MyLayer": {
- "aoi_scene": {
- "YellowSquare": [[6.2, -7.275252, 25.246159], [31.2, -7.275252, 25.246159], [31.2, 1.275252, 1.753843], [6.2, 1.275252, 1.753843]],
- "GrayRectangle": [[2.5, 2.5, -0.5], [37.5, 2.5, -0.5], [37.5, 27.5, -0.5], [2.5, 27.5, -0.5]]
- }
- }
- },
- "frames": {
- "GrayRectangle": {
- "size": [350, 250],
- "layers": {
- "MyLayer": {
- "aoi_scene": {
- "BlueTriangle": [[100, 50], [250, 50], [175, 200]]
- }
- }
- }
- }
- }
- }
- }
- ...
-}
-```
-Now, let's understand the meaning of each JSON entry.
-
-### "GrayRectangle"
-
-The name of the AOI and the [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame). Basically useful for visualisation purpose.
-
-!!! warning "Frame name policy"
-
- An [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) layer AOI is defined as an [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) frame, **provided they have the same name**.
-
-!!! warning "Layer name policy"
-
- An [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) frame layer is projected into [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) layer, **provided they have the same name**.
-
-!!! note
-
- [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) frame layers are projected into their dedicated [ArUcoScene](../../argaze.md/#argaze.ArUcoMarkers.ArUcoScene) layers when the JSON configuration file is loaded. \ No newline at end of file