aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-03-22 11:44:37 +0100
committerThéo de la Hogue2024-03-22 11:44:37 +0100
commit04b9b79bb6a4a1378ae4c22b261b8670b6f547be (patch)
tree871f611dee7922051b66ab384cb19a379d23fe52
parentcc9d6032cf46db24b9a221171c84aa06430bfe7c (diff)
downloadargaze-04b9b79bb6a4a1378ae4c22b261b8670b6f547be.zip
argaze-04b9b79bb6a4a1378ae4c22b261b8670b6f547be.tar.gz
argaze-04b9b79bb6a4a1378ae4c22b261b8670b6f547be.tar.bz2
argaze-04b9b79bb6a4a1378ae4c22b261b8670b6f547be.tar.xz
Fixing ArUcoCamera loading.
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoCamera.py19
-rw-r--r--src/argaze/DataFeatures.py4
2 files changed, 16 insertions, 7 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py
index 5c495dc..6d13c10 100644
--- a/src/argaze/ArUcoMarkers/ArUcoCamera.py
+++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py
@@ -85,7 +85,12 @@ class ArUcoCamera(ArFeatures.ArCamera):
self.__aruco_detector.parent = self
- @ArFeatures.ArCamera.scenes.setter
+ @property
+ def scenes(self) -> dict:
+ """All scenes to project into camera frame."""
+ return self.__scenes
+
+ @scenes.setter
@DataFeatures.PipelineStepAttributeSetter
def scenes(self, scenes: dict):
@@ -129,10 +134,14 @@ class ArUcoCamera(ArFeatures.ArCamera):
# Clear former layers projection into camera frame
for layer_name, layer in self.layers.items():
- # DEBUG
- print('ArUcoCamera.watch', layer_name, layer.aoi_scene)
-
- layer.aoi_scene.clear()
+ # Initialize layer if needed
+ if layer.aoi_scene is None:
+
+ layer.aoi_scene = AOI2DScene.AOI2DScene()
+
+ else:
+
+ layer.aoi_scene.clear()
# Project each aoi 3d scene into camera frame
for scene_name, scene in self.scenes.items():
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py
index c435560..c7624e5 100644
--- a/src/argaze/DataFeatures.py
+++ b/src/argaze/DataFeatures.py
@@ -804,7 +804,7 @@ class PipelineStepObject():
for name, value in self.properties:
- logging.debug('%s@property %s (%s)', type(self).__name__, name, type(value).__name__)
+ logging.debug('%s.__str__ @property %s (%s)', type(self).__name__, name, type(value).__name__)
output += f'{tabs}\t{Style.BRIGHT}{name}{Style.RESET_ALL}: '
@@ -840,7 +840,7 @@ class PipelineStepObject():
except TypeError as e:
- logging.error('%s@property %s (%s)', type(self).__name__, name, type(value).__name__)
+ logging.error('%s.__str__ @property %s (%s)', type(self).__name__, name, type(value).__name__)
output += f'{Fore.RED}{Style.BRIGHT}!!! {type(self).__name__}.{name}: {e}{Style.RESET_ALL}\n\n'