A real-time processing method and device for dynamically loading SAR images under GIS
By adopting dynamic loading and graph cutting technology in GIS system, the problem of low loading, displaying and processing efficiency of super-large SAR images in GIS system is solved, and real-time processing and display of super-large SAR images are realized.
Patent Information
- Application Number
- CN202111328279.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2041-11-10
AI Technical Summary
In the Geographic Information System (GIS), the loading, displaying and processing efficiency of super-large SAR images is inefficient, especially when the image size exceeds 1G, traditional image overlay cannot be effectively processed.
The dynamic loading method is adopted to realize the image cutting and real-time display of SAR images through collaboration between the PC and the server. The specific steps include: the PC side calculates the current visible range and sends a picture cutting request to the server. The server cuts the picture according to the coordinate range and pixel size, and sends the picture cutting information back to the PC side for display.
Through dynamic loading and graph cutting technology, the size of the image in memory is significantly reduced, the loading and display efficiency is improved, and the real-time processing and display of super-large SAR images is realized, solving the problem that traditional methods cannot effectively process super-large SAR images.
Smart Images

Figure CN114004946B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of radar, and in particular, to a real-time processing method and device for dynamically loading SAR images under GIS. Background Art
[0002] When synthetic aperture radar (SAR) observes the ground, it is not affected by climate conditions and can penetrate the vegetation canopy. The obtained images have clear contours and complete structural information preserved. Therefore, SAR plays an extremely important role in the modern remote sensing field. Currently, the data of geographic information system (GIS) mostly comes from early on-site surveys and optical image-based production. The former often has a long update cycle and high cost; the latter is often affected by weather conditions or blocked by mountain shadows, and the obtained data cannot completely describe the imaging area. Therefore, using SAR images as a data source to update GIS has become the primary choice to solve problems such as the long update cycle and poor completeness of the GIS database.
[0003] Geographic Information System (GIS) is a specific spatial information system. It is a computer system with functions of concentrating, storing, operating, and displaying georeferenced information. It has powerful functions in aspects such as data editing, data conversion, data query, and spatial analysis, and has advantages such as clear classification of ground objects, accurate geographical location, and convenience for geographical research and geographical decision-making.
[0004] Based on the above characteristics of GIS, here it is considered to use GIS information as prior knowledge to guide the information extraction of SAR images. Its advantages are mainly manifested in the following two points: (1) Analyzing the obtained real-time SAR images using GIS information can reduce defects such as imaging blurring of SAR images caused by speckle noise and low resolution caused by radar performance; (2) Using GIS information as prior knowledge to extract information from SAR images can achieve the extraction of fuzzy or hidden targets in SAR images, breaking through the limitations of manual interpretation, which is of great significance in military target recognition and precision strikes.
[0005] Fusing SAR images or data with GIS geographical information can, on the one hand, achieve the guidance of GIS for SAR images, and on the other hand, using SAR data to update the GIS information database can achieve the detection of landform changes.
[0006] In some occasions where SAR images need to be corrected and marked, it is necessary to be able to load SAR images onto a geographic information system in real time and then perform operations such as image correction and marking. Generally, when overlaying an image on a geographic information system, when the image size is within a range of more than a dozen megabytes, the loading efficiency can be guaranteed. However, in many cases, the size of SAR images can reach more than 1G, and it is basically impossible to overlay the entire image in this way. If the SAR image is constructed into a pyramid and then loaded as a map into the geographic information system, the entire map needs to be reloaded, and the SAR image cannot be moved. Therefore, the present invention designs a real-time display processing system for dynamically loading multiple ultra-large SAR images under a geographic information system to solve the above problems. Summary of the Invention
[0007] The purpose of the present invention is to provide a real-time processing method for dynamically loading SAR images under GIS to solve the problems raised in the above background technology.
[0008] To achieve the above object, the present invention proposes the following technical solution: A real-time processing method for dynamically loading SAR images under GIS, based on a PC and a server, includes the following steps:
[0009] Step 1: The PC loads the SAR image and displays the map. The server obtains the SAR image file. The PC calculates the currently visible range of the SAR image and sends a tile cutting request to the server according to the calculation result;
[0010] Step 2: The server receives the tile cutting request, cuts the image according to the coordinate range and pixel size, and then sends the tile cutting information to the PC;
[0011] Step 3: After receiving the tile cutting information, the PC adds it to the map for display.
[0012] Further, in the present invention, the PC and the server exchange data through Ethernet.
[0013] Further, in the present invention, when calculating the currently visible range of the SAR image in Step 1, different methods are adopted for different two-dimensional and three-dimensional display modes;
[0014] In two-dimensional mode: By obtaining the coordinates of the currently displayed rectangular range on the screen, and then performing high-precision geometric intersection with the rectangular range coordinates of the SAR image, an accurate intersection range value is finally obtained;
[0015] In the three - dimensional mode: Through the iterative optimization algorithm, the SAR image is cut into small square regions, and it is calculated whether these small square regions are within the viewing range. After multiple iterations, a maximum display rectangular range is calculated for the remaining small square regions within the display range, and this rectangular range is approximately the actual display area range.
[0016] Furthermore, in the present invention, the specific steps in the two - dimensional mode are as follows:
[0017] S1: The screen coordinates of the display area and the longitude - latitude coordinates of the SAR image are uniformly converted into world coordinates, and two polygons are obtained;
[0018] S2: Perform high - precision geometric intersection on the two polygons. If they intersect, the returned result will contain all the intersection points. At this time, traverse these intersection points, convert these points from world coordinates to longitude - latitude coordinates, and find the maximum and minimum values in the longitude and latitude directions to form a rectangular coordinate range, which is the intersection area, that is, the calculation result.
[0019] Furthermore, in the present invention, when sending a tile - cutting request to the server according to the calculation result in step one, calculate the pixel width and height values of the intersection area image and send them to the server together, including the following steps:
[0020] Calculate the range in world coordinates represented by 1 pixel in the longitude and latitude directions according to the current map display zoom level, then convert the longitude - latitude range of the image into world coordinates, and then convert according to the size of the world coordinates represented by each pixel, and finally calculate the pixel width and height values of the intersection area image.
[0021] Furthermore, in the present invention, in the three - dimensional display mode, the map is displayed as a sphere. Determine whether the target point is in front of or behind the viewing plane, and whether the angle between the target point and the viewing point is within the range of the angle between the viewing point and the earth, and determine whether the target point is within the visible range. The viewing plane is the plane formed by the connection of all points at the tangent position of the viewing point and the earth. The method for calculating whether the target point is in front of the horizon viewing plane is as follows:
[0022] Define V as the viewing point, T as the target point, C as the center of the sphere, H as the horizon point at the tangent position of the viewing point and the earth, H′ as the projection point of VH on VC, T′ as the projection point of VT on VC, HC as the radius of the earth, and we will as the unit vector. According to the Pythagorean theorem:
[0023]
[0024] Triangles △VCH and △HCH′ are similar triangles. They share an angle at point C and both have a right angle. Therefore:
[0025]
[0026] Therefore, the distance from the viewpoint to the plane is:
[0027]
[0028] If In The projection on is less than or equal to Then the target point is in front of the plane.
[0029]
[0030] Multiply both sides by
[0031]
[0032] That is, use the dot product of the vector from the viewpoint to the target point and the vector from the viewpoint to the center of the ellipsoid. If this value is less than or equal to the square of the modulus of the vector from the observer to the center of the ellipsoid minus one, then the target point is in front of the viewing plane.
[0033] Furthermore, in the present invention, if the target point is behind the viewing plane, it is necessary to determine whether the target point is within the viewing frustum. The viewing frustum is an infinite cone formed by connecting the viewpoint with all horizon points. If the target point is within the viewing frustum, then it is occluded; outside the viewing frustum, then it is not occluded. The method for calculating whether the target point is within the viewing frustum is as follows:
[0034] Define the angle ∠HVC as α and ∠TVC as β. If the point T is within the cone, then:
[0035] β < α;
[0036] That is:
[0037] cos(β) > cos(α);
[0038] The angle α is part of the right triangle △VCH. By trigonometric functions, rewrite the right side of the inequality:
[0039]
[0040] According to the definition of the dot product, there is:
[0041]
[0042] According to the previous formula Square both sides of the formula.
[0043]
[0044] Finally, the following formula is obtained:
[0045]
[0046] If this inequality holds, the target point is inside the viewing frustum. If it is also behind the viewing plane, the target point is occluded.
[0047] Furthermore, in the present invention, in order to reduce the number of iterations, the target point in the above is replaced with a target sphere, and it is calculated whether the target sphere is within the display range;
[0048] The method for calculating whether the target point is within the viewing frustum is as follows:
[0049] Define T as the center point of the target sphere, and the sphere radius as R t , T2 is the tangent point from the viewing point to the target sphere, T1 is the point where the viewing point intersects the target sphere edge with the center point of the target sphere, and the angle ∠CVT2 is marked as β1. First, calculate the vectors from the viewing point to T1 and T2:
[0050]
[0051]
[0052] At this time, the way to calculate whether the target sphere is in front of the viewing plane is that as long as the T1 point is in front of the viewing plane, it is considered that the target sphere is in front of the viewing plane, and the judgment formula is:
[0053]
[0054] At this time, the judgment formula for calculating whether the target point is within the viewing frustum is:
[0055]
[0056] Then, an iterative optimization algorithm is adopted. The image is divided into multiple square blocks, and then it is iteratively calculated whether these square blocks are within the visible range. Specifically, with the center point of the square as the center and the side length of the square as the radius. After multiple iterations, the areas that are not within the visible range are removed, and the position of the remaining area is calculated to obtain a maximum rectangular range.
[0057] When the image is first divided, the shorter side of the image is used as the side length of the square for the first division. The image is divided into several square regions. The parts where the long side of the image is not enough to be divided are first extended and filled. Finally, the small square regions that are not within the SAR image region range are removed;
[0058] Then, with the center point of the square as the center and the As the radius is used to detect whether the circle is within the visible range, after the first round of detection, the squares outside the visible range are filtered out. Then, the remaining squares are divided, and the visible detection is performed on the divided areas. After multiple iterations, when the pixel distance of the side length of the divided square reaches the preset value, it can be considered that the required accuracy for calculation is achieved, and the iteration is exited. The currently remaining small square areas are counted and combined into a rectangular range, which is the final SAR image display range required.
[0059] A real-time processing device for dynamically loading SAR images under GIS, including a geographic information display module and an SAR image processing module. The geographic information display module and the SAR image processing module are deployed in a distributed manner. Among them, the SAR image processing module runs on a server with a multi-core CPU and can process multiple ultra-large SAR images simultaneously. The geographic information display module runs on a computer and is used to display maps and SAR images.
[0060] The geographic information display module loads the SAR image and displays the map. The geographic information display module calculates the currently visible range of the SAR image and sends a map cutting request to the SAR image processing module according to the calculation result. After receiving the map cutting information, the geographic information display module adds it to the map for display.
[0061] The SAR image processing module obtains the SAR image file, receives the map cutting request, cuts the map according to the coordinate range and pixel size, and then sends the map cutting information to the geographic information display module.
[0062] Furthermore, in the present invention, a translation operation needs to be performed on the SAR image in the geographic information display module. During the operation, the mouse event is monitored, and the translation operation is performed by pressing and dragging the left mouse button.
[0063] Beneficial effects: The technical solution of this application has the following technical effects:
[0064] Through the above image calculation and processing method, the present invention cuts the map according to the content to be displayed actually, greatly reducing the memory size of the loaded image. And it adopts a distributed method, installing the SAR image processing module on a server with better CPU performance, improving the image parallel processing ability, realizing the ability to load, display, and process ultra-large SAR images in a geographic information system, and solving the problems of loading, displaying, and processing ultra-large SAR images.
[0065] It should be understood that all combinations of the foregoing concepts and additional concepts described in more detail below can be regarded as part of the inventive subject matter of the present disclosure as long as such concepts do not contradict each other.
[0066] The foregoing and other aspects, embodiments, and features of the teachings of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of exemplary embodiments, will be apparent from the following description or learned through the practice of specific embodiments in accordance with the teachings of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The drawings are not intended to be drawn to scale. In the drawings, each identical or nearly identical component shown in each figure may be represented by the same reference numeral. For clarity, not every component is labeled in each figure. Now, embodiments of various aspects of the present invention will be described by way of example and with reference to the drawings, wherein:
[0068] Figure 1 is the overall system framework diagram of the method of the present invention;
[0069] Figure 2 is the topology diagram of the present invention;
[0070] Figure 3 is the system network structure diagram of the present invention;
[0071] Figure 4 is the SAR image display mode diagram in the two-dimensional mode of the present invention;
[0072] Figure 5 is the position diagram of the target point relative to the viewing plane in the three-dimensional mode of the present invention;
[0073] Figure 6 is the position diagram of the target point relative to the viewing frustum in the three-dimensional mode of the present invention;
[0074] Figure 7 is the position diagram of the target sphere relative to the viewing plane and the viewing frustum in the three-dimensional mode of the present invention;
[0075] Figure 8 is the cutting schematic diagram of the image iterative optimization algorithm of the present invention;
[0076] Figure 9 is the image movement schematic diagram of the present invention;
[0077] Figure 10 is the schematic of the code used in this embodiment;
[0078] Figure 11 is the schematic diagram of the code used in this embodiment;
[0079] Figure 12 is the schematic diagram of the code used in this embodiment;
[0080] Figure 13 is the schematic diagram of the code used in this embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0081] To better understand the technical content of the present invention, specific embodiments are hereby given and described in conjunction with the accompanying drawings as follows. In the present disclosure, aspects of the present invention are described with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure do not necessarily define all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed in the present invention are not limited to any implementation manner. Additionally, some aspects of the present invention can be used alone, or in any suitable combination with other aspects of the present invention.
[0082] Currently, generally when overlaying an image on a geographic information system, when the image size is within a range of more than a dozen megabytes, the loading efficiency can be guaranteed. However, in many cases, the size of SAR images can reach more than 1G, and in this case, it is basically impossible to overlay the entire image. If a pyramid is constructed for the SAR image and then loaded as a map into the geographic information system, the entire map needs to be reloaded, and the SAR image cannot be moved. Therefore, the present invention is designed to provide a real-time display processing system for dynamically loading multiple ultra-large SAR images under a geographic information system to solve the above problems.
[0083] Based on the above problems, the present embodiment provides the following technical solutions:
[0084] Please refer to Figure 1-9 , specifically, the present embodiment provides a real-time processing method for dynamically loading SAR images under GIS, based on a PC and a server, such as Figure 1 , including the following steps:
[0085] Step 1: The PC loads the SAR image and displays the map. The server obtains the SAR image file. The PC calculates the currently visible range of the SAR image and sends a tile cutting request to the server according to the calculation result;
[0086] Step 2: The server receives the tile cutting request, cuts the image according to the coordinate range and pixel size, and then sends the tile cutting information to the PC;
[0087] Step 3: After receiving the tile cutting information, the PC adds it to the map for display.
[0088] The present invention provides a real-time processing device for dynamically loading SAR images under GIS, including a geographic information display module and an SAR image processing module. The geographic information display module and the SAR image processing module are deployed in a distributed manner. Among them, the SAR image processing module runs on a server with a multi-core CPU and can process multiple ultra-large SAR images simultaneously. The geographic information display module runs on a computer and is used to display maps and SAR images. The geographic information display module loads SAR images and displays maps, calculates the currently visible range of the SAR images, and sends a tiling request to the SAR image processing module according to the calculation result. After receiving the tiling information, the geographic information display module adds it to the map for display. The SAR image processing module obtains the SAR image file, receives the tiling request, performs tiling according to the coordinate range and pixel size, and then sends the tiling information to the geographic information display module.
[0089] That is, the geographic information display module is used to display the geographic information screen, calculate the display range of the SAR image in the screen, request the processing of the SAR image, display the SAR image, and pan the SAR image;
[0090] The SAR image processing module is used to intercept the SAR image according to the requested content and return the result to the geographic information display module.
[0091] Among them, the geographic information display module runs on a PC, and the SAR image processing module runs on a high-performance server. Data exchange between the above modules is carried out through a high-speed Ethernet, as Figure 3 shown.
[0092] Among them, the currently visible range of the SAR image is calculated in the geographic information display module, and then the SAR image processing module is notified to perform interception processing on the image. When calculating the visible range, different methods are adopted for different two-dimensional and three-dimensional display modes.
[0093] In two-dimensional mode:
[0094] In the two-dimensional geographic information display mode, there may be various situations when the map is displayed. After summarization, there are the following three situations: ① Normal display; ② Map rotated display; ③ Map not fully displayed. As Figure 4。In this figure, what we need to calculate is the intersection area between the display area and the SAR image area, where the display area is in screen coordinates and the SAR image is in longitude and latitude coordinates. Since not all four corner positions of the display area in mode ③ are covered by the map, the longitude and latitude coordinates cannot be obtained, so the calculation cannot be performed using longitude and latitude coordinates. When the SAR image is not within the screen range, the screen coordinates cannot be used for calculation either. Therefore, to ensure that our calculation method can be used in various display states, we choose to uniformly convert them to world coordinates for calculation. Note that in mode ③, when converting screen coordinates to world coordinates, the range of world coordinates should not be restricted within the map range, otherwise the world coordinates outside the map range cannot be obtained.
[0095] The method for converting screen coordinates to world coordinates is as follows:
[0096] Calculate the coordinates of the near and far points of the current screen point using the matrix formula, and then calculate the coordinates at the position where z = 0 based on the coordinates of the far and near points.
[0097] A code snippet for converting screen coordinates to world coordinates is as Figure 10 shown.
[0098] When preparing to calculate the intersection area, first convert the screen coordinates of the current screen display rectangle range into world coordinates, and then convert the longitude and latitude coordinate range of the SAR image into world coordinates. After the coordinate systems are unified, perform a high-precision geometric intersection of the two polygons. If there is an intersection, the returned result will contain all the intersection points. At this time, traverse these intersection points, convert these points from world coordinates to longitude and latitude coordinates, and find the maximum and minimum values in the longitude and latitude directions to form a rectangular coordinate range, which is the intersection area.
[0099] When requesting a cut image from the SAR image processing software, the pixel width and height values of the intersection range image are also required. Calculate the range in world coordinates represented by 1 pixel in the longitude and latitude directions according to the current map display zoom level, then convert the longitude and latitude range of the image into world coordinates, and finally calculate the pixel width and height values of the image according to the size of the world coordinates represented by each pixel.
[0100] When using the above calculation method in the 2D mode, it can also support the calculation and display of SAR images in the 2.5D mode.
[0101] In the 3D mode:
[0102] In the three-dimensional display mode, the map is displayed in a spherical shape. It is impossible to obtain the display area by the method of finding the intersection of polygons in the two-dimensional mode. Moreover, in the three-dimensional mode, it is also impossible to determine whether a point is within the display range by calculating the screen coordinates. In the three-dimensional mode, we need to determine whether the position of the target point is in front of the viewing plane (viewing plane: the plane formed by the connection of all points from the viewpoint position to the tangent position of the earth) and whether the angle between the target point and the viewpoint is within the range of the angle between the viewpoint and the earth, so as to know whether the target point is within the visible range.
[0103] The method for calculating whether the target point is in front of the horizon viewing plane is as follows:
[0104] See Figure 5 , where V is the viewpoint, T is the target point, C is the center of the sphere, H is the horizon point at the tangent position of the viewpoint and the earth, H′ is the projection point of VH on VC, T′ is the projection point of VT on VC, HC is the radius of the earth, and we take as the unit vector. According to the Pythagorean theorem:
[0105]
[0106] Next, we note that the triangles △VCH and △HCH′ are similar triangles. They share an angle at point C and both have a right angle. Therefore:
[0107]
[0108] Therefore, the distance from the viewpoint to the plane is:
[0109]
[0110] If The projection on is less than or equal to Then the target point is in front of the plane.
[0111]
[0112] Multiply both sides by
[0113]
[0114] To sum up, to determine whether the target point is in front of the viewing plane, the dot product of the vector from the viewpoint to the target point and the vector from the viewpoint to the center of the ellipsoid can be used. If this value is less than or equal to the square of the modulus of the vector from the observer to the center of the ellipsoid minus one, then the target point is in front of the viewing plane.
[0115] If the target point is in front of the viewing plane, then the target point will never be blocked by the sphere, and the work is done at this time. However, if it is behind the viewing plane, it is uncertain whether it can be blocked. It is necessary to determine whether the target point is within the viewing frustum (viewing frustum: an infinite cone formed by connecting the viewing point to all horizon points). If the target point is within the viewing frustum, it is blocked; outside the viewing frustum, it will not be blocked.
[0116] The method for calculating whether the target point is within the viewing frustum is as follows:
[0117] See Figure 5 : The angle ∠HVC is marked as α, and ∠TVC is marked as β. If the point T is within the cone, then:
[0118] β < α;
[0119] That is:
[0120] cos(β) > cos(α);
[0121] The angle α is part of the right triangle △VCH. Therefore, we rewrite the right side of the inequality through trigonometric functions:
[0122]
[0123] According to the definition of the dot product, we have:
[0124]
[0125]
[0126] According to the previous formula Square both sides of the formula
[0127]
[0128] Finally, we get the following formula:
[0129]
[0130] If this inequality holds, the target point is within the viewing frustum. If it is also behind the viewing plane, the target point is blocked.
[0131] To reduce the number of iterations, replace the target point with a target sphere and calculate whether the target sphere is within the display range.
[0132] The method for calculating whether the target sphere is within the viewing frustum is as follows:
[0133] See Figure 6 : T is the center point of the target sphere, and the sphere radius is R t, T2 is the tangent point from the viewing point to the target ball, T1 is the point where the line from the viewing point to the center of the target ball intersects the edge of the target ball, and the angle <CVT2 is marked as β1. First, calculate the vectors from the viewing point to T1 and T2:
[0134]
[0135] At this time, the method of calculating whether the target ball is in front of the viewing plane is changed to that as long as the point T1 is in front of the viewing plane, it is considered that the target ball is in front of the viewing plane. The previous judgment formula was Now it is changed to:
[0136]
[0137] At this time, the method of calculating whether the target point is within the viewing frustum range is changed to judge the point T2. The previous judgment formula was Now it is changed to:
[0138]
[0139] After having the method of judging whether the spherical surface is within the viewing range, an iterative optimization algorithm is adopted. The image is divided into multiple square blocks, and then it is iteratively calculated whether these square blocks are within the visible range (with the center point of the square as the center and of the side length of the square as the radius). After multiple iterations, the areas that are not within the visible range are removed, and the positions of the remaining areas are calculated to obtain a maximum rectangular range.
[0140] When the image is first divided, of the shorter side of the image is used as the side length of the square for the first division. The image is divided into several square regions. The places where the longer side of the image is not enough for division are first extended and filled (eventually, the small square regions that are not within the SAR image region range will be removed), as shown in Figure 8 -(1). The main code segment is as Figure 11 .
[0141] Then, with the center point of the square as the center and of the side length as the radius, it is detected whether this circle is within the visible range. After the first round of detection, the squares that are not within the visible range are filtered out, and then the remaining squares are divided, as shown in Figure 8 -(2), and the visible detection is performed on the divided regions. After multiple iterations, when the pixel distance of the side length of the divided square is less than a certain value (for example, 10 pixels), it is considered that the required accuracy of the calculation is achieved, and the iteration is exited. The current remaining small square regions are counted and combined into a rectangular range, and this rectangular range is the final SAR image display range required. The main code snippets are as Figure 12 and 13 .
[0142] When requesting image slicing from the SAR image processing software, the pixel width and height values of this intersecting range image are also required. We convert the longitude and latitude coordinates of the intersecting image range into screen coordinates. Since in the three-dimensional mode, what we get at this time is not a rectangle but a polygon, we take the longer side in the longitude / latitude direction of the polygon as the image width and height values.
[0143] Among them, the geographic information display module needs to perform a translation operation on the SAR image. During the operation, the current state is set to the editing mode, and at this time, the operation events of the mouse on the map are intercepted. When the left mouse button is pressed and the pressed position is on the image, the image can be dragged at this time, and the mouse position is recorded as the starting position of the movement; when the mouse moves currently, according to the offset between the position where the mouse moves to and the starting position, the offset of the image is set, as shown in Figure 9 .
[0144] Among them, the SAR image processing module is used to perform image slicing on the SAR image according to the requested content and return the result to the geographic information display module. After receiving the request, the SAR image processing module extracts the requested image slicing range, size, and image name parameters, and then uses the GDAL library to perform a slicing operation on the tiff image of this SAR and return the sliced image to the geographic information display module.
[0145] Through the above image calculation and processing method, the present invention slices the image according to the content actually required to be displayed, greatly reducing the memory size of the loaded image, and adopting a distributed method, installing the SAR image processing module on a server with better CPU performance, improving the ability of image parallel processing, realizing the ability to load, display, and process ultra-large SAR images in the geographic information system, and solving the problems of loading, displaying, and processing ultra-large SAR images.
[0146] Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Those with ordinary knowledge in the technical field to which the present invention pertains can make various modifications and refinements without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to what is defined by the claims.
Claims
1. A real-time processing method for dynamically loading SAR images under GIS, based on the PC side and the server, characterized in that: It includes the following steps: Step 1: The PC loads the SAR image and displays the map. The server obtains the SAR image file. The PC calculates the currently visible range of the SAR image and sends a tiling request to the server according to the calculation result; Step 2: The server receives the tiling request, performs tiling according to the coordinate range and pixel size, and then sends the tiling information to the PC; Step 3: After receiving the tiling information, the PC adds it to the map for display; When calculating the currently visible range of the SAR image in Step 1, it is different for the two-dimensional and three-dimensional display modes; In the two-dimensional mode: By obtaining the coordinates of the currently displayed rectangular range on the screen, and then performing high-precision geometric intersection with the rectangular range coordinates of the SAR image, an accurate intersection range value is finally obtained; In the three-dimensional mode: Through an iterative optimization algorithm, the SAR image is cut into small square areas, and it is calculated whether these small square areas are within the viewing range. After multiple iterations, the remaining small square areas within the display range are calculated to obtain a maximum display rectangular range, and this rectangular range is approximately the actual display area range; The specific steps in the two-dimensional mode are as follows: S1: Uniformly convert the screen coordinates of the display area and the longitude and latitude coordinates of the SAR image into world coordinates, and two polygons are obtained; S2: Perform high-precision geometric intersection on the two polygons. If they intersect, the returned result will contain all the intersection points. At this time, traverse these intersection points, convert these points from world coordinates to longitude and latitude coordinates, and find the maximum and minimum values in the longitude and latitude directions to form a rectangular coordinate range. This range is the intersection area, that is, the calculation result; In Step 1, when sending a tiling request to the server according to the calculation result, calculate the pixel width and height values of the intersecting area image and send them to the server together. The steps are as follows: Calculate the range in world coordinates represented by 1 pixel in the longitude and latitude directions according to the current map display zoom level, then convert the longitude and latitude range of the image into world coordinates, and then convert according to the size of the world coordinates represented by each pixel. Finally, calculate the pixel width and height values of the intersecting area image; In the three-dimensional display mode, the map is displayed spherically. Determine whether the target point is in front of or behind the viewing plane, and whether the angle between the target point and the viewing point is within the range of the angle between the viewing point and the earth. Determine whether the target point is within the visible range. The viewing plane is the plane formed by the connection of all points at the tangent position of the viewing point and the earth. The method for calculating whether the target point is in front of the horizon viewing plane is as follows: Define that V is the viewpoint, T is the target point, C is the center of the sphere, H is the horizon point where the viewpoint is tangent to the earth, H′ is the projection point of VH on VC, T′ is the projection point of VT on VC, HC is the radius of the earth, and we will be used as the unit vector. According to the Pythagorean theorem: Triangles △VCH and △HCH′ are similar triangles. They share an angle at point C and both have a right angle. Therefore: Therefore, the distance from the viewing point to the plane is: If on the projection of which on is less than or equal to then the target point is in front of the plane Multiply both sides by That is, use the dot product of the vector from the viewing point to the target point and the vector from the viewing point to the center of the ellipsoid. If this value is less than or equal to the square of the modulus of the vector from the observer to the center of the ellipsoid minus one, the target point is in front of the viewing plane.
2. The real-time processing method for dynamically loading SAR images under GIS according to claim 1, characterized in that: The PC and the server exchange data through Ethernet.
3. A real-time processing method for dynamically loading SAR images under GIS according to claim 1, characterized in that: If the target point is behind the view plane, it is necessary to determine whether the target point is within the viewing frustum. The viewing frustum is an infinite cone formed by connecting the viewing point to all horizon points. If the target point is within the viewing frustum, it is occluded; if it is outside the viewing frustum, it is not occluded. The method for calculating whether the target point is within the viewing frustum is as follows: Define the angle ∠HVC as α and ∠TVC as β. If the point T is within the cone, then: β<α; That is: cos(β)>cos(α); The angle α is part of the right triangle △VCH. Using trigonometric functions, rewrite the right side of the inequality: According to the definition of the dot product, we have: According to the previous formula Square both sides of the formula Finally, we get the following formula: If this inequality holds, the target point is within the viewing frustum. If it is also behind the view plane, the target point is occluded.
4. A real-time processing method for dynamically loading SAR images under GIS according to claim 3, characterized in that: To reduce the number of iterations, replace the target point in Claim 1 with a target sphere and calculate whether the target sphere is within the display range; The method for calculating whether the target point is within the viewing frustum is as follows: Define T as the center point of the target ball with a ball radius of R t , T2 as the tangent point from the viewpoint to the target ball, T1 as the point where the line from the viewpoint to the center point of the target ball intersects the edge of the target ball, and the angle ∠CVT2 is marked as β1. First, calculate the vectors from the viewpoint to T1 and T2: At this time, the method for calculating whether the target sphere is in front of the view plane is that as long as the point T1 is in front of the view plane, it is considered that the target sphere is in front of the view plane. The judgment formula is: At this time, the judgment formula for calculating whether the target point is within the viewing frustum is: Then, an iterative optimization algorithm is used to divide the image into multiple square blocks, and then iteratively calculate whether these square blocks are within the visible range. Specifically, taking the center point of the square as the center and as the radius, after multiple iterations, the areas outside the visible range are eliminated, and a maximum rectangular range is calculated for the positions of the remaining areas; When the image is first divided, the side length of the square for the first division is the shorter side of the image. The image is divided into several square regions. For the part where the long side of the image is not enough for division, it is first extended and filled. Finally, the small square regions outside the SAR image area are removed; Then, with the center point of the square as the center and as the radius, detect whether this circle is within the visible range. After the first round of detection, filter out the squares that are not within the visible range, then divide the remaining squares, and then perform visible detection on the divided areas. After multiple iterations, when the pixel distance of the side length of the divided square reaches the preset value, it can be considered that the required accuracy for the calculation has been achieved, exit the iteration, count the current remaining small square areas and combine them into a rectangular range, and this rectangular range is the final SAR image display range required.
5. A real-time processing device for dynamically loading SAR images under GIS, characterized in that: It includes a geographic information display module and an SAR image processing module. The geographic information display module and the SAR image processing module adopt a distributed deployment method. Among them, the SAR image processing module runs on a server with a multi-core CPU and can process multiple ultra-large SAR images simultaneously. The geographic information display module runs on a computer and is used to display maps and SAR images; The geographic information display module loads the SAR image and displays the map. The geographic information display module calculates the currently visible range of the SAR image and sends a tile request to the SAR image processing module according to the calculation result. After receiving the tile information, the geographic information display module adds it to the map for display; The SAR image processing module obtains the SAR image file. The SAR image processing module receives the tile request, performs tiling according to the coordinate range and pixel size, and then sends the tile information to the geographic information display module.
6. The real-time processing device for dynamically loading SAR images under GIS according to claim 5, characterized in that: In the geographic information display module, a translation operation needs to be performed on the SAR image. During the operation, the mouse event is listened to, and the translation operation is performed by pressing and dragging the left mouse button.
Citation Information
Patent Citations
Printer with picture clipping function and picture clipping method
CN102336069A
Tile map segmenting method and system
CN103903508A