Infrared image three-dimensional reconstruction method based on neural radiation field
The neural radiation field network is used to perform three-dimensional reconstruction of multi-view infrared images in low-light and low-visibility infrared scenes, which solves the problem of poor performance of traditional methods and achieves high-quality infrared image restoration and three-dimensional model reconstruction.
Patent Information
- Application Number
- CN202410735286.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-03
AI Technical Summary
Traditional three-dimensional space reconstruction methods are difficult to obtain satisfactory three-dimensional models in low-light and low-visibility infrared scenes. Especially in military technology, the pixel-level features of infrared images are difficult to extract, resulting in poor results.
Using a three-dimensional reconstruction method of infrared images based on neural radiation fields, through multi-view infrared image collection and enhancement, a coded 3D point network and a local infrared field network are constructed to perform sparse reconstruction and image generation, and binary opacity is used to restore pixel-level features. Implement high-definition view synthesis.
It effectively restores the pixel-level features of infrared images in low-light and low-visibility scenes, improves the quality and accuracy of 3D reconstruction, and is superior to the performance indicators of traditional methods such as PSNR, SSIM and LPIPS.
Smart Images

Figure CN118587357A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition technology, and in particular to a three-dimensional reconstruction method of infrared images based on neural radiation fields. Background Art
[0002] With the development of photoelectric detection technology and computer science, traditional two-dimensional visual images can no longer meet human needs for information acquisition, and three-dimensional imaging technology has been developed. In recent years, three-dimensional reconstruction technology has been widely used in terrain mapping, face recognition, VR / AR, medical testing and unmanned driving. However, in low-light and low-visibility scenes, especially in the use of military technology, traditional three-dimensional space reconstruction is difficult to obtain a relatively satisfactory three-dimensional model, while infrared spectrum has certain advantages in dark and low-visibility scenes. Compared with visible light scenes, infrared images are affected by factors such as heat distribution and medium absorption, and pixel-level features are often difficult to extract directly. Traditional three-dimensional space reconstruction methods are difficult to achieve satisfactory results in infrared scenes. Summary of the invention
[0003] In view of the technical defects in the prior art, the present invention provides a three-dimensional reconstruction method of infrared images based on neural radiation fields.
[0004] The method for three-dimensional reconstruction of infrared images based on neural radiation fields of the present invention comprises the following steps:
[0005] Step 1. Image data acquisition and processing, specifically including:
[0006] Step 11. Collect multi-view infrared images of the target scene; surround the target scene to cover all angles of the entire scene, and obtain an infrared image sequence of the target scene;
[0007] Step 12. Perform infrared image enhancement on the infrared image sequence of the target scene to obtain a multi-view infrared image sequence of the target scene;
[0008] Step 13. Sparsely reconstruct the multi-view infrared image sequence of the target scene after infrared image enhancement to obtain a sparse point cloud and camera pose of the target scene;
[0009] Step 2. Build the network, including:
[0010] Step 21. Construct a neural radiation field network, wherein the neural radiation field network structure includes a coding 3D point network and a local infrared field network for simulating infrared images, wherein the coding 3D point network structure and the local infrared field network structure are composed of a plurality of MLP networks connected in series, the number of MLP networks in the coding 3D point network structure is greater than that in the local infrared field network structure, and the number of hidden units in each MLP network is greater than that in the local infrared field network structure;
[0011] Step 22. Obtain coarse sampling points. On each camera ray, between the near plane close to the camera and the far plane far away from the camera, divide the camera ray into n equal parts, and then uniformly sample in each subinterval to obtain a sampling point Si. Finally, n*M sampling points will be obtained, where M is the number of camera rays.
[0012] Step 23. After position encoding of the coordinates (x, y, z) of the sampling point Si obtained by coarse sampling, the coordinates are sent to the first layer MLP network in the 3D point encoding network and the density value of each sampling point is output. The obtained density values are sorted in descending order according to the distribution probability.
[0013] For different density values, the sampling rate is set according to the probability for secondary sampling. The higher the density value with large distribution probability, the higher the sampling rate. After secondary sampling, fine sampling points are obtained.
[0014] Step 24. Perform position encoding on the obtained fine sampling point coordinates (x, y, z), and the encoding formula is:
[0015] γ(p)=(sin(2 0 πp),cos(2 0 πp),…,sin(2 L-1 πp),cos(2 L-1 πp))
[0016] Where L = 6, p is the x, y and z value in the coordinates respectively;
[0017] The high frequency encoded information γ is input into the neural radiation field network;
[0018] Step 25. Convert the continuous density value to a discontinuous binary opacity.
[0019] Check the density values α∈[0,1] of all sampling points on the camera ray in step 22, set the opacity of the sampling points with density values α<0.5 to 0, and the opacity of the sampling points with density values α>0.5 to 1, and define the points with opacity 1 as points on the surface of the object;
[0020] Step 3. Train the Neural Field Network
[0021] The multi-view infrared image sequence of the target scene obtained in step 1 is input into the encoded 3D point network and the local infrared field network of the neural radiation field network, and the loss function between the predicted image and the input image is calculated. The training is performed with the minimum loss as the training goal.
[0022] The encoding 3D point network loss function
[0023]
[0024] represents a single predicted infrared image, C(r) represents a single input original infrared image, r represents the image sequence number, R is the total number of images, ∥∥2 represents the L2 norm,
[0025] Local infrared field network loss function:
[0026]
[0027] avgpool() represents average pooling, Ω(r(i)) represents the input feature vector, and r(i) represents the i-th vector of image r;
[0028] Step 4. Input the sparse point cloud and camera pose information obtained in step 1 into the trained neural radiation field network to generate an infrared image.
[0029] Preferably, in step 11, downsampled images are extracted from the video frames directly captured at a downsampling rate of 4-8 times to obtain an infrared image sequence of the target scene.
[0030] Preferably, in step 12, the infrared image enhancement comprises the following steps:
[0031] S121. Obtain each grayscale probability density function and cumulative distribution function of the input infrared image to obtain an infrared grayscale image, and apply adaptive switching non-local mean filtering to remove noise from the grayscale image to obtain an original grayscale histogram;
[0032] The input infrared image includes an image obtained by shooting the same scene at a source viewing angle and a reference viewing angle; S122. Processing the original grayscale histogram after noise removal to obtain a grayscale smoothing histogram;
[0033] S123. Segmenting the input smoothed histogram into a foreground histogram and a background histogram;
[0034] S124. Combining the foreground histogram and the background histogram information to obtain a remapped histogram, and after performing PSO brightness correction, outputting an enhanced infrared image.
[0035] Preferably, in step 13, feature point extraction and matching are performed on the infrared image sequence after infrared enhancement in step 1 to select a transformation model, and then sparse reconstruction is performed to obtain a sparse point cloud and camera pose of the target scene; specifically:
[0036] S131. Use SIFT algorithm to extract features from infrared images, find matching point pairs by comparing descriptors of feature points in images from different viewpoints; randomly select some matching pairs of feature points as sample points;
[0037] S132. Estimate the transformation model using these randomly selected sample points;
[0038] S133. For all feature point matching pairs, if the deviation between the feature point matching pair and the model is less than a predetermined threshold, the point pair is considered to be an inlier, otherwise it is considered not to be an inlier;
[0039] S134. Repeat steps 131 to 133 multiple times, retaining the model with the largest number of inliers each time; and finally selecting the transformation model with the largest number of inliers as the optimal matching result;
[0040] The transformation model obtained in step S134 is used for sparse reconstruction to obtain a sparse point cloud and camera pose of the target scene.
[0041] Preferably, step 25 specifically includes: setting the entropy loss k=1,2…KA,
[0042] H(p)=-plog2(p)-(1-p)log2(1-p)
[0043] Where H is the binary entropy function, the subscript k represents different sampling points, KA represents the total number of sampling points, and log2 represents the logarithmic value with base 2;
[0044] The calculated entropy loss is the binary opacity.
[0045] Preferably, the step 4 further includes building an image generation network;
[0046] The image generation network includes the neural radiation field network trained in step 3, the encoded 3D point network in the neural radiation field network is sequentially connected to a linear head layer, a Leaky Relu activation function layer, the local infrared field network is sequentially connected to a linear head layer, a convolution layer and a Sigmoid activation function layer, the Leaky Relu activation function layer and the Sigmoid activation function layer are both connected to the global infrared field network, and the global infrared field network includes a plurality of MLP networks connected in series;
[0047] The sparse point cloud and camera pose information obtained in step 1 are respectively input into the trained encoded 3D point network and the local infrared field network, and finally the infrared image is output through the global infrared field network.
[0048] Preferably, the global infrared field network is trained using the infrared image sequence obtained in step 1.
[0049]
[0050] Calculate the loss function;
[0051] avgpool() represents the average pooling process, Ω(r(i)) represents the input feature vector, and r(i) represents the i-th vector of image r.
[0052] The present invention uses a neural radiation field to complete three-dimensional reconstruction of multi-view infrared images. First, infrared enhancement is performed on the infrared image sequence, and the infrared image sequence is sparsely reconstructed to obtain a sparse point cloud and a camera pose. Then, the coordinates are obtained and position encoded using the neural radiation field principle. Next, discontinuous binary opacity is used to replace the continuous density value of the scene. Finally, the grid structure of the scene can be restored based on the obtained binary opacity, and the pixel-level features of the image can be restored, thereby achieving new high-definition view synthesis for the input infrared image. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 A schematic flow chart of a specific implementation of the reconstruction method of the present invention;
[0054] Figure 2 A schematic diagram of a specific implementation flow of the infrared image enhancement of the present invention;
[0055] Figure 3 A schematic diagram of a specific implementation of the encoded 3D point network of the present invention;
[0056] Figure 4 A schematic diagram of a specific implementation of the local infrared field network of the present invention;
[0057] Figure 5 A schematic diagram of a specific implementation of the camera ray of the present invention;
[0058] Figure 6 This is a comparison table of infrared image performance obtained by the present invention and the prior art in a specific embodiment;
[0059] Figure 7 This is a comparison table of infrared image performance obtained in different specific implementations of the present invention;
[0060] Figure 8 It is a schematic diagram comparing infrared images obtained by the present invention and the prior art in a specific embodiment. DETAILED DESCRIPTION
[0061] The following is a more detailed description of the embodiments of the present invention in conjunction with the accompanying drawings and the accompanying drawings so that a person skilled in the art can implement the embodiments after reading the description. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0062] like Figure 1As shown, the present invention provides a method for three-dimensional reconstruction of infrared images based on neural radiation fields, including step 1, image data acquisition and processing, specifically including:
[0063] Step 11. Use a drone model DJI Mavic 3T to collect multi-view infrared images of the target scene; surround the target scene to cover the entire scene, and control the drone to move slowly to control motion blur;
[0064] For each acquired infrared video frame of the target scene, a downsampled image is extracted at a downsampling rate of 4 times to obtain an infrared image sequence of the target scene;
[0065] The purpose of downsampling is to reduce the amount of computation and accelerate the convergence of the network without significantly reducing the image quality.
[0066] Step 12. Then, the infrared image sequence of the target scene is enhanced to obtain a multi-view infrared image sequence of the target scene;
[0067] Specifically, the infrared image enhancement process includes:
[0068] A specific implementation of infrared image enhancement is as follows Figure 2 As shown, the following steps are included:
[0069] S121. Adaptive infrared image foreground and background segmentation is specifically as follows:
[0070] The grayscale probability density function and cumulative distribution function of each input infrared image of each viewing angle are calculated to obtain an infrared grayscale image, and an adaptive switching non-local mean filter is applied to remove noise from the grayscale image to obtain an original grayscale histogram;
[0071] The input infrared image includes images taken from the source perspective and the reference perspective of the same scene;
[0072] S122. The original grayscale histogram after noise removal is subjected to Gaussian filtering and LOWESS (local enhanced regression) smoothing to achieve global histogram equalization, and then the smoothing of each grayscale level is calculated using a polynomial univariate regression estimation function, and the original grayscale histogram is smoothed to obtain a smoothed histogram;
[0073] S123. Then, an adaptive gray density threshold is calculated based on maximizing the inter-class variance of the data set, and the input smooth histogram is segmented into a foreground histogram and a background histogram according to the gray density threshold;
[0074] S124. Combining the foreground histogram and the background histogram information to obtain a remapped histogram, and performing PSO (Particle Swarm Optimization) brightness correction to output an enhanced infrared image;
[0075] Step 13. Use the open source software colmap for image processing to sparsely reconstruct the multi-view infrared image sequence of the target scene after infrared image enhancement to obtain the sparse point cloud and camera pose of the target scene;
[0076] In a preferred embodiment, in step 13, feature points are extracted and matched on the infrared image sequence after infrared enhancement in step 1 to select a transformation model, and the transformation model is specifically:
[0077] S131. After extracting features from the infrared image using the SIFT algorithm (Scale-Invariant Feature Transform), the extracted feature descriptors are matched, and matching point pairs are found by comparing the descriptors of feature points in images from different viewing angles.
[0078] Feature point matching is performed by comparing each feature descriptor in the first image with all feature descriptors in the second image one by one to find the best match; the degree of matching is evaluated by calculating the Euclidean distance between the two descriptors, and the smaller the distance, the higher the matching degree.
[0079] After feature point matching, there may be mismatches. The random sampling consistency method is used to eliminate mismatches. The main steps are:
[0080] Randomly select minimum samples: Randomly select a small number of feature point matching pairs as samples. The number of these samples is the minimum number required to estimate the model. For example, when used to estimate the affine transformation or homography matrix, 4 pairs of matching points may be required.
[0081] S132. Estimation model: use these randomly selected sample points to estimate the transformation model;
[0082] S133. Calculate consistency: For all feature point matching pairs, calculate their consistency with the estimated transformation model. If the deviation between a point pair and the model is less than a predetermined threshold, the point pair is considered to be an inlier;
[0083] S134. Select the best matching result: repeat steps S131 to S133 multiple times, generally more than 10 times, and retain the model with the largest number of inliers each time; finally select the model with the largest number of inliers as the best matching result, and the matching point pairs retained by the best matching result enter the subsequent steps.
[0084] Step 2. Train the model
[0085] The infrared enhanced multi-view infrared image sequence, the sparse point cloud of the target scene and the camera pose are used as input and input into the MLP network (feedforward neural network,) of the neural radiation field for training to obtain the minimized predicted infrared image C pre , to minimize the predicted infrared image C pre and the infrared image C in the input multi-view infrared image sequence gt Based on the error loss between them, the network is optimized and the continuous density values generated by the MLP network are replaced by discontinuous binary opacity. Finally, a new scene can be synthesized under a new viewpoint and a clear grid can be extracted.
[0086] Step 2 specifically includes
[0087] Step 21. Construct the neural radiation field network
[0088] The neural radiation field network structure includes a 3D point encoding network and a local infrared field network that simulates and generates infrared images, wherein the 3D point encoding network structure is as follows: Figure 3 As shown in the figure, it consists of an eight-layer MLP network with 256 hidden units, and a jump connection is completed in the fourth layer, that is, the input end of the first layer is directly connected to the output end of the fourth layer. The jump connection can achieve a shorter information transmission path and speed up network training and convergence.
[0089] The local infrared field network structure that simulates the infrared image is as follows: Figure 4 As shown, it consists of a 4-layer MLP network with 128 hidden units.
[0090] In the initially constructed network, each network parameter can be generated according to habit or randomly.
[0091] Step 22. Get the coarse sampling points,
[0092] On each camera ray, between the near plane close to the camera and the far plane far away from the camera, the camera ray is divided into n equal parts, and then a sampling point S is obtained by uniformly sampling in each subinterval. i , and finally n*M sampling points will be obtained, where M is the number of camera rays, such as Figure 6 shown.
[0093] Each image is taken by a camera at a certain position at a certain angle toward a certain side of the object being photographed. This information is contained in the camera position information of the image. The camera ray can be obtained through the camera position information. The camera ray refers to each ray that the camera points to any point on the object being photographed. When selecting camera rays, they can be evenly distributed, or more camera rays can be selected in the direction that needs to be highlighted. The number is determined by the sampling accuracy. The more camera rays selected, the finer the final infrared image will be.
[0094] Step 23. Sampling points S obtained by coarse sampling i The coordinates (x, y, z) are encoded and sent to the first layer of MLP network in the 3D point encoding network to output the density value of each sampling point. The obtained density values are sorted in descending order according to the distribution probability.
[0095] For different density values, the sampling rate is set according to the probability to perform secondary sampling. The higher the density value with large distribution probability, the higher the sampling rate is, and the finer sampling points are obtained;
[0096] For example, the distribution probability of a point with a density of 0.5 is 50%, the distribution probability of a point with a density of 0.8 is 25%, and the distribution probability of a point with a density of 1 is 5%. The sampling rate for points with a density of 0.5 can be set to 60%, the sampling rate for points with a density of 0.8 can be set to 30%, and the sampling rate for points with a density of 1 can be set to 6%.
[0097] The purpose of fine sampling is to make the sampling points closer to the surface of the scene or target, avoid repeated sampling in empty places, reduce redundancy, reduce the amount of calculation, and increase calculation efficiency.
[0098] Step 24. When position encoding is performed on the obtained fine sampling point coordinates (x, y, z), the original input 3D point coordinates are mapped to Fourier features to represent high-frequency details. The encoding formula is:
[0099] γ(p)=(sin(2 0 πp),cos(2 0 πp),…,sin(2 L-1 πp),cos(2 L-1 πp))
[0100] The high frequency coding information γ is applied to the three values of the input 3D point coordinates (x, y, z) and takes L = 6. p is the x, y and z values in the coordinates respectively.
[0101] The high-frequency encoded information γ is input into the neural radiation field network; so that the neural radiation field network obtains the high-frequency information.
[0102] Step 25. The process of converting continuous density values to discontinuous binary opacity includes:
[0103] Check the density values α∈[0,1] of all sampling points on the camera ray in step 22, set the opacity of the sampling points with density values α<0.5 to 0, set the opacity of the sampling points with density values α>0.5 to 1, and define the points with opacity 1 as points on the surface of the object.
[0104] One specific implementation method for implementing step 25 is to set the entropy loss function
[0105] Entropy loss k=1,2…KA, in order to pull the opacity values less than 0.5 to 0 and the opacity values greater than 0.5 to 1, an entropy loss is applied to the opacity values of all sampling points on the ray, and the formula is:
[0106] Binary entropy function H(p) = -plog2(p)-(1-p)log2(1-p)
[0107] Where H is the binary entropy function, the subscript k represents different sampling points, KA represents the total number of sampling points, and log2 represents the logarithmic value with base 2;
[0108] The calculated entropy loss is the binary opacity.
[0109] Then replace the continuous density value of the scene with a discontinuous binary opacity
[0110] Step 3. Network training:
[0111] The 8-layer MLP module of the encoding 3D point network is optimized by minimizing the reconstruction loss between the predicted infrared image and the infrared image in the real input infrared image sequence, and its loss function is:
[0112]
[0113] is a single predicted infrared image output by the model, C(r) represents a single original infrared image input, r represents the image sequence number, R is the total number of images, and ∥∥2 represents the L2 norm, that is, It represents the sum of the L2 losses between all predicted images and the output images.
[0114] The 4-layer MLP of the local infrared field network that simulates the generation of infrared images is introduced by introducing the loss function L CON To optimize, the formula is:
[0115]
[0116] avgpool() represents the average pooling process, Ω(r(i)) represents the input feature vector, r(i) represents the i-th vector of image r, and avgpool(Ω(r(i))) represents the average pooling operation on the input vector. Assuming that the input feature vector Ω(r(i)) is a 256-dimensional vector, it becomes a 128-dimensional vector after average pooling, a dimensionality reduction operation. η is a hyperparameter, which represents the ability to infraredize the image. η is an empirical value and can be set to 0.1.
[0117] The 4-layer MLP of the local infrared field network that simulates the generation of infrared images is introduced by introducing the loss function L CON To optimize, the formula is:
[0118] Ω is average-pooled, and then the neural network that optimizes the simulated infrared field is trained by minimizing the loss between the average-pooled local infrared field and η.
[0119] The specific setting of the training objective can be to terminate when the loss is reduced to a certain set allowable value, or to train a certain number of times and select the model with the smallest loss function.
[0120] Step 4. Figure 1 As shown in FIG. 1 , the process of generating an infrared image using a trained neural radiation field network is as follows: an image generation network is constructed, wherein the image generation network includes the neural radiation field network trained in step 3, wherein the encoded 3D point network in the neural radiation field network is sequentially connected to a linear head layer and a Leaky Relu activation function layer; a local infrared field network is sequentially connected to a linear head layer, a convolutional layer and a Sigmoid activation function layer, wherein the Leaky Relu activation function layer and the Sigmoid activation function layer are both connected to the local infrared field network, and the local infrared field network includes a plurality of MLP networks connected in series; as shown in FIG. Figure 1 In the specific embodiment shown, the local infrared field network is formed by four MLP networks with 128 hidden units connected in series.
[0121] The sparse point cloud and camera pose information obtained in step 1 are respectively input into the trained encoded 3D point network and the local infrared field network, and finally the predicted infrared image is output through the global infrared field network.
[0122] The sparse point cloud and camera pose information are respectively input into the encoded 3D point network that generates scene density and the local infrared field network that generates local infrared field. The feature vectors of the two networks are connected to two linear head layers. One generates the density value σ of the scene or object through the leaky Relu activation function nonlinear activation and converts the density value into the opacity value α. The other generates the local infrared field parameters through the sigmoid activation function nonlinear activation after convolution of a convolution layer composed of larger convolution kernels. The linear head layer connected to the local infrared field network keeps the scene structure information stable through a set of 7x7 convolution kernels. Then the opacity and local infrared field parameters are input into the global infrared field network, and the final predicted infrared image is generated through volume rendering technology.
[0123] The global infrared field network can also be trained using the same method as the local infrared field network, that is, using the infrared image sequence obtained in step 1 for training.
[0124]
[0125] Calculate the loss function.
[0126] like Figure 6 As shown in the figures, the method of the present invention is compared with other reconstruction algorithms based on deep learning. In terms of the prediction of infrared images, the infrared image peak signal-to-noise ratio (PSNR), structural similarity index (SSIM), learning perceptual image block similarity (LPIPS) and other scores obtained by the method of the present invention are better than those of the other two methods BakedSDF (baked distance field) and MobileNeRF (mobile neural radiance field).
[0127] like Figure 7 As shown, the present invention utilizes binary opacity, uses a 7*7 convolution kernel to convolve the feature map to generate a local infrared field, and uses infrared image enhancement technology to conduct ablation experiments. The results show that when binary opacity is simultaneously provided, a 7x7 convolution kernel is used and the infrared image enhancement technology is used to preprocess the infrared image sequence, the resulting predicted infrared image has the best effect. However, the image performance obtained by not using any of the binary opacity, convolution kernel and infrared image enhancement technology is not as good as the peak signal-to-noise ratio (PSNR), structural similarity index (SSIM), learning perceptual image block similarity (LPIPS) and other indicators obtained by the complete technical solution.
[0128] like Figure 8 As shown, Figure 8Parts (a), (b), and (c) are infrared images obtained using the method of the present invention, the MobileNeRF method, and the BakedSDF method, respectively. Compared with the image obtained by the prior art, the predicted infrared image generated by the present invention does not have the floating fog above the image obtained by the BakedSDF method, nor does it have the artifacts at the top of the image obtained by the MobileNeRF method.
[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0130] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0132] The above are one or more embodiments of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A method for three-dimensional reconstruction of infrared images based on neural radiation field, characterized in that: The following steps are involved: Step 1. Image data acquisition and processing, specifically including: Step 11. Collect multi-view infrared images of the target scene; surround the target scene to cover all angles of the entire scene, and obtain an infrared image sequence of the target scene; Step 12. Perform infrared image enhancement on the infrared image sequence of the target scene to obtain a multi-view infrared image sequence of the target scene; Step 13. Sparsely reconstruct the multi-view infrared image sequence of the target scene after infrared image enhancement to obtain a sparse point cloud and camera pose of the target scene; Step 2. Build the network, including: Step 21. Construct a neural radiation field network, wherein the neural radiation field network structure includes a coding 3D point network and a local infrared field network for simulating infrared images, wherein the coding 3D point network structure and the local infrared field network structure are composed of a plurality of MLP networks connected in series, the number of MLP networks in the coding 3D point network structure is greater than that in the local infrared field network structure, and the number of hidden units in each MLP network is greater than that in the local infrared field network structure; Step 22. Obtain coarse sampling points. On each camera ray, between the near plane close to the camera and the far plane far away from the camera, divide the camera ray into n equal parts, and then uniformly sample in each subinterval to obtain a sampling point Si. Finally, n*M sampling points will be obtained, where M is the number of camera rays. Step 23. After position encoding of the coordinates (x, y, z) of the sampling point Si obtained by coarse sampling, the coordinates are sent to the first layer MLP network in the 3D point encoding network and the density value of each sampling point is output. The obtained density values are sorted in descending order according to the distribution probability. For different density values, the sampling rate is set according to the probability for secondary sampling. The higher the density value with large distribution probability, the higher the sampling rate. After secondary sampling, fine sampling points are obtained. Step 24. Perform position encoding on the obtained fine sampling point coordinates (x, y, z), and the encoding formula is: γ(p)=(sin(2 0 πp),cos(2 0 πp),…,sin(2 L-1 πp),cos(2 L-1 πp)) Where L = 6, p is the x, y and z value in the coordinates respectively; The high frequency encoded information γ is input into the neural radiation field network; Step 25. Convert the continuous density value to a discontinuous binary opacity. Check the density values α∈[0,1] of all sampling points on the camera ray in step 22, set the opacity of the sampling points with density values α<0.5 to 0, and the opacity of the sampling points with density values α>0.5 to 1, and define the points with opacity 1 as points on the surface of the object; Step 3. Train the Neural Field Network The multi-view infrared image sequence of the target scene obtained in step 1 is input into the encoded 3D point network and the local infrared field network of the neural radiation field network, and the loss function between the predicted image and the input image is calculated. The training is performed with the minimum loss as the training goal. The encoding 3D point network loss function represents a single predicted infrared image, C(r) represents a single input original infrared image, r represents the image sequence number, R is the total number of images, ∥∥2 represents the L2 norm, Local infrared field network loss function: avgpool() represents average pooling, Ω(r(i)) represents the input feature vector, r(i) represents the i-th vector of image r; η is a hyperparameter; Step 4. Input the sparse point cloud and camera pose information obtained in step 1 into the trained neural radiation field network to generate an infrared image.
2. The infrared image three-dimensional reconstruction method according to claim 1, characterized in that: In step 11, down-sampled images are extracted from the video frames directly captured at a down-sampling rate of 4-8 times to obtain an infrared image sequence of the target scene.
3. The infrared image three-dimensional reconstruction method according to claim 1, characterized in that: In step 12, the infrared image enhancement includes the following steps: S121. Obtain each grayscale probability density function and cumulative distribution function of the input infrared image to obtain an infrared grayscale image, and apply adaptive switching non-local mean filtering to remove noise from the grayscale image to obtain an original grayscale histogram; The input infrared image includes images taken from the source perspective and the reference perspective of the same scene; S122. Processing the original grayscale histogram after noise removal to obtain a grayscale smoothed histogram; S123. Segmenting the input smoothed histogram into a foreground histogram and a background histogram; S124. Combining the foreground histogram and the background histogram information to obtain a remapped histogram, and after performing PSO brightness correction, outputting an enhanced infrared image.
4. The infrared image three-dimensional reconstruction method according to claim 1, characterized in that: In step 13, feature point extraction and matching are performed on the infrared image sequence after infrared enhancement in step 1 to select a transformation model, and then sparse reconstruction is performed to obtain a sparse point cloud and camera pose of the target scene; specifically: S131. Use SIFT algorithm to extract features from infrared images, find matching point pairs by comparing descriptors of feature points in images from different viewpoints; randomly select some matching pairs of feature points as sample points; S132. Estimate the transformation model using these randomly selected sample points; S133. For all feature point matching pairs, if the deviation between the feature point matching pair and the model is less than a predetermined threshold, the point pair is considered to be an inlier, otherwise it is considered not to be an inlier; S134. Repeat steps 131 to 133 multiple times, retaining the model with the largest number of inliers each time; and finally selecting the transformation model with the largest number of inliers as the optimal matching result; The transformation model obtained in step S134 is used for sparse reconstruction to obtain a sparse point cloud and camera pose of the target scene.
5. The infrared image three-dimensional reconstruction method according to claim 1, characterized in that: The step 25 is specifically as follows: setting the entropy loss k=1,2…KA, H(p)=-plog2(p)-(1-p)log2(1-p) Where H is the binary entropy function, the subscript k represents different sampling points, KA represents the total number of sampling points, and log2 represents the logarithmic value with base 2; The calculated entropy loss is the binary opacity.
6. The infrared image three-dimensional reconstruction method according to claim 1, characterized in that: The step 4 also includes building an image generation network; The image generation network includes the neural radiation field network trained in step 3, the encoded 3D point network in the neural radiation field network is sequentially connected to a linear head layer, a Leaky Relu activation function layer, the local infrared field network is sequentially connected to a linear head layer, a convolution layer and a Sigmoid activation function layer, the Leaky Relu activation function layer and the Sigmoid activation function layer are both connected to the global infrared field network, and the global infrared field network includes a plurality of MLP networks connected in series; The sparse point cloud and camera pose information obtained in step 1 are respectively input into the trained encoded 3D point network and the local infrared field network, and finally the infrared image is output through the global infrared field network.
7. The infrared image three-dimensional reconstruction method according to claim 6, characterized in that: The global infrared field network is trained using the infrared image sequence obtained in step 1. Calculate the loss function; avgpool() represents the average pooling process, Ω(r(i)) represents the input feature vector, r(i) represents the i-th vector of image r, and η is a hyperparameter.
Citation Information
Cited By
Neural field guided point cloud registration method and device, electronic equipment and storage medium
CN119399253A
Neural Field Guided Point Cloud Registration Method, Device, Electronic Device and Storage Medium
CN119399253B
Needle cylinder precision detection method based on infrared imaging scanning
CN120232945A
Infrared adaptive scene image enhancement method and computer program product
CN120510078A
Nerve radiation field-based three-dimensional reconstruction method and equipment applying same
CN120672937A
