aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2023-01-18 17:41:01 +0100
committerThéo de la Hogue2023-01-18 17:41:01 +0100
commit135ed6896cfe2f13b263a34a3fe78b787a4dc384 (patch)
tree34845237d567cad40e3d613dec1a3293e3486f4c /src
parentffeb677305596b79d57dcbb9e14638b19d1b5bc1 (diff)
downloadargaze-135ed6896cfe2f13b263a34a3fe78b787a4dc384.zip
argaze-135ed6896cfe2f13b263a34a3fe78b787a4dc384.tar.gz
argaze-135ed6896cfe2f13b263a34a3fe78b787a4dc384.tar.bz2
argaze-135ed6896cfe2f13b263a34a3fe78b787a4dc384.tar.xz
Moving code out of try block.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/tobii_stream_arscene_display.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/argaze/utils/tobii_stream_arscene_display.py b/src/argaze/utils/tobii_stream_arscene_display.py
index 15bf6d7..336de1f 100644
--- a/src/argaze/utils/tobii_stream_arscene_display.py
+++ b/src/argaze/utils/tobii_stream_arscene_display.py
@@ -76,13 +76,13 @@ def main():
# Copy video frame to edit visualisation on it without disrupting aruco tracking
visu_frame = video_frame.copy()
+ # Hide frame left and right borders before tracking to ignore markers outside focus area
+ cv.rectangle(video_frame.matrix, (0, 0), (int(video_frame.width*args.borders/100), int(video_frame.height)), (0, 0, 0), -1)
+ cv.rectangle(video_frame.matrix, (int(video_frame.width*(1 - args.borders/100)), 0), (int(video_frame.width), int(video_frame.height)), (0, 0, 0), -1)
+
# Process video and data frame
try:
- # Hide frame left and right borders before tracking to ignore markers outside focus area
- cv.rectangle(video_frame.matrix, (0, 0), (int(video_frame.width*args.borders/100), int(video_frame.height)), (0, 0, 0), -1)
- cv.rectangle(video_frame.matrix, (int(video_frame.width*(1 - args.borders/100)), 0), (int(video_frame.width), int(video_frame.height)), (0, 0, 0), -1)
-
# Estimate scene pose from ArUco markers into frame.
tvec, rmat, _ = ar_scene.estimate_pose(video_frame.matrix)