diff options
9 files changed, 34 insertions, 12 deletions
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 3277216..a3e9fc7 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 @@ -82,7 +82,7 @@ aruco_detector = ArUcoDetector.ArUcoDetector(dictionary=aruco_dictionary, marker # Start optic calibration processing for Full HD image resolution print('Calibrating optic...') -optic_parameters = aruco_optic_calibrator.calibrate(aruco_board, dimensions=(1920, 1080)) +optic_parameters = aruco_optic_calibrator.calibrate(expected_aruco_board, dimensions=(1920, 1080)) if optic_parameters: diff --git a/docs/user_guide/aruco_markers_pipeline/aoi_3d_description.md b/docs/user_guide/aruco_markers_pipeline/aoi_3d_description.md index 4228ce7..23ea550 100644 --- a/docs/user_guide/aruco_markers_pipeline/aoi_3d_description.md +++ b/docs/user_guide/aruco_markers_pipeline/aoi_3d_description.md @@ -61,8 +61,8 @@ JSON file format allows to describe AOI vertices. ``` json { "Left_Screen": [[0, 0, 0], [15, 0, 0], [0, 18.963333, -6.355470], [15, 18.963333, -6.355470]], - "Right_Screen": [[20, 0, 0], [35, 0, 0], [20, 18.963337 -6.355472], [35 18.963337 -6.355472]], + "Right_Screen": [[20, 0, 0], [35, 0, 0], [20, 18.963337, -6.355472], [35, 18.963337, -6.355472]], "Control_Panel": [[49.5, 30, 18.333333], [55.5, 30, 18.333333], [49.5, 38, 18.333333], [55.5, 38, 18.333333]], - "Window": [[-57.8, 5.5, -33.5], [46, 15.5, -35], [1.5, 53, -1], [50.2, 61, 6], [-35.85 35, -15]] + "Window": [[-57.8, 5.5, -33.5], [46, 15.5, -35], [1.5, 53, -1], [50.2, 61, 6], [-35.85, 35, -15]] } ``` diff --git a/docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md b/docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md index 86839c1..4f9af7c 100644 --- a/docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md +++ b/docs/user_guide/aruco_markers_pipeline/aoi_3d_frame.md @@ -25,9 +25,9 @@ Here is the previous extract where "Left_Screen" and "Right_Screen" AOI are defi "MyLayer": { "aoi_scene": { "Left_Screen": [[0, 0, 0], [15, 0, 0], [0, 18.963333, -6.355470], [15, 18.963333, -6.355470]], - "Right_Screen": [[20, 0, 0], [35, 0, 0], [20, 18.963337 -6.355472], [35 18.963337 -6.355472]], + "Right_Screen": [[20, 0, 0], [35, 0, 0], [20, 18.963337 ,-6.355472], [35, 18.963337, -6.355472]], "Control_Panel": [[49.5, 30, 18.333333], [55.5, 30, 18.333333], [49.5, 38, 18.333333], [55.5, 38, 18.333333]], - "Window": [[-57.8, 5.5, -33.5], [46, 15.5, -35], [1.5, 53, -1], [50.2, 61, 6], [-35.85 35, -15]] + "Window": [[-57.8, 5.5, -33.5], [46, 15.5, -35], [1.5, 53, -1], [50.2, 61, 6], [-35.85, 35, -15]] } } }, diff --git a/docs/user_guide/aruco_markers_pipeline/aoi_3d_projection.md b/docs/user_guide/aruco_markers_pipeline/aoi_3d_projection.md index 370a2ed..64f5fc8 100644 --- a/docs/user_guide/aruco_markers_pipeline/aoi_3d_projection.md +++ b/docs/user_guide/aruco_markers_pipeline/aoi_3d_projection.md @@ -25,9 +25,9 @@ Here is the previous extract where one layer is added to [ArUcoScene](../../arga "MyLayer": { "aoi_scene": { "Left_Screen": [[0, 0, 0], [15, 0, 0], [0, 18.963333, -6.355470], [15, 18.963333, -6.355470]], - "Right_Screen": [[20, 0, 0], [35, 0, 0], [20, 18.963337 -6.355472], [35 18.963337 -6.355472]], + "Right_Screen": [[20, 0, 0], [35, 0, 0], [20, 18.963337, -6.355472], [35, 18.963337, -6.355472]], "Control_Panel": [[49.5, 30, 18.333333], [55.5, 30, 18.333333], [49.5, 38, 18.333333], [55.5, 38, 18.333333]], - "Window": [[-57.8, 5.5, -33.5], [46, 15.5, -35], [1.5, 53, -1], [50.2, 61, 6], [-35.85 35, -15]] + "Window": [[-57.8, 5.5, -33.5], [46, 15.5, -35], [1.5, 53, -1], [50.2, 61, 6], [-35.85, 35, -15]] } } } 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 e68cf8f..9ac2f6d 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,6 +3,9 @@ AOI scan path analyzers ArGaze provides ready-to-use AOI scan path analysis algorithms. +!!! note "Definition" + An [AOIScanPath](../../../argaze.md/#argaze.GazeFeatures.AOIScanPath) defined as a list of [AOIScanSteps](../../../argaze.md/#argaze.GazeFeatures.AOIScanStep) made by a set of successive fixations/saccades onto a same AOI. + The JSON samples have to be included inside [ArLayer configuration](../aoi_analysis.md) *aoi_scan_path_analyzers* entry to select an algorithm. ```json diff --git a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md index c779112..f1d38e2 100644 --- a/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md +++ b/docs/user_guide/gaze_analysis_pipeline/pipeline_modules/scan_path_analyzers.md @@ -3,6 +3,9 @@ Scan path analyzers ArGaze provides ready-to-use scan path analysis algorithms. +!!! note "Definition" + A [ScanPath](../../../argaze.md/#argaze.GazeFeatures.ScanPath) is defined as a list of [ScanSteps](../../../argaze.md/#argaze.GazeFeatures.ScanStep) made by a fixation and a consecutive saccade. + The JSON samples have to be included inside [ArFrame configuration](../configuration_and_execution.md) *scan_path_analyzers* entry to select an algorithm. ```json diff --git a/src/argaze/ArUcoMarkers/ArUcoDetector.py b/src/argaze/ArUcoMarkers/ArUcoDetector.py index e62a42e..e6a305f 100644 --- a/src/argaze/ArUcoMarkers/ArUcoDetector.py +++ b/src/argaze/ArUcoMarkers/ArUcoDetector.py @@ -18,7 +18,7 @@ from argaze.ArUcoMarkers import ArUcoMarkersDictionary, ArUcoMarker, ArUcoOpticC import numpy import cv2 as cv -import cv2.aruco as aruco +from cv2 import aruco ArUcoMarkerDictionaryType = TypeVar('ArUcoMarkerDictionary', bound="ArUcoMarkerDictionary") # Type definition for type annotation convenience diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py index 5637baa..77a92fd 100644 --- a/src/argaze/AreaOfInterest/AOIFeatures.py +++ b/src/argaze/AreaOfInterest/AOIFeatures.py @@ -357,6 +357,7 @@ class AOIScene(): delattr(self, key) def __or__(self, other): + """Merge another scene using | operator.""" assert(other.dimension == self.__dimension) @@ -366,6 +367,7 @@ class AOIScene(): return AOIScene(self.dimension, merged_areas) def __ror__(self, other): + """Merge another scene using | operator.""" assert(other.dimension == self.__dimension) @@ -375,6 +377,7 @@ class AOIScene(): return AOIScene(self.dimension, merged_areas) def __ior__(self, other): + """Merge scene with another scene in-place using |= operator.""" assert(other.dimension == self.__dimension) diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index a4cf244..12cccbc 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -508,9 +508,16 @@ TimeStampedGazeStatusType = TypeVar('TimeStampedGazeStatus', bound="TimeStampedG # Type definition for type annotation convenience class TimeStampedGazeStatus(DataStructures.TimeStampedBuffer): - """Define timestamped buffer to store gaze status.""" + """Define timestamped buffer to store list of gaze statusa. + + !!! note + List of gaze status are required as a gaze position can belongs to two consecutive gaze movements as last and first position. + """ + + def __setitem__(self, key, value: list): + + assert(isinstance(value, list)) - def __setitem__(self, key, value: GazeStatus): super().__setitem__(key, value) class GazeMovementIdentifier(): @@ -550,7 +557,13 @@ class GazeMovementIdentifier(): raise NotImplementedError('current_saccade getter not implemented') def browse(self, ts_gaze_positions: TimeStampedGazePositions) -> Tuple[TimeStampedGazeMovementsType, TimeStampedGazeMovementsType, TimeStampedGazeStatusType]: - """Identify fixations and saccades browsing timestamped gaze positions.""" + """Identify fixations and saccades browsing timestamped gaze positions. + + Returns: + timestamped_fixations: all fixations stored by timestamped. + timestamped_saccades: all saccades stored by timestamped. + timestamped_gaze_status: all gaze status stored by timestamped. + """ assert(type(ts_gaze_positions) == TimeStampedGazePositions) @@ -874,7 +887,7 @@ class AOIScanStepError(Exception): @dataclass(frozen=True) class AOIScanStep(): - """Define a aoi scan step as a set of successive gaze movements onto a same AOI. + """Define an aoi scan step as a set of successive gaze movements onto a same AOI. !!! warning |