aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo De La Hogue2023-09-23 07:22:23 +0200
committerTheo De La Hogue2023-09-23 07:22:23 +0200
commit23fa1a7835b3c7cfd976b1d160878289b1f0657c (patch)
treeacc107a975536f5d57ae269063efe7b613e6bc84
parentb947573f7dbccb5b2b13b64677192145f2dbb864 (diff)
downloadargaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.zip
argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.gz
argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.bz2
argaze-23fa1a7835b3c7cfd976b1d160878289b1f0657c.tar.xz
Fixing code annotation. Removing useless documentation section. Fixing documentation cross reference.
-rw-r--r--docs/user_guide/ar_environment/environment_exploitation.md36
-rw-r--r--docs/user_guide/ar_environment/environment_setup.md77
-rw-r--r--docs/user_guide/ar_environment/introduction.md6
-rw-r--r--docs/user_guide/areas_of_interest/aoi_scene_description.md83
-rw-r--r--docs/user_guide/areas_of_interest/aoi_scene_projection.md22
-rw-r--r--docs/user_guide/areas_of_interest/introduction.md2
-rw-r--r--docs/user_guide/aruco_markers/dictionary_selection.md17
-rw-r--r--docs/user_guide/aruco_markers/introduction.md15
-rw-r--r--docs/user_guide/aruco_markers/markers_creation.md17
-rw-r--r--docs/user_guide/aruco_markers/markers_detection.md47
-rw-r--r--docs/user_guide/aruco_markers/markers_pose_estimation.md20
-rw-r--r--docs/user_guide/aruco_markers/markers_scene_description.md146
-rw-r--r--docs/user_guide/aruco_markers_pipeline/advanced_topics/optic_parameters_calibration.md8
-rw-r--r--docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md6
-rw-r--r--docs/user_guide/aruco_markers_pipeline/introduction.md12
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md2
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/aoi_analysis.md4
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/introduction.md2
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md2
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md2
-rw-r--r--docs/user_guide/gaze_features/gaze_movement.md (renamed from docs/user_guide/gaze_analysis/gaze_movement.md)0
-rw-r--r--docs/user_guide/gaze_features/gaze_position.md (renamed from docs/user_guide/gaze_analysis/gaze_position.md)0
-rw-r--r--docs/user_guide/gaze_features/introduction.md (renamed from docs/user_guide/gaze_analysis/introduction.md)0
-rw-r--r--docs/user_guide/gaze_features/scan_path.md (renamed from docs/user_guide/gaze_analysis/scan_path.md)0
-rw-r--r--mkdocs.yml18
-rw-r--r--src/argaze/ArFeatures.py8
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoCamera.py6
-rw-r--r--src/argaze/AreaOfInterest/AOI2DScene.py9
28 files changed, 38 insertions, 529 deletions
diff --git a/docs/user_guide/ar_environment/environment_exploitation.md b/docs/user_guide/ar_environment/environment_exploitation.md
deleted file mode 100644
index 9e4b236..0000000
--- a/docs/user_guide/ar_environment/environment_exploitation.md
+++ /dev/null
@@ -1,36 +0,0 @@
-Environment exploitation
-========================
-
-Once loaded, [ArCamera](../../argaze.md/#argaze.ArFeatures.ArCamera) assets can be exploited as illustrated below:
-
-```python
-# Access to AR environment ArUco detector passing it a image where to detect ArUco markers
-ar_camera.aruco_detector.detect_markers(image)
-
-# Access to an AR environment scene
-my_first_scene = ar_camera.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_camera.aruco_detector.detected_markers)
-
- # Project AR scene into camera image 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(image)
-
- # Draw AOI2D scene projection
- aoi2D_scene.draw(image)
-
- # Do something with AOI2D scene projection
- ...
-
-# Catch exceptions raised by estimate_pose and project methods
-except (ArFeatures.PoseEstimationFailed, ArFeatures.SceneProjectionFailed) as e:
-
- print(e)
-
-```
diff --git a/docs/user_guide/ar_environment/environment_setup.md b/docs/user_guide/ar_environment/environment_setup.md
deleted file mode 100644
index 1f26d26..0000000
--- a/docs/user_guide/ar_environment/environment_setup.md
+++ /dev/null
@@ -1,77 +0,0 @@
-Environment Setup
-=================
-
-[ArCamera](../../argaze.md/#argaze.ArFeatures.ArCamera) setup is loaded from JSON file format.
-
-Each [ArCamera](../../argaze.md/#argaze.ArFeatures.ArCamera) defines a unique [ArUcoDetector](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) dedicated to detection of markers from a specific [ArUcoMarkersDictionary](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersDictionary) and with a given size. However, it is possible to load multiple [ArScene](../../argaze.md/#argaze.ArFeatures.ArScene) into a same [ArCamera](../../argaze.md/#argaze.ArFeatures.ArCamera).
-
-Here is JSON environment file example where it is assumed that mentioned .obj files are located relatively to the environment file on disk.
-
-```
-{
- "name": "my AR environment",
- "aruco_detector": {
- "dictionary": {
- "name": "DICT_APRILTAG_16h5"
- }
- "marker_size": 5,
- "optic_parameters": {
- "rms": 0.6,
- "dimensions": [
- 1920,
- 1080
- ],
- "K": [
- [
- 1135,
- 0.0,
- 956
- ],
- [
- 0.0,
- 1135,
- 560
- ],
- [
- 0.0,
- 0.0,
- 1.0
- ]
- ],
- "D": [
- 0.01655492265003404,
- 0.1985524264972037,
- 0.002129965902489484,
- -0.0019528582922179365,
- -0.5792910353639452
- ]
- },
- "parameters": {
- "cornerRefinementMethod": 3,
- "aprilTagQuadSigma": 2,
- "aprilTagDeglitch": 1
- }
- },
- "scenes": {
- "my first AR scene" : {
- "aruco_markers_group": "./first_scene/markers.obj",
- "aoi_scene": "./first_scene/aoi.obj",
- "angle_tolerance": 15.0,
- "distance_tolerance": 2.54
- },
- "my second AR scene" : {
- "aruco_markers_group": "./second_scene/markers.obj",
- "aoi_scene": "./second_scene/aoi.obj",
- "angle_tolerance": 15.0,
- "distance_tolerance": 2.54
- }
- }
-}
-```
-
-```python
-from argaze import ArFeatures
-
-# Load AR environment
-ar_camera = ArFeatures.ArCamera.from_json('./environment.json')
-```
diff --git a/docs/user_guide/ar_environment/introduction.md b/docs/user_guide/ar_environment/introduction.md
deleted file mode 100644
index b19383b..0000000
--- a/docs/user_guide/ar_environment/introduction.md
+++ /dev/null
@@ -1,6 +0,0 @@
-AR environment setup
-====================
-
-ArGaze toolkit eases ArUco and AOI management in a single AR environment setup.
-
-This section refers to [ArFeatures](../../argaze.md/#argaze.ArFeatures).
diff --git a/docs/user_guide/areas_of_interest/aoi_scene_description.md b/docs/user_guide/areas_of_interest/aoi_scene_description.md
deleted file mode 100644
index b96c1e0..0000000
--- a/docs/user_guide/areas_of_interest/aoi_scene_description.md
+++ /dev/null
@@ -1,83 +0,0 @@
----
-title: AOI scene description
----
-
-AOI scene description
-=====================
-
-## 2D description
-
-An AOI scene can be described in 2D dimension using an [AOI2DScene](../../argaze.md/#argaze.AreaOfInterest.AOI2DScene) from a dictionary description.
-
-``` dict
-{
- "tracking": [[672.0, 54.0], [1632.0, 54.0], [1632.0, 540.0], [672.0, 540.0]],
- "system": [[0.0, 54.0], [672.0, 54.0], [672.0, 540.0], [0.0, 540.0]],
- "communications": [[0.0, 594.0], [576.0, 594.0], [576.0, 1080.0], [0.0, 1080.0]],
- "resources": [[576.0, 594.0], [1632.0, 594.0], [1632.0, 1080.0], [576.0, 1080.0]]
-}
-...
-```
-
-Here is a sample of code to show the loading of an [AOI2DScene](../../argaze.md/#argaze.AreaOfInterest.AOI2DScene) from a dictionary description:
-
-
-``` python
-from argaze.AreaOfInterest import AOI2DScene
-
-# Load an AOI2D scene from dictionary
-aoi_2d_scene = AOI2DScene.AOI2DScene(aoi_scene_dictionary)
-```
-
-## 3D description
-
-An AOI scene can be described in 3D dimension using an [AOI3DScene](../../argaze.md/#argaze.AreaOfInterest.AOI3DScene) built from a 3D model with all AOI as 3D planes and loaded through OBJ file format.
-Notice that plane normals are not needed and planes are not necessary 4 vertices shapes.
-
-``` obj
-o PIC_ND
-v 6.513238 -27.113548 -25.163900
-v 22.994461 -27.310783 -24.552130
-v 6.718690 -6.467261 -26.482569
-v 23.252594 -6.592890 -25.873484
-f 1 2 4 3
-o PIC_ND_Aircraft
-v 6.994747 -21.286463 -24.727146
-v 22.740919 -21.406120 -24.147078
-v 7.086208 -12.096219 -25.314123
-v 22.832380 -12.215876 -24.734055
-f 5 6 8 7
-o PIC_ND_Wind
-v 7.086199 -11.769333 -25.335127
-v 12.081032 -11.807289 -25.151123
-v 7.115211 -8.854101 -25.521320
-v 12.110044 -8.892057 -25.337317
-f 9 10 12 11
-o PIC_ND_Waypoint
-v 17.774197 -11.819057 -24.943428
-v 22.769030 -11.857013 -24.759424
-v 17.803209 -8.903825 -25.129622
-v 22.798042 -8.941781 -24.945618
-f 13 14 16 15
-...
-o Thrust_Lever
-v 19.046124 15.523837 4.774072
-v 18.997263 -0.967944 5.701000
-v 18.988382 15.923470 -13.243046
-v 18.921808 -0.417994 -17.869610
-v 19.032232 19.241346 -3.040264
-v 19.020988 6.392717 5.872663
-v 18.945322 6.876906 -17.699480
-s off
-f 185 190 186 188 191 187 189
-...
-```
-
-Here is a sample of code to show the loading of an [AOI3DScene](../../argaze.md/#argaze.AreaOfInterest.AOI3DScene) from an OBJ file description:
-
-``` python
-from argaze.AreaOfInterest import AOI3DScene
-
-# Load an AOI3D scene from OBJ file
-aoi_3d_scene = AOI3DScene.AOI3DScene.from_obj('./aoi_scene.obj')
-```
diff --git a/docs/user_guide/areas_of_interest/aoi_scene_projection.md b/docs/user_guide/areas_of_interest/aoi_scene_projection.md
deleted file mode 100644
index f348c6c..0000000
--- a/docs/user_guide/areas_of_interest/aoi_scene_projection.md
+++ /dev/null
@@ -1,22 +0,0 @@
----
-title: AOI scene projection
----
-
-AOI scene projection
-====================
-
-An [AOI3DScene](../../argaze.md/#argaze.AreaOfInterest.AOI3DScene) can be rotated and translated according to a pose estimation before to project it onto camera image as an [AOI2DScene](../../argaze.md/#argaze.AreaOfInterest.AOI2DScene).
-
-![AOI projection](../../img/aoi_projection.png)
-
-``` python
-...
-
-# Assuming pose estimation is done (tvec and rmat)
-
-# Project AOI 3D scene according pose estimation and optic parameters
-aoi2D_scene = aoi3D_scene.project(tvec, rmat, optic_parameters.K)
-
-# Draw AOI 2D scene
-aoi2D_scene.draw(image)
-```
diff --git a/docs/user_guide/areas_of_interest/introduction.md b/docs/user_guide/areas_of_interest/introduction.md
index 6f74dd4..9467963 100644
--- a/docs/user_guide/areas_of_interest/introduction.md
+++ b/docs/user_guide/areas_of_interest/introduction.md
@@ -1,7 +1,7 @@
About Areas Of Interest (AOI)
=============================
-The [AreaOfInterest submodule](../../argaze.md/#argaze.AreaOfInterest) allows to deal with AOI in a AR environment through a set of high level classes:
+The [AreaOfInterest submodule](../../argaze.md/#argaze.AreaOfInterest) allows to deal with AOI through a set of high level classes:
* [AOIFeatures](../../argaze.md/#argaze.AreaOfInterest.AOIFeatures)
* [AOI3DScene](../../argaze.md/#argaze.AreaOfInterest.AOI3DScene)
diff --git a/docs/user_guide/aruco_markers/dictionary_selection.md b/docs/user_guide/aruco_markers/dictionary_selection.md
deleted file mode 100644
index b9ba510..0000000
--- a/docs/user_guide/aruco_markers/dictionary_selection.md
+++ /dev/null
@@ -1,17 +0,0 @@
-Dictionary selection
-====================
-
-ArUco markers always belongs to a set of markers called ArUco markers dictionary.
-
-![ArUco dictionaries](../../img/aruco_dictionaries.png)
-
-Many ArUco dictionaries exist with properties concerning the format, the number of markers or the difference between each markers to avoid error in tracking.
-
-Here is the documention [about ArUco markers dictionaries](https://docs.opencv.org/3.4/d9/d6a/group__aruco.html#gac84398a9ed9dd01306592dd616c2c975).
-
-``` python
-from argaze.ArUcoMarkers import ArUcoMarkersDictionary
-
-# Create a dictionary of specific April tags
-aruco_dictionary = ArUcoMarkersDictionary.ArUcoMarkersDictionary('DICT_APRILTAG_16h5')
-```
diff --git a/docs/user_guide/aruco_markers/introduction.md b/docs/user_guide/aruco_markers/introduction.md
deleted file mode 100644
index 9d78de0..0000000
--- a/docs/user_guide/aruco_markers/introduction.md
+++ /dev/null
@@ -1,15 +0,0 @@
-About ArUco markers
-===================
-
-![OpenCV ArUco markers](https://pyimagesearch.com/wp-content/uploads/2020/12/aruco_generate_tags_header.png)
-
-The OpenCV library provides a module to detect fiducial markers into a picture and estimate its pose (cf [OpenCV ArUco tutorial page](https://docs.opencv.org/4.x/d5/dae/tutorial_aruco_detection.html)).
-
-The ArGaze [ArUcoMarkers submodule](../../argaze.md/#argaze.ArUcoMarkers) eases markers creation, camera calibration, markers detection and 3D scene pose estimation through a set of high level classes:
-
-* [ArUcoMarkersDictionary](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersDictionary)
-* [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker)
-* [ArUcoBoard](../../argaze.md/#argaze.ArUcoMarkers.ArUcoBoard)
-* [ArUcoOpticCalibrator](../../argaze.md/#argaze.ArUcoMarkers.ArUcoOpticCalibrator)
-* [ArUcoDetector](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector)
-* [ArUcoMarkersGroup](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersGroup) \ No newline at end of file
diff --git a/docs/user_guide/aruco_markers/markers_creation.md b/docs/user_guide/aruco_markers/markers_creation.md
deleted file mode 100644
index eab9890..0000000
--- a/docs/user_guide/aruco_markers/markers_creation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-Markers creation
-================
-
-The creation of [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) from a dictionary is illustrated in the code below:
-
-``` python
-from argaze.ArUcoMarkers import ArUcoMarkersDictionary
-
-# Create a dictionary of specific April tags
-aruco_dictionary = ArUcoMarkersDictionary.ArUcoMarkersDictionary('DICT_APRILTAG_16h5')
-
-# Export marker n°5 as 3.5 cm picture with 300 dpi resolution
-aruco_dictionary.create_marker(5, 3.5).save('./markers/', 300)
-
-# Export all dictionary markers as 3.5 cm pictures with 300 dpi resolution
-aruco_dictionary.save('./markers/', 3.5, 300)
-``` \ No newline at end of file
diff --git a/docs/user_guide/aruco_markers/markers_detection.md b/docs/user_guide/aruco_markers/markers_detection.md
deleted file mode 100644
index af2fb4f..0000000
--- a/docs/user_guide/aruco_markers/markers_detection.md
+++ /dev/null
@@ -1,47 +0,0 @@
-Markers detection
-=================
-
-![Detected markers](../../img/detected_markers.png)
-
-Firstly, the [ArUcoDetector](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) needs to know the expected dictionary and size (in centimeter) of the [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) it have to detect.
-
-Notice that extra parameters are passed to detector: see [OpenCV ArUco markers detection parameters documentation](https://docs.opencv.org/4.x/d1/dcd/structcv_1_1aruco_1_1DetectorParameters.html) to know more.
-
-``` python
-from argaze.ArUcoMarkers import ArUcoDetector, ArUcoOpticCalibrator
-
-# Assuming camera calibration data are loaded
-
-# Loading extra detector parameters
-extra_parameters = ArUcoDetector.DetectorParameters.from_json('./detector_parameters.json')
-
-# Create ArUco detector to track DICT_APRILTAG_16h5 5cm length markers
-aruco_detector = ArUcoDetector.ArUcoDetector(optic_parameters=optic_parameters, dictionary='DICT_APRILTAG_16h5', marker_size=5, parameters=extra_parameters)
-```
-
-Here is [DetectorParameters](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.DetectorParameters) JSON file example:
-
-```
-{
- "cornerRefinementMethod": 1,
- "aprilTagQuadSigma": 2,
- "aprilTagDeglitch": 1
-}
-```
-
-The [ArUcoDetector](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) processes image to detect markers and allows to draw detection results onto it:
-
-``` python
-# Detect markers into image and draw them
-aruco_detector.detect_markers(image)
-aruco_detector.draw_detected_markers(image)
-
-# 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)
-
- # Do something with detected marker i corners
- ...
-
-```
diff --git a/docs/user_guide/aruco_markers/markers_pose_estimation.md b/docs/user_guide/aruco_markers/markers_pose_estimation.md
deleted file mode 100644
index 487c220..0000000
--- a/docs/user_guide/aruco_markers/markers_pose_estimation.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Markers pose estimation
-=======================
-
-After [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) detection, it is possible to estimate [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) pose in camera axis.
-
-![Pose estimation](../../img/pose_estimation.png)
-
-``` python
-# Estimate markers pose
-aruco_detector.estimate_markers_pose()
-
-# Get pose estimation related to each detected markers
-for marker_id, marker in aruco_detector.detected_markers.items():
-
- print(f'marker {marker_id} translation: ', marker.translation)
- print(f'marker {marker_id} rotation: ', marker.rotation)
-
- # Do something with each marker pose estimation
- ...
-``` \ No newline at end of file
diff --git a/docs/user_guide/aruco_markers/markers_scene_description.md b/docs/user_guide/aruco_markers/markers_scene_description.md
deleted file mode 100644
index c6dbf31..0000000
--- a/docs/user_guide/aruco_markers/markers_scene_description.md
+++ /dev/null
@@ -1,146 +0,0 @@
-Markers scene description
-=========================
-
-The ArGaze toolkit provides [ArUcoMarkersGroup](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersGroup) class to describe where [ArUcoMarkers](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarker) are placed into a 3D model.
-
-![ArUco scene](../../img/aruco_markers_group.png)
-
-[ArUcoMarkersGroup](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersGroup) is useful to:
-
-* filter markers that belongs to this predefined scene,
-* check the consistency of detected markers according the place where each marker is expected to be,
-* estimate the pose of the scene from the pose of detected markers.
-
-## Scene creation
-
-### from OBJ
-
-ArUco scene description uses common OBJ file format that can be exported from most 3D editors. Notice that plane normals (vn) needs to be exported.
-
-``` obj
-o DICT_APRILTAG_16h5#0_Marker
-v -3.004536 0.022876 2.995370
-v 2.995335 -0.015498 3.004618
-v -2.995335 0.015498 -3.004618
-v 3.004536 -0.022876 -2.995370
-vn 0.0064 1.0000 -0.0012
-s off
-f 1//1 2//1 4//1 3//1
-o DICT_APRILTAG_16h5#1_Marker
-v -33.799068 46.450645 -32.200436
-v -27.852505 47.243549 -32.102116
-v -34.593925 52.396473 -32.076626
-v -28.647360 53.189377 -31.978306
-vn -0.0135 -0.0226 0.9997
-s off
-f 5//2 6//2 8//2 7//2
-...
-```
-
-Here is a sample of code to show the loading of an [ArUcoMarkersGroup](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersGroup) OBJ file description:
-
-``` python
-from argaze.ArUcoMarkers import ArUcoMarkersGroup
-
-# Create an ArUco scene from a OBJ file description
-aruco_markers_group = ArUcoMarkersGroup.ArUcoMarkersGroup.from_obj('./markers.obj')
-
-# Print loaded marker places
-for place_id, place in aruco_markers_group.places.items():
-
- print(f'place {place_id} for marker: ', place.marker.identifier)
- print(f'place {place_id} translation: ', place.translation)
- print(f'place {place_id} rotation: ', place.rotation)
-```
-
-### from JSON
-
-[ArUcoMarkersGroup](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersGroup) description can also be written in a JSON file format.
-
-``` json
-{
- "dictionary": "DICT_ARUCO_ORIGINAL",
- "marker_size": 1,
- "places": {
- "0": {
- "translation": [0, 0, 0],
- "rotation": [0, 0, 0]
- },
- "1": {
- "translation": [10, 10, 0],
- "rotation": [0, 0, 0]
- },
- "2": {
- "translation": [0, 10, 0],
- "rotation": [0, 0, 0]
- }
- }
-}
-```
-
-### from detected markers
-
-Here is a more advanced usage where ArUco scene is built from markers detected into an image:
-
-``` python
-from argaze.ArUcoMarkers import ArUcoMarkersGroup
-
-# Assuming markers have been detected and their pose estimated thanks to ArUcoDetector
-...
-
-# Build ArUco scene from detected markers
-aruco_markers_group = ArUcoMarkersGroup.ArUcoMarkersGroup(aruco_detector.marker_size, aruco_detector.dictionary, aruco_detector.detected_markers)
-```
-
-## Markers filtering
-
-Considering markers are detected, here is how to filter them to consider only those which belongs to the scene:
-
-``` python
-scene_markers, remaining_markers = aruco_markers_group.filter_markers(aruco_detector.detected_markers)
-```
-
-## Marker poses consistency
-
-Then, scene markers poses can be validated by verifying their spatial consistency considering angle and distance tolerance. This is particularly useful to discard ambiguous marker pose estimations when markers are parallel to camera plane (see [issue on OpenCV Contribution repository](https://github.com/opencv/opencv_contrib/issues/3190#issuecomment-1181970839)).
-
-``` python
-# Check scene markers consistency with 10° angle tolerance and 1 cm distance tolerance
-consistent_markers, unconsistent_markers, unconsistencies = aruco_markers_group.check_markers_consistency(scene_markers, 10, 1)
-```
-
-## Scene pose estimation
-
-Several approaches are available to perform [ArUcoMarkersGroup](../../argaze.md/#argaze.ArUcoMarkers.ArUcoMarkersGroup) pose estimation from markers belonging to the scene.
-
-The first approach considers that scene pose can be estimated **from a single marker pose**:
-
-``` python
-# Let's select one consistent scene marker
-marker_id, marker = consistent_markers.popitem()
-
-# Estimate scene pose from a single marker
-tvec, rmat = self.aruco_markers_group.estimate_pose_from_single_marker(marker)
-```
-
-The second approach considers that scene pose can be estimated by **averaging several marker poses**:
-
-``` python
-# Estimate scene pose from all consistent scene markers
-tvec, rmat = self.aruco_markers_group.estimate_pose_from_markers(consistent_markers)
-```
-
-The third approach is only available when ArUco markers are placed in such a configuration that is possible to **define orthogonal axis**:
-
-``` python
-tvec, rmat = self.aruco_markers_group.estimate_pose_from_axis_markers(origin_marker, horizontal_axis_marker, vertical_axis_marker)
-```
-
-## Scene exportation
-
-As ArUco scene can be exported to OBJ file description to import it into most 3D editors.
-
-``` python
-# Export an ArUco scene as OBJ file description
-aruco_markers_group.to_obj('markers.obj')
-```
diff --git a/docs/user_guide/aruco_markers_pipeline/advanced_topics/optic_parameters_calibration.md b/docs/user_guide/aruco_markers_pipeline/advanced_topics/optic_parameters_calibration.md
index 455d95a..fbe06d1 100644
--- a/docs/user_guide/aruco_markers_pipeline/advanced_topics/optic_parameters_calibration.md
+++ b/docs/user_guide/aruco_markers_pipeline/advanced_topics/optic_parameters_calibration.md
@@ -3,11 +3,11 @@ Calibrate optic parameters
A camera device have to be calibrated to compensate its optical distorsion.
-![Optic parameters calibration](../../img/optic_calibration.png)
+![Optic parameters calibration](../../../img/optic_calibration.png)
## Print calibration board
-The first step to calibrate a camera is to create an [ArUcoBoard](../../argaze.md/#argaze.ArUcoMarkers.ArUcoBoard) like in the code below:
+The first step to calibrate a camera is to create an [ArUcoBoard](../../../argaze.md/#argaze.ArUcoMarkers.ArUcoBoard) like in the code below:
``` python
from argaze.ArUcoMarkers import ArUcoMarkersDictionary, ArUcoBoard
@@ -29,9 +29,9 @@ Let's print the calibration board before to go further.
## Capture board pictures
-Then, the calibration process needs to make many different captures of an [ArUcoBoard](../../argaze.md/#argaze.ArUcoMarkers.ArUcoBoard) through the camera and then, pass them to an [ArUcoDetector](../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) instance to detect board corners and store them as calibration data into an [ArUcoOpticCalibrator](../../argaze.md/#argaze.ArUcoMarkers.ArUcoOpticCalibrator) for final calibration process.
+Then, the calibration process needs to make many different captures of an [ArUcoBoard](../../../argaze.md/#argaze.ArUcoMarkers.ArUcoBoard) through the camera and then, pass them to an [ArUcoDetector](../../../argaze.md/#argaze.ArUcoMarkers.ArUcoDetector.ArUcoDetector) instance to detect board corners and store them as calibration data into an [ArUcoOpticCalibrator](../../../argaze.md/#argaze.ArUcoMarkers.ArUcoOpticCalibrator) for final calibration process.
-![Calibration step](../../img/optic_calibration_step.png)
+![Calibration step](../../../img/optic_calibration_step.png)
The sample of code below illustrates how to:
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 81c577f..35b64f7 100644
--- a/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md
+++ b/docs/user_guide/aruco_markers_pipeline/configuration_and_execution.md
@@ -3,7 +3,7 @@ Load and execute pipeline
Once [ArUco markers are placed into a scene](aruco_markers_description.md), they can be detected thanks to [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) class.
-As [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) inherits from [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame), the [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) class also benefits from all the services described in [gaze analysis pipeline section](./user_guide/gaze_analysis_pipeline/introduction.md).
+As [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) inherits from [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame), the [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) class also benefits from all the services described in [gaze analysis pipeline section](../gaze_analysis_pipeline/introduction.md).
![ArUco camera frame](../../img/aruco_camera_frame.png)
@@ -89,7 +89,7 @@ The first [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) pipeline step de
### Image parameters - *inherited from [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame)*
-The usual [ArFrame visualisation parameters](./user_guide/gaze_analysis_pipeline/visualisation.md) plus one additional *draw_detected_markers* field.
+The usual [ArFrame visualisation parameters](../gaze_analysis_pipeline/visualisation.md) plus one additional *draw_detected_markers* field.
## Pipeline execution
@@ -119,7 +119,7 @@ Pass each camera image to [ArUcoCamera.watch](../../argaze.md/#argaze.ArFeatures
### Analyse timestamped gaze positions into camera frame
-As mentioned above, [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) inherits from [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) and so, benefits from all the services described in [gaze analysis pipeline section](./user_guide/gaze_analysis_pipeline/introduction.md).
+As mentioned above, [ArUcoCamera](../../argaze.md/#argaze.ArUcoMarkers.ArUcoCamera) inherits from [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) and so, benefits from all the services described in [gaze analysis pipeline section](../gaze_analysis_pipeline/introduction.md).
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.
diff --git a/docs/user_guide/aruco_markers_pipeline/introduction.md b/docs/user_guide/aruco_markers_pipeline/introduction.md
index 836569a..f781fe8 100644
--- a/docs/user_guide/aruco_markers_pipeline/introduction.md
+++ b/docs/user_guide/aruco_markers_pipeline/introduction.md
@@ -11,7 +11,7 @@ The ArGaze [ArUcoMarkers submodule](../../argaze.md/#argaze.ArUcoMarkers) eases
First, let's look at the schema below: it gives an overview of the main notions involved in the following chapters.
-![ArUco markers pipeline](../../img/aruco_markers_pipeline.png)
+<!-- ![ArUco markers pipeline](../../img/aruco_markers_pipeline.png) -->
To build your own ArUco markers pipeline, you need to know:
@@ -19,11 +19,11 @@ To build your own ArUco markers pipeline, you need to know:
* [How to describe scene's AOI](aoi_description.md),
* [How to load and execute ArUco markers pipeline](configuration_and_execution.md),
* [How to estimate scene pose](pose_estimation.md),
-* [How to project AOI into camera frame](aoi_projection.md),
-* [How to visualize ArUcoCamera and ArUcoScenes](visualisation.md)
+* [How to project AOI into camera frame](aoi_projection.md)
+<!-- * [How to visualize ArUcoCamera and ArUcoScenes](visualisation.md) -->
More advanced features are also explained like:
-* [How to script ArUco markers pipeline](advanced_topics/scripting.md)
-* [How to calibrate optic parameters](optic_parameters_calibration.md)
-* [How to improve ArUco markers detection](advanced_topics/aruco_detector_configuration.md)
+<!-- * [How to script ArUco markers pipeline](advanced_topics/scripting.md) -->
+* [How to calibrate optic parameters](advanced_topics/optic_parameters_calibration.md)
+<!-- * [How to improve ArUco markers detection](advanced_topics/aruco_detector_configuration.md) -->
diff --git a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
index 81efa40..637ba57 100644
--- a/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
+++ b/docs/user_guide/gaze_analysis_pipeline/advanced_topics/scripting.md
@@ -133,7 +133,7 @@ A [python Exception](https://docs.python.org/3/tutorial/errors.html#exceptions)
## Setup ArFrame image parameters
-[ArFrame.image](../../argaze.md/#argaze.ArFeatures.ArFrame.image) method parameters can be configured thanks to a python dictionary.
+[ArFrame.image](../../../argaze.md/#argaze.ArFeatures.ArFrame.image) method parameters can be configured thanks to a python dictionary.
```python
# Assuming ArFrame is loaded
diff --git a/docs/user_guide/gaze_analysis_pipeline/aoi_analysis.md b/docs/user_guide/gaze_analysis_pipeline/aoi_analysis.md
index ffc72c7..84730d4 100644
--- a/docs/user_guide/gaze_analysis_pipeline/aoi_analysis.md
+++ b/docs/user_guide/gaze_analysis_pipeline/aoi_analysis.md
@@ -1,5 +1,5 @@
-Add AOI analysis
-================
+Enable AOI analysis
+===================
The [ArLayer](../../argaze.md/#argaze.ArFeatures.ArLayer) class defines a space where to make matching of gaze movements with AOIs and inside which those matchings need to be analyzed.
diff --git a/docs/user_guide/gaze_analysis_pipeline/introduction.md b/docs/user_guide/gaze_analysis_pipeline/introduction.md
index 02aa82e..23b41a9 100644
--- a/docs/user_guide/gaze_analysis_pipeline/introduction.md
+++ b/docs/user_guide/gaze_analysis_pipeline/introduction.md
@@ -11,7 +11,7 @@ To build your own gaze analysis pipeline, you need to know:
* [How to edit timestamped gaze positions](timestamped_gaze_positions_edition.md),
* [How to load and execute gaze analysis pipeline](configuration_and_execution.md),
-* [How to add AOI analysis](aoi_analysis.md),
+* [How to enable AOI analysis](aoi_analysis.md),
* [How to visualize ArFrame and ArLayers](visualisation.md),
* [How to log resulted gaze analysis](logging.md),
* [How to make heatmap image](heatmap.md).
diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md
index c8fa63c..61338cc 100644
--- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md
+++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_matchers.md
@@ -3,7 +3,7 @@ AOI matchers
ArGaze provides ready-to-use AOI matching algorithms.
-Here are JSON samples to include the chosen module inside [ArLayer configuration](../ar_layer_configuration_and_execution.md) *aoi_matcher* entry.
+Here are JSON samples to include the chosen module inside [ArLayer configuration](../aoi_analysis.md) *aoi_matcher* entry.
## Deviation circle coverage
diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md
index 8d02967..ad1832d 100644
--- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md
+++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/aoi_scan_path_analyzers.md
@@ -3,7 +3,7 @@ AOI scan path analyzers
ArGaze provides ready-to-use AOI scan path analysis algorithms.
-Here are JSON samples to include a chosen module inside [ArLayer configuration](../ar_layer_configuration_and_execution.md) *aoi_scan_path_analyzers* entry.
+Here are JSON samples to include a chosen module inside [ArLayer configuration](../aoi_analysis.md) *aoi_scan_path_analyzers* entry.
## Basic metrics
diff --git a/docs/user_guide/gaze_analysis/gaze_movement.md b/docs/user_guide/gaze_features/gaze_movement.md
index 83f67e1..83f67e1 100644
--- a/docs/user_guide/gaze_analysis/gaze_movement.md
+++ b/docs/user_guide/gaze_features/gaze_movement.md
diff --git a/docs/user_guide/gaze_analysis/gaze_position.md b/docs/user_guide/gaze_features/gaze_position.md
index 48495b4..48495b4 100644
--- a/docs/user_guide/gaze_analysis/gaze_position.md
+++ b/docs/user_guide/gaze_features/gaze_position.md
diff --git a/docs/user_guide/gaze_analysis/introduction.md b/docs/user_guide/gaze_features/introduction.md
index bf818ba..bf818ba 100644
--- a/docs/user_guide/gaze_analysis/introduction.md
+++ b/docs/user_guide/gaze_features/introduction.md
diff --git a/docs/user_guide/gaze_analysis/scan_path.md b/docs/user_guide/gaze_features/scan_path.md
index 46af28b..46af28b 100644
--- a/docs/user_guide/gaze_analysis/scan_path.md
+++ b/docs/user_guide/gaze_features/scan_path.md
diff --git a/mkdocs.yml b/mkdocs.yml
index c2f4c53..c1c2af6 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -31,14 +31,6 @@ nav:
- Advanced Topics:
- user_guide/aruco_markers_pipeline/advanced_topics/optic_parameters_calibration.md
-# - ArUco Markers:
-# - user_guide/aruco_markers/introduction.md
-# - user_guide/aruco_markers/dictionary_selection.md
-# - user_guide/aruco_markers/markers_creation.md
-# - user_guide/aruco_markers/camera_calibration.md
-# - user_guide/aruco_markers/markers_detection.md
-# - user_guide/aruco_markers/markers_pose_estimation.md
-# - user_guide/aruco_markers/markers_scene_description.md
# - Areas Of Interest:
# - user_guide/areas_of_interest/introduction.md
# - user_guide/areas_of_interest/aoi_scene_description.md
@@ -46,11 +38,11 @@ nav:
# - user_guide/areas_of_interest/vision_cone_filtering.md
# - user_guide/areas_of_interest/aoi_matching.md
# - user_guide/areas_of_interest/heatmap.md
-# - Gaze Analysis:
-# - user_guide/gaze_analysis/introduction.md
-# - user_guide/gaze_analysis/gaze_position.md
-# - user_guide/gaze_analysis/gaze_movement.md
-# - user_guide/gaze_analysis/scan_path.md
+# - Gaze Features:
+# - user_guide/gaze_features/introduction.md
+# - user_guide/gaze_features/gaze_position.md
+# - user_guide/gaze_features/gaze_movement.md
+# - user_guide/gaze_features/scan_path.md
# - Timestamped data:
# - user_guide/timestamped_data/introduction.md
# - user_guide/timestamped_data/ordered_dictionary.md
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index ad17df2..54ef918 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -1044,7 +1044,7 @@ class ArFrame():
return image
- def image(self, **kwargs) -> numpy.array:
+ def image(self, **kwargs: dict) -> numpy.array:
"""
Get frame image.
@@ -1248,7 +1248,7 @@ class ArScene():
return ArScene(new_scene_name, new_layers, new_frames, **scene_data)
- def estimate_pose(self, detected_features) -> Tuple[numpy.array, numpy.array]:
+ def estimate_pose(self, detected_features: Any) -> Tuple[numpy.array, numpy.array]:
"""Define abstract estimate scene pose method.
Parameters:
@@ -1298,7 +1298,7 @@ class ArScene():
# Project layer aoi scene
yield name, aoi_scene_copy.project(tvec, rvec, self.parent.aruco_detector.optic_parameters.K)
- def draw(self, image: numpy.array, **kwargs):
+ def draw(self, image: numpy.array, **kwargs: dict):
"""
Draw scene into image.
@@ -1495,7 +1495,7 @@ class ArCamera(ArFrame):
# Unlock camera frame exploitation
self._frame_lock.release()
- def image(self, **kwargs) -> numpy.array:
+ def image(self, **kwargs: dict) -> numpy.array:
"""
Get frame image.
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py
index 4f555fb..4c3f042 100644
--- a/src/argaze/ArUcoMarkers/ArUcoCamera.py
+++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py
@@ -73,7 +73,7 @@ class ArUcoCamera(ArFeatures.ArCamera):
return output
@classmethod
- def from_dict(self, aruco_camera_data, working_directory: str = None) -> ArUcoCameraType:
+ def from_dict(self, aruco_camera_data: dict, working_directory: str = None) -> ArUcoCameraType:
"""
Load ArUcoCamera from dictionary.
@@ -211,7 +211,7 @@ class ArUcoCamera(ArFeatures.ArCamera):
# Return dection time and exceptions
return detection_time, exceptions
- def __image(self, draw_detected_markers: dict = None, draw_scenes: dict = None, draw_optic_parameters_grid: dict = None, **kwargs) -> numpy.array:
+ def __image(self, draw_detected_markers: dict = None, draw_scenes: dict = None, draw_optic_parameters_grid: dict = None, **kwargs: dict) -> numpy.array:
"""Get frame image with ArUco detection visualisation.
Parameters:
@@ -253,7 +253,7 @@ class ArUcoCamera(ArFeatures.ArCamera):
return image
- def image(self, **kwargs) -> numpy.array:
+ def image(self, **kwargs: dict) -> numpy.array:
"""
Get frame image.
diff --git a/src/argaze/AreaOfInterest/AOI2DScene.py b/src/argaze/AreaOfInterest/AOI2DScene.py
index f6b8dcb..564f65c 100644
--- a/src/argaze/AreaOfInterest/AOI2DScene.py
+++ b/src/argaze/AreaOfInterest/AOI2DScene.py
@@ -125,20 +125,23 @@ class AOI2DScene(AOIFeatures.AOIScene):
return aoi2D_scene
'''
- def dimensionalize(self, frame_3d: AOIFeatures.AreaOfInterest, size: tuple) -> AOI3DSceneType:
+ def dimensionalize(self, rectangle_3d: AOIFeatures.AreaOfInterest, size: tuple) -> AOI3DSceneType:
"""
Convert to 3D scene considering it is inside of 3D rectangular frame.
Parameters:
- aoi_frame_3d: rectangle 3D AOI to use as referential plane
+ rectangle_3d: rectangle 3D AOI to use as referential plane
size: size of the frame in pixel
Returns:
AOI 3D scene
"""
+ assert(rectangle_3d.dimension == 3)
+ assert(rectangle_3d.points_number == 4)
+
# Vectorize outter_axis function
- vfunc = numpy.vectorize(frame_3d.outter_axis)
+ vfunc = numpy.vectorize(rectangle_3d.outter_axis)
# Prepare new AOI 3D scene
aoi3D_scene = AOI3DScene.AOI3DScene()