A method for generating a three-dimensional video stream by starting from a sequence of video images, said sequence comprising a first view (V0), at least one second view (V1) of a scene, as well as a depth map (D0) of said first view (V0), or a disparity map of said at least one second view (V1) with respect to the first view (V0), the method comprising, for one image, the following steps:
- obtaining at least one occlusion image (O1) comprising the occluded pixels of said second view (V1) by starting from said depth map (D0) or from said disparity map;
- generating a compacted occlusion image (OC1) by spatially repositioning said occluded pixels of said at least one occlusion image (O1), so as to move said pixels closer to one another;
- said three-dimensional video stream comprising, for one image, said first view (V0), said depth map (D0) or said disparity map, and said at least one compacted occlusion image (OC1).