diff options
author | Théo de la Hogue | 2024-01-16 15:38:33 +0100 |
---|---|---|
committer | Théo de la Hogue | 2024-01-16 15:38:33 +0100 |
commit | 7ec4e8ea2a2d528804f6c59157202cc350f9377b (patch) | |
tree | 5a766f2227b319b99dcac67cf785317924829627 | |
parent | f46c1f9e8268d87ae497fa8110ecebf517ba5645 (diff) | |
download | argaze-7ec4e8ea2a2d528804f6c59157202cc350f9377b.zip argaze-7ec4e8ea2a2d528804f6c59157202cc350f9377b.tar.gz argaze-7ec4e8ea2a2d528804f6c59157202cc350f9377b.tar.bz2 argaze-7ec4e8ea2a2d528804f6c59157202cc350f9377b.tar.xz |
Timestamping watched camera frame.
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoCamera.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py index 286afa7..a86f411 100644 --- a/src/argaze/ArUcoMarkers/ArUcoCamera.py +++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py @@ -145,6 +145,9 @@ class ArUcoCamera(ArFeatures.ArCamera): def watch(self, timestamp: int|float, image: numpy.array) -> Tuple[float, float, dict]: """Detect environment aruco markers from image and project scenes into camera frame. + !!! note + This method timestamps camera frame and its layers. + Returns: detection time: aruco marker detection time in ms. projection time: scenes projection time in ms. @@ -197,10 +200,10 @@ class ArUcoCamera(ArFeatures.ArCamera): try: - # Update layer aoi + # Update camera layer aoi self.layers[layer_name].aoi_scene |= layer_projection - # Update layer timestamp + # Timestamp camera layer self.layers[layer_name].timestamp = timestamp except KeyError: @@ -215,12 +218,12 @@ class ArUcoCamera(ArFeatures.ArCamera): # Assess projection time in ms projection_time = (time.perf_counter() - projection_start) * 1e3 - # Update camera frame timestamp - self.timestamp = timestamp - # Unlock camera frame exploitation self.release() + # Timestamp camera frame + self.timestamp = timestamp + # Return detection time, projection time and exceptions return detection_time, projection_time, exceptions |