Mercurial > hg > aasp-d-case-metrics
view scene_classification/loadClassificationOutput.m @ 0:2c9915c861d8
First version
author | emmanouilb <emmanouil.benetos.1@city.ac.uk> |
---|---|
date | Fri, 08 Mar 2013 11:33:20 +0000 |
parents | |
children | dcaf371d33e3 |
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);