A computer implemented modeling system for automatically modeling a three-dimensional space based on a two-dimensional image of the three-dimensional space, the system comprising: means arranged to obtain line segments corresponding to boundaries between surfaces of a three-dimensional space which are visible in the two-dimensional image; means arranged to identify super-pixels and super-pixel boundaries between the super-pixels in the two-dimensional image of the three-dimensional space; means arranged to assign first weighting values to pixels of identified super-pixel boundaries, the first weighting values assigned to pixels of a super-pixel boundary being determined by: assigning a first likelihood value to the super-pixel boundary based upon the perpendicular distance between the super-pixel boundary and a nearest line segment; assigning a second likelihood value to the super-pixel boundary based upon the difference in orientation between the super-pixel boundary and the nearest line segment; calculating the product of the first likelihood value and the second likelihood value; and assigning the product as a first weighting value to pixels of the super-pixel boundary; means arranged to estimate the probability of pixels of the two-dimensional image representing a boundary between two objects in the two-dimensional image and assigning second weighting values to pixels based on the estimated probability; means arranged to determine third weighting values for pixels of the two-dimensional image wherein the third weighting value is the product of the first weighting value and the second weighting value; means arranged to partition a graph formed by the determined third weighting values with a number of partitions corresponding to the number of surfaces of the three-dimensional space which are visible in the two dimensional image to obtain a partitioned graph; means arranged to combine the partitioned graph with the second weighting values to obtain a super-pixel graph by summing the third weighting value and the second weighting value assigned to each pixel; and means arranged to segment the super-pixel graph to form a three-dimensional model of the three-dimensional space shown in the two-dimensional image. means arranged to obtain line segments corresponding to boundaries between surfaces of a three-dimensional space which are visible in the two-dimensional image; means arranged to identify super-pixels and super-pixel boundaries between the super-pixels in the two-dimensional image of the three-dimensional space; means arranged to assign first weighting values to pixels of identified super-pixel boundaries, the first weighting values assigned to pixels of a super-pixel boundary being determined by: assigning a first likelihood value to the super-pixel boundary based upon the perpendicular distance between the super-pixel boundary and a nearest line segment; assigning a second likelihood value to the super-pixel boundary based upon the difference in orientation between the super-pixel boundary and the nearest line segment; calculating the product of the first likelihood value and the second likelihood value; and assigning the product as a first weighting value to pixels of the super-pixel boundary; assigning a first likelihood value to the super-pixel boundary based upon the perpendicular distance between the super-pixel boundary and a nearest line segment; assigning a second likelihood value to the super-pixel boundary based upon the difference in orientation between the super-pixel boundary and the nearest line segment; calculating the product of the first likelihood value and the second likelihood value; and assigning the product as a first weighting value to pixels of the super-pixel boundary; means arranged to estimate the probability of pixels of the two-dimensional image representing a boundary between two objects in the two-dimensional image and assigning second weighting values to pixels based on the estimated probability; means arranged to determine third weighting values for pixels of the two-dimensional image wherein the third weighting value is the product of the first weighting value and the second weighting value; means arranged to partition a graph formed by the determined third weighting values with a number of partitions corresponding to the number of surfaces of the three-dimensional space which are visible in the two dimensional image to obtain a partitioned graph; means arranged to combine the partitioned graph with the second weighting values to obtain a super-pixel graph by summing the third weighting value and the second weighting value assigned to each pixel; and means arranged to segment the super-pixel graph to form a three-dimensional model of the three-dimensional space shown in the two-dimensional image.