1. A method of generating a three dimensional representation of an object in a reference plane, comprising: providing a two dimensional grid of cells that define the reference plane in which at least a portion of the object is located; providing a three dimensional grid of voxels that define a physical volume above the two-dimensional grid of cells; providing a depth map in a processing unit, the depth map comprising distances from a reference point to pixels in an image of the object taken from the reference point, wherein the pixels in the image correspond to features of the object visible in the image; assigning weights in the processing unit to respective ones of the voxels in the three dimensional grid along rays extending from the reference point through the pixels in the image based on the distances in the depth map from the reference point to the respective pixels, wherein a weight value for a voxel is assigned based on whether a depth value for a pixel is greater than or less than or equal to a depth value for the voxel along one of the rays; and forming, from the depth map, a height map in the processing unit, the height map comprising an array of height values in the reference plane based on the assigned weights.