aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-10-04 19:41:01 +0200
committerThéo de la Hogue2023-10-04 19:41:01 +0200
commitff2c7b8db71755576048e5c0ee9ec59a581c07fa (patch)
tree33a52a898e01e9f252e4fd6c4859e884d7e496b7 /src
parentc55fccdb1e8c26ea08c1cb36fa9178cfbc89dba8 (diff)
downloadargaze-ff2c7b8db71755576048e5c0ee9ec59a581c07fa.zip
argaze-ff2c7b8db71755576048e5c0ee9ec59a581c07fa.tar.gz
argaze-ff2c7b8db71755576048e5c0ee9ec59a581c07fa.tar.bz2
argaze-ff2c7b8db71755576048e5c0ee9ec59a581c07fa.tar.xz
Excluding AOI frame from aoi matching and from expected aoi.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArFeatures.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index 43acf55..545bc8b 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -1330,25 +1330,42 @@ class ArCamera(ArFrame):
scene.parent = self
# Setup expected aoi of each layer aoi scan path with the aoi of corresponding scene layer
+ # Edit aoi matcher exclude attribute to ignore frame aoi
for layer_name, layer in self.layers.items():
if layer.aoi_scan_path is not None:
- all_aoi_list = []
+ expected_aoi_list = []
+ exclude_aoi_list = []
for scene_name, scene in self.scenes.items():
+ # Append scene layer aoi to corresponding expected camera layer aoi
try:
scene_layer = scene.layers[layer_name]
- all_aoi_list.extend(list(scene_layer.aoi_scene.keys()))
+ expected_aoi_list.extend(list(scene_layer.aoi_scene.keys()))
except KeyError:
continue
- layer.aoi_scan_path.expected_aoi = all_aoi_list
+ # Remove scene frame from expected camera layer aoi
+ # Exclude scene frame from camera layer aoi matching
+ for frame_name, frame in scene.frames.items():
+
+ try:
+
+ expected_aoi_list.remove(frame_name)
+ exclude_aoi_list.append(frame_name)
+
+ except ValueError:
+
+ continue
+
+ layer.aoi_scan_path.expected_aoi = expected_aoi_list
+ layer.aoi_matcher.exclude = exclude_aoi_list
# Init a lock to share scene projections into camera frame between multiple threads
self._frame_lock = threading.Lock()