1. A method of image processing, comprising: receiving at least one video frame of a video sequence, the at least one video frame comprising at least one foreground subject and a background; and processing said at least one video frame so as to separate said at least one foreground subject from said background, wherein said processing comprises: generating a pixel mask comprising information indicating, for each pixel of the at least one video frame, whether the pixel belongs to the foreground subject or to the background; and determining contours of the at least one foreground subject on the pixel mask, said determining of the contours comprising: for each pixel in the at least one video frame, and based on information in the pixel mask, determining whether at least one pixel border belongs to a contour of the at least one foreground subject, the at least one pixel border separating the pixel from a respective at least one adjacent pixel, wherein the at least one pixel border is assigned a first value in case, in the pixel mask, the pixel and the respective adjacent pixel belong one to the foreground subject and the other to the background, and the at least one pixel border is assigned a second value in case, in the pixel mask, both the pixel and the respective adjacent pixel belong either to the foreground subject or to the background.