1. A method of maintaining an occupancy grid map having cells, the method comprising: receiving image data from a sensor of a remote vehicle, the sensor being one of a time-of-flight sensor and a stereo vision camera sensor, the image data including one or more columns of pixels; for each pixel of the image data from the sensor: determining, at a processor operatively connected to the sensor, a direction for the pixel based on a field of view of the sensor; and combining, at the processor, the direction with depth information of the image data for a potential obstacle in the pixel; using, at the processor, the combined direction and depth information to plot points, sequentially, for each column of pixels of the image data, each point representing a distance of the potential obstacle from the remote vehicle and a direction of the potential obstacle; creating, at the processor, one or more best-fit lines from a predetermined number of sequential plotted points; determining, at the processor, a respective slope of each best-fit line, and determining the existence of the potential obstacle if the slope of the best-fit line is above a threshold slope; generating, at the processor, a one-dimensional set of values, derived from the best-fit lines, representing the distance to any obstacle detected by the sensor, each value being indexed by its angle with respect to the field of view of the sensor; updating, at the processor, the occupancy grid map based on the one-dimensional set of values by incrementing a cell of the occupancy grid map, if an obstacle was detected within that cell; and adding, at the processor, a location of the remote vehicle to the occupancy grid map.