diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/ArFeatures.py | 9 | ||||
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoDetector.py | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py index dc696ee..09edc6c 100644 --- a/src/argaze/ArFeatures.py +++ b/src/argaze/ArFeatures.py @@ -305,6 +305,9 @@ class ArFrame(): # Update current gaze position self.__gaze_position = inner_gaze_position + # No aoi is looked by default + look_at = None + # Init scan path analysis report scan_step_analysis = {} aoi_scan_step_analysis = {} @@ -317,9 +320,7 @@ class ArFrame(): if GazeFeatures.is_fixation(ended_gaze_movement): - # Does the fixation match an AOI? - look_at = None - + # Does the fixation match an aoi? for name, aoi in self.aoi_2d_scene.items(): _, _, circle_ratio = aoi.circle_intersection(ended_gaze_movement.focus, ended_gaze_movement.deviation_max) @@ -923,7 +924,7 @@ class ArEnvironment(): yield aoi_frame - def detect_and_project(self, image: numpy.array) -> int: + def detect_and_project(self, image: numpy.array) -> Tuple[float, dict]: """Detect environment aruco markers from image and project scenes into camera frame. Returns: diff --git a/src/argaze/ArUcoMarkers/ArUcoDetector.py b/src/argaze/ArUcoMarkers/ArUcoDetector.py index 723bc26..3fb17bf 100644 --- a/src/argaze/ArUcoMarkers/ArUcoDetector.py +++ b/src/argaze/ArUcoMarkers/ArUcoDetector.py @@ -176,7 +176,7 @@ class ArUcoDetector(): return output - def detect_markers(self, image: numpy.array) -> int: + def detect_markers(self, image: numpy.array) -> float: """Detect all ArUco markers into an image. .. danger:: DON'T MIRROR IMAGE @@ -196,7 +196,7 @@ class ArUcoDetector(): self.__detected_markers_corners, self.__detected_markers_ids, _ = aruco.detectMarkers(cv.cvtColor(image, cv.COLOR_BGR2GRAY), self.dictionary.markers, parameters = self.parameters.internal) # Assess marker detection time in ms - detection_time = int((time.time() - detection_start) * 1e3) + detection_time = (time.time() - detection_start) * 1e3 # Is there detected markers ? if len(self.__detected_markers_corners) > 0: |