1. A method of determining a property of an image captured by a camera, the method comprising: determining a plurality of vanishing points from the image; associating each pixel of the image with at least one of the vanishing points based on alignment of a pixel edge orientation with a vanishing point direction for each pixel, a similarity of an orientation of an image gradient at each pixel, and a vanishing point direction from each pixel to each of the vanishing points; partitioning the image into a set of regions based on a pair of the vanishing points; constructing a space partition tree by iterating the partitioning; determining a boundary line for each region of the set of regions that passes through at least one of the vanishing points of said pair of vanishing points; determining, for at least one of said regions, a confidence value for the property of the image based on pixels in the at least one region; and determining the property of the image for one or more pixels within said image based on the confidence value.