Updated showLogs.m

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@300 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2011-07-23 04:02:26 +00:00
parent 649153e1df
commit c38baa61e9

View File

@@ -1,17 +1,17 @@
function showlogs(GT_file, PathPrefix)
function showlogs(PathPrefix, GT_file)
% SHOWLOGS Plot a RTAB-Map results (LogI.txt, LogF.txt). Just put this
% file in the same directory as LogF.txt and LogI.txt files
% generated by RTAB-Map (RTAB-Map's working directory). The files
% must have the same number of lines.
%
% SHOWLOGS(GT_file)
% SHOWLOGS(PathPrefix, GT_file)
% PathPrefix (optional) is a path prefix to put before the loaded
% files (LogI.txt and LogF.txt).
% GT_file (optional) is the Ground Truth file. The Ground Truth is a
% squared bmp file (size must match the log files length) where
% white dots mean loop closures. Grey dots mean 'loop closures to
% ignore', this happens when the rehearsal doesn't match consecutive
% images together.
% PathPrefix (optional) is a path prefix to put before the loaded
% files (LogI.txt, LogF.txt and GT_File).
%
% Dependency : importfile.m
@@ -21,8 +21,8 @@ function showlogs(GT_file, PathPrefix)
set(0,'defaultAxesFontName', 'Times')
set(0,'defaultTextFontName', 'Times')
if nargin < 2, PathPrefix = '.'; end
if nargin < 1, GT_file = ''; end
if nargin < 2, GT_file = ''; end
if nargin < 1, PathPrefix = '.'; end
%---------------------------------------------------------
@@ -319,7 +319,7 @@ lcRejected = sum(LogI(:, 8) == 1)
%%
%Precision-Recall graph
GroundTruthFile = [PathPrefix '/' GT_file];
GroundTruthFile = [GT_file];
if ~isempty(GT_file) && exist(GroundTruthFile, 'file')
PR = getPrecisionRecall(LogI, LogF, GroundTruthFile, 1.0);