EP-4740169-A1 - METHOD FOR OBTAINING A STACK OF IMAGES, AND COMPUTER PROGRAM PRODUCT IMPLEMENTING SUCH A METHOD
Abstract
The invention relates in particular to a method for obtaining a stack (P) of images (IC) from an input image (1) dependent on a raw image acquired by a sensor (6) of a camera module (4) through an optical system (7) of the camera module (4), the raw image being representative of a scene (5), the method being implemented by computer and being characterised in that it comprises, for each part of a plurality of separate parts of the input image (1), the following steps: a) determining a corresponding optical transfer function (PSF) between a part (Z) of the scene (7) associated with the part of the input image (1), b) deconvoluting (D) the input image (1), using the determined optical transfer function, to obtain a corrected image (IC), so as to obtain a plurality of corrected images (IC), the plurality of corrected images obtained forming the stack (P) of images.
Inventors
- LEGROS, ERIC
- PETITGRAND, Sylvain
- LUONG, BRUNO
Assignees
- Fogale Optique
Dates
- Publication Date
- 20260513
- Application Date
- 20230708
Claims (11)
- 1. Method for obtaining a stack (P) of images (IC) from an input image (1) depending on a raw image acquired by a sensor (6) of a camera module (4) through an optical system (7) of the camera module (4), said raw image being representative of a scene (5), the method being implemented by computer and being characterized in that it comprises, for each of a plurality of distinct parts of said input image (1), the following steps: a) determining a corresponding optical transfer function (PSF) between a part (Z) of the scene (7) associated with the part of the input image (1), b) deconvolution (D), by the determined optical transfer function, of the input image (1) to obtain a corrected image (IC), so as to obtain a plurality of corrected images (IC), said plurality of corrected images obtained forming said stack (P) of images.
- 2. Method according to claim 1, characterized in that step a) is carried out by determining, in said input image (1), a part (Z, zone) of the scene (5) where objects are all located substantially at the same distance (di) from the sensor (6).
- 3. Method according to claim 1, characterized in that step a) consists in producing a mesh of the input image (1) leading to image portions and in associating with each portion an average optical transfer function between the part of the corresponding scene and the sensor (6) of the camera module (4).
- 4. Method according to any one of claims 1 to 3, characterized in that step b) is carried out by composition by the optical transfer function in the frequency domain.
- 5. Method according to any one of claims 1 to 3, characterized in that step b) is carried out by composition with a correction function resulting from the optical transfer function.
- 6. A method according to any one of claims 1 to 5, further comprising, for each of said plurality of corrected images forming said image stack: - cutting said corrected image into distinct parts of said input image which correspond to the parts of the scene of the identified optical transfer functions, - assigning a sharpness index (NET) to each distinct part of said input image by applying an image sharpness estimator, and - creation of a sharpness index map (CNET) associated with each of said plurality of corrected images (IC).
- 7. Method according to any one of claims 1 to 5, further comprising, for each of said plurality of corrected images (IC) forming said stack (P) of images: - cutting said corrected image (IC) into distinct parts of said input image acquired by said sensor which correspond to the parts of the scene of the identified optical transfer functions, - assigning a parameter representing a distance between said optical system and an object in each distinct portion of said input image using the optical transfer function identified for the scene portion corresponding to the distinct image portion, and - creating said focal length map associated with each of said plurality of corrected images (IC).
- 8. The method of claim 6, further comprising the following steps: - receiving an attention position (x,y) in the input image (1), by choosing a distinct image part in said input image, - identification, in said stack of images, of the corrected image (IC) where the part of the scene corresponding to the position of attention (x, y) in the image is the sharpest, presenting a maximum value of said sharpness index, - selection in the identified corrected image (IC), of the attention position (x, y)NET, and positioning in a reconstituted image (IR), of the selected attention position (x, y)NET, said steps being repeated as many times as necessary for the reconstituted image (IR) to include all the attention positions (x, y)NET of all the corrected images (IC) of the stack (P) of images, the reconstituted image (IR) thus corresponding to said dynamic visualization of the input image.
- 9. Computer program comprising executable instructions which, when executed by computer, implement the steps of the method according to any one of claims 1 to 8.
- 10. Processing device (3) of an input image (1) from a camera module (4), the input image (1) being representative of a scene (5) acquired by a sensor (6) of the camera module (4) through an optical system (7) of the camera module (4), the processing device (3) being configured to: a) determine a corresponding optical transfer function (PSF) between a part of the scene (5) associated with the part of the input image (1), and b) perform the deconvolution (D), by the determined optical transfer function, of the input image (1) to obtain a corrected image (IC), so as to obtain a plurality of corrected images (IC), said plurality of corrected images (IC) obtained forming said stack (P) of images.
- 11. Electronic device (2) comprising a camera module (4) and an image processing device (3) according to claim 10.
Description
METHOD FOR OBTAINING A STACK OF IMAGES, PROGRAMMED PRODUCT COMPUTER SYSTEM IMPLEMENTING SUCH A METHOD FIELD OF THE INVENTION The present invention relates to a method for obtaining an image stack from an input image (or an acquired image). The invention also relates to a computer program product which implements such a device, and to an electronic apparatus comprising such a computer program product. The invention applies to the field of digital images, in particular digital cameras and digital cameras, for example for telephones, tablets or laptops. It can also be applied to images that would be reproduced in a motor vehicle or a flying device, for example to show the driver or pilot specific visual information, or to provide an autonomous driving or piloting system with sharper images. It can also be applied in the medical field, for example to restore images from an observation of a medical diagnosis. It can still be applied in the field of video surveillance to restore sharper images over a great depth of field. STATE OF THE ART When acquiring an image, some areas of the image returned are sharper than others: the sharpness of an area of an acquired and returned image is obtained by taking into consideration the distance at which the image of an object is taken and by adjusting the lens of the camera according to this distance: thus, what is around the object of the acquired image is less sharp than what is in the area corresponding to the lens setting. To obtain an image where all areas appear sharp, it is necessary to vary the focusing conditions for each area appearing in the image: we then obtain a stack of images with sharp areas. different from one image to another: this is a stack of focus-shifted images. We then understand that we must take as many images as there are objects in the image, adjusting the focal length of the camera each time, so that each of the objects in the image are rendered sharp on an image dedicated to it. Another problem also arises: when the object is moving, it is necessary to modify the scene observed during image taking with a spread over time to vary the focusing conditions. An aim of the present invention is to improve the restitution of an image, by ridding the sharpness zone of certain aberrations. Another aim of the invention is to propose a method which does not require acquiring several images so that each object can appear sharp (which is important in particular when, in the scene, the objects are moving) PRESENTATION OF THE INVENTION For this purpose, according to a first aspect, the invention relates to a method for obtaining a stack of images from an input image dependent on a raw image acquired by a sensor of a camera module through an optical system of the camera module, said raw image being representative of a scene, the method being implemented by computer and being characterized in that it comprises, for each of a plurality of distinct parts of said input image, the following steps: a) determining a corresponding optical transfer function between a part of the scene associated with the part of the input image, b) deconvolution, by the determined optical transfer function, of the input image to obtain a corrected image, so as to obtain a plurality of corrected images, said plurality of corrected images obtained forming said stack of images. By such a method, it is thus possible to obtain a stack of images among which each corrected image comprises a distinct clear part of the scene represented by the input image (obtained from the raw image, the input image may correspond to the raw image if the raw image has not undergone any transformation). In other words, from an input image representing a scene, we can obtain a plurality of images where each represents at least part of the scene clearly. Advantageously, step a) is carried out by determining, in said input image, a part of the scene where objects are all located substantially at the same distance from the sensor. Furthermore, step a) consists of producing a mesh of the input image leading to image portions and associating with each portion an average optical transfer function between the corresponding part of the scene and the sensor of the camera module. Preferably, step b) is carried out by composition by the optical transfer function in the frequency domain. According to an alternative embodiment, step b) is carried out by composition with a correction function resulting from the optical transfer function. Advantageously, further, the method also comprises the following steps for each of said plurality of corrected images forming said image stack: - cutting said corrected image into distinct parts of said input image which correspond to the parts of the scene of the identified optical transfer functions, - assigning a sharpness index to each distinct part of said input image by applying an image sharpness estimator, and - creating a sharpness index map associated with each of said plurality of c