1. A method for optimizing processing of at least two images obtained from at least two sources of images, a sub-image of each of the at least two images representing an overlapping area of a real scene, the method comprising: generating a two-dimensional (2D) map representing the overlapping area of the real scene; partitioning the overlapping area of the generated 2D map into a plurality of sub-areas as a function of an occlusion criterion determined for points of the overlapping area; associating an identifier of a source of images with points of the generated 2D map, the associating step being based on the occlusion criterion or on a detection score depending on the sub-areas; and generating a 2D role map based on the generated 2D map and on the associated identifiers, the 2D role map comprising a plurality of parts, all the points of each part of the 2D role map being associated with a single identifier of a source of images so that only one of the at least two sources of images is to be selected to process a representation of a portion of the overlapping area.