Pixel-level infrared visible light image pair generation method and device, equipment and medium

By constructing a three-dimensional point cloud map and matching radar poses, the problem of modal differences and cross-time image misalignment caused by the thermal imaging principle of infrared cameras is solved, and efficient large-scale pixel-level aligned infrared and visible light image pair generation is achieved, improving data Set quality and application efficiency.

CN118736045AActive Publication Date: 2024-10-01NAT UNIV OF DEFENSE TECH

Patent Information

Application Number
CN202410821678.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-01
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

It is difficult to construct a large-scale cross-period pixel-level aligned infrared and visible light image pair data set with existing technology, which leads to modal differences and cross-period image misalignment problems caused by the thermal imaging principle of infrared cameras, which limits the application of generative models in the night-time infrared field.

Method used

By synchronously acquiring daytime and nighttime point cloud sequences and image sequences, we construct a three-dimensional point cloud map, match radar poses, project and optimize sparse depth maps, and generate pixel-level aligned infrared and visible light image pairs to ensure consistent modalities of the image pairs. performance and high resolution.

Benefits of technology

Efficient large-scale cross-time pixel-level aligned infrared and visible light image pair generation is achieved. The generated result distribution is closer to the real image, solving the problems of modal differences and image misalignment, and improving the quality and application efficiency of the data set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736045A_ABST
    Figure CN118736045A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image pair generation, and relates to a pixel-level infrared visible light image pair generation method and device, equipment and a medium. The method comprises the following steps: synchronously acquiring a daytime point cloud sequence and a corresponding visible light image sequence, and synchronously acquiring a night point cloud sequence and a corresponding infrared image sequence; constructing a three-dimensional point cloud map, respectively matching the daytime point cloud sequence and the night point cloud sequence to obtain a radar pose, and matching the infrared image sequence to obtain a matched image pair; respectively projecting the day or night point cloud sequence to the matched image pair to obtain a visible light sparse depth map and an infrared sparse depth map, and respectively optimizing the visible light sparse depth map and the infrared sparse depth map to obtain a visible light dense depth map and an infrared dense depth map; and according to the color of each pixel point on the visible light dense depth map, coloring each corresponding pixel point on the infrared dense depth map to generate a pixel-level aligned image pair. According to the invention, the infrared visible light image pair data set can be constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image pair generation, and in particular to a method, device, equipment and medium for generating pixel-level infrared and visible light image pairs. Background Art

[0002] In the fields of assisted driving, robotics, and monitoring, visible light cameras are often used as the "eyes" of machines, providing key input information for accurate perception, decision-making, and control. However, under insufficient lighting conditions, visible light images may lose the texture and structural information of the scene, affecting the performance of related algorithms. In this case, infrared cameras based on the principle of thermal imaging can stably provide visual signals with relatively clear structures, but the differences in grayscale, appearance, and content caused by their unique imaging spectral range are usually inconsistent with the human eye's perception of the real world.

[0003] In the early days of research, infrared image fusion was used to enhance visible light data for night vision. However, due to the continuous emission and scattering of heat by objects and the environment, the "ghost effect" caused infrared images to be unable to provide detailed semantic information. Later, some researchers turned to physical coloring methods to achieve more direct perception, but the results were still unsatisfactory.

[0004] At present, a feasible method is to use generative models to achieve the translation of infrared images to visible light images, which to some extent provides a solution for the translation of unpaired nighttime infrared to daytime visible light images. For example, ROMA, a style-level supervised generative model based on the CycleGAN network, converts unpaired nighttime infrared videos into fine-grained daytime visible light videos by designing cross-domain regional similarity matching and multi-scale cross-region discriminators. However, pixel-level supervised models can usually learn clearer conversion relationships from paired datasets, but this idea of ​​carefully designing structures for each specific task is difficult to expand; at the same time, in various experiments, style-level supervised generative models are difficult to produce results comparable to pixel-level supervised generative models; in addition, pixel-level supervised models have very high requirements for training datasets, and the performance of deep learning-based models is heavily dependent on a large amount of high-quality training data, making image translation very difficult.

[0005] Therefore, it is very necessary to build a pixel-level aligned nighttime infrared and visible light image dataset for image translation tasks.

[0006] In the prior art, common paired infrared-visible light image datasets are mostly constructed in the following three ways: first, using a binocular infrared-visible light image sensor to simultaneously collect infrared and visible light images; second, collecting RGB and NIR images of a scene by fixing a tripod and replacing the camera. Similarly, there is also a dual CCD camera system, in which the NIR and RGB spectra are split and directed to dedicated CCD sensors respectively, and the NIR and RGB images are recorded simultaneously; third, the physical colorization method.

[0007] However, the first paired data generation method mentioned above has some inevitable defects: on the one hand, due to the thermal imaging principle of infrared cameras, infrared images taken during the day and at night may be very different. This domain difference makes it difficult for the generative model trained with daytime infrared images to produce satisfactory results on nighttime infrared images; on the other hand, no matter how close the distance between the cameras is, there are still perspective differences between the images obtained separately. The dataset obtained by the second method overcomes the disadvantage of perspective difference, but it still cannot collect pixel-level aligned images across time periods, and the dataset is small in scale, limited in scenes, and has low collection efficiency. The less commonly used physical colorization method often obtains datasets of poor quality.

[0008] In general, it is very difficult to construct a large-scale infrared and visible light image pair dataset that is aligned at the pixel level across time periods, which greatly limits the application of generative models in the nighttime infrared field. Summary of the invention

[0009] Based on this, it is necessary to provide a pixel-level infrared-visible light image pair generation method, device, equipment and medium to address the above-mentioned technical problems, which can construct a large-scale infrared-visible light image pair dataset with pixel-level alignment across time periods.

[0010] A method for generating pixel-level infrared and visible light image pairs, comprising:

[0011] Synchronously acquire the daytime point cloud sequence and the corresponding visible light image sequence, and synchronously acquire the nighttime point cloud sequence and the corresponding infrared image sequence;

[0012] Construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar pose; match the infrared image sequence according to the radar pose, and take any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image pose as a matching image pair;

[0013] Projecting the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair respectively to obtain a visible light sparse depth map and an infrared sparse depth map;

[0014] The visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain a visible light dense depth map and an infrared dense depth map;

[0015] According to the color of each pixel on the visible light dense depth map, each corresponding pixel on the infrared dense depth map is colored to generate a pixel-level aligned image pair.

[0016] In one embodiment, according to the radar posture, the infrared image sequence is matched, and any infrared image and a visible light image in the visible light image sequence that is closest to any infrared image posture are used as a matching image pair, including:

[0017]

[0018] in:

[0019] d(P n ,P d )=‖(x n ,y n ,z n ,θ n )-(x d ,y d ,z d ,θ d )‖2

[0020] In the formula, is the Euclidean distance between the j-th frame’s nighttime pose and the k-th frame’s daytime pose, is the night pose of the jth frame, is the daytime pose of the i-th frame.

[0021] In one embodiment, projecting the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair respectively to obtain a visible light sparse depth map and an infrared sparse depth map includes:

[0022] Projecting the daytime point cloud sequence onto the visible light image of the matching image pair to obtain a visible light sparse depth map, and projecting the daytime point cloud sequence onto the infrared image of the matching image pair to obtain an infrared sparse depth map;

[0023] Alternatively, the night point cloud sequence is projected onto the visible light image of the matching image pair to obtain a visible light sparse depth map, and the night point cloud sequence is projected onto the infrared image of the matching image pair to obtain an infrared sparse depth map.

[0024] In one embodiment, projecting the night point cloud sequence onto the infrared image of the matching image pair to obtain an infrared sparse depth map includes:

[0025]

[0026] In the formula, is a night point cloud sequence, is the infrared sparse depth map, g is the projection function from the night point cloud coordinate system to the infrared image coordinate system, CTI n For nighttime internal reference, LTC n For nighttime external reference.

[0027] In one embodiment, projecting the nighttime point cloud sequence onto the visible light image of the matching image pair to obtain a visible light sparse depth map includes:

[0028]

[0029] In the formula, is a night point cloud sequence, is the visible light sparse depth map, f is the projection function from the night point cloud coordinate system to the visible light image coordinate system, CTI d For the daytime internal reference, LTC d For daytime external reference, is the pose transformation parameter.

[0030] In one embodiment, the visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain the visible light dense depth map and the infrared dense depth map, including:

[0031] For the visible light sparse depth map and the infrared sparse depth map, a minimum filter with a mask is used to assign blank pixels to the nearest surrounding points, morphological closing and dilation operations are used to fill the holes, and median and Gaussian filters are used to remove noise to achieve depth completion. The point cloud smoothing result is obtained through depth back projection to generate visible light dense depth map and infrared dense depth map.

[0032] In one embodiment, the visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain a visible light dense depth map and an infrared dense depth map, further comprising:

[0033] When a sky area is included in a sparse shading map, a set value is assigned to the sky area to distinguish the sky area from other areas.

[0034] A pixel-level infrared-visible light image pair generating device, comprising:

[0035] An acquisition module, used to synchronously acquire a daytime point cloud sequence and a corresponding visible light image sequence, and synchronously acquire a nighttime point cloud sequence and a corresponding infrared image sequence;

[0036] A matching module is used to construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar posture; according to the radar posture, the infrared image sequence is matched, and any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image posture is used as a matching image pair;

[0037] A projection module, used to project the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair, respectively, to obtain a visible light sparse depth map and an infrared sparse depth map;

[0038] An optimization module, used to optimize the visible light sparse depth map and the infrared sparse depth map respectively to obtain a visible light dense depth map and an infrared dense depth map;

[0039] The output module is used to color each corresponding pixel on the infrared dense depth map according to the color of each pixel on the visible light dense depth map, and generate a pixel-level aligned image pair.

[0040] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0041] Synchronously acquire the daytime point cloud sequence and the corresponding visible light image sequence, and synchronously acquire the nighttime point cloud sequence and the corresponding infrared image sequence;

[0042] Construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar pose; match the infrared image sequence according to the radar pose, and take any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image pose as a matching image pair;

[0043] Projecting the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair respectively to obtain a visible light sparse depth map and an infrared sparse depth map;

[0044] The visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain a visible light dense depth map and an infrared dense depth map;

[0045] According to the color of each pixel on the visible light dense depth map, each corresponding pixel on the infrared dense depth map is colored to generate a pixel-level aligned image pair.

[0046] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0047] Synchronously acquire the daytime point cloud sequence and the corresponding visible light image sequence, and synchronously acquire the nighttime point cloud sequence and the corresponding infrared image sequence;

[0048] Construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar pose; match the infrared image sequence according to the radar pose, and take any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image pose as a matching image pair;

[0049] Projecting the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair respectively to obtain a visible light sparse depth map and an infrared sparse depth map;

[0050] The visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain a visible light dense depth map and an infrared dense depth map;

[0051] According to the color of each pixel on the visible light dense depth map, each corresponding pixel on the infrared dense depth map is colored to generate a pixel-level aligned image pair.

[0052] The above-mentioned pixel-level infrared-visible light image pair generation method is an efficient large-scale cross-time pixel-level aligned infrared-visible light image pair generation method, which can use multiple sensors to build a large-scale pixel-level aligned infrared-visible light data set. This application aims at the modal difference problem caused by the thermal imaging principle of infrared cameras, and collects infrared images and visible light images at night and during the day respectively, so as to keep the modal consistency of training data and test data; in order to solve the problem of image misalignment across time periods, a three-dimensional high-precision point cloud map is pre-constructed, and the point cloud data is used as a medium to obtain the position and posture of the image sensor through global matching with the map, and then the conversion relationship between the infrared camera coordinate system and the visible light camera coordinate system is further calculated through sensor time synchronization and spatial calibration. Using this relationship, the pixel values ​​of the visible light image are projected onto the corresponding pixel points of the infrared image, thereby ensuring that the generated image pairs are pixel-level aligned. Compared with other methods, the distribution of the generation results of this method is closer to the real image, and the efficient generation framework makes it possible to prepare large-scale high-resolution data sets. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is a diagram of an application scenario of a method for generating pixel-level infrared and visible light image pairs in an embodiment;

[0054] Figure 2 1 is a schematic diagram of a process for generating a pixel-level infrared-visible light image pair in one embodiment;

[0055] Figure 3is a schematic diagram of a three-dimensional high-precision point cloud map in one embodiment;

[0056] Figure 4 A diagram showing specific conversion parameters and coordinate system conversion relationships in one embodiment;

[0057] Figure 5 A schematic diagram of point cloud projection and point cloud optimization in one embodiment;

[0058] Figure 6 A schematic diagram of a data acquisition platform in a specific embodiment;

[0059] Figure 7 For a specific embodiment, a comparison graph of image pairs and other modality data is generated;

[0060] Figure 8 is a schematic diagram of the error analysis results in a specific embodiment, wherein (a) is the point error, (b) is the marking method, (c) is the distance error, and (d) is the angle error;

[0061] Fig. 9 is a structural block diagram of a device for generating pixel-level infrared and visible light image pairs in one embodiment;

[0062] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0064] It should be noted that all directional indications in the embodiments of the present application (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0065] In addition, the descriptions of "first", "second", etc. in this application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "multiple groups" means at least two groups, such as two groups, three groups, etc., unless otherwise clearly and specifically defined.

[0066] In this application, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, an electrical connection, a physical connection, or a wireless communication connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0067] In addition, the technical solutions between the various embodiments of the present application can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0068] The pixel-level infrared-visible light image pair generation method provided in this application can be applied to Figure 1 In the application scenario diagram shown, the terminal 102 communicates with the server 104 through the network, and the terminal 102 may include but is not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 may be various portal websites, servers corresponding to the backend of the work system, etc.

[0069] This application provides a method for generating pixel-level infrared and visible light image pairs, such as Figure 2 The flowchart shown in FIG. 1 shows a method for applying the method to Figure 1 The following is an example of a terminal in the example, including:

[0070] Step 202 : synchronously acquire a daytime point cloud sequence and a corresponding visible light image sequence, and synchronously acquire a nighttime point cloud sequence and a corresponding infrared image sequence.

[0071] Specifically:

[0072] A visible light image sensor, an infrared image sensor and a 128-line laser radar are fixed on the vehicle as a data acquisition platform. During the data acquisition process, the vehicle drives along the same route during the day and night, synchronously collecting modal images (including visible light images and infrared images) and corresponding laser radar points, thereby obtaining a daytime visible light image sequence. Night infrared image sequence Daytime point cloud sequence and night point cloud sequences

[0073] In this step, it should be noted that if no processing is done, the data collected by the lidar and image sensor will not match, so time synchronization and spatial calibration are set up, where time synchronization includes sensor synchronization and motion compensation, and spatial calibration includes internal parameter optimization and external parameter optimization.

[0074] 1) Sensor synchronization: We designed an FPGA-based synchronization system that uses the infrared frame synchronization signal as a trigger to synchronize the lidar and simultaneously trigger the exposure of the RGB camera sensor to achieve multi-sensor synchronization, that is, the image sensor will be exposed when the lidar scan line passes directly in front of the vehicle;

[0075] 2) Motion compensation: It takes a fixed period of time for a rotating LiDAR to obtain a complete point cloud frame. During this period, the vehicle carrying the sensor will continue to move forward. Therefore, the coordinates of each radar point in the data are relative to a moving vehicle coordinate system, which causes distortion and misalignment of the scene data. To solve this problem, motion compensation is performed on the point cloud in the frame based on the on-board IMU data to align all data at a certain moment.

[0076] 3) Internal parameter optimization: Based on Zhang’s calibration method, the internal parameters are calculated and the projection method is used to complete the transformation from the camera coordinate system to the image coordinate system;

[0077] 4) External parameter optimization: Based on the ATOP (Adaptive Target Matching) network, the external parameters are calculated and the rigid body transformation is used to complete the conversion from the radar coordinate system to the camera coordinate system.

[0078] Therefore, in this step, spatial calibration is performed based on time synchronization to obtain the internal reference CTI and the external reference LTC. The internal and external parameters describe the conversion relationship between the radar coordinate system, the camera coordinate system and the image coordinate system.

[0079] Step 204, construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar pose; match the infrared image sequence according to the radar pose, and use any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image pose as a matching image pair.

[0080] Specifically:

[0081] The laser radar is used to scan the entire data collection area to obtain the original point cloud data, and the original point cloud data is preprocessed (including denoising, filtering, point cloud registration, etc.), and then the preprocessed original point cloud data is converted into the world coordinate system using IMU data, and three-dimensional modeling is performed by accumulating point cloud frames. Finally, SLAM is used to complete the construction of the three-dimensional point cloud map to establish the correlation between scene points across time periods. The constructed three-dimensional point cloud map is a three-dimensional high-precision point cloud map, such as Figure 3 shown.

[0082] Each frame of daytime point cloud And each frame of night point cloud Match and locate with the 3D point cloud map to obtain the radar pose corresponding to that moment, including the daytime radar pose and night radar pose

[0083] The pose can be expressed as Among them, (x, y, z) represents the coordinates of the laser radar in the world coordinate system, represents the deflection angle of the vehicle, and the transformation relationship between the daytime pose coordinates and the nighttime pose coordinates and the origin of the world coordinate system is recorded as RT d and RT n ; Specific conversion parameters and coordinate system conversion relationships are as follows Figure 4 As shown, it can be seen that the daytime and nighttime postures (represented by yellow and black tracks) are difficult to keep completely consistent in time, namely:

[0084]

[0085] in, is the night radar pose of the jth frame, is the daytime radar pose of the i-th frame, and £ is an infinitely small number;

[0086] That is, daytime visible light images With night infrared imagery There are differences in perspective.

[0087] In order to ensure that there are as many overlapping scene points as possible between point cloud frames across time periods, the infrared image sequence is matched according to the radar pose, and any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image pose are taken as a matching image pair; specifically, for any given infrared image Calculate the corresponding nighttime radar pose The closest daytime radar pose in the European style And its corresponding visible light image As a preliminary matching image, any given infrared image and the corresponding preliminary matching image form a matching image pair:

[0088]

[0089] in:

[0090] d(P n ,P d )=‖(x n ,y n ,z n ,θ n )-(x d ,y d ,z d ,θ d )‖2

[0091] In the formula, is the Euclidean distance between the j-th frame’s nighttime pose and the k-th frame’s daytime pose, is the night pose of the jth frame, is the daytime pose of the i-th frame, which needs to be explained. It refers to the daytime pose that is closest to the nighttime pose of the jth frame.

[0092] In this step, since the vehicle may return to the original route during the data collection process, a restriction on θ is added to the pose distance calculation to ensure that the modal image corresponding to the most recent pose is taken in the same forward direction, so that the obtained image pairs can guarantee the highest scene overlap rate.

[0093] Step 206 : Project the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair, respectively, to obtain a visible light sparse depth map and an infrared sparse depth map.

[0094] Specifically:

[0095] The daytime point cloud sequence is projected onto the visible light image of the matching image pair to obtain a visible light sparse depth map, and the daytime point cloud sequence is projected onto the infrared image of the matching image pair to obtain an infrared sparse depth map;

[0096] Alternatively, the night point cloud sequence is projected onto the visible light image of the matching image pair to obtain a visible light sparse depth map, and the night point cloud sequence is projected onto the infrared image of the matching image pair to obtain an infrared sparse depth map.

[0097] More specifically:

[0098] Project the night point cloud sequence onto the infrared image of the matching image pair to obtain an infrared sparse depth map:

[0099]

[0100] In the formula, is the night point cloud sequence (the jth frame night point cloud), For infrared images Infrared sparse depth map, g is the projection function from the night point cloud coordinate system to the infrared image coordinate system, CTI n For nighttime internal reference, LTC n For nighttime external reference;

[0101] Project the night point cloud sequence onto the visible light image of the matching image pair to obtain a visible light sparse depth map, including:

[0102]

[0103] In the formula, is the night point cloud sequence (the jth frame night point cloud), For visible light images The visible light sparse depth map, f is the projection function from the night point cloud coordinate system to the visible light image coordinate system, CTI d For the daytime internal reference, LTC d For daytime external reference, is the pose transformation parameter.

[0104] In this step, the night point cloud is first converted to the daytime radar coordinate system through the pose conversion parameters, and then projected onto the plane of the visible light image to obtain the sparse depth map of the infrared image. With infrared image Same resolution.

[0105] Step 208 , respectively optimizing the visible light sparse depth map and the infrared sparse depth map to obtain a visible light dense depth map and an infrared dense depth map.

[0106] Specifically:

[0107] For the visible light sparse depth map and the infrared sparse depth map, a minimum filter with a mask is used to assign blank pixels to the nearest surrounding points, morphological closing and dilation operations are used to fill the holes, and median and Gaussian filters are used to remove noise to achieve depth completion. The point cloud smoothing result is obtained through depth back projection to generate visible light dense depth map and infrared dense depth map.

[0108] When a sky area is included in a sparse shading map, a set value is assigned to the sky area to distinguish the sky area from other areas.

[0109] More specifically:

[0110] Estimate the complete object surface at the current viewing angle to avoid incorrect projection of the point cloud; use a fast depth completion method to use basic image processing operations to complete the sparse depth map Complete the image: Set up the DepthCompletion module, use a minimum filter with a mask to assign blank pixels to the nearest surrounding points, use morphological closing and dilation operations to fill holes, use median filters and Gaussian filters to remove noise, and obtain the final point cloud smoothing result through depth back projection to achieve image completion.

[0111] Since the laser radar has no echo in the sky area, exist The sky area in the image has no corresponding depth value. Set the Sky Projection module to assign a large enough value to the sky area. And satisfy:

[0112]

[0113] In the formula, is the dense point cloud corresponding to the j-th frame infrared image, for The depth value of the midpoint cloud p;

[0114] That is, the distance from the radar to the sky is infinite, the surface of the sky can be approximated as a plane, and a sufficiently large value can effectively distinguish the sky from other ground areas.

[0115] The sparse depth map obtained in the previous step is still sparse, especially on the road surface at a close distance. It is difficult to cover all pixels even with interpolation. In addition, the dense point cloud is formed by accumulating multiple frames of point clouds into the same frame, which will inevitably bring projection errors. Due to the holes in the point cloud on the surface of the object, the points that should be blocked by the object will also be colored.

[0116] In this step, a depth completion module and a sky projection module are set up for the visible light sparse depth map and the infrared sparse depth map to avoid area missing caused by radar distance limitation and erroneous projection caused by the inherent sparsity of the point cloud and point cloud accumulation.

[0117] Step 210 , coloring each corresponding pixel on the infrared dense depth map according to the color of each pixel on the visible light dense depth map, to generate a pixel-level aligned image pair.

[0118] In this step, since the cross-time point cloud projection has been completed, Starting from the point in and A certain correspondence can be found between the pixels, based on which, we can find and The corresponding relationship of some points in the middle is used to color the image; that is, point cloud projection is used to find The corresponding pixel pairs in Colorize to achieve pixel-level alignment.

[0119] However, if the original point cloud Directly projecting, we find and The projection points in are very sparse, and a large number of pixels cannot be indexed. Therefore, it is preferred to use the pose to extract the dense point cloud within the range of 70mx70m in front from the high-precision map. and As a new medium, Transform to the camera coordinate system for regional filtering and remove perspective projection points so that the pixels of the night infrared image can be well colored, thus completing point cloud optimization, such as Figure 5 shown.

[0120] In this embodiment, by matching the point cloud frame with the pre-built three-dimensional high-precision map, the position and posture of the image sensor at each moment can be obtained; for the visible light image sensor position corresponding to each frame of the daytime visible light image, the nearest nighttime infrared image sensor position can be found, and the corresponding nighttime infrared image can be obtained. Naturally, the scene overlap of these two images is the highest; however, since the speed, trajectory and fixed position of the vehicle cannot remain completely consistent in different time periods, the modal images are not aligned at the pixel level ( Figure 3 The same object marked by the rectangular box in the figure is at different positions), and due to the existence of depth in the three-dimensional scene, this deviation cannot be eliminated by a simple affine transformation. Therefore, it is proposed to use point cloud as a medium to achieve cross-modal pixel alignment through point cloud projection, and fill the pixel values ​​in the visible light image into the corresponding pixel positions of the infrared image; further, point cloud optimization is performed to obtain pixel-dense image pairs.

[0121] The above-mentioned pixel-level infrared-visible light image pair generation method is an efficient large-scale cross-time pixel-level aligned infrared-visible light image pair generation method, which can use multiple sensors to build a large-scale pixel-level aligned infrared-visible light data set. This application aims at the modal difference problem caused by the thermal imaging principle of infrared cameras, and collects infrared images and visible light images at night and during the day respectively, so as to keep the modal consistency of training data and test data; in order to solve the problem of image misalignment across time periods, a three-dimensional high-precision point cloud map is pre-constructed, and the point cloud data is used as a medium to obtain the position and posture of the image sensor through global matching with the map, and then the conversion relationship between the infrared camera coordinate system and the visible light camera coordinate system is further calculated through sensor time synchronization and spatial calibration. Using this relationship, the pixel values ​​of the visible light image are projected onto the corresponding pixel points of the infrared image, thereby ensuring that the generated image pairs are pixel-level aligned. Compared with other methods, the distribution of the generation results of this method is closer to the real image, and the efficient generation framework makes it possible to prepare large-scale high-resolution data sets.

[0122] It should be understood that although Figure 2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0123] In a specific embodiment, the method of the present application is experimentally verified.

[0124] 1) Experimental environment:

[0125] Use as Figure 6 The data collection platform shown in the figure is equipped with a Robosense 128-line lidar, an Xsens MTI300 IMU, a NovAtel SPAN-CPT GNSS / INS system, a visible light camera and an infrared camera. A rural loop road is selected as a fixed route for data collection.

[0126] like Figure 7The comparison chart of the generated image pairs and other modal data shown in the figure shows that the first column is a night infrared image, and the second column is the pixel-level aligned visible light image generation result of the first column. When generating cross-modal image pairs, a large amount of other modal data is collected at the same time. The scenes include: sandy and cement roads, turns and uphills, branches and leaves and other complex textures, and the generation effect is good. Due to the difference in viewing angle, some areas of the infrared image cannot be colored, so a mask of the effective area is provided, and the point cloud data is projected onto its corresponding modal image for visualization.

[0127] 2) Error analysis:

[0128] In order to illustrate the reliability of the image pair generation method of this application, 100 pairs of infrared-colored images and corresponding infrared-preliminary matching original visible light images were randomly selected, and the three indicators of point error, distance error and angle error were used for confidence analysis. Specifically, two clear target points p1 = (x1, y1) and p2 = (x2, y2) were marked on the image. and Represents the same position of the infrared and colored image pairs, especially (when calculating the error of the initial match of the original visible light image, will be replace).

[0129] like Figure 8 As shown in (b), the target point is usually selected on a fixed reference object, such as a building or a tree trunk, to avoid errors caused by non-algorithmic reasons. The calculation of each indicator is as follows:

[0130]

[0131]

[0132]

[0133]

[0134] in,

[0135] e(p1,p2)=||p1-p2||2

[0136] θ(p1,p2)=arctan((x2-x1) / (y2-y1))

[0137] In the formula, r represents the resolution of the image.

[0138] The above metrics evaluate the accuracy of pixel alignment between two images and the degree of affine transformation, thus giving an overall “pairing degree” of the image pair.

[0139] like Figure 8 The error analysis results shown in (a), 8(c), and 8(d) show that the point error of the colored image (i.e., colored) is basically within 3% of the image resolution, which is significantly lower than the 40% of the original paired visible light image (i.e., raw). Similarly, the distance error of the colored image is within 10%, and the angle error is 0.14 / 2π.

[0140] 3) Conclusion:

[0141] People's poor perception of nighttime environments has given rise to the need to translate nighttime infrared images into daytime visible light images. However, the thermal imaging characteristics of infrared cameras make it very difficult to construct pixel-level aligned nighttime infrared-visible light image pairs. This application proposes an efficient pixel-level aligned image pair generation method, which makes it possible to quickly generate a large number of high-resolution nighttime infrared-visible light image pairs. Experimental results show that the dataset generated by the method in this application is reliable and has strong practicality in related image translation. It is applicable in many weather conditions and different scenarios, and can further improve the sensor synchronization performance to achieve better colorization effects.

[0142] The present application also provides a pixel-level infrared-visible light image pair generation device, such as Fig. 9 As shown, in one embodiment, it includes: an acquisition module 902, a matching module 904, a projection module 906, a coloring module 908 and an output module 910, wherein:

[0143] An acquisition module 902 is used to synchronously acquire a daytime point cloud sequence and a corresponding visible light image sequence, and synchronously acquire a nighttime point cloud sequence and a corresponding infrared image sequence;

[0144] The matching module 904 is used to construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar posture; match the infrared image sequence according to the radar posture, and take any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image posture as a matching image pair;

[0145] A projection module 906 is used to project the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair, respectively, to obtain a visible light sparse depth map and an infrared sparse depth map;

[0146] A coloring module 908 is used to optimize the visible light sparse depth map and the infrared sparse depth map to obtain a visible light dense depth map and an infrared dense depth map;

[0147] The output module 910 is used to color each corresponding pixel on the infrared dense depth map according to the color of each pixel on the visible light dense depth map to generate a pixel-level image pair.

[0148] For the specific definition of the pixel-level infrared-visible light image pair generation device, please refer to the definition of the pixel-level infrared-visible light image pair generation method above, which will not be repeated here. Each module in the above device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0149] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating a pixel-level infrared-visible light image pair is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0150] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0151] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in the above embodiment when executing the computer program.

[0152] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the above embodiment are implemented.

[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0154] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0155] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating pixel-level infrared and visible light image pairs, characterized in that: include: Synchronously acquire the daytime point cloud sequence and the corresponding visible light image sequence, and synchronously acquire the nighttime point cloud sequence and the corresponding infrared image sequence; Construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar pose; match the infrared image sequence according to the radar pose, and take any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image pose as a matching image pair; Projecting the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair respectively to obtain a visible light sparse depth map and an infrared sparse depth map; The visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain a visible light dense depth map and an infrared dense depth map; According to the color of each pixel on the visible light dense depth map, each corresponding pixel on the infrared dense depth map is colored to generate a pixel-level aligned image pair.

2. The method for generating pixel-level infrared and visible light image pairs according to claim 1, characterized in that: According to the radar posture, the infrared image sequence is matched, and any infrared image and a visible light image in the visible light image sequence that is closest to any infrared image posture are used as a matching image pair, including: in: d(P n ,P d )=‖(x n ,y n ,z n ,θ n )-(x d ,y d ,z d ,θ d )‖2 In the formula, is the Euclidean distance between the j-th frame’s nighttime pose and the k-th frame’s daytime pose, is the night pose of the jth frame, is the daytime pose of the i-th frame.

3. The method for generating pixel-level infrared-visible light image pairs according to claim 1 or 2, characterized in that: Projecting the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair respectively to obtain a visible light sparse depth map and an infrared sparse depth map, including: Projecting the daytime point cloud sequence onto the visible light image of the matching image pair to obtain a visible light sparse depth map, and projecting the daytime point cloud sequence onto the infrared image of the matching image pair to obtain an infrared sparse depth map; Alternatively, the night point cloud sequence is projected onto the visible light image of the matching image pair to obtain a visible light sparse depth map, and the night point cloud sequence is projected onto the infrared image of the matching image pair to obtain an infrared sparse depth map.

4. The method for generating pixel-level infrared-visible light image pairs according to claim 3, characterized in that: Projecting the night point cloud sequence onto the infrared image of the matching image pair to obtain an infrared sparse depth map, including: In the formula, is a night point cloud sequence, is the infrared sparse depth map, g is the projection function from the night point cloud coordinate system to the infrared image coordinate system, CTI n For nighttime internal reference, LTC n For nighttime external reference.

5. The method for generating pixel-level infrared-visible light image pairs according to claim 4, characterized in that: Projecting the night point cloud sequence onto the visible light image of the matching image pair to obtain a visible light sparse depth map, including: In the formula, is a night point cloud sequence, is the visible light sparse depth map, f is the projection function from the night point cloud coordinate system to the visible light image coordinate system, CTI d For the daytime internal reference, LTC d For daytime external reference, is the pose transformation parameter.

6. The method for generating pixel-level infrared-visible light image pairs according to claim 1 or 2, characterized in that: The visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain a visible light dense depth map and an infrared dense depth map, including: For the visible light sparse depth map and the infrared sparse depth map, a minimum filter with a mask is used to assign blank pixels to the nearest surrounding points, morphological closing and dilation operations are used to fill the holes, and median and Gaussian filters are used to remove noise to achieve depth completion. The point cloud smoothing result is obtained through depth back projection to generate visible light dense depth map and infrared dense depth map.

7. The method for generating pixel-level infrared-visible light image pairs according to claim 6, characterized in that: The visible light sparse depth map and the infrared sparse depth map are optimized respectively to obtain a visible light dense depth map and an infrared dense depth map, and further include: When a sky area is included in a sparse shading map, a set value is assigned to the sky area to distinguish the sky area from other areas.

8. A device for generating pixel-level infrared and visible light image pairs, characterized in that: include: An acquisition module, used to synchronously acquire a daytime point cloud sequence and a corresponding visible light image sequence, and synchronously acquire a nighttime point cloud sequence and a corresponding infrared image sequence; A matching module is used to construct a three-dimensional point cloud map, match the daytime point cloud sequence and the nighttime point cloud sequence with the three-dimensional point cloud map respectively, and obtain the radar posture; according to the radar posture, the infrared image sequence is matched, and any infrared image and the visible light image in the visible light image sequence that is closest to any infrared image posture is used as a matching image pair; A projection module, used to project the daytime point cloud sequence or the nighttime point cloud sequence onto the visible light image and the infrared image of the matching image pair, respectively, to obtain a visible light sparse depth map and an infrared sparse depth map; An optimization module, used to optimize the visible light sparse depth map and the infrared sparse depth map respectively to obtain a visible light dense depth map and an infrared dense depth map; The output module is used to color each corresponding pixel on the infrared dense depth map according to the color of each pixel on the visible light dense depth map, and generate a pixel-level aligned image pair.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Monocular infrared video three-dimensional reconstruction method based on visual odometer

    CN106846417A

  • Indoor night vision navigation method based on Kinect2 sensor

    CN106908064A

  • Sparse three-dimensional point cloud densification method

    CN112102472A

  • Forest fire positioning method and system based on unmanned aerial vehicle multi-sensor data fusion

    CN113359141A

  • Rapid color-preserving fusion method and device for visible light and infrared image pair

    CN114881899A

Cited By

  • Color point cloud map construction method and device based on optimal image selection and point cloud thickening

    CN119693568A