Ejemplo n.º 1
0
    def __init__(self, binSize, cellMap, velocities):
        self.binSize = binSize
        self.cellMap = cellMap

        def index(i):
            return max([int(i), 0])

        cells = np.empty((velocities.shape[0], 1))
        for row in range(velocities.shape[0]):
            i, j = velocities[row, ("x", "y")] // binSize
            cells[row] = int(cellMap[index(i), index(j)])

        self.time = velocities.time  # skipping VelocityMatrix init
        columns = velocities.columns + ["cell"]
        newArray = np.append(velocities.array, cells, 1)
        MatrixWrapper.__init__(self, columns, newArray)
Ejemplo n.º 2
0
    def __init__(self, binSize, cellMap, velocities):
        self.binSize = binSize
        self.cellMap = cellMap

        def index(i):
            return max([int(i), 0])

        cells = np.empty((velocities.shape[0], 1))
        for row in range(velocities.shape[0]):
            i, j = velocities[row, ("x", "y")] // binSize
            cells[row] = int(cellMap[index(i), index(j)])

        self.time = velocities.time  # skipping VelocityMatrix init
        columns = velocities.columns + ["cell"]
        newArray = np.append(velocities.array, cells, 1)
        MatrixWrapper.__init__(self, columns, newArray)
Ejemplo n.º 3
0
 def append(self, time, x, y, angle, area):
     if time > self._prevTime:
         self._prevTime = time
         self.frameStarts.append(self._count)
     
     MatrixWrapper.append(self, time, x, y, angle, area)
Ejemplo n.º 4
0
 def __init__(self):
     columns = ["time", "x", "y", "angle", "area"]
     MatrixWrapper.__init__(self, columns)
     
     self._prevTime = -1.0e99
     self.frameStarts = []
Ejemplo n.º 5
0
 def __init__(self, time):
     self.time = time
     columns = ["x", "y", "vx", "vy", "angle"]
     MatrixWrapper.__init__(self, columns)
Ejemplo n.º 6
0
 def __init__(self, tracks):
     columns = ["x", "y", "angle", "area", "time", "id"]
     MatrixWrapper.__init__(self, columns, tracks)