<p>A method of processing an image signal comprising image and depth information is provided. The method is configured to perform segmentation on an image based on depth/disparity information present in the image signal comprising said image, and subsequently inpaint background for correction of the errors in the image around the foreground objects into a region that extends beyond the segment boundary of the foreground object and/or inpaint foreground for correction of errors in the image into a region that extends inside the segment boundary of the foreground object. In this way compression and other artifacts may be reduced.</p>