1. A method of producing a rendered image with a blurred background from an initial image and a depth map of the image, said depth map identifying at least one foreground region and at least one background region of the image, said method comprising the steps of: determining an edge visibility measure for at least one edge in the depth map by comparing a parameter value associated with a pixel in the foreground region near the edge with a parameter value associated with another pixel in the background region near the edge; applying a spatially variable blur to the depth map to produce a compositing matte, wherein a size of a blur kernel used to form the spatially variable blur is dependent on the determined edge visibility measure; applying a blur to image data in at least one background region of the depth map to form normalized blurred background image data; and compositing the blurred background image data with the initial image in a weighted average defined by the compositing matte to produce the rendered image with the blurred background.