Image synthesis method, device, equipment and medium for robot
By combining implicit rendering and explicit rendering, the computing resource consumption of robot image simulation is reduced, the problem of low explicit rendering efficiency is solved, and the simulation efficiency is improved.
Patent Information
- Application Number
- CN202410535862.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-04-30
AI Technical Summary
When explicit rendering is used for robot image simulation in the prior art, a large number of model files are required, resulting in large storage space consumption and low simulation efficiency, and cannot effectively reduce computing resource consumption.
By implicitly rendering preset static scenes that do not require interaction, the implicit rendering results are obtained, and the target objects that require interaction are explicitly rendered, and the implicit rendering and explicit rendering results are combined to synthesize to reduce the content of explicit rendering. , reduce computing resource consumption and improve simulation efficiency.
It effectively reduces the consumption of computing resources by explicit rendering and improves simulation efficiency. Through the combination of implicit rendering and explicit rendering, the performance of image synthesis is significantly improved.
Smart Images

Figure CN118229863B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to an image synthesis method, device, equipment and medium for a robot. Background Art
[0002] With the development of computer technology, robots are becoming more and more intelligent. The tasks performed by robots are mostly related to physical interactions with the environment, such as opening and closing doors, vision-guided grasping, and other operations. The images or depth information captured by the visual sensor are the key parameters for the input of the robot control model.
[0003] Since the amount of data captured by visual sensors is limited, in order to obtain a large amount of realistic visual information, explicit rendering methods such as ray tracing are generally used for simulation. The explicitly rendered object modeling includes 3D modeling entity files, color map files, and material texture maps such as normals and roughness.
[0004] However, in order to obtain good generalization, explicit rendering requires piling up a large number of model files, which results in excessive consumption of storage space, slowing down the simulation speed, and low simulation efficiency. Summary of the invention
[0005] The purpose of the present invention is to provide an image synthesis method, device, equipment and medium for a robot in order to reduce the consumption of computing resources by explicit rendering and improve simulation efficiency in view of the above-mentioned deficiencies in the prior art.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides an image synthesis method for a robot, the method comprising:
[0008] According to an implicit radiation field model pre-trained for a preset static scene corresponding to the working robot, an implicit rendering result of a real camera set on the working robot for the preset static scene is obtained;
[0009] Generating an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene;
[0010] The synthesized image information is obtained according to the implicit rendering result and the explicit rendering result.
[0011] Optionally, the implicit rendering result includes: an implicit color map and an implicit depth map of a real camera on the working robot in a preset viewport direction;
[0012] The explicit rendering result includes: a virtual camera having the same parameters as the real camera on the working robot, an explicit color map and an explicit depth map in the preset viewport direction;
[0013] The step of obtaining synthetic image information according to the implicit rendering result and the explicit rendering result includes:
[0014] The synthesized image information is acquired according to the implicit color map, the implicit depth map, the explicit color map and the explicit depth map.
[0015] Optionally, the implicit radiation field model pre-trained according to the preset static scene corresponding to the working robot, obtaining the implicit rendering result of the real camera set on the working robot for the preset static scene, includes:
[0016] Obtaining the origin coordinates and attitude angles of multiple light rays emitted by the real camera in the direction of the preset viewport;
[0017] Determining volume density information and color information of the plurality of light rays using the implicit radiation field model according to the origin coordinates and attitude angles of the plurality of light rays;
[0018] The implicit color map and the implicit depth map are determined according to the volume density information and the color information of the plurality of light rays.
[0019] Optionally, the working robot includes a mobile chassis and a mechanical arm, and the obtaining of the origin coordinates and attitude angles of a plurality of light rays emitted by the real camera in the direction of the preset viewport includes:
[0020] Calculating the camera extrinsic parameters of the real camera according to the odometer of the mobile chassis and the forward kinematics equation of the robotic arm;
[0021] The origin coordinates and attitude angles of the multiple light rays are determined according to the camera extrinsic parameters of the real camera.
[0022] Optionally, determining the implicit color map and the implicit depth map according to the volume density information and the color information of the plurality of light rays includes:
[0023] Determining implicit color maps of pixel points corresponding to the plurality of light rays according to the integral of volume density information and color information of the plurality of light rays;
[0024] According to the jump positions of the volume density information of the multiple light rays, implicit depth maps of the pixel points corresponding to the multiple light rays are determined.
[0025] Optionally, before generating an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene, the method further includes:
[0026] The relative placement position of the target object in the preset static scene is determined according to the depth information in the implicit depth map.
[0027] Optionally, generating an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene includes:
[0028] Generating a simple collision body corresponding to the preset static scene in the preset simulation environment;
[0029] The target object is rendered and generated on the simple collision body according to the relative placement position of the target object in the preset static scene.
[0030] Optionally, acquiring the synthesized image information according to the implicit color map, the implicit depth map, the explicit color map, and the explicit depth map includes:
[0031] Determine target depth values of the plurality of pixels according to the implicit depth map and the depth values of the plurality of pixels in the explicit depth map, where the target depth values are depth values in the implicit depth map or the depth values in the explicit depth map;
[0032] The target color values of the multiple pixels are determined according to the depth map to which the target depth values of the multiple pixels belong, the implicit color map, and the color values of the multiple pixels in the explicit color map, and the synthetic image information includes: the target depth values and target color values of the multiple pixels.
[0033] Optionally, determining target depth values of the plurality of pixels according to the implicit depth map and the depth values of the plurality of pixels in the explicit depth map includes:
[0034] If the depth value of the target pixel in the explicit depth map is greater than or equal to the depth value in the implicit depth map, determine the target depth value of the target pixel to be the depth value of the target pixel in the implicit depth map;
[0035] The determining the target color values of the plurality of pixels according to the depth map to which the target depth values of the plurality of pixels belong, the implicit color map, and the color values of the plurality of pixels in the explicit color map comprises:
[0036] If the target depth value of the target pixel belongs to the implicit depth map, the target color value of the target pixel is determined to be the color value of the target pixel in the implicit color map.
[0037] Optionally, determining target depth values of the plurality of pixels according to the implicit depth map and the depth values of the plurality of pixels in the explicit depth map includes:
[0038] If the depth value of the target pixel in the explicit depth map is less than the depth value in the implicit depth map, determining the target depth value of the target pixel to be the depth value of the target pixel in the explicit depth map;
[0039] The determining the target color values of the plurality of pixels according to the depth map to which the target depth values of the plurality of pixels belong, the implicit color map, and the color values of the plurality of pixels in the explicit color map comprises:
[0040] If the target depth value of the target pixel belongs to the explicit depth map, the target color value of the target pixel is determined to be the color value of the target pixel in the explicit color map.
[0041] Optionally, after obtaining the synthesized image information according to the implicit rendering result and the explicit rendering result, the method further includes:
[0042] Training a visual control model of the working robot according to the synthetic image information;
[0043] The trained visual control module is deployed on the working robot to control the working robot to operate the target object in the preset static scene according to the visual control module.
[0044] In a second aspect, an embodiment of the present application further provides an image synthesis device for a robot, the device comprising:
[0045] An implicit rendering module, used to obtain an implicit rendering result of a real camera set on the working robot for a preset static scene according to an implicit radiation field model pre-trained for the preset static scene corresponding to the working robot;
[0046] An explicit rendering module, used to generate an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene;
[0047] The information synthesis module is used to obtain synthesized image information according to the implicit rendering result and the explicit rendering result.
[0048] Optionally, the implicit rendering result includes: an implicit color map and an implicit depth map of a real camera on the working robot in a preset viewport direction;
[0049] The explicit rendering result includes: a virtual camera having the same parameters as the real camera on the working robot, an explicit color map and an explicit depth map in the preset viewport direction;
[0050] The information synthesis module is specifically used to obtain the synthesized image information according to the implicit color map, the implicit depth map, the explicit color map and the explicit depth map.
[0051] Optionally, the implicit rendering module includes:
[0052] A light information acquisition unit, used to acquire the origin coordinates and attitude angles of multiple light rays emitted by the real camera in the direction of the preset viewport;
[0053] An implicit radiation unit, configured to determine volume density information and color information of the plurality of light rays using the implicit radiation field model according to the origin coordinates and attitude angles of the plurality of light rays;
[0054] An implicit information generating unit is used to determine the implicit color map and the implicit depth map according to the volume density information and color information of the plurality of light rays.
[0055] Optionally, the working robot includes a mobile chassis and a robotic arm, and the light information acquisition unit is specifically used to calculate the camera extrinsic parameters of the real camera based on the odometer of the mobile chassis and the forward kinematic equation of the robotic arm; and determine the origin coordinates and attitude angles of the multiple light rays based on the camera extrinsic parameters of the real camera.
[0056] Optionally, the implicit information generating unit is specifically used to determine the implicit color map of the pixel points corresponding to the multiple light rays based on the integral of the volume density information and color information of the multiple light rays; and to determine the implicit depth map of the pixel points corresponding to the multiple light rays based on the jump positions of the volume density information of the multiple light rays.
[0057] Optionally, before the explicit rendering module, the device further includes:
[0058] A placement position calculation module is used to determine the relative placement position of the target object in the preset static scene according to the depth information in the implicit depth map.
[0059] Optionally, the explicit rendering module is specifically used to generate a simple collision body corresponding to the preset static scene in the preset simulation environment; and render and generate the target object on the simple collision body according to the relative placement position of the target object in the preset static scene.
[0060] Optionally, the information synthesis module is specifically used to determine the target depth values of the multiple pixels according to the depth values of the multiple pixels in the implicit depth map and the explicit depth map, where the target depth value is the depth value in the implicit depth map or the depth value in the explicit depth map; determine the target color values of the multiple pixels according to the depth map to which the target depth values of the multiple pixels belong, the implicit color map, and the color values of the multiple pixels in the explicit color map, and the synthesized image information includes: the target depth values and target color values of the multiple pixels.
[0061] Optionally, the information synthesis module is specifically used to determine that the target depth value of the target pixel is the depth value of the target pixel in the implicit depth map if the depth value of the target pixel in the explicit depth map is greater than or equal to the depth value in the implicit depth map; if the target depth value of the target pixel belongs to the implicit depth map, determine that the target color value of the target pixel is the color value of the target pixel in the implicit color map.
[0062] Optionally, the information synthesis module is specifically used to determine that the target depth value of the target pixel is the depth value of the target pixel in the explicit depth map if the depth value of the target pixel in the explicit depth map is less than the depth value in the implicit depth map; if the target depth value of the target pixel belongs to the explicit depth map, determine that the target color value of the target pixel is the color value of the target pixel in the explicit color map.
[0063] Optionally, after the information synthesis module, the device further includes:
[0064] A model training module, used for training the visual control model of the working robot according to the synthetic image information;
[0065] A model deployment module is used to deploy the trained visual control module on the working robot to control the working robot to operate the target object in the preset static scene according to the visual control module.
[0066] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the image synthesis method for a robot as described in any one of the first aspects.
[0067] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the image synthesis method for a robot as described in any one of the first aspects are executed.
[0068] The beneficial effects of this application are:
[0069] The image synthesis method, device, equipment and medium for robots provided in the present application obtain implicit rendering results by implicitly rendering a preset static scene that does not need to interact with the working robot, and obtain explicit rendering results by explicitly rendering a target object that needs to interact with the working robot, and synthesize the implicit rendering result and the explicit rendering result to obtain synthesized image information. By combining explicit rendering and implicit rendering, the method reduces the content that needs to be explicitly rendered to the target object that needs to interact with the working robot, reduces the consumption of computing resources by explicit rendering, and improves simulation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0071] Figure 1 An architectural diagram of an image synthesis system provided in an embodiment of the present application;
[0072] Figure 2 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 1 ;
[0073] Figure 3 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 2 ;
[0074] Figure 4 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 3 ;
[0075] Figure 5 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 4 ;
[0076] Figure 6 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 5 ;
[0077] Figure 7 A schematic diagram of image synthesis provided in an embodiment of the present application;
[0078] Figure 8 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 6 ;
[0079] Fig. 9 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 7 ;
[0080] Fig.10 A schematic diagram of the structure of an image synthesis device for a robot provided in an embodiment of the present application;
[0081] Fig.11 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0082] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0083] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0084] In addition, the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0085] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.
[0086] Figure 1The architecture diagram of the image synthesis system provided in the embodiment of the present application is as follows: Figure 1 As shown, the image synthesis system includes: an electronic device 100 and a working robot 200, the electronic device 100 is communicatively connected with the working robot 200, the electronic device 100 implicitly renders a preset static scene in which the working robot 200 works, and explicitly renders a target object in the preset static scene, so as to obtain synthetic image information according to the implicit rendering result of the preset static scene and the explicit rendering result of the target object.
[0087] In some embodiments, the synthetic image information is sent to the working robot 200 as the visual simulation input of the working robot 200. The visual control model or algorithm in the working robot 200 generates hand-eye coordinated motion control according to the input synthetic image information. According to the motion control action generated by the working robot 200, physical operations such as grabbing, moving, clicking, switching, etc. are generated for the explicitly rendered target object in the preset simulation environment. The synthetic image information and the physical operation results in the preset simulation environment are used as training data to train the visual control model or algorithm of the working robot 200. After the training is completed, the visual control model or algorithm is deployed in the working robot 200. The working robot 200 obtains the collected images including the preset static scene and the target object through the installed camera, and uses the visual control model or algorithm to output control instructions according to the collected images, so that the working robot 200 operates the target object according to the control instructions.
[0088] Based on the above-mentioned image synthesis system, the specific implementation of the image synthesis method for a robot provided by the present application is described below in combination with an embodiment.
[0089] Figure 2 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 1 The method can be executed by the above electronic device, which can be a computer or other device with computing and processing capabilities, and this application does not make specific restrictions. Figure 2 As shown, the method may include:
[0090] S101: According to an implicit radiation field model pre-trained for a preset static scene corresponding to the working robot, an implicit rendering result of a real camera set on the working robot for the preset static scene is obtained.
[0091] In this embodiment, the working scene of the working robot includes a preset static scene and a target object located in the preset static scene, wherein the preset static scene is composed of immovable static objects, for example: large spaces (rooms, factory areas, etc.), large objects, building structures, etc. The preset static scene can be used as a scene or environmental obstacle for the working robot to operate. In the process of controlling the working robot to operate, it is necessary to avoid the working robot from colliding with the preset static scene.
[0092] The Neural Radiance Field (NeRF) model is a light model that can render the light information of a preset static scene relative to a working robot. The electronic device communicates with the working robot to obtain the position information of the real camera on the working robot in the preset static scene. According to the position information of the real camera in the preset static scene, the implicit radiation field model is used to obtain the implicit rendering result of the preset static scene. The implicit rendering result is used to indicate the light information of the preset static scene relative to the real camera at this position. The light information includes depth information and color information.
[0093] S102: Generate an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene.
[0094] In this embodiment, the target object is a physically interactive object located in a preset static scene, that is, the target object is an object located in a preset static scene that can be operated by the working robot.
[0095] For preset static scenes and target objects, since the working robot does not need to make physical contact with the static objects corresponding to the preset static scenes, the implicit radiation field model can be used to obtain the implicit rendering results of the preset static scenes. The working robot needs to make physical contact with the target objects to operate the target objects. Therefore, explicit rendering is required to render and generate the target objects in the simulation engine.
[0096] Specifically, the relative placement position of the target object in a preset static scene and the model file of the target object are input into the simulation engine, and the target object is rendered in the simulation environment constructed by the simulation engine. Then, a virtual camera having the same position information as a real camera is used to photograph the target object in the simulation environment to obtain an explicit rendering result. The explicit rendering result is used to indicate the light information of the target object relative to the virtual camera at the same position.
[0097] S103: Obtaining synthesized image information according to the implicit rendering result and the explicit rendering result.
[0098] In this embodiment, the light information of the preset static scene and the light information of the target object are fused to obtain composite image information. During the fusion process, it is necessary to determine the occlusion relationship between the light information of the preset static scene and the light information of the target object in each pixel point. The light information of each pixel point in the composite image information is the light information of each pixel point that is not occluded in the preset static scene and the target object.
[0099] The image synthesis method for a robot provided in the above-mentioned embodiment obtains an implicit rendering result by implicitly rendering a preset static scene that does not need to interact with the working robot, obtains an explicit rendering result by explicitly rendering a target object that needs to interact with the working robot, and synthesizes the implicit rendering result and the explicit rendering result to obtain synthesized image information. By combining explicit rendering and implicit rendering, the method reduces the content that needs to be explicitly rendered to the target object that needs to interact with the working robot, thereby reducing the consumption of computing resources by explicit rendering and improving simulation efficiency.
[0100] Furthermore, an implicit radiation field model is used to obtain implicit rendering results of preset static scenes. On the one hand, since the implicit radiation field model is trained by using images taken of the preset static scenes by a real camera, the implicit rendering results of the preset static scenes obtained by the implicit radiation field model are more realistic. On the other hand, since there is no need to model the preset static scenes in a simulation environment, a lot of time can be saved, further improving the efficiency of image synthesis.
[0101] In a possible implementation, the implicit rendering result includes: an implicit color map and an implicit depth map of a real camera on the working robot in a preset viewport direction; the explicit rendering result includes: a virtual camera with the same parameters as the real camera on the working robot, an explicit color map and an explicit depth map in a preset viewport direction; the above S103 process of obtaining synthetic image information according to the implicit rendering result and the explicit rendering result may include:
[0102] The synthesized image information is obtained according to the implicit color map, the implicit depth map, the explicit color map and the explicit depth map.
[0103] In this embodiment, a real camera for image acquisition is installed on the working robot. When generating the implicit rendering result of the preset static scene, the real camera is not used to acquire the image of the preset static scene. Instead, the preset viewport direction of the real camera on the working robot is determined according to the position and posture of the working robot in the preset static scene. The viewport direction is the viewing angle direction of the real camera on the working robot relative to the preset static scene. According to the preset viewport direction, an implicit radiation field model is used to obtain the light information of the preset static scene in the preset viewport direction. The light information includes: an implicit color map and an implicit depth map of the preset static scene relative to the real camera in the preset viewport direction. The color value of each pixel in the implicit color map is the color value of the corresponding point of the preset static scene relative to the real camera in the preset viewport direction. The depth value of each pixel in the implicit depth map is the distance of the corresponding point of the preset static scene relative to the real camera in the preset viewport direction.
[0104] In order to ensure that the implicit rendering result and the explicit rendering result have a correct projection relationship, it is necessary to use a virtual camera with the same parameters as the real camera to shoot the target object in the preset simulation environment to obtain the light information of the target object in the preset viewport direction, and the light information includes: an explicit color map and an explicit depth map of the target object relative to the virtual camera in the preset viewport direction, the color value of each pixel in the explicit color map is the color value of the corresponding point of the target object relative to the virtual camera in the preset viewport direction, and the depth value of each pixel in the explicit depth map is the distance of the corresponding point of the target object relative to the virtual camera in the preset viewport direction.
[0105] According to the implicit depth map and the explicit depth map, the occlusion relationship between the preset static scene and the target object at each pixel point is determined, the depth value of the pixel point corresponding to the unoccluded part is determined to be the target depth value, the color value of the pixel point corresponding to the unoccluded part is determined to be the target color value, and the synthesized image information includes the target depth value and the target color value.
[0106] In the image synthesis method for a robot provided by the above embodiment, the real camera used to generate an implicit color map and an implicit depth map and the virtual camera used to generate an explicit color map and an explicit depth map have the same camera parameters and viewport direction, so that the preset static scene and the target object have the correct projection relationship and occlusion in the synthesized image information, thereby improving the simulation effect of the synthesized image information.
[0107] In one possible implementation, Figure 3 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 2 ,like Figure 3As shown, the process of obtaining the implicit rendering result of the real camera set on the working robot for the preset static scene according to the implicit radiation field model pre-trained for the preset static scene corresponding to the working robot in S101 may include:
[0108] S201: Obtain the origin coordinates and attitude angles of multiple light rays emitted by a real camera in a preset viewport direction.
[0109] In this embodiment, according to the size of the image captured by the real camera and the preset viewport direction, the origin coordinates and attitude angles of multiple light rays emitted by the real camera relative to multiple pixel points of the captured image are determined, wherein the origin coordinates are the three-dimensional coordinates X(x, y, z) of the light in the world coordinate system, and the attitude angles include the horizontal angle θ and the pitch angle φ of the light.
[0110] The process of obtaining the origin coordinates of the light emitted to the pixel point includes:
[0111] According to the two-dimensional coordinates (u, v) of the pixel point and the camera intrinsic parameters of the real camera, the three-dimensional coordinates of the pixel point in the camera coordinate system are determined, and then according to the camera extrinsic parameters of the real camera, the three-dimensional coordinates of the pixel point in the camera coordinate system are rotated and translated to obtain the three-dimensional coordinates of the pixel point in the world coordinate system. The three-dimensional coordinates are used to represent the origin coordinates of the light ray corresponding to the pixel point.
[0112] For example, the conversion relationship of converting the two-dimensional coordinates of a pixel point to the three-dimensional coordinates in the world coordinate system can be expressed as:
[0113]
[0114] Among them, u and v are the two-dimensional coordinates of the pixel point, is the camera depth, f x and f y is the camera intrinsic parameter of the real camera, i.e. the focal length in the x and y directions, c x and c y is the pixel origin offset, It is the representation of the world coordinate system in the camera coordinate system, which can be represented by the camera external parameters of the real camera, namely the rotation matrix and the translation matrix. is the three-dimensional coordinate of the pixel in the world coordinate system.
[0115] S202: According to the origin coordinates and attitude angles of the multiple light rays, an implicit radiation field model is used to determine volume density information and color information of the multiple light rays.
[0116] In this embodiment, the training process of the implicit radiation field model is:
[0117] A real camera on a working robot is used to shoot a preset static scene to obtain multiple static scene images, and the origin coordinates and attitude angles of the light emitted by the real camera relative to each pixel in each static scene image are determined. The origin coordinates and attitude angles of the light are used as inputs of the model. The model predicts the color value and volume density information of each pixel in each static scene image, and predicts the pixel value of each pixel based on the color value and volume density information of each pixel. According to the predicted pixel values of each pixel and the real pixel values of each pixel in each static scene image, the model is optimized to obtain an implicit radiation field model.
[0118] The implicit radiation field model can be expressed as: (RGB,σ)=F(X,θ,φ). The input of the implicit radiation field model is the origin coordinate X and attitude angle (θ,φ) of the light, and the output is the color value RGB and volume density information σ. The volume density information actually represents the opacity of the pixel.
[0119] For the trained implicit radiation field model, the origin coordinates and attitude angle of each light ray are input into the implicit radiation field model, and the volume density information and color information on each light ray are output through the implicit radiation field model.
[0120] S203: Determine an implicit color map and an implicit depth map according to the volume density information and color information of the plurality of light rays.
[0121] In this embodiment, the color value and depth value of the pixel corresponding to each light ray are determined based on the volume density information and color information of each light ray. An implicit color map is obtained based on the color values of the pixel points corresponding to multiple light rays. An implicit depth map is obtained based on the depth values of the pixel points corresponding to multiple light rays.
[0122] In one possible implementation, Figure 4 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 3 ,like Figure 4 As shown, the process of obtaining the origin coordinates and attitude angles of multiple light rays emitted by the real camera in the preset viewport direction in S201 may include:
[0123] S301: Calculate the camera extrinsic parameters of the real camera according to the odometer of the mobile chassis and the forward kinematics equation of the robotic arm.
[0124] S302: Determine the origin coordinates and attitude angles of multiple light rays according to the camera extrinsic parameters of the real camera.
[0125] In this embodiment, in order to determine the accurate origin coordinates and attitude angles of multiple light rays emitted by a real camera relative to a preset static scene in a preset viewport direction, it is necessary to determine accurate camera extrinsics.
[0126] The working robot is composed of a mobile chassis and a robotic arm. The odometer is used to determine the relationship between the position of the mobile chassis of the working robot and time, so as to obtain the position and posture of the mobile chassis. The forward kinematics equation is used to represent the position and posture of the robotic arm relative to the mobile chassis. According to the position and posture of the mobile chassis and the position and posture of the robotic arm relative to the mobile chassis, the rotation matrix and translation matrix of the real camera are determined. According to the rotation matrix and translation matrix of the real camera, the pixel points corresponding to multiple light rays are transformed to determine the origin coordinates of the multiple light rays, and the horizontal angle of the light is obtained according to the angle between the origin coordinates and the world coordinate system in the horizontal direction. According to the angle between the origin coordinates and the world coordinate system in the vertical direction, the pitch angle of the light is obtained.
[0127] In one possible implementation, Figure 5 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 4 ,like Figure 5 As shown, the process of determining the implicit color map and the implicit depth map according to the volume density information and color information of the plurality of light rays in S203 may include:
[0128] S401: Determine an implicit color map of pixel points corresponding to the plurality of light rays according to the integration of volume density information and color information of the plurality of light rays.
[0129] In this embodiment, each light ray is composed of multiple continuous points. By discretizing the multiple continuous points on each light ray and integrating the volume density value and color value of the discrete points, the implicit color value of the pixel point corresponding to each light ray is obtained. The implicit color values of the pixel points corresponding to multiple light rays constitute an implicit color map.
[0130] S402: Determine implicit depth maps of pixel points corresponding to the multiple light rays according to the jump positions of the volume density information of the multiple light rays.
[0131] In this embodiment, the volume density value of the light passing through the transparent object is 0. The transparent object may be, for example, air. For glass or translucent objects, the volume density value of the light on them is approximately 0. Therefore, for a point i on a light ray L, the volume density value σ in the air is i = 0, when the light L encounters point j on the surface of other solid objects, its volume density value σ j ≠0, assuming that i and j are two adjacent points in space, the volume density of light L between point i and point j in space jumps.
[0132] By determining the jump position of the volume density information of each ray and calculating the distance between the jump position and the imaging plane of the real camera, the implicit depth value of the pixel point corresponding to each ray is obtained. The implicit depth values of the pixel points corresponding to multiple rays constitute an implicit depth map.
[0133] It should be noted that Figure 5 The execution order of S401 and S402 shown is only an example. In actual applications, S401 and S402 do not have a fixed execution order.
[0134] The robot-based image synthesis method provided in the above embodiment uses an implicit radiation field model to obtain an implicit color map and an implicit depth map of a preset static scene. On the one hand, since the implicit radiation field model is trained using images of the preset static scene taken by a real camera, the implicit rendering result of the preset static scene obtained by the implicit radiation field model is more realistic. On the other hand, since there is no need to model the preset static scene in a simulation environment, a lot of time can be saved, further improving the image synthesis efficiency.
[0135] In a possible implementation, before generating an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene in the above S102, the method may further include:
[0136] According to the depth information in the implicit depth map, the relative placement of the target object in the preset static scene is determined.
[0137] In this embodiment, based on the depth information in the implicit depth map and the camera intrinsic parameters of the real camera, the pixel point cloud constituting the static object in the preset static scene is calculated. The static object is an object used to place the target object in the preset static scene. Based on the pixel point cloud constituting the static object in the preset static scene, the position of the static object in the preset static scene is determined.
[0138] Afterwards, according to the position of the static object, a position is randomly determined on the surface of the static object through a random algorithm as the relative placement position of the target object in the preset static scene. The random algorithm makes the relative placement position of the target object and the static object have a certain degree of randomness, increasing the richness of the simulation, thereby increasing the number of data sets that are subsequently used as samples for training the model of the operating robot.
[0139] It should be noted that since the synthetic image information obtained in this scheme is used as sample data for training the visual control model or algorithm of the working robot, there is no need to use the actual position of the target object in the preset static scene as the relative placement position of the target object. The relative placement position of the target object on the static object can be randomly determined according to the position of the static object in the preset static scene.
[0140] The image synthesis method for a robot provided in the above embodiment determines the relative placement position of the target object in a preset static scene based on the depth information in the implicit depth map, so that the relative placement position of the simulated target object and the preset static scene conforms to the real scene, ensuring that the target object and the preset static scene have an accurate projection relationship and occlusion, thereby improving the realism of the synthesized image information.
[0141] In one possible implementation, Figure 6 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 5 ,like Figure 6 As shown, the process of generating an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene in S102 may include:
[0142] S501: Generate a simple collision body corresponding to a preset static scene in a preset simulation environment.
[0143] S502: Rendering and generating a target object on a simple collision body according to the relative placement position of the target object in a preset static scene.
[0144] In this embodiment, since it is necessary to subsequently simulate the motion trajectory of the target object based on the operation of the working robot on the target object in the real scene in a preset simulation environment, it is necessary to ensure that the target object is in the same state of being supported by static objects in the preset simulation environment as in the real environment. To this end, a simple collision body corresponding to the static object in the preset static scene can be generated in the preset simulation environment.
[0145] Specifically, multiple point clouds can be extracted according to the implicit depth map of the preset static scene, and the outer contours of the multiple point clouds can be generated using a convex hull or convex decomposition algorithm to obtain a simple collision body that can contain multiple point clouds. The simple collision body is used to participate in the explicit dynamics calculation of the collision during the subsequent dynamic simulation of the target object, and provide the target object with a reaction support force to overcome gravity. The simple collision volume is in a transparent state in the preset simulation environment and does not participate in explicit rendering.
[0146] After the simple collision body corresponding to the preset static scene is generated, the target object can be rendered on the simple collision body according to the relative placement position of the target object in the preset static scene.
[0147] It should be noted that in order to perform dynamic simulation of the target object in a preset simulation environment and determine the motion trajectory of the target object based on the operation of the working robot, mass attributes and friction attributes can be added to the target object in the preset simulation environment. The mass attributes may include the mass, center of mass, moment of inertia, etc. of the target object, and the friction attributes may include the static friction coefficient, dynamic friction coefficient, etc. of the target object relative to a preset static scene.
[0148] The image synthesis method for a robot provided in the above embodiment generates a simple collision body corresponding to a preset static scene in a preset simulation environment, and renders a target object on the simple collision body to simulate the state of the target object being supported in the preset static scene, so that the motion state of the target object can be further simulated in the preset simulation environment.
[0149] For example, Figure 7 The image synthesis schematic diagram provided in the embodiment of the present application is as follows: Figure 7 As shown, according to the preset viewport direction of the real camera on the working robot and the preset static scene, the implicit rendering result of the preset static scene is obtained through the implicit radiation field model, the physical model of the target object is generated in the preset simulation environment, and the simple collision body of the preset static scene is generated according to the implicit rendering result, so that the physical model of the target object is located on the simple collision body, and the explicit rendering result of the target object is obtained through explicit rendering, and the implicit rendering result and the explicit rendering result are synthesized to obtain the synthesized image information. Among them, Figure 7 The preset static scene shown consists of a table and the scene in which it is located, and the target object is an apple.
[0150] In one possible implementation, Figure 8 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 6 ,like Figure 8 As shown, the process of obtaining the synthesized image information according to the implicit color map, the implicit depth map, the explicit color map and the explicit depth map may include:
[0151] S601: Determine target depth values of the plurality of pixels according to depth values of the plurality of pixels in the implicit depth map and the explicit depth map, where the target depth value is a depth value in the implicit depth map or a depth value in the explicit depth map.
[0152] In this embodiment, the occlusion relationship of each pixel on the preset static scene and the target object is judged according to the depth value of each pixel in the implicit depth map and the explicit depth map, that is, it is determined whether each pixel is the preset static scene occluding the target object, or the target object occluding the preset static scene.
[0153] If the pixel point is a preset static scene occluding the target object, the target depth value of the pixel point is the depth value in the implicit depth map. If the pixel point is a target object occluding the preset static scene, the target depth value of the pixel point is the depth value in the explicit depth map.
[0154] S602: Determine target color values of multiple pixels according to the depth map, implicit color map, and color values of multiple pixels in the explicit color map to which the target depth values of the multiple pixels belong, and the synthesized image information includes: target depth values and target color values of the multiple pixels.
[0155] In this embodiment, if the pixel point is a preset static scene occluding the target object, the target depth value of the pixel point is the depth value in the implicit depth map, and the target color value of the pixel point is the color value in the implicit color map; if the pixel point is a target object occluding the preset static scene, the target depth value of the pixel point is the depth value in the explicit depth map, and the target color value of the pixel point is the color value in the explicit color map.
[0156] In some embodiments, the above S601 determines the target depth values of the plurality of pixels according to the depth values of the plurality of pixels in the implicit depth map and the explicit depth map, where the target depth value is the depth value in the implicit depth map or the depth value in the explicit depth map, and the process may include:
[0157] If the depth value of the target pixel in the explicit depth map is greater than or equal to the depth value in the implicit depth map, the target depth value of the target pixel is determined to be the depth value of the target pixel in the implicit depth map.
[0158] The above-mentioned process of determining the target color values of the plurality of pixels in S602 according to the color values of the plurality of pixels in the depth map, implicit color map, and explicit color map to which the target depth values of the plurality of pixels belong may include:
[0159] If the target depth value of the target pixel belongs to the implicit depth map, the target color value of the target pixel is determined to be the color value of the target pixel in the implicit color map.
[0160] In this embodiment, the occlusion relationship of each pixel on the preset static scene and the target object is determined according to the depth value of each pixel in the implicit depth map and the explicit depth map, including: if the depth value of the target pixel in the explicit depth map is greater than or equal to the depth value in the implicit depth map, that is, the distance between the preset static scene corresponding to the target pixel and the real camera is closer than the distance between the target object and the real camera, it is determined that the target pixel is the preset static scene occluding the target object, then the target depth value of the target pixel is the depth value in the implicit depth map, and the target color value of the target pixel is the color value in the implicit color map.
[0161] In other embodiments, the above S601 determines the target depth values of the plurality of pixels according to the depth values of the plurality of pixels in the implicit depth map and the explicit depth map, where the target depth value is the depth value in the implicit depth map or the depth value in the explicit depth map, and the process may include:
[0162] If the depth value of the target pixel in the explicit depth map is less than the depth value in the implicit depth map, the target depth value of the target pixel is determined to be the depth value of the target pixel in the explicit depth map.
[0163] The above-mentioned process of determining the target color values of the plurality of pixels in S602 according to the color values of the plurality of pixels in the depth map, implicit color map, and explicit color map to which the target depth values of the plurality of pixels belong may include:
[0164] If the target depth value of the target pixel belongs to the explicit depth map, the target color value of the target pixel is determined to be the color value of the target pixel in the explicit color map.
[0165] In this embodiment, the occlusion relationship of each pixel on the preset static scene and the target object is determined according to the depth value of each pixel in the implicit depth map and the explicit depth map, including: if the depth value of the target pixel in the explicit depth map is less than the depth value in the implicit depth map, that is, the distance between the target object corresponding to the target pixel and the real camera is closer than the distance between the preset static scene and the real camera, it is determined that the target pixel is the target object occluding the preset static scene, then the target depth value of the target pixel is the depth value in the explicit depth map, and the target color value of the target pixel is the color value in the explicit color map.
[0166] For example, the code for obtaining the synthesized image information based on the implicit color map, implicit depth map, explicit color map and explicit depth map is as follows:
[0167] Parameters:
[0168] width: image width
[0169] height: image height
[0170] rgb_implicit: implicit color map (heightXwidthX3)
[0171] depth_implicit: implicit depth map (heightXwidthX1)
[0172] rgb_explicit: explicit color map (heightXwidthX3)
[0173] depth_explicit: explicit depth map (heightXwidthX1)
[0174] Inputs:
[0175] rgb_implicit,depth_implicit,rgb_explicit depth_explicit
[0176] Outputs:
[0177] rgb_synthesis: synthetic color map
[0178] depth_syntheis: Synthesized depth map
[0179] for i=1,…,width do
[0180] for j=1,…,height do
[0181] if depth_implicit[i,j]<=depth_explicit[i,j]do
[0182] rgb_synthesis[i,j,:]=rgb_implicit[i,j,:]
[0183] depth_synthesis[i,j]=depth_implicit[i,j]
[0184] else do
[0185] rgb_synthesis[i,j,:]=rgb_explicit[i,j,:]
[0186] depth_synthesis[i,j]=depth_explicit[i,j]
[0187] end if
[0188] end for
[0189] The image synthesis method for a robot provided in the above embodiment determines the target depth values of the multiple pixels according to the depth values of the multiple pixels in the implicit depth map and the explicit depth map, and determines the target color values of the multiple pixels according to the color values of the multiple pixels in the depth map, implicit color map and explicit color map to which the target depth values of the multiple pixels belong, so that the obtained synthetic image information has a correct occlusion relationship.
[0190] In one possible implementation, Fig. 9 Schematic diagram of the process of the image synthesis method for a robot provided in an embodiment of the present application Figure 7 ,like Fig. 9 As shown, after obtaining the synthesized image information according to the implicit rendering result and the explicit rendering result in the above S103, the method may further include:
[0191] S701: Training the visual control model of the working robot according to the synthetic image information.
[0192] S702: Deploy the trained visual control module on the working robot to control the working robot to operate the target object in a preset static scene according to the visual control module.
[0193] In this embodiment, the synthetic image information is sent to the working robot as the visual simulation input of the working robot. The visual control model or algorithm in the working robot generates hand-eye coordinated motion control according to the input synthetic image information. According to the motion control action generated by the working robot, physical operations such as grabbing, moving, clicking, switching, etc. are generated for the explicitly rendered target object in the preset simulation environment. The synthetic image information and the physical operation results in the preset simulation environment are used as training data to train the visual control model or algorithm of the working robot. After the training is completed, the visual control model or algorithm is deployed in the working robot.
[0194] The operating robot obtains collected images including preset static scenes and target objects through a real camera, and uses a visual control model or algorithm to output control instructions based on the collected images, so that the operating robot operates the target object according to the control instructions.
[0195] The image synthesis method for robots provided in the above embodiment uses synthetic image information to train the visual control model of the working robot, which can increase the amount of sample data used to train the visual control model, improve the training effect of the visual control model, and ensure the working accuracy of the working robot.
[0196] Based on the above method embodiment, the embodiment of the present application also provides an image synthesis device for a robot. Fig.10 A schematic diagram of the structure of an image synthesis device for a robot provided in an embodiment of the present application, such as Fig.10 As shown, the device may include:
[0197] The implicit rendering module 801 is used to obtain the implicit rendering result of the real camera set on the working robot for the preset static scene according to the implicit radiation field model pre-trained for the preset static scene corresponding to the working robot;
[0198] An explicit rendering module 802, used to generate an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in a preset static scene;
[0199] The information synthesis module 803 is used to obtain synthesized image information according to the implicit rendering result and the explicit rendering result.
[0200] Optionally, the implicit rendering result includes: an implicit color map and an implicit depth map of a real camera on the working robot in a preset viewport direction;
[0201] The explicit rendering results include: a virtual camera with the same parameters as the real camera on the working robot, an explicit color map and an explicit depth map under a preset viewport direction;
[0202] The information synthesis module 803 is specifically configured to obtain synthesized image information according to the implicit color map, the implicit depth map, the explicit color map and the explicit depth map.
[0203] Optionally, the implicit rendering module 801 includes:
[0204] A light information acquisition unit, used to acquire the origin coordinates and attitude angles of multiple light rays emitted by a real camera in a preset viewport direction;
[0205] An implicit radiation unit, used to determine volume density information and color information of the multiple light rays using an implicit radiation field model according to the origin coordinates and attitude angles of the multiple light rays;
[0206] The implicit information generating unit is used to determine an implicit color map and an implicit depth map according to the volume density information and color information of the plurality of light rays.
[0207] Optionally, the working robot includes a mobile chassis and a robotic arm, and a light information acquisition unit, which is specifically used to calculate the camera extrinsic parameters of the real camera based on the odometer of the mobile chassis and the forward kinematics equation of the robotic arm; and determine the origin coordinates and attitude angles of multiple light rays based on the camera extrinsic parameters of the real camera.
[0208] Optionally, the implicit information generating unit is specifically used to determine the implicit color map of the pixel points corresponding to the multiple light rays according to the integral of the volume density information and color information of the multiple light rays; and to determine the implicit depth map of the pixel points corresponding to the multiple light rays according to the jump positions of the volume density information of the multiple light rays.
[0209] Optionally, before the explicit rendering module 802, the device may further include:
[0210] The placement position calculation module is used to determine the relative placement position of the target object in a preset static scene based on the depth information in the implicit depth map.
[0211] Optionally, the explicit rendering module 802 is specifically used to generate a simple collision body corresponding to a preset static scene in a preset simulation environment; and render and generate the target object on the simple collision body according to the relative placement position of the target object in the preset static scene.
[0212] Optionally, the information synthesis module 803 is specifically used to determine the target depth values of multiple pixels according to the depth values of the multiple pixels in the implicit depth map and the explicit depth map, where the target depth value is the depth value in the implicit depth map or the depth value in the explicit depth map; determine the target color values of the multiple pixels according to the color values of the multiple pixels in the depth map, implicit color map and explicit color map to which the target depth values of the multiple pixels belong, and the synthesized image information includes: the target depth values and target color values of the multiple pixels.
[0213] Optionally, the information synthesis module 803 is specifically used to determine that the target depth value of the target pixel is the depth value of the target pixel in the implicit depth map if the depth value of the target pixel in the explicit depth map is greater than or equal to the depth value in the implicit depth map; if the target depth value of the target pixel belongs to the implicit depth map, determine that the target color value of the target pixel is the color value of the target pixel in the implicit color map.
[0214] Optionally, the information synthesis module 803 is specifically used to determine that the target depth value of the target pixel is the depth value of the target pixel in the explicit depth map if the depth value of the target pixel in the explicit depth map is less than the depth value in the implicit depth map; if the target depth value of the target pixel belongs to the explicit depth map, determine that the target color value of the target pixel is the color value of the target pixel in the explicit color map.
[0215] Optionally, after the information synthesis module 803, the device may further include:
[0216] A model training module, used to train the visual control model of the working robot according to the synthetic image information;
[0217] The model deployment module is used to deploy the trained visual control module on the working robot to control the working robot to operate the target object in a preset static scene according to the visual control module.
[0218] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0219] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0220] Fig.11 A schematic diagram of an electronic device provided in an embodiment of the present application, such as Fig.11 As shown, the electronic device 100 may include: a processor 1001, a storage medium 1002 and a bus, the storage medium 1002 stores program instructions executable by the processor 1001, when the electronic device 100 is running, the processor 1001 communicates with the storage medium 1002 via the bus, and the processor 1001 executes the program instructions to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0221] Optionally, the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above method embodiment is executed.
[0222] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the explicit or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0223] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0224] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one processing unit.
[0225] The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0226] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0227] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. An image synthesis method for a robot, characterized in that: The method comprises: According to an implicit radiation field model pre-trained for a preset static scene corresponding to the working robot, an implicit rendering result of a real camera set on the working robot for the preset static scene is obtained, wherein the implicit rendering result includes: an implicit color map and an implicit depth map of the real camera on the working robot in a preset viewport direction; According to the relative placement position of the target object in the preset static scene, an explicit rendering result of the target object is generated in a preset simulation environment, wherein the explicit rendering result includes: a virtual camera having the same parameters as a real camera on the working robot, an explicit color map and an explicit depth map in the preset viewport direction; Acquire synthetic image information according to the implicit rendering result and the explicit rendering result; The step of obtaining synthetic image information according to the implicit rendering result and the explicit rendering result includes: Determine target depth values of the plurality of pixels according to the implicit depth map and the depth values of the plurality of pixels in the explicit depth map, where the target depth values are depth values in the implicit depth map or the depth values in the explicit depth map; The target color values of the multiple pixels are determined according to the depth map to which the target depth values of the multiple pixels belong, the implicit color map, and the color values of the multiple pixels in the explicit color map, and the synthetic image information includes: the target depth values and target color values of the multiple pixels.
2. The method according to claim 1, characterized in that: The implicit radiation field model pre-trained according to the preset static scene corresponding to the working robot is used to obtain the implicit rendering result of the real camera set on the working robot for the preset static scene, including: Obtaining the origin coordinates and attitude angles of multiple light rays emitted by the real camera in the direction of the preset viewport; Determining volume density information and color information of the plurality of light rays using the implicit radiation field model according to the origin coordinates and attitude angles of the plurality of light rays; The implicit color map and the implicit depth map are determined according to the volume density information and the color information of the plurality of light rays.
3. The method according to claim 2, characterized in that The working robot includes a mobile chassis and a mechanical arm, and the obtaining of the origin coordinates and attitude angles of multiple light rays emitted by the real camera in the direction of the preset viewport includes: Calculating the camera extrinsic parameters of the real camera according to the odometer of the mobile chassis and the forward kinematics equation of the robotic arm; The origin coordinates and attitude angles of the multiple light rays are determined according to the camera extrinsic parameters of the real camera.
4. The method according to claim 2, characterized in that: The determining the implicit color map and the implicit depth map according to the volume density information and the color information of the plurality of light rays comprises: Determining implicit color maps of pixel points corresponding to the plurality of light rays according to the integral of volume density information and color information of the plurality of light rays; According to the jump positions of the volume density information of the multiple light rays, implicit depth maps of the pixel points corresponding to the multiple light rays are determined.
5. The method according to claim 1, characterized in that Before generating an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene, the method further includes: The relative placement position of the target object in the preset static scene is determined according to the depth information in the implicit depth map.
6. The method according to claim 1, characterized in that Generating an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene includes: Generating a simple collision body corresponding to the preset static scene in the preset simulation environment; The target object is rendered and generated on the simple collision body according to the relative placement position of the target object in the preset static scene.
7. The method according to claim 1, characterized in that The determining target depth values of the plurality of pixels according to the implicit depth map and the depth values of the plurality of pixels in the explicit depth map comprises: If the depth value of the target pixel in the explicit depth map is greater than or equal to the depth value in the implicit depth map, determine the target depth value of the target pixel to be the depth value of the target pixel in the implicit depth map; The determining the target color values of the plurality of pixels according to the depth map to which the target depth values of the plurality of pixels belong, the implicit color map, and the color values of the plurality of pixels in the explicit color map comprises: If the target depth value of the target pixel belongs to the implicit depth map, the target color value of the target pixel is determined to be the color value of the target pixel in the implicit color map.
8. The method according to claim 1, characterized in that The determining target depth values of the plurality of pixels according to the implicit depth map and the depth values of the plurality of pixels in the explicit depth map comprises: If the depth value of the target pixel in the explicit depth map is less than the depth value in the implicit depth map, determining the target depth value of the target pixel to be the depth value of the target pixel in the explicit depth map; The determining the target color values of the plurality of pixels according to the depth map to which the target depth values of the plurality of pixels belong, the implicit color map, and the color values of the plurality of pixels in the explicit color map comprises: If the target depth value of the target pixel belongs to the explicit depth map, the target color value of the target pixel is determined to be the color value of the target pixel in the explicit color map.
9. The method according to claim 1, characterized in that: After obtaining the synthesized image information according to the implicit rendering result and the explicit rendering result, the method further includes: Training a visual control model of the working robot according to the synthetic image information; The trained visual control module is deployed on the working robot to control the working robot to operate the target object in the preset static scene according to the visual control module.
10. An image synthesis device for a robot, characterized in that: The device comprises: An implicit rendering module is used to obtain an implicit rendering result of a real camera set on the working robot for a preset static scene according to an implicit radiation field model pre-trained for the preset static scene corresponding to the working robot, wherein the implicit rendering result includes: an implicit color map and an implicit depth map of the real camera on the working robot in a preset viewport direction; An explicit rendering module, used to generate an explicit rendering result of the target object in a preset simulation environment according to the relative placement position of the target object in the preset static scene, wherein the explicit rendering result includes: a virtual camera having the same parameters as the real camera on the working robot, an explicit color map and an explicit depth map in the preset viewport direction; An information synthesis module, used for obtaining synthesized image information according to the implicit rendering result and the explicit rendering result; The information synthesis module is specifically used to determine the target depth values of the multiple pixels according to the depth values of the multiple pixels in the implicit depth map and the explicit depth map, where the target depth value is the depth value in the implicit depth map or the depth value in the explicit depth map; determine the target color values of the multiple pixels according to the depth map to which the target depth values of the multiple pixels belong, the implicit color map, and the color values of the multiple pixels in the explicit color map, and the synthesized image information includes: the target depth values and target color values of the multiple pixels.
11. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the program instructions to perform the steps of the image synthesis method for a robot as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image synthesis method for a robot according to any one of claims 1 to 9 are executed.
