A method for quickly generating pseudo-color images corresponding to LiDAR data

CN115631260BActive Publication Date: 2026-08-11合肥中科环境监测技术国家工程实验室有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-10
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

由于大气污染是复合型,考虑风速风向及污染程度,污染物往往存在的时间高达几个小时甚至更久,甚至存在突变情况,同时考虑设备可能存在采集时间不连续,单条曲线观看污染物变化趋势,几乎难以满足实际需求

Benefits of technology

与已有技术相比,本发明有益效果体现在:本发明能够快速有效把大气激光雷达数据转化为时间纬度、高度纬度和污染数据纬度相结合的多维度伪彩图,能够超高效的反应污染趋势,清晰反应污染从何时开始,何时结束,污染区域范围等信息。通过双击伪彩图能够快速定位污染时间、污染高度和污染数值,帮助用户迅速掌握污染动态提供强有力的支撑。同时本发明结合大数据和机器学习能够为后续污染物自动识别和污染预警提供技术支撑。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115631260B_ABST
    Figure CN115631260B_ABST
Patent Text Reader

Abstract

This invention discloses a method for rapidly drawing pseudo-color maps corresponding to lidar data, comprising the following steps: S100, determining the length and width pixels of the pseudo-color map, and converting pollutant data into color scale values; S200, acquiring time files and altitude data files within a set time range, drawing the X-axis based on the proportional relationship between the length pixels of the time file and the pseudo-color map, and drawing the Y-axis based on the proportional relationship between the altitude data file and the width pixels of the pseudo-color map; S300, sequentially traversing all pollutant data, acquiring the coordinate data of the pollutants and the colors corresponding to the color scale values ​​converted from the pollutant data, thereby realizing the drawing of pseudo-color maps of pollutant data for all times and all altitudes. This invention can quickly and effectively convert atmospheric lidar data into two-dimensional pseudo-color maps, can highly efficiently reflect pollution trends, and greatly improve data utilization and the time for tracing pollution sources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of atmospheric lidar data visualization, and in particular to a method for rapidly generating pseudo-color images corresponding to lidar data. Background Technology

[0002] Atmospheric lidar emits lasers into the atmosphere and acquires a set of data at different altitudes at intervals (usually around 5 minutes). The data range is typically up to 30 kilometers, with a data interval of 7.5 meters, meaning there are 4000 data points per acquisition time. The average value is accumulated, and the raw digital signal data is obtained by utilizing the different absorption and reflection of laser wavelengths by different atmospheric components. Then, the final inversion data is obtained through a specified algorithm. However, it is difficult to combine time and altitude data to quickly and effectively locate pollution, which greatly reduces the utilization rate of the equipment and the time required to find the source of pollution.

[0003] Currently, the vast majority of atmospheric lidar inversion data presents results as a single-time-time ensemble of altitude data curves. While this can easily pinpoint the approximate location, time, and severity of pollution in individual data points, atmospheric pollution is complex. Considering wind speed, direction, and pollution levels, pollutants often persist for several hours or even longer, sometimes exhibiting abrupt changes. Furthermore, considering the potential for discontinuous data collection by equipment, viewing pollutant trends from a single curve is almost insufficient for practical needs. Simultaneously displaying multiple curves to illustrate pollution trends results in excessive complexity and potential data discontinuities, making it difficult even for professionals to observe pollution continuity and obtain continuous pollution duration and altitude information, among other issues. Summary of the Invention

[0004] The purpose of this invention is to provide a method for quickly drawing a two-dimensional pseudo-color map corresponding to the time and height sets of LiDAR data in order to solve the above problems. By converting the data set and the color mark set, a clear pseudo-color map integrating the height set (Y-axis) and time set (X-axis) is drawn, making the distribution of pollutants clear at a glance and helping users to quickly grasp the pollution situation.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solution: A method for rapidly generating pseudo-color maps corresponding to lidar data, used to convert pollutant data at different altitudes and times into color scale values ​​to generate pseudo-color maps of pollutants, thereby showing pollutant trends, includes the following steps: S100, determine the length pixels allLengthPixel and width pixels allWidthPixel for drawing the pseudo-color image, and convert the pollutant data currentData into the color scale value currentColorIndex; S200: Obtain the time file fileCount and height data file allData within the set time range. Draw the X-axis based on the ratio between the time file fileCount and the length pixels allLengthPixel of the pseudo-color image. Draw the Y-axis based on the ratio between the height data file allData and the width pixels allWidthPixel of the pseudo-color image. S300: Iterate through all pollutant data currentData in sequence, obtain the X-axis position and pixel size of the pollutant data, the Y-axis position and pixel size of the pollutant data, and the color corresponding to the color scale value currentColorIndex converted from the pollutant data currentData, so as to realize the drawing of pseudo-color map of pollutant data at all times and all heights.

[0006] The color scale values ​​are set as follows: the color scales are arranged in a gradient pattern to form a set. In order to more accurately reflect the authenticity of the data, the color scale set data of this invention is 2000 {c1,c2,...,c200}. The gradient colors are from blue to green to yellow to red. The gradient order corresponds to the pollution from light to heavy. In order to facilitate the correspondence between height data and color, the maximum value of the pollutant data corresponding to the color scale is dmax=1 and the minimum value is dmin=0. Here, dmax and dmin can be modified according to the pollution requirements. Height set file: A data set of different heights {h1,h2,...,hn}, with a height resolution of 7.5m, meaning the difference between two adjacent height data sets is 7.5m; Time set file: Different altitude data sets correspond to a time, forming multiple time sets {t1,t2,...,tn}; X-axis: The time set {t1,t2,...,tn} corresponding to all data is plotted by the proportional relationship between the time set and the length of the pseudo-color image in pixels, which can accurately locate which pixel each time point is on. Y-axis: The height set {h1,h2,...,hn} corresponding to all data is drawn by the proportional relationship between the height set and the width of the pseudo-color image in pixels, which can accurately locate which pixel each height point is on; Displaying pollutant trends: By converting data from different altitudes and times into color scale values ​​(RGB mode), a clear pseudo-color map of pollutants is drawn, thereby displaying pollutant trends; Compared with existing technologies, the advantages of this invention are reflected in the following aspects: This invention can quickly and effectively convert atmospheric lidar data into a multi-dimensional pseudo-color map combining time, altitude, and pollution data dimensions. It can highly efficiently reflect pollution trends, clearly showing when pollution started and ended, and the extent of the pollution area. Double-clicking the pseudo-color map allows for rapid location of pollution time, pollution altitude, and pollution levels, providing strong support for users to quickly grasp pollution dynamics. Furthermore, this invention, combined with big data and machine learning, can provide technical support for subsequent automatic pollutant identification and pollution early warning. Attached Figure Description

[0007] Figure 1 A flowchart illustrating the process of drawing the X-axis for this invention; Figure 2 A flowchart illustrating the process of drawing the Y-axis for this invention; Figure 3 A schematic diagram illustrating the process of creating a pseudo-color image for this invention; Figure 4 This is a schematic diagram of the process for obtaining pollutant information according to the present invention. Detailed Implementation

[0008] The present invention will be further described in detail below with reference to the embodiments shown in the accompanying drawings, but this does not constitute any limitation on the present invention.

[0009] This invention aims to rapidly generate a multi-dimensional pseudo-color map that combines lidar time sets, height sets, and contamination data sets, and simultaneously quickly locate contamination positions on the pseudo-color map; see attached figure. Figure 1 , 2 3, 4 This invention provides a method for rapidly drawing pseudo-color maps corresponding to lidar data, used to convert pollutant data at different altitudes and times into color scale values ​​to draw pollutant pseudo-color maps, thereby showing pollutant trends, including the following steps: S100, determine the length pixels allLengthPixel and width pixels allWidthPixel for drawing the pseudo-color image, and convert the pollutant data currentData into the color scale value currentColorIndex; In most cases, the length (allLengthPixel) and width (allWidthPixel) of a pseudo-color image are set to a fixed size. However, the time file and height data file within the set time range do not have a one-to-one correspondence. For the time file fileCount within the time range, considering the non-fixed device collection time, possible time interruptions, user-set time ranges that are too large (e.g., querying a month, with approximately 5 minutes per group, the data volume is about 30*24*12=8640 collected files) and too small (e.g., querying a day, the data volume is about 24*12=288 collected files), and the complex relationship with the pseudo-color image length, it is necessary to extract and process it. Similarly, for the altitude data file `allData`, since atmospheric lidar can acquire data sets up to 30km long (`allData`), with each data point at 7.5 meters, the data volume reaches 4000 data points. However, the width of our pseudo-color image (`allWidthPixel`) is typically between 200 and 600 pixels. Depending on the user's and the actual needs of the atmospheric environment, it might be necessary to plot 3km of data (400 pixels), or even 10km of data (1333 pixels), etc., requiring further extraction processing. Reference Figure 3 As shown, the method for converting pollutant data currentData into color scale values ​​currentColorIndex includes the following steps: A100, determine the color mark set, where the color marks are arranged in a gradient manner to form the color mark set, and establish the correspondence between the color mark set and the color set; A200 sets the maximum and minimum values ​​dmax and dmin of the pollutant data corresponding to the color mark set; A300: Iterate through all pollutant data currentData, comparing each pollutant data currentData sequentially with the maximum value dmax and minimum value dmin of the pollutant data corresponding to the color mark set set in step A200, and obtain the color mark value currentColorIndex corresponding to the pollutant data currentData; when the pollutant data currentData is greater than dmax, the color mark value currentColorIndex corresponding to the pollutant data is the maximum value colorCount-1 of the color mark set; when the pollutant data currentData is less than dmin, the color mark currentColorIndex corresponding to the pollutant data is the minimum value 0 of the color mark set; when the pollutant data currentData is less than dmax and greater than dmin, the color mark value currentColorIndex corresponding to the pollutant data is currentColorCount / (dmax-dmin)*(currentData-dmin), and then obtain the color corresponding to the pollutant data through the correspondence between color mark value and color; Based on the above color scale values ​​and color correspondence, set the existing RGB colors; S200: Obtain the time file fileCount and height data file allData within the set time range. Plot the X-axis based on the proportional relationship between the time file fileCount and the length pixels of the pseudo-color image allLengthPixel. This specifically includes the following steps: B100, Time File Correction: Obtain the time file set fileCount and the pseudo-color image length pixels allLengthPixel within the set time range. When the number of elements in the time file set fileCount is greater than the pseudo-color image length pixels allLengthPixel, extract the data by rounding down the two values; otherwise, do not extract the data. B200, Obtaining the Time Difference Set: For the time file set fileCount processed in step B100, calculate the time difference between two adjacent times to form a time difference set tList. The sum of the time differences is used as the total system processing time allTime. B300, calculate the number of pixels occupied per second (pixelSecond): pixelSecond = allLengthPixel / allTime; B400, calculate the X-axis pixel position xpixelPos for each time file: get the first data time firstTime and the current data time currentTime in the time file collection fileCount; xpixelPos=allLengthPixel*(currentTime-firstTime) / allTime; B500, calculate the X-axis scale value dataPixel for each time file: get the element data eachTime in the time difference collection tList, dataPixel = [eachTime*pixelSecond]+1; B600, Draw the X-axis: Draw the X-axis according to the dataPixel and pixelPos positions; The Y-axis is plotted by using the proportional relationship between the height data file allData and the width pixels allWidthPixel of the pseudo-color image. The specific steps include: C100, Height Data File Correction: Obtain the height data file allData and the pseudo-color image width pixels allWidthPixel within the set time range. Calculate the total height index highAllIndex using the end height endHigh and the start height startHigh, where highAllIndex = endIndex - startIndex, and endIndex = endHigh / K, startIndex = startHigh / K, where K is the height sampling interval. When the total height index highAllIndex is greater than the pseudo-color image width pixels allWidthPixel, it is rounded down according to the ratio of the two; otherwise, no sampling is performed. The height sampling interval K is 7.5m or (7.5*N)m. C200, calculate the pixel High occupied by each height index: For the height data file allData processed in step C100, the pixel High occupied by each height index is allWidthPixel / highAllIndex; C300, calculate the Y-axis pixel position ypixelPos for each height data: get the height data index currentIndex, height data index currentIndex = current height currentHigh / K, ypixelPos = allWidthPixel * (currentIndex - startIndex) / highAllIndex; C400, Draw the Y-axis: Draw the Y-axis evenly according to the ypixelPos pixel position; Unlike drawing the X-axis, height data is continuous and uninterrupted. Here, it is necessary to set a specified height range and pseudo-color map width according to the actual needs of the user and the atmospheric environment to avoid a large number of repeated draws, which would lead to time-consuming calculations. To address potential time file interruptions in the existing data, the pseudo-color image allows for plotting intervals with corresponding X and Y coordinates, but the corresponding pollutant data is empty. The initial interruption trigger mechanism involves rounding down the time file set `fileCount` and then adding the interrupted time file, where the corresponding pollutant data is empty. The result is displayed in step B500 when calculating the X-axis division value `dataPixel` for each time file. If `eachTime > (C + 2) * 1.5`, where C is the set interruption time threshold, it indicates a data interruption between the current time (`currentTime`) and the previous time (`upCurrentTime`). This interruption is resolved by recursively checking `currentTime`. - The interrupt time is sequentially filled in based on whether C is less than or equal to upCurrentTime. At the same time, the interrupt time is sequentially filled in the X-axis. In the formula eachTime>(C+2)*1.5, 2 is derived from a large amount of data. The sampling interval error of existing atmospheric radar data is no greater than 2. 1.5 is used to limit eachTime to intervene in data between 2*C and C. It is also worth noting that C is much greater than 2s, which is 5 minutes or a multiple of 5 minutes. S300: Iterate through all pollutant data currentData in sequence, obtain the X-axis position and pixel size of the pollutant data, the Y-axis position and pixel size of the pollutant data, and the color corresponding to the color scale value currentColorIndex converted from the pollutant data currentData, so as to realize the drawing of pseudo-color map of pollutant data at all times and all heights.

[0010] The pseudo-color image of this invention also has the function of pollutant location. By double-clicking the pseudo-color image, the pollution value, pollution time, and pollution height can be located. It can also display pollution curves at different heights at the same time and pollution curves at different times at the same height. The steps for locating the pollution value, pollution time, and pollution height are as follows: D100: Double-click the pseudo-color image to obtain the current mouse position (xPos, yPos). D200: Obtain the current time of the current position, currentTime. The time index is timeIndex = xPos / allLengthPixel * allTime. Then currentTime = timeIndex-1 + firstTime. Determine whether currentTime is in the time set. If it is, proceed to step D300. D300, get the height of the current position currentHigh, the height index highIndex=yPos / allWidthPixel*highAllIndex, then currentHigh=(highIndex–1)*K+startHigh; D400 obtains the color of the current position. The color code of the current position is obtained through the correspondence between the color and the color code currentColorIndex. The pollutant data colorCount is inverted by the formula currentColorIndex=colorCount / (dmax-dmin)*(currentData-dmin).

[0011] This creates a pseudo-color map of pollutant data that combines the X-axis (time) and Y-axis (height) into a spatiotemporal pollutant pseudo-color map. It also has a location function. By specifying the length and width of the pseudo-color map and combining it with the actual data volume, secondary data refinement is performed, ensuring the speed of subsequent rendering while accurately reflecting the trend and degree of pollutants. At the same time, the pseudo-color map can quickly and efficiently locate pollution situations, such as the time range, height range, and numerical trend of pollution, greatly improving data utilization and the time for finding pollution sources. This lays the foundation for further exploration of pollution formation, diffusion, and control through more advanced methods such as big data and artificial intelligence.

[0012] The above-described embodiments are preferred embodiments of the present invention and are only used to facilitate the illustration of the present invention. They are not intended to limit the present invention in any way. Any person skilled in the art who makes local modifications or alterations to the technical content disclosed in the present invention without departing from the scope of the technical features of the present invention shall still fall within the scope of the technical features of the present invention.

Claims

1. A method for rapidly generating pseudo-color maps corresponding to lidar data, used to convert pollutant data at different altitudes and times into color scale values ​​to generate pseudo-color maps of pollutants, thereby displaying pollutant trends, characterized in that... Includes the following steps: S100, determine the length pixels allLengthPixel and width pixels allWidthPixel for drawing the pseudo-color image, and convert the pollutant data currentData into the color scale value currentColorIndex; S200: Obtain the time file fileCount and height data file allData within the set time range. Draw the X-axis based on the ratio between the time file fileCount and the length pixels allLengthPixel of the pseudo-color image. Draw the Y-axis based on the ratio between the height data file allData and the width pixels allWidthPixel of the pseudo-color image. The method for plotting the X-axis involves first obtaining a time file, then recursively traversing each time point to calculate the coordinate axis position and pixel size for each time point. This includes the following steps: B100, Time File Correction: Obtain the time file set fileCount and the pseudo-color image length pixels allLengthPixel within the set time range. When the number of elements in the time file set fileCount is greater than the pseudo-color image length pixels allLengthPixel, extract the data by rounding down the two values; otherwise, do not extract the data. B200, Obtaining the Time Difference Set: For the time file set fileCount processed in step B100, calculate the time difference between two adjacent times to form a time difference set tList. The sum of the time differences is used as the total system processing time allTime. B300, calculate the number of pixels occupied per second (pixelSecond): pixelSecond = allLengthPixel / allTime; B400, calculate the X-axis pixel position xpixelPos for each time file: get the first data time firstTime and the current data time currentTime in the time file collection fileCount; xpixelPos=allLengthPixel*(currentTime-firstTime) / allTime; B500, calculate the X-axis scale value dataPixel for each time file: get the element data eachTime in the time difference collection tList, dataPixel = [eachTime*pixelSecond]+1; B600, Draw the X-axis: Draw the X-axis according to the dataPixel and pixelPos positions; S300: Iterate through all pollutant data currentData in sequence, obtain the X-axis position and pixel size of the pollutant data, the Y-axis position and pixel size of the pollutant data, and the color corresponding to the color scale value currentColorIndex converted from the pollutant data currentData, so as to realize the drawing of pseudo-color map of pollutant data at all times and all heights.

2. The method for rapidly generating a pseudo-color image corresponding to lidar data according to claim 1, characterized in that: The method for converting pollutant data currentData into color scale values ​​currentColorIndex in step S100 includes the following steps: A100, determine the color mark set, where the color marks are arranged in a gradient manner to form the color mark set, and establish the correspondence between the color mark set and the color set; A200 sets the maximum and minimum values ​​dmax and dmin of the pollutant data corresponding to the color mark set; A300: Iterate through all pollutant data currentData, and compare the pollutant data currentData with the maximum value dmax and minimum value dmin of the pollutant data corresponding to the color mark set set in step A200 in turn, and obtain the color mark value currentColorIndex corresponding to the pollutant data currentData.

3. The method for rapidly generating a pseudo-color image corresponding to lidar data according to claim 1, characterized in that: The method for drawing the Y-axis in step S200 is to recursively traverse the height set corresponding to each time data to obtain the data of a certain height, thereby obtaining the coordinate axis position and pixel size of each height. Specifically, it includes the following steps: C100, Height Data File Correction: Obtain the height data file allData and the pseudo-color image width pixels allWidthPixel within the set time range. Calculate the total height index highAllIndex using the end height endHigh and the start height startHigh, where highAllIndex = endIndex - startIndex, where endIndex = endHigh / K, startIndex = startHigh / K, and K is the height sampling interval. When the total height index highAllIndex is greater than the pseudo-color image width pixels allWidthPixel, it is rounded down according to the ratio of the two; otherwise, no extraction is performed. C200, calculate the pixel High occupied by each height index: For the height data file allData processed in step C100, the pixel High occupied by each height index is allWidthPixel / highAllIndex; C300, calculate the Y-axis pixel position ypixelPos for each height data: get the height data index currentIndex, height data index currentIndex = current height currentHigh / K, ypixelPos = allWidthPixel * (currentIndex - startIndex) / highAllIndex; C400, Draw the Y-axis: Draw the Y-axis evenly according to the ypixelPos pixel position.

4. A method for rapidly generating a pseudo-color image corresponding to lidar data according to claim 1, characterized in that: The pseudo-color image is allowed to have drawing intervals, each with corresponding X and Y coordinates, but the corresponding pollutant data is empty.

5. A method for rapidly generating a pseudo-color image corresponding to lidar data according to claim 1, characterized in that: When performing rounding and extraction on the time file set fileCount in step B100, interrupted time files should be added, where the pollutant data corresponding to the interrupted time files is empty.

6. A method for rapidly generating a pseudo-color image corresponding to lidar data according to claim 5, characterized in that: In step B500, when calculating the scale value dataPixel of each time file on the X-axis, if eachTime > (C+2)*1.5, where C is the set interruption time threshold, it means that there is a data interruption between the current time currentTime and the previous time upCurrentTime. The interruption time is sequentially filled in by recursively checking whether currentTime - C is less than or equal to upCurrentTime, and the interruption time is sequentially filled into the X-axis.

7. A method for rapidly generating a pseudo-color image corresponding to lidar data according to claim 2, characterized in that: In step A300, when the pollutant data currentData is greater than dmax, the color mark value currentColorIndex corresponding to the pollutant data is the maximum value of the color mark set, colorCount-1; when the pollutant data currentData is less than dmin, the color mark value currentColorIndex corresponding to the pollutant data is the minimum value of the color mark set, 0; when the pollutant data currentData is less than dmax and greater than dmin, the color mark value currentColorIndex corresponding to the pollutant data is colorCount / (dmax-dmin)*(currentData-dmin), and then the color corresponding to the pollutant data is obtained through the correspondence between the color mark value and the color.

8. The method for rapidly generating pseudo-color images corresponding to lidar data according to any one of claims 1-7, characterized in that: Double-clicking the pseudo-color image allows you to locate the pollution value, pollution time, and pollution height. It also displays pollution curves at different heights at the same time and pollution curves at different times at the same height.

9. A method for rapidly generating a pseudo-color image corresponding to lidar data according to claim 8, characterized in that, The steps for locating the pollution level, pollution time, and pollution height are as follows: D100: Double-click the pseudo-color image to obtain the current mouse position (xPos, yPos). D200: Obtain the current time of the current position, currentTime. The time index is timeIndex = xPos / allLengthPixel * allTime. Then currentTime = timeIndex-1 + firstTime. Determine whether currentTime is in the time set. If it is, proceed to step D300. D300, get the height of the current position currentHigh, the height index highIndex=yPos / allWidthPixel*highAllIndex, then currentHigh=(highIndex–1)*K+startHigh; D400 obtains the color of the current position. The color scale of the current position is obtained through the correspondence between the color and the color scale currentColorIndex. The pollutant data colorCount is inverted through the formula currentColorIndex=colorCount / (dmax-dmin)*( currentData-dmin).

Citation Information

Patent Citations

  • Gridding visualization method for scanning laser radar detection data

    CN110888147A