Resource constraint-based satellite remote sensing image tile dynamic generation method and system
By building virtual raster data on the on-star processing device and dynamically compute the subcontracting strategy, the problem of low timeliness of tile generation on-star remote sensing image on-star is solved, and efficient tile data generation and release is achieved.
Patent Information
- Application Number
- CN202510141010.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-02-08
AI Technical Summary
When generating remote sensing image tiles, the prior art is limited by the distribution of the ground receiving station and insufficient on-star processing resources, resulting in low timeliness and the inability to directly apply existing algorithms.
A dynamic generation method of remote sensing image tile on the star based on resource constraints is proposed. By allocating memory resources on the star processing device, building virtual raster data, and dynamically computing the subcontracting strategy to generate tiles, improving timeliness.
Without reducing accuracy, the satellite's on-orbit data processing capabilities and the timeliness of tile data release are improved, the dependence on on-satellite resources is reduced, and storage space is saved.
Smart Images

Figure CN120179744A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of remote sensing image processing, and particularly to a method and system for dynamically generating on-board remote sensing image tiles based on resource constraints. Background Art
[0002] The remote sensing image tile service has become a more commonly used mode in Internet public map services. The generation of remote sensing image tiles refers to the process of cutting the remote sensing image data within a specified range into square grid pictures of a fixed size with a certain number of rows and columns at a certain scale. The cut square pictures of several rows and columns are saved as picture files in a specified format and stored in a directory system or a database according to a certain naming rule and organization method to form a static map cache in a pyramid model. When a user requests remote sensing image data within a specific range through a client (such as a Web browser, a mobile application, etc.), the server calculates and determines the map tiles that need to be transmitted to the client according to the client's request, and transmits the tiles to the client. After receiving the tiles, the client dynamically stitches and displays them as a complete remote sensing image.
[0003] In traditional remote sensing image tile generation methods, it is necessary to first download satellite data, and then perform tiling processing on the fused or mosaicked data after preprocessing. However, data download is restricted by the distribution of ground receiving stations and cannot be processed immediately after data acquisition, resulting in low timeliness; at the same time, a large amount of storage and cache is occupied during the processing. On-board processing can improve timeliness, but due to insufficient on-board processing resources, limited energy consumption, and short required processing time, existing algorithms cannot be directly applied.
[0004] Therefore, there is an urgent need to propose a tile generation method applicable to on-board processing. Summary of the Invention
[0005] To solve the above problems in the prior art, the present invention proposes a method and system for dynamically generating on-board remote sensing image tiles based on resource constraints, which improves timeliness without reducing accuracy.
[0006] In the first aspect of the present invention, a method for dynamically generating on-board remote sensing image tiles based on resource constraints is proposed. The method is applicable to on-board processing devices and includes:
[0007] Allocating an original data storage area, a temporary data storage area, and a tile data buffer according to the memory resource constraints of the on-board processing device;
[0008] Receiving original image data and platform broadcast data and storing them in the original data storage area;
[0009] Decoding the original image data in the original data storage area to obtain decoded data;
[0010] Constructing virtual grid data according to the platform broadcast data, the decoded data and target tile projection information;
[0011] Calculate the maximum tile level and the minimum tile level, and then calculate the number of tiles and the amount of tile data corresponding to each tile level;
[0012] Based on the virtual grid data, according to the size of the tile data buffer and the amount of tile data corresponding to each tile level, a packetization strategy is dynamically calculated and tiles of each level are generated.
[0013] Preferably, the decoded data includes: first panchromatic data, first multispectral data and camera auxiliary data;
[0014] The step of “constructing virtual grid data according to the platform broadcast data, the decoded data and the target tile projection information” includes:
[0015] Preprocessing the first panchromatic data and the first multispectral data respectively to obtain a radiation correction product; the radiation correction product includes second panchromatic data and second multispectral data;
[0016] constructing a strict imaging model according to the platform broadcast data and the camera auxiliary data, and converting the strict imaging model into a rational function model;
[0017] The projection range, panchromatic affine transformation parameters and multispectral affine transformation parameters of the virtual grid data are calculated according to the rational function model and the target tile projection information.
[0018] Preferably, the rational function model includes: a panchromatic rational function model and a multispectral rational function model;
[0019] The target tile projection information includes: a projection conversion method and a target tile coordinate system;
[0020] The step of “calculating the projection range, panchromatic affine transformation parameters and multispectral affine transformation parameters of the virtual grid data according to the rational function model and the target tile projection information” includes:
[0021] Calculating the longitude and latitude range of the second panchromatic data in the geographic coordinate system according to the panchromatic rational function model;
[0022] According to the projection conversion method, the longitude and latitude range of the second panchromatic data in the geographic coordinate system is converted into a projection range in the target tile coordinate system, thereby obtaining the projection range of the virtual raster data;
[0023] Calculate the image height and width of the virtual grid and the panchromatic affine transformation parameters according to the projection range and panchromatic resolution of the virtual grid data;
[0024] Calculate the multispectral affine transformation parameters according to the projection range and multispectral resolution of the virtual grid data.
[0025] Preferably, the step of "calculating the maximum tile level and the minimum tile level, and then calculating the number of tiles and tile data volume corresponding to each tile level" includes:
[0026] Calculate the maximum tile level, the minimum tile level, and the resolution corresponding to each tile level according to the resolution of the virtual grid data, the image height and width, and the preset tile size;
[0027] Calculate the row and column number ranges of each tile level respectively according to the projection range of the virtual grid data and the resolution corresponding to each tile level, and then calculate the number of tiles and tile data volume corresponding to each tile level;
[0028] Wherein, the resolution of the virtual grid data is equal to the panchromatic resolution.
[0029] Preferably, the step of "dynamically calculating the subcontracting strategy and generating tiles at each level based on the virtual grid data according to the size of the tile data buffer and the tile data volume corresponding to each tile level" includes:
[0030] Determine the current level to be processed and calculate the total data volume of the unprocessed tiles;
[0031] Judge whether the total data volume of the unprocessed tiles is less than or equal to the size of the tile data buffer;
[0032] If so, generate the tile data of the current level to be processed based on the virtual grid data and save it into the tile data buffer, and then generate tiles in the remaining levels;
[0033] Otherwise, generate all tiles of the current level to be processed based on the virtual grid data; repeat the steps of determining the current level to be processed, calculating the total data volume of the unprocessed tiles, judging whether the total data volume of the unprocessed tiles is less than or equal to the size of the tile data buffer, and generating tiles according to the judgment result until the tiles of the minimum tile level are generated.
[0034] Preferably, the step of "generating the tile data of the current level to be processed based on the virtual grid data and saving it into the tile data buffer, and then generating tiles in the remaining levels" includes:
[0035] Generate the tiles at the current level to be processed one by one based on the virtual grid data and save them to the tile data buffer;
[0036] Update the current level to be processed;
[0037] Read the tile data of the next level from the tile data buffer, generate the tile data of the current level to be processed after resampling, and save it to the tile data buffer; the next level is equal to the current level to be processed plus 1;
[0038] Repeat the steps of updating the current level to be processed, reading the tile data of the next level, resampling and saving until the tiles of the minimum tile level are generated;
[0039] Compress all the tiles in the tile data buffer into a preset picture format and save them to the satellite solid state storage.
[0040] Preferably, the step of "generating all the tiles of the current level to be processed according to the virtual grid data" includes:
[0041] Calculate the tile data volume of the current level to be processed according to the number of tiles of the current level to be processed and the preset tile size;
[0042] Judge whether the tile data volume of the current level to be processed is less than or equal to the size of the tile data buffer;
[0043] If so, generate the tiles of the current level to be processed one by one based on the virtual grid data and save them to the tile data buffer, compress all the generated tiles into a preset picture format and save them to the satellite solid state storage;
[0044] Otherwise, generate the tiles of the current level to be processed one by one based on the virtual grid data and save them to the tile data buffer, and compress each batch of generated tiles into a preset picture format and save them to the satellite solid state storage;
[0045] Among them, the data volume of each batch of tiles does not exceed the size of the tile data buffer.
[0046] Preferably, the step of "generating the tiles of the current level to be processed one by one based on the virtual grid data and saving them to the tile data buffer" includes:
[0047] Calculate the projection range of a tile according to the row and column numbers of the tile in the current level to be processed and the resolution corresponding to the current level to be processed;
[0048] Calculate the intersection area between the projection range of the tile and the projection range of the virtual grid data;
[0049] Calculate the size of the intersection area and the relative position of the intersection area in the virtual grid data;
[0050] Read a fused image data block from the virtual grid data according to the size of the intersection area and the relative position;
[0051] Resample the fused image data block to obtain resampled data;
[0052] Solve the writing position of the top left corner of the resampled data in the tile;
[0053] Save the resampled data to the tile data buffer according to the writing position;
[0054] Repeat the execution until all tiles of the current level to be processed are generated.
[0055] Preferably, the step of "reading a fused image data block from the virtual grid data according to the size of the intersection area and the relative position" includes:
[0056] Select a first point in the intersection area from the relative position according to the panchromatic resolution each time, and read the panchromatic pixel point data corresponding to the first point from the second panchromatic data; repeat the execution until all the panchromatic pixel point data corresponding to all the first points in the intersection area are read to obtain a first data block;
[0057] Select a second point in the intersection area from the relative position according to the multispectral resolution each time, and read the red, green, and blue three-band data corresponding to the second point from the second multispectral data; repeat the execution until all the red, green, and blue three-band data corresponding to all the second points in the intersection area are read to obtain a second data block;
[0058] Fuse the first data block and the second data block to obtain the fused image data block;
[0059] Among them,
[0060] The step of "reading the panchromatic pixel point data corresponding to the first point from the second panchromatic data" includes:
[0061] According to the panchromatic affine transformation model, convert the first pixel coordinate of the first point in the virtual grid data into the first projection coordinate in the target tile coordinate system;
[0062] Convert the first projection coordinate into the first longitude and latitude coordinate in the geographic coordinate system;
[0063] Convert the first longitude and latitude coordinates into panchromatic pixel coordinates in the second panchromatic data according to the panchromatic rational function model;
[0064] Read the panchromatic data corresponding to the first point from the second panchromatic data by using the bilinear interpolation method according to the panchromatic pixel coordinates;
[0065] The step of "reading the red, green, and blue three-band data corresponding to the second point from the second multispectral data" includes:
[0066] Convert the second pixel coordinates of the second point in the virtual grid data into the second projection coordinates in the target tile coordinate system according to the multispectral affine transformation model;
[0067] Convert the second projection coordinates into the second longitude and latitude coordinates in the geographic coordinate system;
[0068] Convert the second longitude and latitude coordinates into the multispectral pixel coordinates in the second multispectral data according to the multispectral rational function model;
[0069] Read the red, green, and blue data corresponding to the second point from the second multispectral data by using the bilinear interpolation method according to the multispectral pixel coordinates.
[0070] In the second aspect of the present invention, a satellite-borne remote sensing image tile dynamic generation system based on resource constraints is proposed, and the system executes a computer program of the method described above.
[0071] The present invention has the following beneficial effects:
[0072] (1) The satellite-borne remote sensing image tile dynamic generation method proposed by the present invention adopts a satellite-borne tile generation scheme. First, a virtual grid is generated according to the decoded data, and then data reading and fusion are performed based on the virtual grid, and then tiles are generated. This method not only saves storage space but also does not affect data reading and fusion, ensuring that tile generation is completed in a limited resource environment. Without reducing the accuracy, it improves the satellite on-orbit data processing ability and the timeliness of tile data publishing, and reduces the dependence on satellite-borne resources.
[0073] (2) Map the second panchromatic data and the second multispectral data with the same geographic range onto the same virtual grid respectively, so that in the subsequent tile generation process, the second panchromatic data and the second multispectral data obtained after preprocessing can be read from the temporary data storage area respectively according to the mapping relationship between the virtual grid and the two types of data (panchromatic and multispectral), and then fused.
[0074] (3) During the process of generating tiles step by step, the subcontracting strategy is dynamically calculated according to the size of the tile data buffer and the total amount of unprocessed tile data, which can not only make full use of the tile data buffer but also avoid errors caused by insufficient buffer space. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 It is a schematic diagram of the main steps of an embodiment of the on-orbit remote sensing image tile dynamic generation method based on resource constraints in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0076] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0077] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0078] It should be noted that in the description of the present invention, the terms "first" and "second" are only for the convenience of description and do not indicate or imply the relative importance of the devices, elements, or parameters, and thus should not be construed as limiting the present invention. In addition, the term "and / or" in the present invention is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after unless otherwise specified.
[0079] Figure 1 It is a schematic diagram of the main steps of an embodiment of the on-orbit remote sensing image tile dynamic generation method based on resource constraints in the present invention. The method of this embodiment is applicable to on-orbit processing devices, such as Figure 1 As shown, the method includes steps S10 - S60:
[0080] Step S10: Allocate the original data storage area, temporary data storage area, and tile data buffer according to the memory resource constraints of the on-orbit processing device.
[0081] In this embodiment, the available memory resources of the on-board intelligent processing device are divided into a raw data storage area, a temporary data storage area, and a tile data buffer according to a preset ratio. Among them, the size of the raw data storage area is M1, which is used to store the raw image data and platform broadcast data received by the on-board intelligent processing device; the size of the temporary data storage area is M2, which is used to store the intermediate data during the data processing; and the size of the tile data buffer is M3, which is used to store the generated tile data.
[0082] Step S20: Receive the raw image data and platform broadcast data, and store them in the raw data storage area.
[0083] In this embodiment, the panchromatic data collected by the Beijing-3 camera has a resolution of 0.5 meters, and the multispectral data has a resolution of 2 meters. The platform broadcast data includes: positioning information (position, speed), attitude information, etc.
[0084] Step S30: Decode the raw image data in the raw data storage area to obtain the decoded data.
[0085] The decoded data includes: first panchromatic data, first multispectral data, and camera auxiliary data.
[0086] Step S40: Construct virtual grid data according to the platform broadcast data, the decoded data, and the target tile projection information. This step can specifically include steps S41 - S43:
[0087] Step S41: Perform preprocessing on the first panchromatic data and the first multispectral data respectively to obtain radiometric correction products: second panchromatic data and second multispectral data.
[0088] Among them, the preprocessing includes: operations such as radiometric correction, in-chip color homogenization, radial distortion, band registration, and inter-chip color homogenization.
[0089] Step S42: Construct a rigorous imaging model according to the platform broadcast data and the camera auxiliary data, and convert the rigorous imaging model into a rational function model.
[0090] Among them, the rational function model is a mathematical model used to describe the non-linear correspondence relationship between the pixel coordinates of a remote sensing image and the longitude and latitude coordinates of a ground point.
[0091] In this embodiment, the rational function model includes: a panchromatic rational function model and a multispectral rational function model.
[0092] Step S43: Calculate the projection range, panchromatic affine transformation parameters, and multispectral affine transformation parameters of the virtual grid data according to the rational function model and the target tile projection information.
[0093] Among them, the target tile projection information includes: a projection conversion method and a target tile coordinate system. The projection method can adopt Web Mercator projection, or adopt the CGCS2000 geodetic coordinate system, etc. In this embodiment, Web Mercator projection is adopted.
[0094] In the prior art, memory space is allocated to store the data after the fusion of the second panchromatic data and the second multispectral data. In this embodiment, in order to save storage space, a virtual grid is adopted, that is, the second panchromatic data and the second multispectral data with the same geographic range are respectively mapped to the same virtual grid. The method for obtaining virtual grid data during the subsequent tile generation process is: according to the mapping relationship between the virtual grid and the two types of data (panchromatic and multispectral), the preprocessed second panchromatic data and the second multispectral data are respectively read from the temporary data storage area, and then fused. It can be seen from this that the virtual grid in this embodiment itself does not occupy memory space.
[0095] Step S43 may specifically include steps S431 - S434:
[0096] Step S431: Calculate the longitude and latitude range [geo_minX, geo_minY, geo_maxX, geo_maxY] of the second panchromatic data in the geographic coordinate system according to the panchromatic rational function model.
[0097] In this embodiment, the calculated longitude and latitude range of the second panchromatic data is [116.436432, 40.004026, 116.611055, 40.146754].
[0098] Step S432: According to the projection conversion method, convert the longitude and latitude range of the second panchromatic data in the geographic coordinate system into the projection range in the target tile coordinate system, so as to obtain the projection range of the second panchromatic data, that is, the projection range [proj_minX, proj_minY, proj_maxX, proj_maxY] of the virtual grid data.
[0099] In this embodiment, the method for converting longitude and latitude coordinates into Web Mercator projection coordinates is shown in the following formulas (1) - (2):
[0100]
[0101] Among them, proj_x and proj_y are the projection coordinates in the Web Mercator coordinate system; lon and lat are the longitude and latitude coordinates respectively; R is the radius of the earth, with a default value of 6,378,137 meters, which is half of the earth's circumference. The value used is originShift = 20,037,508.3427892. Only by inputting the longitude and latitude coordinates of the four corners of the second panchromatic image into the above formulas (1)-(2) respectively can the projection range of the virtual grid data be obtained.
[0102] In this embodiment, the calculated projection range of the virtual grid data is [12,961,644.30, 4,866,527.34, 12,981,083.53, 4,887,291.16].
[0103] Step S433: Calculate the image height and width of the virtual grid and the panchromatic affine transformation parameters according to the projection range of the second panchromatic data in the target tile coordinate system and the panchromatic resolution.
[0104] In this embodiment, the resolution of the virtual grid data refers to the resolution after the fusion of the two types of data, which is the resolution of the panchromatic data, 0.5. According to the projection range of the virtual grid data, subtracting the minimum value from the maximum value in the X direction and then dividing by the resolution 0.5 can obtain the image width of the virtual grid; similarly, subtracting the minimum value from the maximum value in the Y direction and then dividing by the resolution 0.5 can obtain the image height. The calculated image size in this embodiment is [38,876, 41,528].
[0105] In this embodiment, the panchromatic affine transformation parameters record the conversion relationship between the pixel coordinates and the projection coordinates of the panchromatic data in the virtual grid. Therefore, the panchromatic affine transformation parameters include the following 6 variables:
[0106] (1) The projection coordinate X corresponding to the top-left panchromatic pixel point;
[0107] (2) The panchromatic resolution in the X direction;
[0108] (3) The X-axis component of the rotation coefficient;
[0109] (4) The projection coordinate Y corresponding to the top-left panchromatic pixel point;
[0110] (5) The Y-axis component of the rotation coefficient;
[0111] (6) The panchromatic resolution in the Y direction.
[0112] In this embodiment, the panchromatic affine transformation parameters are [12,961,644.30, 0.5, 0, 4,887,291.16, 0, -0.5].
[0113] Step S434: Calculate the multispectral affine transformation parameters according to the projection range of the virtual grid data and the multispectral resolution.
[0114] The specific calculation method can refer to the calculation method of the panchromatic affine transformation parameters in step S433.
[0115] Step 50: Calculate the maximum tile level and the minimum tile level, and then calculate the number of tiles and the tile data volume corresponding to each tile level.
[0116] This step may specifically include steps S51 - S52:
[0117] Step S51: According to the resolution of the virtual grid data, the height and width of the image, and the preset tile size, calculate the maximum tile level, the minimum tile level, and the resolution corresponding to each tile level. This step may specifically include steps S511 - S513:
[0118] Step S511: According to the resolution of the virtual grid data (i.e., the panchromatic resolution) and the preset tile size, calculate the maximum tile level and the corresponding resolution.
[0119] Specifically, the resolution of a certain tile level can be calculated according to the method shown in the following formula (3):
[0120]
[0121] Where Z represents the tile level, res z represents the resolution of the Z - th tile level, p is the preset tile size (256 in this embodiment), and in this embodiment, c is the equatorial circumference (40075016.6855785).
[0122] By gradually increasing the tile level Z and calculating the corresponding resolution, find the maximum tile level that meets the panchromatic resolution requirement (the res z value of this level is closest to and greater than the value of the panchromatic resolution), and the resolution corresponding to the maximum tile level.
[0123] In this embodiment, the calculated maximum tile level is 18, and the corresponding resolution is 0.597164263 meters.
[0124] Step S512: According to the height and width of the virtual grid and the preset tile size, calculate the resolution that can be achieved when displaying the entire virtual grid image on a single tile, and then calculate the minimum tile level and the corresponding resolution.
[0125] Specifically, first calculate the resolution that can be achieved when displaying the entire virtual grid image on a single tile according to the following formula (4):
[0126]
[0127] Where imageres For the resolution that can be achieved when displaying the entire virtual grid image on a single tile (162.21875 in this embodiment), Geores is the resolution of the virtual grid data; p is the preset tile size, and proj_width and proj_height are the image width and height of the virtual grid respectively.
[0128] Then gradually decrease the tile level Z in formula (3), calculate the resolutions of each tile level and compare them with image res to obtain the minimum tile level (the res z value of this tile level is closest to and greater than image res ), and the resolution corresponding to the minimum tile level. res )
[0129] In this embodiment, the calculated minimum tile level is level 10, and the corresponding resolution is 152.8740566 meters.
[0130] Step S513: Calculate the resolutions corresponding to each intermediate tile level respectively according to the maximum tile level, the minimum tile level, and the preset tile size.
[0131] Specifically, the resolutions corresponding to the intermediate tile levels (levels 11 - 17 in this embodiment) can be calculated according to the above formula (3).
[0132] Step S52: Calculate the row and column number ranges of each tile level respectively according to the projection range of the virtual grid data and the resolution corresponding to each tile level, and then calculate the number of tiles and the tile data volume corresponding to each tile level.
[0133] Among them, the resolution of the virtual grid data is equal to the panchromatic resolution.
[0134] Specifically, first calculate the row and column number range [tminX, tminY, tmaxX, tmaxY] of each tile level according to the method shown in the following formulas (5) - (8):
[0135]
[0136] Among them, [proj_minX, proj_minY, proj_maxX, proj_maxY] is the projection range of the virtual grid data, that is, half of the earth's circumference, R represents the earth's radius, res z represents the resolution of the Z - th tile level, p is the preset tile size, represents rounding up.
[0137] Secondly, the number of tiles at each level can be calculated according to the method shown in the following formula (9):
[0138] count Z =(1+(tmaxX - tminX))×(1+(tmaxY - tminY) (9)
[0139] Where count Z is the number of tiles at the Z-th level.
[0140] In this embodiment, the number of tiles corresponding to each tile level is 17536, 4416, 1155, 306, 90, 30, 9, 4, 1 respectively, and the total number is 23547.
[0141] Then, the data volume of tiles at each level is calculated according to the method shown in the following formula (10):
[0142] size z =count Z ×p×p×3 (10)
[0143] Step S60: Based on the virtual grid data, dynamically calculate the subcontracting strategy according to the size of the tile data buffer and the data volume of tiles corresponding to each tile level, and generate tiles at each level.
[0144] Step S60 may specifically include steps S61 - S64:
[0145] Step S61: Determine the current level to be processed, and calculate the total data volume of unprocessed tiles.
[0146] In this embodiment, the initial value of the current level to be processed is the maximum tile level 18, and it is decreased by 1 each time S61 is looped to later.
[0147] The initial value of the total data volume of unprocessed tiles is the sum of the data volumes of tiles at each level. Each time S61 is looped to later, it is calculated according to the unprocessed tile level. In this embodiment, the initial value of the number of unprocessed tiles is 23547, so the initial value of the total data volume of unprocessed tiles is 4629528576 bytes.
[0148] Step S62: Judge whether the total data volume of unprocessed tiles is less than or equal to the size of the tile data buffer.
[0149] Step S63: In the case where the total data volume of unprocessed tiles is less than or equal to the size of the tile data buffer, generate tile data at the current level to be processed according to the virtual grid data and save it into the tile data buffer, and then generate tiles in the remaining levels.
[0150] It should be noted that the total amount of unprocessed tile data here is less than or equal to the size of the tile data buffer, indicating that the tile data buffer is large enough to accommodate the tiles at the current level to be processed and the tiles at the remaining levels, and there is no need for sub-packet processing. Therefore, the tiles at the current level to be processed (as the relatively lower level, not necessarily the 18th layer) can be generated first and saved to the tile data buffer, and then the tiles at the remaining levels (non-lower levels) can be generated in sequence according to the data in the tile data buffer. The specific description is as follows in steps S631 - S635:
[0151] Step S631: Generate the tiles at the current level to be processed one by one based on the virtual grid data and save them to the tile data buffer. This step can specifically include steps S6311 - S6318:
[0152] Step S6311: Calculate the projection range of a tile according to the row and column numbers of the tile in the current level to be processed and the resolution corresponding to the current level to be processed, as shown in formulas (11) - (14):
[0153] gminX = tx z × res z - originShiftX (11)
[0154] gminY = ty z × res z - originShiftY (12)
[0155] gmaxX = (tx z + 1) × res z - originShiftX (13)
[0156] gmaxY = (ty z + 1) × res z - originShiftY (14)
[0157] Among them, (tx z , ty z ) is the row and column numbers of a tile in the current level to be processed, res z represents the resolution of the current level to be processed, both originShiftX and originShiftY are half of the earth's circumference, and [gminX, gminY, gmaxX, gmaxY] is the projection range corresponding to this tile.
[0158] Step S6312: Calculate the intersection area [inter_minX, inter_minY, inter_maxX, inter_maxY] between the projection range of this tile and the projection range of the virtual grid data.
[0159] Step S6313: Calculate the size (rxsize, rysize) of the intersection area and the relative position (rx, ry) of the intersection area in the virtual grid data, as shown in formulas (15)-(18):
[0160]
[0161] Where [proj_minX, proj_minY, proj_maxX, proj_maxY] is the projection range of the virtual grid data; Geores is the resolution of the virtual grid data.
[0162] Step S6314: Read a fused image data block from the virtual grid data according to the size (rxsize, rysize) and relative position (rx, ry) of the intersection area.
[0163] The method of reading the fused image data block can be executed according to the following steps (a)-(c):
[0164] (a) Starting from the relative position (rx, ry), select a first point in the intersection area [inter_minX, inter_minY, inter_maxX, inter_maxY] each time according to the panchromatic resolution, and read the panchromatic pixel point data corresponding to the first point from the second panchromatic data. Repeat the execution until all the panchromatic pixel point data corresponding to the first points in the intersection area are read, obtaining a first data block.
[0165] Among them, the step of reading the panchromatic pixel point data corresponding to the first point from the second panchromatic data may include (a1)-(a4):
[0166] (a1) According to the panchromatic affine transformation model, convert the first pixel coordinates of the first point in the virtual grid data into the first projection coordinates (px, py) in the target tile coordinate system, as shown in formulas (19)-(20):
[0167] px = geoTransform[0] + geoTransform[1] × rx
[0168] + geoTransform[2] × ry (19)
[0169] py = geoTransform[3] + geoTransform[4] × rx
[0170] + geoTransform[5] × ry (20)
[0171] Among them, geoTransform[0] to geoTransform[5] are the panchromatic affine transformation parameters in the panchromatic affine transformation model, and (rx, ry) is the relative position.
[0172] (a2) Convert the first projection coordinates (px, py) to the first longitude and latitude coordinates (lon, lat) in the geographic coordinate system, as shown in formulas (21)-(22):
[0173]
[0174] Among them, originShift is half of the earth's circumference.
[0175] (a3) According to the panchromatic rational function model, convert the first longitude and latitude coordinates to the panchromatic pixel coordinates (ox, oy) in the second panchromatic data.
[0176] (a4) According to the panchromatic pixel coordinates (ox, oy), use the bilinear interpolation method to read the panchromatic data corresponding to the first point from the second panchromatic data.
[0177] (b) Starting from the relative position (rx, ry), select one second point each time in the intersection area [inter_minX, inter_minY, inter_maxX, inter_maxY] according to the multispectral resolution, and read the red, green, and blue three-band data corresponding to the second point from the second multispectral data; repeat the execution until all the red, green, and blue three-band data corresponding to the second points in the intersection area are read, obtaining the second data block.
[0178] Among them, the steps of reading the red, green, and blue three-band data corresponding to the second point from the second multispectral data are similar to the reading of the second panchromatic data above, specifically including (b1)-(b4):
[0179] (b1) According to the multispectral affine transformation model, convert the second pixel coordinates of the second point in the virtual raster data to the second projection coordinates in the target tile coordinate system.
[0180] (b2) Convert the second projection coordinates to the second longitude and latitude coordinates in the geographic coordinate system.
[0181] (b3) According to the multispectral rational function model, convert the second longitude and latitude coordinates to the multispectral pixel coordinates in the second multispectral data.
[0182] (b4) According to the multispectral pixel coordinates, use the bilinear interpolation method to read the red, green, and blue data corresponding to the second point from the second multispectral data.
[0183] In this embodiment, the multispectral data of the Beijing-3 satellite consists of four bands: blue, green, red, and near-infrared. It is necessary to adjust the number and order of the data bands to obtain three-band true-color data.
[0184] (c) Fuse the first data block and the second data block to obtain a fused image data block.
[0185] The fusion algorithm in this embodiment uses Pansharp (a commonly used image fusion algorithm, especially suitable for the fusion of high-resolution panchromatic images and multispectral images to generate high-resolution color images), and at the same time uses the GPU in the on-board intelligent processing device for acceleration processing.
[0186] Step S6315: Resample the fused image data block to obtain resampled data.
[0187] Note: Since the resolution of the tile may not be the same as the resolution of the fused virtual grid data, it is necessary to resample the read data to the corresponding resolution of the tile.
[0188] Specifically, first calculate the target sizes wxsize and wysize to be achieved after resampling, as shown in the following formulas (23)-(24):
[0189]
[0190] Among them, (rxsize, rysize) is the size of the intersection area, [gminX, gminY, gmaxX, gmaxY] is the projection range corresponding to the current tile, and Geores is the resolution of the virtual grid data.
[0191] Then use the bilinear interpolation method to resample the size of the grid data from rxsize×rysize to the target size wxsize×wysize.
[0192] Step S6316: Calculate the writing position of the resampled data at the upper left corner in this tile, as shown in formulas (25)-(26):
[0193]
[0194]
[0195] Among them, (wx, wy) is the writing position, [gminX, gminY, gmaxX, gmaxY] is the projection range corresponding to the current tile, [inter_minX, inter_minY, inter_maxX, inter_maxY] is the intersection area, and [proj_minX, proj_minY, proj_maxX, proj_maxY] is the projection range of the virtual raster data.
[0196] Since at the edge part of the intersection area, the image data may not completely overlap with the data range of the current tile, and it is possible that a part of the current tile is outside the intersection area, so it is necessary to determine the upper left corner writing position.
[0197] Step S6317: Save the resampled data to the tile data buffer according to the writing position.
[0198] Step S6318: Repeat steps S6311 - S6317 until all tiles at the current level to be processed are generated.
[0199] Step S632: Update the current level to be processed.
[0200] Because the above steps S6311 - S6318 have processed one tile level, the current level to be processed should be decreased by 1.
[0201] Step S633: Read the tile data of the next level from the tile data buffer, resample it to generate the tile data of the current level to be processed, and save it to the tile data buffer.
[0202] Among them, the "next level" here is equal to the current level to be processed plus 1.
[0203] Assume that the current level to be processed is Z and the next level is Z + 1. According to the row and column number ranges [tminX, tminY, tmaxX, tmaxY] of the Z - level tiles, the row and column number ranges of the Z + 1 - level tiles can be calculated, and then the Z - level tile image data can be calculated through the Z + 1 - level tile image data.
[0204] Specifically, assume that the row and column number of a certain tile at the Z level is (tx z , ty z ), then the row and column numbers of the four Z + 1 - level tiles corresponding to this tile are (tx z ×2, ty z ×2), (tx z ×2 + 1, ty z ×2), (tx z ×2, ty z ×2 + 1), (tx z×2+1, ty z ×2 + 1), the four tile data at the Z + 1 level stored in the tile buffer are stitched together into an image of size 2p×2p, and then the image is resampled to size p×p to obtain the tile image data at level Z with row and column numbers (tx z , ty z ), and then saved to the tile data buffer. According to this method, all tile image data at level Z can be obtained and saved to the tile data buffer. Step S634: Repeat steps S632 - S633 until all tiles at the smallest tile level are generated.
[0205] Step S635: Compress all tiles in the tile data buffer into a preset picture format and save them to the satellite solid state memory.
[0206] Step S64: When the total amount of unprocessed tile data is greater than the size of the tile data buffer, first generate all tiles at the current level to be processed based on the virtual grid data, and then go to step S61 and repeat until all tiles at the smallest tile level are generated.
[0207] It should be noted that when the total amount of unprocessed tile data is greater than the size of the tile data buffer, it means that the tile data buffer is not large enough to accommodate the tiles at the current level to be processed and the tiles at the remaining levels, and sub - packet processing is required.
[0208] Step S64 can specifically include steps S641 - S644:
[0209] Step S641: Calculate the tile data amount at the current level to be processed according to the number of tiles at the current level to be processed and the preset tile size.
[0210] Step S642: Determine whether the tile data amount at the current level to be processed is less than or equal to the size of the tile data buffer.
[0211] Step S643: When the tile data amount at the current level to be processed is less than or equal to the size of the tile data buffer, generate tiles at the current level to be processed one by one based on the virtual grid data and save them to the tile data buffer, and compress all the generated tiles into a preset picture format and save them to the satellite solid state memory.
[0212] Specifically, the tiles at the current level to be processed do not need to be sub - packeted. First, generate tiles at the current level to be processed one by one and save them to the tile data buffer with reference to steps S6311 - S6318, and finally compress all the generated tiles into a preset picture format and save them to the satellite solid state memory.
[0213] Step S644: When the amount of tile data at the current level to be processed is greater than the size of the tile data buffer, generate tiles at the current level to be processed one by one based on the virtual grid data and save them to the tile data buffer. And for each batch of tiles generated, compress the batch of tiles into a preset image format and save them to the satellite solid state storage.
[0214] Specifically, the tiles at the current level to be processed also need to be sub-packaged for generation. One can refer to steps S6311 - S6318 to generate tiles at the current level to be processed one by one and save them to the tile data buffer. However, different from the above, here because the size of the tile data buffer is not sufficient to accommodate all the tile data at the current level to be processed, it is necessary to compress the batch of tiles saved in the tile data buffer into a preset image format and save them to the satellite solid state storage after each batch of tiles is generated, and then the next batch can be generated.
[0215] Among them, the amount of data of each batch of tiles does not exceed the size of the tile data buffer.
[0216] Although the above embodiments describe each step in the above sequential order, those skilled in the art can understand that in order to achieve the effects of this embodiment, different steps do not have to be executed in such an order. They can be executed simultaneously (in parallel) or in a reversed order, and these simple changes are all within the protection scope of the present invention.
[0217] Based on the above method embodiment, the present invention also provides an embodiment of a satellite-borne remote sensing image tile dynamic generation system based on resource constraints. The system in this embodiment executes the computer program of the method as described above.
[0218] Those skilled in the art should be able to realize that the method steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of electronic hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in the form of electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0219] So far, the technical solution of the present invention has been described in combination with the preferred embodiments shown in the drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the protection scope of the present invention.
Claims
1. A method for dynamically generating tiles of satellite remote sensing images based on resource constraints, the method being applicable to satellite processing equipment, characterized in that: The method comprises: Allocating original data storage area, temporary data storage area and tile data buffer area according to the memory resource constraint of the on-board processing device; Receiving original image data and platform broadcast data, and storing them in the original data storage area; Decoding the original image data in the original data storage area to obtain decoded data; Constructing virtual grid data according to the platform broadcast data, the decoded data and target tile projection information; Calculate the maximum tile level and the minimum tile level, and then calculate the number of tiles and the amount of tile data corresponding to each tile level; Based on the virtual grid data, according to the size of the tile data buffer and the amount of tile data corresponding to each tile level, a packetization strategy is dynamically calculated and tiles of each level are generated.
2. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 1, characterized in that: The decoded data includes: first panchromatic data, first multispectral data and camera auxiliary data; The step of "constructing virtual grid data according to the platform broadcast data, the decoded data and the target tile projection information" includes: Preprocessing the first panchromatic data and the first multispectral data respectively to obtain a radiation correction product; the radiation correction product includes second panchromatic data and second multispectral data; constructing a strict imaging model according to the platform broadcast data and the camera auxiliary data, and converting the strict imaging model into a rational function model; The projection range, panchromatic affine transformation parameters and multispectral affine transformation parameters of the virtual grid data are calculated according to the rational function model and the target tile projection information.
3. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 2, characterized in that: The rational function model includes: a panchromatic rational function model and a multi-spectral rational function model; The target tile projection information includes: a projection conversion method and a target tile coordinate system; The step of "calculating the projection range, panchromatic affine transformation parameters and multispectral affine transformation parameters of the virtual grid data according to the rational function model and the target tile projection information" includes: Calculating the longitude and latitude range of the second panchromatic data in the geographic coordinate system according to the panchromatic rational function model; According to the projection conversion method, the longitude and latitude range of the second panchromatic data in the geographic coordinate system is converted into a projection range in the target tile coordinate system, thereby obtaining the projection range of the virtual raster data; Calculating the image height and width of the virtual grid and the panchromatic affine transformation parameters according to the projection range and panchromatic resolution of the virtual grid data; The multispectral affine transformation parameters are calculated according to the projection range and multispectral resolution of the virtual grid data.
4. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 3 is characterized in that: The steps of "calculating the maximum tile level and the minimum tile level, and then calculating the number of tiles and the amount of tile data corresponding to each tile level" include: Calculate the maximum tile level, the minimum tile level, and the resolution corresponding to each tile level according to the resolution of the virtual grid data, the image height and width, and a preset tile size; According to the projection range of the virtual grid data and the resolution corresponding to each tile level, the row and column number range of each tile level is calculated respectively, and then the number of tiles and the amount of tile data corresponding to each tile level are calculated; The resolution of the virtual grid data is equal to the full color resolution.
5. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 3, characterized in that: The step of "dynamically calculating the subpackaging strategy and generating tiles of each level based on the virtual grid data and the size of the tile data buffer and the amount of tile data corresponding to each tile level" includes: Determine the current level to be processed and calculate the total amount of unprocessed tile data; Determining whether the total amount of unprocessed tile data is less than or equal to the size of the tile data buffer; If yes, generating tile data of the current level to be processed according to the virtual grid data and saving it to the tile data buffer, and then generating tiles in the remaining levels; Otherwise, all tiles of the current level to be processed are generated according to the virtual raster data; the steps of determining the current level to be processed, calculating the total amount of unprocessed tile data, judging whether the total amount of unprocessed tile data is less than or equal to the size of the tile data buffer, and generating tiles according to the judgment result are repeated until tiles of the minimum tile level are generated.
6. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 5, characterized in that: The step of "generating tile data of the current level to be processed according to the virtual grid data and saving it to the tile data buffer, and then generating tiles in the remaining levels" includes: Generating the tiles of the current to-be-processed level one by one based on the virtual grid data and saving them to the tile data buffer; updating the current pending level; Reading the next level of tile data from the tile data buffer, generating the tile data of the current level to be processed after resampling, and saving the data to the tile data buffer; the next level is equal to the current level to be processed plus 1; Repeat the steps of updating the current level to be processed, reading the tile data of the next level, resampling and saving until tiles of the minimum tile level are generated; All tiles in the tile data buffer are compressed into a preset image format and saved in the satellite storage.
7. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 5, characterized in that: The step of "generating all tiles of the current to-be-processed level according to the virtual grid data" includes: Calculating the amount of tile data of the current level to be processed according to the number of tiles of the current level to be processed and a preset tile size; Determine whether the amount of tile data of the current level to be processed is less than or equal to the size of the tile data buffer; If yes, then generate the tiles of the current to-be-processed level one by one based on the virtual grid data and save them to the tile data buffer, compress all the generated tiles into a preset image format and save them to the satellite storage; Otherwise, the tiles of the current to-be-processed level are generated one by one based on the virtual raster data and saved to the tile data buffer, and each time a batch of tiles is generated, the batch of tiles is compressed into a preset image format and saved to the satellite storage; The data volume of each batch of tiles does not exceed the size of the tile data buffer.
8. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 6 or 7, characterized in that: The step of "generating the tiles of the current to-be-processed level one by one based on the virtual grid data and saving them to the tile data buffer" includes: Calculate the projection range of a tile in the current level to be processed according to the row and column numbers of the tile and the resolution corresponding to the current level to be processed; Calculating the intersection area between the projection range of the tile and the projection range of the virtual grid data; Calculating the size of the intersection area and the relative position of the intersection area in the virtual grid data; Reading a fused image data block from the virtual grid data according to the size of the intersection area and the relative position; Resampling the fused image data block to obtain resampled data; Calculate the upper left corner writing position of the resampled data in the tile; Saving the resampled data to the tile data buffer according to the write position; The process is repeated until all tiles of the current level to be processed are generated.
9. The method for dynamically generating satellite remote sensing image tiles based on resource constraints according to claim 8, characterized in that: The step of "reading a fused image data block from the virtual grid data according to the size of the intersection area and the relative position" includes: Starting from the relative position, one first point is selected at a time in the intersection area according to the full-color resolution, and full-color pixel point data corresponding to the first point is read from the second full-color data; the process is repeated until full-color pixel point data corresponding to all the first points in the intersection area are read, so as to obtain a first data block; Starting from the relative position, one second point is selected at a time in the intersection area according to the multispectral resolution, and red, green and blue three-band data corresponding to the second point is read from the second multispectral data; the execution is repeated until all red, green and blue three-band data corresponding to all the second points in the intersection area are read to obtain a second data block; Merging the first data block and the second data block to obtain the fused image data block; in, The step of “reading the full-color pixel point data corresponding to the first point from the second full-color data” includes: According to a full-color affine transformation model, converting a first pixel coordinate of the first point in the virtual grid data into a first projection coordinate in the target tile coordinate system; Convert the first projection coordinates into first longitude and latitude coordinates in the geographic coordinate system; According to the panchromatic rational function model, converting the first longitude and latitude coordinates into panchromatic pixel coordinates in the second panchromatic data; According to the panchromatic pixel coordinates, read the panchromatic data corresponding to the first point from the second panchromatic data using a bilinear interpolation method; The step of “reading the red, green and blue three-band data corresponding to the second point from the second multispectral data” includes: According to the multispectral affine transformation model, converting the second pixel coordinates of the second point in the virtual grid data into second projection coordinates in the target tile coordinate system; Convert the second projection coordinates into second longitude and latitude coordinates in the geographic coordinate system; According to the multispectral rational function model, converting the second longitude and latitude coordinates into multispectral pixel coordinates in the second multispectral data; According to the multispectral pixel coordinates, a bilinear interpolation method is used to read the red, green and blue data corresponding to the second point from the second multispectral data.
10. A satellite remote sensing image tile dynamic generation system based on resource constraints, characterized in that: The system executes a computer program of the method according to any one of claims 1-9.
Citation Information
Patent Citations
Parallel mode grid image slicing method
CN105550977A
Method for setting on-orbit distance door of laser measurement satellite
CN118534473A
Geographic data presentation method and apparatus
WO2017206484A1