Subversion Repositories seema-scanner

Rev

Blame | Last modification | View Log | RSS feed

function alnStruct = readMeshLabALN(alnFileName)
% read meshlab aln file
alnStruct = struct([]);

fid = fopen(alnFileName, 'r');
nPointClouds = fscanf(fid, '%d', 1);
for i=1:nPointClouds
    alnStruct(i).FileName = fscanf(fid, '%s \n #', 1);
    TR = fscanf(fid, '%f', 16);
    TR = reshape(TR, 4, 4);
    TR = transpose(TR);
    alnStruct(i).Rotation = TR(1:3, 1:3);
    alnStruct(i).Translation = TR(1:3, 4);
end

fclose(fid);

end