Parcourir la source

Update of extracts scripts

Jérôme BUISINE il y a 4 ans
Parent
commit
dd73156b6e

+ 2 - 0
extracts/extract_expe_info_subject_scenes.py

@@ -147,6 +147,8 @@ def main():
 
                 if new_scene:
                     counter = 0
+                    x_points = []
+                    y_points = []
 
     all_path_folder = os.path.join(output_folder_path, cfg.all_subjects_data_folder)
 

+ 8 - 3
extracts/extract_expe_info_subject_zones.py

@@ -3,6 +3,7 @@ import sys, os, argparse
 import math
 import numpy as np
 import pickle
+import time
 
 # processing imports
 from PIL import Image
@@ -151,9 +152,13 @@ def main():
 
                             title = subject + ' - ' + scene_name + ' (' + str(p_n) + ' clicks)'
 
-                            # save image plot
-                            x_points = zones_clicks_of_subject[zone_index]['x']
-                            y_points = zones_clicks_of_subject[zone_index]['y']
+                            x_points = []
+                            y_points = []
+
+                            for zone_index in cfg.zones_indices:
+                                # save image plot
+                                x_points = x_points + zones_clicks_of_subject[zone_index]['x']
+                                y_points = y_points + zones_clicks_of_subject[zone_index]['y']
 
                             utils_functions.save_img_plot(scene_name, x_points, y_points, title, img_path)