Load a ground truth file from /poses, and get a N x 3 x 4 data cube:

In [4]:
cd ../../src/opencv_vision_challenge/


[Error 3] The system cannot find the path specified: u'../../src/opencv_vision_challenge/'
c:\code\rick\opencv_vision_challenge

In [5]:
import numpy as np
import matplotlib as mpl
from matplotlib import pyplot as plt
%matplotlib inline

In [6]:
a = np.loadtxt('00.txt')

In [7]:
a.shape


Out[7]:
(4541L, 12L)

In [8]:
poses = a.reshape(4541, 3, 4)

In [9]:
poses.shape


Out[9]:
(4541L, 3L, 4L)
Extract just the translation vectors from pose matrices:

In [10]:
T = poses[:, :, 3].copy()
T.shape


Out[10]:
(4541L, 3L)
Extract individual coords from the translation vectors:

In [11]:
X = T[:, 0]
Y = T[:, 1]
Z = T[:, 2]

In [12]:
X.shape


Out[12]:
(4541L,)
Plot a 'map' of the data (note: z is forward, x is to the right of the car):

In [13]:
plt.plot(X, Z)
plt.show()



In [13]: