view scene_classification/loadClassificationOutput.m @ 2:dcaf371d33e3

add a script to iterate over collected outputs and invoke the evaluator
author Dan Stowell <dan.stowell@elec.qmul.ac.uk>
date Tue, 07 May 2013 13:42:10 +0100
parents 2c9915c861d8
children
line wrap: on
line source
function [fileID,classID] = loadClassificationOutput(filename)

% Open raw file
fid = fopen(filename,'r');

% Read 1st line
tline = fgetl(fid);
fileID{1} = char(sscanf(tline, '%s\t%*s'));
classID{1} = char(sscanf(tline, '%*s\t%s'));

% Read rest of the lines
i=1;
while ischar(tline)
    i = i+1;
    tline = fgetl(fid);
    if (ischar(tline))
        
        fileID{i} = char(sscanf(tline, '%s\t%*s'));
        classID{i} = char(sscanf(tline, '%*s\t%s'));

    end;
end

% Close file
fclose(fid);