1. A method comprising: causing capture of at least one image of a scene comprising a foreground object by at least one rolling shutter sensor of an apparatus to generate a pattern in an image region of the foreground object in the at least one image, the pattern comprising at least a series of alternate dark and bright pixel regions, wherein the at least one image is captured by: setting exposure time of the at least one rolling shutter sensor as substantially equal to or less than a read-out time of a set of pixel rows of a plurality of pixel rows of the at least one image; and causing performance of a repeating sequence of an ON state and an OFF state of a flash of the apparatus such that the flash is in the ON state while capturing the set of pixel rows of the plurality of pixel rows, and the flash is in OFF state while capturing a subsequent set of pixel rows of the plurality of pixel rows; and determining a contour of the foreground object in the at least one image based on the pattern in the image region of the foreground object in the at least one image.