Atmospheric correction method and device based on JAVA language
By using object-oriented design based on the JAVA language and the successive scattering method, accurate atmospheric correction of remote sensing images was achieved, solving the problem of accuracy of atmospheric influence in remote sensing images and improving the maintainability and computational performance of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 北京观微科技有限公司
- Filing Date
- 2025-12-06
- Publication Date
- 2026-04-21
AI Technical Summary
Existing atmospheric correction methods for remote sensing images cannot accurately eliminate atmospheric effects, leading to inaccurate measurements of ground reflectance and affecting the reliability of quantitative remote sensing analysis and the comparability of spatiotemporal comparisons.
Using an object-oriented design based on the JAVA language, the atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model are encapsulated as independent objects. They are dynamically combined through a polymorphic mechanism and the successive scattering method is used to solve for radiative transfer, generating atmospheric correction coefficients and performing image correction.
It achieves accurate atmospheric correction of remote sensing images, improves the maintainability and cross-platform capability of the model, ensures the accuracy and reliability of surface reflectance, and supports efficient computing in a distributed environment.
Smart Images

Figure CN121902015A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of atmospheric science and technology, and in particular to an atmospheric correction method and apparatus based on the JAVA language. Background Technology
[0002] Atmospheric correction refers to the fact that the total radiance of a ground target measured by a remote sensing sensor does not reflect the true reflectance of the surface, as it includes radiation errors caused by atmospheric absorption, especially scattering. Atmospheric correction is the process of eliminating these radiation errors caused by atmospheric influences and retrieving the true reflectance of the ground object.
[0003] The necessity of atmospheric correction lies in: (1) obtaining the true physical properties of ground objects and realizing quantitative remote sensing: Uncorrected images (usually referred to as apparent reflectance or radiance) record a signal of mixed light reflected from ground objects and light scattered by the atmosphere. After atmospheric correction, the true reflectance of the ground surface is obtained, which is an inherent physical property. The true reflectance of the same vegetation is basically consistent under the same conditions, regardless of when, where, or by what sensor it is photographed. Only by obtaining this true physical property can reliable quantitative analysis be carried out, such as: accurately estimating the leaf area index and chlorophyll content of vegetation; inverting the sediment concentration, chlorophyll a concentration, and colored soluble organic matter in water bodies; and identifying mineral composition and rock type. Without atmospheric correction, these quantitative inversions are like measuring length with a ruler with inaccurate graduations, resulting in unreliable results and inability to compare different data. (2) Eliminate false differences in spatiotemporal comparison and ensure comparability: In studies such as land use change monitoring, deforestation tracking, crop growth monitoring, and urbanization, atmospheric correction eliminates the “false changes” brought about by the atmosphere and ensures the authenticity and accuracy of monitoring results.
[0004] Therefore, how to achieve accurate atmospheric correction of remote sensing images has become a technical problem that urgently needs to be solved in the industry. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an atmospheric correction method and apparatus based on the JAVA language, which achieves accurate modeling of classical physical processes. Through object-oriented design, it significantly improves the maintainability, cross-platform capability, and computational performance in distributed environments, effectively realizing accurate atmospheric correction of remote sensing images.
[0006] In a first aspect, the present invention provides an atmospheric correction method based on the JAVA language, the method comprising the following steps: The input hyperspectral image file is read using the JAVA GDAL library, and the metadata of the hyperspectral image file is parsed to obtain the input parameters. Based on the input parameters, an object-oriented design is used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and surface reflectance model into independent objects. The models corresponding to each independent object are dynamically combined through a polymorphic mechanism. The output of the model corresponding to the independent object is calculated based on the model input of the independent object. The input parameters are respectively input into the atmospheric profile model, the gas absorption model, and the aerosol model to obtain the output of the model corresponding to each independent object. Based on the output of the model corresponding to each independent object, optical properties are synthesized. Based on the optical properties and the surface reflectance model, the successive scattering method is used to solve the radiative transfer equation to obtain the radiative transfer result. Based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, an atmospheric correction coefficient is generated. Based on the radiance data of the hyperspectral image file and the atmospheric correction coefficient, atmospheric correction is performed on the hyperspectral image file to obtain the surface reflectance of the hyperspectral image file.
[0007] According to the present invention, an atmospheric correction method based on the JAVA language is provided, wherein, based on the input parameters, an object-oriented design is used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and surface reflectance model into independent objects, including: The input parameters are automatically validated and standardized using Java's strong typing features and validation annotation framework to obtain validated parameters. Based on the verified parameters, the atmospheric profile model, the gas absorption model, the aerosol model, and the surface reflectance model are encapsulated into independent objects using object-oriented design.
[0008] According to the present invention, an atmospheric correction method based on JAVA language is provided, wherein the input parameters include sensor height parameters, spectral range parameters, and aerosol parameters; the output of the model corresponding to each independent object includes the absorption transmittance of atmospheric molecules, the stratified absorption coefficient of atmospheric molecules, the scattering coefficient of atmospheric molecules, the molecular scattering optical thickness, the molecular scattering stratified extinction coefficient, the Rayleigh phase function, and the optical properties of aerosols. The step of inputting the input parameters into the atmospheric profile model, the gas absorption model, and the aerosol model respectively to obtain the output of the model corresponding to each independent object includes: Based on the atmospheric profile model and the gas absorption model, combined with the spectral range parameters and the sensor height parameters, the absorption transmittance of the atmospheric molecules, the stratification absorption coefficient of the atmospheric molecules, and the scattering coefficient of the atmospheric molecules are calculated using the Kratz parameterization method based on the HITRAN database. Based on the atmospheric profile model and the spectral range parameters, the molecular scattering optical thickness, the molecular scattering stratification extinction coefficient, and the Rayleigh phase function are calculated using the Bodhaine formula. Based on the aerosol model and the aerosol parameters, the optical properties of the aerosol are calculated using Mie theory. The optical properties of the aerosol include the aerosol stratified extinction coefficient, the aerosol stratified scattering coefficient, and the aerosol phase function.
[0009] According to the atmospheric correction method based on the JAVA language provided by the present invention, the optical properties include total extinction coefficient, total single albedo, and total phase function; the synthesized optical properties based on the output of the model corresponding to each independent object include: The total extinction coefficient is obtained by summing the stratified absorption coefficient of the atmospheric molecules, the stratified extinction coefficient of the molecular scattering, and the stratified extinction coefficient of the aerosol. The molecular scattering layered extinction coefficient and the aerosol layered scattering coefficient are summed, and the ratio of the summation value to the total extinction coefficient is calculated. The ratio is then determined as the total single albedo. Multiply the molecular scattering layer extinction coefficient and the Rayleigh phase function to obtain the first multiplication result; multiply the aerosol layer scattering coefficient and the aerosol phase function to obtain the second multiplication result; add the first multiplication result and the second multiplication result to obtain the first addition term. The molecular scattering layer extinction coefficient is added to the aerosol layer scattering coefficient to obtain a second addition term. The first addition term is divided by the second addition term to obtain the total phase function.
[0010] According to the present invention, an atmospheric correction method based on the JAVA language is provided, wherein the radiative transfer result includes total absorbing gas transmittance, total downlink transmittance, total uplink transmittance, spherical albedo, and hemispherical integral value of downlink atmospheric radiation; the atmospheric correction coefficient includes atmospheric path radiative reflectance, surface reflection signal attenuation factor, and surface atmospheric multiple reflection factor; the generation of atmospheric correction coefficients based on the radiative transfer result and the solar spectral irradiance parameter in the input parameters includes: The atmospheric path radiative reflectance is calculated based on the solar spectral irradiance, the cosine of the solar zenith angle, the hemispherical integral of the downward atmospheric radiation, the total absorbing gas transmittance, the total upward transmittance, and the total downward transmittance. The surface reflection signal attenuation factor is calculated based on the total upward transmittance, the total downward transmittance, and the total absorbed gas transmittance. Based on the atmospheric albedo of the giant balloon, the multiple reflection factor of the Earth's surface atmosphere is determined.
[0011] According to the present invention, an atmospheric correction method based on the JAVA language is provided, wherein atmospheric correction is performed on the hyperspectral image file based on the radiance data of the hyperspectral image file and the atmospheric correction coefficient, and the surface reflectance of the hyperspectral image file is obtained by inversion, including: Based on the radiance data, the distance between the Earth and the Sun, the solar spectral irradiance, and the solar zenith angle, the apparent reflectance is determined; The apparent reflectance is corrected using the atmospheric correction coefficient to obtain the surface reflectance of the hyperspectral image file.
[0012] According to the present invention, an atmospheric correction method based on the JAVA language is provided, the method further includes: The surface reflectance is output as a GeoTIFF file, and a metadata file in JSON format is generated; wherein, the metadata file is used to record the atmospheric correction coefficient and the log information of the atmospheric correction method based on the JAVA language.
[0013] Secondly, the present invention also provides an atmospheric correction device based on the JAVA language, the device comprising the following modules: The parsing module is used to read the input hyperspectral image file through the JAVA GDAL library, parse the metadata of the hyperspectral image file, and obtain the input parameters. The object-oriented design module is used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model into independent objects based on the input parameters, and dynamically combine the models corresponding to each independent object through a polymorphic mechanism; the output of the model corresponding to the independent object is calculated based on the model input of the independent object. An atmospheric correction module is used to input the input parameters into the atmospheric profile model, the gas absorption model, and the aerosol model respectively, to obtain the output of the model corresponding to each independent object, to synthesize optical properties based on the output of the model corresponding to each independent object, and to solve the radiative transfer equation using the successive scattering method based on the optical properties and the surface reflectance model to obtain the radiative transfer result. Based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, an atmospheric correction coefficient is generated. Based on the radiance data of the hyperspectral image file and the atmospheric correction coefficient, atmospheric correction is performed on the hyperspectral image file to obtain the surface reflectance of the hyperspectral image file.
[0014] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the atmospheric correction method based on the JAVA language as described above.
[0015] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the atmospheric correction method based on the JAVA language as described above.
[0016] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the atmospheric correction method based on the JAVA language as described above.
[0017] The present invention provides an atmospheric correction method and apparatus based on the JAVA language. First, it reads the input hyperspectral image file using the JAVA GDAL library, parses the metadata of the hyperspectral image file to obtain input parameters. Then, based on the input parameters, it encapsulates the atmospheric profile model, gas absorption model, aerosol model, and surface reflectance model into independent objects using object-oriented design. Through a polymorphic mechanism, it dynamically combines the models corresponding to each independent object. Within each independent object, the output of the corresponding model is calculated based on the input of that independent object's model. Further, the input parameters are input into the atmospheric profile model, gas absorption model, and aerosol model respectively to obtain the output of the model corresponding to each independent object. Optical properties are synthesized based on the output of the models corresponding to each independent object, and the radiative transfer equation is solved using the successive scattering method based on the optical properties and the surface reflectance model to obtain the radiative transfer result. Then, based on the radiative transfer result and the solar spectral irradiance parameter in the input parameters, atmospheric correction coefficients are generated. Based on the radiance data of the hyperspectral image file and the atmospheric correction coefficients, atmospheric correction is performed on the hyperspectral image file to retrieve the surface reflectance of the hyperspectral image file.
[0018] The method provided in this embodiment employs object-oriented design to encapsulate atmospheric profile models, gas absorption models, aerosol models, and surface reflectance models into independent objects based on input parameters. Through a polymorphic mechanism, the models corresponding to each independent object are dynamically combined. Within each independent object, the output of its corresponding model is calculated based on the input model, achieving accurate modeling of classical physical processes. Object-oriented design also significantly improves the maintainability, cross-platform capability, and computational performance in distributed environments. Furthermore, the input parameters are input into the modeled atmospheric profile model, gas absorption model, and aerosol model respectively to obtain the output of each independent object's model. Based on the output, the optical properties are synthesized, and the successive scattering method is used to solve the radiative transfer equation using the surface reflectance model to obtain the radiative transfer result. Then, based on the radiative transfer result and the solar spectral irradiance parameter in the input parameters, atmospheric correction coefficients are generated. These atmospheric correction coefficients are then used to perform atmospheric correction on the hyperspectral image file, and the surface reflectance of the hyperspectral image file is retrieved, effectively achieving accurate atmospheric correction of remote sensing images. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is one of the flowcharts of the atmospheric correction method based on the JAVA language provided by the present invention.
[0021] Figure 2 This is the second flowchart of the atmospheric correction method based on the JAVA language provided by the present invention.
[0022] Figure 3 This is a schematic diagram illustrating the effect of the atmospheric correction method based on the JAVA language provided by the present invention.
[0023] Figure 4 This is a schematic diagram of the atmospheric correction device based on the JAVA language provided by the present invention.
[0024] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention 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.
[0026] The following is combined with Figures 1-5 This invention describes an atmospheric correction method and apparatus based on the JAVA language.
[0027] Figure 1 This is one of the flowcharts of the atmospheric correction method based on the JAVA language provided by the present invention, such as... Figure 1 As shown, the method includes the following: Step 101: Read the input hyperspectral image file using the JAVA GDAL library, parse the metadata of the hyperspectral image file, and obtain the input parameters.
[0028] The execution subject of this invention is an electronic device, used to perform accurate atmospheric correction on remote sensing images.
[0029] The input hyperspectral image file is the remote sensing image that needs atmospheric correction. Hyperspectral image files can be in Tag Image File Format (TIF) format, a flexible bitmap format primarily used to store images, including photographs and artwork.
[0030] The Java Geospatial Data Abstraction Library (GDAL) is used to read input hyperspectral image files and extract input parameters from metadata. Java GDAL is a library that allows Java programs to read, write, and process various raster and vector geospatial data formats. Extracted information includes, but is not limited to: band number, wavelength range, spatial resolution, Remote Procedure Call (RPC) parameters, geographic coordinates, solar and satellite sensor geometry parameters, sensor altitude parameters, spectral range parameters, atmospheric profile parameters, aerosol parameters, surface reflectance model parameters, aerosol type, and aerosol concentration. This information forms the basis and input for all subsequent atmospheric correction calculations.
[0031] Step 102: Based on the input parameters, the atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model are encapsulated into independent objects using object-oriented design. The models corresponding to each independent object are dynamically combined through a polymorphic mechanism. The output of the model corresponding to the independent object is calculated based on the model input of the independent object.
[0032] Specifically, object-oriented design is a software design paradigm whose core idea is to abstract real-world entities into independent objects in a program, each containing its own data (attributes) and behavior (methods). The four core characteristics of object-oriented design include: 1. Encapsulation: Bundling data and methods for manipulating that data together, hiding internal implementation details, and exposing only necessary interfaces. In this invention, this is reflected in encapsulating the internal data and calculation methods of models such as atmospheric profiles and gas absorption within their respective classes. 2. Inheritance: Subclasses can inherit the attributes and methods of their parent classes, achieving code reuse and hierarchical classification. In this invention, different atmospheric profile models (such as the US Standard Atmosphere and tropical atmosphere) can inherit from the same base atmospheric profile class. 3. Polymorphism: The same operation applied to different objects can produce different behaviors. In this invention, different aerosol models (continental and oceanic) all have methods for calculating optical properties, but their internal implementations differ. 4. Abstraction: Extracting key features, ignoring unnecessary details, and defining specifications through interfaces or abstract classes. In this invention, a general interface for atmospheric components is defined, stipulating that all atmospheric components must implement methods for calculating optical properties.
[0033] After encapsulating the above models (atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model) using object-oriented design, we obtain the encapsulated model, which consists of individual objects. Each individual object calculates its own model output based on the model input. The encapsulated model is as follows: 1. Objects with high cohesion: The StandardAtmosphere object is specifically responsible for calculating the optical properties of the atmosphere.
[0034] ContinentalAerosol object: specifically responsible for Mie scattering calculations of sols.
[0035] The WaterVaporAbsorption object is specifically responsible for water vapor absorption calculations.
[0036] 2. Loosely coupled architecture: Each object focuses on its own area of expertise, and objects interact with each other through well-defined interfaces. Modifying one model (such as switching to a new aerosol model) will not affect other models.
[0037] 3. Scalable design: To add a new atmospheric profile (such as the Martian atmosphere), simply create a new AtmosphericProfile subclass; to add a new gas type, simply create a new GasAbsorptionModel subclass; the core compositional logic does not need to be modified.
[0038] 4. Advantages of polymorphism: In AtmosphericModelCompositor, the calculateOpticalProperties() method is called uniformly for all AtmosphericComponents, but the actual calculation logic is executed for each object, implementing the same interface but with different behaviors.
[0039] Through object-oriented design, we decompose complex atmospheric physical processes into a series of software objects with single responsibilities, clear boundaries, and ease of testing and maintenance, resulting in independent objects for atmospheric profile models, gas absorption models, aerosol models, and surface reflectivity models. Then, after encapsulating the models, we dynamically combine them through a polymorphic mechanism to accurately calculate the optical properties of the entire atmospheric layer. In other words, different models are dynamically combined at runtime. This represents a significant advancement in software engineering compared to traditional procedural Fortran / C code.
[0040] Step 103: Input the input parameters into the atmospheric profile model, gas absorption model, and aerosol model respectively to obtain the output of the model corresponding to each independent object. Based on the output of the model corresponding to each independent object, synthesize the optical properties, and solve the radiative transfer equation using the successive scattering method based on the optical properties and the surface reflectivity model to obtain the radiative transfer result.
[0041] After obtaining the encapsulated models (models corresponding to each independent object), the input parameters are input into the atmospheric profile model, gas absorption model, and aerosol model, respectively. The models corresponding to each independent object are then called to calculate the output of the models corresponding to each independent object.
[0042] The output of the model for each independent object includes: spectral absorption transmittance due to various absorbing gases in the atmosphere (H2O water, O3 ozone, O2 oxygen, CO2 carbon dioxide, CH4 methane, N2O nitrous oxide), scattering optical thickness and phase function caused by air molecules (N2 nitrogen, O2), and optical properties of aerosols, including optical thickness, single albedo, phase function, etc.
[0043] Furthermore, the optical parameters output from the three processes of atmospheric molecule absorption calculation, atmospheric molecule scattering calculation, and aerosol model calculation are used as inputs to solve the radiative transfer equation and obtain the final radiation field.
[0044] First, optical properties are synthesized based on the output of the model corresponding to each independent object. The optical properties include the total extinction coefficient, the total single albedo, and the total phase function of each layer.
[0045] Furthermore, based on the aforementioned optical properties and the surface reflectance model, the Series Of Scattering (SOS) method is used to solve the radiative transfer equation, yielding the radiative transfer results. For example, SOS iterates from direct light (0th scattering), successively calculating the contribution of the 1st, 2nd, 3rd, and so on up to the Nth scattering to the sensor's received signal, until the results converge. Finally, the solver outputs key results, namely, the radiative transfer results, including atmospheric intrinsic reflectance (the portion of light scattered before reaching the surface), total uplink and downlink transmittance (including direct and scattered light), atmospheric spherical albedo (the hemispherical reflectance of the atmosphere to downlink radiation), and the hemispherical integral value of atmospheric downlink radiation.
[0046] Step 104: Based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, generate atmospheric correction coefficients, and perform atmospheric correction on the hyperspectral image file based on the radiance data and atmospheric correction coefficients of the hyperspectral image file to obtain the surface reflectance of the hyperspectral image file.
[0047] Specifically, the atmospheric correction coefficient generation process aims to transform complex radiative transfer results into three easy-to-use coefficients, thereby enabling efficient atmospheric correction of large amounts of satellite imagery. Among these, atmospheric path radiative reflectance... Surface reflection signal attenuation factor and surface atmospheric multiple reflectance These are intermediate parameters used for surface reflectance correction. Their core function is to use quantification parameters of atmospheric effects to invert the radiation values received by the sensor into the true surface reflectance. Inverting surface reflectance means correcting the observed data using atmospheric correction coefficients to remove atmospheric influences and obtain the surface reflectance.
[0048] First, based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, the aforementioned atmospheric correction coefficients and atmospheric path radiative reflectance are generated. Surface reflection signal attenuation factor and surface atmospheric multiple reflectance .
[0049] Then, atmospheric correction is performed on the hyperspectral image file based on the aforementioned atmospheric correction coefficients, and the surface reflectance of the hyperspectral image file is obtained by inversion. For example, the apparent reflectance is first calculated based on radiance, the distance between the Earth and the Sun, solar spectral irradiance, and solar zenith angle. Then, the surface reflectance is obtained by inversion based on the apparent reflectance. The surface reflectance characterizes the ability of the Earth's surface (such as soil, vegetation, water bodies, ice and snow) to reflect solar radiation. Obtaining the surface reflectance of the image means that atmospheric correction has been achieved.
[0050] In the results output module, JAVA GDAL is used to write the finally calculated surface reflectance data into a new geotagged TIFF (Geographic Tagged Image File Format, GeoTIFF) file. This not only writes the pixel values but also correctly writes all georeferenced and projection information, ensuring that the output imagery can be correctly recognized and used by other Geographic Information System (GIS) software.
[0051] The method provided in this invention first reads the input hyperspectral image file using the JAVA GDAL library, parses the metadata of the hyperspectral image file to obtain input parameters, and then, based on the input parameters, encapsulates the atmospheric profile model, gas absorption model, aerosol model, and surface reflectance model into independent objects using object-oriented design. The models corresponding to each independent object are dynamically combined through a polymorphic mechanism, and the output of the corresponding model is calculated within each independent object based on its model input. Further, the input parameters are input into the atmospheric profile model, gas absorption model, and aerosol model respectively to obtain the output of the model corresponding to each independent object. Optical properties are synthesized based on the output of the model corresponding to each independent object, and the radiative transfer equation is solved using the successive scattering method based on the optical properties and the surface reflectance model to obtain the radiative transfer result. Then, based on the radiative transfer result and the solar spectral irradiance parameter in the input parameters, atmospheric correction coefficients are generated, and atmospheric correction is performed on the hyperspectral image file based on the radiance data and atmospheric correction coefficients to invert and obtain the surface reflectance of the hyperspectral image file.
[0052] The method provided in this embodiment employs object-oriented design to encapsulate atmospheric profile models, gas absorption models, aerosol models, and surface reflectance models into independent objects based on input parameters. Through a polymorphic mechanism, the models corresponding to each independent object are dynamically combined. Within each independent object, the output of its corresponding model is calculated based on the input model, achieving accurate modeling of classical physical processes. Object-oriented design also significantly improves the maintainability, cross-platform capability, and computational performance in distributed environments. Furthermore, the input parameters are input into the modeled atmospheric profile model, gas absorption model, and aerosol model respectively to obtain the output of each independent object's model. Based on the output, the optical properties are synthesized, and the successive scattering method is used to solve the radiative transfer equation using the surface reflectance model to obtain the radiative transfer result. Then, based on the radiative transfer result and the solar spectral irradiance parameter in the input parameters, atmospheric correction coefficients are generated. These atmospheric correction coefficients are then used to perform atmospheric correction on the hyperspectral image file, and the surface reflectance of the hyperspectral image file is retrieved, effectively achieving accurate atmospheric correction of remote sensing images.
[0053] According to the present invention, an atmospheric correction method based on the JAVA language encapsulates the atmospheric profile model, gas absorption model, aerosol model, and surface reflectance model into independent objects based on input parameters using object-oriented design, including: By leveraging Java's strong typing features and validation annotation framework, input parameters are automatically validated and standardized to obtain validated parameters. Based on the validated parameters, an object-oriented design was used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and the surface reflectivity model into independent objects.
[0054] Specifically, in some embodiments, step 102 is implemented through the following steps: By leveraging Java's strong typing and annotation-based validation framework, input parameters are automatically validated and standardized to obtain validated parameters. The automated validation process includes the following steps: Step 1: Define a strongly typed parameterized model class.
[0055] First, leveraging Java's strong typing, all scattered input parameters are encapsulated into one or more dedicated parameter model classes. This in itself is a form of structured validation. An example is shown below: / / Use strongly typed parameter models instead of loosely typed Maps or single primitive type parameters. public class AtmosphericCorrectionParameters { / / Geometric parameters private double solarZenithAngle; / / Solar zenith angle (degrees) private double sensorZenithAngle; / / Observes the zenith angle (degrees) / / Atmospheric parameters private double aod; / / Aerosol optical thickness private double waterVapor; / / Water vapor column content (g / cm³) 2 ) / / Spectral parameters private WavelengthRange wavelengthRange; / / Custom enumeration or class representing the spectral range / / Model selection parameters private AerosolModel aerosolModel; / / Enumeration: CONTINENTAL, URBAN, etc. private AtmosphericProfile atmosphericProfile; / / Enumeration: US_STANDARD, MIDLAT_SUMMER, etc. / / ... Other parameters and their Getter / Setter methods } The role of strong typing in this step: Compile-time checks: The compiler can immediately detect type mismatch errors, such as attempting to assign a string to a double-type aerosol optical depth (AOD).
[0056] Semantic clarity: The physical meaning and data type of each parameter are immediately apparent.
[0057] Avoid runtime errors: Prevents unexpected crashes in subsequent calculations due to incorrect parameter types.
[0058] Step 2: Declare constraint rules using validation annotations.
[0059] On the fields of the model class, use a validation annotation framework to declare the physical validity rules that each parameter must adhere to. An example is shown below: / / Introduce validation annotations import JAVAx.validation.constraints.*; public class AtmosphericCorrectionParameters { @NotNull(message = "The solar zenith angle cannot be empty") @DecimalMin(value = "0.0", message = "The solar zenith angle cannot be less than 0 degrees") @DecimalMax(value = "90.0", message = "The solar zenith angle cannot exceed 90 degrees") private Double solarZenithAngle; @NotNull @DecimalMin("0.0") @DecimalMax("90.0") private Double sensorZenithAngle; @NotNull @DecimalMin(value = "0.0", message = "AOD cannot be negative") @DecimalMax(value = "3.0", message = "AOD exceeds the physical limit") private Double aod; @NotNull @DecimalMin("0.0") @DecimalMax("10.0") private Double waterVapor; / / Unit: g / cm³ 2 @NotNull private AerosolModel aerosolModel; @NotNull private AtmosphericProfile atmosphericProfile; / / ... } The role of validation annotations in this step: Declarative validation: Simply declare the rules using annotations, without writing lengthy if-else conditional logic.
[0060] Centralized rules: All validation rules are defined together with the data model, making them easy to manage and maintain.
[0061] Rich built-in annotations: @NotNull, @Min, @Max, @Pattern (for regular expression matching), @Digits, etc.
[0062] Step 3: Perform automated verification.
[0063] The verification process is automatically triggered after the program receives user input parameters (for example, after loading from a configuration file and mapping them to an AtmosphericCorrectionParameters object). An example is shown below: / / In the parameter parsing and verification module Public ValidationResult validateParameters(AtmosphericCorrectionParameters params) { ValidatorFactory factory = Validation.buildDefaultValidatorFactory(); Validator validator = factory.getValidator(); / / Perform validation and return a set of violations. Set <ConstraintViolation <atmosphericcorrectionparameters>>violations = validator.validate(params); if (violations.isEmpty()) { / / If there are no violations, verification passes. return new ValidationResult(true, "Parameter is valid", params); } else { / / If a violation is found, construct an error message. List <string>errorMessages = new ArrayList<>(); for (ConstraintViolation <atmosphericcorrectionparameters>violation : violations) { errorMessages.add(violation.getPropertyPath() + ": " +violation.getMessage()); } / / Trigger the exception handler, log the exception, and terminate the process. logger.error("Parameter validation failed: " + String.join("; ",errorMessages)); throw new InvalidParameterException("Invalid input parameter", errorMessages); } } Step 4: Standardization.
[0064] For the parameters that have passed the verification, they are standardized to ensure that they conform to the format and units required by the internal calculation model.
[0065] After the above process, the "verified parameters" we obtain is a dataset that meets all of the following criteria: Type-safe objects: These are fully initialized, strongly typed Java objects (such as instances of the StandardizedParameters class), rather than raw, uncontrolled key-value pairs.
[0066] Physical validity is guaranteed: all values have been rigorously checked within physical ranges (e.g., AOD is between 0 and 3, and angles are between 0 and 90 degrees), ensuring that the basis for subsequent physical model calculations is reliable.
[0067] Standardized format and units: All parameters have been converted to a standardized format and units required for the model's internal calculations (e.g., angles are converted to radians, and air pressure is standardized to hectopascals (hPa).
[0068] Completeness: Any missing or non-essential parameters have been assigned verified and reasonable default values, ensuring the completeness of the parameter set.
[0069] It can be used directly for calculation: This parameter object does not require any further pre-checks and can be directly passed to the next module (such as the exponential data modeling module) for calculation.
[0070] In summary, the validated parameters are a standardized data object that has undergone automated quality control and standardization, is highly reliable in type, range, and physical meaning, and can directly drive the core algorithm. This step is the first and crucial line of defense for the reliability of the entire atmospheric correction process, ensuring the scientific validity and accuracy of the final results.
[0071] Based on the validated parameters, the atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model were encapsulated into independent objects using object-oriented design. The process of encapsulating the models using object-oriented design was implemented through the following steps: Step 1: Define the base interface and abstract class (establish the contract).
[0072] First, create a unified interface that specifies the rules that all atmospheric composition models must follow. For example, this can be achieved using the following code: / ** * Universal Interface for Atmospheric Composition All concrete models must implement this interface. / public interface AtmosphericComponent { / / Calculate and return optical properties OpticalProperties calculateOpticalProperties(Wavelengthwavelength, Geometry geometry); / / Get model type String getModelType(); } / ** * Encapsulation class for optical property results / public class OpticalProperties { private double opticalThickness; / / Optical thickness private double singleScatteringAlbedo; / / Single albedo private double[] phaseFunction; / / Phase function array private Map<String, Double> absorptionCoefficients; / / Absorption coefficients private Map<String, Double> scatteringCoefficients; / / Scattering coefficients / / Constructors, getters, setters, etc. } Step 2: Based on the validated atmospheric profile parameters, create specific model implementations. This includes implementing specific atmospheric profile model classes, gas absorption model classes, aerosol model classes, and surface reflectance model classes.
[0073] (1) Atmospheric profile model: including US standard atmosphere, tropical atmosphere, mid-latitude summer atmosphere, mid-latitude winter atmosphere, subarctic summer, and subarctic winter types.
[0074] The atmospheric profile model defines the atmospheric contour lines and includes the following data items: Altitude (km): From 0 to 100km, layered example: 0-25km every 1km, 25-50km every 5km, 70km and 100km each have one layer.
[0075] Air pressure (mbars, mb): Standard atmospheric pressure or measured value.
[0076] Temperature (Kelvin K): Kelvin temperature.
[0077] Water vapor density (grams per cubic meter, g / m³) 3 ): Water vapor mass density.
[0078] Ozone density (g / m³) 3 ): Ozone mass density.
[0079] (2) Gas absorption model: includes water vapor (H2O), ozone (O3), carbon dioxide (CO2), carbon monoxide (CO) and nitrous oxide (N2O), a total of 5 gas components. The gas absorption model provides gas absorption correction coefficients for each gas type.
[0080] (3) Aerosol models: including no, continental, marine and urban types.
[0081] The aerosol model includes the following data items: Asymmetry factor, extinction coefficient of aerosol, scattering coefficient, reflection component coefficient, transmission component coefficient, and source term coefficient.
[0082] (4) Surface reflectance model: including vegetation, sandy land, lake water and clean water body types.
[0083] The surface reflectance model provides the band reflectance mean for each type, which can be directly called to simplify input.
[0084] Step 3: Dynamically combine models through polymorphic mechanisms This is the most powerful aspect of object-oriented design: dynamically combining different models at runtime. For example, calling the model combiner (using polymorphism to combine atmospheric components), a unified interface call, different objects producing different behaviors, dynamically creating and combining models based on verified parameters, facilitating subsequent calculation and synthesis of optical properties.
[0085] The method provided in this embodiment first utilizes Java's strong typing features and annotation-based validation framework to automatically verify and standardize the input parameters, obtaining verified parameters. Then, based on the verified parameters, object-oriented design is used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and the surface reflectivity model into independent objects. Through object-oriented design, this invention decomposes complex atmospheric physical processes into a series of single-responsibility, clearly defined, and easily tested and maintained software objects. These objects are then dynamically combined using a polymorphic mechanism to jointly achieve accurate calculations of the optical properties of the entire atmospheric layer.
[0086] According to the present invention, an atmospheric correction method based on JAVA language is provided. The input parameters include sensor height parameters, spectral range parameters, and aerosol parameters. The output of the model corresponding to each independent object includes the absorption transmittance of atmospheric molecules, the stratified absorption coefficient of atmospheric molecules, the scattering coefficient of atmospheric molecules, the molecular scattering optical thickness, the molecular scattering stratified extinction coefficient, the Rayleigh phase function, and the optical properties of aerosols. Input parameters are fed into the atmospheric profile model, gas absorption model, and aerosol model respectively to obtain the output of the model corresponding to each independent object, including: Based on the atmospheric profile model and gas absorption model, combined with spectral range parameters and sensor height parameters, the absorption transmittance of atmospheric molecules, the stratification absorption coefficient of atmospheric molecules, and the scattering coefficient of atmospheric molecules are calculated using the Kratz parameterization method based on the HITRAN database. Based on the atmospheric profile model and combined with spectral range parameters, the molecular scattering optical thickness, molecular scattering stratification extinction coefficient, and Rayleigh phase function were calculated using the Bodhaine formula. Based on the aerosol model and combined with aerosol parameters, the optical properties of aerosols are calculated using Mie theory. The optical properties of aerosols include the aerosol stratified extinction coefficient, the aerosol stratified scattering coefficient, and the aerosol phase function.
[0087] Specifically, in some embodiments, the input parameters include sensor height parameters, spectral range parameters, and aerosol parameters; Step 103, obtaining the output of the model corresponding to each independent object, is achieved through the following steps: Overall, it is based on the previously encapsulated model object, and by calling their respective calculation methods, it finally outputs standardized optical property data.
[0088] The internal calculation process of each model is as follows: Atmospheric molecular absorption calculation steps (based on the Kratz parameterization method of the HITRAN database): Based on atmospheric profile models and gas absorption models, and combining spectral range parameters and sensor altitude parameters, the Kratz parameterization method based on the HITRAN database is used to calculate the absorption transmittance, stratification absorption coefficient, and scattering coefficient of atmospheric molecules. Specifically, the following steps are included: 1. Input parameter preparation: The atmospheric profile model, gas absorption model, spectral range parameters, and sensor altitude parameters are obtained from the validated parameters.
[0089] 2. Calculate the equivalent path length: Calculate the equivalent path length of light propagating through the atmosphere based on solar zenith angle, sensor zenith angle, and atmospheric stratification data. Considering atmospheric refraction and spherical geometry, calculate the path length for each atmospheric stratum.
[0090] 3. Gas absorption calculation: For each band (wavelength), the absorption cross section of each absorbing gas (water vapor, ozone, carbon dioxide, etc.) at that wavelength is obtained from the HITRAN database.
[0091] Using the Kratz parametric method, the absorption coefficient of each atmospheric layer is calculated by combining the vertical concentration distribution of the gas, pressure, and temperature profiles. The absorption coefficient = absorption cross-section × gas concentration × path length correction factor, thus constructing a layered absorption coefficient matrix.
[0092] Integrate the absorption coefficient of each layer along the path to obtain the optical thickness of each layer, and then calculate the gas absorption transmittance of each layer according to the Lambert-Beer law. T=exp(-τ_absorption), where T represents the gas absorption transmittance and τ_absorption is the absorption optical depth or absorption optical thickness.
[0093] By combining all gases and all layers, the total absorption and transmittance of the entire atmosphere is obtained.
[0094] 4. Output results: Total absorbed gas permeability (entire atmosphere).
[0095] Layered absorption coefficient matrix (absorption coefficient of each gas in each layer).
[0096] The steps for calculating atmospheric molecular scattering (based on the Bodhaine formula) are as follows: Based on an atmospheric profile model and spectral range parameters, the molecular scattering optical thickness, molecular scattering stratification extinction coefficient, and Rayleigh phase function are calculated using the Bodhaine formula. An example of this process is shown below: 1. Input parameter preparation: Obtain the atmospheric profile model and spectral range parameters from the validated parameters.
[0097] 2. Calculation of Bodhaine scattering coefficient: The air refractive index was calculated by applying Bodhaine's (1999) formula for each wavelength, taking into account wavelength dependence; the King factor (F_air = 1.048) was applied to account for polarization and air composition; and the Rayleigh scattering cross section was calculated. 3. Scattering coefficient conversion: The scattering cross section is converted into a scattering coefficient, taking into account pressure and temperature correction factors.
[0098] 4. Optical thickness calculation: The scattering optical thickness is calculated for each layer, and the integral is used to obtain the molecular scattering optical thickness of the entire layer. 5. Rayleigh phase function calculation: Calculate the phase function of Rayleigh scattering, which describes the probability distribution of photons being scattered in different directions. The Rayleigh phase function has the form (3 / 4)(1 + cos...). 2 θ), where θ is the scattering angle.
[0099] 6. Output results: Molecular scattering optical thickness (entire atmosphere).
[0100] Layered scattering coefficient matrix (molecular scattering coefficients of each layer).
[0101] Rayleigh phase function (describes the directionality of molecular scattering).
[0102] Steps for calculating the optical properties of aerosols: Based on an aerosol model and combined with aerosol parameters, the optical properties of aerosols are calculated using Mie theory. These optical properties include the aerosol stratification extinction coefficient, the aerosol stratification scattering coefficient, and the aerosol phase function. A specific example of this process is shown below: Steps for calculating the optical properties of aerosols (based on Mie theory) Input parameter preparation Obtain the aerosol model and aerosol concentration parameters from the validated parameters.
[0103] Mie Theory Implementation: 1. Acquisition of aerosol model parameters: Obtain aerosol particle size distribution data, aerosol complex refractive index, and aerosol vertical distribution model.
[0104] 2. Mie scattering core calculation: The Mie scattering parameters are calculated independently for each wavelength and for each particle size range in the particle size distribution. The size parameter is calculated as: x = 2πr / λ, where x is the size parameter, r is the radius of the scattering particle, and λ is the incident light wavelength.
[0105] 3. Efficiency factor calculation: The extinction efficiency factor Qext, scattering efficiency factor, and absorption efficiency factor Qabs = Qext – Qsca were calculated using Mie theory.
[0106] 4. Calculate the volume optical coefficients: Integrating the full particle size spectrum Calculate the volume extinction coefficient = Σ(Qext × πr) 2 × number concentration), where Qext is the extinction efficiency factor and r is the radius of the scattering particle.
[0107] Calculate the volume scattering coefficient = Σ(Qsca × πr) 2 × number concentration), where Qsca is the scattering efficiency factor and r is the radius of the scattering particle.
[0108] Calculate the volume absorption coefficient = volume extinction coefficient - volume scattering coefficient.
[0109] 5. Phase function calculation: Calculate the phase function for each particle size range.
[0110] The phase function contribution across all particle size ranges is calculated by weighting the scattering intensity.
[0111] The total phase function is normalized.
[0112] 6. Calculation of layered optical properties: By combining the aerosol vertical distribution model, the bulk optical coefficients are decomposed into each atmospheric layer, and the extinction coefficient and scattering coefficient of each layer are calculated. 7. Calculation of single-scattering albedo: The single-scattering albedo ω = scattering coefficient / extinction coefficient is calculated, which characterizes the proportion of scattering in the total extinction.
[0113] 8. Output Results Layered extinction coefficient matrix: aerosol extinction coefficient for each atmospheric layer.
[0114] Layered scattering coefficient matrix: aerosol scattering coefficients for each atmospheric layer.
[0115] Aerosol phase function: A function that describes the directionality of aerosol scattering.
[0116] Single scattering albedo: the proportion of aerosol scattering in total extinction.
[0117] The process of integrating various models and results is as follows: 1. Create a comprehensive optical property calculator.
[0118] 2. Call the three calculation modules in sequence: First, calculate the molecular absorption characteristics, then the molecular scattering characteristics, and finally the aerosol optical characteristics.
[0119] 3. Results Integration: The outputs of the three modules are encapsulated into a unified optical property object to ensure the consistency of data structure and format, thereby preparing a complete input dataset for solving the radiative transfer equation.
[0120] The method provided in this embodiment ensures the accurate calculation of the atmospheric radiative transfer physical model, providing reliable optical property input data for subsequent radiative transfer equation solving and surface reflectance inversion.
[0121] According to the atmospheric correction method based on the JAVA language provided by the present invention, the optical properties include total extinction coefficient, total single albedo, and total phase function; the optical properties are synthesized based on the output of the model corresponding to each independent object, including: The total extinction coefficient is obtained by summing the stratified absorption coefficient of atmospheric molecules, the stratified extinction coefficient of molecular scattering, and the stratified extinction coefficient of aerosols. The molecular scattering extinction coefficient and the aerosol scattering coefficient are summed, and the ratio of the summation value to the total extinction coefficient is calculated. This ratio is then used as the total single albedo. Multiply the molecular scattering extinction coefficient and the Rayleigh phase function to obtain the first multiplication result; multiply the aerosol scattering coefficient and the aerosol phase function to obtain the second multiplication result; add the first multiplication result and the second multiplication result to obtain the first addition term. Adding the molecular scattering extinction coefficient to the aerosol scattering coefficient yields the second phase addition term. Dividing the first phase addition term by the second phase addition term yields the overall phase function.
[0122] Specifically, in some embodiments, the process of synthesizing optical properties is achieved through the following steps: (1) Calculate the total extinction coefficient: The total extinction coefficient is obtained by summing the stratified absorption coefficient of atmospheric molecules, the stratified extinction coefficient of molecular scattering, and the stratified extinction coefficient of aerosols. For example, the total extinction coefficient can be calculated using the following formula: Total extinction coefficient = atmospheric molecular stratification absorption coefficient + molecular scattering stratification extinction coefficient + stratification aerosol stratification extinction coefficient.
[0123] (2) Calculate the total single albedo: The molecular scattering extinction coefficient and the aerosol scattering coefficient are summed, and the ratio of the sum to the total extinction coefficient is calculated. This ratio is then used to determine the total albedo. For example, the total albedo can be calculated using the following formula: Total single albedo = (Molecular scattering extinction coefficient + Aerosol scattering coefficient) / Total extinction coefficient (3) Calculate the total phase function: Multiplying the molecular scattering extinction coefficient by the Rayleigh phase function yields the first multiplication result; multiplying the aerosol scattering coefficient by the aerosol phase function yields the second multiplication result; adding the first and second multiplication results yields the first addition term; adding the molecular scattering extinction coefficient by the aerosol scattering coefficient yields the second addition term; dividing the first addition term by the second addition term yields the total phase function. The total phase function is calculated using the following formula: That is, by weighted averaging the scattering contributions of molecules and aerosols, the total single albedo and total phase function of each layer are obtained.
[0124] The method provided in this embodiment first synthesizes the outputs of three processes: atmospheric molecular absorption calculation, atmospheric molecular scattering calculation, and aerosol model calculation. The molecular absorption coefficient, molecular scattering coefficient, aerosol extinction, and scattering coefficient of each layer are added together to obtain the total extinction coefficient of each layer. The weighted average of the scattering contributions of molecules and aerosols is then used to obtain the total single albedo and total phase function of each layer. Next, based on the synthesized optical properties and the surface reflectance model, the successive scattering method is used to solve the radiative transfer equation to obtain the radiative transfer results. Then, based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, atmospheric correction coefficients are generated. Based on these atmospheric correction coefficients, atmospheric correction is performed on the hyperspectral image file, and the surface reflectance of the hyperspectral image file is retrieved, effectively achieving accurate atmospheric correction of remote sensing images.
[0125] According to the present invention, an atmospheric correction method based on the JAVA language is provided. The radiative transfer results include atmospheric intrinsic reflectivity, total absorbing gas transmittance, total downlink transmittance, total uplink transmittance, spherical albedo, and the hemispherical integral value of downlink atmospheric radiation. The atmospheric correction coefficients include atmospheric path radiative reflectivity, surface reflection signal attenuation factor, and surface atmospheric multiple reflection factor. Based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, atmospheric correction coefficients are generated, including: The atmospheric path radiative reflectance is calculated based on solar spectral irradiance, cosine of solar zenith angle, hemispherical integral of atmospheric downward radiation, total absorbing gas transmittance, total upward transmittance, and total downward transmittance. The surface reflection signal attenuation factor is calculated based on the total upward transmittance, total downward transmittance, and total absorbed gas transmittance. Based on the spherical albedo of the macrosphere, the multiple reflection factor of the Earth's surface atmosphere was determined.
[0126] Specifically, in some embodiments, the radiative transfer results include atmospheric intrinsic reflectivity, total absorbing gas transmittance, and total downlink transmittance. Total Upward Transmission Rate , Large balloon surface albedo hemispherical integral of downward atmospheric radiation Among them, intrinsic atmospheric reflectivity represents the ratio of solar radiation energy reflected back into outer space purely by the atmosphere to the incident solar radiation energy. Total downward transmittance characterizes the transmittance of sunlight to the Earth's surface (direct + scattered). Total upward transmittance characterizes the transmittance of sunlight from the Earth's surface to the sensor (direct + scattered). Hemispherical albedo of the atmosphere is the hemispherical reflectivity of the atmosphere. Hemispherical integral of atmospheric downward radiation characterizes the total downward irradiance reaching the Earth's surface.
[0127] Atmospheric correction factors include atmospheric path radiative reflectance. Surface reflection signal attenuation factor and surface atmospheric multiple reflectance Among them, atmospheric correction coefficients are intermediate parameters used for surface reflectance correction. Their core function is to use the quantification parameters of atmospheric effects to invert the radiation values received by the sensor into the true surface reflectance.
[0128] Step 104, generating the atmospheric correction coefficients, is achieved through the following steps: 1. Calculate atmospheric path radiative reflectivity : The atmospheric path radiative reflectance is calculated based on solar spectral irradiance, cosine of solar zenith angle, hemispherical integral of atmospheric downward radiation, total absorbing gas transmittance, total upward transmittance, and total downward transmittance. Atmospheric path radiative reflectivity The atmospheric path reflectance represents the portion of the signal that photons, after being scattered by atmospheric molecules and aerosols and never reaching the Earth's surface, directly enter the sensor's field of view. The atmospheric path reflectance is calculated using the following formula. : in, Indicates atmospheric path radiative reflectivity. Indicates solar spectral irradiance, This represents the cosine value of the solar zenith angle. This represents the hemispherical integral value of downward atmospheric radiation. The total absorbed gas permeability. Total uplink transmittance describes the efficiency of radiation transmission from the Earth's surface to the sensor. Total downlink transmittance describes the efficiency of radiation transmission from the sun to the Earth's surface.
[0129] 2. Calculate the attenuation factor of surface reflected signals. : The surface reflection signal attenuation factor is calculated based on the total upward transmittance, total downward transmittance, and total absorbed gas transmittance. This represents the total transmittance of light throughout the entire "downward-surface reflection-upward" process. It quantifies the attenuation (absorption and scattering) experienced by the surface-reflected signal during its journey through the atmosphere. The surface-reflected signal attenuation factor is calculated using the following formula. : in, The surface reflection signal attenuation factor, Atmospheric path radiation, The total absorbed gas permeability. Total uplink transmittance describes the efficiency of radiation transmission from the Earth's surface to the sensor. Total downlink transmittance describes the efficiency of radiation transmission from the sun to the Earth's surface.
[0130] 3. Calculate the atmospheric multiple reflection factor at the Earth's surface. Based on the albedo of the spherical surface, the multiple reflectance factor of the Earth's surface atmosphere was determined. This corrects for energy loss due to multiple scatterings of surface reflected radiation in the atmosphere, ensuring the correction result conforms to the Lambertian assumption or actual surface reflection characteristics. Its value is equal to the albedo of the spherical surface. That is: in, It is a multiple reflectance factor of the Earth's surface atmosphere. The albedo is the surface reflectance of the balloon.
[0131] The method provided in this embodiment transforms complex radiative transfer results into three easy-to-use coefficients, thereby enabling efficient atmospheric correction of a large number of satellite images.
[0132] According to the present invention, an atmospheric correction method based on the JAVA language is used to perform atmospheric correction on a hyperspectral image file based on the radiance data and atmospheric correction coefficients of the hyperspectral image file, and to retrieve the surface reflectance of the hyperspectral image file, including: Apparent reflectance is determined based on radiance data, the distance between the Earth and the Sun, solar spectral irradiance, and solar zenith angle. The apparent reflectance is corrected using atmospheric correction factors to obtain the surface reflectance of the hyperspectral image file.
[0133] Specifically, in some embodiments, step 104, which involves inverting the surface reflectance of the hyperspectral image file, is achieved through the following steps: First, based on radiance data, the distance between the Earth and the Sun, solar spectral irradiance, and solar zenith angle, apparent reflectance is determined. Radiance refers to the radiance or reflectance data obtained after radiometric calibration of remote sensing image data. Apparent reflectance is calculated using the following formula: in, Apparent reflectance, Radiance, The distance between the Earth and the Sun. Solar spectral irradiance, This is the solar zenith angle.
[0134] Furthermore, atmospheric correction factors are used to correct the apparent reflectance to obtain the surface reflectance of the hyperspectral image file. These atmospheric correction factors include atmospheric path radiative reflectance, the attenuation factor of the surface reflectance signal, and the surface atmospheric multiple reflectance factor. Surface reflectance calculation involves correcting the observed data using atmospheric correction factors to remove atmospheric influences and obtain the surface reflectance. Surface reflectance (ACR) can be obtained by inversion using the following formula: in, For surface reflectance, This is the atmospheric correction factor. = * - , It represents the apparent reflectance.
[0135] In this invention, atmospheric correction coefficients are applied to each pixel of the input image, and its surface reflectance is calculated band by band. This includes: using the GDAL library, reading the pixel radiance values of the TIF by band block to avoid loading the entire image into memory at once; for each band value of each pixel, applying the correction coefficient formula of its corresponding band to calculate and update the band value; and writing the processed pixel values into a new GeoTIFF file that is completely consistent with the input file size and projection information.
[0136] The method provided in this embodiment determines the apparent reflectance based on radiance data, the distance between the Earth and the Sun, solar spectral irradiance, and solar zenith angle. Then, it corrects the apparent reflectance using atmospheric correction coefficients to obtain the surface reflectance of the hyperspectral image file, effectively achieving accurate atmospheric correction of remote sensing images.
[0137] According to the present invention, an atmospheric correction method based on the JAVA language is provided, the method further includes: Output the surface reflectance as a GeoTIFF file and generate a metadata file in JSON format; The metadata file is used to record log information about atmospheric correction coefficients and atmospheric correction methods based on the JAVA language.
[0138] Specifically, in some embodiments, the method further includes: Outputting surface reflectance as a GeoTIFF file, GeoTIFF is a file format that combines TIFF image format with geospatial information. For example, the processed pixel values are written to a new GeoTIFF file with the exact same size and projection information as the input file. Specifically, GDAL is used to write the surface reflectance matrix from memory or cache to a disk file, ensuring that all georeferenced and metadata information is correctly written.
[0139] Furthermore, a metadata file in JSON format is generated, that is, an auxiliary metadata file is generated, which records the main parameters used in this calibration, AOD of each band, transmittance and other key information.
[0140] The method provided in this embodiment uses GDAL to write the surface reflectance matrix in memory or cache to a disk file, generating an auxiliary metadata file that records the main parameters used in this correction, key information such as AOD and transmittance for each band, so as to facilitate quick query of atmospheric correction results.
[0141] Figure 2 This is the second flowchart of the atmospheric correction method based on the JAVA language provided by the present invention, as shown below. Figure 2 As shown, the method includes: Get input parameters: Read TIF image data; read image metadata, including analytical geometric parameters, analytical atmospheric model parameters, and analytical spectral parameters; Loading aerosol parameters, loading gas absorption parameters, loading surface reflection parameters; Enter the aerosol type and the aerosol concentration (in kilometers); Based on the above input parameters, the calculations are performed for gas molecule absorption, atmospheric molecule scattering, aerosol model, radiative transfer equation, correction coefficient generation, surface reflectance inversion, and result output.
[0142] Figure 3 This is a schematic diagram illustrating the effect of the atmospheric correction method based on the JAVA language provided by the present invention, as shown below. Figure 3 The image shows a scatter plot representing the surface reflectance results for two spectral bands. It includes two subplots: the left subplot represents the results from this embodiment, and the right subplot represents the ENVI results. ENVI stands for Environment for Visualizing Images, a leading remote sensing image processing and analysis software. As can be seen from the figure, in the scatter plot of the embodiment, the data points are closely distributed around the 1:1 line, indicating that the surface reflectance results for the two spectral bands are very similar and the atmospheric correction effect is good. However, in the ENVI scatter plot, the data points are unevenly distributed, indicating a significant difference in the surface reflectance results between the two spectral bands.
[0143] The atmospheric correction device based on JAVA language provided by the present invention will be described below. The atmospheric correction device based on JAVA language described below can be referred to in correspondence with the atmospheric correction method based on JAVA language described above.
[0144] Figure 4 This is a schematic diagram of the atmospheric correction device based on the JAVA language provided by the present invention, as shown below. Figure 4 As shown, the JAVA-based atmospheric correction device 400 includes the following modules: The parsing module 410 is used to read the input hyperspectral image file through the JAVA GDAL library, parse the metadata of the hyperspectral image file, and obtain the input parameters. The object-oriented design module 420 is used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model into independent objects based on the input parameters, and dynamically combine the models corresponding to each independent object through a polymorphic mechanism; the output of the model corresponding to the independent object is calculated based on the model input corresponding to the independent object. The atmospheric correction module 430 is used to input the input parameters into the atmospheric profile model, the gas absorption model, and the aerosol model respectively, to obtain the output of the model corresponding to each independent object, to synthesize optical properties based on the output of the model corresponding to each independent object, and to solve the radiative transfer equation using the successive scattering method based on the optical properties and the surface reflectance model to obtain the radiative transfer result. Based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, an atmospheric correction coefficient is generated. Based on the radiance data of the hyperspectral image file and the atmospheric correction coefficient, atmospheric correction is performed on the hyperspectral image file to obtain the surface reflectance of the hyperspectral image file.
[0145] The apparatus provided in this invention employs object-oriented design, encapsulating atmospheric profile models, gas absorption models, aerosol models, and surface reflectance models into independent objects based on input parameters. Through a polymorphic mechanism, the models corresponding to each independent object are dynamically combined. Within each independent object, the output of its corresponding model is calculated based on the input model, achieving accurate modeling of classical physical processes. The object-oriented design also significantly improves the maintainability, cross-platform capability, and computational performance in distributed environments. Furthermore, the input parameters are input into the modeled atmospheric profile model, gas absorption model, and aerosol model respectively to obtain the output of each independent object's model. Based on the output, the optical properties are synthesized, and the successive scattering method is used to solve the radiative transfer equation using the surface reflectance model to obtain the radiative transfer result. Then, based on the radiative transfer result and the solar spectral irradiance parameter in the input parameters, atmospheric correction coefficients are generated. These atmospheric correction coefficients are then used to perform atmospheric correction on the hyperspectral image file, inverting the surface reflectance of the hyperspectral image file, effectively achieving accurate atmospheric correction of remote sensing images.
[0146] Figure 5 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 5 As shown, the electronic device may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540. The processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions from the memory 530 to execute an atmospheric correction method based on the JAVA language.
[0147] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0148] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the atmospheric correction method based on the JAVA language provided by the above methods.
[0149] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the atmospheric correction methods based on the JAVA language provided by the above methods.
[0150] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0151] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable 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, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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 of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.< / atmosphericcorrectionparameters> < / string> < / atmosphericcorrectionparameters>
Claims
1. An atmospheric correction method based on the JAVA language, characterized in that, include: The input hyperspectral image file is read using the JAVA GDAL library, and the metadata of the hyperspectral image file is parsed to obtain the input parameters. Based on the input parameters, an object-oriented design is used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and surface reflectance model into independent objects. The models corresponding to each independent object are dynamically combined through a polymorphic mechanism. The output of the model corresponding to the independent object is calculated based on the model input of the independent object. The input parameters are respectively input into the atmospheric profile model, the gas absorption model, and the aerosol model to obtain the output of the model corresponding to each independent object. Based on the output of the model corresponding to each independent object, optical properties are synthesized. Based on the optical properties and the surface reflectance model, the successive scattering method is used to solve the radiative transfer equation to obtain the radiative transfer result. Based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, an atmospheric correction coefficient is generated. Based on the radiance data of the hyperspectral image file and the atmospheric correction coefficient, atmospheric correction is performed on the hyperspectral image file to obtain the surface reflectance of the hyperspectral image file.
2. The atmospheric correction method based on JAVA language according to claim 1, characterized in that, Based on the input parameters, the atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model are encapsulated into independent objects using object-oriented design, including: The input parameters are automatically validated and standardized using Java's strong typing features and validation annotation framework to obtain validated parameters. Based on the verified parameters, the atmospheric profile model, the gas absorption model, the aerosol model, and the surface reflectance model are encapsulated into independent objects using object-oriented design.
3. The atmospheric correction method based on JAVA language according to claim 1, characterized in that, The input parameters include sensor height parameters, spectral range parameters, and aerosol parameters; the output of the model corresponding to each independent object includes the absorption transmittance of atmospheric molecules, the stratified absorption coefficient of atmospheric molecules, the scattering coefficient of atmospheric molecules, the molecular scattering optical thickness, the molecular scattering stratified extinction coefficient, the Rayleigh phase function, and the optical properties of aerosols. The step of inputting the input parameters into the atmospheric profile model, the gas absorption model, and the aerosol model respectively to obtain the output of the model corresponding to each independent object includes: Based on the atmospheric profile model and the gas absorption model, combined with the spectral range parameters and the sensor height parameters, the absorption transmittance of the atmospheric molecules, the stratification absorption coefficient of the atmospheric molecules, and the scattering coefficient of the atmospheric molecules are calculated using the Kratz parameterization method based on the HITRAN database. Based on the atmospheric profile model and the spectral range parameters, the molecular scattering optical thickness, the molecular scattering stratification extinction coefficient, and the Rayleigh phase function are calculated using the Bodhaine formula. Based on the aerosol model and the aerosol parameters, the optical properties of the aerosol are calculated using Mie theory. The optical properties of the aerosol include the aerosol stratified extinction coefficient, the aerosol stratified scattering coefficient, and the aerosol phase function.
4. The atmospheric correction method based on JAVA language according to claim 3, characterized in that, The optical properties include the total extinction coefficient, the total single albedo, and the total phase function; the synthesized optical properties based on the output of the model corresponding to each of the independent objects include: The total extinction coefficient is obtained by summing the stratified absorption coefficient of the atmospheric molecules, the stratified extinction coefficient of the molecular scattering, and the stratified extinction coefficient of the aerosol. The molecular scattering layered extinction coefficient and the aerosol layered scattering coefficient are summed, and the ratio of the summation value to the total extinction coefficient is calculated. The ratio is then determined as the total single albedo. Multiply the molecular scattering layer extinction coefficient and the Rayleigh phase function to obtain the first multiplication result; multiply the aerosol layer scattering coefficient and the aerosol phase function to obtain the second multiplication result; add the first multiplication result and the second multiplication result to obtain the first addition term. The molecular scattering layer extinction coefficient is added to the aerosol layer scattering coefficient to obtain a second addition term. The first addition term is divided by the second addition term to obtain the total phase function.
5. The atmospheric correction method based on JAVA language according to claim 1, characterized in that, The radiative transfer results include total absorbing gas transmittance, total downlink transmittance, total uplink transmittance, spherical albedo, and hemispherical integral of downlink atmospheric radiation; the atmospheric correction coefficients include atmospheric path radiative reflectance, surface reflection signal attenuation factor, and surface atmospheric multiple reflection factor; the generation of atmospheric correction coefficients based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters includes: The atmospheric path radiative reflectance is calculated based on the solar spectral irradiance, the cosine of the solar zenith angle, the hemispherical integral of the downward atmospheric radiation, the total absorbing gas transmittance, the total upward transmittance, and the total downward transmittance. The surface reflection signal attenuation factor is calculated based on the total upward transmittance, the total downward transmittance, and the total absorbed gas transmittance. Based on the atmospheric albedo of the giant balloon, the multiple reflection factor of the Earth's surface atmosphere is determined.
6. The atmospheric correction method based on JAVA language according to claim 1, characterized in that, The process of performing atmospheric correction on the hyperspectral image file based on the radiance data and the atmospheric correction coefficient, and then retrieving the surface reflectance of the hyperspectral image file, includes: Based on the radiance data, the distance between the Earth and the Sun, the solar spectral irradiance, and the solar zenith angle, the apparent reflectance is determined; The apparent reflectance is corrected using the atmospheric correction coefficient to obtain the surface reflectance of the hyperspectral image file.
7. The atmospheric correction method based on JAVA language according to any one of claims 1-6, characterized in that, The method further includes: The surface reflectance is output as a GeoTIFF file, and a metadata file in JSON format is generated; wherein, the metadata file is used to record the atmospheric correction coefficient and the log information of the atmospheric correction method based on the JAVA language.
8. An atmospheric correction device based on the JAVA language, characterized in that, include: The parsing module is used to read the input hyperspectral image file through the JAVA GDAL library, parse the metadata of the hyperspectral image file, and obtain the input parameters. The object-oriented design module is used to encapsulate the atmospheric profile model, gas absorption model, aerosol model, and surface reflectivity model into independent objects based on the input parameters, and dynamically combine the models corresponding to each independent object through a polymorphic mechanism; the output of the model corresponding to the independent object is calculated based on the model input of the independent object. An atmospheric correction module is used to input the input parameters into the atmospheric profile model, the gas absorption model, and the aerosol model respectively, to obtain the output of the model corresponding to each independent object, to synthesize optical properties based on the output of the model corresponding to each independent object, and to solve the radiative transfer equation using the successive scattering method based on the optical properties and the surface reflectance model to obtain the radiative transfer result. Based on the radiative transfer results and the solar spectral irradiance parameter in the input parameters, an atmospheric correction coefficient is generated. Based on the radiance data of the hyperspectral image file and the atmospheric correction coefficient, atmospheric correction is performed on the hyperspectral image file to obtain the surface reflectance of the hyperspectral image file.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the atmospheric correction method based on the JAVA language as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the JAVA-based atmospheric correction method as described in any one of claims 1 to 7.