Remote sensing image real-time rendering method and device based on b / s architecture and storage medium
Patent Information
- Application Number
- CN202310285692.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2043-03-22
AI Technical Summary
[0051]本发明的一种基于B/S架构的遥感影像实时渲染方法系统、设备及存储介质,实现了光学遥感影像瓦片数据实时生成,在后台建立光学遥感影像数据与PNG瓦片数据的转换几何关系,根据PNG瓦片数据范围和转换几何关系计算待读取的光学遥感影像数据块范围,对光学遥感影像数据块进行读取和处理,实现像素级的转换几何关系转换,构建生成PNG瓦片数据,解决B/S架构不能对1级及1级以上高分系列、资源系列等标准景光学遥感影像进行实时渲染显示问题,达到在应急情况、实时判读情况下,无须光学遥感影像数据切瓦片,增加光学遥感影像数据在B/S架构下显示方式,实现满足B/S架构渲染显示规则的光学遥感影像实时渲染显示方法,提升作业员作业效率。
Smart Images

Figure CN116309915B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of remote sensing image interpretation and intelligent image analysis technology, and in particular to a remote sensing image real-time rendering method system, device and storage medium based on B / S architecture. Background Technology
[0002] Real-time rendering technology for remote sensing imagery is widely used in remote sensing GIS software and has become a basic function of this type of software. Remote sensing GIS software is generally divided into desktop software, WebGIS software, and mobile software. Desktop software has the most powerful functions, capable of processing, analyzing, and displaying various types of data. WebGIS software has weaker functions, capable of displaying and simplifying the analysis of some standardized data. Mobile software is similar to WebGIS software, with weaker functions, capable of displaying and simplifying the analysis of some standardized data, and is more suitable for mobile devices such as mobile phones and tablets.
[0003] With the development of WebGIS, an increasing number of remote sensing GIS applications are being developed based on WebGIS, leading to a flourishing of WebGIS applications. Simultaneously, image interpretation and analysis software developed based on desktop software architectures is also trending towards WebGIS applications. Existing WebGIS platforms require pre-processing of optical remote sensing images into tiles before loading them, thus preventing direct loading of the image data and hindering real-time image stretching and tone adjustment. This means that existing WebGIS platforms cannot meet the needs of image interpretation and analysis software evolving towards WebGIS.
[0004] With the continuous advancement of remote sensing GIS and computer technology, WebGIS platforms are capable of undertaking more data display and processing tasks. Compared to existing WebGIS platforms, their data display and processing processes can be separated into front-end and back-end, thereby enhancing the image display capabilities of WebGIS platforms. This is also one of the development directions for next-generation WebGIS platforms. With the new demands and requirements of users in image interpretation and analysis, developing image interpretation and analysis software using WebGIS platforms has become an important research direction. Therefore, research on real-time rendering technology for remote sensing images based on B / S architecture has become an important way to improve the capabilities of WebGIS platforms and has become a key research focus for various manufacturers. Summary of the Invention
[0005] To address the technical problems existing in the prior art, the present invention aims to provide a real-time rendering method, device, and storage medium for remote sensing images based on a B / S architecture. This method solves the problem of the inability to render and display optical remote sensing images in real time under a B / S architecture. By establishing the geometric relationship between optical remote sensing image data and PNG tile data, an algorithm for real-time generation of PNG tile data is provided. Furthermore, it meets the requirements for real-time display, image stretching, and color adjustment of optical remote sensing image data under a B / S architecture, effectively utilizes computer resources, enhances the capabilities of the WebGIS platform, and meets the requirements of image interpretation and analysis users in WebGIS platform development.
[0006] To achieve the above-mentioned objectives, this invention provides a real-time rendering method for remote sensing images based on a B / S architecture, comprising the following steps:
[0007] Step S1: The front end requests tile data;
[0008] Step S2: Read the attribute information of the optical remote sensing image data;
[0009] Step S3: Establish the geometric relationship for the conversion between optical remote sensing image data and PNG tile data;
[0010] Step S4: Calculate the range intersection of the optical remote sensing image data and the PNG tile data;
[0011] Step S5: Process the read optical remote sensing image data blocks;
[0012] Step S6: Construct PNG tile data and return the generated tile data to the front end.
[0013] According to one aspect of the present invention, in step S1, the front end requests the required tile data via an HTTP request, and the request information includes the optical remote sensing image data path and the latitude and longitude range of the tile data. .
[0014] According to one aspect of the present invention, in step S2, the optical remote sensing image data is opened, and the width of the optical remote sensing image data is read. ,high Number of bands Geographic reference information and RPC parameters.
[0015] According to one aspect of the present invention, in step S3, if the optical remote sensing image data contains georeferenced information, a coordinate projection transformation geometric relationship is established between the optical remote sensing image data and the tile data; if the optical remote sensing image data contains RPC parameters, a RPC transformation geometric relationship is established between the optical remote sensing image data and the tile data.
[0016] Establish the geometric relationship for coordinate projection transformation: Let the coordinates of pixel A at a certain point in the optical remote sensing image data be... The corresponding projected coordinates The corresponding geographic coordinates Affine transformation six parameters If the coordinate reference is in WKT form, the transformation relationship between pixel coordinates and projected coordinates is as follows:
[0017] ;
[0018] The transformation relationship between projected coordinates and geographic coordinates can be created using the coordinate reference WKT form and the OGRCoordinateTransformation function in GDAL. The Transform function is then used to transform between projected coordinates and geographic coordinates.
[0019] Establish RPC transformation geometric relationships: Let the coordinates of pixel A at a certain point in the optical remote sensing image data be... The corresponding projected coordinates The corresponding geographic coordinates The conversion relationship between pixel coordinates and geographic coordinates is achieved by using GDALCreateRPCTransformer in GDAL to build an RPC parameter conversion model, and using the function GDALRPCTransform to convert between pixel coordinates and geographic coordinates.
[0020] According to one aspect of the present invention, step S4 specifically includes:
[0021] The geographic extent of the optical remote sensing image data is calculated using the transformation geometric relationship established in step S3. The intersection of the geographic range of tile data and optical remote sensing image data The calculation formula is:
[0022]
[0023] in, This represents the latitude and longitude range of the tile data.
[0024] According to one aspect of the present invention, step S5 specifically includes:
[0025] Step S51: Based on the transformation geometric relationship established in step S3, calculate the intersection of geographical ranges. Pixel coordinates on optical remote sensing images;
[0026] Step S52: Read the optical remote sensing image block data according to the pixel coordinate range on the optical remote sensing image;
[0027] Step S53: Process the read optical remote sensing image block data for data without data values;
[0028] Step S54: Then process the data that has no data values to be processed by one of the following methods: maximum and minimum value stretching, percentage truncation, histogram equalization, Gamma enhancement, or standard deviation stretching.
[0029] According to one aspect of the present invention, in step S53, the no-data-value processing includes: if the optical remote sensing image data has no no-data-value, then the pixel value 0 is treated as a no-data-value; if there is a no-data-value, then the output pixel value is assigned to 0, and the formula for the output tile pixel value is as follows:
[0030]
[0031] Among them, the raw pixel values of the input optical remote sensing image data are The output tile pixel value is .
[0032] According to one aspect of the invention, in step S54,
[0033] The maximum and minimum value stretching includes: maximum and minimum value stretching and 16-bit to 8-bit conversion processing, the formula is as follows:
[0034] ;
[0035] The percentage truncation includes: using a percentage truncation value to truncate the histogram frequency N to the left and right ends respectively. Calculate the new maximum pixel value and minimum pixel value The output tile pixel value is calculated using the following formula:
[0036] ;
[0037] The histogram equalization includes: calculating the cumulative gray-level distribution frequency of each level of the histogram based on the histogram level and histogram frequency. The calculation formula is as follows:
[0038] ;
[0039] Calculate the pixel values for histogram equalization using the cumulative gray-level distribution frequency. Finally, the maximum and minimum values are used for stretching, and the calculation formula is as follows:
[0040]
[0041] ;
[0042] The Gamma enhancement includes: normalizing the original pixel value, then performing Gamma processing and inverse normalization, and finally performing maximum and minimum value stretching. The calculation formula is as follows:
[0043]
[0044] Where t is the normalized value. This is the value after Gamma processing. For inverse normalized values;
[0045] The standard deviation stretching includes: calculating new maximum and minimum pixel values using the image pixel standard deviation and pixel mean, and finally performing maximum and minimum value stretching. The calculation formula is as follows:
[0046] ;
[0047] Among them, the maximum pixel value of optical remote sensing image data is The minimum pixel value is The average pixel value is The mean squared error of pixel values is The pixel has no data value. The histogram series is N is the total number of pixels, and the histogram frequency is... The Gamma value is The percentage cutoff value is Standard deviation ratio Let the original pixel value of the input optical remote sensing image data be... The output tile pixel value is .
[0048] According to one aspect of the present invention, an electronic device is provided, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory; when the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform a real-time rendering method for remote sensing images based on a B / S architecture as described in any of the above technical solutions.
[0049] According to one aspect of the present invention, a computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement a real-time rendering method for remote sensing images based on a B / S architecture as described in any of the above technical solutions.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] This invention discloses a real-time rendering method, system, device, and storage medium for remote sensing images based on a B / S architecture. It achieves real-time generation of optical remote sensing image tile data, establishes a conversion geometric relationship between optical remote sensing image data and PNG tile data in the background, calculates the range of optical remote sensing image data blocks to be read based on the PNG tile data range and the conversion geometric relationship, reads and processes the optical remote sensing image data blocks, achieves pixel-level conversion geometric relationship transformation, and constructs and generates PNG tile data. This solves the problem that the B / S architecture cannot perform real-time rendering and display of standard scene optical remote sensing images such as Level 1 and above high-resolution series and resource series. It achieves the goal of eliminating the need for optical remote sensing image data tile cutting in emergency situations and real-time interpretation, increases the display methods of optical remote sensing image data under the B / S architecture, realizes a real-time rendering and display method for optical remote sensing images that meets the rendering and display rules of the B / S architecture, and improves the work efficiency of operators. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0053] Figure 1 The diagram illustrates a real-time rendering method for remote sensing images based on a B / S architecture, as provided in an embodiment of the present invention.
[0054] Figure 2 This illustration shows how the percentage cutoff value in this embodiment of the invention is used to truncate the left and right ends of the histogram frequency N. A schematic diagram;
[0055] Figure 3 The diagram illustrates a flowchart of a real-time rendering method for remote sensing images based on a B / S architecture, according to another embodiment of the present invention. Detailed Implementation
[0056] The description of the embodiments in this specification should be taken in conjunction with the accompanying drawings, which should form part of the complete specification. In the drawings, the shape or thickness of the embodiments may be exaggerated and may be indicated in a simplified or convenient manner. Furthermore, parts of the various structures in the drawings will be described separately; it is worth noting that elements not shown in the figures or not described in words are in a form known to those skilled in the art.
[0057] The descriptions of the embodiments herein, including any references to directions and orientations, are for ease of description only and should not be construed as limiting the scope of the invention. The following description of preferred embodiments involves combinations of features, which may exist independently or in combination; the invention is not particularly limited to the preferred embodiments. The scope of the invention is defined by the claims.
[0058] like Figure 1 and Figure 3 As shown, the present invention provides a real-time rendering method for remote sensing images based on a B / S architecture, comprising the following steps:
[0059] Step S1: The front end requests tile data;
[0060] Step S2: Read the attribute information of the optical remote sensing image data;
[0061] Step S3: Establish the geometric relationship for the conversion between optical remote sensing image data and PNG tile data;
[0062] Step S4: Calculate the range intersection of the optical remote sensing image data and the PNG tile data;
[0063] Step S5: Process the read optical remote sensing image data blocks.
[0064] Step S6: Construct PNG tile data and return the generated tile data to the front end.
[0065] In this embodiment, according to the tile display rules of the B / S architecture, optical remote sensing image data is rendered in real time in the background into PNG tile data of size 256 pixels * 256 pixels. The rendered PNG tiles are then transmitted to the front-end view for display as required. To achieve real-time generation of optical remote sensing image tile data, a conversion geometric relationship between optical remote sensing image data and PNG tile data is established in the background. Based on the range of PNG tile data and the conversion geometric relationship, the range of optical remote sensing image data blocks to be read is calculated. The optical remote sensing image data blocks are read and processed to achieve pixel-level conversion geometric relationship transformation, thereby constructing and generating PNG tile data. This solves the problem that the B / S architecture cannot perform real-time rendering and display of standard scene optical remote sensing images such as Level 1 and above high-resolution series and resource series. It achieves the goal of eliminating the need for optical remote sensing image data tile cutting in emergency situations and real-time interpretation, increasing the display methods of optical remote sensing image data under the B / S architecture, realizing a real-time rendering and display method of optical remote sensing images that meets the rendering and display rules of the B / S architecture, and improving the work efficiency of operators.
[0066] In one embodiment of the present invention, preferably, in step S1, the front end requests the required tile data via an HTTP request, and the request information includes the optical remote sensing image data path and the latitude and longitude range of the tile data. .
[0067] In one embodiment of the present invention, preferably, in step S2, the optical remote sensing image data is opened and the width of the optical remote sensing image data is read. ,high Number of bands Geographic reference information and RPC parameters.
[0068] In one embodiment of the present invention, preferably, in step S3, if the optical remote sensing image data has georeferenced information, then a coordinate projection transformation geometric relationship is established between the optical remote sensing image data and the tile data; if the optical remote sensing image data has RPC parameters, then an RPC transformation geometric relationship is established between the optical remote sensing image data and the tile data.
[0069] Establish the geometric relationship for coordinate projection transformation: Let the coordinates of pixel A at a certain point in the optical remote sensing image data be... The corresponding projected coordinates The corresponding geographic coordinates Affine transformation six parameters If the coordinate reference is in WKT form, the transformation relationship between pixel coordinates and projected coordinates is as follows:
[0070] ;
[0071] The transformation relationship between projected coordinates and geographic coordinates can be created using the coordinate reference WKT form and the OGRCoordinateTransformation function in GDAL. The Transform function is then used to transform between projected coordinates and geographic coordinates.
[0072] Establish RPC transformation geometric relationships: Let the coordinates of pixel A at a certain point in the optical remote sensing image data be... The corresponding projected coordinates The corresponding geographic coordinates The conversion relationship between pixel coordinates and geographic coordinates is achieved by using GDALCreateRPCTransformer in GDAL to build an RPC parameter conversion model, and using the function GDALRPCTransform to convert between pixel coordinates and geographic coordinates.
[0073] In this embodiment, by constructing the conversion geometric relationship between optical remote sensing image data and PNG tile data, optical remote sensing image data blocks are read, rendered, and displayed, enabling direct rendering and display of optical remote sensing image data on existing B / S architecture software.
[0074] In one embodiment of the present invention, preferably, step S4 specifically includes:
[0075] The geographic extent of the optical remote sensing image data is calculated using the transformation geometric relationship established in step S3. The intersection of the geographic range of tile data and optical remote sensing image data The calculation formula is:
[0076]
[0077] in, This represents the latitude and longitude range of the tile data.
[0078] In one embodiment of the present invention, preferably, step S5 specifically includes:
[0079] Step S51: Based on the transformation geometric relationship established in step S3, calculate the intersection of geographical ranges. Pixel coordinates on optical remote sensing images;
[0080] Step S52: Read the optical remote sensing image block data according to the pixel coordinate range on the optical remote sensing image;
[0081] Step S53: Process the read optical remote sensing image block data for data without data values;
[0082] Step S54: Then process the data that has no data values to be processed by one of the following methods: maximum and minimum value stretching, percentage truncation, histogram equalization, Gamma enhancement, or standard deviation stretching.
[0083] In this embodiment, by processing the optical remote sensing image data blocks for data without data values, and then performing one of the following processing methods: maximum and minimum value stretching, percentage truncation, histogram equalization, Gamma enhancement, or standard deviation stretching, real-time image stretching of optical remote sensing images can be achieved on B / S architecture software.
[0084] In one embodiment of the present invention, preferably, in step S53, the no-data-value processing includes: if the optical remote sensing image data has no no-data-value, then the pixel value 0 is treated as a no-data-value; if there is a no-data-value, then the output pixel value is assigned to 0, and the formula for the output tile pixel value is as follows:
[0085]
[0086] Among them, the raw pixel values of the input optical remote sensing image data are The output tile pixel value is .
[0087] In one embodiment of the present invention, preferably, in step S54,
[0088] Maximum and minimum value stretching includes: maximum and minimum value stretching and 16-bit to 8-bit conversion, the formula is:
[0089] ;
[0090] like Figure 2 As shown, percentage truncation includes: using percentage truncation values to truncate the histogram frequencies N to the left and right ends respectively. Calculate the new maximum pixel value and minimum pixel value The output tile pixel value is calculated using the following formula:
[0091] ;
[0092] Histogram equalization includes: calculating the cumulative gray-level distribution frequency of each level of the histogram based on the histogram level and histogram frequency. The calculation formula is as follows:
[0093] ;
[0094] Calculate the pixel values for histogram equalization using the cumulative gray-level distribution frequency. Finally, the maximum and minimum values are used for stretching, and the calculation formula is as follows:
[0095]
[0096] ;
[0097] Gamma enhancement includes: normalizing the original pixel values, then performing Gamma processing and inverse normalization, and finally stretching the maximum and minimum values. The calculation formula is as follows:
[0098]
[0099] Where t is the normalized value. This is the value after Gamma processing. For inverse normalized values;
[0100] Standard deviation stretching includes: calculating new maximum and minimum pixel values using the image pixel standard deviation and pixel mean, and finally performing maximum and minimum value stretching. The calculation formula is as follows:
[0101] ;
[0102] Among them, the maximum pixel value of optical remote sensing image data is The minimum pixel value is The average pixel value is The mean squared error of pixel values is The pixel has no data value. The histogram series is N is the total number of pixels, and the histogram frequency is... The Gamma value is The percentage cutoff value is Standard deviation ratio Let the original pixel value of the input optical remote sensing image data be... The output tile pixel value is .
[0103] like Figure 3 As shown, the real-time rendering method for remote sensing images based on a B / S architecture according to the present invention includes the following steps:
[0104] (1) The front end requests tile data;
[0105] (2) Determine the validity of the rendering parameters, including the range of PNG tile data, optical remote sensing image data path, Gamma value, percentage cutoff value, and standard deviation ratio;
[0106] (3) If yes, open the optical remote sensing image data and obtain the width, height, number of bands, and data type information of the optical remote sensing image; if no, end directly.
[0107] (4) Read the attributes of the optical remote sensing image data, obtain the coordinate reference information (WKT, six parameters of affine transformation), and determine the validity of the coordinate reference information. If it is valid, use the coordinate projection transformation geometric relationship between the optical remote sensing image data and the tile data; if it is invalid, obtain the RPC parameters of the optical remote sensing image.
[0108] (5) If invalid, obtain the RPC parameters of the optical remote sensing image and determine the validity of the RPC parameters; if valid, use the RPC conversion geometric relationship between the optical remote sensing image data and the tile data.
[0109] (6) If valid, use the RPC conversion geometry between optical remote sensing image data and tile data; if invalid, terminate directly.
[0110] (7) Assign values to the attributes of the memory file. The attributes of the memory file include width, height, number of bands, data type, and band index value;
[0111] (8) Calculate the six parameters of the affine transformation of the PNG tile data based on the PNG tile data range and tile size;
[0112] (9) Calculate the geographic coordinates of the four corner points of the optical remote sensing image data based on the width, height and geometric transformation relationship of the optical remote sensing image data;
[0113] (10) Calculate the intersection of the geographic extent of the optical remote sensing image data and the geographic extent of the PNG tile data;
[0114] (11) Calculate the start row and column index values and end row and column index values of the optical remote sensing image data based on the intersection geographic range and geometric transformation relationship; similarly, calculate the start row and column index values and end row and column index values of the intersection geographic range on the PNG memory file based on the six parameters of the affine transformation of the intersection geographic range and PNG tile data, and finally calculate the number of rows and columns of the intersection geographic range on the PNG memory file;
[0115] (12) Calculate the width and height of the optical remote sensing image data block based on the number of rows and columns of the geographic area of the intersection of the steps in the PNG memory file;
[0116] (13) Calculate the six affine transformation parameters or RPC parameters of the optical remote sensing image data block based on the transformation geometry;
[0117] (14) Read the optical remote sensing image data block;
[0118] (15) Using the PNG memory file as the processing object, process each pixel value in the PNG memory file from left to right and from top to bottom in a loop; calculate the geographic coordinates of the pixels in the PNG memory file based on the number of rows and columns of the intersection geographic range on the PNG memory file and the transformation geometric relationship;
[0119] (13) If the optical remote sensing image data block is a coordinate projection relationship, then convert the geographic coordinates into projected coordinates according to the transformation geometry relationship, and then convert the projected coordinates into the pixel coordinates of the optical remote sensing image data block.
[0120] (17) If the optical remote sensing image data block is an RPC relationship, then convert the geographic coordinates to the pixel coordinates of the optical remote sensing image data block according to the transformation geometry relationship;
[0121] (18) Read the pixel value at specified pixel coordinates from the optical remote sensing image data block;
[0122] (19) Perform no data value processing on the pixel values, and then perform one of the following processing methods on the data that has no data value: maximum and minimum value stretching, percentage truncation, histogram equalization, Gamma enhancement, or standard deviation stretching.
[0123] (20) Loop through the pixel data in all the PNG memory files in sequence;
[0124] (21) Use the output tile data to construct PNG memory data, set the memory file to have no data value, and return the generated tile data to the front end.
[0125] According to one aspect of the present invention, an electronic device is provided, comprising: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory; when the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform a real-time rendering method for remote sensing images based on a B / S architecture as described in any of the above technical solutions.
[0126] According to one aspect of the present invention, a computer-readable storage medium is provided for storing computer instructions, which, when executed by a processor, implement a real-time rendering method for remote sensing images based on a B / S architecture as described in any of the above technical solutions.
[0127] This invention discloses a method, device, and storage medium for real-time rendering of remote sensing images based on a B / S architecture. According to the tile display rules of the B / S architecture, optical remote sensing image data is rendered in real-time in the background into 256-pixel * 256-pixel PNG tile data. The rendered PNG tiles are then transmitted to the front-end view for display as required. To achieve real-time generation of optical remote sensing image tile data, a geometric relationship between the optical remote sensing image data and the PNG tile data is established in the background. Based on the range of the PNG tile data and the geometric relationship, the range of the optical remote sensing image data block to be read is calculated. The optical remote sensing image data block is read and processed to achieve pixel-level geometric relationship transformation, constructing and generating PNG tile data. Ultimately, this achieves an algorithm scheme for real-time generation of optical remote sensing image data that meets the requirements of B / S architecture tile data.
[0128] Furthermore, it should be noted that the present invention can be provided as a method, apparatus, or computer program product. Therefore, embodiments of the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0129] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing terminal equipment to cause a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0131] It should also be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0132] Finally, it should be noted that the above description represents a preferred embodiment of the present invention. It should be pointed out that although preferred embodiments have been described, those skilled in the art, once they understand the basic inventive concept of the present invention, can make various improvements and modifications without departing from the principles described herein. These improvements and modifications should also be considered within the scope of protection of the present invention. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present invention.
Claims
1. A real-time rendering method for remote sensing images based on a B / S architecture, characterized in that, Includes the following steps: Step S1: The front-end requests tile data; the front-end requests the required tile data via an HTTP request, and the request information includes the optical remote sensing image data path and the latitude and longitude range of the tile data. ; Step S2: Read the attribute information of the optical remote sensing image data. The optical remote sensing image data information includes: the width, height, number of bands, georeferenced information, and RPC parameters of the optical remote sensing image data. Step S3: Establish the geometric relationship between optical remote sensing image data and PNG tile data in the background; If the optical remote sensing image data has georeferenced information and the georeferenced information is valid, then establish the coordinate projection transformation geometric relationship between the optical remote sensing image data and the tile data; if the optical remote sensing image data has RPC parameters and the RPC parameters are valid, then establish the RPC transformation geometric relationship between the optical remote sensing image data and the tile data; if both the georeferenced information and the RPC parameters are invalid, then the process ends. Step S4: Calculate the range intersection of the optical remote sensing image data and the PNG tile data, specifically including: The geographical extent of the optical remote sensing image data is calculated using the width and height of the optical remote sensing image data and the transformation geometric relationship established in step S3. The intersection of the geographic range of tile data and optical remote sensing image data The calculation formula is: in, This is represented as the latitude and longitude range of the tile data; Step S5: Read and process the optical remote sensing image data block, specifically including: Step S51: Based on the intersection geographic range and the transformation geometric relationship established in step S3, calculate the start row and column index values and the end row and column index values of the optical remote sensing image data; and based on the intersection geographic range and the six parameters of the affine transformation of the PNG tile data, calculate the start row and column index values and the end row and column index values of the intersection geographic range on the PNG memory file, as well as the number of rows and columns of the intersection geographic range on the PNG memory file. Step S52: Calculate the width and height of the optical remote sensing image data block based on the number of rows and columns of the intersection geographic range in the PNG memory file, and calculate the six affine transformation parameters or RPC parameters of the optical remote sensing image data block based on the transformation geometric relationship, and read the optical remote sensing image data block. Step S53: Using the PNG memory file as the processing object, process each pixel value in the PNG memory file from left to right and from top to bottom in a loop; calculate the geographic coordinates of the pixels in the PNG memory file based on the number of rows and columns of the intersection geographic range in the PNG memory file and the transformation geometric relationship; if the optical remote sensing image data block is a coordinate projection relationship, convert the geographic coordinates to projected coordinates according to the transformation geometric relationship, and then convert the projected coordinates to the pixel coordinates of the optical remote sensing image data block; if the optical remote sensing image data block is an RPC relationship, convert the geographic coordinates to the pixel coordinates of the optical remote sensing image data block according to the transformation geometric relationship; read the pixel value of the specified pixel coordinates from the optical remote sensing image data block; Step S54: Process the read pixel values for missing data values, and then process the data that has no data values using one of the following methods: maximum / minimum stretching, percentage truncation, histogram equalization, Gamma enhancement, or standard deviation stretching; and sequentially loop through the pixel data in all PNG memory files; the processing for missing data values includes: if the optical remote sensing image data has no missing data values, then treat the pixel value 0 as a missing data value; if there are missing data values, then assign the output pixel value to 0. The formula for outputting tile pixel values is as follows: Among them, the raw pixel values of the input optical remote sensing image data are The output tile pixel value is , No data value for the pixel; Step S6: Construct PNG tile data, set the memory file to have no data value, and return the generated tile data to the front end.
2. The real-time rendering method for remote sensing images based on a B / S architecture according to claim 1, characterized in that, In step S3, Establish the geometric relationship for coordinate projection transformation: Let the coordinates of pixel A at a certain point in the optical remote sensing image data be... The corresponding projected coordinates The corresponding geographic coordinates Affine transformation six parameters If the coordinate reference is in WKT form, the transformation relationship between pixel coordinates and projected coordinates is as follows: ; The transformation relationship between projected coordinates and geographic coordinates can be created using the coordinate reference WKT form and the OGRCoordinateTransformation function in GDAL. The Transform function is then used to transform between projected coordinates and geographic coordinates. Establish RPC transformation geometric relationships: Let the coordinates of pixel A at a certain point in the optical remote sensing image data be... The corresponding projected coordinates The corresponding geographic coordinates The conversion relationship between pixel coordinates and geographic coordinates is then established by constructing an RPC parameter conversion model using GDAL Create RPC Transformer in GDAL, and the conversion between pixel coordinates and geographic coordinates is performed through the function GDAL RPCT transform.
3. The real-time rendering method for remote sensing images based on a B / S architecture according to claim 2, characterized in that, In step S54, The maximum and minimum value stretching includes: maximum and minimum value stretching and 16-bit to 8-bit conversion processing, the formula is as follows: ; Among them, the maximum pixel value of optical remote sensing image data is The minimum pixel value is ; The percentage truncation includes: using a percentage truncation value to truncate the histogram frequency N to the left and right ends respectively. Calculate the new maximum pixel value and minimum pixel value The output tile pixel value is calculated using the following formula: ; The histogram equalization includes: calculating the cumulative gray-level distribution frequency of each level of the histogram based on the histogram level and histogram frequency. The calculation formula is as follows: ; Where N is the total number of pixels; Calculate the pixel values for histogram equalization using the cumulative gray-level distribution frequency. Finally, the maximum and minimum values are used for stretching, and the calculation formula is as follows: ; The Gamma enhancement includes: normalizing the original pixel value, then performing Gamma processing and inverse normalization, and finally performing maximum and minimum value stretching. The calculation formula is as follows: Where t is the normalized value. This is the value after Gamma processing. For inverse normalized values, Gamma value; The standard deviation stretching includes: calculating new maximum and minimum pixel values using the image pixel standard deviation and pixel mean, and finally performing maximum and minimum value stretching. The calculation formula is as follows: ; Among them, the average pixel value is The mean squared error of pixel values is Standard deviation ratio .
4. An electronic device, characterized in that, include: One or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory, and when the electronic device is running, the processor executes the one or more computer programs stored in the memory to cause the electronic device to perform the real-time rendering method of remote sensing images based on the B / S architecture as described in any one of claims 1 to 3.
5. A computer-readable storage medium, characterized in that, Used to store computer instructions, which, when executed by a processor, implement the real-time rendering method for remote sensing images based on a B / S architecture as described in any one of claims 1 to 3.