modified importfile.m so headers so log files with headers can be loaded, fixed getPrecisionRecall.m for a "*=" error by MATLAB

This commit is contained in:
matlabbe
2015-01-05 16:00:42 -05:00
parent 42af8aabe2
commit 4c2dad453d
2 changed files with 5 additions and 1 deletions

View File

@@ -17,7 +17,7 @@ if exist(GT_file, 'file')
display(['Loading GroundTruth ''' GT_file ''' ...']); display(['Loading GroundTruth ''' GT_file ''' ...']);
GroundTruth = imread(GT_file); GroundTruth = imread(GT_file);
if max(max(GroundTruth)) == 1 if max(max(GroundTruth)) == 1
GroundTruth*=255; GroundTruth=GroundTruth*255;
end end
else else
error(['The ground truth ''' GT_file '''doesn''t exist.']) error(['The ground truth ''' GT_file '''doesn''t exist.'])

View File

@@ -8,6 +8,10 @@ function [Data] = importfile(fileToRead1)
% Import the file % Import the file
rawData1 = importdata(fileToRead1); rawData1 = importdata(fileToRead1);
if isstruct(rawData1)
rawData1=rawData1.data;
end
% For some simple files (such as a CSV or JPEG files), IMPORTDATA might % For some simple files (such as a CSV or JPEG files), IMPORTDATA might
% return a simple array. If so, generate a structure so that the output % return a simple array. If so, generate a structure so that the output
% matches that from the Import Wizard. % matches that from the Import Wizard.