Resource constraint based on-board remote sensing image tile dynamic generation method and system
By constructing a virtual raster data and dynamic sub-packaging strategy for generating on-board remote sensing image tiles, the problem of low on-board processing timeliness is solved, and the efficient generation of remote sensing image tiles is achieved under limited resources, thereby improving timeliness and resource utilization.
Patent Information
- Application Number
- CN202510141010.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-02-08
AI Technical Summary
Existing remote sensing image tile generation methods suffer from low on-board processing efficiency and insufficient resources, failing to meet real-time data processing requirements.
A resource-constrained on-board remote sensing image tile dynamic generation method is adopted. By constructing virtual raster data and dynamically calculating the sub-packaging strategy, tiles are generated, which improves timeliness and accuracy with limited resources.
Without compromising accuracy, it improves the satellite's on-orbit data processing capabilities and the timeliness of tile data distribution, reduces reliance on on-board resources, and saves storage space.
Smart Images

Figure CN120179744B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of remote sensing image processing, and particularly relates to a resource-constrained-based on-board remote sensing image tile dynamic generation method and system. BACKGROUND
[0002] Remote sensing image tile service has become a commonly used mode of Internet public map service, and the generation of remote sensing image tiles refers to the process of cutting a specified range of remote sensing image data into a certain number of rows and columns of fixed-size square grid pictures at a certain scale. The cut rows and columns of square pictures are saved into picture files in a specified format, stored in a directory system or a database according to a certain naming rule and organization method, and form a static map cache of a pyramid model. A user requests a specific range of remote sensing image data through a client (such as a Web browser, a mobile application, etc.), a server calculates and determines the map tiles that need to be transmitted to the client according to the request of the client, and transmits the tiles to the client, and the client dynamically splices the tiles to show the complete remote sensing image after receiving the tiles.
[0003] In the traditional remote sensing image tile generation method, satellite data needs to be downloaded first, and then the fused or mosaicked data is processed after preprocessing, however, the data download is limited by the distribution of ground receiving stations, and cannot be processed at the first time after data acquisition, which has low timeliness. Meanwhile, the storage and cache occupy a large amount of space during the processing. On-board processing can improve timeliness, but due to insufficient on-board processing resources, limited energy consumption and short processing time, existing algorithms cannot be directly applied.
[0004] Therefore, it is urgent to propose a tile generation method suitable for on-board processing. SUMMARY
[0005] In order to solve the above problems in the prior art, the present application proposes a resource-constrained-based on-board remote sensing image tile dynamic generation method and system, which improves the timeliness without reducing the accuracy.
[0006] In a first aspect of the present application, a resource-constrained-based on-board remote sensing image tile dynamic generation method is provided, which is suitable for on-board processing equipment, and the method comprises:
[0007] allocating a raw data storage area, a temporary data storage area and a tile data buffer area according to the memory resource constraints of the on-board processing equipment;
[0008] receiving raw image data and platform broadcast data and storing them in the raw data storage area;
[0009] decode the original image data in the original data storage area to obtain decoded data;
[0010] construct virtual grid data according to the platform broadcast data, the decoded data and target tile projection information;
[0011] calculate a maximum tile level and a minimum tile level, and further calculate a tile quantity and a tile data volume corresponding to each tile level;
[0012] based on the virtual grid data, dynamically calculate a packaging strategy and generate tiles of each level according to a size of the tile data buffer and the tile data volume corresponding to each tile level.
[0013] Preferably, the decoded data comprises first panchromatic data, first multi-spectral data and camera auxiliary data.
[0014] The step of "constructing virtual grid data according to the platform broadcast data, the decoded data and target tile projection information" comprises:
[0015] respectively pre-process the first panchromatic data and the first multi-spectral data to obtain radiation correction products; the radiation correction products comprise second panchromatic data and second multi-spectral data;
[0016] 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;
[0017] calculate a projection range, panchromatic affine transformation parameters and multi-spectral affine transformation parameters of the virtual grid data according to the rational function model and the target tile projection information.
[0018] Preferably, the rational function model comprises a panchromatic rational function model and a multi-spectral rational function model.
[0019] The target tile projection information comprises a projection conversion method and a target tile coordinate system.
[0020] The step of "calculating a projection range, panchromatic affine transformation parameters and multi-spectral affine transformation parameters of the virtual grid data according to the rational function model and the target tile projection information" comprises:
[0021] calculate a longitude and latitude range of the second panchromatic data under a geographic coordinate system according to the panchromatic rational function model;
[0022] convert the longitude and latitude range of the second panchromatic data under the geographic coordinate system into a projection range under the target tile coordinate system according to the projection conversion method, thereby obtaining the projection range of the virtual grid data;
[0023] calculating image height and width of the virtual grid and the panchromatic affine transformation parameters according to the projection range and the panchromatic resolution of the virtual grid data;
[0024] calculating the multispectral affine transformation parameters according to the projection range and the 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 tile quantity and tile data quantity corresponding to each tile level" comprises:
[0026] calculating 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] calculating the row and column number range 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 calculating the tile quantity and tile data quantity 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 "based on the virtual grid data, dynamically calculating the packaging strategy and generating the tiles of each level according to the size of the tile data buffer and the tile data quantity corresponding to each tile level" comprises:
[0030] determining the current level to be processed and calculating the total tile data quantity to be processed;
[0031] judging whether the total tile data quantity to be processed is less than or equal to the size of the tile data buffer;
[0032] if yes, generating the tile data of the current level to be processed according to the virtual grid data and saving to the tile data buffer, and then generating the tiles in the remaining levels;
[0033] otherwise, generating all the tiles of the current level to be processed according to the virtual grid data; repeating the steps of determining the current level to be processed, calculating the total tile data quantity to be processed, judging whether the total tile data quantity to be processed is less than or equal to the size of the tile data buffer, and generating the 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 according to the virtual grid data and saving to the tile data buffer, and then generating the tiles in the remaining levels" comprises:
[0035] generating the tiles of the current processing level one by one based on the virtual grid data and saving to the tile data buffer;
[0036] updating the current processing level;
[0037] reading the tile data of the next level from the tile data buffer, generating the tile data of the current processing level after resampling and saving to the tile data buffer; the next level is equal to the current processing level plus 1;
[0038] repeating the steps of updating the current processing level, reading the tile data of the next level, resampling and saving until the tiles of the minimum tile level are generated;
[0039] compressing all the tiles in the tile data buffer into a preset picture format and saving to the satellite solid storage.
[0040] Preferably, the step of "generating all the tiles of the current processing level based on the virtual grid data" comprises:
[0041] calculating the tile data amount of the current processing level according to the number of tiles of the current processing level and the preset tile size;
[0042] judging whether the tile data amount of the current processing level is less than or equal to the size of the tile data buffer;
[0043] If yes, generating the tiles of the current processing level one by one based on the virtual grid data and saving to the tile data buffer, and compressing all the generated tiles into a preset picture format and saving to the satellite solid storage;
[0044] Otherwise, generating the tiles of the current processing level one by one based on the virtual grid data and saving to the tile data buffer, and compressing each batch of tiles into a preset picture format and saving to the satellite solid storage after the batch of tiles is generated;
[0045] Wherein, the data amount 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 processing level one by one based on the virtual grid data and saving to the tile data buffer" comprises:
[0047] calculating the projection range of a certain tile in the current processing level according to the row and column numbers of the tile and the resolution corresponding to the current processing level;
[0048] calculating the intersection area of the projection range of the tile and the projection range of the virtual grid data;
[0049] calculating a size of the intersection area and a relative position of the intersection area in the virtual raster data;
[0050] reading a fused image data block from the virtual raster data according to the size of the intersection area and the relative position;
[0051] resampling the fused image data block to obtain resampled data;
[0052] solving a top-left writing position of the resampled data in the tile;
[0053] storing the resampled data into the tile data buffer according to the writing position;
[0054] repeating the execution until all tiles of the current to-be-processed level are generated.
[0055] Preferably, the step of "reading a fused image data block from the virtual raster data according to the size of the intersection area and the relative position" comprises:
[0056] selecting one first point in the intersection area according to the full-color resolution each time from the relative position, reading full-color pixel data corresponding to the first point from the second full-color data; repeating the execution until all full-color pixel data corresponding to all first points in the intersection area are read to obtain a first data block;
[0057] selecting one second point in the intersection area according to the multi-spectrum resolution each time from the relative position, reading red-green-blue three-band data corresponding to the second point from the second multi-spectrum data; repeating the execution until all red-green-blue three-band data corresponding to all second points in the intersection area are read to obtain a second data block;
[0058] fusing the first data block and the second data block to obtain the fused image data block;
[0059] wherein,
[0060] the step of "reading full-color pixel data corresponding to the first point from the second full-color data" comprises:
[0061] converting first pixel coordinates of the first point in the virtual raster data into first projection coordinates under the target tile coordinate system according to a full-color affine transformation model;
[0062] converting the first projection coordinates into first longitude-latitude coordinates under the geographic coordinate system;
[0063] According to the full-color rational function model, the first longitude and latitude coordinates are converted into full-color pixel coordinates in the second full-color data;
[0064] According to the full-color pixel coordinates, full-color data corresponding to the first point is read from the second full-color data by using a bilinear interpolation method;
[0065] The step of "reading red-green-blue three-band data corresponding to the second point from the second multi-spectral data" comprises:
[0066] According to a multi-spectral affine transformation model, the second pixel coordinates of the second point in the virtual grid data are converted into second projection coordinates under the target tile coordinate system;
[0067] The second projection coordinates are converted into second longitude and latitude coordinates under the geographic coordinate system;
[0068] According to the multi-spectral rational function model, the second longitude and latitude coordinates are converted into multi-spectral pixel coordinates in the second multi-spectral data;
[0069] According to the multi-spectral pixel coordinates, red-green-blue data corresponding to the second point is read from the second multi-spectral data by using a bilinear interpolation method.
[0070] In a second aspect, the application provides a resource-constrained satellite remote sensing image tile dynamic generation system, which executes a computer program for implementing the above method.
[0071] The application has the following advantages:
[0072] (1) The resource-constrained satellite remote sensing image tile dynamic generation method provided by the application adopts a satellite tile generation scheme, first generates a virtual grid according to decoded data, then performs data reading and fusion based on the virtual grid, and further generates a tile. 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, improving satellite on-orbit data processing capability and tile data publishing timeliness without reducing precision, and reducing dependence on satellite resources.
[0073] (2) The second full-color data and the second multi-spectral data with the same geographic range are respectively mapped to the same virtual grid, so that in the subsequent tile generation process, the second full-color data and the second multi-spectral data obtained after preprocessing can be respectively read from a temporary data storage area according to the mapping relationship between the virtual grid and the two types of data (full-color and multi-spectral), and then fused.
[0074] (3) In the process of generating tiles step by step, the dynamic calculation of the sub-packet strategy is made according to the size of the tile data buffer and the total data amount of the unprocessed tiles, so that the tile data buffer can be fully utilized and errors caused by insufficient buffer space can be avoided. BRIEF DESCRIPTION OF DRAWINGS
[0075] Figure 1 is the main step schematic diagram of the on-board remote sensing image tile dynamic generation method embodiment based on resource constraints in the application. DETAILED DESCRIPTION
[0076] The preferred embodiments of the application 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 application, and are not intended to limit the protection scope of the application.
[0077] In order to make the purpose, technical scheme and advantages of the embodiments of the application more clear, the technical scheme of the embodiments of the application will be described clearly and completely below with reference to the accompanying drawings of the embodiments of the application. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.
[0078] It should be noted that in the description of the application, the terms "first", "second" are only used for convenience of description, and do not indicate or imply relative importance of the devices, elements or parameters, and therefore cannot be understood as a limitation of the application. In addition, the term "and / or" in the application is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the three cases of A alone, A and B together, and B alone. In addition, the character " / " in this paper, if not specially stated, generally represents an "or" relationship between the associated objects before and after it.
[0079] Figure 1 is the main step schematic diagram of the on-board remote sensing image tile dynamic generation method embodiment based on resource constraints in the application. The method of this embodiment is suitable for on-board processing devices, such as Figure 1 As shown in the figure, the method comprises steps S10-S60:
[0080] Step S10, according to the memory resource constraints of the on-board processing device, the original data storage area, the temporary data storage area and the tile data buffer are allocated.
[0081] In this embodiment, the available memory resources of the intelligent processing device on the satellite are divided into a raw data storage area, a temporary data storage area and a tile data buffer according to a preset proportion. The raw data storage area has a size of M1 and is used to store raw image data and platform broadcast data received by the intelligent processing device on the satellite; the temporary data storage area has a size of M2 and is used to store intermediate data in the data processing process; and the tile data buffer has a size of M3 and is used to store generated tile data.
[0082] Step S20: receiving raw image data and platform broadcast data and storing the data 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 and the like.
[0084] Step S30: decoding the raw image data in the raw data storage area to obtain decoded data.
[0085] The decoded data includes first panchromatic data, first multispectral data and camera auxiliary data.
[0086] Step S40: constructing virtual grid data according to the platform broadcast data, the decoded data and target tile projection information. This step can specifically include steps S41-S43.
[0087] Step S41: respectively pre-processing the first panchromatic data and the first multispectral data to obtain radiation correction products, i.e., second panchromatic data and second multispectral data.
[0088] The pre-processing includes operations such as radiation correction, intra-slice color uniformity, radial distortion, band registration and inter-slice color uniformity.
[0089] Step S42: 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.
[0090] The rational function model is a mathematical model used to describe the nonlinear correspondence between the pixel point coordinates of a remote sensing image and the latitude and longitude 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: calculating the projection range of the virtual grid data, panchromatic affine transformation parameters and multispectral affine transformation parameters according to the rational function model and the target tile projection information.
[0093] The target tile projection information includes a projection conversion method and a target tile coordinate system. The projection method can adopt a Web Mercator projection or a CGCS2000 geodetic coordinate system, and in this embodiment, the Web Mercator projection is adopted.
[0094] In the prior art, memory space is allocated for storing the second panchromatic data and the data after the second panchromatic data and the second multispectral data are fused. In this embodiment, a virtual grid is adopted to save storage space, that is, the second panchromatic data and the second multispectral data with the same geographical range are respectively mapped to the same virtual grid. The method for obtaining the virtual grid data in the subsequent tile generation process is as follows: according to the mapping relationship between the virtual grid and the two types of data (panchromatic and multispectral), the second panchromatic data and the second multispectral data obtained after preprocessing are respectively read from the temporary data storage area, and then fused. As can be seen, the virtual grid itself does not occupy memory space in this embodiment.
[0095] Step S43 can specifically include steps S431-S434:
[0096] Step S431, calculates the longitude and latitude range [geo_minX, geo_minY, geo_maxX, geo_maxY] of the second panchromatic data under the geographical 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, converts the longitude and latitude range of the second panchromatic data under the geographical coordinate system into a projection range under the target tile coordinate system according to the projection conversion method, 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 the longitude and latitude coordinates into the Web Mercator projection coordinates is shown in the following formulas (1)-(2):
[0100]
[0101] Wherein, proj_x and proj_y are the projection coordinates under the Web Mercator coordinate system; lon and lat are the longitude and latitude coordinates, respectively. R is the radius of the earth, the default value is 6378137 meters, which is half of the circumference of the earth, and the value of originShift=20037508.3427892 is used. Only the longitude and latitude coordinates of the four corners of the second panchromatic image are input into the above formulas (1)-(2) to obtain the projection range of the virtual grid data.
[0102] In this embodiment, the calculated projection range of the virtual grid data is [12961644.30, 4866527.34, 12981083.53, 4887291.16].
[0103] Step S433, according to the projection range of the second panchromatic data in the target tile coordinate system and the panchromatic resolution, the image height and width of the virtual grid and the panchromatic affine transformation parameters are calculated.
[0104] In this embodiment, the resolution of the virtual grid data refers to the resolution after the fusion of the two kinds of data, that is, the resolution 0.5 of the panchromatic data. According to the projection range of the virtual grid data, the maximum and minimum values in the X direction are subtracted and then divided by the resolution 0.5 to obtain the image width of the virtual grid; similarly, the maximum and minimum values in the Y direction are subtracted and then divided by the resolution 0.5 to obtain the image height. In this embodiment, the calculated image size is [38876, 41528].
[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, so the panchromatic affine transformation parameters include the following 6 variables:
[0106] (1) the projection coordinate X corresponding to the upper left corner 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 upper left corner 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 [12961644.30, 0.5, 0, 4887291.16, 0, -0.5].
[0113] Step S434, according to the projection range of the virtual grid data and the multispectral resolution, the multispectral affine transformation parameters are calculated.
[0114] For specific calculation methods, please refer to the calculation method of panchromatic affine transformation parameters in step S433.
[0115] Step 50: Calculate the maximum and minimum tile levels, and then calculate the number of tiles and the amount of tile data corresponding to each tile level.
[0116] This step may specifically include steps S51-S52:
[0117] Step S51: Based on the resolution, image height and width of the virtual raster data, 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: Calculate the maximum tile level and its corresponding resolution based on the resolution (i.e., full-color resolution) of the virtual raster data and the preset tile size.
[0119] Specifically, the resolution at a certain tile level can be calculated using the method shown in formula (3) below:
[0120]
[0121] Where Z represents the tile level, res z This represents the resolution of the Zth tile level, p is the preset tile size (256 in this embodiment), and c is the equatorial circumference (40075016.6855785).
[0122] By progressively increasing the tile level Z and calculating the corresponding resolution, the maximum tile level that meets the full-color resolution requirement (the res of this level) is found. z The value is closest to and greater than the value of the full color resolution, as well as the resolution corresponding to the maximum tile level.
[0123] In this embodiment, the maximum tile level calculated is level 18, corresponding to a resolution of 0.597164263 meters.
[0124] Step S512: Based on the image height and width of the virtual raster and the preset tile size, calculate the resolution that can be achieved when displaying the entire virtual raster image on a single tile, and then calculate the minimum tile level and the corresponding resolution.
[0125] Specifically, the resolution achievable when displaying the entire virtual raster image on a single tile is first calculated according to the following formula (4):
[0126]
[0127] Among them, imageres 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, the tile-level Z in formula (3) is gradually reduced, and the resolution of each tile level is calculated and compared with image res to obtain the minimum tile level (the res z value of the tile level is closest to image res and greater than image res ), and the resolution corresponding to the minimum tile level.
[0129] In this embodiment, the calculated minimum tile level is level 10, and the corresponding resolution is 152.8740566 meters.
[0130] Step S513, according to the maximum tile level, the minimum tile level, and the preset tile size, the resolution corresponding to each intermediate tile level is calculated respectively.
[0131] Specifically, the resolution corresponding to the intermediate tile level (levels 11-17 in this embodiment) can be calculated according to formula (3) above.
[0132] Step S52, 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 tile quantity and tile data quantity corresponding to each tile level are calculated.
[0133] Wherein, the resolution of the virtual grid data is equal to the panchromatic resolution.
[0134] Specifically, first, the row and column number range [tminX, tminY, tmaxX, tmaxY] of each tile level is calculated according to the method shown in the following formulas (5)-(8):
[0135]
[0136] Wherein, [proj_minX, proj_minY, proj_maxX, proj_maxY] is the projection range of the virtual grid data, i.e. half of the circumference of the earth, R represents the radius of the earth, res z represents the resolution of the Zth tile level, p is the preset tile size, represents the upward rounding.
[0137] Secondly, the number of tiles of each level can be calculated according to the following formula (9) :
[0138] count Z = (1 + (tmaxX-tminX)) x (1 + (tmaxY-tminY) (9)
[0139] wherein, count Z is the number of tiles of the Zth level.
[0140] In this embodiment, the number of tiles corresponding to each tile level is respectively 17536, 4416, 1155, 306, 90, 30, 9, 4, 1, and the total number is 23547.
[0141] Then, the tile data amount of each level is calculated according to the following formula (10) :
[0142] size z = count Z x p x p x 3 (10)
[0143] Step S60, based on the virtual grid data, dynamically calculates the packeting strategy and generates tiles of each level according to the size of the tile data buffer and the tile data amount corresponding to each tile level.
[0144] Step S60 can specifically include steps S61-S64:
[0145] Step S61, determines the current level to be processed and calculates the total data amount of unprocessed tiles.
[0146] In this embodiment, the initial value of the current level to be processed is the maximum tile level 18, and then decreases by 1 each time the loop reaches S61.
[0147] The initial value of the total data amount of unprocessed tiles is the sum of the tile data amount of each level, and then is calculated according to the unprocessed tile level each time the loop reaches S61. In this embodiment, the initial value of the number of unprocessed tiles is 23547, and then the initial value of the total data amount of unprocessed tiles is 4629528576 bytes.
[0148] Step S62, judges whether the total data amount of unprocessed tiles is less than or equal to the size of the tile data buffer.
[0149] Step S63, in the case that the total data amount of unprocessed tiles is less than or equal to the size of the tile data buffer, generates the tile data of the current level to be processed according to the virtual grid data and saves it to the tile data buffer, and then generates the tiles in the remaining levels.
[0150] It should be noted that the total amount of tiles data that is not processed is less than or equal to the size of the tile data buffer, which means that the tile data buffer is sufficient to accommodate the tiles of the current level to be processed and the tiles of the remaining levels, and no packet processing is required. Therefore, the tiles of the current level to be processed (as a relatively bottom layer, not necessarily the 18th layer) can be generated first and saved to the tile data buffer, and then the tiles of the remaining levels (non-bottom layer) can be generated in sequence according to the data of the tile data buffer. The specific description is as follows steps S631-S635:
[0151] Step S631, generate the tiles of the current level to be processed based on the virtual grid data one by one and save them to the tile data buffer. This step can specifically include steps S6311-S6318:
[0152] Step S6311, according to the row and column number of a tile in the current level to be processed and the resolution corresponding to the current level to be processed, calculate the projection range of the tile, 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] Where (tx z , ty z ) is the row and column number of a tile in the current level to be processed, res z represents the resolution of the current level to be processed, originShiftX and originShiftY are both half of the circumference of the earth, and [gminX, gminY, gmaxX, gmaxY] is the projection range corresponding to the tile.
[0158] Step S6312, calculate the intersection area [inter_minX, inter_minY, inter_maxX, inter_maxY] of the projection range of the tile and the projection range of the virtual grid data.
[0159] Step S6313, calculate the size (rxsize, rysize) of the intersection region and the relative position (rx, ry) of the intersection region in the virtual raster data, as shown in formulas (15)-(18):
[0160]
[0161] wherein, [proj_minX, proj_minY, proj_maxX, proj_maxY] is the projection range of the virtual raster data; Geores is the resolution of the virtual raster data.
[0162] Step S6314, read a fused image data block from the virtual raster data according to the size (rxsize, rysize) and the relative position (rx, ry) of the intersection region.
[0163] The method of reading the fused image data block can be performed according to the following steps (a)-(c):
[0164] (a) starting from the relative position (rx, ry), select a first point in the intersection region [inter_minX, inter_minY, inter_maxX, inter_maxY] according to the panchromatic resolution each time, read the panchromatic pixel point data corresponding to the first point from the second panchromatic data. Repeat until all panchromatic pixel point data corresponding to the first point in the intersection region is read, and obtain a first data block.
[0165] wherein, the step of reading the panchromatic pixel point data corresponding to the first point from the second panchromatic data can include (a1)-(a4):
[0166] (a1) according to the panchromatic affine transformation model, convert the first pixel coordinate of the first point in the virtual raster data into the first projection coordinate (px, py) under the target tile coordinate system, as shown in formulas (19)-(20):
[0167] px = geoTransform[0] + geoTransform[1] x rx
[0168] + geoTransform[2] x ry (19)
[0169] py = geoTransform[3] + geoTransform[4] x rx
[0170] + geoTransform[5] x ry (20)
[0171] Wherein, geoTransform[0] to geoTransform[5] are panchromatic affine transformation parameters in the panchromatic affine transformation model, and (rx, ry) is the relative position.
[0172] (a2) converting the first projection coordinate (px, py) into the first longitude and latitude coordinate (lon, lat) in the geographic coordinate system, as shown in formulas (21)-(22):
[0173]
[0174] Wherein, originShift is half of the earth's circumference.
[0175] (a3) converting the first longitude and latitude coordinate into the panchromatic pixel coordinate (ox, oy) in the second panchromatic data according to the panchromatic rational function model.
[0176] (a4) reading the panchromatic data corresponding to the first point from the second panchromatic data according to the panchromatic pixel coordinate (ox, oy) by using the bilinear interpolation method.
[0177] (b) starting from the relative position (rx, ry), selecting one second point in the intersection area [inter_minX, inter_minY, inter_maxX, inter_maxY] according to the multispectral resolution each time, reading the red, green and blue three-band data corresponding to the second point from the second multispectral data; repeating the execution until all the red, green and blue three-band data corresponding to the second points in the intersection area are read, and obtaining the second data block.
[0178] Wherein, the step of reading the red, green and blue three-band data corresponding to the second point from the second multispectral data is similar to the reading of the second panchromatic data above, and specifically includes (b1)-(b4):
[0179] (b1) converting the second pixel coordinate of the second point in the virtual grid data into the second projection coordinate in the target tile coordinate system according to the multispectral affine transformation model.
[0180] (b2) converting the second projection coordinate into the second longitude and latitude coordinate in the geographic coordinate system.
[0181] (b3) converting the second longitude and latitude coordinate into the multispectral pixel coordinate in the second multispectral data according to the multispectral rational function model.
[0182] (b4) reading the red, green and blue data corresponding to the second point from the second multispectral data according to the multispectral pixel coordinate by using the bilinear interpolation method.
[0183] In this embodiment, the multispectral data of Beijing No. 3 satellite is four bands of blue, green, red and near-infrared, and the number and order of the bands need to be adjusted to obtain three-band true color data.
[0184] (c) fusing 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 uses the GPU in the on-board intelligent processing device for accelerated processing.
[0186] Step S6315, resampling the fused image data block to obtain resampled data.
[0187] Description: Since the resolution of the tile may not be consistent with the resolution of the fused virtual grid data, the read-in data needs to be resampled to the corresponding resolution of the tile.
[0188] Specifically, first, the target size wxsize and wysize after resampling are calculated, as shown in the following formulas (23)-(24):
[0189]
[0190] Where (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, the size of the grid data is resampled from rxsize x rysize to the target size wxsize x wysize using the bilinear interpolation method.
[0192] Step S6316, calculating the top-left corner write position of the resampled data in the tile, as shown in the following formulas (25)-(26):
[0193]
[0194]
[0195] Where (wx,wy) is the write 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 region, and [proj_minX,proj_minY,proj_maxX,proj_maxY] is the projection range of the virtual raster data.
[0196] Since the image data may not completely overlap with the data range of the current tile at the edge of the intersection area, and part of the current tile may be outside the intersection area, it is necessary to determine the top left corner write position.
[0197] Step S6317: Save the resampled data to the tile data buffer according to the write location.
[0198] Step S6318: Repeat steps S6311-S6317 until all tiles for the current processing level are generated.
[0199] Step S632: Update the current pending level.
[0200] Since steps S6311-S6318 above have already processed one tile level, the current level to be processed should be reduced by 1.
[0201] Step S633: Read the next level of tile data from the tile data buffer, resample to generate the tile data of the current level to be processed, and save it to the tile data buffer.
[0202] Here, "next level" equals the current pending level plus 1.
[0203] Assuming the current level to be processed is Z and the next level is Z+1, the row and column number range of the Z+1 level tiles can be calculated based on the row and column number range of the Z level tiles [tminX,tminY,tmaxX,tmaxY]. Then, the Z level tile image data can be calculated from the Z+1 level tile image data.
[0204] Specifically, suppose the row and column numbers of a certain tile at level Z are (tx z ,ty z If the value of the tile is tx, then the row and column numbers of the four Z+1 level tiles corresponding to that tile are (tx) z ×2,ty z ×2),(tx z ×2+1,ty z ×2),(tx z ×2,ty z ×2+1),(tx zx2+1, ty z x2+1), the four Z+1 level tile data saved in the tile buffer is spliced into a 2p x 2p size image, and then the image is resampled to p x p size, so that the Z level tile image data with row and column numbers (tx z , ty z ) can be obtained, and then saved to the tile data buffer. According to this method, all Z level tile image data can be obtained and saved to the tile data buffer. Steps S634, steps S632-S633 are repeatedly executed until all tiles of the minimum tile level are generated.
[0205] Step S635, compress all tiles in the tile data buffer into a preset picture format and save to the satellite solid storage (satellite solid state memory).
[0206] Step S64, if the total amount of unprocessed tiles is greater than the size of the tile data buffer, first generate all tiles of the current level to be processed according to the virtual grid data, and then go to step S61 for repeated execution until the tiles of the minimum tile level are generated.
[0207] It should be noted that the total amount of unprocessed tiles is greater than the size of the tile data buffer, which means that the tile data buffer is not enough to accommodate the tiles of the current level to be processed and the remaining level tiles, so the package processing is needed.
[0208] Step S64 can specifically include steps S641-S644:
[0209] Step S641, according to the number of tiles of the current level to be processed and the preset tile size, calculate the tile data amount of the current level to be processed.
[0210] Step S642, determine whether the tile data amount of the current level to be processed is less than or equal to the size of the tile data buffer.
[0211] Step S643, if the tile data amount of the current level to be processed is less than or equal to the size of the tile data buffer, 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 all generated tiles into a preset picture format and save them to the satellite solid storage.
[0212] Specifically, the tiles of the current level to be processed do not need to be packaged, and can first be generated one by one according to steps S6311-S6318 and saved to the tile data buffer, and finally all generated tiles are compressed into a preset picture format and saved to the satellite solid storage.
[0213] In step S644, if the tile data amount of the current level to be processed is greater than the size of the tile data buffer, the tiles of the current level to be processed are generated one by one based on the virtual grid data and saved to the tile data buffer, and each batch of tiles is compressed into a preset picture format and saved to the satellite storage.
[0214] Specifically, the tiles of the current level to be processed also need to be packaged to be generated, and the tiles of the current level to be processed can be generated one by one and saved to the tile data buffer according to steps S6311-S6318. However, different from the above, because the size of the tile data buffer is not enough to accommodate all the tile data of the current level to be processed, each batch of tiles saved in the tile data buffer needs to be compressed into a preset picture format and saved to the satellite storage before the next batch is generated.
[0215] In which, the data amount of each batch of tiles does not exceed the size of the tile data buffer.
[0216] Although the above embodiments describe the steps in the above order, those skilled in the art can understand that, in order to achieve the effect of the embodiments, the steps do not have to be executed in this order, and they can be executed simultaneously (in parallel) or in reverse order, and these simple changes are within the protection scope of the present application.
[0217] Based on the above method embodiments, the present application also provides an embodiment of a resource-constrained satellite remote sensing image tile dynamic generation system, and the system of the embodiment executes the computer program of the above method.
[0218] Those skilled in the art can understand that the method steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both, and in order to clearly illustrate the interchangeability of electronic hardware and software, the components and steps of each example have been described in the above description. Whether the functions are executed in 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 beyond the scope of the present application.
[0219] So far, the technical solution of the present application has been described in combination with the preferred embodiments shown in the drawings. However, those skilled in the art can easily understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to related technical features without deviating from the principles of the present application, and the technical solutions after these changes or replacements will fall within the protection scope of the present application.
Claims
1. A resource-constrained based on-board remote sensing image tile dynamic generation method, the method is suitable for on-board processing device, characterized in that, The method comprises: allocating a raw data storage area, a temporary data storage area and a tile data buffer according to memory resource constraints of the on-board processing device; receiving raw image data and platform broadcast data and storing them in the raw data storage area; decoding the raw image data in the raw 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; calculating a maximum tile level and a minimum tile level, and then calculating the number of tiles corresponding to each tile level and the tile data volume corresponding to each tile level; based on the virtual grid data, dynamically calculating a packaging strategy and generating tiles of each level according to the size of the tile data buffer and the tile data volume corresponding to each tile level, specifically comprising: determining a current level to be processed and calculating the total data volume of unprocessed tiles; judging whether the total data volume of unprocessed tiles 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 them to the tile data buffer, and then generating tiles in the remaining levels; otherwise, generating all tiles of the current level to be processed according to the virtual grid data; repeating the steps of determining the current level to be processed, calculating the total data volume of unprocessed tiles, judging whether the total data volume of 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.
2. The resource-constrained-based on-board remote sensing image tile dynamic generation method according to claim 1, wherein the decoded data comprises 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 target tile projection information" comprises: respectively pre-processing the first panchromatic data and the first multispectral data to obtain radiation correction products; the radiation correction products comprise 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; 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.
3. The resource-constrained-based on-board remote sensing image tile dynamic generation method according to claim 2, wherein the rational function model comprises a panchromatic rational function model and a multispectral rational function model; the target tile projection information comprises 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" comprises: calculating the latitude and longitude range of the second panchromatic data under 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, so as to obtain a projection range of the virtual grid data; According to the projection range of the virtual grid data and the panchromatic resolution, the image height and width of the virtual grid and the panchromatic affine transformation parameters are calculated. According to the projection range of the virtual grid data and the multispectral resolution, the multispectral affine transformation parameters are calculated.
4. The resource-constrained-based on-board remote sensing image tile dynamic generation method according to claim 3, characterized in that the step of "calculating the maximum tile level and the minimum tile level, and then calculating the tile quantity and tile data quantity corresponding to each tile level" comprises: According to the resolution of the virtual grid data, the image height and width, and the preset tile size, the maximum tile level, the minimum tile level, and the resolution corresponding to each tile level are calculated. 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 tile quantity and tile data quantity corresponding to each tile level are calculated. The resolution of the virtual grid data is equal to the panchromatic resolution.
5. The resource-constrained-based on-board remote sensing image tile dynamic generation method according to claim 1, characterized in that the step of "generating the tile data of the current processing level according to the virtual grid data and saving it into the tile data buffer, and then generating the tiles in the remaining levels" comprises: The tiles of the current processing level are generated one by one based on the virtual grid data and saved into the tile data buffer. The current processing level is updated. The tile data of the next level is read from the tile data buffer, resampled to generate the tile data of the current processing level, and saved into the tile data buffer; the next level is equal to the current processing level plus 1. The steps of updating the current processing level, reading the tile data of the next level, resampling, and saving are repeated until the tiles of the minimum tile level are generated. All the tiles in the tile data buffer are compressed into a preset picture format and saved into the satellite solid storage.
6. The resource-constrained-based on-board remote sensing image tile dynamic generation method according to claim 1, characterized in that the step of "generating all the tiles of the current processing level according to the virtual grid data" comprises: The tile data quantity of the current processing level is calculated according to the tile quantity of the current processing level and the preset tile size. It is judged whether the tile data quantity of the current processing level is less than or equal to the size of the tile data buffer. If yes, the tiles of the current processing level are generated one by one based on the virtual grid data and saved into the tile data buffer, and all the generated tiles are compressed into a preset picture format and saved into the satellite solid storage. 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 tiles into a preset picture format and save them to the satellite solid storage after the batch of tiles is generated; Wherein, the data amount of each batch of tiles does not exceed the size of the tile data buffer.
7. The resource-constrained based on-board remote sensing image tile dynamic generation method according to claim 5 or 6, characterized in that, 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" comprises: According to the row and column numbers of a tile in the current level to be processed and the resolution corresponding to the current level to be processed, calculate the projection range of the tile; Calculate the intersection area of the projection range of the tile and the projection range of the virtual grid data; Calculate the size of the intersection area and the relative position of the intersection area in the virtual grid data; According to the size and the relative position, read a fused image data block from the virtual grid data; Resample the fused image data block to obtain resampled data; Solve the upper left corner writing position of the resampled data in the tile; According to the writing position, save the resampled data to the tile data buffer; Repeat until all tiles of the current level to be processed are generated.
8. The resource-constrained based on-board remote sensing image tile dynamic generation method according to claim 7, characterized in that, The step of "according to the size and the relative position, read a fused image data block from the virtual grid data" comprises: From the relative position, select a first point in the intersection area according to the panchromatic resolution each time, read the panchromatic pixel point data corresponding to the first point from the second panchromatic data; repeat until all panchromatic pixel point data corresponding to the first points in the intersection area are read, to obtain a first data block; From the relative position, select a second point in the intersection area according to the multi-spectral resolution each time, read the red-green-blue three-band data corresponding to the second point from the second multi-spectral data; repeat until all red-green-blue three-band data corresponding to the second points in the intersection area are read, to obtain a second data block; Fuse the first data block and the second data block to obtain the fused image data block; Wherein, The step of "read the panchromatic pixel point data corresponding to the first point from the second panchromatic data" comprises: According to the panchromatic affine transformation model, convert the first pixel coordinates of the first point in the virtual grid data into first projection coordinates under the target tile coordinate system; Convert the first projection coordinates into first latitude and longitude coordinates under the geographic coordinate system; According to the panchromatic rational function model, convert the first latitude and longitude 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 by using the bilinear interpolation method; The step of "reading the red-green-blue three-band data corresponding to the second point from the second multi-spectral data" comprises: converting the second pixel coordinate of the second point in the virtual grid data into a second projection coordinate under the target tile coordinate system according to a multi-spectral affine transformation model; converting the second projection coordinate into a second longitude and latitude coordinate under the geographic coordinate system; converting the second longitude and latitude coordinate into a multi-spectral pixel coordinate in the second multi-spectral data according to the multi-spectral rational function model; reading the red-green-blue data corresponding to the second point from the second multi-spectral data according to the multi-spectral pixel coordinate by using a bilinear interpolation method. 9.A resource-constrained based on-board remote sensing image tile dynamic generation system, characterized in that, The system executes a computer program for performing the method of any one of claims 1-8.
Citation Information
Patent Citations
Method for setting on-orbit distance door of laser measurement satellite
CN118534473A
Geographic data presentation method and apparatus
WO2017206484A1