Device for estimating the depth of object elements of a 3D scene comprising: - an optical system itself comprising a light sensor with a plurality of pixels (21, 22, 23) and a lens able to image the object elements (E1, E2, E3) of the scene on the pixels of said light sensor, - means to adjust the focus of the optical system onto any one of the object elements of said scene that are adapted to adjust said focus by fixing on the maximum of light flow coming from said object element and captured by one of the pixels of said pixelated light sensor, and - means suitable for deducing the depth of said object element from the adjustment of said focus on said object element of said scene, characterized in that: - said optical system also comprises a telecentric relay imaging system (3, 4) positioned approximately in the image plane of said lens, able to relay the image of said object elements onto said pixelated light sensor via a system of micro-lenses (41,42,43), and a spatial light modulator, also pixelated, attached to the input of said relay imaging system, where the optical axis of each micro-lens passes through the centre of a different pixel of said pixelated light sensor and through the centre of a different pixel of said spatial light modulator, where each micro-lens is adapted, in combination with said relay imaging system (3,4) and said lens, to image an object element of the scene onto the pixel of said pixelated light sensor that is situated on the optical axis of the micro lens, through the pixel of said spatial light modulator that is also situated on the optical axis of the micro-lens, where the pixels of the spatial light modulator are distributed into one group or a plurality of groups of adjacent pixels (G1,..., Gi,..., GN), - said device also comprises means to control the pixels (51, 52, 53) of the spatial light modulator so that, simultaneously, in each group, one pixel is in the passing state while all the other pixels of the same group are in the blocking state, and so that, in each group, each pixel passes successively into the passing state. - an optical system itself comprising a light sensor with a plurality of pixels (21, 22, 23) and a lens able to image the object elements (E1, E2, E3) of the scene on the pixels of said light sensor, - means to adjust the focus of the optical system onto any one of the object elements of said scene that are adapted to adjust said focus by fixing on the maximum of light flow coming from said object element and captured by one of the pixels of said pixelated light sensor, and - means suitable for deducing the depth of said object element from the adjustment of said focus on said object element of said scene, - said optical system also comprises a telecentric relay imaging system (3, 4) positioned approximately in the image plane of said lens, able to relay the image of said object elements onto said pixelated light sensor via a system of micro-lenses (41,42,43), and a spatial light modulator, also pixelated, attached to the input of said relay imaging system, where the optical axis of each micro-lens passes through the centre of a different pixel of said pixelated light sensor and through the centre of a different pixel of said spatial light modulator, where each micro-lens is adapted, in combination with said relay imaging system (3,4) and said lens, to image an object element of the scene onto the pixel of said pixelated light sensor that is situated on the optical axis of the micro lens, through the pixel of said spatial light modulator that is also situated on the optical axis of the micro-lens, where the pixels of the spatial light modulator are distributed into one group or a plurality of groups of adjacent pixels (G1,..., Gi,..., GN), - said device also comprises means to control the pixels (51, 52, 53) of the spatial light modulator so that, simultaneously, in each group, one pixel is in the passing state while all the other pixels of the same group are in the blocking state, and so that, in each group, each pixel passes successively into the passing state.