1- function demo_gui(set ,user_path )
1+ function demo_gui(set ,user_path , varargin )
22% DEMO_GUI executes the processes: segmentation, labelling, classification
33% and produces the results
44
5+ % %Global Options
6+ seg_overlap = [0.7 ,0.9 ];
7+ seg_length = 250 ;
8+ if ~isempty(varargin )
9+ if varargin{1 } == - 1
10+ seg_overlap = 0.7 ;
11+ end
12+ end
13+
14+
515 user_path = char_project_path(user_path );
616 h = waitbar(0 ,' Initializing...' );
717
@@ -49,8 +59,7 @@ function demo_gui(set,user_path)
4959 errordlg(' Cannot load project settings' ,' Error' );
5060 return
5161 end
52- seg_overlap = [0.7 ,0.9 ];
53- seg_length = 250 ;
62+
5463 for i = 1 : length(seg_overlap )
5564 seg_properties = [seg_length ,seg_overlap(i )];
5665 segmentation_configs = config_segments(new_properties , seg_properties , trajectory_groups , my_trajectories );
@@ -60,7 +69,7 @@ function demo_gui(set,user_path)
6069 %% Labelling
6170 files = {' labels_1301_250_07-tiago.csv' ,' labels_1657_250_09-tiago.csv' };
6271 seg_name = {' segmentation_configs_10388_250_07.mat' ,' segmentation_configs_29476_250_09.mat' };
63- for i = 1 : 2
72+ for i = 1 : length( seg_overlap )
6473 % check if everything is ok
6574 if ~exist(fullfile(datapath ,files{i }),' file' ) || ~exist(fullfile(project_path ,' segmentation' ,seg_name{i }),' file' )
6675 errordlg(' Cannot create labels files' ,' Error' );
@@ -143,7 +152,7 @@ function demo_gui(set,user_path)
143152
144153 %% Labelling Quality
145154 files = {' labels_1301_250_07-tiago.mat' ,' labels_1657_250_09-tiago.mat' };
146- for i = 1 : 2
155+ for i = 1 : length( seg_name )
147156 load(fullfile(project_path ,' segmentation' ,seg_name{i }));
148157 load(fullfile(project_path ,' labels' ,files{i }));
149158
0 commit comments