Thermal imaging dynamic light field three-dimensional rendering method and three-dimensional rendering device
Through the dynamic light field three-dimensional rendering method of thermal imaging, multi-dimensional information and deformation networks are used to solve the accuracy and efficiency problems in dynamic light field three-dimensional reconstruction, and achieve high-precision thermal infrared image and video rendering, which is suitable for thermal imaging of dynamic scenes. application.
Patent Information
- Application Number
- CN202410955237.9
- 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
The existing technology has limited accuracy and long training time in dynamic light field 3D reconstruction, especially in thermal imaging scenarios, and has not developed algorithms for thermal imaging, resulting in the output of low-quality view synthesis.
The dynamic light field three-dimensional rendering method of thermal imaging is used to obtain thermal infrared detection data to generate multi-dimensional information, including spatial position, detection direction, detection distance and shooting time. The deformation network is used to predict the deformation field of the reference space, and combined with the neural network Calculate pixel information to generate high-precision thermal infrared images and videos.
It achieves more accurate three-dimensional structure reconstruction of dynamic scenes, improves the rendering accuracy and efficiency of thermal infrared images, reduces training time, can better reflect the radiation intensity information of target objects, and enhances the rendering effect.
Smart Images

Figure CN118736085A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer image processing, and in particular to a dynamic light field three-dimensional rendering method and a three-dimensional rendering device for thermal imaging. Background Art
[0002] Light field reproduction refers to generating new perspective images or reconstructing three-dimensional scenes from captured data. How to use a set of images to reconstruct scenes more accurately has become a common problem in the field of computer image processing. Traditional light field technology captures and stores the direction and position of all light in the scene, combines stereo reconstruction and training convolutional neural networks, and relies on voxels, point clouds and other solutions to model three-dimensional scenes. When the resolution requirement is high, the storage cost and computing power requirements of voxels and point clouds will show a cubic growth, which greatly limits the application scenarios, and the actual model precision often does not achieve the ideal effect.
[0003] Currently, a more efficient means of light field reproduction is to perform model prediction or image-based 3D expression of the scene. The most famous method, NeRF (Neural Radiance Fields), combines implicit representation with volume rendering. It calculates the real position of the light corresponding to each pixel in the image in space based on the input camera pose, samples the coordinates of the query point on the light, and uses the coordinates as input parameters to query the MLP model. The model outputs the color and transparency information of the query point, and synthesizes the sampled point information on a ray into the color of a pixel through the volume rendering method. This method calculates all the pixel information on an image and then synthesizes the image output.
[0004] As the research on 3D reconstruction deepens, people are no longer satisfied with static scenes, and then explore the 3D reconstruction methods of dynamic scenes. Dynamic light field is an extension of light field. In addition to recording the direction and position information of light, it also records the changes in this information over time, thereby capturing the changes in light in dynamic scenes. It can be used to solve problems such as illumination changes and changes in the view of moving objects during dynamic scene reconstruction. Early reconstruction schemes focused on setting up dome-based multi-views to perform high-fidelity reconstruction and texture rendering of scenes in dynamic reconstruction. Recently, volumetric methods using RGB-D sensors and GPUs have achieved real-time 3D reconstruction of dynamic scenes and eliminated the reliance on pre-scanned template models.
[0005] Further work on dynamic light field reproduction extends NeRF to dynamic scenes. Common methods include transferring temporal information together with spatial information to the neural radiance field for scene reconstruction; other methods decompose the reconstruction of dynamic scenes into learning the spatial mapping from the current scene to the reference scene at each timestamp, thereby regressing the radiance field; in addition to RGB images, there is also the use of depth information captured by the time-of-flight (ToF) camera to optimize the neural radiance field.
[0006] In general, traditional 3D reconstruction methods based on light field reproduction generate discrete 3D point clouds, resulting in limited accuracy of the final rendering results. Improving accuracy requires a significant increase in point cloud density, which greatly increases storage space and computing time. In addition, the existing NeRF technology for dynamic light field 3D reconstruction is not yet mature, and the training and rendering times of the solutions that have been studied are still relatively long. At the same time, the existing NeRF has not yet developed an algorithm for dynamic light fields of thermal imaging, and the NeRF algorithm developed for visible light dynamic scenes takes a huge amount of time to learn thermal imaging dynamic scenes but outputs low-quality scene view synthesis. Summary of the invention
[0007] The technical problem solved by the present application is: how to perform thermal imaging 3D reconstruction on dynamic scenes and improve the 3D rendering accuracy of thermal imaging. To solve this problem, the present application provides a dynamic light field 3D rendering method and 3D rendering device for thermal imaging.
[0008] According to the first aspect, the present application provides a dynamic light field three-dimensional rendering method for thermal imaging, including: acquiring thermal infrared detection data of a target object and processing it to obtain light information; generating multi-dimensional information of the target object based on the light information, the multi-dimensional information including spatial position, detection direction, detection distance and shooting time; predicting the deformation field of a reference space based on the multi-dimensional information; calculating pixel information of the imaging of the target object based on the multi-dimensional information and the deformation field information, the pixel information including the transparency value and grayscale value of any pixel point; generating rendering pixel values of corresponding pixel points using the pixel information; integrating the rendering pixel values corresponding to each imaging point of the imaging of the target object to generate a thermal infrared image or a thermal infrared video.
[0009] Furthermore, the method of acquiring the thermal infrared detection data of the target object and processing it to obtain light information includes: acquiring the thermal infrared detection data of the target object from an infrared detection camera, and determining each imaging light point corresponding to the thermal infrared detection data in the camera coordinate system of the infrared detection camera; calculating the light direction and color respectively corresponding to each imaging light point, and forming the light information based on the light direction and color respectively corresponding to each imaging light point.
[0010] Furthermore, generating multi-dimensional information of the target object according to the light information includes: utilizing the light directions and colors respectively corresponding to the imaging light points in the light information to obtain coordinate values x, y, z of each feature point on the target object in three-dimensional space, angle values θ, φ of each feature point relative to the thermal infrared camera, distance d of each feature point to the thermal infrared camera, and time t of imaging of each feature point; forming the coordinate values x, y, z as the spatial position of each feature point on the target object, forming the angle values θ, φ as the detection direction of each feature point, forming the distance d as the detection distance of each feature point, and forming the shooting time of each feature point as the time t; forming the multi-dimensional information based on the spatial position, detection direction, detection distance and shooting time of each feature point on the target object.
[0011] Furthermore, the method of calculating the pixel information of the target object imaging based on the multi-dimensional information includes: encoding the multi-dimensional information in a high-dimensional manner to obtain the coded information corresponding to the spatial position and the shooting time respectively; inputting the encoded position information and time information into a preset deformation network, and outputting the deformed spatial position and the corresponding coded information; inputting the coded information corresponding to the deformed spatial position into the front network layer of the preset neural network, and obtaining the transparency value of any pixel point using the output result of the front network layer; inputting the transparency value of any pixel point, as well as the coded information corresponding to the detection direction and the coded information corresponding to the detection distance into the back network layer of the preset neural network, and obtaining the grayscale value of any pixel point through fusion processing; and forming the pixel information based on the transparency value and grayscale value of any pixel.
[0012] Furthermore, the multi-dimensional information is encoded in a high-dimensional manner to obtain encoding information corresponding to the spatial position, detection direction, and detection distance, respectively, including: performing high-dimensional mapping of Fourier characteristics on the spatial position, detection direction, and detection distance of each feature point in the multi-dimensional information, and using the high-dimensional mapping result of each feature point to obtain encoding information corresponding to the spatial position, detection direction, and detection distance, respectively.
[0013] Furthermore, the deformation field of the reference space is predicted based on the multi-dimensional information to generate deformation coding information, including: encoding the multi-dimensional information in a high-dimensional manner to obtain coding information corresponding to the spatial position, detection direction, detection distance and shooting time respectively; inputting the coding information corresponding to the spatial position and shooting time into a preset deformation network, and outputting the deformed spatial position and the corresponding coding information.
[0014] Furthermore, the method of calculating the pixel information of the target object imaging according to the deformation coding information includes: inputting the coding information corresponding to the deformed spatial position into the front network layer of the preset neural network, and obtaining the transparency value of any pixel point using the output result of the front network layer; inputting the transparency value of any pixel point, as well as the coding information corresponding to the detection direction and the coding information corresponding to the detection distance into the back network layer of the preset neural network, and obtaining the grayscale value of any pixel through fusion processing; and forming the pixel information based on the transparency value and grayscale value of any pixel.
[0015] Furthermore, the multi-dimensional information is encoded in a high-dimensional manner to obtain encoding information corresponding to the spatial position, detection direction, and detection distance, respectively, including: performing high-dimensional mapping of Fourier characteristics on the spatial position, detection direction, and detection distance of each feature point in the multi-dimensional information, and using the high-dimensional mapping result of each feature point to obtain encoding information corresponding to the spatial position, detection direction, and detection distance, respectively.
[0016] Furthermore, the use of the pixel information to generate a rendering pixel value of a corresponding pixel point includes: obtaining a transparency value and a grayscale value of any pixel from the pixel information; calculating a corresponding opacity value using the transparency value of any pixel; and fusing the transparency value, grayscale value and opacity value of any pixel to generate a rendering pixel value of the corresponding pixel point.
[0017] Furthermore, after using the pixel information to generate the rendering pixel value of the corresponding pixel point, it also includes: comparing the error information between the grayscale value of any pixel and the corresponding rendering pixel value, the error information includes the PSMR value and / or the mean square error value; adjusting the network parameters of the preset neural network according to the error information, so as to optimize the network model corresponding to the preset neural network through negative feedback.
[0018] According to the second aspect, the present application provides a three-dimensional rendering device, including: a light generation module, used to obtain thermal infrared detection data of a target object and process it to obtain light information; an information generation module, connected to the light generation module, used to generate multi-dimensional information of the target object based on the light information, and the multi-dimensional information includes spatial position, detection direction, detection distance and shooting time; an information query module, connected to the information generation module, used to predict the deformation field of the reference space based on the multi-dimensional information, generate deformation coding information, and calculate pixel information of the imaging of the target object based on the deformation coding information, and the pixel information includes the transparency value and grayscale value of any pixel point; a light rendering module, connected to the information query module, used to generate rendering pixel values of corresponding pixel points using the pixel information; an image generation module, connected to the light rendering module, used to integrate the rendering pixel values corresponding to each pixel point of the imaging of the target object to generate a thermal infrared image or a thermal infrared video.
[0019] Furthermore, the three-dimensional rendering device also includes an error calculation module and a model optimization module; the error calculation module is connected to the light rendering module, and is used to compare and obtain error information between the grayscale value of any pixel and the corresponding rendering pixel value, and the error information includes a PSMR value and / or a mean square error value; the model optimization module is connected to the error calculation module and the information query module, and is used to adjust the network parameters of the preset neural network according to the error information, so as to optimize the network model corresponding to the preset neural network through negative feedback; the preset neural network is configured in the information query module, and is used to participate in the calculation of pixel information of the target object imaging.
[0020] According to a third aspect, the present application provides a computer storage medium storing a program, wherein the program can be processed by a processor to implement the three-dimensional rendering method described in the first aspect.
[0021] The beneficial results of this application are:
[0022] According to the above-mentioned dynamic light field 3D rendering method and 3D rendering device of thermal imaging, since the dimensions of information generation and query are changed in the 3D rendering method, compared with the 3D reconstruction method based on the original NeRF, it realizes four-dimensional temporal and spatial neural representation, and captures and reconstructs the 3D structure of dynamic scenes in real time, which can more accurately record and reproduce dynamic events in the real world and provide richer and more realistic data for various applications; secondly, it conforms to the characteristic that the intensity of infrared radiation decreases with distance, and the rendered thermal infrared image better reflects the radiation intensity information of the target object, can collect more key information of the infrared image, and enhances the 3D rendering effect and rendering accuracy.
[0023] The technical solution of the present application is optimized by introducing a deformation network into the neural radiation field to predict the deformation field between the scene at a specific moment and the scene in the reference space, and then the information is deeply learned, and the corresponding light of each pixel in the image in space is generated according to the camera parameters, and the grayscale value and transparency value of the midpoint of the light are inferred by training the MLP model, and then the rendering pixel value of each image point is generated by the three-dimensional rendering technology according to the query information. Finally, the thermal infrared image and thermal infrared video are synthesized. It can be understood that the technical solution of the present application not only predicts the displacement of a certain spatial point at a certain moment by adding a time variable to the input information, and then combines the standard network of NeRF to realize the three-dimensional reconstruction of the moving or deformed object; at the same time, end-to-end training is realized, and training is carried out directly from the input data to the final output without manually designing intermediate steps, designing feature extraction or adding additional components. Further, the number of light generation is compressed, and the training speed is accelerated. At the same time, the voxel information is implicitly stored in the weight of the neural network. Due to the storage weight and the continuity characteristics of the function, a large amount of information can be implanted through a very small storage space to render a high-definition stereoscopic image. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a flow chart of a dynamic light field 3D rendering method for thermal imaging in one embodiment of the present application;
[0025] Figure 2 A schematic diagram of a flow chart of a dynamic light field 3D rendering method of thermal imaging in another embodiment of the present application;
[0026] Figure 3 A schematic diagram of a network architecture of a preset neural network in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of the principle of high-dimensional mapping of multi-dimensional information in one embodiment of the present application;
[0028] Figure 5 A model training flow chart of a preset neural network in one embodiment of the present application;
[0029] Figure 6 This is a schematic diagram of the structure of a dynamic light field 3D rendering device for thermal imaging in one embodiment of the present application;
[0030] Figure 7 It is a schematic structural diagram of a dynamic light field 3D rendering device for thermal imaging in another embodiment of the present application. DETAILED DESCRIPTION
[0031] The present application is further described in detail below through specific implementation methods in conjunction with the accompanying drawings.
[0032] In one embodiment of the present application, a dynamic light field 3D rendering method for thermal imaging is provided, such as Figure 1 As shown, it mainly includes steps S11 to S16.
[0033] Step S11, obtaining the thermal infrared detection data of the target object and processing it to obtain light information, which can be understood as generating the light direction, color and other information of the thermal infrared imaging of the target object. The target object here can be a physical object or an animal in the environment, and the specific object is not limited.
[0034] In a specific implementation, obtaining thermal infrared detection data of a target object and processing to obtain light information includes the following process:
[0035] (1) Acquire thermal infrared detection data of the target object from the infrared detection camera, and determine each imaging light point corresponding to the thermal infrared detection data in the camera coordinate system of the infrared detection camera. It can be understood that for the infrared detection camera, each imaging light point is a mapping of the radiation light of a feature point on the target object on the imaging surface of the infrared detection camera, so the thermal infrared detection data in the camera coordinate system of the infrared detection camera reflects the imaging results of each corresponding imaging light point on the imaging surface.
[0036] (2) Calculate the light direction and color corresponding to each imaging light point, and then form light information based on the light direction and color corresponding to each imaging light point. For example, the light direction and color of the imaging light point can be calculated based on the intrinsic parameter K and extrinsic parameter c2w of the infrared detection camera, and even the optical center coordinate information can be obtained. The light direction, color and optical center coordinate information can be obtained through matrix and coordinate calculation based on the internal and external parameters of the camera. The light direction and color of the imaging light point based on the internal and external parameters of the camera is a commonly used technical means, which will not be described in detail here.
[0037] Step S12, generating multi-dimensional information of the target object based on the light information, the multi-dimensional information mentioned here includes spatial position, detection direction, detection distance and shooting time. This step can be understood as the step of generating the query direction, coordinates, distance and time, and inferring the scene boundary based on the obtained light direction, color, and even the optical center coordinates, and then generating the query direction, coordinates, distance and time.
[0038] In a specific embodiment, generating multi-dimensional information of a target object according to light information includes the following process:
[0039] (1) The light direction and color corresponding to each imaging light point in the light information and the timestamp information of the photo are used to obtain the coordinate values x, y, and z of each feature point on the target object in three-dimensional space, the angle values θ and φ of each feature point relative to the thermal infrared camera, the distance d from each feature point to the thermal infrared camera, and the shooting time t of each feature point (or the imaging time t).
[0040] (2) The coordinate values x, y, and z are formed as the spatial position of each feature point on the target object, the angle values θ and φ are formed as the detection direction of each feature point, the distance d is formed as the detection distance of each feature point, and the time t is formed as the shooting time of each feature point. θ and φ in the detection direction can be understood as the deflection angle of the target point relative to the detection point in the horizontal and vertical directions.
[0041] (3) Multi-dimensional information is formed based on the spatial position (x, y, z), detection direction (θ, φ), detection distance d and shooting time t of each feature point on the target object.
[0042] It can be understood that the multi-dimensional information here includes 7 types of data, so it can also be called 7D information.
[0043] Step S13, predicting the deformation field of the reference space based on the multi-dimensional information, and generating deformation coding information. This step can be understood as eliminating the independence of scenes at different times and connecting them using a common reference space anchor.
[0044] In a specific embodiment, predicting the deformation field of the reference space based on the dimensional information includes the following process:
[0045] (1) Encode the multi-dimensional information in a high-dimensional manner to obtain the encoded information corresponding to the spatial position and the shooting time. Figure 4 , the spatial position 41 and shooting time 44 of each feature point in the multi-dimensional information are mapped to a high-dimensional Fourier characteristic, and the high-dimensional mapping result of each feature point (i.e., high-dimensional information that is easy to distinguish) is used to obtain the encoding information corresponding to the spatial position and the shooting position. 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 and respectively, and the following encoding method is constructed
[0046]
[0047] 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.
[0048] Similarly, the multi-dimensional information is encoded in a high-dimensional manner to obtain the encoding information corresponding to the detection direction and the detection distance. Figure 4 , the detection direction 42 and the detection distance 43 of each feature point in the multi-dimensional information are mapped to a high-dimensional Fourier characteristic, and the high-dimensional mapping result of each feature point (i.e., high-dimensional information that is easy to distinguish) is used to obtain the encoding information corresponding to the detection direction and the detection distance. 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 direction and distance respectively, and the following encoding method is constructed
[0049]
[0050] 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.
[0051] (2) Input the encoded position information and time information into the deformation network (i.e., input the encoded information corresponding to the spatial position and the shooting time into the preset deformation network) to predict the deformation field of the scene at a specific moment and the scene in the reference space. Figure 3 , input the coordinates and time (mark 51) to the deformation network (mark 52), and output the displacement of this point and this point in the reference space (mark 53), where the reference space scene is artificially set to t=0.
[0052] The working principle of the deformation network can be expressed as
[0053]
[0054] Understandably, Figure 3 In the preset neural network shown in the figure, the coordinate information of the spatial position and the time information are input into the deformation network, and the displacement with respect to the reference space is output, so that the information of the relevant points of all the images can be gathered in the scene of the reference space.
[0055] Understandably, Figure 3 The preset deformation network in the algorithm has a network layer depth of 6 layers and a width of 128 layers, which can significantly reduce the complexity of the neural network structure, thereby greatly reducing the prediction deformation time and significantly improving the running speed.
[0056] Step S14, calculates the pixel information of the target object imaging according to the deformation coding information, and the pixel information mentioned includes the transparency value and grayscale value of any pixel. It can be understood as a sampling information generation step, specifically, inputting the multi-dimensional information and deformation field information into the neural network model, and calculating the grayscale and transparency at the sampling point through the neural network.
[0057] In a specific embodiment, calculating pixel information of the target object imaging according to the deformation coding information includes the following specific processing steps:
[0058] (1) Input the encoded information corresponding to the deformed spatial position into the front network layer of the preset neural network, and use the output result of the front network layer to obtain the transparency value of any pixel. The preset neural network can refer to Figure 3 , where the backbone network (marked 34) can represent the previous network layer, De-Input (marked 33) is used to input the encoding information corresponding to the spatial position after deformation, and Output (marked 35) represents the output result of the previous network layer, from which the transparency value of any pixel can be obtained and represented by σ.
[0059] (2) The transparency value of any pixel, the coding information corresponding to the detection direction, and the coding information corresponding to the detection distance are input into the back network layer of the preset neural network, and the grayscale value of any pixel is obtained through fusion processing. Figure 3 The Direction & Distance (marked 36) in the figure is represented as a post-network layer, in which the transparency value of any pixel and the encoding information corresponding to the detection direction and the encoding information corresponding to the detection distance can be fused and processed, and finally the grayscale value of any pixel is output through Output (marked 37).
[0060] (3) Pixel information is formed based on the transparency value and grayscale value of any pixel.
[0061] Understandably, Figure 3 In the preset neural network shown in the figure, the coordinate information corresponding to the deformed spatial position is sent to the backbone network, where the coordinate information is spliced to obtain intermediate data, and the one-dimensional transparent feature σ can be obtained using the intermediate data. i , which is the transparency value of pixel i; of course, the intermediate data is sent to the single-layer network shown in Direction & Distance, and the color feature c is calculated by splicing the direction information corresponding to the detection direction and the distance information corresponding to the detection distance. i , the grayscale value of pixel i.
[0062] Understandably, Figure 3 The preset neural network in the image processing tool has a depth of 6 layers and a width of 128 in the front network layer. This can significantly reduce the complexity of the neural network structure, thereby greatly reducing the model rendering time while ensuring image accuracy, and the improvement in running speed is also very significant.
[0063] Step S15, using the pixel information to generate a rendering pixel value corresponding to the pixel point. This step can be understood as a process of rendering the pixel information corresponding to the light, specifically, using the obtained grayscale and transparency to perform voxel rendering to generate the pixel information corresponding to the light.
[0064] In a specific embodiment, using pixel information to generate a rendering pixel value corresponding to a pixel point includes the following process:
[0065] (1) Obtain the transparency value and grayscale value of any pixel from the pixel information.
[0066] (2) Use the transparency value of any pixel to calculate the corresponding opacity value.
[0067] (3) The transparency value, grayscale value and opacity value of any pixel are fused to generate a rendering pixel value of the corresponding pixel point.
[0068] For example, for each imaging point on the light ray and pixel i, calculate its opacity value T i , that is, the opacity characteristic 1-σ from the first point to its previous point i Multiply and then calculate the T of each imaging point of the light i , σ i 、c i The product of is added to get the pixel color, that is, the rendering pixel value of the corresponding pixel point is generated.
[0069] Step S16, integrating the rendered pixel values corresponding to each pixel point of the target object imaging to generate a thermal infrared image or thermal infrared video. It can be understood that the rendered pixel values corresponding to each pixel point of the target object imaging constitute a complete imaging rendering result, so they can be used to synthesize a frame of thermal infrared image, and the thermal infrared video can be obtained by repeating the frame-by-frame synthesis process.
[0070] In another embodiment, the 3D rendering method may include, in addition to the steps S11-S16 mentioned above, Figure 2 Steps S17 and S18 shown in FIG.
[0071] Step S17 is located between step S15 and step S16. That is, after using the pixel information to generate the rendering pixel value of the corresponding pixel point, it is also necessary to compare and obtain the error information between the grayscale value of any pixel and the corresponding rendering pixel value. The error information includes the PSMR value and / or the mean square error value.
[0072] It can be understood that step S17 can be understood as a process of calculating the error between the generated pixel and the real pixel. The pixel information corresponding to the rendered pixel value is input into the mean square error function to obtain the error between the generated pixel and the real pixel, that is, the error information between the gray value of any pixel and the corresponding rendered pixel value.
[0073] Step S18, obtaining error information from step S17, and adjusting the network parameters of the preset neural network mentioned in step S14 according to the error information, so as to optimize the network model corresponding to the preset neural network through negative feedback.
[0074] It can be understood that step S18 can be understood as a process of optimizing and updating the model weights. If the error information exceeds a certain threshold, the weight information in the network model corresponding to the preset neural network is adjusted, and then three-dimensional rendering is performed again starting from step S14.
[0075] It should be noted that in Figure 2 During the process of processing, since step S17 is added to calculate the error information, a specific judgment can be made in step S16. For example, when the error information is within a certain range, a thermal infrared image and / or thermal infrared video is synthesized according to the rendered pixel value.
[0076] In the 3D rendering method, it is necessary to calculate the pixel information of the target object based on multi-dimensional information. This calculation process uses a preset neural network, see Figure 3 The deformed network 32 and the backbone network 34 in the embodiment. Before using the preset neural network, it is necessary to train the network to obtain a trained network model. Figure 5 ,The training process of the preset neural network will be described below.
[0077] Step S51, the preparation stage, requires configuring the operating environment of the network model, and preparing sample images and camera parameters.
[0078] Step S52, setting all training parameters, such as the number of training rounds, expected threshold, noise, training starting point, etc.
[0079] In step S53, the program checks whether the training data exists, is complete, and matches according to the specified path, and then reads the file into memory and converts it into a suitable data type.
[0080] Step S54, the program generates a model class according to the specified parameters to initialize the network model.
[0081] Step S55, check whether the pre-training parameters are read in step S52, specifically whether there is weight data, if so, go to step S56, otherwise go to step S57.
[0082] Step S56, if there is weight data, load the matching weight data into the network model.
[0083] Step S57, in the absence of weight data, randomly initialize the weight data and load it into the network model.
[0084] Step S58, acquiring thermal infrared detection data of the target object and processing to obtain light information, for details, please refer to the above step S11.
[0085] Step S59, generating multi-dimensional information of the position and time of the target object according to the light information, and predicting the deformation field displacement of the spatial position and the reference space based on the multi-dimensional information. For specific steps, please refer to the above steps S12 and S13.
[0086] Step S510, generating multi-dimensional information of the target object according to the light information, calculating pixel information of the target object based on the multi-dimensional information, and generating rendering pixel values of corresponding pixel points using the pixel information. For details, please refer to the above steps S12, S14 and S15.
[0087] Step S511, compare and obtain error information between the gray value of any pixel and the corresponding rendering pixel value, the error information including the PSMR value and / or the mean square error value. For details, please refer to the above step S17.
[0088] In step S512, when the error information is less than the corresponding set value, or the number of training rounds is greater than the corresponding set value, the process proceeds to step S514, otherwise, the process proceeds to step S513.
[0089] Step S513, adjusting the network parameters according to the error information, so as to optimize the network model corresponding to the preset neural network through negative feedback. For details, please refer to step S18 above.
[0090] Step S514: At this time, it is considered that the network model training is basically qualified, and all parameters of the network model during training can be packaged into a compressed file and stored according to the specified path, mainly saving weight data.
[0091] Step S515, release the occupied memory, clear the temporarily stored training data, and end the training program, that is, the network model training is completed.
[0092] According to the dynamic light field 3D rendering method of thermal imaging in the above-mentioned embodiment, due to the addition of a deformation network to predict the deformation field with the reference space and the change of the dimension of information generation and query, compared with the dynamic light field neural radiation 3D rendering algorithm of thermal imaging based on the original NeRF (Neural Radiance Fields), it greatly eliminates the independence between dynamic scenes and better fits the characteristic that the infrared radiation intensity decreases with distance. Therefore, the rendered image better reflects the radiation intensity information of the target object in the dynamic scene; at the same time, the rendering can better collect the key information of the thermal infrared image, so that the rendered image can better restore the information contained in the image within the infrared range; and, while obtaining the same image accuracy, the rendering time is greatly reduced and the running speed is significantly accelerated. The following is a detailed analysis.
[0093] For the thermal infrared image set obtained by shooting, the camera parameters of each image are first obtained by colmap and other methods, and the image and corresponding parameters are input into the trained network model. First, the thermal infrared detection data of the target object generates the light information (such as the coordinates of the optical center, the direction of the light, and the color) corresponding to each pixel in the actual space; the blocks are divided according to the color characteristics of the image, and the importance is given according to whether the block contains the target object. The blocks with low importance generate a small number of lights and compress the number of lights. In each round of training, a fixed number of lights are randomly extracted to generate multi-dimensional information of the target object. According to the random sampling of certain query points on the light, their coordinates, query directions, distances to the optical center, and time (i.e., spatial position, detection direction, detection distance, and shooting time) are calculated. In order to allow the network model to better extract information, the data is encoded by the encoder to obtain the encoded information of the high-dimensional mapping. Then, the encoded information of the spatial position and shooting time is sent to the deformation network to predict the deformation field information of the scene and the reference space. In order to maintain generality, the shooting time of the reference space is artificially set to 0. Then, when the network model is used to calculate the pixel information of the target object, the deformed coordinate information is sent to the previous network layer, and the deformed coordinate information is spliced again at Add_Linear. After obtaining the intermediate data, it is first sent to the single-layer network to obtain the one-dimensional transparent feature σ i (i.e. transparency value), and then the color feature c is calculated by fusing the splicing direction information and distance information i (i.e. gray value). The transparency characteristic of the point on the light is σ i In order to obtain a query point with a higher probability on the surface of the object based on the inverse transformation and resampling on the light, the pixel information of the target object is calculated and the original feature value is overwritten. The features on the same light are used to generate the color of the image point at the optical center (i.e., the rendered pixel value) through the three-dimensional rendering method. For each point i on the light, 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 the product of , add them to get the pixel color, and compare it with the real pixel color to calculate the error information. When optimizing the network model, automatically back-propagate and modify each weight of the network according to the calculated error information, complete a round of training, repeat the training until you are satisfied and stop the training. When rendering images or videos, you need a trained model. Import the model weights into the network 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 pixel color, and then synthesize all the pixels into an image output. The video repeats the above process frame by frame and finally synthesizes it.
[0094] In one embodiment, based on the above-mentioned dynamic light field 3D rendering method of thermal imaging, a dynamic light field 3D rendering device of thermal imaging is also disclosed. Figure 6 The three-dimensional rendering device mainly includes a light generating module 21, an information generating module 22, an information query module 23, a light rendering module 24, and an image generating module 25, which are described below respectively.
[0095] The light generation module 21 is used to obtain the thermal infrared detection data of the target object and process it to obtain light information. Specifically, the light generation module 21 can obtain the thermal infrared detection data of the target object from the infrared detection camera, and determine the various imaging light points corresponding to the thermal infrared detection data in the camera coordinate system of the infrared detection camera, and read the shooting time at the same time. It can be understood that for the infrared detection camera, each imaging light point is a mapping of the radiation light of a feature point on the target object on the imaging surface of the infrared detection camera, and the thermal infrared detection data in the camera coordinate system of the infrared detection camera reflects the imaging results of the corresponding imaging light points on the imaging surface. In addition, the light generation module 21 can calculate the light direction and color corresponding to each imaging light point, and form it into light information. For example, the light direction and color of the imaging light point can be calculated based on the internal parameter K and external parameter c2w of the infrared detection camera, and even the optical center coordinate information can be obtained. The light direction, color and optical center coordinate information can be obtained through matrix and coordinate operations based on the internal and external parameters of the camera. At the same time, the timestamp information shot by the infrared detection camera can be read to obtain the light shooting time.
[0096] The information generation module 22 is connected to the light generation module 21, and is used to generate multi-dimensional information of the target object according to the light information, and the multi-dimensional information includes spatial position, detection direction, detection distance, and shooting time. Specifically, the information generation module 22 can use the light direction and color corresponding to each imaging light point in the light information to process the coordinate values x, y, and z of each feature point on the target object in three-dimensional space, the angle values θ and φ of each feature point relative to the thermal infrared camera, the distance d of each feature point to the thermal infrared camera, and the time t of imaging of each feature point. Afterwards, the information generation module 22 forms the coordinate values x, y, and z as the spatial position of each feature point on the target object, the angle values θ and φ as the detection direction of each feature point, the distance d as the detection distance of each feature point, and the time t as the shooting time of each feature point. θ and φ in the detection direction can be understood as the deflection angle of the target point relative to the detection point in the horizontal and vertical directions. Then, the information generation module 22 can generate multi-dimensional information based on the spatial position (x, y, z), detection direction (θ, φ), detection distance d and shooting time t of each feature point on the target object.
[0097] The information query module 23 is connected to the information generation module 22, and is used to predict the deformation field of the reference space based on the multi-dimensional information, generate deformation coding information, and calculate the pixel information of the target object imaging according to the deformation coding information. The pixel information includes the transparency value and grayscale value of any pixel. Specifically, the information query module 23 can encode the multi-dimensional information in a high-dimensional manner to obtain the coding information corresponding to the spatial position, detection direction, detection distance and shooting time. For details, please refer to Figure 4 , the spatial position 41, detection direction 42, detection distance 43 and shooting time 44 of each feature point in the multi-dimensional information are subjected to high-dimensional mapping 45 of Fourier characteristics, and the high-dimensional mapping result of each feature point (i.e., high-dimensional information that is easy to distinguish) is used to obtain the coded information corresponding to the spatial position, detection direction, detection distance and shooting time. Afterwards, the information query module 23 inputs the coded information corresponding to the spatial position into the neural network to output the pixel information of the light. For details, please refer to Figure 3 , the encoded information 31 of the spatial position and the shooting time is input into the deformation network 32 to predict the displacement of the deformation field with the reference space, and the deformed spatial position De-Input 33 is obtained. This step aims to eliminate the independence between different scenes and anchor the dynamic scenes at different times. For the sake of generality, the reference space time needs to be artificially set to 0. Then the deformed spatial position information 33 is input into the front network layer, and Output 35 is the output result of the front network layer. The transparency value of any pixel can be obtained from the output result and represented by σ. Figure 3 , the front network layer can be represented by the backbone network 33. Next, the information query module 23 inputs the transparency value of any pixel and the coding information corresponding to the detection direction and the coding information corresponding to the detection distance into the rear network layer of the preset neural network, and obtains the gray value of any pixel through fusion processing. Figure 3 The Direction & Distance (marked 36) in the figure is represented as a post-network layer, in which the transparency value of any pixel and the coding information corresponding to the detection direction and the coding information corresponding to the detection distance can be fused and processed, and finally the gray value of any pixel is output through Output (marked 37). Finally, the information query module 23 forms pixel information based on the transparency value and gray value of any pixel.
[0098] The light rendering module 24 is connected to the information query module 23, and is used to generate a rendering pixel value of a corresponding pixel point using pixel information. Specifically, the light rendering module 24 obtains the transparency value and grayscale value of any pixel from the pixel information, and then calculates the corresponding opacity value using the transparency value of any pixel. After that, the light rendering module 24 performs a fusion process on the transparency value, grayscale value, and opacity value of any pixel to generate a rendering pixel value of the corresponding pixel point.
[0099] The image generation module 25 is connected to the light rendering module 24, and is used to integrate the rendering pixel values corresponding to each pixel point of the target object imaging to generate a thermal infrared image or thermal infrared video. Specifically, since the rendering pixel values corresponding to each pixel point of the target object imaging constitute a complete imaging rendering result, the image generation module 25 can be used to synthesize a frame of thermal infrared image, and the thermal infrared video can be obtained by repeating the frame-by-frame synthesis process.
[0100] In another embodiment, please refer to Figure 7 The above disclosed thermal imaging three-dimensional rendering device includes not only a light generating module 21, an information generating module 22, an information query module 23, a light rendering module 24, and an image generating module 25, but also an error calculating module 25 and a model optimizing module 26. The following are respectively described.
[0101] The error calculation module 25 is connected to the light rendering module 24, and is used to compare and obtain error information between the grayscale value of any pixel and the corresponding rendered pixel value, and the error information includes a PSMR value and / or a mean square error value. Specifically, the error calculation module 25 can input the pixel information corresponding to the rendered pixel value into the mean square error function to obtain the error between the generated pixel and the real pixel, that is, the error information between the grayscale value of any pixel and the corresponding rendered pixel value.
[0102] The model optimization module 26 is connected to the error calculation module 25 and the information query module 22, and is used to optimize and calculate the pixel information of the target object according to the error information. Specifically, the model optimization module 26 adjusts the network parameters of the preset neural network mentioned in the information query module 23 according to the error information, so as to optimize the network model corresponding to the preset neural network through negative feedback. It can be understood that the rendering effect can be optimized by adjusting the parameters of the network model. For pixels with large errors, the relevant parameters in the preset neural network can be adjusted to improve the accuracy of rendering.
[0103] It can be understood that updating network parameters and optimizing network models are common ways to train and learn neural networks, which will not be explained in detail here.
[0104] The image generation module 25 here can be connected to the error calculation module 25. When the error information calculated by the error calculation module 25 is within a preset range, the pixel values rendered by all rays (i.e., the rendered pixel values) are merged together to generate the final thermal infrared image and / or thermal infrared video.
[0105] According to the above content, the three-dimensional rendering device specifically includes a light generation module 21, an information generation module 22, an information query module 23, a light rendering module 24, an image generation module 25, an error calculation module 25 and a model optimization module 26. The functions of each module can correspond to the corresponding content in the introduction of the three-dimensional rendering method, and will not be described in detail here.
[0106] It should be noted that in the traditional technical solution, the information generated by the thermal infrared neural radiation 3D rendering algorithm based on the original NeRF often only contains direction (2D) and coordinates (3D), which only meets the requirements of 3D reconstruction of visible light images in static scenes; but for the infrared band in dynamic scenes, the independence between scenes at different times and the characteristic that the radiation intensity decreases with increasing temperature, that is, P = εσT 4 (0<ε<1) has a great influence on the effect of three-dimensional rendering. Therefore, predicting the displacement difference between dynamic scenes and considering the detection distance are important considerations for three-dimensional rendering of dynamic light fields of thermal imaging. Therefore, in this application, a deformation network is first added to predict the deformation field of different scenes and the reference space; secondly, based on the information with added distance and time dimensions, the generated information includes not only spatial position and detection direction, but also detection distance and shooting time, so that the rendered infrared image can more accurately restore the radiation intensity information of the target object in the dynamic scene.
[0107] It should be noted that in the traditional technical solution, the neural radiation three-dimensional rendering algorithm based on the original NeRF often queries information containing four-dimensional data of RGB (3D) and transparency, which fits the characteristics of visible light; but it is obviously not suitable for infrared bands in dynamic scenes, so it is changed to a 2D information query method in this application, which includes two dimensions, grayscale value and transparency value, which is more in line with the characteristics of infrared and can better extract the key parameters of the infrared band.
[0108] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.
[0109] 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 dynamic light field 3D rendering method for thermal imaging, characterized in that: include: Acquire thermal imaging detection data of the target object and process it to obtain light information; generating multi-dimensional information of the target object according to the light information, wherein the multi-dimensional information includes spatial position, detection direction, detection distance and shooting time; Predicting a deformation field of a reference space based on the multi-dimensional information to generate deformation coding information; Calculating pixel information of the target object image according to the deformation coding information, wherein the pixel information includes a transparency value and a grayscale value of any pixel point; Generating a rendering pixel value corresponding to the pixel point using the pixel information; The rendered pixel values corresponding to the respective pixel points of the target object imaging are integrated to generate a thermal infrared image or thermal infrared video.
2. The three-dimensional rendering method according to claim 1, wherein: The step of acquiring thermal infrared detection data of a target object and processing the data to obtain light information includes: Acquiring thermal infrared detection data of the target object from an infrared detection camera, and determining each imaging light point corresponding to the thermal infrared detection data in a camera coordinate system of the infrared detection camera; The light direction and color corresponding to each imaging light point are calculated, and the light information is formed based on the light direction and color corresponding to each imaging light point.
3. The three-dimensional rendering method according to claim 2, wherein: Generating multi-dimensional information of the target object according to the light information includes: 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 values θ and φ of each feature point relative to the thermal infrared camera, the distance d from each feature point to the thermal infrared camera, and the time t at which each feature point is imaged are obtained. The coordinate values x, y, z are formed as the spatial position of each feature point on the target object, the angle values θ, φ are formed as the detection direction of each feature point, the distance d is formed as the detection distance of each feature point, and the time t is formed as the capture time of each feature point; The multi-dimensional information is formed based on the spatial position, detection direction, detection distance and shooting time of each feature point on the target object.
4. The three-dimensional rendering method according to claim 3, wherein: The generating of the deformed coded information by predicting the deformation field of the reference space based on the multi-dimensional information includes: performing high-dimensional encoding on the multi-dimensional information to obtain coded information corresponding to the spatial position, detection direction, detection distance, and shooting time, respectively; inputting the coded information corresponding to the spatial position and shooting time into a preset deformation network, outputting the deformed spatial position and the corresponding coded information, and forming the deformed coded information; The method of calculating the pixel information of the target object image based on the deformation coding information includes: inputting the coding information corresponding to the deformed spatial position into the front network layer of a preset neural network, and using the output result of the front network layer to obtain the transparency value of any pixel point; inputting the transparency value of any pixel point, as well as the coding information corresponding to the detection direction and the coding information corresponding to the detection distance into the back network layer of the preset neural network, and obtaining the grayscale value of any pixel point through fusion processing; and forming the pixel information based on the transparency value and grayscale value of any pixel.
5. The three-dimensional rendering method according to claim 4, wherein: The high-dimensional encoding of the multi-dimensional information to obtain coded information corresponding to the spatial position, detection direction, detection distance and shooting time respectively includes: The spatial position, detection direction, detection distance and shooting time 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 are used to obtain the encoding information corresponding to the spatial position, detection direction, detection distance and shooting time respectively.
6. The three-dimensional rendering method according to claim 4, wherein: The step of generating a rendering pixel value corresponding to a pixel point by using the pixel information includes: Obtaining a transparency value and a grayscale value of any pixel from the pixel information; Use the transparency value of any pixel to calculate the corresponding opacity value; The transparency value, grayscale value, and opacity value of any pixel are fused to generate the rendering pixel value of the corresponding pixel point.
7. The three-dimensional rendering method according to claim 6, wherein: After using the pixel information to generate a rendering pixel value corresponding to the pixel point, the method further includes: Comparing and obtaining error information between the grayscale value of any pixel and the corresponding rendered pixel value, the error information including the PSMR value and / or the mean square error value; The network parameters of the preset neural network are adjusted according to the error information, so as to optimize the network model corresponding to the preset neural network through negative feedback.
8. A three-dimensional rendering device, characterized in that: include: A light generation module is used to obtain thermal infrared detection data of the target object and process it to obtain light information; an information generating module, connected to the light generating module, for generating multi-dimensional information of the target object based on the light information, the multi-dimensional information including spatial position, detection direction, detection distance and shooting time; an information query module, connected to the information generation module, configured to predict the deformation field of the reference space based on the multi-dimensional information, generate deformation coding information, and calculate pixel information of the target object image based on the deformation coding information, wherein the pixel information includes a transparency value and a grayscale value of any pixel point; A light rendering module, connected to the information query module, for generating a rendering pixel value of a corresponding pixel point using the pixel information; The image generation module is connected to the light rendering module and is used to integrate the rendering pixel values corresponding to each pixel point of the target object imaging to generate a thermal infrared image or thermal infrared video.
9. The three-dimensional rendering device according to claim 8, wherein: It also includes an error calculation module and a model optimization module; The error calculation module is connected to the light rendering module and is used to compare and obtain error information between the grayscale value of any pixel and the corresponding rendered pixel value, wherein the error information includes a PSMR value and / or a mean square error value; The model optimization module is connected to the error calculation module and the information query module, and is used to adjust the network parameters of the preset neural network according to the error information, so as to optimize the network model corresponding to the preset neural network through negative feedback; The preset neural network is configured in the information query module to participate in calculating the pixel information of the target object imaging.
10. A computer storage medium, characterized in that A program is stored, and the program can be processed by a processor to implement the three-dimensional rendering method according to any one of claims 1 to 7.
