aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/demo_gaze_features_run.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/argaze/utils/demo_gaze_features_run.py b/src/argaze/utils/demo_gaze_features_run.py
index 6ec4c97..e30f867 100644
--- a/src/argaze/utils/demo_gaze_features_run.py
+++ b/src/argaze/utils/demo_gaze_features_run.py
@@ -10,7 +10,6 @@ __license__ = "BSD"
import argparse
import os
import time
-import threading
import queue
from argaze import ArFeatures, GazeFeatures
@@ -43,11 +42,8 @@ def main():
cv2.namedWindow(ar_screen.name, cv2.WINDOW_AUTOSIZE)
# Heatmap buffer display option
- clear_heatmap = False
enable_heatmap_buffer = False
- ar_screen_lock = threading.Lock()
-
# Init timestamp
start_time = time.time()
@@ -192,13 +188,14 @@ def main():
ngram_analyzer = ar_screen.aoi_scan_path_analyzers["NGram"]
- start = ar_screen.size[1] - ((len(ngram_analyzer.ngrams_count) + 1) * 40)
- cv2.putText(image, f'{ngram_analyzer.n}-Gram:', (ar_screen.size[0]-700, start-40), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv2.LINE_AA)
+ # Display only 3-gram analysis
+ start = ar_screen.size[1] - ((len(ngram_analyzer.ngrams_count[3]) + 1) * 40)
+ cv2.putText(image, f'{ngram_analyzer.n_max}-Gram:', (ar_screen.size[0]-700, start-40), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv2.LINE_AA)
- for i, (ngram, count) in enumerate(ngram_analyzer.ngrams_count.items()):
+ for i, (ngram, count) in enumerate(ngram_analyzer.ngrams_count[3].items()):
ngram_string = f'{ngram[0]}'
- for g in range(1, ngram_analyzer.n):
+ for g in range(1, 3):
ngram_string += f'>{ngram[g]}'
cv2.putText(image, f'{ngram_string}: {count}', (ar_screen.size[0]-700, start+(i*40)), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv2.LINE_AA)