Simulation image generation method, simulation image back annotation method, and related apparatus and device

By utilizing the camera data of the first vehicle to generate a simulated image of the target location of the second vehicle, the problem of insufficient video data for the new vehicle model is solved, enabling more efficient algorithm training and verification.

CN118587667BActive Publication Date: 2026-11-27KUNYI ELECTRONICS TECHNOLOGY (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410621913.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-01
Publication Date
2026-11-27
Estimated Expiration
2042-12-01

AI Technical Summary

Technical Problem

In existing technologies, when injecting video data into the controller of a new vehicle model, the amount of video data is limited, making it impossible to effectively train and verify the algorithm, resulting in low algorithm development efficiency.

Method used

By acquiring camera data from the first vehicle, using the extrinsic parameter matrix of the target camera and the extrinsic parameter matrix of the second camera, the second camera adjacent to the target position is determined. A simulation image is formed based on the real images and depth maps of these cameras, and then injected back into the data processing unit of the second vehicle.

Benefits of technology

This enriched the camera data of the second vehicle, enhanced the adaptability of the data, expanded the scope of application, and improved the efficiency of algorithm training and validation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118587667B_ABST
    Figure CN118587667B_ABST
Patent Text Reader

Abstract

The application relates to a simulation image generation method, a simulation image back-annotation method and related devices and equipment, wherein the method comprises the following steps: acquiring first camera data of a first camera set of a first vehicle and second camera data of a second camera set of a second vehicle; determining at least one second camera adjacent to a target position according to an external parameter matrix of a target camera and external parameter matrices of the second cameras; forming a simulation image matched with the target position based on real images corresponding to the at least one second camera, a depth map and first camera data corresponding to the target camera; and back-annotating the simulation image to a data processing unit of the second vehicle. The simulation image at the target position of the second vehicle is formed by using the first camera data of the first vehicle, the second camera data can be further enriched, the adaptability is enhanced, and the application range is expanded.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method for generating simulated images, a method for reinjecting simulated images, and related apparatus and equipment. Background Technology

[0002] The rapid development of autonomous driving technology relies heavily on data collected in real-world scenarios. During algorithm development, injecting this real-world data back into the controller verifies the algorithm's effectiveness and improves the efficiency of algorithm development and verification.

[0003] Specifically, the controller incorporates an algorithm (such as a neural network used in machine learning). Once the algorithm is developed, the vehicle's cameras can input the captured video data into the controller. The controller's algorithm then processes the captured video data to produce output results, thereby enabling various functions such as target recognition.

[0004] During algorithm development, training and validation of algorithms (such as neural networks) are required. This necessitates injecting various video data into the controller's algorithm. The data source can be real, captured video data or simulated data. However, current technologies require either actual video data captured by the vehicle's camera or simulated video data specifically generated for the new vehicle's camera when injecting video data into the controller of a new vehicle model. Often, the amount of video data injected into a new vehicle model is limited, failing to achieve the desired training and validation results. Summary of the Invention

[0005] In view of this, this application proposes a method for generating a simulated image, a method for re-injecting a simulated image, and related devices and equipment, which can use the first camera data of the first vehicle to form a simulated image of the target position of the second vehicle, further enrich the second camera data of the second vehicle, enhance the adaptability of the second camera data, and expand the application scope of the second camera data.

[0006] According to one aspect of this application, a method for re-injecting a simulated image of a target location is provided. The method includes: acquiring first camera data of a first camera set of a first vehicle and second camera data of a second camera set of a second vehicle, wherein the first camera data includes extrinsic parameter matrices of each first camera, the first camera set includes a preset target camera, the second camera set includes multiple second cameras, the position of the target camera is the same as the preset target position on the second vehicle, the target position is different from the position of each of the second cameras, and the second camera data includes extrinsic parameter matrices of the second cameras and real images captured by the second cameras; determining at least one second camera adjacent to the target position based on the extrinsic parameter matrices of the target camera and the extrinsic parameter matrices of each of the second cameras; forming a simulated image matching the target position based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera; and re-injecting the simulated image into the data processing unit of the second vehicle.

[0007] According to another aspect of this application, a simulated image reinjection device for a target camera is provided. The simulated image reinjection device for a target camera includes: a camera data acquisition module, configured to acquire first camera data of a first camera set of a first vehicle and second camera data of a second camera set of a second vehicle, wherein the first camera data includes the extrinsic parameter matrix of each first camera, the first camera set includes a preset target camera, the second camera set includes multiple second cameras, the position of the target camera is the same as the preset target position on the second vehicle, the target position is different from the position of each of the second cameras, and the second camera data includes the extrinsic parameter matrix of the second camera and real images captured by the second camera; a camera determination module, configured to determine at least one second camera adjacent to the target position based on the extrinsic parameter matrix of the target camera and the extrinsic parameter matrix of each of the second cameras; an image forming module, configured to form a simulated image matching the target position based on the real image and depth map corresponding to each of the at least one second camera and the first camera data corresponding to the target camera; and a reinjection module, configured to reinject the simulated image to the data processing unit of the second vehicle.

[0008] By acquiring the first camera data of the first camera set of the first vehicle and the second camera data of the second camera set of the second vehicle, and then determining at least one second camera adjacent to the target position based on the external parameter matrix of the target camera and the external parameter matrix of each second camera, a simulated image matching the target position is formed based on the real image and depth map corresponding to each of the at least one second camera and the first camera data corresponding to the target camera. Finally, the simulated image is injected back into the data processing unit of the second vehicle. According to various aspects of this application, the first camera data of the first vehicle can be used to form a simulated image of the target position of the second vehicle, further enriching the second camera data of the second vehicle, enhancing the adaptability of the second camera data, and expanding the application breadth of the second camera data. Attached Figure Description

[0009] The technical solution and other beneficial effects of this application will become apparent from the following detailed description of specific embodiments in conjunction with the accompanying drawings.

[0010] Figure 1 A flowchart illustrating a simulated image reinjection method for a target location according to an embodiment of this application is shown.

[0011] Figure 2 A schematic diagram showing the target location and target camera according to an embodiment of this application.

[0012] Figure 3 A block diagram of a simulated image re-injection device for a target camera according to an embodiment of this application is shown.

[0013] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown. Detailed Implementation

[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0015] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.

[0016] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection, an electrical connection, or a connection that allows communication between them; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.

[0017] The following disclosure provides many different implementations or examples for carrying out different structures of this application. To simplify the disclosure, specific examples of components and arrangements are described below. Of course, these are merely examples and are not intended to limit the scope of this application. Furthermore, reference numerals and / or letters may be repeated in different examples; such repetition is for simplification and clarity and does not in itself indicate a relationship between the various implementations and / or arrangements discussed. In addition, examples of various specific processes and materials are provided in this application, but those skilled in the art will recognize the application of other processes and / or the use of other materials. In some instances, methods, means, elements, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of this application.

[0018] Figure 1 A flowchart illustrating a simulated image reinjection method for a target location according to an embodiment of this application is shown. Figure 1 As shown, the simulation image back-injection method for the target location in this application may include:

[0019] Step S1: Obtain the first camera data of the first camera set of the first vehicle and the second camera data of the second camera set of the second vehicle. The first camera data includes the external parameter matrix of each first camera. The first camera set includes a preset target camera. The second camera set includes multiple second cameras. The position of the target camera is the same as the preset target position on the second vehicle. The target position is different from the position of each second camera. The second camera data includes the external parameter matrix of the second camera and the real image captured by the second camera.

[0020] The plurality of first cameras can be installed on a first vehicle, which can be one or more. Similarly, the plurality of second cameras can be installed on a second vehicle, which can also be one or more. It is understood that this application does not limit the number of first and second vehicles.

[0021] The first camera data can be a dataset, including parameters such as the extrinsic parameter matrix and the intrinsic parameter matrix of each first camera. Similarly, the second camera data can also be a dataset, including the extrinsic parameter matrix and the intrinsic parameter matrix of each second camera. It should be noted that the first camera data may also include raw images captured by the first cameras, and the second camera data may also include actual images captured by the second cameras.

[0022] For example, the first vehicle can be an older model, and the second vehicle can be a newer model. Both the data from the first camera and the data from the second camera can be stored in their respective databases.

[0023] The extrinsic parameter matrix and intrinsic parameter matrix of the target camera can be obtained simultaneously or sequentially. The extrinsic parameter matrix may include rotation and translation parameters for transforming coordinates from the world coordinate system to the camera coordinate system. The intrinsic parameter matrix may include parameters specific to the camera, such as focal length, and can be used to transform coordinates from the camera coordinate system to the pixel coordinate system. The intrinsic parameter matrix is ​​typically fixed, while the extrinsic parameter matrix may be related to parameters such as the camera's position and orientation.

[0024] Figure 2 A schematic diagram showing the target location and target camera according to an embodiment of this application.

[0025] like Figure 2As shown, a first vehicle may be equipped with multiple first cameras, and a second vehicle may be equipped with multiple second cameras. Among the multiple first cameras, one of them may be designated as the target camera. This target camera is present on the first vehicle, but there is no corresponding camera in the same position on the second vehicle.

[0026] Specifically, the target camera's position is the same as a preset target position on the second vehicle, but the target position is different from the positions of each of the second cameras. In this embodiment, there is no camera in the second vehicle at the same position as the target camera in the first vehicle. Therefore, several second cameras adjacent to the target position can be used to simulate the images that might be captured when the second camera is installed at the target position.

[0027] Because the positions of the first camera installed on the first vehicle and the second camera installed on the second vehicle are different, or because the models of the first camera and the second camera are different, the viewing angles of the first camera and the second camera differ. Therefore, the camera data from the first vehicle cannot be directly used for the second vehicle. The method described in this application is needed to transform the camera data from the first vehicle before using it for the second vehicle. However, if the position of the second camera is the same as the position of the first camera, the first camera data corresponding to that first camera can be directly transferred to the second camera, which is located in the same position as the first camera.

[0028] Step S2: Based on the external parameter matrix of the target camera and the external parameter matrices of each second camera, determine at least one second camera adjacent to the target position;

[0029] In this embodiment, since there is no camera in the second vehicle at the same location as the target camera, it is necessary to use at least one second camera near the target location of the second vehicle to simulate an image of the target location, so as to compare the image taken after assuming a camera is installed at the target location. It is worth noting that since the external parameter matrix reflects the camera's viewing angle information, the internal parameter matrix is ​​not required in determining at least one second camera adjacent to the target location, thereby improving the selection efficiency of the at least one second camera.

[0030] Further, determining at least one second camera adjacent to the target position based on the extrinsic parameter matrix of the target camera and the extrinsic parameter matrices of each second camera may include:

[0031] Step S21: Extract the first translation parameter, the second translation parameter, and the third translation parameter corresponding to the target camera using the external parameter matrix of the target camera;

[0032] For example, the first vehicle is equipped with C1, C2...C N There are N first cameras, where N is a positive integer. For each first camera, its extrinsic parameter matrix can be obtained. For example, for target camera C1, the first translation parameter, second translation parameter, and third translation parameter in the extrinsic parameter matrix can be represented as t... x(C1) t y(C1) t z(C1) , which represents the translation parameters of the target object captured by the target camera from the world coordinate system to the camera coordinate system.

[0033] Step S22: Extract the fourth translation parameter, fifth translation parameter and sixth translation parameter corresponding to each second camera through the external parameter matrix of each second camera;

[0034] Wherein, the fourth translation parameter, the fifth translation parameter, and the sixth translation parameter can be t in the extrinsic parameter matrix of each of the second cameras. x t y t z , which represents the translation parameters of any target object captured by a second camera from the world coordinate system to the camera coordinate system.

[0035] Step S23: Based on the fourth, fifth, and sixth translation parameters corresponding to each of the second cameras and the first, second, and third translation parameters corresponding to the target camera, calculate the Euclidean distance between each of the second cameras and the target camera to obtain the multiple camera distances corresponding to the multiple second cameras;

[0036] For example, for target camera C1 on the first vehicle and any second camera on the second vehicle, the square root of the translation parameters corresponding to these two cameras can be taken to obtain the Euclidean distance corresponding to that second camera. Specifically, the square root of the sum of the first and fourth translation parameters can be obtained, followed by the square root of the sum of the second and fifth translation parameters, and the square root of the sum of the third and sixth translation parameters. Similarly, the camera distances corresponding to each of the other second cameras can be obtained.

[0037] Step S24: Select at least one second camera with a distance lower than the preset camera distance threshold as at least one second camera adjacent to the target position.

[0038] The camera distance threshold can be set as needed. The at least one second camera can be n second cameras, where n is an integer. Optionally, n can be set to 2 or 3, selecting 2 or 3 second cameras close to the target camera as references.

[0039] By utilizing the extrinsic parameter matrix of the target camera and the extrinsic parameter matrix of each second camera to determine at least one second camera that is close to the target location, the embodiments of this application can improve the accuracy of camera data migration between different vehicles while reducing the amount of data to be calculated.

[0040] Step S3: Based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera, form a simulated image that matches the target position;

[0041] Furthermore, before forming a simulated image matching the target location based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera, the simulated image back-injection method for the target location includes:

[0042] Step S301: Process the real images captured by the at least one second camera based on the SFM algorithm to generate depth maps corresponding to each of the at least one second camera.

[0043] The second camera data can be a dataset comprising multiple real images captured by various second cameras. In step S301, the at least one second camera can be located in the second camera data by its identification number, and then the multiple real images captured by the at least one second camera can be directly extracted.

[0044] The depth map can be used to characterize the distance between a target object captured by a target camera and the target camera, i.e., target depth information. For example, for the second vehicle, a target camera is installed on the left front of the second vehicle. The traffic light captured by the target camera is 10m away from the camera in a straight line, and the pedestrian captured by the target camera is 15m away from the camera in a straight line. In this case, both the traffic light and the pedestrian can be considered as the target object. There can be one or more target objects, and the distance between the target object and the camera of the second vehicle can be specifically measured based on the geometric center of the target object and the optical center of the camera.

[0045] In practical applications, the coordinates of a target object captured by a target camera can be calibrated using the world coordinate system. The origin of the world coordinate system is independent of the specific location of the target camera and can be chosen according to actual needs. Typically, the coordinates of the target object in the world coordinate system cannot be directly projected onto a two-dimensional image and require further transformation. For example, an extrinsic parameter matrix can be used to transform the coordinates in the world coordinate system to the camera coordinate system, and then an intrinsic parameter matrix can be used to transform the corresponding coordinates in the camera coordinate system to the pixel coordinate system. For instance, the origin of the camera coordinate system can be the optical center of the camera, and the origin of the pixel coordinate system can be located at the upper left corner of the captured image.

[0046] The depth information can be obtained through radar detection or binocular vision. It is understood that there are multiple ways to acquire the depth information, and this application is not limited to any particular method.

[0047] Among them, the SFM algorithm, also known as the Structure From Motion (SFM) algorithm, can reconstruct a three-dimensional structure from a series of two-dimensional image sequences containing visual motion information.

[0048] For example, based on the SFM algorithm, adjacent real images from the multiple real images can be selected for pairwise calculation. Then, feature points in different real images are matched, and the corresponding fundamental matrix and intrinsic matrix are calculated. Finally, the depth maps corresponding to each of the at least one second camera are reconstructed based on the fundamental matrix and intrinsic matrix. Each of the at least one second camera corresponds to one depth map. For any one of the at least one second camera, the depth map corresponding to that second camera may include the distance between the target object and that second camera.

[0049] Further, based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera, a simulated image matching the target position is formed, including:

[0050] Step S31: Obtain the internal parameter matrix of each of the at least one second camera;

[0051] In step S31, the internal parameter matrix of each of the at least one second camera can be extracted from the second camera data.

[0052] Step S32: Based on the external parameter matrix of each of the at least one second camera, the internal parameter matrix of each of the second cameras, the depth map and the real image corresponding to each of the at least one second camera, project the pixels of the real image from the pixel coordinate system to the world coordinate system to obtain multiple first pixels in the world coordinate system;

[0053] The target object may include multiple feature points, each corresponding to a pixel in an image captured based on the target object. Each feature point has a first pixel in the world coordinate system. In practical applications, the feature points corresponding to each depth map can be translated to the world coordinate system.

[0054] Due to the difference in perspective between the first camera and the target camera, and because pixels in the pixel coordinate system cannot be directly transformed to coordinates in the world coordinate system, the depth maps are translated to the world coordinate system. This allows for the transformation of the pixels of the multiple real images from the pixel coordinate system to the world coordinate system using the depth maps. In other words, without depth maps, the transformation of the pixels of the multiple real images from the pixel coordinate system to the world coordinate system cannot be achieved. However, by combining the extrinsic parameter matrices of each of the at least one second camera, the intrinsic parameter matrices of each of the at least one second camera, and the depth maps corresponding to each of the at least one second camera, the pixels of the multiple real images can be projected from the pixel coordinate system to the world coordinate system.

[0055] Step S33: Based on the plurality of first pixels and the first camera data corresponding to the target camera, form a simulated image that matches the target position.

[0056] Further, based on the plurality of first pixels and the first camera data corresponding to the target camera, a simulated image matching the target position is formed, including:

[0057] Step S331: Generate the extrinsic parameter matrix of the target position using the extrinsic parameter matrix of the target camera;

[0058] In one example, the extrinsic parameter matrix of the target camera can be directly used as the extrinsic parameter matrix of the target location.

[0059] Step S332: Based on the external parameter matrix of the target position, project some or all of the first pixel points to the camera coordinate system corresponding to the target camera to obtain multiple second pixel points in the camera coordinate system;

[0060] In one example, the transformation relationship between the first pixel and the second pixel can be expressed by formula (1) as follows:

[0061]

[0062] Where X, Y, and Z represent the first pixel of the target object in the world coordinate system; X c Y c Z c These represent the second pixel point of the target object in the camera coordinate system; r in the extrinsic parameter matrix 11 -r 33 A total of 9 parameters represent the rotation parameters of the target object from the world coordinate system to the camera coordinate system; the t in the external parameter matrix x t y t z These represent the translation parameters of the target object as it transforms from the world coordinate system to the camera coordinate system.

[0063] Since the origin of the world coordinate system does not coincide with the origin of the camera coordinate system, when points in the world coordinate system need to be projected onto the image plane, it is necessary to first transform the world coordinate system to the camera coordinate system using an extrinsic parameter matrix. This extrinsic parameter matrix represents the rotation and translation during the transformation process. Of course, since the target object may include multiple feature points, the actual processing object of formula (1) can be the feature points of the target object. From the perspective of the pixel coordinate system, the feature points can be the individual pixels in the captured image.

[0064] Step S333: Based on the plurality of second pixels and the first camera data corresponding to the target camera, form a simulated image that matches the target position.

[0065] The transformation process of formula (1) can be regarded as part of the forward transformation process, and the process of step S32 can be called the inverse transformation process.

[0066] It should be noted that this application primarily uses three coordinate systems—world coordinate system, camera coordinate system, and pixel coordinate system—to calibrate the positions of the target object and the target camera. Those skilled in the art will understand that coordinate transformations can have other possible variations, and this application does not limit the transformations between these coordinate systems.

[0067] Further, based on the extrinsic parameter matrix of the target location, some or all of the first pixel points are projected onto the camera coordinate system corresponding to the target camera to obtain multiple second pixel points in the camera coordinate system, including:

[0068] Step S3321: Obtain the field of view of the target camera;

[0069] The field of view of the target camera can be the maximum field of view that the target camera can observe. For example, if the target camera is installed at the front left of the vehicle, the maximum field of view it can observe can be 120 degrees; if the target camera is installed at the front right of the vehicle, the maximum field of view it can observe can be 180 degrees. The field of view of the target camera can be different at different positions. In other words, the maximum field of view that the target camera can observe can be related to the coordinates of the target camera itself.

[0070] Step S3322: Determine whether each of the plurality of first pixels is within the field of view;

[0071] Step S3323: If the first pixel is within the field of view, project the first pixel onto the camera coordinate system corresponding to the target position; if the first pixel is outside the field of view, filter the first pixel.

[0072] It should be noted that the field of view of the target camera can be related to factors such as the camera's installation location and performance, and the field of view of the target camera is limited. For example, the field of view of the target camera can capture a range of 120 degrees horizontally and 120 degrees vertically. Therefore, when projecting each first pixel, it is necessary to determine whether each of the plurality of first pixels is located within the field of view.

[0073] The target object can be selected as needed. The target object corresponding to the first image captured by the first camera is the same as the target object corresponding to the real image captured by the second camera. Both the first camera and the second camera can capture the same target object from different perspectives.

[0074] Specifically, if the first pixel is within the field of view, it can be directly projected onto the camera coordinate system corresponding to the target position; if the first pixel is outside the field of view, it can be filtered out. By determining whether each of the plurality of first pixels is within the field of view, this embodiment of the application can reduce the amount of coordinate data in the coordinate projection process and improve the generation efficiency of simulation graphics.

[0075] Furthermore, the first camera data also includes the internal parameter matrix of each first camera. Based on the plurality of second pixels and the first camera data corresponding to the target camera, a simulated image matching the target position is formed, including:

[0076] Step S3331: Obtain the intrinsic parameter matrix of the target camera;

[0077] In step S3331, the intrinsic parameter matrix of the target camera can be extracted from the first camera data.

[0078] Step S3332: Generate the intrinsic parameter matrix of the target position using the intrinsic parameter matrix of the target camera;

[0079] In one example, the intrinsic parameter matrix of the target camera can be directly used as the intrinsic parameter matrix of the target location.

[0080] Step S3333: Based on the internal parameter matrix of the target position, project each of the plurality of second pixels to the pixel coordinate system corresponding to the target position to obtain a plurality of third pixels in the pixel coordinate system;

[0081] In one example, the transformation relationship between the second pixel and the third pixel can be expressed by formula (2) as follows:

[0082]

[0083] Among them, X c Y c Z c x and y represent the second pixel of the target object in the camera coordinate system; x and y represent the third pixel of the target object in the pixel coordinate system; c in the intrinsic parameter matrix x c y These represent the pixel coordinates on the image corresponding to the origin of the camera coordinate system; f in the intrinsic parameter matrix x f y It can represent the camera's focal length.

[0084] Furthermore, distortion factors can be considered during the process of transforming the second pixel to the third pixel using the intrinsic parameter matrix. For example, radial distortion coefficients and tangential distortion coefficients can be added to the intrinsic parameter matrix. Adding distortion factors can improve the problem of offset and deformation between theoretically calculated pixels and actual pixels. In practical applications, whether to add distortion factors can be determined according to actual needs, and this application does not limit it.

[0085] It should be noted that formula (2) is based on the principle of camera projection. The transformation process of formula (2) can also be regarded as part of the forward transformation process. In this application, the first pixel can be the coordinates of the target object in the real world, which are three-dimensional; the second pixel can be the intermediate coordinates, which are also three-dimensional; the third pixel can be the coordinates of the target object in the captured image, which are two-dimensional.

[0086] Step S3334: Based on the plurality of third pixel points, form a simulation image that matches the target position.

[0087] The simulated image can be used in the second vehicle. For example, the simulated image can be input into the data processing unit of the second vehicle so that the data processing unit can use the simulated image for training, verification, or testing.

[0088] It should be noted that during the processing of the depth maps, it is assumed that the directions of the virtual viewpoint extrinsic parameters at the target location are consistent. Considering that the extrinsic parameters r11-r33 are consistent in both the virtual camera and the target camera involved in the target location process, only the translation difference of the viewpoint needs to be considered, without considering the rotation difference. For ease of understanding, it can also be considered that the at least one second camera is a camera relatively close to the target location. Therefore, the orientation of each second camera in the at least one second camera is similar to the orientation of the target camera, with slight deviations in left, right, up, and down positions, resulting in viewpoint deviations. Therefore, translation can be implemented during the processing of the depth maps.

[0089] Step S4: Reinject the simulated image into the data processing unit of the second vehicle.

[0090] Further, the simulated image is reinjected into the data processing unit of the second vehicle, including:

[0091] Step S41: Use bilinear interpolation algorithm and / or image inpainting algorithm to fill in the missing pixels in the simulation image to obtain a fitted image corresponding to the target position;

[0092] Each pixel in the simulated image may correspond to a fixed RGB value (e.g., grayscale). Missing or damaged pixels can be repaired using bilinear interpolation and / or image inpainting algorithms. For example, the simulated image can also be completed based on semantic information. The image inpainting algorithm may be based on Generative Adversarial Networks (GANs).

[0093] It should be noted that the bilinear interpolation algorithm and the image inpainting algorithm can be used simultaneously or one of them can be used. Those skilled in the art will understand that the bilinear interpolation algorithm and the image inpainting algorithm have various implementations, and this application does not limit the specific implementation of the bilinear interpolation algorithm and the image inpainting algorithm.

[0094] Step S42: The fitted image is reinjected into the data processing unit of the second vehicle.

[0095] The fitted image may be one or multiple images. If there are multiple fitted images, they can be further fused to make the fitted image at the target location more closely resemble the actual situation.

[0096] Further, reinjecting the fitted image into the data processing unit of the second vehicle may include:

[0097] Step S421: Input the fitted image that matches the target camera into the data processing unit of the second vehicle for neural network training to obtain the training value corresponding to the target position;

[0098] For example, the second vehicle may include an industrial control computer and an injection device. The fitted image can be decoded as video data by the industrial control computer (also known as a real-time machine), and then injected into the data processing unit via the injection device (e.g., a video injection board). The algorithm of the data processing unit can be based on a neural network model, which is trained using the fitted image as input to obtain training values ​​corresponding to the target position.

[0099] Step S422: Compare the training value with the real value collected by the camera installed at the target location to obtain the comparison result corresponding to the training value;

[0100] In one example, the training values ​​can be compared with the actual values ​​captured by a camera installed at the target location. The comparison result can be equal or unequal. If the comparison result is equal, it means that the fitted image can fit the actual image captured by the camera installed at the target location well; if the comparison result is unequal, it means that the fitted image cannot fit the actual image captured by the camera installed at the target location well, and the neural network model needs to be readjusted.

[0101] Step S423: Adjust the neural network model in the data processing unit according to the comparison result.

[0102] The neural network model may include network models such as DNN, CNN, LSTM, ResNet, etc. This application does not limit the type of neural network model.

[0103] In one embodiment, since there is usually a lot of overlap between the simulated image (or fitted image) and the real image, the simulated image (or fitted image) and the real images captured by each second camera can be stitched together based on the overlapping parts to form a verification image. Simultaneously, the real images may also have a lot of overlap, so the real images captured by each second camera can be stitched together based on the overlapping parts to form a reference image. Then, the similarity between the verification image and the reference image is compared to obtain similarity evaluation information used to characterize the similarity. For example, if the similarity evaluation information is positively correlated with the similarity, the simulated image can be back-injected when the similarity evaluation information is higher than the similarity threshold; otherwise, no back-injection is performed. If the similarity evaluation information is negatively correlated with the similarity, the simulated image can be back-injected when the similarity evaluation information is lower than the similarity threshold; otherwise, no back-injection is performed. Furthermore, the simulated image (or fitted image) can be back-injected synchronously with other real images.

[0104] By using the above scheme of determining whether to back-inject simulated or fitted images based on similarity, the embodiments of this application can avoid back-injecting images with poor simulation or fitting results (e.g., poor accuracy), and solve the problem that back-injection may cause mismatches in the synchronously back-injected images observed by the data processing unit, thereby improving the training, verification, and testing effects of the algorithm.

[0105] It should be noted that the above solution is mainly applicable to situations where there is no need to fill in missing pixels in the simulation image, but it may also be applied to situations where there are missing pixels.

[0106] In one example, both cases where pixels need to be filled and cases where there are no missing pixels need to be filled can be considered. In this case, since the differences between images with missing pixels may be due to defects in the filling algorithm or other related defects, different similarity thresholds can be used for different cases. For example, for the case of missing pixels, if the missing pixels need to be filled (i.e., the image to be injected is a fitted image), the first similarity threshold can be determined; if there are no missing pixels to be filled (i.e., the image to be injected is a simulated image), the second similarity threshold can be determined. Furthermore, if the similarity evaluation information is positively correlated with the similarity, the first similarity threshold is less than the second similarity threshold; if the similarity evaluation information is negatively correlated with the similarity, the first similarity threshold is greater than the second similarity threshold.

[0107] In summary, this application utilizes coordinate mapping relationships and depth maps to fit simulated images of the target position's viewpoint by adapting and adjusting the data from the first and second cameras. This allows the first camera data to be adapted to the second vehicle, further enriching the second camera data for the second vehicle, enhancing its adaptability, and expanding its application scope. Furthermore, the adapted simulated images can be used for neural network training, thereby improving the training accuracy of the neural network. Simultaneously, the rapid adaptation of the first and second camera data to new vehicle models also improves the efficiency of new vehicle model development and testing.

[0108] Figure 3 A block diagram of a simulated image re-injection device for a target camera according to an embodiment of this application is shown.

[0109] like Figure 3 As shown, the simulated image reinjection device 30 for the target camera in this embodiment may include:

[0110] The camera data acquisition module 31 is used to acquire first camera data of the first camera set of the first vehicle and second camera data of the second camera set of the second vehicle. The first camera data includes the external parameter matrix of each first camera. The first camera set includes a preset target camera. The second camera set includes multiple second cameras. The position of the target camera is the same as the preset target position on the second vehicle. The target position is different from the position of each second camera. The second camera data includes the external parameter matrix of the second camera and the real image captured by the second camera.

[0111] The camera determination module 32 is used to determine at least one second camera adjacent to the target position based on the external parameter matrix of the target camera and the external parameter matrix of each second camera.

[0112] The image forming module 33 is used to form a simulated image that matches the target position based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera.

[0113] The back-injection module 34 is used to back-inject the simulated image into the data processing unit of the second vehicle.

[0114] In addition, this application provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements a method for simulating image back-injection at the target location.

[0115] Furthermore, this application also provides an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement a simulated image back-injection method for the target location.

[0116] Figure 4 A schematic diagram of the structure of an electronic device according to an embodiment of this application is shown.

[0117] like Figure 4 As shown, the electronic device can be used to implement a simulated image re-annotation method for the target location. Specifically, the electronic device may include a computer system. It should be noted that... Figure 3 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0118] like Figure 3 As shown, the computer system includes a Central Processing Unit (CPU) 1801, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1802 or programs loaded from storage portion 1808 into Random Access Memory (RAM) 1803, such as performing the methods described in the above embodiments. The RAM 1803 also stores various programs and data required for system operation. The CPU 1801, ROM 1802, and RAM 1803 are interconnected via a bus 1804. An Input / Output (I / O) interface 1805 is also connected to the bus 1804.

[0119] The following components are connected to I / O interface 1805: an input section 1806 including a keyboard, mouse, etc.; an output section 1807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1808 including a hard disk, etc.; and a communication section 1809 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1809 performs communication processing via a network such as the Internet. A drive 1810 is also connected to I / O interface 1805 as needed. Removable media 1811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1810 as needed so that computer programs read from them can be installed into storage section 1808 as needed.

[0120] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1809, and / or installed from removable medium 1811. When the computer program is executed by central processing unit (CPU) 1801, it performs various functions defined in the system of this application.

[0121] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. The transmitted data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0122] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0123] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0124] In another aspect, this application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.

[0125] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0126] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of this application.

[0127] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0128] The above provides a detailed description of the simulation image generation method, simulation image re-injection method, and related apparatus and equipment provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the technical solutions and core ideas of this application. Those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A method for generating simulated images, characterized in that, The method includes: Acquire first camera data of a first camera set of a first vehicle and second camera data of a second camera set of a second vehicle. The first camera data includes the external parameter matrix of each first camera. The first camera set includes a preset target camera. The second camera set includes multiple second cameras. The position of the target camera is the same as the preset target position on the second vehicle. The target position is different from the position of each second camera. The second camera data includes the external parameter matrix of the second camera and the real image captured by the second camera. Based on the external parameter matrix of the target camera and the external parameter matrices of each second camera, at least one second camera adjacent to the target position is determined; Based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera, a simulated image matching the target position is formed, including: obtaining the internal parameter matrix of each of the at least one second camera; based on the external parameter matrix of each of the at least one second camera, the internal parameter matrix of each of the at least one second camera, the depth map corresponding to each of the at least one second camera, and the real image, projecting the pixels of the real image from the pixel coordinate system to the world coordinate system to obtain a plurality of first pixels in the world coordinate system; and based on the plurality of first pixels and the first camera data corresponding to the target camera, forming a simulated image matching the target position. The step of forming a simulated image matching the target position based on the plurality of first pixels and the first camera data corresponding to the target camera includes: generating an extrinsic parameter matrix of the target position using the extrinsic parameter matrix of the target camera; projecting some or all of the first pixels onto the camera coordinate system corresponding to the target camera according to the extrinsic parameter matrix of the target position to obtain a plurality of second pixels in the camera coordinate system; and forming a simulated image matching the target position based on the plurality of second pixels and the first camera data corresponding to the target camera.

2. The method for generating simulated images according to claim 1, characterized in that, Based on the extrinsic parameter matrix of the target camera and the extrinsic parameter matrices of each of the second cameras, at least one second camera adjacent to the target location is determined, including: The first translation parameter, the second translation parameter, and the third translation parameter corresponding to the target camera are extracted using the external parameter matrix of the target camera. The fourth translation parameter, fifth translation parameter and sixth translation parameter corresponding to each second camera are extracted using the external parameter matrix of each second camera. Based on the fourth, fifth, and sixth translation parameters corresponding to each of the second cameras, and the first, second, and third translation parameters corresponding to the target camera, the Euclidean distance between each of the second cameras and the target camera is calculated to obtain the multiple camera distances corresponding to the multiple second cameras; At least one second camera with a distance lower than a preset camera distance threshold is selected as the at least one second camera adjacent to the target location.

3. The method for generating simulated images according to claim 1, characterized in that, Before generating a simulated image matching the target position based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera, the simulated image generation method includes: The SFM algorithm is used to process the real images captured by the at least one second camera to generate depth maps corresponding to each of the at least one second camera.

4. The method for generating simulated images according to claim 1, characterized in that, Based on the extrinsic parameter matrix of the target location, some or all of the first pixels are projected onto the camera coordinate system corresponding to the target camera to obtain multiple second pixels in the camera coordinate system, including: Obtain the field of view of the target camera; Determine whether each of the plurality of first pixels is located within the field of view; If the first pixel is within the field of view, the first pixel is projected onto the camera coordinate system corresponding to the target position; if the first pixel is outside the field of view, the first pixel is filtered out.

5. The method for generating simulated images according to claim 1, characterized in that, The first camera data also includes the internal parameter matrix of each first camera. Based on the plurality of second pixels and the first camera data corresponding to the target camera, a simulated image matching the target position is formed, including: Obtain the intrinsic parameter matrix of the target camera; The intrinsic parameter matrix of the target position is generated using the intrinsic parameter matrix of the target camera; Based on the internal parameter matrix of the target location, each of the plurality of second pixels is projected onto the pixel coordinate system corresponding to the target location to obtain a plurality of third pixels in the pixel coordinate system; Based on the plurality of third pixels, a simulated image matching the target position is formed.

6. A simulated image generation device, characterized in that, The simulated image generation device includes: The camera data acquisition module is used to acquire first camera data of a first camera set of a first vehicle and second camera data of a second camera set of a second vehicle. The first camera data includes the external parameter matrix of each first camera. The first camera set includes a preset target camera. The second camera set includes multiple second cameras. The position of the target camera is the same as the preset target position on the second vehicle. The target position is different from the position of each second camera. The second camera data includes the external parameter matrix of the second camera and the real image captured by the second camera. A camera determination module is used to determine at least one second camera adjacent to the target position based on the external parameter matrix of the target camera and the external parameter matrices of each second camera. An image forming module is configured to form a simulated image matching the target position based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera. The module includes: acquiring the internal parameter matrix of each of the at least one second camera; projecting the pixels of the real images from a pixel coordinate system to a world coordinate system based on the external parameter matrix of each of the at least one second camera, the internal parameter matrix of each second camera, the depth map corresponding to each of the at least one second camera, and the real image, to obtain a plurality of first pixels in the world coordinate system; and forming a simulated image matching the target position based on the plurality of first pixels and the first camera data corresponding to the target camera. The step of forming a simulated image matching the target position based on the plurality of first pixels and the first camera data corresponding to the target camera includes: generating an extrinsic parameter matrix of the target position using the extrinsic parameter matrix of the target camera; projecting some or all of the first pixels onto the camera coordinate system corresponding to the target camera according to the extrinsic parameter matrix of the target position to obtain a plurality of second pixels in the camera coordinate system; and forming a simulated image matching the target position based on the plurality of second pixels and the first camera data corresponding to the target camera.

7. A method for re-injecting simulated images, characterized in that, The method includes: Acquire first camera data of a first camera set of a first vehicle and second camera data of a second camera set of a second vehicle. The first camera data includes the external parameter matrix of each first camera. The first camera set includes a preset target camera. The second camera set includes multiple second cameras. The position of the target camera is the same as the preset target position on the second vehicle. The target position is different from the position of each second camera. The second camera data includes the external parameter matrix of the second camera and the real image captured by the second camera. Based on the external parameter matrix of the target camera and the external parameter matrices of each second camera, at least one second camera adjacent to the target position is determined; Based on the real images and depth maps corresponding to each of the at least one second camera and the first camera data corresponding to the target camera, a simulated image matching the target position is formed, including: obtaining the internal parameter matrix of each of the at least one second camera; based on the external parameter matrix of each of the at least one second camera, the internal parameter matrix of each of the at least one second camera, the depth map corresponding to each of the at least one second camera, and the real image, projecting the pixels of the real image from the pixel coordinate system to the world coordinate system to obtain a plurality of first pixels in the world coordinate system; based on the plurality of first pixels and the first camera data corresponding to the target camera, forming a simulated image matching the target position; wherein, the step of forming a simulated image matching the target position based on the plurality of first pixels and the first camera data corresponding to the target camera includes: generating an external parameter matrix of the target position using the external parameter matrix of the target camera; projecting some or all of the first pixels to the camera coordinate system corresponding to the target camera according to the external parameter matrix of the target position to obtain a plurality of second pixels in the camera coordinate system; and forming a simulated image matching the target position based on the plurality of second pixels and the first camera data corresponding to the target camera. The simulated image is then injected back into the data processing unit.

8. The simulated image reinjection method according to claim 7, characterized in that, The simulated image is reinjected into the data processing unit, including: The missing pixels in the simulation image are filled in using a bilinear interpolation algorithm and / or an image inpainting algorithm to obtain a fitted image corresponding to the target position; The fitted image is then reinjected into the data processing unit of the second vehicle.

9. A simulated image reinjection device, characterized in that, The simulated image reinjection device includes: The camera data acquisition module is used to acquire first camera data of a first camera set of a first vehicle and second camera data of a second camera set of a second vehicle. The first camera data includes the external parameter matrix of each first camera. The first camera set includes a preset target camera. The second camera set includes multiple second cameras. The position of the target camera is the same as the preset target position on the second vehicle. The target position is different from the position of each second camera. The second camera data includes the external parameter matrix of the second camera and the real image captured by the second camera. A camera determination module is used to determine at least one second camera adjacent to the target position based on the external parameter matrix of the target camera and the external parameter matrices of each second camera. An image forming module is used to form a simulated image matching the target position based on the real image and depth map corresponding to each of the at least one second camera and the first camera data corresponding to the target camera. This includes: acquiring the internal parameter matrix of each of the at least one second camera; based on the external parameter matrix of each of the at least one second camera, the internal parameter matrix of each of the second cameras, the depth map corresponding to each of the at least one second camera, and the real image, projecting the pixels of the real image from the pixel coordinate system to the world coordinate system to obtain a plurality of first pixels in the world coordinate system; and based on the plurality of first pixels and the... The first camera data corresponding to the target camera is used to form a simulated image matching the target position; wherein, the step of forming a simulated image matching the target position based on the plurality of first pixels and the first camera data corresponding to the target camera includes: generating an extrinsic parameter matrix of the target position using the extrinsic parameter matrix of the target camera; projecting some or all of the first pixels onto the camera coordinate system corresponding to the target camera according to the extrinsic parameter matrix of the target position to obtain a plurality of second pixels in the camera coordinate system; and forming a simulated image matching the target position based on the plurality of second pixels and the first camera data corresponding to the target camera. The back-injection module is used to back-inject the simulated image into the data processing unit.

10. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the simulated image generation method as described in any one of claims 1 to 5 or the simulated image reinjection method as described in any one of claims 7 to 8.

Citation Information

Patent Citations

  • Camera calibration method and device, electronic equipment and computer readable medium

    CN112991465A

  • Road data multiplexing method, auxiliary driving system and device and computer equipment

    CN114723820A