-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
main: Fixed bug when saving features after correcting ID flips
- Loading branch information
1 parent
a7a5d02
commit ffeb508
Showing
5 changed files
with
54 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
function [do_recompute, output_folder_path] = ... | ||
determine_whether_to_recompute_feature_type(feature_type_string, folder_name_template, parent_folder_path) | ||
% Try to find a folder matching folder_name_template within | ||
% parent_folder_path. On return, do_recompute is true iff exactly one such | ||
% folder can be found, and output_folder_path is the path to that folder. If | ||
% more than one match is found, issue a warning stating as much (using | ||
% feature_type_string in the warning message to indicate which feature type is | ||
% problematic). Used to determine whether to recompute JAABA/CSV features | ||
% after indentity corrections are done in the visualizer. | ||
folder_names_matching_JAABA = folder_names_matching_template(parent_folder_path, folder_name_template) ; | ||
if length(folder_names_matching_JAABA) == 0 , %#ok<ISMT> | ||
do_recompute = false ; | ||
output_folder_path = [] ; | ||
elseif length(folder_names_matching_JAABA) == 1 , | ||
do_recompute = true ; | ||
output_folder_path = fullfile(parent_folder_path, folder_names_matching_JAABA{1}) ; | ||
else | ||
% Should we issue a warning here? | ||
warning('Not saving %s features b/c more than one folder matching "%s" template in %s', ... | ||
feature_type_string, folder_name_template, parent_folder_path) ; | ||
do_recompute = false ; | ||
output_folder_path = [] ; | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function tracker_job_features(output_feature_file_path, output_jaaba_folder_path, output_features_csv_folder_path, ... | ||
input_video_file_name, input_tracking_file_name, calibration_file_name, ... | ||
options) | ||
% Recompute the features file, csv feature files, and jaaba features. | ||
calibration = load_anonymous(calibration_file_name) ; | ||
core_tracker_compute_features(output_feature_file_path, output_features_csv_folder_path, output_jaaba_folder_path, ... | ||
input_video_file_name, input_tracking_file_name, calibration, ... | ||
options) ; | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function result = folder_names_matching_template(parent_folder_name, template) | ||
% Return folder names matching the template within parent_folder_name | ||
s_from_file_index = dir(fullfile(parent_folder_name, template)) ; | ||
name_from_file_index = { s_from_file_index.name } ; | ||
is_folder_from_file_index = [ s_from_file_index.isdir ] ; | ||
result = name_from_file_index(is_folder_from_file_index) ; | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function nop() | ||
% do nothing | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters