Data visualization analysis method, system and medium for land management
By acquiring and preprocessing remote sensing images in real time, combining gradient and edge grayscale values changes to identify the fog-affing area and performing defog treatment, the problem of remote sensing images being affected by fog is solved, and efficient defog removal of images and accurate visual analysis of data is achieved.
Patent Information
- Application Number
- CN202411578421.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-07
AI Technical Summary
During the continuous shooting of remote sensing satellites in the areas to be measured, the weather is unstable, especially in foggy days, which will greatly damage the remote sensing image, making it difficult to accurately identify the foggy-affected areas.
A data visual analysis method is adopted to obtain remote sensing images in real time, perform grayscale pre-processing and connectivity domain division, combine gradient and edge grayscale values to confirm the fog-affing area, and perform defog treatment, and finally import it into the geographic information system for visual analysis.
Effectively identify and remove fog-affected areas in remote sensing images, improve the clarity and accuracy of the images, and provide more accurate and reliable data support for land remediation.
Smart Images

Figure CN119091324B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a data visualization analysis method, system and medium for land management. Background Art
[0002] The core of land consolidation is the development and utilization of land resources. It improves land utilization by scientifically consolidating agricultural land, and prevents land disasters such as soil erosion. Remote sensing technology is one of the important technologies used in the consolidation process. For example, remote sensing satellite technology is used to photograph the area to be conserved, providing high-definition visual remote sensing image data of the area to be conserved for land consolidation.
[0003] However, during the continuous shooting of the remote sensing satellite over the area to be measured, weather is an extremely unstable factor, and foggy weather will greatly damage the remote sensing images. However, how to accurately identify the area affected by fog has become an urgent problem to be solved. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a data visualization analysis method, system and medium for land management. In order to achieve the above purpose, the technical solution adopted by the present invention is as follows:
[0005] In the first aspect, the present application provides a data visualization analysis method for land consolidation, the method comprising: acquiring remote sensing images in real time; preprocessing the remote sensing images into grayscale and updating the remote sensing images; dividing the remote sensing images into connected domains to obtain at least one connected domain; confirming the fog-affected area based on the grayscale value changes in gradient and edges between a connected domain and its surrounding connected domains; defogging the fog-affected area of the remote sensing image to obtain the defogged remote sensing image; and importing the defogged remote sensing image into a geographic information system for visualization analysis.
[0006] In combination with the first aspect, in a possible implementation method, the fog-affected area is confirmed based on the changes in gradient and grayscale values at the edges of a connected domain and its surrounding connected domains, including: calculating the gradient of each pixel in the connected domain; obtaining a gradient average value by performing mean calculation based on the gradient corresponding to all pixels in the connected domain; obtaining a fog diffusion direction evaluation value based on the gradient change of each pixel in the connected domain; obtaining a grayscale value difference value based on the grayscale values of the pixels located at the edge of the connected domain and its surrounding connected domains; obtaining a fog impact evaluation value based on the gradient average, the fog diffusion direction evaluation value and the grayscale value difference value; and judging whether the connected domain is a fog-affected area based on the fog impact evaluation value and a preset threshold.
[0007] In combination with the first aspect, in a possible implementation method, an evaluation value of the fog diffusion direction is calculated based on the gradient change of each pixel point in the connected domain, including: screening an anchor point in the connected domain, the value of the gradient corresponding to the anchor point is the smallest; connecting each pixel point in the connected domain with the anchor point one by one to obtain the basic direction corresponding to each pixel point; calculating the angle between the basic direction of each pixel point and the gradient of the pixel point to obtain the gradient angle corresponding to each pixel point; calculating the cosine value of each gradient angle one by one and solving the mean to obtain the evaluation value of the fog diffusion direction.
[0008] In combination with the first aspect, in a possible implementation method, a grayscale value difference value is calculated based on the grayscale values of the pixel points located at the edge of the connected domain and the connected domains around it, including: counting the number of edge pixels in the connected domain and the grayscale value of each edge pixel, the edge pixel point is a pixel point located at the edge of the connected domain, and the width of the edge of the connected domain is one pixel; counting the number of connected domains adjacent to its connected domain to obtain the number of adjacent connected domains; calculating the average grayscale value of the edge based on the grayscale value and number of the pixel points located at the edge of the connected domain; dividing the edge average grayscale value by the number of adjacent connected domains to obtain the grayscale value difference value.
[0009] In combination with the first aspect, in a possible implementation method, whether the connected domain is a fog-affected area is determined based on the fog impact evaluation value and a preset threshold, and the method also includes: calculating the grayscale value difference values and the fog impact evaluation values of the connected domain in the historical time period one by one; and correcting the fog impact evaluation value based on all the grayscale value difference values and all the fog impact evaluation values of the connected domain in the historical time period.
[0010] In combination with the first aspect, in a possible implementation method, the fog impact assessment value is corrected based on the change of the grayscale value difference value and the change of the fog impact assessment value within a historical time period, including: forming a grayscale value set and an evaluation value set based on all the grayscale value difference values and all the fog impact assessment values; performing differential processing on the grayscale value set and the evaluation value set to obtain differential results corresponding to the grayscale value set and the evaluation value set respectively; performing mean calculation on the grayscale value set and the evaluation value in combination with the corresponding differential results to obtain a grayscale difference mean and an evaluation difference mean; multiplying the grayscale difference mean and the evaluation difference mean to obtain a feature change assessment value; multiplying the feature change assessment value by the fog impact assessment value as a weight coefficient and normalizing the result to obtain the corrected fog impact assessment value.
[0011] In combination with the first aspect, in a possible implementation method, the fog-affected area of the remote sensing image is defogged to obtain the remote sensing image after defogging, including: calculating the gradient of each pixel in the connected domain; screening an anchor point in the connected domain, the value of the gradient corresponding to the anchor point is the smallest; taking the pixel to be repaired as the starting point, extending pixel by pixel toward the anchor point to obtain a line segment, the other endpoint of the line segment is an unaffected pixel, the unaffected pixel is the first pixel in the line segment that is not located in the fog-affected area, and the pixel to be repaired is any pixel in the connected domain; counting the length of the line segment, the grayscale value of the unaffected pixel, the grayscale value of the pixel to be repaired, and the corresponding gradient value; calculating a weight coefficient based on the length of the line segment and the value of the gradient corresponding to the pixel to be repaired; calculating the corresponding grayscale value of the pixel to be repaired after repair based on the grayscale value of the unaffected pixel, the grayscale value of the pixel to be repaired, and the weight coefficient; updating the remote sensing image with the corresponding grayscale value of the pixel to be repaired after repair to obtain the remote sensing image after defogging.
[0012] In combination with the first aspect, in a possible implementation method, the remote sensing image is preprocessed into grayscale, and the remote sensing image is updated, including: grayscale processing the remote sensing image according to a weighted average method to obtain a grayscale image; median filtering processing is performed on the grayscale image, and the remote sensing image is updated to the median filtering processing result.
[0013] In the second aspect, the present application also provides a data visualization analysis system for land consolidation, including: an acquisition module for acquiring remote sensing images in real time; a preprocessing module for grayscale preprocessing of remote sensing images and updating the remote sensing images; a division module for connected domain division of the remote sensing images to obtain at least one connected domain; an identification module for respectively confirming the fog-affected area based on the grayscale value and gradient changes of a connected domain and its surrounding connected domains; a correction module for defogging the fog-affected area of the remote sensing image to obtain the defogged remote sensing image; an import module for importing the defogged remote sensing image into a geographic information system for visualization analysis.
[0014] In a third aspect, the present invention further provides a medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-mentioned data visualization analysis method for land consolidation.
[0015] The present invention has the following beneficial effects:
[0016] The present invention proposes a method for identifying fog-affected areas based on image gradient features and edge differences. It can effectively distinguish between connected domains affected by fog and static fog-like performance areas that are not affected by fog. Specifically, the areas affected by fog show a gradually weakening trend in gradient, which reflects the blurring effect of fog on image gradient information. At the same time, these areas have significant differences from adjacent connected domains on the edges, and these differences may be reflected in the degree of edge blur, reduced contrast, and color distortion. By comprehensively analyzing these features, the areas affected by fog can be accurately identified. On this basis, a defogging and repair operation is further implemented to obtain a more accurate and clear defogging remote sensing image. The final defogging remote sensing image provides a solid foundation for data visualization analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic diagram of a flow chart of a data visualization analysis method for land management provided in one embodiment 1 of the present invention;
[0019] Figure 2 A schematic flow chart of step S2 provided in Example 1 of the present invention;
[0020] Figure 3 A schematic flow chart of step S3 provided in Example 1 of the present invention;
[0021] Figure 4 The grayscale histogram of the remote sensing image described in Embodiment 1 of the present invention;
[0022] Figure 5 A schematic flow chart of step S4 provided in Example 1 of the present invention;
[0023] Figure 6 A schematic flow chart of step S5 provided in Example 1 of the present invention;
[0024] Figure 7 This is a schematic diagram of the structure of the data visualization analysis system for land consolidation described in Example 2 of the present invention. DETAILED DESCRIPTION
[0025] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the data visualization analysis method, system and medium for land consolidation proposed by the present invention, its specific implementation method, structure, characteristics and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0026] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0027] Embodiment 1:
[0028] The following is a detailed description of a data visualization analysis method for land consolidation provided by the present invention in conjunction with the accompanying drawings.
[0029] See also Figure 1 , which shows a flow chart of a data visualization analysis method for land consolidation provided by an embodiment of the present invention. The figure shows that this embodiment includes steps S1 to S6.
[0030] S1. Acquire remote sensing images in real time.
[0031] It should be noted that the remote sensing image shooting object mentioned in this embodiment is the monitored land, and the specific monitoring range is determined by those skilled in the art according to actual conditions. This embodiment does not make specific restrictions on this.
[0032] At the same time, in the steps of this embodiment, the real-time acquisition of remote sensing images refers to shooting at a shooting frequency of 10 frames per second. In this way, it can be ensured that the acquired surface information has a high temporal resolution, thereby providing richer data support for subsequent analysis and processing.
[0033] In addition, those skilled in the art can also upload the remote sensing images obtained by the above shooting to a pre-set database for storage according to actual work requirements and conditions. Such operation helps to preserve these data resources and facilitates subsequent data management and analysis.
[0034] S2. Preprocess the remote sensing image into grayscale and update the remote sensing image.
[0035] In this embodiment, the acquired remote sensing image is first preprocessed by grayscale conversion to convert the original color image into a grayscale image. The grayscale conversion process involves weighted averaging of the pixel values of the three color channels of red, green, and blue (RGB) to generate a grayscale value of a single channel. This grayscale preprocessing method effectively simplifies the complexity of the image data, making the information in the image more concentrated and clear. In this way, we can effectively improve the efficiency and accuracy of subsequent image processing steps, thereby better performing image analysis and recognition tasks.
[0036] Specifically, see Figure 2 , the figure shows that the grayscale preprocessing in this step includes:
[0037] S21. Gray-scale the remote sensing image according to the weighted average method to obtain a gray-scale image.
[0038] About Weighted Average Method (WAM), this is a technique widely used in statistics and image processing. It is mainly used to smooth data or images to reduce noise or highlight important features. The core principle of weighted average method is to assign different weights to a set of values, and then calculate the weighted average based on these weights. The advantage of this method is that it can be adjusted according to the importance of each value, so as to obtain more accurate and reliable analysis results.
[0039] In this embodiment, grayscale processing refers to the process of converting a color image into a grayscale image, in which the color information of each pixel is converted into a single grayscale value. In order to achieve this conversion, a weighted average method can be used to calculate the grayscale value of each pixel. The specific calculation formula is as follows:
[0040]
[0041] in, Represents the pixel value of the red channel; Represents the pixel value of the green channel; Represents the pixel value of the blue channel.
[0042] In the above formula, the weights of the red, green and blue color channels are 0.299, 0.587 and 0.114 respectively. These weights are set according to the sensitivity of the human eye to different colors to ensure that the grayscale image can retain the visual effect of the original color image as much as possible. In this way, the weighted average method can not only effectively perform grayscale processing, but also play an important role in other aspects of image processing, such as image noise reduction, feature extraction, etc. At the same time, for those skilled in the art, about , and The coefficients may also be other constants, and no specific limitation is made in this step.
[0043] S22, performing median filtering processing on the grayscale image, and updating the remote sensing image to the median filtering processing result.
[0044] Median Filtering Method (MFM) is a denoising technique widely used in the field of image processing, especially in removing Salt-and-Pepper Noise (SPN) in images. The basic principle of this method is to select a specific window size, such as 3×3 or 5×5, and then take each pixel in the remote sensing image as the center point to build a window of neighborhood pixels around it. Next, sort all the pixel values in this window and find the value in the middle position, that is, the median. Then, use this median to replace the value of the original central pixel. In this way, the above steps are performed for each pixel in the remote sensing image, thereby effectively removing random noise in the remote sensing image, especially salt-and-pepper noise, while keeping the details of the remote sensing image from being significantly blurred. Compared with other simple smoothing filtering techniques (such as average filtering), median filtering has significant advantages in preserving edge details of remote sensing images.
[0045] S3. Divide the remote sensing image into connected domains to obtain at least one connected domain.
[0046] The purpose of this step is to classify adjacent pixels with similar grayscale values in the remote sensing image into a connected domain. This process can be achieved through a connected domain algorithm, such as the Flood Fill algorithm. In this way, each connected domain in the image can be determined, making it easier to analyze and process each connected domain separately.
[0047] In addition, in this step, the K-Means clustering algorithm can also be used to divide the connected domain. The K-Means clustering algorithm is a commonly used unsupervised learning algorithm that can divide data points into multiple clusters, so that the similarity between data points in the same cluster is high, while the similarity between data points in different clusters is low. For details, see Figure 3 , Figure 3 It is shown in FIG. 1 that this step may also include steps S31 to S34.
[0048] S31. Constructing a histogram according to the grayscale values corresponding to all pixels in the remote sensing image, wherein the abscissa of the histogram is the grayscale value, and the ordinate of the histogram is the wavelength.
[0049] S32: Count the number of peaks in the histogram.
[0050] In this step, multiple peaks (grey values with higher frequencies) can be identified by calculating gradient changes or using smoothing. These peaks represent more significant gray distribution features in the remote sensing image. Figure 4 An exemplary remote sensing image grayscale histogram is shown.
[0051] S33, using the K-Means algorithm and taking the number of peaks as the number of clusters to cluster the grayscale values in the remote sensing image, to obtain grayscale value clusters with the number of peaks.
[0052] S34, taking the pixel points corresponding to each gray value cluster as a connected domain.
[0053] In this embodiment, by constructing a histogram and identifying peaks, regions with different grayscale features in the remote sensing image can be clearly distinguished. This method helps to significantly reduce noise interference, thereby improving the clarity of the image. In addition, based on this foundation, the grayscale values are further clustered using a clustering algorithm to effectively distinguish regions with different features, thereby ensuring the accuracy of the connected domain division. This provides a solid foundation for the subsequent defogging process, making it possible to accurately locate those areas affected by fog, thereby significantly improving the effect of the defogging process.
[0054] By adopting this method, the processing and analysis capabilities of remote sensing images can be significantly improved, which not only makes the remote sensing image data obtained in the process of land consolidation more accurate and reliable.
[0055] S4. Confirm the fog-affected area according to the grayscale value changes of a connected domain and its surrounding connected domains in gradient and edge.
[0056] In this embodiment, it is considered that the topographic features in the area affected by fog are less expressed, because the presence of fog causes a layer of thick fog to cover these areas. In this case, the greater the concentration of fog, the more blurred the area affected by fog is visually. The essence of this blur is actually because the difference between pixels in the image is reduced, resulting in a more uniform grayscale value of the image. Therefore, this phenomenon is used in this embodiment to analyze whether a connected domain belongs to an area affected by fog.
[0057] Specifically, in this embodiment, Figure 5 The steps provided are to achieve the above technical effects.
[0058] S41, calculating the gradient of each pixel in the connected domain.
[0059] In this embodiment, considering that the gradient can be understood as the speed and direction of the gray value change of each pixel in the remote sensing image, it not only reveals the richness of details in the remote sensing image, but also reflects the difference relationship between pixels. This difference relationship is particularly important for remote sensing image analysis because it can help distinguish different areas and objects in the remote sensing image.
[0060] Therefore, in this embodiment, the gradient is used as a basic parameter to determine whether a connected domain is an area affected by fog. A connected domain refers to an area composed of continuous pixels in a remote sensing image, and these pixels have similar grayscale values. By analyzing the gradient information of these connected domains, it is possible to effectively identify which areas are affected by fog, so as to perform corresponding defogging processing.
[0061] The specific calculation method of the gradient is based on the prior art, so it will not be elaborated in detail in this embodiment. In short, the calculation of the gradient usually involves performing a differential operation on the image to obtain the grayscale change rate of each pixel in the horizontal and vertical directions. These change rates can be further combined into a gradient vector, thereby providing detailed information about the local features of the remote sensing image.
[0062] S42, calculating the mean value of the gradients corresponding to all the pixels in the connected domain to obtain the average value of the gradients .
[0063] It should be noted that the method for calculating the average gradient value is an existing technology and will not be described in detail in this step. In this embodiment, the average gradient value can comprehensively represent the degree of uniformity of the grayscale value inside a connected domain, that is, the degree of regional fuzziness.
[0064] S43, calculating the fog diffusion direction evaluation value based on the gradient change of each pixel point in the connected domain .
[0065] In this embodiment, the diffusion direction of the fog is further considered. The diffusion direction is shown as gradually weakening from the high-concentration area to the surroundings. In areas with higher fog concentration, due to the higher fog concentration, the difference between the pixels in the image is smaller, so that the gradient values of these areas are relatively low, showing a higher degree of blur. Conversely, in areas with lower fog concentration, the difference between the pixels is larger, so the gradient values of these areas are relatively high, and the clarity of the image is also better. The diffusion law of fog is a diffusion method that gradually weakens from the high-concentration area to the surroundings, which is consistent with the formation and dissipation process of fog in natural phenomena. Therefore, the calculation method of the fog diffusion direction evaluation value in this step can refer to steps S431-S434.
[0066] S431. Screening an anchor point in the connected domain, wherein the value of the gradient corresponding to the anchor point is the smallest.
[0067] S432, connecting each pixel point in the connected domain with the anchor point one by one to obtain a basic direction corresponding to each pixel point.
[0068] S433, respectively calculating the angle between the base direction of each pixel and the gradient of the pixel to obtain the gradient angle corresponding to each pixel.
[0069] S434, calculate the cosine value of each gradient angle one by one and solve the mean to obtain the fog diffusion direction evaluation value .
[0070] S44, calculating the gray value difference value based on the gray value of the pixel point located at the edge of the connected domain and the gray value of the surrounding connected domain .
[0071] By analyzing the angle between the gradient and the basic direction in the above steps, the diffusion direction of the fog can be evaluated more accurately, thereby improving the accuracy of fog recognition.
[0072] In this embodiment, it is taken into account that when a connected domain is affected by fog, if the surrounding landform area behaves normally, the difference between the connected domain and other surrounding connected domains will become very obvious. Specifically, due to the influence of fog, the image features of the connected domain will be greatly different from the image features of the surrounding landform area. At the same time, the connected domains between the surrounding landform areas are less different from each other, because they are not affected by fog, so the image features are relatively consistent. In this case, the number of connected domains affected by fog and its adjacent connected domains is small, and the grayscale value difference between these adjacent connected domains is large. This phenomenon can be detected and identified by image processing technology, so as to effectively identify the area affected by fog. Therefore, based on the above analysis, the grayscale value difference value calculation method in this embodiment can refer to steps S441-step S444.
[0073] S441. Count the number of edge pixels in the connected domain and the grayscale value of each edge pixel, wherein the edge pixel is a pixel located at the edge of the connected domain, and the width of the edge of the connected domain is one pixel.
[0074] S442. Count the number of connected domains adjacent to the connected domain to obtain the number of adjacent connected domains.
[0075] S443, performing mean calculation based on the grayscale values and number of pixel points located at the edge in the connected domain to obtain an average grayscale value of the edge.
[0076] S444: Divide the average gray value of the edge by the number of adjacent connected domains to obtain a gray value difference value .
[0077] In the process of executing the above steps, the grayscale values of edge pixels are statistically analyzed and the number of edge pixels is accurately calculated to achieve a detailed analysis of the edge features of the connected domain. This method can more accurately describe the relationship between the connected domain and its surrounding adjacent connected domains, thereby helping to improve the accuracy of grayscale value difference calculation, thereby ensuring the reliability and accuracy of image processing and analysis results.
[0078] S45. Calculate a fog impact evaluation value based on the gradient average value, the fog diffusion direction evaluation value and the gray value difference value.
[0079] In this embodiment, the calculation formula of the fog impact assessment value is:
[0080]
[0081] in: Indicates the fog impact assessment value; Indicates the evaluation value of fog diffusion direction; Indicates the gray value difference; represents the average gradient.
[0082] It should be noted that in order to ensure that the calculation results are meaningful, when performing fractional operations in the embodiments of the present invention, when the denominator is 0, it is necessary to add a parameter adjustment factor greater than 0 to the denominator to prevent the denominator from being 0. The value of the parameter adjustment factor is set by the implementer according to actual conditions, and this application does not impose any special restrictions.
[0083] In the above calculation formula, The gradient average also reflects the internal blurriness of a connected domain. The smaller the value, the greater the blurriness, and the more likely the connected domain is to be affected by fog. The fog diffusion direction evaluation value also reflects the degree to which a connected domain conforms to the fog diffusion law. The larger the value, the more it conforms to the fog diffusion law and the more likely it is to be affected by fog. The grayscale value difference also reflects the degree of difference between a connected domain and its surrounding connected domains. The larger the value, the greater the difference between the connected domain and its surrounding areas, and the more likely it is to be affected by fog.
[0084] In summary, the fog impact assessment value It can effectively evaluate whether a connected domain is affected by fog in many aspects. The larger the value, the more likely the connected domain to be evaluated is to be affected by fog.
[0085] However, when locating the area affected by fog, it is not comprehensive enough to simply rely on the characteristics of high and single internal grayscale values in the image that are significantly different from the surroundings. This is because, in addition to the area affected by fog, certain specific geomorphic features, such as lakes and ponds, will also show similar grayscale characteristics in the image. Therefore, although these characteristic conditions can be used as a necessary condition for judging the area affected by fog, they are not sufficient conditions. In order to more accurately identify the image area affected by fog, further judgment and analysis are required.
[0086] In this embodiment, it is taken into account that the temporal changes of heavy fog are more random and obvious than those of lake landforms. Fog usually shows dynamic changes such as movement, convergence or dispersion, while lakes are relatively stable and do not undergo drastic temporal changes. Based on this feature, further distinction can be made by analyzing the degree of change in the state of the connected domain in the remote sensing image sequence. By comparing the changes in the connected domain in the current image with the previous multiple remote sensing images, it is possible to more accurately determine which areas show high gray values and single features due to the influence of fog, thereby effectively identifying the areas affected by fog. This method not only improves the accuracy of positioning, but also can better eliminate the interference of other landform features and ensure the reliability of the results. Therefore, in this embodiment, steps S46 and S47 are also included.
[0087] S46, calculating the grayscale value difference value and the fog impact assessment value of the connected domain in the historical time period one by one.
[0088] In this embodiment, the object of analysis is fog, and its change process is relatively slow. Therefore, the historical time period selected in this embodiment should have a larger time span than the shooting frequency. Based on this, the historical time period in this embodiment is defined as a historical remote sensing image sequence taken within 2 minutes. Specifically, in this embodiment, the historical time period contains 1,200 remote sensing images. By calculating the pixel coordinates corresponding to each connected domain at the current moment, the grayscale value difference and the fog impact assessment value in each remote sensing image are obtained respectively, so as to analyze the temporal change characteristics of a specific connected domain in the remote sensing image at the current moment.
[0089] S47: Correct the fog impact assessment value based on all the grayscale value difference values and all the fog impact assessment values of the connected domain within a historical time period.
[0090] Specifically, in this embodiment, step S47 includes steps S471 to S475.
[0091] S471. Construct a grayscale value set and an evaluation value set based on all the grayscale value difference values and all the fog impact evaluation values.
[0092] That is, according to the calculation result of step S46, two sets can be obtained in this embodiment, namely and , wherein, in this embodiment .
[0093] S472, performing differential processing on the grayscale value set and the evaluation value set respectively to obtain differential results corresponding to the grayscale value set and the evaluation value set, respectively, recorded as and .
[0094] S473, respectively calculate the mean of the gray value set and the evaluation value combined with the corresponding difference results to obtain a gray difference mean and evaluate the mean difference .
[0095] S474: Multiply the grayscale difference mean and the evaluation difference mean to obtain a feature change evaluation value. .
[0096] S475: multiply the fog impact assessment value by the feature change assessment value as a weight coefficient and perform normalization processing to obtain a corrected fog impact assessment value.
[0097] In this embodiment, it is considered that the time series of the fog-affected area is more random than that of the lake landform, while the time series of the lake landform is relatively stable. The larger the value of the fog is, the greater the fog impact assessment value is. Therefore, the fog impact assessment value is corrected. The corrected fog impact assessment value calculation formula is as follows:
[0098]
[0099] in: represents the fog impact assessment value of a connected domain after correction; represents the fog impact assessment value of the connected domain before correction; is the characteristic change evaluation value of the estimated connected domain over a period of time; Represents an S-shaped growth curve, which has the characteristic of monotonically increasing and maps the input value to the interval (0,1).
[0100] S48. Determine whether the connected domain is an area affected by fog based on the fog impact assessment value and a preset threshold.
[0101] In summary, in this embodiment, if a connected domain The larger the value of is, the more likely the connected domain is to belong to the fog-affected area. Make auxiliary judgment. , it can be considered that the connected domain belongs to the area affected by fog, and further defogging operation needs to be performed on the connected domain. Otherwise, it is considered that the connected domain is not affected by fog and no operation is performed.
[0102] S5. Defogging the fog-affected area of the remote sensing image to obtain the defogged remote sensing image.
[0103] In this embodiment, the reference value of the grayscale value inside the fog-affected area is low because it is covered by fog. The greater the fog concentration, the lower the reference value. The surrounding areas that are not affected by fog are likely to have the same landform performance as the fog-affected area, and have a higher reference value. Therefore, the fog-affected area can be repaired according to the degree of fog influence inside the fog-affected area and the performance of the surrounding unaffected areas. For details, see Figure 6 , the figure shows that this step also includes steps S51 to S55.
[0104] S51. Taking the pixel to be repaired as the starting point, extend pixel by pixel toward the anchor point to obtain a line segment, wherein the other endpoint of the line segment is an unaffected pixel, and the unaffected pixel is the first pixel in the line segment that is not located in the area affected by fog. The pixel to be repaired is any pixel in the connected domain.
[0105] It should be noted that the anchor point mentioned in this step can be confirmed in step S431.
[0106] S52: Count the length of the line segment , the gray value of the unaffected pixel , the gray value of the pixel to be repaired and the corresponding gradient value .
[0107] It should be noted that the gradient value corresponding to the pixel to be repaired mentioned in this step can be calculated in step S41.
[0108] S53: Calculate a weight coefficient based on the length of the line segment and the value of the gradient corresponding to the pixel to be repaired. .
[0109] In this embodiment, the weight coefficient calculation formula is as follows:
[0110]
[0111] in: Indicates the weight coefficient corresponding to the pixel to be repaired; represents the maximum-minimum normalized function; Indicates the distance between the pixel to be repaired and the nearest pixel not affected by fog; Indicates the gradient value of the pixel to be repaired.
[0112] In the above calculation formula, The gradient value at the pixel to be repaired can represent the blurriness of the pixel to be repaired, that is, the degree to which the pixel is affected by fog. The larger the value, the The smaller the value, the lower the reference value of the pixel to be repaired. It can represent the distance between the pixel to be repaired and the nearest pixel not affected by fog. The smaller the value, the The smaller the value, the greater the reference value of the unaffected pixel, and correspondingly, the lower the reference value of the pixel to be repaired. Comprehensively represents the weight quantization value of the pixel to be repaired.
[0113] S54, calculating the repaired grayscale value of the pixel to be repaired based on the grayscale value of the unaffected pixel, the grayscale value of the pixel to be repaired and the weight coefficient.
[0114] The grayscale value of the pixel to be repaired in this step is calculated as follows:
[0115]
[0116] in: Indicates the grayscale value of the pixel to be repaired after repair; Indicates the weight coefficient corresponding to the pixel to be repaired; Represents the gray value of the pixel to be repaired; Represents the grayscale value of unaffected pixels.
[0117] In the above calculation formula, this step assigns weight coefficients to the grayscale values corresponding to the pixels to be repaired. , and the weight quantization value of the nearest unaffected pixel is , so as to achieve the repair operation on each pixel.
[0118] S55, updating the remote sensing image with the grayscale value after restoration corresponding to the pixel point to be restored, to obtain the remote sensing image after defogging.
[0119] That is, in this embodiment, by performing the repair operation such as step S51 to step S54 on each pixel point in the remote sensing image, the remote sensing image after defogging is finally obtained.
[0120] S6. Importing the defogging remote sensing image into a geographic information system for visualization analysis.
[0121] In this embodiment, the defogging remote sensing image is imported into a geographic information system (GIS) for more intuitive and detailed visualization analysis and display. Through the application of GIS, the processed remote sensing image can be effectively combined with other geographic data to achieve a more comprehensive and in-depth comprehensive analysis and display effect. As for the specific import method and steps, since these technologies are existing technologies, they will not be described in detail in this embodiment.
[0122] Embodiment 2:
[0123] like Figure 7 As shown, this embodiment provides a data visualization analysis system for land management, the system comprising:
[0124] The acquisition module is used to acquire remote sensing images in real time.
[0125] The preprocessing module is used to perform grayscale preprocessing on the remote sensing image and update the remote sensing image.
[0126] The module partitioning block is used to perform connected domain partitioning on the remote sensing image to obtain at least one connected domain.
[0127] The identification module is used to identify the fog-affected area based on the grayscale value and gradient changes of a connected domain and its surrounding connected domains.
[0128] The correction module is used to perform defogging on the fog-affected area of the remote sensing image to obtain the defogged remote sensing image.
[0129] The import module is used to import the defogging remote sensing image into a geographic information system for visual analysis.
[0130] It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0131] Embodiment 3:
[0132] Corresponding to the above method embodiment, a medium is also provided in this embodiment. The medium described below and the data visualization analysis method for land consolidation described above can refer to each other.
[0133] A medium, also called a readable storage medium, stores a computer program, which, when executed by a processor, implements the steps of the data visualization analysis method for land management in the above method embodiment.
[0134] The readable storage medium may specifically be a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other readable storage medium that can store program codes.
[0135] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0136] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A data visualization analysis method for land management, characterized in that: The method comprises: Real-time acquisition of remote sensing images; Performing grayscale preprocessing on the remote sensing image, and updating the remote sensing image; Performing connected domain division on the remote sensing image to obtain at least one connected domain; The fog-affected area is confirmed based on the grayscale value changes of a connected domain and its surrounding connected domains in gradient and edge; Defogging the fog-affected area of the remote sensing image to obtain the defogged remote sensing image; Importing the defogging remote sensing image into a geographic information system for visual analysis; The fog-affected area is confirmed based on the grayscale value changes of a connected domain and its surrounding connected domains in gradient and edge, including: Calculate the gradient of each pixel in the connected domain; The average value of the gradient is obtained by performing mean calculation based on the gradients corresponding to all the pixels in the connected domain; The fog diffusion direction evaluation value is calculated based on the gradient change of each pixel point in the connected domain; A gray value difference value is calculated based on the gray value of the pixel point located at the edge of the connected domain and the surrounding connected domain; A fog impact evaluation value is calculated based on the gradient average value, the fog diffusion direction evaluation value and the gray value difference value; Determining whether the connected domain is an area affected by fog according to the fog impact assessment value and a preset threshold; Grayscale preprocessing is performed on the remote sensing image, and the remote sensing image is updated, including: The remote sensing image is grayed out according to the weighted average method to obtain a grayed out image; Performing median filtering on the grayscale image, and updating the remote sensing image to the median filtering result; The fog diffusion direction evaluation value is calculated based on the gradient change of each pixel point in the connected domain, including: Anchor points are obtained by screening in the connected domain, and the value of the gradient corresponding to the anchor point is the smallest; Connecting each pixel point in the connected domain with the anchor point one by one to obtain a basic direction corresponding to each pixel point; Calculate the angle between the base direction of each pixel and the gradient of the pixel to obtain the gradient angle corresponding to each pixel; The cosine value of each gradient angle is calculated one by one and the mean is solved to obtain the evaluation value of the fog diffusion direction.
2. The data visualization analysis method for land management according to claim 1 is characterized in that: The gray value difference value is calculated based on the gray value of the pixel point located at the edge of the connected domain and the surrounding connected domain, including: Counting the number of edge pixels in the connected domain and the grayscale value of each edge pixel, wherein the edge pixel is a pixel located at the edge of the connected domain, and the width of the edge of the connected domain is one pixel; Count the number of connected domains adjacent to its connected domain to obtain the number of adjacent connected domains; The average gray value of the edge is obtained by performing mean calculation based on the gray value and number of the pixel points located at the edge in the connected domain; The gray value difference value is obtained by dividing the average gray value of the edge by the number of adjacent connected domains.
3. The data visualization analysis method for land management according to claim 1 is characterized in that: According to the fog impact assessment value and the preset threshold, it is determined whether the connected domain is an area affected by fog, and the fog also includes: Calculate the gray value difference value and fog impact assessment value of the connected domain in the historical time period one by one; The fog impact assessment value is corrected based on all the gray value difference values and all the fog impact assessment values of the connected domain within a historical time period.
4. The data visualization analysis method for land management according to claim 3 is characterized in that: The method of correcting the fog impact assessment value based on the change of the gray value difference value and the change of the fog impact assessment value in a historical time period includes: Based on all the gray value difference values and all the fog impact evaluation values, a gray value set and an evaluation value set are respectively formed; Performing differential processing on the grayscale value set and the evaluation value set respectively to obtain differential results corresponding to the grayscale value set and the evaluation value set respectively; Calculating the mean of the grayscale value set and the evaluation value in combination with the corresponding difference results to obtain a grayscale difference mean and an evaluation difference mean; Multiplying the grayscale difference mean and the evaluation difference mean to obtain a feature change evaluation value; The characteristic change evaluation value is used as a weight coefficient to multiply the fog impact evaluation value and normalize the result to obtain the corrected fog impact evaluation value.
5. The data visualization analysis method for land management according to claim 1 is characterized in that: Defogging the fog-affected area of the remote sensing image to obtain the defogged remote sensing image, comprising: Calculate the gradient of each pixel in the connected domain; Anchor points are obtained by screening in the connected domain, and the value of the gradient corresponding to the anchor point is the smallest; Taking the pixel to be repaired as the starting point, a line segment is extended pixel by pixel toward the anchor point, wherein the other end point of the line segment is an unaffected pixel, and the unaffected pixel is the first pixel in the line segment that is not located in the fog-affected area, and the pixel to be repaired is any pixel in the connected domain; Counting the length of the line segment, the grayscale value of the unaffected pixel, the grayscale value of the pixel to be repaired, and the corresponding gradient value; A weight coefficient is calculated based on the length of the line segment and the value of the gradient corresponding to the pixel to be repaired; The grayscale value of the pixel to be repaired is calculated based on the grayscale value of the unaffected pixel, the grayscale value of the pixel to be repaired and the weight coefficient; The remote sensing image is updated with the grayscale value after restoration corresponding to the pixel point to be restored, so as to obtain the remote sensing image after defogging.
6. A data visualization analysis system for land management, characterized in that: include: An acquisition module is used to acquire remote sensing images in real time; A preprocessing module, used for preprocessing the remote sensing image into grayscale and updating the remote sensing image; A module partitioning block is used to perform connected domain partitioning on the remote sensing image to obtain at least one connected domain; A recognition module is used to identify the fog-affected area based on the grayscale value and gradient changes of a connected domain and its surrounding connected domains; A correction module, used for performing defogging processing on the fog-affected area of the remote sensing image to obtain the defogged remote sensing image; An import module, used for importing the defogging remote sensing image into a geographic information system for visual analysis; The fog-affected area is confirmed based on the grayscale value changes of a connected domain and its surrounding connected domains in gradient and edge, including: Calculate the gradient of each pixel in the connected domain; The average value of the gradient is obtained by performing mean calculation based on the gradients corresponding to all the pixels in the connected domain; The fog diffusion direction evaluation value is calculated based on the gradient change of each pixel point in the connected domain; A gray value difference value is calculated based on the gray value of the pixel point located at the edge of the connected domain and the surrounding connected domain; A fog impact evaluation value is calculated based on the gradient average value, the fog diffusion direction evaluation value and the gray value difference value; Determining whether the connected domain is an area affected by fog according to the fog impact assessment value and a preset threshold; Grayscale preprocessing is performed on the remote sensing image, and the remote sensing image is updated, including: The remote sensing image is grayed out according to the weighted average method to obtain a grayed out image; Performing median filtering on the grayscale image, and updating the remote sensing image to the median filtering result; Grayscale preprocessing is performed on the remote sensing image, and the remote sensing image is updated, including: The remote sensing image is grayed out according to the weighted average method to obtain a grayed out image; Performing median filtering on the grayscale image, and updating the remote sensing image to the median filtering result; The fog diffusion direction evaluation value is calculated based on the gradient change of each pixel point in the connected domain, including: Anchor points are obtained by screening in the connected domain, and the value of the gradient corresponding to the anchor point is the smallest; Connecting each pixel point in the connected domain with the anchor point one by one to obtain a basic direction corresponding to each pixel point; Calculate the angle between the base direction of each pixel and the gradient of the pixel to obtain the gradient angle corresponding to each pixel; The cosine value of each gradient angle is calculated one by one and the mean is solved to obtain the evaluation value of the fog diffusion direction.
7. A medium, characterized in that The medium stores a computer program, which, when executed by a processor, implements the steps of the data visualization analysis method for land consolidation as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Apparatus, method, and image processing device for smoke detection
CN108140291A
Image defogging method based on deep semantic segmentation
CN110766640A