Remote sensing image defogging processing method and device based on distributed computing
By employing distributed computing and block processing technologies, the problem of low efficiency in remote sensing image dehazing has been solved, achieving efficient and accurate dehazing results and improving the clarity and usability of remote sensing images.
Patent Information
- Application Number
- CN202511460951.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-10-14
AI Technical Summary
Existing methods for dehazing remote sensing images are computationally inefficient, time-consuming, and require a large amount of computing resources. Furthermore, deep learning models lack transparency and are difficult to meet the processing needs of large-scale remote sensing images.
A distributed computing environment is used to process remote sensing images in blocks. Through techniques such as downsampling, mask generation, dark channel calculation, and weighted guided filtering, combined with the Dehaze dehazing function, pixel-by-pixel adjustments are made to generate high-quality dehazed images.
It significantly improves the processing efficiency and quality of large-scale remote sensing image data, ensures high definition and accuracy of processed images, and reduces the demand for computing resources.
Smart Images

Figure CN120953134A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of digital image processing and geospatial data analysis, and in particular to a method and apparatus for dehazing remote sensing images based on distributed computing. Background Technology
[0002] Remote sensing imagery has significant applications in various fields such as environmental monitoring, agriculture, and urban planning. However, atmospheric pollutants such as fog and dust often exist, affecting the quality of remote sensing images and reducing their contrast and color fidelity. Remote sensing image defogging technology is needed to eliminate the impact of these pollutants on image quality, thereby restoring the clarity and original colors of the images.
[0003] Current dehazing methods typically process the entire remote sensing image as a whole, resulting in large amounts of data computation and processing, leading to slow processing speed and reduced efficiency. With the development of remote sensing technology and the continuous increase in data volume, this processing method can no longer meet the needs of modern remote sensing applications. Traditional dehazing methods face the dual challenges of computational efficiency and processing quality when processing large-scale remote sensing images.
[0004] Existing technologies disclose a method and system for removing haze from hyperspectral images. This method primarily involves convolutional processing of long-wavelength bands in the hyperspectral image and residual calculation of image features to convert dehazing features into a dehazed image, thus achieving haze removal from the hyperspectral image. However, dehazing algorithms using convolutional networks require a large amount of labeled data for training, which is time-consuming and expensive. Secondly, training and inference of deep learning models typically require high computational resources. Furthermore, the decision-making process of deep learning models lacks transparency, resulting in poor interpretability. Summary of the Invention
[0005] This application provides a remote sensing image dehazing method and apparatus based on distributed computing, solving the problems of complex dehazing processes for remote sensing images in existing technologies, which require significant computation time and resources. The method fully utilizes the advantages of distributed computing, significantly improves the processing efficiency of large-scale remote sensing image data, and ensures high quality and accuracy of the processed images.
[0006] In a first aspect, embodiments of this application provide a remote sensing image dehazing method based on distributed computing, comprising: initializing a distributed computing environment and reading remote sensing images in blocks to obtain raw tile data; acquiring metadata information of the remote sensing image, reorganizing the layout of the raw tile data based on the metadata information to obtain block tile data; determining the block metadata information of the block tile data, performing downsampling processing on the block tile data to obtain downsampled tile data, and determining its mask; determining the dark channel based on the RGB channel values of the block tile data; updating the values at corresponding positions in the dark channel based on the mask values, and performing an erosion operation on the updated dark channel to obtain eroded block tile data, and determining its atmospheric light value; normalizing the downsampled tile data, determining its ratio to the atmospheric light value of the corresponding channel, and updating the pixel values of the downsampled tile data based on the ratio to obtain... The process involves updating the segmented tile data; performing an erosion operation on the updated segmented tile data to obtain the updated dark channel, and initializing the atmospheric transmission result based on the updated dark channel; merging the channels of the downsampled tile data and converting them into grayscale images to obtain a merged grayscale image; performing weighted guided filtering processing on the atmospheric transmission result and the merged grayscale image to obtain a weighted guided filtering result; creating an identification mask based on the weighted guided filtering result to identify invalid pixels and marking the invalid pixels in the identification mask; performing pixel-by-pixel adjustment on the images of each channel of the downsampled tile data using the Dehaze dehazing function to perform dehazing calculations to obtain an initial dehazed image; setting the positions in the initial dehazed image corresponding to the invalid pixels in the identification mask to invalid values to obtain a dehazed image; and upsampling the dehazed image to the original resolution to obtain the dehazed remote sensing image.
[0007] In conjunction with the first aspect, in one possible implementation, the step of reading the remote sensing image in blocks to obtain raw tile data includes: setting a maximum tile size and defining the size of a slicing window according to it; and slicing the remote sensing image into raw tile data that conforms to the maximum tile size according to the slicing window.
[0008] In conjunction with the first aspect, in the second possible implementation, the step of reorganizing the layout of the original tile data based on the metadata information to obtain segmented tile data includes: iteratively calculating the geographic boundary of each original tile data based on the metadata information, and merging the geographic boundaries through a reduce function to obtain a merged boundary; determining the overall range of the remote sensing image; and setting the spatial limit of the merged boundary according to the overall range to obtain the segmented tile data.
[0009] In conjunction with the first aspect, in a third possible implementation, determining the atmospheric light value includes: calculating a histogram of the corroded tile data and determining a threshold based on the histogram; and determining the atmospheric light value of the corroded tile data based on the threshold.
[0010] In conjunction with the third possible implementation of the first aspect, in the fourth possible implementation, determining the threshold based on the histogram includes: performing a reverse iteration step on the histogram; the reverse iteration step includes: iterating the histogram in reverse order and accumulating the iteration results to obtain an accumulated value; if the number of valid items in the mask is less than the accumulated value, then the reverse iteration step is performed; otherwise, the reverse iteration step is exited, and the threshold is determined; wherein, the threshold is as follows: Where thres represents the threshold, and i represents the number of iterations in the reverse iteration step.
[0011] In conjunction with the third possible implementation of the first aspect, in the fifth possible implementation, determining the atmospheric light value of the eroded tile data based on the threshold includes: performing a mask determination step, and determining the atmospheric light value based on the dark channel value output in the mask determination step; the mask determination step includes: determining whether the mask value at the corresponding pixel position of the eroded tile data is 1; if the mask value at the corresponding pixel position of the eroded tile data is 1, then determining whether the dark channel value at that pixel position is greater than the threshold; if the dark channel value at that pixel position is greater than the threshold, then outputting the dark channel value at that pixel position; otherwise, performing the mask determination step based on the next eroded tile data, until all eroded tile data has been traversed; if the mask value at the corresponding pixel position of the eroded tile data is not 1, then performing the mask determination step based on the next eroded tile data, until all eroded tile data has been traversed.
[0012] In conjunction with the first aspect, in the sixth possible implementation, before performing the erosion operation on the updated dark channel, the method further includes: determining the boundary expansion range, and expanding the boundary of the downsampled tile data based on the boundary expansion range.
[0013] Secondly, embodiments of this application provide a remote sensing image dehazing processing device based on distributed computing, comprising: a block reading module, used to read remote sensing images in blocks and reorganize the block reading results based on the metadata information of the remote sensing images to obtain block tile data; a dehazing preprocessing module, used to perform downsampling, mask generation, dark channel generation, histogram and atmospheric light value calculation, normalization processing and weighted filtering guidance processing on the block tile data, and output downsampled data; and a dehazing calculation module, used to perform dehazing calculation on the downsampled data output by the dehazing preprocessing module and upsample it to the original resolution to obtain the dehazed remote sensing image.
[0014] Thirdly, embodiments of this application provide an apparatus for executing the remote sensing image dehazing processing method based on distributed computing, comprising: a processor; a memory for storing processor-executable instructions; wherein, when the processor executes the executable instructions, it implements the remote sensing image dehazing processing method based on distributed computing as described in the first aspect or any possible implementation of the first aspect.
[0015] Fourthly, embodiments of this application provide a non-volatile computer-readable storage medium, including a computer program or instructions for storing a computer program or instructions that, when executed, enable the remote sensing image dehazing method based on distributed computing as described in the first aspect or any one of the first aspects to be implemented.
[0016] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: This application employs a distributed computing environment for parallel processing of remote sensing images. Then, through spatial analysis and processing techniques, the remote sensing images are read in blocks. The block-based data is then subjected to downsampling, mask and dark channel determination, erosion, and weighted guided filtering to generate a dehazed remote sensing image. This effectively solves the problems of low efficiency, long processing time, and low transparency in traditional remote sensing image dehazing techniques. It achieves rapid processing of large amounts of remote sensing image data and effectively removes haze, improving the clarity and usability of remote sensing images. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1A flowchart illustrating a remote sensing image dehazing method based on distributed computing, provided for an embodiment of this application; Figure 2 Another flowchart of a remote sensing image dehazing method based on distributed computing provided in an embodiment of this application; Figure 3 A flowchart for calculating the threshold of a histogram provided in an embodiment of this application; Figure 4 A flowchart for determining atmospheric light values of corroded tile data based on threshold values, provided for embodiments of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0020] Figure 1 A flowchart illustrating a remote sensing image dehazing method based on distributed computing, as provided in this application embodiment, is shown below. Figure 1 As shown, the remote sensing image dehazing method based on distributed computing includes: Step 101: Initialize the distributed computing environment and read remote sensing images in blocks to obtain raw tile data.
[0021] For example, a distributed computing environment is initialized through SparkSession, and remote sensing images are read in chunks using Geotrellis' hadoopMultibandGeoTiffRDD, which divides them into raw tile data that can be processed in parallel.
[0022] SparkSession serves as the sole entry point for the Spark big data processing engine. It encapsulates Spark's functionality, enabling developers to utilize various Spark features through a unified interface. Once a SparkSession is created, various operations such as loading and transforming data can be performed based on it.
[0023] Geotrellis, a library and framework that runs on Spark, provides geospatial analysis tools that make it easier for developers to process and analyze spatial data.
[0024] hadoopMultibandGeoTiffRDD is a function in the Geotrellis library used to read GeoTiff files from the Hadoop Distributed File System or a compatible storage system in a Spark environment and convert them into raw Spark tile data.
[0025] On the other hand, by combining Geotrellis with Spark, remote sensing images are read in chunks, and their return values are converted into raw tile data.
[0026] It's important to note that the raw tile data can be organized into a Resilient Distributed Dataset (RDD) [ProjectedExtent, MultibandTile], containing a series of key-value pairs. In this RDD, each key is a ProjectedExtent object, and each value is a MultibandTile object. The RDD leverages Spark's parallel processing capabilities to rapidly process large-scale geospatial data and combines it with the rich geospatial analysis tools provided by GeoTrellis for complex geospatial analysis.
[0027] For example, when reading remote sensing images in blocks, it is also necessary to set the maximum tile size and define the size of the slice window for the remote sensing image according to the maximum tile size. Based on the size of the slice window, the remote sensing image is divided into raw tile data that conforms to the maximum tile size.
[0028] Step 102: Obtain metadata information of remote sensing imagery, and reorganize the layout of the original tile data based on the metadata information to obtain block tile data.
[0029] In this embodiment of the application, the metadata information of the remote sensing image is obtained through the open-source GDAL library (Geospatial Data Abstraction Library).
[0030] GDAL (Geospatial Data Abstraction Library) is an open-source raster spatial data transformation library that is widely used for reading, writing, and processing various geospatial data formats.
[0031] The metadata information includes the width, height, pixel value, and boundaries of the remote sensing image.
[0032] Specifically, the geographic boundaries of each original tile data are iteratively calculated based on the metadata information of the remote sensing image, and the geographic boundaries after iterative calculation are merged through the reduce function to obtain the merged boundary.
[0033] The overall extent of the remote sensing image is determined by the layout definition function, and spatial limits are set on the merging boundary based on the overall extent to obtain the tile data.
[0034] In tile data, the geographic extent is the geographic region or spatial range represented by each tile. In tile map services, the map is divided into multiple tiles of fixed size, each tile covering a small part of the Earth's surface. These tiles are organized according to a certain hierarchy. The higher the hierarchy, the smaller the geographic extent represented by the tile and the richer the details of the tile.
[0035] Step 103: Determine the block metadata information of the block tile data, perform downsampling processing on the block tile data to obtain downsampled tile data, and determine its mask.
[0036] In this embodiment of the application, after multiple debugging sessions, the downsampling coefficient was set to 4, and a block index SpatialKey was constructed based on the boundary information of the block tile data.
[0037] It should be noted that after obtaining the downsampled tile data, the process also includes boundary augmentation of the downsampled tile data, specifically: The extent of the boundary expansion is determined, and the downsampled tile data is expanded based on this extent. For example, the expansion extent is 30 pixel values. The purpose of the expansion is to reduce image distortion caused by edge issues in subsequent operations.
[0038] After the boundary is expanded, the mask is calculated. The calculation logic of the mask is: if the pixel value in any channel of the downsampled tile data is 0, then the value at the corresponding mask should also be set to 0; otherwise, it should be set to 1.
[0039] Specifically, the principle of mask calculation is as follows: 0 represents nodata, an invalid value. When calculating the dark channel later, the RGB channels need to have values. Therefore, the corresponding position in the mask should be set to 0, indicating that the position is invalid in subsequent calculations. If the RGB channels have values, the corresponding position in the mask should be set to 1, indicating that the position is valid in subsequent calculations.
[0040] Step 104: Determine the dark channel based on the RGB channel values of the tile data.
[0041] A dark channel is created based on the minimum value in the RGB channels of the tile data.
[0042] Step 105: Update the value at the corresponding position in the dark channel according to the mask value, and perform an erosion operation on the updated dark channel to obtain eroded tile data and determine its atmospheric light value.
[0043] The specific process of updating the value at the corresponding position in the dark channel based on the mask value is as follows: Based on the location where the mask value is 0, the relative position value of the dark channel is set to the maximum value of 1; otherwise, it remains unchanged at the minimum value. The purpose is to prevent subsequent etch operations from being affected by invalid values at the mask boundaries.
[0044] In this embodiment, the calculation logic of the erosion operation is to create an erosion kernel of a specified size of 41×41, and then perform an erosion operation on the dark channel by calling the Imgproc.erode function in the OpenCV library to enhance the dark areas. The values of the positions in the dark channel corresponding to a mask value of 1 are then set back to 0, restoring the effective area of the mask. The purpose is that the erosion operation may affect the pixel values of the effective area. Through step 105, it can be ensured that only the dark areas in the dark channel (areas with a mask value of 1) are preserved, while other areas are unaffected by the erosion operation.
[0045] For example, the process for determining atmospheric light values is as follows: The histogram of the eroded tile data is calculated using the `Imgproc.calcHist` function from the OpenCV library. The histogram is calculated by passing a series of values, including the eroded dark channel, mask, an initial size of 1001 bins, and a pixel value range of 0 to 1.001. A threshold is then determined based on the histogram, and the atmospheric light value of the eroded tile data is determined based on this threshold.
[0046] On the one hand, the threshold is determined based on the histogram, such as Figure 3 As shown, it includes: Perform a reverse iteration step on the histogram to obtain the threshold thres. The reverse iteration step includes: The histogram is iterated in reverse order, and the iteration results are accumulated to obtain the accumulated value count.
[0047] Determine if the number of valid elements in the mask, num, is less than the accumulated value, count. If count ≥ num, that is, the number of valid elements in the mask, num, is less than the accumulated value, count, then exit the current iteration and calculate the threshold, thres.
[0048] .
[0049] Where thres represents the threshold, and i represents the number of iterations in the reverse iteration step.
[0050] If the number of valid items in the mask, num, is not less than (i.e., greater than or equal to) the accumulated value, count, then continue to execute the reverse iteration steps.
[0051] On the other hand, atmospheric light values of corroded tile data are determined based on thresholds, such as... Figure 4 As shown, it includes: Perform a mask determination step, and based on the output of the mask determination step (dark channel value), determine the atmospheric light value of the etched tile data. The mask determination step includes: Determine if the mask value at the pixel location corresponding to the eroded tile data is 1. If so, determine if the dark channel value at that pixel location is greater than a threshold.
[0052] If the value of the dark channel is greater than the threshold, the value of the dark channel at that pixel position is output; if the value of the dark channel is not greater than (i.e. less than or equal to) the threshold, the mask judgment step is performed based on the next eroded tile data until the eroded tile data has been traversed.
[0053] If the mask value at the pixel position corresponding to the eroded tile data is not 1, then the mask judgment step is performed based on the next eroded tile data until all eroded tile data has been traversed.
[0054] For example, calculating etched tile data using a threshold requires two conditions: first, the mask value at the same location must be 1; second, the dark channel value at the same location must be greater than the threshold. Etched tile data that only meets these conditions is filtered, and the filtered results are then used to calculate a global average value to determine the atmospheric light value for each channel. In this embodiment, these two conditions are used as judgment steps to filter the etched tile data accordingly, thereby determining the atmospheric light value for each channel.
[0055] Step 106: Normalize the downsampled tile data and determine its ratio with the atmospheric light value of the corresponding channel. Update the pixel value of the downsampled tile data based on the ratio to obtain the updated block tile data.
[0056] Specifically, the downsampled tile data is normalized. The atmospheric light value calculated in step 105 is used to iterate through the downsampled data using the Core.divde function. The pixel value is divided by the atmospheric light value of the corresponding channel, and the result is overwritten with the original pixel value of the downsampled data. The pixel value of each channel of the downsampled data is restricted to not more than 1, that is, pixel values greater than 1 are set to 1, so as to obtain the updated block tile data.
[0057] Step 107: Perform an erosion operation on the updated tile data to obtain the updated dark channel, and initialize the atmospheric transport results based on the updated dark channel.
[0058] The erosion operation is performed again on the updated tile data (i.e., step 105 is repeated), the dark channel is recalculated, the updated dark channel is obtained, and the atmospheric transport results are initialized based on it.
[0059] Step 108: Merge the channels of the downsampled tile data and convert them into grayscale images to obtain a merged grayscale image.
[0060] The downsampled tile data is merged across channels using the Core.merge function to obtain mat_rgb, which is then converted to a grayscale image using the Imgproc.cvtColor function.
[0061] Step 109: Perform weighted guided filtering based on the atmospheric transmission results and the merged grayscale image to obtain the weighted guided filtering result.
[0062] Specifically, this process generates smooth images that retain useful edges by combining local pixel statistics, a guide map, and specific weights. This method combines local statistics with global guidance to preserve important structural features of the image while smoothing it.
[0063] Step 110: Create an identification mask based on the weighted guided filtering results to identify invalid pixels and mark invalid pixels in the identification mask.
[0064] For example, the weighted guided filtering result is associated with the block index SpatialKey obtained in step 103, and a recognition mask is created using Core.compare.
[0065] Step 111: The Dehaze function is used to adjust each channel of the downsampled tile data pixel by pixel to perform dehazing calculations and obtain the initial dehazed image.
[0066] The images of each channel of the downsampled tile data are adjusted using the Dehaze function, which uses the get and put functions of the Core function to adjust the image pixel by pixel to obtain the initial dehazed image.
[0067] Step 112: Set the positions in the initial dehazed image that correspond to the invalid pixels in the recognition mask to invalid values to obtain the dehazed image.
[0068] Specifically, the non-RGB channel image is not modified and is directly copied to the output array. The results at the recognition mask position are set to invalid values to obtain the dehazed image.
[0069] Step 113: Upsample the dehazed image to the original resolution to obtain the dehazed remote sensing image.
[0070] For example, the upsampling coefficient is the same as the downsampling coefficient, which is 4.
[0071] In addition, it also includes: writing the dehazed remote sensing images obtained after upsampling to the shared disk file system via the GDAL library.
[0072] Figure 2 Another flowchart of a remote sensing image dehazing method based on distributed computing provided in this application embodiment.
[0073] The dehazing algorithm principle involved in the remote sensing image dehazing method based on distributed computing described in this application is as follows: 1. Fog degradation model, as follows: .
[0074] Where I represents the intensity of the observed foggy image, J represents the light intensity of the original scene image, A represents the atmospheric light value (also known as atmospheric illumination), and t represents the transmittance (i.e. the portion of the optical fiber that is transmitted to the remote sensing image acquisition device without attenuation through the medium).
[0075] The fog degradation model formula means that the observed fog image intensity I can be obtained by linearly combining the light intensity J of the original scene image and the atmospheric light value A. Here, transmittance t controls the ratio of the original fog image intensity I and the atmospheric light value A in the combination.
[0076] When the transmittance t is close to 1, the observed foggy image I is closer to the original scene image J; when the transmittance t is close to 0, the observed foggy image intensity I is closer to the atmospheric light value A.
[0077] The aforementioned fog degradation model forms the theoretical basis of the entire dehazing algorithm, facilitating an understanding of how fog in the atmosphere affects remote sensing images. This, in turn, allows for the deduction of how to recover a clear image from a fogged image.
[0078] 2. The prior of the dark channel is as follows: .
[0079] Where t(x) represents the transmittance of each pixel, i represents the pixel number, x represents the pixel, and d represents the boundary. This represents the light intensity of the original scene image corresponding to pixel number i.
[0080] This formula is used to estimate the transmittance t(x) of each pixel, i.e., the visibility of that pixel in a haze-free image. The dark channel prior assumes that in most local patches outside the sky, at least some pixels in one color channel have very low intensities, close to 0. Equivalently, the minimum intensity in such local patches is close to 0. This assumption is a statistical one, suggesting that the minimum value in the dark channel image corresponds to the atmospheric light value in the image, and can be used to estimate the intensity and distribution of atmospheric light values.
[0081] 3. Atmospheric light value estimation, as follows: .
[0082] This formula is used to estimate the atmospheric light value A, which is an important parameter in the dehazing process. Valley represents a valley-shaped (concave) optimization function commonly used in machine learning, and H represents the histogram of the dark channel image. During processing, the valleys are found by analyzing the histogram of the dark channel image, thereby estimating the atmospheric light value.
[0083] 4. Defogging formula, as follows: .
[0084] This formula is used to calculate and reconstruct a fog-free image based on the transmittance t(x) and atmospheric light value A of each pixel obtained from the above formula. This formula is the core of the dehazing algorithm; it is applied directly to each pixel to eliminate the effects of fog and restore the original colors and details of the image. Here, I(x) represents the fog intensity of each pixel in the image.
[0085] 5. Enhanced local contrast, as shown below: .
[0086] This formula is used to locally enhance the contrast of an image after dehazing, thereby improving image quality. In processing, this is achieved through bilateral filtering or other filtering techniques, which helps preserve image details and texture while reducing image noise. Z represents the local standard deviation of each pixel, and Z represents the window size. This represents the pixels after local contrast enhancement. This represents the average value of local contrast. This represents the intensity of a foggy image after local contrast enhancement.
[0087] Furthermore, embodiments of this application also propose a remote sensing image dehazing processing device based on distributed computing, comprising: The block reading module is used to read remote sensing images in blocks and reorganize the block reading results based on the metadata information of the remote sensing images to obtain block tile data. The dehazing preprocessing module is used to perform downsampling, mask generation, dark channel generation, histogram and atmospheric light value calculation, normalization and weighted filtering guidance on the segmented tile data, and output downsampled data; The dehazing calculation module is used to perform dehazing calculations on the downsampled data output by the dehazing preprocessing module and upsample it to the original resolution to obtain the dehazed remote sensing image.
[0088] This application proposes a method and apparatus for dehazing remote sensing image data based on distributed computing. By leveraging the powerful distributed computing capabilities of Spark and the geographic information processing functions of Geotrellis, it achieves efficient and accurate dehazing of remote sensing image data. This significantly improves the processing efficiency of large-scale remote sensing image data. Through automated source data management and image processing workflows, it enhances the quality and accuracy of the processed remote sensing images, increases processing speed, and improves dehazing effects. This is of great significance for improving the quality and application value of remote sensing image data.
[0089] While this application provides the method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in this embodiment is merely one possible execution order among many and does not represent the only execution order. In actual device or client product execution, the methods shown in this embodiment or the accompanying drawings can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment).
[0090] Some modules in the apparatus described in this application can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, classes, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0091] The apparatus or module described in the above embodiments can be implemented by a computer chip or physical entity, or by a product with a certain function. For ease of description, the above apparatus is described by dividing it into various modules according to their functions. When implementing the embodiments of this application, the functions of each module can be implemented in one or more software and / or hardware. Of course, a module that implements a certain function can also be implemented by combining multiple sub-modules or sub-units.
[0092] The methods, apparatus, or modules described in this application can be implemented in a computer-readable program code manner. The controller can be implemented in any suitable manner, such as a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of a memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code manner, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included within it for implementing various functions can also be considered as structures within the hardware component. Alternatively, the device used to implement various functions can be viewed as either a software module implementing the method or a structure within a hardware component.
[0093] This application also provides an apparatus for executing a remote sensing image dehazing processing method based on distributed computing. The apparatus includes: a processor; a memory for storing processor-executable instructions; when the processor executes the executable instructions, it implements the remote sensing image dehazing processing method based on distributed computing provided in this application.
[0094] This application also provides a non-volatile computer-readable storage medium storing a computer program or instructions thereon, which, when executed, enables the remote sensing image dehazing method based on distributed computing provided in this application to be implemented.
[0095] Furthermore, in the various embodiments of the present invention, each functional module can be integrated into a processing module, or each module can exist independently, or two or more modules can be integrated into a single module.
[0096] The aforementioned storage media include, but are not limited to, Random Access Memory (RAM), Read-Only Memory (ROM), Cache, Hard Disk Drive (HDD), or Memory Card. The memory can be used to store computer program instructions.
[0097] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary hardware. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, or it can be embodied in the process of data migration. The computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, mobile terminal, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0098] The various embodiments described in this specification are presented in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on its differences from other embodiments. All or part of this application can be used in numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, mobile communication terminals, multiprocessor systems, microprocessor-based systems, programmable electronic devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices, etc.
[0099] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of this application.
Claims
1. A method for dehazing remote sensing images based on distributed computing, characterized in that, include: Initialize the distributed computing environment and read remote sensing images in blocks to obtain raw tile data; Obtain the metadata information of the remote sensing image, and reorganize the layout of the original tile data based on the metadata information to obtain block tile data; Determine the block metadata information of the segmented tile data, perform downsampling processing on the segmented tile data to obtain downsampled tile data, and determine its mask; The dark channel is determined based on the RGB channel values of the segmented tile data; The values at the corresponding positions in the dark channel are updated according to the values of the mask, and the updated dark channel is subjected to an erosion operation to obtain eroded tile data and determine its atmospheric light value. The downsampled tile data is normalized, and its ratio to the atmospheric light value of the corresponding channel is determined. The pixel value of the downsampled tile data is updated based on the ratio to obtain the updated block tile data. The updated segmented tile data is subjected to an erosion operation to obtain the updated dark channel, and the atmospheric transport results are initialized and calculated based on the updated dark channel. The channels of the downsampled tile data are merged and converted into a grayscale image to obtain a merged grayscale image. Based on the atmospheric transmission results and the merged grayscale image, a weighted guided filtering process is performed to obtain the weighted guided filtering result. A recognition mask is created based on the weighted guided filtering result to identify invalid pixels therein, and the invalid pixels are marked in the recognition mask; The Dehaze function is used to adjust each channel of the downsampled tile data pixel by pixel to perform dehazing calculations and obtain an initial dehazed image. The positions in the initial dehazed image corresponding to the invalid pixels in the recognition mask are set to invalid values to obtain the dehazed image; The dehazed image is upsampled to its original resolution to obtain the dehazed remote sensing image.
2. The method according to claim 1, characterized in that, The segmented reading of remote sensing images yields raw tile data, including: Set the maximum tile size and define the size of the slice window accordingly; The remote sensing image is divided into original tile data that conform to the maximum tile size according to the slicing window.
3. The method according to claim 1, characterized in that, The process of reorganizing the layout of the original tile data based on the metadata information to obtain block tile data includes: The geographic boundaries of each original tile data are iteratively calculated based on the metadata information, and the geographic boundaries are merged using the reduce function to obtain the merged boundary; Determine the overall extent of the remote sensing image; The spatial limits of the merging boundary are set according to the overall range to obtain the segmented tile data.
4. The method according to claim 1, characterized in that, Determining its atmospheric light value includes: Calculate the histogram of the corroded tile data, and determine the threshold based on the histogram; The atmospheric light value of the corroded tile data is determined based on the threshold.
5. The method according to claim 4, characterized in that, The step of determining the threshold based on the histogram includes: Perform a reverse iteration step on the histogram; The reverse iteration steps include: The histogram is iterated in reverse order, and the iteration results are accumulated to obtain the accumulated value; If the number of valid masks is less than the accumulated value, then the reverse iteration step is executed; Otherwise, exit the reverse iteration step and determine the threshold; The threshold values are as follows: ; Where thres represents the threshold, and i represents the number of iterations in the reverse iteration step.
6. The method according to claim 4, characterized in that, Determining the atmospheric light value of the corroded tile data based on the threshold includes: Perform a mask determination step, and determine the atmospheric light value based on the dark channel value output in the mask determination step; The mask determination step includes: Determine whether the mask value at the pixel position corresponding to the eroded tile data is 1; If the mask value at the pixel location corresponding to the eroded tile data is 1, then determine whether the value of the dark channel at that pixel location is greater than the threshold. If the value of the dark channel at that pixel location is greater than the threshold, then the value of the dark channel at that pixel location is output. Otherwise, the mask determination step is performed based on the next etched tile data until all etched tile data has been traversed; If the mask value at the pixel position corresponding to the eroded tile data is not 1, then the mask judgment step is performed based on the next eroded tile data until all the eroded tile data has been traversed.
7. The method according to claim 1, characterized in that, Before performing the erosion operation on the updated dark channel, the method further includes: Determine the boundary expansion range, and expand the downsampled tile data based on the boundary expansion range.
8. A remote sensing image dehazing device based on distributed computing, characterized in that, include: The block reading module is used to read remote sensing images in blocks and reorganize the block reading results based on the metadata information of the remote sensing images to obtain block tile data. The defogging preprocessing module is used to perform downsampling, mask generation, dark channel generation, histogram and atmospheric light value calculation, normalization processing and weighted filtering guidance processing on the segmented tile data, and output downsampled data; The dehazing calculation module is used to perform dehazing calculations on the downsampled data output by the dehazing preprocessing module and upsample it to the original resolution to obtain the dehazing remote sensing image.
9. An apparatus for performing the aforementioned distributed computing-based remote sensing image dehazing method, characterized in that, include: processor; Memory used to store processor-executable instructions; When the processor executes the executable instructions, it implements the remote sensing image dehazing method based on distributed computing as described in any one of claims 1-7.
10. A non-volatile computer-readable storage medium, characterized in that, Includes storage for computer programs or instructions that, when executed, enable the distributed computing-based remote sensing image dehazing method as described in any one of claims 1 to 7 to be implemented.
Citation Information
Patent Citations
Quick image defogging optimization method
CN107424132A
System and method for removing haze from remote sensing images
US20230026811A1
Dark channel based image defogging method for linear self-adaptive improvement of global atmospheric light
WO2019205707A1