1. A method of segmenting image elements in each of a pair of stereo images into at least two segments being a foreground and a background said method comprising the steps of: (i) defining an energy function for probabilistic stereo matching; (ii) approximating that energy function to require computation only over foreground disparities; (iii) using an optimisation algorithm on the approximated energy function to achieve the segmentation.