在poses目录下,包含00.txt-10.txt 11个序列,每一个文件包换Nx12个表格,N代表帧数。每一行利用3x4转移矩阵代表左边相机系统位姿,转移矩阵将当前帧左边相机系统中的一个点映射到第0帧的坐标系统中。转移矩阵中平移的部分表示当前相机位置(相对于第0帧)。
Groundtruth
sequence 00的地面地图如下图所示:
%% display groundtruth of KITTI poses
% include sequence from 00-10.txt
% read from poses
filename = '/home/qinhaidong/桌面/data_odometry_gray/poses/00.txt';
fid = fopen(filename);
fseek(fid, 0, 'bof');
lastposition = ftell(fid);
disp(['start position:',num2str(lastposition)]);
groundtruth = [];
while fgetl(fid) ~= -1, % end of line check
fseek(fid, lastposition, 'bof');
line = textscan(fid,'%f %f %f %f %f %f %f %f %f %f %f %f\n',1);
line = [line{:}];
transform = vec2mat(line,4);
groundtruth = [groundtruth; [transform(1,4), transform(3,4)]];
lastposition = ftell(fid);
disp(['lastposition:',num2str(lastposition)]);
end
% display ground truth
scatter(groundtruth(:,1),groundtruth(:,2));
fclose(fid);