Method and device for determining depth using a non-parallel stereoscopic vision system.
Patent Information
- Application Number
- FR2023003330
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-04-04
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2043-04-04
Smart Images

Figure 00000030_0000 
Figure 00000031_0000 
Figure 00000031_0001
Abstract
Description
Title of the invention: Method and device for determining depth using a non-parallel stereoscopic vision system. Technical field
[0001] The present invention relates to methods and devices for determining a depth by means of a stereoscopic vision system on board a vehicle, for example in a motor vehicle. The present invention also relates to a method and a device for measuring such a depth. The present invention also relates to a method and a device for controlling one or more AD AS systems on board a vehicle from the determined depth. Technological background
[0002] Many modern vehicles are equipped with so-called AD AS (Advanced Driver-Assistance System). Such AD AS systems are passive and active safety systems designed to eliminate the element of human error in the driving of vehicles of all types. AD AS use advanced technologies to assist the driver while driving and thus improve their performance. AD AS use a combination of sensor technologies to perceive the environment around a vehicle, then provide information to the driver or act on certain vehicle systems.
[0003] There are several levels of ADAS, such as rearview cameras and blind spot sensors, lane departure warning systems, adaptive cruise control and automatic parking systems.
[0004] The AD AS embedded in a vehicle are supplied with data obtained from one or more embedded sensors such as, for example, cameras. These cameras make it possible in particular to detect and locate other road users or possible obstacles present around a vehicle in order, for example: - to adapt the vehicle's lighting according to the presence of other users; - to automatically regulate the vehicle speed; - to act on the braking system in the event of a risk of impact with an object.
[0005] The proper functioning of the driving assistance peripherals using this data therefore depends on the quality of the data emitted by a vision system.
[0006] Summary of the present invention
[0007] An object of the present invention is to solve at least one of the problems of the technological background described above.
[0008] Another object of the present invention is to improve the quality of the data obtained of these cameras.
[0009] Another object of the present invention is to improve road safety.
[0010] According to a first aspect, the present invention relates to a method for determining a depth by a stereoscopic vision system on board a vehicle, the stereoscopic vision system comprising a set of cameras of at least two cameras arranged so as to each acquire an image of a scene from a different point of view, the optical axes representative of an orientation of the field of vision of each camera being oriented in a non-parallel manner. The method is characterized in that it comprises the following steps: - reception of first and second data respectively representative of a first and second image acquired by respectively a first and second camera of the set of cameras at the same first acquisition time instant; - determining a set of pixels in the second image corresponding to a first set of pixels in the first image. - calculating first depths associated with the first set of pixels of the first image as a function of disparity values determined from the set of pixels of the second image and the first set of pixels of the first image; - determination of a first visibility mask associated with the first image and representative of a second set of pixels of the first image having at least one corresponding pixel in the second image, the first visibility mask being determined by an optical flow calculation method; - reception of third data representative of a third image acquired by the first camera at a second acquisition time instant prior to the first acquisition time instant of the first image; - calculating second depths associated with a third set of pixels of the first image via a monoscopic vision system from a set of pixels of the third image corresponding to the third set of pixels of the first image and the third set of pixels of the first image, the monoscopic vision system being formed of the first camera; - first automatic learning of the monoscopic vision system under supervision of the stereoscopic vision system by minimizing a first calculation error between the first and second depths as a function of the first visibility mask.
[0011] The method thus makes it possible to calculate the depth of an object in the first image seen by the monoscopic vision system with the metric precision of the stereoscopic vision system.
[0012] According to a method variant, the first automatic learning is obtained by minimization of the following function representing the first error:
[0013] v- / \ n / \ / > i, \ = Vs(p t} He D tm (p ) -D (p ) || i \ i , \ t / tsx '7 2 1
[0014] With: - corresponds to a loss of recalibration of the first depth compared to the second depth; - Pj is a pixel of the first image; ■ V^p ) is information on the visibility of the pixel Pt by the stereoscopic vision system; - Dtm is the second depth calculated for a pixel Pt; and - Dts is the first depth calculated for a pixel Pt.
[0015] The supervision of the monoscopic vision system by the stereoscopic vision system thus makes it possible to adjust the depths calculated by the monoscopic vision system.
[0016] According to another variant, the method further comprises a second automatic learning of the stereoscopic vision system under supervision of the monoscopic vision system by minimizing a second calculation error between the first and second depths as a function of the first visibility mask.
[0017] According to another variant, the method further comprises a step of determining a second visibility mask associated with the first image and representative of a fourth set of pixels of the first image having at least one corresponding pixel in the third image, the second visibility mask being determined by the optical flow calculation method, the second automatic learning being furthermore a function of said second visibility mask.
[0018] The use of the second visibility mask for the second automatic learning thus makes it possible to exclude aberrant depth values calculated by the monoscopic vision system.
[0019] According to an additional variant, the method further comprises a step of determining a mask of dynamic objects associated with the first image and representative of a fifth set of pixels of the first image associated with at least one object moving in the scene, the second automatic learning being furthermore a function of the mask of dynamic objects.
[0020] The use of the dynamic object mask for the second automatic learning thus makes it possible to exclude depth values distorted by the inherent movement of an object in the scene.
[0021] According to another variant of the method, the second automatic learning is obtained, in addition, by minimizing the following function representative of the second error: = [!<,(?,) ] ( ) He M?,) ~ D , M II : ts 2 / - corresponds to a loss of recalibration of the second depth compared to the first depth; - Pt is a pixel of the first image; - ^^P ) is information on the visibility of the pixel Pt by the stereoscopic vision system; - Vm(p) is information on the visibility of the pixel Pt by the monoscopic vision system; - P) is motion information obtained from the mask of dynamic objects; ■ ( p J cst said second depth calculated for a pixel Pt; and ■ D^p is said first depth calculated for a pixel Pt.
[0022] The monoscopic vision system thus makes it possible to refine the depths calculated by the stereoscopic vision system only in the areas occluded for the stereoscopic vision system, the monoscopic vision system being less precise than the stereoscopic vision system.
[0023] According to a variant of the method, the first depths are calculated via a convolutional neural network with self-supervised learning, the method further comprising the steps of: - reconstruction of a fourth image from the first image and the first depths; - obtaining a first reconstruction error by comparing the second and fourth images, the convolutional neural network being learned in a self-supervised manner based on the first reconstruction error.
[0024] According to another variant of the method, the second depths are calculated via a convolutional neural network with self-supervised learning, the method further comprising the steps of: - reconstruction of a fifth image from the first image and the second depths; - obtaining a second reconstruction error by comparing the third and fifth images, the convolutional neural network being learned in a self-supervised manner based on the second reconstruction error.
[0025] Convolutional neural networks are thus able to carry out self-supervised learning in order to optimize their parameters.
[0026] According to a second aspect, the present invention relates to a device for determining a depth by a stereoscopic vision system on board a vehicle, the device comprising a memory associated with at least one processor configured for implementing the steps of the method according to the first aspect of the present invention.
[0027] According to a third aspect, the present invention relates to a vehicle, for example of the automobile type, comprising a device as described above according to the second aspect of the present invention.
[0028] According to a fourth aspect, the present invention relates to a computer program which comprises instructions adapted for executing the steps of the method according to the first aspect of the present invention, in particular when the computer program is executed by at least one processor.
[0029] Such a computer program may use any programming language and be in the form of source code, object code, or intermediate code between source code and object code, such as in a partially compiled form, or in any other desirable form.
[0030] According to a fifth aspect, the present invention relates to a computer-readable recording medium on which is recorded a computer program comprising instructions for carrying out the steps of the method according to the first aspect of the present invention.
[0031] On the one hand, the recording medium may be any entity or device capable of storing the program. For example, the medium may comprise a storage means, such as a ROM memory, a CD-ROM or a microelectronic circuit type ROM memory, or a magnetic recording means or a hard disk.
[0032] Furthermore, this recording medium may also be a transmissible medium such as an electrical or optical signal, such a signal being able to be conveyed via an electrical or optical cable, by conventional or hertzian radio or by self-directed laser beam or by other means. The computer program according to the present invention may in particular be downloaded from an Internet-type network.
[0033] Alternatively, the recording medium may be an integrated circuit in which the computer program is incorporated, the integrated circuit being adapted to perform or to be used in performing the method in question. Brief description of the figures
[0034] Other features and advantages of the present invention will become apparent from the following: Description of the particular and non-limiting examples of embodiment of the present invention below, with reference to the appended figures 1 to 4, in which:
[0035] [Fig.l] schematically illustrates a non-parallel stereoscopic vision system equipping a vehicle, according to a particular and non-limiting exemplary embodiment of the present invention;
[0036] [Fig.2] schematically illustrates a device configured for determining a depth by a stereoscopic vision system on board the vehicle of [Fig.l], according to a particular and non-limiting exemplary embodiment of the present invention;
[0037] [Fig.3] illustrates a flowchart of the different operations of a process for determining a depth by a stereoscopic vision system on board the vehicle of [Fig.1], according to a particular and non-limiting exemplary embodiment of the present invention;
[0038] [Fig.4] illustrates a flowchart of the different steps of a method for determining a depth by a stereoscopic vision system on board the vehicle of [Fig.1], according to a particular and non-limiting exemplary embodiment of the present invention.
[0039] Description of the examples of embodiment
[0040] A method and a device for determining a depth by a stereoscopic vision system, hereinafter called a stereo system, on board a vehicle will now be described in what follows with joint reference to Figures 1 to 4. The same elements are identified with the same reference signs throughout the description which follows.
[0041] According to a particular and non-limiting example of embodiment of the present invention, a method for determining a depth by a stereoscopic vision system on board a vehicle, called a stereo system, is for example implemented by a computer of the on-board system of the vehicle controlling this stereo system.
[0042] The stereo system comprises a set of cameras of at least two cameras arranged so as to each acquire an image of a scene from a different point of view, the optical axes representative of an orientation of the field of vision of each camera being oriented in a non-parallel manner. The stereoscopic vision system is thus said to be non-parallel.
[0043] For this purpose, the method for determining a depth by a stereoscopic vision system on board a vehicle comprises the reception of first and second data respectively representative of a first and second image acquired by respectively a first and second camera of a set of cameras at the same first acquisition time instant, the determination of a set of pixels in the second image corresponding to a first set of pixels of the first image, calculating first depths associated with the first set of pixels of the first image and determining a first visibility mask associated with the first image and representative of a second set of pixels of the first image having at least one corresponding pixel in the second image.
[0044] The method also comprises receiving third data representative of a third image acquired by the first camera at a second acquisition time instant prior to the first acquisition time instant of the first image and calculating second depths associated with a third set of pixels of the first image via a monoscopic vision system formed by the first camera from a set of pixels of the third image corresponding to the third set of pixels of the first image and the third set of pixels of the first image.
[0045] A first automatic learning of a monoscopic vision system is carried out under supervision of the stereoscopic vision system by minimizing a first calculation error between the first and second depths as a function of the first visibility mask, the monoscopic vision system being formed from the first camera.
[0046] [Fig. 1] schematically illustrates a non-parallel stereoscopic vision system equipping a vehicle, according to a particular and non-limiting exemplary embodiment of the present invention.
[0047] Such an environment 1 corresponds, for example, to a road environment formed of a network of roads accessible to the vehicle 10.
[0048] In this example, the vehicle 10 corresponds to a vehicle with a thermal engine, with an electric motor(s) or even a hybrid vehicle with a thermal engine and one or more electric motors. The vehicle 10 thus corresponds, for example, to a land vehicle such as an automobile, a truck, a bus, a motorcycle. Finally, the vehicle 10 corresponds to an autonomous vehicle or not, that is to say a vehicle traveling according to a determined level of autonomy or under the total supervision of the driver.
[0049] The vehicle 10 advantageously comprises several on-board cameras 11, 12, each configured to acquire images of a scene in the environment of the vehicle 10. This set of cameras 11, 12 forms the stereo system. Two cameras 11 and 12 are illustrated in [Fig.l]. The present invention is however not limited to a stereo system comprising two cameras but extends to any stereo system comprising 2 or more cameras, for example 2, 3, 4 or 5 cameras.
[0050] The two cameras 11, 12 have known intrinsic parameters. These parameters consist in particular of: - the focal length fl of the first camera 11; - the focal length f2 of the second camera 12; - distortions which are due to imperfections in the optical system of each camera; - the direction Cl of the optical axis of the first camera 11; - the direction C2 of the optical axis of the second camera 12; and - the respective resolutions of cameras 11, 12.
[0051] The intrinsic parameters characterize the transformation which associates, for an image point, the camera coordinates with the pixel coordinates, in each camera. These parameters do not change if the camera is moved.
[0052] The distortions, which are due to imperfections in the optical system such as defects in the shape and positioning of the camera lenses, will deflect the light beams and therefore induce a positioning deviation for the projected point compared to an ideal model. It is then possible to complete the camera model by introducing the three distortions which generate the most effects, namely radial, decentering and prismatic distortions, induced by defects in curvature, parallelism of the lenses and coaxiality of the optical axes. In this example, the cameras are assumed to be perfect, that is to say that the distortions are not taken into account or that their correction is processed at the time of image acquisition.
[0053] These two cameras 11, 12 are arranged so as to each acquire an image of a scene from a different point of view, the first point of view is for example located on or in the left rearview mirror of the vehicle 10 or at the top of the windshield of the vehicle 10, the second point of view is for example located on or in the right rearview mirror of the vehicle 10 or at the top of the windshield of the vehicle 10. In the case where the two cameras are located at the top of the windshield of the vehicle, they are then placed at a certain distance. In this example, the first camera 11 is located at the top of the windshield of the vehicle 10, the second camera 12 is located in the right rearview mirror of the vehicle 10.
[0054] A first marker is associated with the first camera 11: - the direction of the y axis is defined by the position of the second camera 12, so as to place the second camera 12 on the y axis of the first camera 11. The distance B separating the two cameras 11, 12 is called the reference base (in English “baseline”) and the direction separating the two cameras 11, 12 is that of the y axis; - the direction of the x axis is defined orthogonal to that of the y axis and orthogonal to that of the optical axis Cl of the first camera 11; - the direction of the z axis is defined orthogonal to the directions of the x and y axes. The three axes x, y and z thus form an orthonormal reference frame.
[0055] The extrinsic parameters linked to the position of the cameras 11, 12 are the following parameters: - 3 translations in the x, y and z directions: Tx, Ty and Tz constituting the translation vector T; and - 3 rotations around the x, y and z axes: Rx, Ry and Rz, constituting the rotation matrix R.
[0056] Determining the extrinsic parameters constitutes the problem of calibrating a stereoscopic vision system.
[0057] A main constraint of the stereoscopic vision system used in automobiles is, for example, the large distance between the two cameras. Indeed, to be able to cover a measurement range of 200 meters, the "baseline" must reach 60cm for the cameras commonly used in this field.
[0058] The two cameras 11, 12 acquire images of a scene located in front of the vehicle 10, the first camera covering only a first acquisition field 13, the second camera covering only a second acquisition field 14 and the two cameras 11, 12 both covering a third acquisition field 15. The first and third acquisition fields 13, 15 thus allow a monoscopic vision of the scene by the first camera 11, the second and third acquisition fields 14, 15 allow a monoscopic vision of the scene by the second camera 12 and the third acquisition field 15 allows a stereoscopic vision of the scene by the stereoscopic vision system composed of the two cameras 11, 12.
[0059] An obstacle 18 is placed in the acquisition field of the cameras, for example in the third acquisition field 15. The presence of the obstacle 18 defines an occlusion field for the stereo system composed here of the three fields 16, 17 and 19.
[0060] Among these three fields, field 16 is visible from the second camera 12. The part of the scene present in this field 16 is therefore observable using the monoscopic vision system composed of the second camera 12.
[0061] The field 17 is visible from the first camera 11. The part of the scene present in this field 17 is therefore observable using the monoscopic vision system composed of the second camera 11.
[0062] Finally, field 19 is not visible from any of the cameras. The part of the scene present in this field 19 is therefore not observable.
[0063] The directions C1, C2 of the optical axes representative of an orientation of the field of vision of each camera are oriented non-parallel so as to obtain the third acquisition field 15 of the environment 1 as wide as possible.
[0064] It is obvious that it is possible to use such a stereoscopic vision system to take images of scenes located on the sides or behind the vehicle 10 by equipping it with differently placed and oriented cameras.
[0065] The images acquired by the cameras 11, 12 at a given acquisition time instant tl are presented in the form of data representing pixels characterized by: - coordinates in each image; and - data relating to the colors and brightness of objects in the observed scene in the form, for example, of RGB colorimetric coordinates (from the English “Red Green Blue”) or TSL (Tone, Saturation, Brightness).
[0066] The images acquired by the cameras 11, 12 represent views of the same scene taken from different viewpoints, the positions of the cameras being distinct. On this scene are found for example: - buildings; - road infrastructure; - other stationary users, for example a parked vehicle; and / or - other mobile users, for example another vehicle, a cyclist or a moving pedestrian.
[0067] These images are sent to a computer of a device equipping the vehicle 10 or stored in a memory of a device accessible to a computer of a device equipping the vehicle 10.
[0068] [Fig.2] schematically illustrates a device 4 configured for the determination of a depth by a stereoscopic vision system on board a vehicle 10, according to a particular and non-limiting exemplary embodiment of the present invention. The device 4 corresponds for example to a device on board the first vehicle 10, for example a computer.
[0069] The device 4 is for example configured for the implementation of the operations and / or steps described with regard to figures 1, 3 and 4. Examples of such a device 4 include, but are not limited to, on-board electronic equipment such as an on-board computer of a vehicle, an electronic calculator such as an ECU (“Electronic Control Unit”), a smartphone, a tablet, a laptop. The elements of the device 4, individually or in combination, can be integrated in a single integrated circuit, in several integrated circuits, and / or in discrete components. The device 4 can be produced in the form of electronic circuits or software (or computer) modules or even a combination of electronic circuits and software modules.
[0070] The device 4 comprises one (or more) processor(s) 40 configured to execute instructions for carrying out the steps of the method and / or for executing the instructions of the software(s) embedded in the device 4. The processor 40 may include integrated memory, an input / output interface, and various circuits known to those skilled in the art. The device 4 further comprises at least one memory 41 corresponding for example to a volatile and / or non-volatile memory and / or comprises a memory storage device which may comprise volatile and / or non-volatile memory, such as EEPROM, ROM, PROM, RAM, DRAM, SRAM, flash, magnetic or optical disk.
[0071] The computer code of the embedded software(s) comprising the instructions to be loaded and executed by the processor is for example stored in the memory 41.
[0072] According to various particular and non-limiting embodiments, the device 4 is coupled in communication with other similar devices or systems (for example other computers) and / or with communication devices, for example a TCU (from the English “Telematic Control Unit” or in French “Telematic Control Unit”), for example via a communication bus or through dedicated input / output ports.
[0073] According to a particular and non-limiting exemplary embodiment, the device 4 comprises a block 42 of interface elements for communicating with external devices. The interface elements of the block 42 comprise one or more of the following interfaces: - RF radio frequency interface, for example Wi-Fi® type (according to IEEE 802.11), for example in the 2.4 or 5 GHz frequency bands, or Bluetooth® type (according to IEEE 802.15.1), in the 2.4 GHz frequency band, or Sigfox type using UBN (Ultra Narrow Band) radio technology, or LoRa in the 868 MHz frequency band, LTE (Long-Term Evolution), LTE-Advanced; - USB interface (from the English “Universal Serial Bus” or “Universal Serial Bus” in French); HDMI interface (from the English “High Definition Multimedia Interface” or “High Definition Multimedia Interface” in French); - LIN interface (from the English “Local Interconnect Network”).
[0074] According to another particular and non-limiting exemplary embodiment, the device 4 comprises a communication interface 43 which makes it possible to establish communication with other devices (such as other computers of the on-board system) via a communication channel 430. The communication interface 43 corresponds for example to a transmitter configured to transmit and receive information and / or data via the communication channel 430. The communication interface 43 corresponds for example to a wired network of the CAN (Controller Area Network) type, CAN FD (Controller Area Network Flexible Data-Rate), FlexRay (standardized by the ISO 17458 standard) or Ethernet (standardized by the ISO / IEC 802-3 standard).
[0075] According to a particular and non-limiting exemplary embodiment, the device 4 can provide output signals to one or more external devices, such as a display screen 440, touch-sensitive or not, one or more speakers 450 and / or other peripherals 460 (projection system) via the output interfaces 44, 45, 46 respectively. According to a variant, one or other of the external devices is integrated into the device 4.
[0076] [Fig. 3] illustrates a flowchart of the different operations of a process 2 for determining a depth by a stereoscopic vision system on board the vehicle of [Fig. 1], according to a particular and non-limiting exemplary embodiment of the present invention.
[0077] The process is for example implemented by one or more processors of one or more computers on board the vehicle 10, for example by a computer controlling the stereo system.
[0078] In a first operation 21, the computer receives first data representative of a first image acquired by a first camera 11 of the set of cameras at a first acquisition time instant t1.
[0079] In a second operation 22, the computer receives second data representative of a second image acquired by a second camera 12 of the set of cameras at the same first acquisition time instant t1.
[0080] The two images received correspond to two views of the same scene taking place around the vehicle 10 at the same given first acquisition time instant tl.
[0081] In order to facilitate the analysis of the two received images, the first and second images are rectified in an operation 23, according to a method known to those skilled in the art. Such a method is described, for example, in “Projective Rectification of Non-Calibrated Infrared Stereo Images with Global Consideration of Distortion Minimization” by Benoit Ducarouge, Thierry Sentenac, Florian Bugarin and Michel Devy of July 16, 2009.
[0082] The rectification method consists of reorienting the epipolar lines so that they are parallel with the horizontal axis of the image. This method is described by a transformation which projects the epipoles to infinity and whose corresponding points are necessarily on the same ordinate.
[0083] A rectification algorithm consists, for example, of 4 steps: - Rotate (virtually) the first camera 11 so that the epipole goes to infinity along the horizontal axis of the reference frame associated with it; - Apply the same rotation to the second camera to end up in the initial geometric configuration; - Rotate the second camera by the rotation associated with the rotation matrix 'R', corresponding to the extrinsic parameter of the starting stereo system; - Adjust the scale in both camera markers.
[0084] It should be noted that this operation 23 is optional, in fact the rectification simplifies the matching of the pixels of the stereo images. The pixel corresponding in the second image to a pixel of the first image (and vice versa) is positioned on the same line. From the knowledge of the epipolar geometry and therefore of a fundamental matrix of the stereo system, the objective is then to determine a pair of projective transformations, called homographies, which reorient the epipolar projections parallel to the lines of the images, therefore to the horizontal axis of the rectified cameras.
[0085] The following operation 24 consists of determining a set of pixels in the second image corresponding to a first set of pixels in the first image, this operation is called “stereo matching” (in English “feature matching”).
[0086] Stereo matching or disparity estimation is the process of finding pixels in stereoscopic views that correspond to the same 3D point in the scene. Rectified epipolar geometry simplifies this process of finding correspondences on the same epipolar line. There is no need to calculate the coordinates of the 3D point to find the corresponding pixel on the same line in the other image. Disparity is the distance d between a pixel and its correspondence in the other image. This disparity is horizontal when the images are rectified, with horizontality defined along the x-direction of the first image.
[0087] The stereo matching operation 24 is performed by implementing a method called optical flow calculation. Such a method is notably described in “UnOS: Unified Unsupervised Optical-flow and Stereo-depth Estimation by Watching Videos” by Yang Wang, Peng Wang, Zhenheng Yang, Chenxu Luo, Yi Yang and Wei Xu from June 2019.
[0088] The optical flow calculation method is carried out, for example, by a convolutional neural network (CNN). This type of tool is commonly used in image processing.
[0089] The output data of this operation 24 is a disparity representative of a displacement between each first pixel of the first set of pixels of the first image and the second pixel corresponding to each first pixel in the second image.
[0090] In an operation 25, a first depth associated with visible pixels of the first set of pixels of the first image is calculated as a function of disparity values associated with these pixels. The first depth associated with a pixel is calculated, for example, according to a formula known to those skilled in the art:
[0091] [Math.l]
[0092] With: ■ Dts ( p J is the depth of the pixel Pt of the first image; - the index s means “stereo” because the depth is calculated here for the stereo system; - the index r means “target”; - / is the focal length fl in pixel units; - B the distance between the two cameras of the stereo system; ■ p ) is the pixel disparity Pt in pixel units, defined as the displacement of one pixel from the first image to the second image, this displacement is horizontal when the images are rectified and the stereoscopic vision system correctly calibrated.
[0093] This calculation is metrically accurate, meaning that the depth measured here is absolute and not relative. In the case where the extrinsic parameters of the system remain unchanged, this depth calculation is very accurate.
[0094] It is possible that a pixel of the first image does not find a corresponding pixel in the second image. This phenomenon is explained by the fact that areas of the first image may be occluded in the second image. Indeed, the difference in point of view of the two cameras 11, 12 does not allow the two cameras 11, 12 to see all the elements of the scene. An object present in the scene, for example the obstacle 18, may mask a second object of the scene, the second object being visible from the point of view of the first camera 11 but being masked by the obstacle 18 from the point of view of the second camera 12.
[0095] An operation 26 for determining the occluded areas of the first image consists of determining a first visibility mask associated with the first image and representative of a second set of pixels of the first image having at least one corresponding pixel in the second image, the first visibility mask being determined by an optical flow calculation method. Such a method is notably described in “UnOS: Unified Unsupervised Optical-flow and Stereo-depth Estimation by Watching Videos” by Yang Wang, Peng Wang, Zhenheng Yang, Chenxu Luo, Yi Yang and Wei Xu of June 2019.
[0096] The definition of a visibility mask is known to those skilled in the art. It is, for example, described in “Occlusion Aware Unsupervised Learning of Optical Flow”, by Yang Wang, Yi Yang, Zhenheng Yang, Liang Zhao, Peng Wang and Wei Xu published on April 4, 2018.
[0097] The determination of the first visibility mask makes it possible not to take into account possible aberrant disparity values for pixels of the first image which have no correspondence in the second image.
[0098] In order to make the calculation of the disparity and the search for the associated pixels more reliable, the convolutional neural network can be trained in a self-supervised manner. This self-supervised learning makes it possible to refine the parameters of the convolutional neural network.
[0099] This self-supervised learning further includes the steps of: - generation of a fourth image from the first image and the first calculated depths; - obtaining a first reconstruction error by comparing the second and fourth images, the convolutional neural network being automatically learned based on the first reconstruction error.
[0100] Such a convolutional neural network is known to those skilled in the art, such as: GCNet (from the English "Global Context Network"), PSMNet (from the English "Pyramid Stereo Matching Network"), PWCNet (from the English "Pyramidal processing, Warping, and the use of a Cost volume Network"). To find the correct values of the parameters (called "weights" in English) of a chosen convolutional neural network, the fourth image called the target image (in English "target") is reconstructed from the second image, called the "source" image pixel by pixel, using the following pixel reconstruction formula:
[0101] [Math.2]
[0102] With: - p* is the reconstructed position of pixel Pt along axis A, the indices 55 mean “source” and “stereo” respectively; - p^ is the position of the pixel Pt along the x axis, the index 1 means “target”; ■ d(p} is the calculated disparity of pixel Pt.
[0103] The convolutional neural network is trained to minimize the various reconstruction errors calculated by loss functions, such as the following functions. The performance of the convolutional neural network is thus evaluated and its parameters optimized.
[0104] The first loss function is based on the photometric error. Once the image source reconstructed from the second image and the calculated disparities, this is compared to the true source image and defined as follows:
[0105] [Math.3] LA O) = O) ■ Ï^Pp O) ))
[0106] With: - Ls is the photometric loss function of the stereo system; - the index s indicates “stereo”; '(?) is the visibility by the stereo system of the reconstructed pixel; - i^p ) is the value of pixel Pt in the target image; ' I^p O) is 'a value of the reconstructed pixel for the stereo system defined from the pixel Pt and O; - O is the depth Dts of a pixel Pt calculated for the stereo system;
[0107] The function J is the photometric error defined as follows:
[0108] [Math.4] s(l(p),î(p)) = (1-a) ■ |l(p) -î(p)| +0C (l-dSSIM(l(p),î(p)))
[0109] With: - t(p) is the value of pixel P in the target image; ' l(pj is 'a value of pixel P in the reconstructed image; - SSIM (from the English “structural similarity index measure”) is a function which takes into account a local structure; and - a is a weighting factor depending in particular on the type of environment.
[0110] The second loss function is based on a consistency of the disparity obtained from the first image to the second image and that obtained in the opposite direction, i.e. from the second image to the first image. Minimizing the output value of this function helps in the convergence of the stereo system architecture. The definition of this function is as follows: [YES] [Math.5] L xc = y Ep | d^ } ~ 1
[0112] With: - Lsc is the coherence loss function for the stereo system; - index 5 indicates “stereoscopic”; - the index c indicates “coherence” (in English “consistency”); - N is a number of pixels of the first image; - P is a pixel of the first image; and - the superscripts (1) and (2) indicate respectively that the disparity is obtained from the first image to the second image and from the second image to the first image.
[0113] The third loss function is generally used to deal with discontinuity at the edge of objects (in English "edge aware smoothness") and is defined as follows:
[0114] [Math.6] 1^,(0, w, )
[0115] With: - O is the depth Dts of a pixel Pt calculated for the stereo system; - VL is a parameter matrix; - ° is the order of a smoothing gradient - an L1 norm of the second-order depth gradients is calculated with VL = 1, and ° = 2; - x and 3' are the dimensions of the first image; - is an environment-dependent hyperparameter; and ■ It( p J is the value of pixel Pt in the target image.
[0116] Thus, using these loss functions, parameters of the convolutional neural network are defined. The result at the output of the calculation is a prediction of a first depth Dtx by the monoscopic vision system associated with at least a first pixel of the first set of pixels of the first image.
[0117] In an operation 31, the computer receives third data representative of a third image acquired by the first camera 11 at a second acquisition time instant t2.
[0118] This acquisition time instant t2 is prior to the first acquisition time instant tl.
[0119] The third data have, for example, been saved in a memory associated with the computer or in a memory of a device on board the vehicle 10 and accessible to the computer implementing the process.
[0120] If the vehicle 10 is moving, then the third image corresponds to a third view of the scene taken from a third point of view, that of the first camera 11 at its position at the second acquisition time instant t2.
[0121] This position of the first camera 11 at the second acquisition time instant t2 is defined by the movement of the vehicle 10 between the times t2 and t1. This movement is therefore linked to the speed of the vehicle 10 during the time separating the first and second acquisition time instants t1 and t2.
[0122] The first camera 11 in the two positions defined in the first and second acquisition time instants tl and t2 form a monoscopic vision system. The intrinsic parameters of this system remain the same as those previously defined related to the first camera 11 for the stereo system. The extrinsic parameters of this monoscopic vision system are the following parameters: - 3 translations in the x, y and z directions: Tx', Ty' and Tz' constituting the translation vector T'; and - 3 rotations around the x, y and z axes: Rx', Ry' and Rz', constituting the rotation matrix R'.
[0123] The extrinsic parameters of the monoscopic vision system are, for example, determined by a computer associated with this same monoscopic vision system. The determination of the extrinsic parameters of the monoscopic vision system is known to those skilled in the art and presented, for example, in the document Unsu-pervised Learning of Depth and Ego-Motion from Video by Tinghui Zhou, Matthew Brown, Noah Snavely and David G. Lowe published on August 1, 2017.
[0124] In an operation 32, a second depth associated with a third set of pixels of the first image is calculated from the first and third images by the monoscopic vision system, such an operation 32 is also described in the previously cited document.
[0125] The fact of avoiding the need to obtain extrinsic parameters via additional sensors allows easier integration of the device for determining a depth by monoscopic vision system in a vehicle 10.
[0126] It is possible that a pixel of the first image does not find a corresponding pixel in the third image. This phenomenon is explained by the fact that areas of the first image may be occluded in the third image. Indeed, the difference in viewpoint of the first camera 11 at the acquisition time instants t1, t2 does not allow the first camera 11 to see all the elements of the scene. An object present in the scene may mask a second object of the scene, the second object being visible from the viewpoint of the first camera 11 at the acquisition time instant t1 but being masked by an obstacle from the viewpoint of the first camera 11 at the acquisition time instant t2.
[0127] An operation 33 for determining the occluded zones of the first image consists of determining a second visibility mask associated with the first image and representative of a fourth set of pixels of the first image having at least one corresponding pixel in the third image, the second visibility mask being determined by the optical flow calculation method previously set out, the optical flow representing a displacement vector between each first pixel of the fourth set of pixels of the first image and the third pixel corresponding to each first pixel in the third image.
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134] In this embodiment, the self-supervised learning of the convolutional neural network associated with the monoscopic vision system is performed in a manner similar to that used for the self-supervised learning of the convolutional neural network associated with the stereo system. This self-supervised learning further includes the steps of: - generation of a fifth image from the first image and the second calculated depths; - obtaining a second reconstruction error by comparing the third and fifth images, the convolutional neural network being automatically learned based on the second reprojection error. Such a convolutional neural network is known to those skilled in the art, such as: GCNet, PSMNet, PWCNet. To find the correct values of the parameters (called "weights") of a chosen convolutional neural network, the fifth image, called the target image, is reconstructed from the third image, called the "source" image pixel by pixel, using the following reprojection formula: [Math.7] P„„ = ^T^p^, With : -77 is a function to convert from homogeneous coordinates to pixel coordinates by removing one dimension from the vector; - K is the intrinsic matrix of the first camera associated with the projection of a point in space (3 dimensions) into the image (2 dimensions); - T is a displacement matrix between the positions of the first camera at the first acquisition time instant tl and at the second acquisition time instant t2; - 0 is a backprojection function of a pixel as a function of its depth; ■ Dîttlp ) is the pixel depth Pt calculated for the mono vision system scopic. The convolutional neural network is trained to minimize the various reconstruction errors calculated by loss functions, such as the following. The performance of the convolutional neural network is thus evaluated and its parameters optimized. The first loss function is based on the photometric error. Once the source image is reconstructed from the first image and the disparities calculated, it is compared to the true source image and defined as follows:
[0135] [Math. 8] O) • s(l(pj. îa(pe o) ) )
[0136] With: - Lm is the photometric loss function of the monoscopic vision system; - the index m indicates “monoscopic”; ' p, (?) is the visibility by the monoscopic vision system of the reconstructed pixel; ■ / (p ) is the value of pixel Pt in the target image; - O) is the value of the reconstructed pixel for the monoscopic vision system defined from the pixel Pt and O; - O is the depth Dtm of a pixel Pt calculated for the monoscopic vision system;
[0137] The function J is the photometric error defined as follows:
[0138] [Math.9] s(l(p),î(p)) = (1-a) ■ |l(p) -î(p)| +0C (l-dSSIM(l(p),î(p))j
[0139] With: - Kp) is the value of pixel P in the target image; ' is the value of pixel P in the reconstructed image; - SSIM (from the English “structural similarity index measure”) is a function which takes into account a local structure; and - a is a weighting factor depending in particular on the type of environment.
[0140] The second loss function is generally used to deal with discontinuity at the edge of objects (in English “edge aware smoothness”) and is defined as follows:
[0141] [Math. 10] O. W,o)=(p,) mo(pt)I)
[0142] With: - O is the optical flow F of a pixel Pt calculated for the monoscopic vision system; - W is a parameter matrix; - 0 is the order of a smoothing gradient; - an L1 norm of second-order depth gradients is calculated with W =1, and0 =2; - x and 3 are the dimensions of the first image; - / 5 is an environment-dependent hyperparameter; and - h^P ) is the value of pixel Pt in the target image.
[0143] Thus, using these loss functions, parameters of the convolutional neural network are defined. The result at the output of the calculation is a prediction of a second depth Dtm by the monoscopic vision system associated with at least a first pixel of the second set of pixels of the first image.
[0144] The prediction of the depth by the monoscopic vision system is not of metric precision. It is therefore necessary, in order to improve the relevance of the second calculated depths, to implement in an operation 27 a supervised automatic learning (in English “knowledge distillation”) of the convolutional neural network making it possible to define the second depth via the monoscopic vision system.
[0145] According to an exemplary embodiment, the convolutional neural network making it possible to calculate the second depth is trained under the supervision of the stereo system so as to minimize the following loss function:
[0146] [Math. 11] v„(p ) He dJ Pi )-D (p) Il I
[0147] With: - L^m corresponds to a loss of recalibration of the first depth compared to the second depth; - Pt is a pixel of the first image; - ip) is information on the visibility of the pixel Pt by the stereo system; - Dtm is the second depth calculated for a pixel Pt; and - Dts is the first depth calculated for a pixel Pt.
[0148] Thus, the second depth calculations are refined, the first depths corresponding to the annotations allowing the learning of the monoscopic vision system.
[0149] A first automatic learning of a monoscopic vision system is carried out under supervision of the stereoscopic vision system by minimizing a first calculation error between the first and second depths as a function of the first visibility mask.
[0150] In an operation 28, it is also possible to train the stereo system with the help of the monoscopic vision system. In order to carry out this second supervised learning, it is appropriate to use only the pixels of the second set of pixels of the first relevant image.
[0151] A second visibility mask has already been determined previously in operation 33.
[0152] The monoscopic vision system is not capable of measuring depth with image reconstruction for pixels associated with a moving object in the scene. Therefore, a dynamic object mask must be determined for the monoscopic vision system.
[0153] In an operation 34, a mask of the dynamic objects associated with the first image and representative of a fifth set of pixels of the first image associated with a moving object in the scene is determined.
[0154] Such a previously defined dynamic object mask is known to those skilled in the art and is presented in the document “Every Pixel Counts ++: Joint Learning of Geometry and Motion with 3D Holistic Understanding” by Chenxu Luo, Zhenheng Yang, Peng Wang, Yang Wang, Wei Xu, Ram Nevatia and Alan Yuille dated July 11, 2019.
[0155] It is also possible to define the mask of dynamic objects using another method, using the following formulas:
[0156] [Math. 12] Mb(pr) = ) ]
[0157] [Math. 13] Md(p.) =
[0158] [Math. 14] 0 ( P^tm ( Pt ) ) = ( Pt ) K^Pf)
[0159] With: ■ p ) is the mask for the static environment applied to the pixel Pt of the first image; ' V^p ) is representative of the visibility of the pixel Pt by the monoscopic vision system; - is the displacement matrix of the first camera between the first acquisition time instant tl and the second acquisition time instant t2; - 0 is the backprojection of a pixel P with its corresponding depth D(p); ■ Dsm[p ) is the depth of a source pixel Ps of the third image calculated for the monoscopic vision system; ■ Dtm(jp ) is the depth of a target pixel Pt of the first image calculated for the monoscopic vision system; - ) is 'C masclue For the dynamic environment applied to the pixel Pt of the first image; - K is the intrinsic matrix of the first camera 11; - || || is the squared error (L2 norm); ■ transforms the pixel vector Pt to the homogeneous coordinate by adding a dimension to the pixel coordinate vector Pt to allow matrix multiplication.
[0160] The hypothesis of Mb is that static points in 3D space do not change their positions during the time separating two consecutive images. The mask Md is constructed by an exponential function with a hyperparameter a to find a good criterion for Mh. The static character of the objects is thus considered in a relative manner, the weighting being implemented via the exponential function.
[0161] It is noted here that for the monoscopic vision system, the previously described function allowing the calculation of the photometric error must be multiplied by
[0162] Taking into account the second visibility mask and the mask of dynamic objects thus makes it possible to exploit the depths calculated for the monoscopic vision system by using them as annotated values during the supervised learning of the stereo system. Thus, the parameters of the convolutional neural network making it possible to calculate the first depths can be adjusted during operation 28 using the loss function defined such that:
[0163] [Math. 15] = il D^(pf)-Djpt) il j
[0164] With: - corresponds to a loss of recalibration of the second depth compared to the first depth; - Pt is a pixel of the first image; - ^(p) is information on the visibility of pixel Pt by the stereo system; ' Vm(p ) is information on the visibility of pixel Pt by the monoscopic vision system; ■ Md[ p ) is motion information obtained from the mask of dynamic objects; - Dtm is the second depth associated with an object; and - Dt,s is the first depth associated with an object.
[0165] Thus, the first depth calculations are refined, the second depths corresponding to the annotations allowing the learning of the stereoscopic vision system.
[0166] If the ADAS uses the first or second depths as input data to determine the distance between a part of the vehicle 10, for example the front bumper, and another user present on the road, the ADAS is then able to determine this distance precisely. For example, if the ADAS has the function of acting on a braking system of the vehicle 10 in the event of a risk of collision with another road user and the distance separating the vehicle 10 from this same road user decreases significantly, then the ADAS is able to detect this sudden approach and act on the braking system of the vehicle 10 to avoid a possible accident.
[0167] [Fig.4] illustrates a flowchart of the different steps of a method 3 for determining a depth by a stereoscopic vision system on board the vehicle of [Fig.1], according to a particular and non-limiting exemplary embodiment of the present invention. The method is for example implemented by a device on board the first vehicle 10 or by the device 4 of [Fig.2].
[0168] In a first step 21, first data representative of a first image acquired by a first camera 11 of said set of cameras at a first acquisition time instant t1 are received.
[0169] In a second step 22, second data representative of a second image acquired by a second camera 12 of the set of cameras at the same first acquisition time instant t1 are received.
[0170] In a third step 24, a set of pixels in the second image corresponding to a first set of pixels of the first image is determined.
[0171] In a fourth step 25, first depths associated with the first set of pixels of the first image are calculated as a function of disparity values associated with the first set of pixels of the first image.
[0172] In a step 26, a first visibility mask associated with the first image and representative of a second set of pixels of the first image having at least one corresponding pixel in the second image is determined by an optical flow calculation method.
[0173] In a step 31, third data representative of a third image acquired by the first camera 11 of the set of cameras 11, 12 at an acquisition time instant t1 prior to the acquisition time instant t2 is received.
[0174] In a step 32, second depths associated with a third set of pixels of the first image are calculated by the monoscopic vision system.
[0175] In a step 27, a first automatic learning of the monoscopic vision system is carried out under supervision of the stereoscopic vision system by minimizing a first calculation error between the first and second depths as a function of the first visibility mask.
[0176] According to a variant, the variants and examples of the operations described in relation to Figures 1 and 3 apply to the steps of the method of [Fig.4].
[0177] Of course, the present invention is not limited to the exemplary embodiments described above but extends to a method for determining a depth by a stereoscopic vision system on board a vehicle, which would include secondary steps without thereby departing from the scope of the present invention. The same would apply to a device configured for implementing such a method.
[0178] The present invention also relates to a vehicle, for example an automobile or more generally an autonomous land-based motor vehicle, comprising the device 4 of [Fig.2].
Claims
1. Claims Method for determining a depth by a stereoscopic vision system on board a vehicle (10), the stereoscopic vision system comprising a set of cameras of at least two cameras (11, 12) arranged so as to each acquire an image of a scene from a different point of view, the optical axes representative of an orientation of the field of vision of each camera being oriented in a non-parallel manner, said method being characterized in that it comprises the following steps: - reception (21, 22) of first and second data respectively representative of a first and second image acquired by respectively a first and second camera (11, 12) of said set of cameras at the same first acquisition time instant; - determination (24) of a set of pixels of said second image corresponding to a first set of pixels of said first image; - calculation (25) of first depths associated with said first set of pixels of the first image as a function of disparity values determined from said set of pixels of the second image and said first set of pixels of the first image; - determination (26) of a first visibility mask associated with said first image and representative of a second set of pixels of said first image having at least one corresponding pixel in said second image, said first visibility mask being determined by an optical flow calculation method; - reception (31) of third data representative of a third image acquired by said first camera (11) at a second acquisition time instant prior to said first acquisition time instant of said first image; - calculation (32) of second depths associated with a third set of pixels of the first image via a monoscopic vision system from a set of pixels of the third image corresponding to said third set of pixels of the first image and said third set of pixels of the first image, said monoscopic vision system being formed of said first camera (11); - first automatic learning (27) of said monoscopic vision system under supervision of said stereoscopic vision system by minimizing a first calculation error between said first and second depths as a function of said first visibility mask.
2. Method according to claim 1, for which said first automatic learning is obtained by minimizing the following function representative of said first error: L^m = YP[vs(pt) || Dlm(pt)~D*(pt) || J With: - corresponds to a loss of registration of the first depth with respect to the second depth; - Pt is a pixel of the first image; - V / P ) is information on the visibility of the pixel Pt by the stereoscopic vision system; - is the second depth calculated for a pixel Pt; and - Dls is the first depth calculated for a pixel Pt.
3. Method according to one of claims 1 to 2, further comprising a second automatic learning (28) of said stereoscopic vision system under supervision of said monoscopic vision system by minimizing a second calculation error between said first and second depths as a function of said first visibility mask.
4. Method according to claim 3, further comprising a step of determining (33) a second visibility mask associated with said first image and representative of a fourth set of pixels of the first image having at least one corresponding pixel in said third image, said second visibility mask being determined by said optical flow calculation method, said second automatic learning being further a function of said second visibility mask.
5. Method according to one of claims 3 to 4, further comprising a step of determining (34) a mask of dynamic objects associated with said first image and representative of a fifth set of pixels of the first image associated with at least one object in motion in said scene; said second automatic learning being furthermore a function of said mask of dynamic objects.
6. Method according to claims 4 and 5, for which said second learning is obtained, in addition, by minimizing the following function representative of the second error: Il d4p:)-d^Pi) || J With: - Lfn-^s corresponds to a loss of registration of the second depth with respect to the first depth; - Pt is a pixel of the first image; - V^p ) is information on the visibility of the pixel Pf by the stereoscopic vision system; ' ) is information on the visibility of the pixel Pt by the monoscopic vision system; - P ) is information on movement obtained from the mask of the dynamic objects; - ^tm ( P ) is 'aditc second depth calculated for a pixel Pt; and ■ Df^p ) is said first depth calculated for a pixel Pt.
7. Method according to one of claims 1 to 6, for which said first depths are calculated via a self-supervised learning convolutional neural network, the method further comprising the steps of: - reconstructing a fourth image from said first image and said first depths; - obtaining a first reconstruction error by comparing said second and fourth images, said convolutional neural network being learned in a self-supervised manner as a function of said first reconstruction error.
8. Method according to one of claims 1 to 7, for which said second depths are calculated via a self-supervised learning convolutional neural network, the method further comprising the steps of: - reconstructing a fifth image from said first image and said second depths; - obtaining a second reconstruction error by comparing said third and fifth images, said convolutional neural network being learned in a self-supervised manner supervised based on said second reconstruction error.
9. Device (4) for determining a depth by a stereoscopic vision system on board a vehicle (10), said device (4) comprising a memory (41) associated with at least one processor (40) configured for implementing the steps of the method according to any one of claims 1 to 8.
10. Vehicle (10) comprising the device (4) according to claim 9.