Cross-modal three-dimensional light field rendering method and three-dimensional rendering device
Through the cross-modal three-dimensional light field rendering method, visible light and infrared images are fused and processed to generate high-resolution rendering images, which solves the problems of low three-dimensional reconstruction accuracy and slow rendering speed in the existing technology, and achieves more efficient images. Rendering and information utilization.
Patent Information
- Application Number
- CN202410955235.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-10-01
AI Technical Summary
When existing 3D reconstruction technology requires high resolution, storage costs and computing power requirements increase at the cubic level, resulting in low model precision and slow NeRF rendering speed. It only performs 3D reconstruction at the visible light level, ignoring infrared. and other information on other bands.
Using a cross-modal three-dimensional light field rendering method, visible light images and infrared images are fused and rendered. By acquiring dual-band images, segmentation and fusion processing, multi-dimensional detection information is calculated, pseudo data is generated, features are extracted, combined and passed through volume The product and upsampling process generates high-resolution feature maps, which are integrated to generate cross-modal fusion rendering images.
It significantly improves the accuracy of the fused image, reduces the error in coordinate normalization of visible and infrared images, improves the resolution and quality of the rendered image, and effectively utilizes the temperature information of the infrared image.
Smart Images

Figure CN118736084A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer image processing, and in particular to a cross-modal three-dimensional light field rendering method and a three-dimensional rendering device. Background Art
[0002] The history of visible light 3D reconstruction can be traced back to the 1970s, when people tried to extract 3D scene information from multiple 2D images. Over time, a series of classic theories have emerged in the field of 3D reconstruction, such as SFM technology, MVS technology, SLAM technology, and so on.
[0003] However, these technologies have some common defects. They all rely on voxels, point clouds and other solutions to model three-dimensional scenes. As a result, when the resolution requirement is high, the storage cost and computing power requirements of voxels and point clouds will increase cubically, which greatly reduces the actual model precision, far below expectations.
[0004] Compared with this type of technology, NeRF (Neural Radiance Fields) abandons the traditional voxel and point cloud modeling methods and uses a function to implicitly represent continuous scenes. Although this saves storage costs, since NeRF needs to sample multiple points on a ray to render a pixel, its rendering time is greatly increased.
[0005] To effectively solve the problem of slow rendering speed of NeRF, NeLF (Neural Light Field) came into being. Unlike NeRF, which takes a point on a ray as input, NeLF takes a ray as input and directly outputs the corresponding pixel value, thus significantly improving the rendering speed of the image.
[0006] However, the current 3D reconstruction has only made breakthroughs at the visible light level, using only single-modality data while ignoring a large amount of effective information contained in other bands such as infrared images. However, dual-band or even multi-band fused 3D rendering has a profound effect in many medical fields, so it is particularly important to study how to perform cross-modality 3D rendering at the dual-band level. Summary of the invention
[0007] The technical problem solved by the present application is: how to achieve cross-modal 3D light field rendering, specifically how to fuse visible light images with infrared images for rendering. To solve this problem, the present application provides a cross-modal 3D light field rendering method and a 3D rendering device.
[0008] According to a first aspect, the present application provides a cross-modal three-dimensional light field rendering method, comprising:
[0009] A dual-band image of a target object is acquired, and the dual-band image is segmented and fused to obtain a fused image, wherein the dual-band image includes a visible light image and an infrared image; detection information of the dual-band image in multiple dimensions is calculated to generate pseudo data of the fused image; features of the fused image are extracted according to the pseudo data of the fused image to generate feature rasterized data; the feature rasterized data are combined and a high-resolution feature map is obtained through convolution and upsampling; and the high-resolution feature map is integrated to generate a cross-modal fused rendering image corresponding to the target object.
[0010] Furthermore, the segmentation and fusion processing of the dual-band image to obtain a fused image includes: separating the foreground and background of the visible light image and the infrared image respectively; adding the grayscale values or color components of the foreground of the visible light image and the foreground of the infrared image to obtain a fused foreground; setting the background of the visible light image as the basic background, processing the background of the visible light image and the background of the infrared image using a preset SCA fusion strategy to obtain a supplementary background, adding the basic background and the supplementary background to obtain a fused background; and obtaining the fused image based on the fused foreground and the fused background.
[0011] Furthermore, the calculation of detection information of the dual-band image in multiple dimensions to generate pseudo data of the fused image includes: establishing a camera coordinate system based on a visible light camera corresponding to the visible light image in the dual-band image and an infrared camera corresponding to the infrared image, and determining each imaging light point corresponding to the dual-band image in the camera coordinate system; using a preset NeRF model to calculate the light direction, optical center coordinates and light color corresponding to each imaging light point, respectively, to form light information; using the light information to obtain the coordinate values x, y, z of each feature point on the target object in three-dimensional space, the angle value θ of each feature point relative to the visible light camera and the angle value φ of each feature point relative to the infrared camera, and the distance d from each feature point to the infrared camera, and forming the dual-band image based on the coordinate values x, y, z, the angle values θ, φ, and the distance d. The invention relates to a method for obtaining a fused image by using a plurality of detection information of the dual-band image in multiple dimensions; performing high-dimensional encoding on the detection information of the dual-band image in multiple dimensions to obtain the encoding information corresponding to the spatial position, the detection direction, and the detection distance; inputting the encoding information corresponding to the spatial position into the front network layer of the preset neural network, and obtaining the transparency value of the corresponding feature point on the target object by using the output result of the front network layer; inputting the encoding information corresponding to the detection direction and the detection distance into the rear network layer of the preset neural network, and obtaining the feature value of the corresponding feature point on the target object by using the output result of the front network layer, wherein the feature value is an RGB value or a grayscale value, and pixel information is formed based on the transparency value and the feature value of the corresponding feature point on the target object; and generating pseudo data of the fused image according to the detection information of the dual-band image in multiple dimensions and the pixel information of the feature point on the target object.
[0012] Furthermore, the feature extraction of the fused image is performed based on the pseudo data of the fused image to generate feature rasterized data, including: generating a low-resolution light beam based on the pseudo data of the fused image; representing each light beam as an ordered pair of intersections with two fixed planes through a double-layer low-resolution light plate; performing dimensionality reduction projection on the coordinates of the ordered pair of intersections corresponding to each light beam, and obtaining feature vectors based on multiple 2D feature grids to form the feature rasterized data.
[0013] Furthermore, the method of representing each light bundle as an ordered pair of intersection points having two fixed planes by using a double-layer low-resolution light plate includes: using a double-layer low-resolution light plate to perform a double-plane parameterized representation on each light bundle to obtain corresponding 4D ray coordinates; dividing the three-dimensional light field where the target object is located into multiple subsets, using a preset NeLF model to learn each subset to achieve a continuous light field representation, in which each light bundle has an ordered pair of intersection points of two fixed planes; and obtaining the coordinates of the ordered pair of intersection points corresponding to each light bundle based on the 4D ray coordinates corresponding to each light bundle.
[0014] Furthermore, the coordinates of the ordered intersection pairs corresponding to each light beam are subjected to dimensionality reduction projection, and feature vectors are obtained based on multiple 2D feature grids to form the feature rasterized data, including: the coordinates of the ordered intersection pairs corresponding to each light beam are subjected to dimensionality reduction projection to six 2D feature grids; six interpolated F-dimensional features are generated respectively through bilinear interpolation of the six 2D feature grids, and the statistically generated F-dimensional features are formed into the feature rasterized data; wherein F is a positive integer.
[0015] Furthermore, the feature rasterized data are combined and a high-resolution feature map is obtained through convolution and upsampling, including: based on the feature rasterized data, six F-dimensional features corresponding to each light beam are connected to generate a feature vector, and the generated feature vectors are combined to construct a low-resolution 2D feature map; the low-resolution 2D feature map is processed by the convolution layer, GeLU activation function, and RB residual in the preset deep ResMLP neural network to extract feature points; the resolution of the 2D feature map is improved through the SR super-resolution sampling processing in the deep ResMLP neural network to obtain the high-resolution feature map.
[0016] According to a second aspect, the present application provides a three-dimensional rendering device, comprising:
[0017] An image fusion module is used to obtain a dual-band image of a target object, and to segment and fuse the dual-band image to obtain a fused image, wherein the dual-band image includes a visible light image and an infrared image; a pseudo data generation module is communicated with the image fusion module, and is used to calculate the detection information of the dual-band image in multiple dimensions and generate pseudo data of the fused image; a feature grid generation module is communicated with the pseudo data generation module, and is used to extract features of the fused image according to the pseudo data of the fused image and generate feature rasterized data; a view synthesis module is communicated with the feature grid generation module, and is used to combine the feature rasterized data and obtain a high-resolution feature map through convolution and upsampling; an image generation module is communicated with the view synthesis module, and is used to integrate the high-resolution feature map to generate a cross-modal fused rendering image corresponding to the target object.
[0018] Furthermore, the feature grid generation module includes: a light beam generation module, which is used to obtain the pseudo data of the fused image from the pseudo data generation module, and generate a low-resolution light beam according to the pseudo data of the fused image; a light parameterization module, which is communicated with the light beam generation module, and is used to represent each light beam as an ordered pair of intersections with two fixed planes through a double-layer low-resolution light plate; a grid dimension reduction module, which is communicated with the light parameterization module, and is used to perform dimension reduction projection on the coordinates of the ordered pair of intersections corresponding to each light beam, obtain feature vectors based on multiple 2D feature grids, and form them into the feature rasterized data.
[0019] Furthermore, the view synthesis module includes: a feature map generation module, which is used to obtain the feature rasterized data from the grid dimension reduction module and construct a low-resolution 2D feature map based on the feature rasterized data; a network decoding module, which is communicated with the feature map generation module and is used to improve the resolution of the 2D feature map through a preset deep ResMLP neural network to obtain the high-resolution feature map.
[0020] The beneficial effects of this application are:
[0021] According to the above cross-modal three-dimensional light field rendering method, the foreground and background of the dual-band image of the target object are segmented and fused. Since the foreground image contains more high-frequency information, and the background image contains more low-frequency information, the characteristics of the information contained are different. Therefore, the foreground and background images are separated and fused through a mask segmentation network, which can significantly improve the accuracy of the fused image. In addition, the present application adopts a mode of first fusing the image and then rendering it to reduce the error caused by the normalization of the coordinates of the visible light image and the infrared image. Therefore, when generating pseudo data of the fused image, the detection information (coordinate value, angle value, distance) of each feature point on the target object is more accurate.
[0022] In the process of fusing dual-band images and fusing image pseudo-data, multi-dimensional detection information is added. Then, based on the characteristics that the radiation intensity of infrared images decreases with the increase of temperature and the radiation intensity is proportional to the detection distance, the pseudo-data of the fused image can be effectively fitted to the characteristics of the infrared image.
[0023] Compared with the method of using the original NeRF to render images, this application uses a ResMLP neural network including a convolutional layer, a residual network, an upsampling layer, and a super-resolution layer to process feature rasterized data, so that the resolution and rendering quality of the rendered image are further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a process of a cross-modal three-dimensional light field rendering method in an embodiment of the present application;
[0025] Figure 2 This is a flow chart of the fusion of visible light image and infrared image in one embodiment of the present application;
[0026] Figure 3 A schematic diagram of the principle of high-dimensional mapping of multi-dimensional detection information in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of a network architecture of a deep ResMLP neural network in one embodiment of the present application;
[0028] Figure 5 A schematic diagram of the network architecture of the SR network and the RB network in the deep ResMLP neural network in one embodiment of the present application;
[0029] Figure 6 A schematic diagram of the structure of a cross-modal three-dimensional rendering medium in one embodiment of the present application. DETAILED DESCRIPTION
[0030] The present application is further described in detail below through specific implementation methods in conjunction with the accompanying drawings.
[0031] In one embodiment of the present application, a cross-modal 3D light field rendering method is provided (taking visible light and infrared band fusion as an example), such as Figure 1 As shown, it mainly includes steps S21 to S25.
[0032] Step S21, obtain a dual-band image of the target object, segment and fuse the dual-band image to obtain a fused image, where the dual-band image includes a visible light image and an infrared image. This step can be understood as fusing the images taken by the dual-band camera (visible light camera and infrared camera) in an attention fusion manner.
[0033] In a specific embodiment, the dual-band image is segmented and fused to obtain a fused image, including the following process:
[0034] (1) Separate the foreground and background of the visible light image and the infrared image in the dual-band image. Specifically, the foreground and background of the visible light image and the infrared image can be separated through a mask segmentation network. The mask segmentation network (SOS Mask) is a segmentation network designed based on the HRNet network. After convolution and downsampling, multi-scale (different resolution) features are obtained, and the mask image is obtained through upsampling and other operations.
[0035] (2) Add the grayscale values or color components of the foreground of the visible light image and the foreground of the infrared image, for example, directly add the two foreground images (that is, add the grayscale values or color components of the corresponding pixels of the two images) to obtain a fused foreground. Of course, the infrared image and the visible light image can also be divided into infrared foreground, infrared background, visible light foreground, and visible light background images according to the mask image, and the foreground and background images are sent to the encoder in the fusion network to extract multi-scale features, and the foreground image and background image features of different scales are fused according to the fusion strategy, and finally the fused features of different scales are integrated to obtain a fused image.
[0036] (3) Set the background of the visible light image as the basic background, use the preset SCA fusion strategy to process the two background images (the background of the visible light image and the background of the infrared image) to obtain the supplementary background, and then add the basic background and the supplementary background to obtain the fused background. The SCA fusion strategy can be composed of two parts: channel attention and spatial attention, and the supplementary background is obtained by the mean method.
[0037] (4) A fused image is obtained according to the fused foreground and the fused background, that is, the fused foreground and the fused background are added to obtain the fused image.
[0038] Step S22, calculate the detection information of the dual-band image in multiple dimensions, and generate pseudo data of the fused image, such as using the NeRF model to generate pseudo data of the fused image. This step can be understood as using the NeRF model as a teacher model to generate multi-dimensional detection information including spatial position, detection direction, detection distance, and four-element pseudo data including RGB (grayscale).
[0039] In a specific embodiment, calculating the detection information of the dual-band image in multiple dimensions and generating pseudo data of the fused image includes the following process:
[0040] (1) A camera coordinate system is established based on the visible light camera corresponding to the visible light image and the infrared camera corresponding to the infrared image in the dual-band image, and each imaging light point corresponding to the dual-band image is determined in the camera coordinate system. It can be understood that the dual-band detection data of the target object is obtained from the visible light camera and the infrared camera, and each imaging light point corresponding to the respective shooting data is determined in the camera coordinate system of the above two cameras; for the camera, each imaging light point is a mapping of a ray (radiation or reflection) from the target object on the imaging surface of the camera, and the detection data in the camera coordinate system of the camera reflects the imaging results of each corresponding imaging light point on the imaging surface.
[0041] (2) The preset NeRF model is used to calculate the light direction, optical center coordinates and light color corresponding to each imaging light point to form light information. For example, the light direction and optical center coordinate information of the imaging light point can be calculated based on the camera's internal parameter K and external parameter c2w. The light direction and optical center coordinate information can be obtained through matrix and coordinate operations based on the camera's internal and external parameters. Color information can be obtained by reading the RGB value or grayscale value of the imaging light point. The full name of the NeRF model is Neural radiance fields, which is a technology that uses neural networks to generate 3D representations of objects or scenes from 2D sparse images.
[0042] (3) Using the light direction and color corresponding to each imaging light point in the light information, the coordinate values x, y, and z of each feature point on the target object in three-dimensional space, the angle value θ of each feature point relative to the visible light camera, and the angle value relative to the infrared camera are obtained. And the distance d from each feature point to the thermal infrared camera, that is, multi-dimensional information. It can be understood that based on the coordinate values x, y, z, the angle values θ, The distance d forms the detection information of the dual-band image in multiple dimensions.
[0043] (4) Encode the multi-dimensional information (detection information of the dual-band image in multiple dimensions) in a high-dimensional manner to obtain the encoding information corresponding to the spatial position, detection direction, and detection distance. For details, please refer to Figure 3 , the spatial position 41, detection direction 42 and detection distance 43 of each feature point in the multi-dimensional information are subjected to high-dimensional mapping of Fourier characteristics, and the high-dimensional mapping results of each feature point (i.e., high-dimensional information that is easy for the model to distinguish) are used to obtain the encoding information corresponding to the spatial position, detection direction and detection distance, i.e., high-dimensional information that is easy to distinguish. It can be understood that in order to allow the preset neural network to better extract information, the high-dimensional information is encoded through the encoder to set an L value for the coordinates, direction and distance respectively, and the following encoding method is constructed
[0044] γ(p)=(sin(2 0 πp),cos(2 0 πp),…,sin(2 L-1 πp),cos(2 L-1 πp))
[0045] According to the above encoding method, the high-dimensional mapping of the Fourier characteristics of the information can be completed, where p represents the data to be processed.
[0046] (5) The encoded information corresponding to the spatial position is input into the front network layer of the preset neural network, and the output result of the front network layer is used to obtain the transparency value of the corresponding feature point on the target object.
[0047] (6) The coded information corresponding to the detection direction and the detection distance is input into the rear network layer of the preset neural network, and the output result of the front network layer is used to obtain the feature value of the corresponding feature point on the target object. The feature value is an RGB value or a grayscale value. The pixel information is formed based on the transparency value and the feature value (RGB value or grayscale value) of the corresponding feature point on the target object.
[0048] It can be understood that after obtaining the detection information of the dual-band image in multiple dimensions and the pixel information of the feature points on the target object, the pseudo data of the fused image can be generated according to the detection information of the dual-band image in multiple dimensions and the pixel information of the feature points on the target object. That is, the four-element pseudo data including the multi-dimensional detection information of the spatial position, the detection direction, the detection distance, and RGB (grayscale) is generated.
[0049] Step S23, extracting features from the fused image based on the pseudo data of the fused image to generate feature rasterized data, which can be understood as generating a feature grid represented by the light field.
[0050] In a specific embodiment, extracting features from the fused image based on pseudo data of the fused image to generate feature rasterized data includes the following process:
[0051] (1) Generate a low-resolution light bundle based on the pseudo data of the fused image. This step can be understood as generating a series of low-resolution light bundles for processing the image.
[0052] (2) Each light beam is represented as an ordered pair of intersection points with two fixed planes through a double-layer low-resolution light plate. For example, a 4D grid is obtained through a lightweight double-plane light plate, which can also be understood as representing each directional light beam as an ordered pair of intersection points with two fixed planes through a double-layer low-resolution light plate. Specifically, a double-layer low-resolution light plate can be used to perform a double-plane parameterized representation of each light beam to obtain the corresponding 4D ray coordinates; the three-dimensional light field where the target object is located is divided into multiple subsets, and a preset NeLF model is used to learn each subset to achieve a continuous light field representation. When partitioning, ensure that there is sufficient overlap between sub-scenes, so as to achieve a continuous light field representation without additional loss while maintaining the front scene assumption. Then, the coordinates of the ordered pair of intersection points corresponding to each light beam can be obtained based on the 4D ray coordinates corresponding to each light beam.
[0053] (3) The coordinates of the ordered intersection pairs corresponding to each light beam are projected down to dimension, and feature vectors are obtained based on multiple 2D feature grids to form the feature rasterized data. For example, decomposing a 4D grid to obtain a 2D grid can also be understood as projecting the coordinates of the 4D ordered intersection pairs of each ray into six 2D feature grids. Of course, the coordinates of the ordered intersection pairs corresponding to each light beam are projected down to dimension, and feature vectors are obtained based on multiple 2D feature grids to form the feature rasterized data, including the following process: the coordinates r = (x, y, u, v) of the ordered intersection pairs corresponding to each light beam are projected down to dimension into six 2D feature grids, where each ray corresponds to a pixel in the downsampled image; six interpolated F-dimensional features are generated respectively through bilinear interpolation of the six 2D feature grids, and the statistically generated F-dimensional features are formed into the feature rasterized data; where F is a positive integer. It can be understood that the feature vector is obtained from the subspace of the 2D feature grid, and the feature value is bilinearly interpolated through the 2D feature grid, so that six interpolated F-dimensional features can be generated.
[0054] Step S24, combining the feature rasterized data and obtaining a high-resolution feature map through convolution and upsampling. For example, it can be understood as view synthesis using feature grids.
[0055] In a specific embodiment, the feature rasterized data are combined and a high-resolution feature map is obtained by convolution and upsampling, including the following process:
[0056] (1) Based on the feature rasterized data, the six F-dimensional features corresponding to each ray bundle are connected to generate a feature vector, and the generated feature vectors are combined to construct a low-resolution 2D feature map. This step can be understood as connecting the six F-dimensional features generated by each ray to generate a feature vector, and then integrating the feature vectors of each ray to generate a low-resolution 2D feature map.
[0057] (2) Use the convolutional layer, GeLU activation function, and RB residual in the preset deep ResMLP neural network to process the low-resolution 2D feature map to extract feature points.
[0058] (3) The resolution of the 2D feature map is improved through the SR super-resolution sampling processing in the deep ResMLP neural network to obtain a high-resolution feature map.
[0059] It should be noted that MLP is a multi-layer perceptron, which is a commonly used neural network model that can be used for tasks such as classification, regression, and clustering, and has good generalization ability. MLP is composed of multi-layer perceptrons. Perceptron is a linear classifier that can learn and recognize simple patterns. By combining multiple perceptrons together, MLP can learn and recognize more complex patterns. The deep ResMLP neural network (Residual MLP) here is an improved model of MLP, which is mainly optimized for the shortcomings of MLP. By introducing residual connections, the model is easier to jump out of the local minimum during training, which improves the convergence speed and stability of the model. ResMLP simplifies the structure of the model by reducing the number of layers and neurons in the model, making the training process of the model more stable and reducing the consumption of computing resources and storage space.
[0060] It can be understood that decoding feature maps through convolutional layers and upsampling layers includes the following processes: using a series of 1×1 convolutional layers to process low-resolution feature maps to extract their feature points; then increasing the nonlinearity of the model through the GeLU activation function; then using the RB residual block to reduce the error of the model during deep training; finally, improving the resolution of the feature map through a series of SR super-resolution sampling modules.
[0061] Step S25, integrating the high-resolution feature map to generate a cross-modal fused rendering image corresponding to the target object. Since the high-resolution feature map contains a variety of detailed information of the feature points on the target object and can characterize the object features in both visible light and infrared light modes, integrating the feature maps can obtain a fused rendering image with rich information.
[0062] Regarding the above step S21, when performing 3D light field rendering, it is necessary to generate light information of the cross-modal fusion image. Therefore, before starting 3D reconstruction, it is also necessary to perform image fusion on the captured dual-band images to obtain a fused image with complete information. Figure 2 ,The fusion process of cross-modal images will be described in detail below with the help of ,illustrated processing steps.
[0063] Step S31, using a mask segmentation network to generate an infrared mask image.
[0064] Step S32, segmenting the foreground and background of the two images (visible light image and infrared image) according to the generated infrared mask segmentation image, thereby obtaining a visible light foreground image, a visible light background image, an infrared foreground image and an infrared background image.
[0065] In step S33, an addition operation is directly performed on the dual-band foreground image, that is, the RGB value of the visible light image and the grayscale value of the infrared image at the same position are added.
[0066] Step S34, processing the cross-modal background image through the SCA fusion strategy, that is, using the weights generated by the model itself to process the two images to generate a supplementary background.
[0067] Step S35 , directly adding the supplementary background and the visible light background image serving as the basic background to obtain a fused background image.
[0068] Step S36, adding the fused foreground image and the fused background image to obtain a fused image, and the image fusion is completed.
[0069] In the NeLF model for 3D rendering, a deep ResMLP neural network is used for training, so that more complex functions can be represented. Please refer to Figure 4 , the neural network will be explained below.
[0070] Input (marked 51) indicates that the feature information in the low-resolution 2D feature map is used as input and sent to the deep ResMLP neural network for training.
[0071] conv_block (marked 52), that is, a series of continuous 1×1 convolutional layers, convolve the feature map through the convolutional layer, continuously extract features from the feature map, and thus obtain a large amount of key information of the target object.
[0072] GeLU (label 53), or Gaussian error linear unit, is a widely used activation function. As a nonlinear activation function, it can better adapt to the nonlinear relationship in the neural network and improve the performance of the model; at the same time, it can effectively avoid the gradient disappearance problem and contribute to the stable training of the network.
[0073] RB_block (marked 54), i.e. residual block, has a specific internal network, see 5, which contains two 1×1 convolutional layers (marked 62 and 65), two BNs, i.e. batch normalization blocks (marked 63 and 66), and a GeLU activation function (marked 64). Therefore, adding this residual block to the neural network can not only solve the problem of gradient disappearance and gradient explosion, but also help the network learn feature representation better and effectively improve the training speed.
[0074] SR_block (marked 55), i.e., the super-resolution module, the specific internal network can be referred to Figure 5 , which contains an upsampling layer (marked 61), two 1×1 convolutional layers (marked 62 and 65), two BNs - batch normalization blocks (marked 63 and 66), and a GeLU activation function (marked 64). The first super-resolution module SR 1 The kernel size in the upsampling layer is 4×4, doubling the size of the input H and W to 2H and 2W; while the second super-resolution module SR2 The kernel size in the upsampling layer is 3×3, which expands the height and width to 3H and 3W. This module uses 2×SR 1 +SR 2 The input is upsampled by 12×, which greatly improves the resolution of the image.
[0075] conv1×1 (marked 56), and finally connected to a 1×1 convolutional layer to further extract image features.
[0076] Output (marked 57), outputs the image with greatly improved resolution after ResMLP.
[0077] It can be understood that according to the above-mentioned cross-modal three-dimensional light field rendering method, the dimension of detection distance is added in the process of NeRF model rendering infrared images and fused images and generating pseudo data. According to the characteristics that the radiation intensity of infrared images decreases with the increase of temperature and the radiation intensity is proportional to the detection distance, the addition of the detection distance dimension more effectively fits the characteristics of infrared images. At the same time, before generating pseudo data of fused images according to the NeRF model, the foreground and background segmentation and fusion of the dual-band images of the target object are performed. The foreground image contains more high-frequency information, while the background image contains more low-frequency information, and the characteristics of the information contained are different; the foreground and background images are separated by a mask segmentation network, fused separately and then added, so that the accuracy of the fused image is improved.
[0078] In addition, the mode of fusion before rendering reduces the error of normalization of visible light image and infrared image coordinates. Therefore, when NeRF is used to generate pseudo data of fused images, the coordinate values x, y, z of each feature point on the target object in three-dimensional space and the angle values θ, y, z of each feature point relative to each camera are obtained. The multi-dimensional information such as the distance d from each feature point to the infrared camera is more accurate. At the same time, compared with the original NeRF for image rendering, this method uses a 88-layer ResMLP neural network including a series of 1×1 convolutional layers, residual networks, upsampling layers, super-resolution layers, etc. to process the image, which further improves the resolution and rendering quality of the rendered image. The following is a detailed analysis.
[0079] For fused images, the camera parameters of each image can be obtained through methods such as colmap, and the images and corresponding parameters can be input into the model. Generate the optical center coordinates and light direction of the light corresponding to each pixel in the actual space. Divide the blocks according to the color features of the image, and assign importance based on whether the blocks contain the target object. Blocks with low importance generate a small number of rays and compress the number of rays. A fixed number of rays are randomly extracted in each round of training, and certain query points are randomly sampled on the rays according to the optical center coordinates and light direction, and their coordinates, query direction, and distance to the optical center are calculated. In order to allow the network to better extract information, the data is encoded through an encoder, such as Figure 3 As shown: Set an L value for the spatial position, detection direction and detection distance respectively, and construct an encoder as shown in the following formula. Send the encoded data to MLP to calculate
[0080] γ(p)=
[0081] (sin(2 0 πp),cos(2 0 πp),…,sin(2 L-1 πp),cos(2 L-1 πp))(1)
[0082] The color feature c corresponding to the query point i and the transparency feature σ i Based on the transparency feature of the point on the ray, the inverse transformation on the ray is resampled to obtain a query point with a higher probability on the surface of the object, and then sent to the MLP to calculate the feature. The features on the same ray are used to generate the color of the image point at the optical center through the rendering method. For each point i on the ray, its opacity feature T is calculated. i , that is, the opacity characteristic 1-σ from the first point to its previous point i Multiply and then calculate T at each point of the ray i , σ i 、c i After multiplying them, add them to get the pixel color, and refer to (2) to calculate the mean square error between it and the real pixel color. The error is automatically back-propagated according to the calculation graph to modify each weight of the network, completing a round of training. Refer to formula (2) and repeat the training until you are satisfied and stop the training.
[0083]
[0084] Generating pixel values requires a trained model. Import the model weights into the model, first generate the imaging position and shape (camera parameters) of the image to be rendered, generate the light information corresponding to each pixel, repeat the above training steps for each light to get the image point color, and thus get the pseudo data generated by NeRF.
[0085] Then a low-resolution beam of rays is generated, each ray represents a pixel, and the pseudo-data image generated by NeRF is sampled at a low resolution.
[0086] Each directional light is represented as an ordered pair of intersection points with two fixed planes through a double-layer low-resolution light plate, represented as r = (x, y, u, v). At the same time, since the storage capacity of the 4D grid representation is large, it is projected into six 2D feature grids as its subspace, which can greatly save storage space.
[0087] Through bilinear interpolation of the 2D feature grid, six F-dimensional features can be obtained, and the features are connected to obtain a 6F-dimensional feature vector. All feature vectors are integrated to obtain a low-resolution feature map.
[0088] Finally, the low-resolution feature map is decoded and an 88-layer ResMLP neural network including a series of 1×1 convolutional layers, residual networks, upsampling layers, and super-resolution layers is used to improve the image resolution and accuracy.
[0089] It should be noted that the pseudo data that the original NeRF inputs to NeLF only contains coordinates (x, y, z) and directions. Although the six dimensions of RGB meet the requirements of 3D rendering of visible light images, due to the differences between visible light images and infrared images, these six dimensions alone cannot meet the requirements of 3D rendering of fused images. Since the radiation intensity of infrared images decreases with the increase of temperature, which satisfies the functional relationship shown in formula (3), temperature becomes a crucial factor in fused image rendering.
[0090] P=εσT 4 (0<ε<1) (3)
[0091] The temperature is proportional to the distance. Therefore, when the distance dimension is added to the pseudo data of the NeRF fusion image and RGB is modified to RGB or grayscale, the rendering result contains more information and is more accurate.
[0092] It should be noted that due to the differences between visible light images and infrared images, normalizing the coordinates between the two images is an extremely complex task; at the same time, if the two images are matched, the information features contained in the foreground and background images will be different, which may lead to large errors. Therefore, the technical solution of this application abandons the method of normalizing the coordinates of visible light images and infrared images during the rendering process, but first fuses the two images and then reconstructs the fused image in three dimensions. Figure 2As shown in the figure, this method adopts the foreground and background segmentation and fusion method. First, the foreground and background of the visible light image and the infrared image are segmented, and then the foreground and background of the two images are fused to obtain the fused foreground and fused background respectively, and finally they are added to obtain the fused image. Since the foreground contains a lot of high-frequency information and the background contains a lot of low-frequency information, this method effectively reduces the error of fusion between high-frequency and low-frequency information, making the information contained in the fused image more comprehensive, and solving the problem of significant reduction of information due to image fusion.
[0093] NeLF's 3D reconstruction is divided into two stages: first, the pre-trained NeRF model is used to generate the position coordinates (x, y, z) and the direction Distance (d), RGB (grayscale value) as pseudo data, and then send the pseudo data to the deep ResMLP for training. Since the ResMLP neural network used in this method contains a series of 1×1 convolutional layers, residual networks, upsampling layers, and super-resolution layers, and the parameters of the deep ResMLP network are continuously fine-tuned according to the training results, the rendering results are more accurate and the effect is better.
[0094] In one embodiment, based on the above-mentioned cross-modal 3D light field rendering method, a 3D rendering device is also disclosed. Figure 6 The 3D rendering device includes an image fusion module 11, a pseudo data generation module 12, a feature grid generation module 13, a view synthesis module 14, and an image generation module 15; wherein the feature grid generation module 13 may specifically include a light beam generation module 16, a light parameterization module 17, and a grid dimension reduction module 18, and the view synthesis module 14 may specifically include a feature map generation module 19 and a network decoding module 110. The following are described respectively.
[0095] The image fusion module 11 is used to obtain a dual-band image of the target object, and segment and fuse the dual-band image to obtain a fused image. The dual-band image here includes a visible light image and an infrared image. It can be understood as segmenting and fusing the foreground and background of the dual-band image of the target object (such as a visible light image and an infrared image). First, the foreground and background of the visible light image and the infrared image are separated by a mask segmentation network, and then the two foreground images are directly added (that is, the grayscale values or color components of the corresponding pixels of the two images are added) to obtain a fused foreground; at the same time, the background of the visible light image is used as the basic background, and the two background images are processed using the SCA fusion strategy to obtain a supplementary background, and then the basic background and the supplementary background are added to obtain a fused background. Finally, the fused foreground and the fused background are added to obtain a fused image.
[0096] The pseudo data generation module 12 is communicatively connected with the image fusion module, and is used to calculate the detection information of the dual-band image in multiple dimensions and generate pseudo data of the fused image. For example, the pseudo data generation module 12 can be used to obtain the dual-band data of the target object through the improved NeRF model. Taking the infrared and visible light bands as an example, the pseudo data generation module 11 can obtain the dual-band detection data of the target object from the visible light and infrared detection cameras, and determine the imaging light points corresponding to the respective shooting data in the camera coordinate system of the above two cameras. The light direction, optical center coordinates and color corresponding to each imaging light point are calculated and formed into light information. Using the light direction and color corresponding to each imaging light point in the light information, the coordinate values x, y, z of each feature point on the target object in three-dimensional space are processed, and the angle values θ, y, z of each feature point relative to each shooting camera are obtained. And the distance d from each feature point to the infrared camera, that is, multi-dimensional information. The multi-dimensional information is encoded in a high dimension to obtain the encoding information corresponding to the spatial position, detection direction, and detection distance. The encoding information corresponding to the spatial position is input into the front network layer of the preset neural network, and the output result of the front network layer is used to obtain the transparency value of the feature point at the query position. The encoding information corresponding to the detection direction and detection distance of any feature point is input into the back network layer of the preset neural network, and the RGB or grayscale value of any feature point is obtained by calculation, and the pixel information is formed based on the transparency value and RGB value or grayscale value of any feature point.
[0097] The feature grid generation module 13 is connected in communication with the pseudo data generation module, and is used to extract features from the fused image based on the pseudo data of the fused image, and generate feature rasterized data. In the feature grid generation module 13, the light beam generation module 16 is used to obtain the pseudo data of the fused image from the pseudo data generation module, and generate a low-resolution light beam based on the pseudo data of the fused image; the light parameterization module 17 is connected in communication with the light beam generation module 16, and is used to represent each light beam as an ordered pair of intersections with two fixed planes through a double-layer low-resolution light plate; the grid dimension reduction module 18 is connected in communication with the light parameterization module 17, and is used to perform dimension reduction projection on the coordinates of the ordered pair of intersections corresponding to each light beam, and obtain feature vectors based on multiple 2D feature grids and form them into feature rasterized data. Of course, it can also be understood that the light beam generation module 16 is used to generate a series of low-resolution light beams to process images. The light parameterization module 17 is used to parameterize the light using a double-layer low-resolution light plate; specifically, each directional light passes through a fixed double-layer low-resolution light plate to obtain a four-dimensional coordinate group r = (x, y, u, v), that is, an ordered intersection pair of two fixed planes. The grid dimension reduction module 18 is used to project the 4D ordered intersection pair coordinates of each ray into six 2D feature networks; specifically, the fixed intersection pair coordinates r = (x, y, u, v) of each ray are first reduced in dimension and projected into six 2D feature grids, where each ray corresponds to a pixel in the downsampled image, and then the feature vector is obtained from the subspace of the 2D feature grid, and the feature value is bilinearly interpolated through the 2D grid to generate six interpolated F-dimensional features.
[0098] The view synthesis module 14 is communicatively connected to the feature grid generation module, and is used to combine the feature rasterized data, and obtain a high-resolution feature map through convolution and upsampling. In the view synthesis module 14, the feature map generation module 19 is used to obtain the feature rasterized data from the grid dimension reduction module, and construct a low-resolution 2D feature map based on the feature rasterized data; the network decoding module 110 is communicatively connected to the feature map generation module 19, and is used to improve the resolution of the 2D feature map through a preset deep ResMLP neural network to obtain a high-resolution feature map. Of course, it can be understood that the feature map generation module 19 is used to combine ray features to generate a low-resolution 2D feature map. Specifically, the six F-dimensional features generated by each ray are connected to form a feature vector, and then the feature vector of each ray is integrated to generate a low-resolution 2D feature map. The network decoding module 110 is used to improve the resolution of the low-resolution 2D feature map through a deep ResMLP neural network. Specifically, a series of 1×1 convolutional layers (see Figure 4 Mark 52) processes the low-resolution feature map to extract its feature points; then passes through the GeLU activation function (see Figure 5 Mark 53) increases the nonlinearity of the model; then through the RB residual block (see Figure 4Mark 54) reduces the error of the model during deep training; then through a series of SR super-resolution sampling modules (see Figure 4 Mark 55) to increase the resolution of the feature map; finally, a 1×1 convolution layer (see Figure 4 Mark 56) further extracts the features of the target object.
[0099] The image generation module 15 is in communication with the network decoding module 110 and is used to integrate the high-resolution feature map to generate a cross-modal fused rendering image corresponding to the target object. It can be understood that the image generation module 15 is used to integrate the feature output and the high-resolution image after the neural network to obtain a cross-modal fused rendering image.
[0100] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A cross-modal three-dimensional light field rendering method, characterized in that: include: Acquire a dual-band image of the target object, and segment and fuse the dual-band image to obtain a fused image, wherein the dual-band image includes a visible light image and an infrared image; Calculating detection information of the dual-band image in multiple dimensions to generate pseudo data of the fused image; Extracting features of the fused image according to the pseudo data of the fused image to generate feature rasterized data; The feature rasterized data are combined and a high-resolution feature map is obtained by convolution and upsampling. The high-resolution feature map is integrated to generate a cross-modal fused rendering image corresponding to the target object.
2. The three-dimensional light field rendering method according to claim 1, characterized in that: The step of segmenting and fusing the dual-band image to obtain a fused image includes: Separating the foreground and background of the visible light image and the infrared image; Adding the grayscale values or color components of the foreground of the visible light image and the foreground of the infrared image to obtain a fused foreground; The background of the visible light image is set as a basic background, the background of the visible light image and the background of the infrared image are processed by a preset SCA fusion strategy to obtain a supplementary background, and the basic background and the supplementary background are added to obtain a fused background; The fused image is obtained according to the fused foreground and the fused background.
3. The three-dimensional light field rendering method according to claim 1, characterized in that: The calculating the detection information of the dual-band image in multiple dimensions to generate pseudo data of the fused image includes: Establishing a camera coordinate system based on a visible light camera corresponding to the visible light image in the dual-band image and an infrared camera corresponding to the infrared image, and determining each imaging light point corresponding to the dual-band image in the camera coordinate system; The preset NeRF model is used to calculate the light direction, optical center coordinates and light color corresponding to each imaging light point to form light information; The light information is used to obtain the coordinate values x, y, and z of each feature point on the target object in the three-dimensional space, the angle value θ of each feature point relative to the visible light camera and the angle value φ of each feature point relative to the infrared camera, and the distance d from each feature point to the infrared camera, and based on the coordinate values x, y, and z, the angle values θ and φ, and the distance d, the detection information of the dual-band image in multiple dimensions is formed; Performing high-dimensional encoding on the detection information of the dual-band image in multiple dimensions to obtain encoding information corresponding to the spatial position, detection direction, and detection distance respectively; Inputting the coded information corresponding to the spatial position into the front network layer of the preset neural network, and using the output result of the front network layer to obtain the transparency value of the corresponding feature point on the target object; Inputting the coded information corresponding to the detection direction and the detection distance into the rear network layer of the preset neural network, using the output result of the front network layer to obtain the feature value of the corresponding feature point on the target object, the feature value is RGB value or grayscale value, and forming pixel information based on the transparency value and the feature value of the corresponding feature point on the target object; The pseudo data of the fused image is generated according to the detection information of the dual-band image in multiple dimensions and the pixel information of the feature points on the target object.
4. The three-dimensional light field rendering method according to claim 3, characterized in that: The step of extracting features from the fused image according to the pseudo data of the fused image to generate feature rasterized data comprises: generating a low-resolution light bundle according to the pseudo data of the fused image; Each ray bundle is represented as an ordered pair of intersection points with two fixed planes by a two-layer low-resolution light sheet; The coordinates of the ordered intersection point pairs corresponding to each light beam are subjected to dimensionality reduction projection, and feature vectors are obtained based on multiple 2D feature grids to form the feature rasterized data.
5. The three-dimensional light field rendering method according to claim 4, characterized in that: The method uses a double-layer low-resolution light plate to represent each light bundle as an ordered pair of intersection points with two fixed planes, including: Use a double-layer low-resolution light plate to perform a bi-plane parameterized representation of each light beam to obtain the corresponding 4D ray coordinates; Dividing the three-dimensional light field where the target object is located into a plurality of subsets, and learning each subset using a preset NeLF model to achieve a continuous light field representation, in which each light beam has an ordered pair of intersection points of two fixed planes; The coordinates of the ordered intersection point pairs corresponding to each ray bundle are obtained based on the 4D ray coordinates corresponding to each ray bundle.
6. The three-dimensional light field rendering method according to claim 5, characterized in that: The step of performing dimension reduction projection on the coordinates of the ordered intersection points corresponding to each light beam, acquiring feature vectors based on a plurality of 2D feature grids and forming the feature rasterized data comprises: The coordinates of the ordered intersection points corresponding to each light bundle are projected into six 2D feature grids; Through bilinear interpolation of six 2D feature grids, six interpolated F-dimensional features are generated respectively, and the statistically generated F-dimensional features are formed into the feature rasterized data; wherein F is a positive integer.
7. The three-dimensional light field rendering method according to claim 6, characterized in that: The step of combining the feature rasterized data and obtaining a high-resolution feature map by convolution and upsampling includes: Based on the feature rasterized data, six F-dimensional features corresponding to each light beam are connected to generate a feature vector, and the generated feature vectors are combined to construct a low-resolution 2D feature map; Use the convolutional layer, GeLU activation function, and RB residual in the preset deep ResMLP neural network to process the low-resolution 2D feature map to extract feature points; The resolution of the 2D feature map is improved by SR super-resolution sampling processing in a deep ResMLP neural network to obtain the high-resolution feature map.
8. A three-dimensional rendering device, characterized in that: include: An image fusion module is used to obtain a dual-band image of a target object, and to segment and fuse the dual-band image to obtain a fused image, wherein the dual-band image includes a visible light image and an infrared image; A pseudo data generating module, which is in communication connection with the image fusion module and is used to calculate the detection information of the dual-band image in multiple dimensions and generate pseudo data of the fused image; A feature grid generation module, which is in communication with the pseudo data generation module and is used to extract features of the fused image according to the pseudo data of the fused image to generate feature grid data; A view synthesis module, which is in communication with the feature grid generation module, and is used to combine the feature grid data and obtain a high-resolution feature map through convolution and upsampling processing; An image generation module is communicatively connected to the view synthesis module, and is used to integrate the high-resolution feature map to generate a cross-modal fused rendering image corresponding to the target object.
9. The three-dimensional rendering device according to claim 8, characterized in that: The feature grid generation module comprises: a light beam generating module, configured to obtain the pseudo data of the fused image from the pseudo data generating module, and generate a low-resolution light beam according to the pseudo data of the fused image; a light parameterization module, which is in communication with the light bundle generation module and is used to represent each light bundle as an ordered pair of intersection points with two fixed planes through a double-layer low-resolution light plate; The grid dimension reduction module is connected to the light parameterization module for performing dimension reduction projection on the coordinates of the ordered intersection points corresponding to each light beam, obtaining feature vectors based on multiple 2D feature grids and forming the feature rasterized data.
10. The three-dimensional rendering device according to claim 9, characterized in that: The view synthesis module comprises: A feature map generation module, used for acquiring the feature rasterized data from the raster dimension reduction module, and constructing a low-resolution 2D feature map based on the feature rasterized data; The network decoding module is communicatively connected to the feature map generation module, and is used to improve the resolution of the 2D feature map through a preset deep ResMLP neural network to obtain the high-resolution feature map.
Citation Information
Cited By
Six-plane feature representation enhanced super-resolution dynamic nerve radiation field method
CN119624775A
A super-resolution dynamic neural radiation field method enhanced by six-plane feature representation
CN119624775B
