High-performance service-based image tile splicing method, device and electronic equipment

By determining the target size based on the target geographic area and image resolution during the remote sensing image stitching process, constructing memory blocks, and caching and decompressing image tile data, the problem of high utilization of computer hardware resources is solved, and efficient stitching of the entire image processing chain is achieved.

CN115797170BActive Publication Date: 2026-01-16AEROSPACE INFORMATION RES INST CAS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211426188.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2026-01-16
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

In existing technologies, the high utilization rate of computer hardware resources during remote sensing image stitching results in low efficiency of the entire image processing chain and a lack of efficient service-oriented image tile processing tools.

Method used

The target size is determined based on the latitude and longitude range of the target geographic area and the resolution of the resulting image. A blank image is created, and multiple memory blocks are constructed in the memory space. The image tile data is cached and decompressed using the block height, width, and offset. Finally, the data is written to the disk to achieve fast stitching.

Benefits of technology

While consuming relatively low system resources, it significantly improves the efficiency of the entire image processing chain and enables rapid stitching of image tiles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115797170B_ABST
    Figure CN115797170B_ABST
Patent Text Reader

Abstract

The application provides a high-performance service image tile splicing method, device and electronic equipment, relates to the technical field of remote sensing satellite image processing, and the method comprises the steps of creating a blank image on a disk; determining the total number of a plurality of memory blocks for caching image tile data corresponding to a target geographic area and the block parameters of each memory block in the plurality of memory blocks; constructing a block memory image in the memory space, which is the same size as each memory block; determining the memory offset of the tile data contained in each image tile in the plurality of image tiles corresponding to the target geographic area; aligning the original image data block obtained after decompression of the tile data to the memory space of each block memory image; and writing the data in each block memory image into the blank image at one time to obtain a remote sensing image of the target geographic area. The high-performance service image tile splicing method provided by the application is used for realizing the rapid splicing of remote sensing image tiles.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of remote sensing satellite image processing, and particularly relates to a high-performance service-oriented image tile splicing method and device and electronic equipment. BACKGROUND

[0002] With the development of earth observation technology, a large amount of image data has been accumulated for remote sensing application. For the management of large data volume remote sensing image data, different units and departments adopt different management strategies. Foreign countries mostly adopt a multi-level detail algorithm (LOD), under the condition of determining the datum plane and plane projection, the data is sliced into layers, and the sliced data format is generally a common data format (for example: JPG, PNG, Tiff, etc.). Domestic countries mostly display the mode of quadtree recursive partitioning, based on the Morton code, a spatio-temporal integrated index is constructed, and the storage adopts the database and file mode.

[0003] In most cases without external services, remote sensing images still adopt the mode of non-slice archive management according to data records, but networked service-oriented image management has gradually become the mainstream of image data management. Networked service-oriented image management provides convenience for the distribution and visualization of remote sensing images, but the current application is at a turning point, and there are few third-party tools supporting service-oriented image tiles for direct processing, image splicing is needed, and most remote sensing images need to be processed globally or need to be concentrated for large-scale processing, and remote sensing images also need to be spliced.

[0004] Therefore, how to quickly splice service-oriented remote sensing image tiles has become an important link in the whole link processing of service-oriented distributed remote sensing images. SUMMARY

[0005] The purpose of the present application is to provide a high-performance service-oriented image tile splicing method and device and electronic equipment for realizing the rapid splicing of remote sensing image tiles.

[0006] The present application provides a high-performance service-oriented image tile splicing method, comprising:

[0007] Based on the latitude and longitude range corresponding to the target geographic region and the resolution of the resulting image of the target geographic region, the target size of the resulting image is determined, and a blank image corresponding to the target size is created on the disk; based on the memory space size and the target size, the total number of memory blocks used to cache the image tile data corresponding to the target geographic region and the block parameters of each memory block are determined; the block parameters include: block height, block width, and block offset; based on the block height and block width of each memory block, a block memory image of the same size as each memory block is constructed in the memory space; a memory block Each block corresponds to a segmented memory image. Based on the block offset of each memory block and the latitude and longitude range of the original image data corresponding to each segmented memory image, the memory offset of the tile data contained in each image tile in the multiple image tiles corresponding to the target geographic region is determined. According to the sorting of the image tiles corresponding to each tile data and the memory address offset of each tile data, the original image data blocks obtained after decompression of the tile data are aligned to the memory space of each segmented memory image. The data in each segmented memory image is written into the blank image at once to obtain the remote sensing image of the target geographic region.

[0008] Optionally, the target size includes: image height and image width; determining the total number of memory blocks used to cache image tile data corresponding to the target geographic region and the block parameter of each memory block in the multiple memory blocks according to the memory space size and the target size includes: determining the image width as the block width of each memory block in the multiple memory blocks; the block width of each memory block is the same; dividing the quotient of a preset proportion of the memory size and the block width by the image data bit depth parameter to obtain the block height of each memory block in the first memory block, and determining the difference between the image height and the total block height of all memory blocks in the first memory block as the block height of the second memory block; determining the quotient of the image height and the block height of the first memory block as the total number of blocks; wherein, the image data bit depth parameter P can be calculated based on the following formula:

[0009] P = b / 8 (Formula 1)

[0010] b represents the image bit depth of the resulting image; the second memory block is the last memory block among the plurality of memory blocks; the first memory block is the memory block other than the second memory block among the plurality of memory blocks; the block offset is the offset of the block height and block width of each memory block relative to the previous memory block.

[0011] Optionally, the constructing, according to the block height and the block width of each memory block, a block memory image with the same size as each memory block in the memory space, comprises: applying, for each memory block in the plurality of memory blocks, a corresponding memory resource in the memory space as the memory space of the corresponding block memory image of the memory block; wherein the plurality of memory resources corresponding to the plurality of memory blocks are associated in the form of a memory data chain.

[0012] Optionally, before the determining, based on the block offset of each memory block and the latitude and longitude range of the original image data corresponding to each block memory image, the memory offset of the tile data contained in each image tile corresponding to the target geographic region, the method further comprises: acquiring the plurality of image tiles corresponding to the target geographic region in parallel, and determining the order of each image tile according to the latitude and longitude range corresponding to each image tile in the plurality of image tiles; storing the plurality of image tiles in the cache pool of the memory space according to the order of each image tile, and taking the hash value of the latitude and longitude coordinates and the layer number of each image tile as the index of each image tile.

[0013] Optionally, the aligning, according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data, the original image data block obtained after decompressing the tile data, to the memory space of each block memory image, comprises: after parallel decompression of the tile data contained in the image tiles in the cache pool, obtaining the original image data in order by band, and writing the original image data corresponding to each image tile into the memory space of the block memory image corresponding to each image tile through a target operation; wherein the target operation comprises at least one of the following: data scaling, data cropping, and data translation; the data scaling is used to keep the resolution of the original image data consistent with the resolution of the result image; the data cropping is used to crop the part of the original image data that does not coincide with the result image; and the data translation is used to write the original image data corresponding to the tile data into the memory space of the corresponding block memory image according to the memory offset of the tile data.

[0014] The application also provides a high-performance service image tile splicing device, comprising:

[0015] The determining module is configured to determine a target size of the result image according to a latitude and longitude range corresponding to the target geographic region and a resolution of a result image of the target geographic region; the operating module is configured to create a blank image corresponding to the target size on a disk; the determining module is further configured to determine a total number of a plurality of memory blocks for caching image tile data corresponding to the target geographic region and a block parameter of each memory block in the plurality of memory blocks according to a memory space size and the target size; the block parameter includes a block height, a block width, and a block offset; the determining module is further configured to cause the operating module to construct a block memory image with a same size as each memory block in the memory space according to the block height and the block width of each memory block; one memory block corresponds to one block memory image; the determining module is further configured to determine a memory offset of tile data included in each image tile in a plurality of image tiles corresponding to the target geographic region based on the block offset of each memory block and a latitude and longitude range of original image data corresponding to each block memory image; the operating module is further configured to align original image data blocks obtained after decompression of the tile data to the memory space of each block memory image according to an order of the image tiles corresponding to each tile data and the memory address offset of each tile data; and the operating module is further configured to write data in each block memory image into the blank image at one time to obtain a remote sensing image of the target geographic region.

[0016] Optionally, the target size includes an image height and an image width; the determining module is specifically configured to determine the image width as the block width of each memory block in the plurality of memory blocks; the block width of each memory block is the same; the determining module is specifically further configured to obtain the block height of each memory block in a first memory block by dividing a memory size of a preset ratio by the block width and then dividing a result by an image data bit number parameter, and determine a difference between the image height and a total block height of each memory block in the first memory block as a block height of a second memory block; the determining module is specifically further configured to determine the total number of the blocks as a quotient of the image height and the block height of the first memory block; and the image data bit number parameter P can be calculated based on the following formula (1):

[0017] P = b / 8 (formula (1))

[0018] b is an image bit number of the result image; the second memory block is a last memory block in the plurality of memory blocks; the first memory block is a memory block other than the second memory block in the plurality of memory blocks; and the block offset is an offset of the block height and the block width of each memory block relative to a previous memory block.

[0019] Optionally, the operation module is specifically configured to apply a corresponding memory resource for each memory block in the plurality of memory blocks in the memory space, and serve as a memory space of a corresponding block memory image of the memory block; wherein the plurality of memory resources corresponding to the plurality of memory blocks are associated in the form of a memory data chain.

[0020] Optionally, the device further comprises an acquisition module; the acquisition module is configured to acquire a plurality of image tiles corresponding to the target geographic area in parallel; the determination module is specifically configured to determine the order of each image tile according to the latitude and longitude range corresponding to each image tile in the plurality of image tiles; and the operation module is further configured to store the plurality of image tiles in the cache pool of the memory space according to the order of each image tile, and use the hash value of the latitude and longitude coordinates and the layer number of each image tile as the index of each image tile.

[0021] Optionally, the operation module is specifically configured to obtain original image data in order by band after parallel decompression of the tile data contained in the image tiles in the cache pool, and write the original image data corresponding to each image tile into the memory space of the block memory image corresponding to each image tile through a target operation; wherein the target operation comprises at least one of the following: data scaling, data cropping, and data translation; the data scaling is used to keep the resolution of the original image data consistent with the resolution of the result image; the data cropping is used to crop the part of the original image data that does not coincide with the result image; and the data translation is used to write the original image data corresponding to the tile data into the memory space of the corresponding block memory image according to the memory offset of the tile data.

[0022] The application also provides a computer program product, comprising computer programs / instructions, which, when executed by a processor, implement the steps of the high-performance service image tile splicing method according to any one of the above.

[0023] The application also provides an electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the high-performance service image tile splicing method according to any one of the above when executing the program.

[0024] The application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the high-performance service image tile splicing method according to any one of the above.

[0025] The high-performance service image tile splicing method, device and electronic equipment provided by the application, according to the latitude and longitude range corresponding to the target geographic area and the resolution of the result image of the target geographic area, determine the target size of the result image, and create a blank image corresponding to the target size on the disk; according to the memory space size and the target size, determine the total number of the plurality of memory blocks used to cache the image tile data corresponding to the target geographic area and the block parameters of each memory block in the plurality of memory blocks; the block parameters include: block height, block width, and block offset; according to the block height and the block width of each memory block, construct a block memory image with the same size as each memory block in the memory space; one memory block corresponds to one block memory image; based on the block offset of each memory block, based on the block offset of each memory block and the latitude and longitude range of the original image data corresponding to each block memory image, determine the memory offset of the tile data contained in each image tile in the plurality of image tiles corresponding to the target geographic area; according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data, align the original image data block obtained after decompression of the tile data to the memory space of each block memory image; write the data in each block memory image into the blank image at one time to obtain the remote sensing image of the target geographic area. In this way, the image tile can be quickly spliced under the condition of occupying lower system resources, and the efficiency of image full-link processing is significantly improved. BRIEF DESCRIPTION OF DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0027] Figure 1 is a flowchart of the high-performance service image tile splicing method provided by the application;

[0028] Figure 2 is a schematic diagram of the block memory provided by the application;

[0029] Figure 3 is a schematic diagram of the acquisition and caching of image tiles provided by the application;

[0030] Figure 4 is a schematic diagram of the data translation operation provided by the application;

[0031] Figure 5 is a structural schematic diagram of the high-performance service image tile splicing device provided by the application;

[0032] Figure 6 FIG. 1 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0033] For the purposes of the present application, the technical solutions and advantages thereof will be more clearly understood from the following description of the embodiments of the present application, which will be made with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present application.

[0034] The terms "first", "second", and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", and the like are generally of a kind and are not limited in number, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally represents an "or" relationship between the front and rear associated objects.

[0035] To solve the technical problem of high computer hardware resource utilization rate in the splicing process in the related art, the high-performance service image tile splicing method provided by the present application can realize fast splicing of image tiles under the condition of occupying lower system resources, and significantly improves the efficiency of image full-link processing.

[0036] The high-performance service image tile splicing method provided by the embodiments of the present application will be described in detail below in combination with the accompanying drawings, specific embodiments and application scenarios.

[0037] As shown in FIG. 1, the high-performance service image tile splicing method provided by the embodiments of the present application can include the following steps 101 to 106: Figure 1

[0038] Step 101, determining a target size of a result image according to a latitude and longitude range corresponding to a target geographic area and a resolution of the result image of the target geographic area, and creating a blank image corresponding to the target size on a disk.

[0039] Illustratively, in general, before writing file content on a disk, a corresponding file needs to be created on the disk. That is, before writing the spliced remote sensing image on the disk, a corresponding blank file (i.e., the above-mentioned blank image) needs to be created on the disk. ​

[0040] Exemplarily, in order to avoid the situation that the writing fails due to insufficient disk space when the remote sensing image (i.e. the result image) is written into the disk, the size of the disk space occupied by the result image needs to be calculated before writing.

[0041] Specifically, the size of the disk space occupied by the result image can be calculated according to the latitude and longitude range corresponding to the target geographic area and the resolution of the result image. It can be understood that the larger the latitude and longitude range corresponding to the target geographic area, the larger the disk space occupied by the result image; the higher the resolution of the result image, the larger the disk space occupied by the result image.

[0042] Step 102, according to the memory space size and the target size, determine the total number of memory blocks for caching image tile data corresponding to the target geographic area and the block parameters of each memory block in the plurality of memory blocks.

[0043] The block parameters include block height, block width, and block offset. The target size includes image height and image width, i.e. the image height and image width of the result image.

[0044] Exemplarily, after the creation of the blank image is completed, the planning of the memory resource can be started. That is, according to the memory space size of the device, the use of memory when planning the spliced image tile is planned.

[0045] Exemplarily, the plurality of memory blocks is a logical division of memory resources, i.e. the memory resources needed to be used are divided into a plurality of memory blocks, so that when the result image is written into the disk, the contents corresponding to each memory block can be written into the disk in a parallel manner, and the writing speed is accelerated.

[0046] Specifically, the step 102 can include the following steps 102a1 to 102a3:

[0047] Step 102a1, determine the image width as the block width of each memory block in the plurality of memory blocks.

[0048] The block width of each memory block is the same.

[0049] Exemplarily, as shown in Figure 2 According to the memory space size and the target size, the memory resources needed to be used can be divided into N blocks (i.e. the plurality of memory blocks), and the width of each memory block is the same, which is equal to the image width of the result image.

[0050] Step 102a2, the quotient of the preset proportion of the memory size and the block width is divided by the image data bit number parameter to obtain the block height of each memory block in the first memory block, and the difference between the image height and the total block height of each memory block in the first memory block is determined as the block height of the second memory block.

[0051] Step 102a3, the quotient of the image height and the block height of the first memory block is determined as the total number of blocks.

[0052] Wherein, the image data bit number parameter P can be calculated based on the following formula one:

[0053] P = b / 8 (Formula One)

[0054] b is the image bit number of the result image; the second memory block is the last memory block in the plurality of memory blocks; the first memory block is the memory block other than the second memory block in the plurality of memory blocks; and the block offset is the offset of the block height and the block width of each memory block relative to the previous memory block.

[0055] As shown in the example, Figure 2 The block height of the first N-1 blocks (i.e. the first memory block) is the same, which is calculated as follows: 1 / 8 of the device memory size (i.e. the preset proportion) divided by the block width, and then divided by the image data bit number parameter. The total number of blocks is the image height of the result image divided by the block height. The definition of the image data bit number parameter can be: 1 for 8-bit bit image number parameter; 2 for 16-bit image number parameter; and 4 for 32-bit image number parameter, which can be extended according to the above formula one.

[0056] As can be understood, the image height of the result image divided by the block height may have a remainder, therefore, as shown in the example, Figure 2 The block height of the first N-1 blocks is equal, and the block height of the Nth block is the total height of the result image minus the sum of the heights of the first N-1 blocks, which effectively avoids the small amount of data in the last block.

[0057] It should be noted that the block is limited to 1 / 8 of the device memory, because the tile data of the image tile exists in three memory copies at the same time, which are: the block memory image, the cache pool, and the decompressed original image data. That is, the data of the image tile will occupy up to 3 / 8 of the device memory, thereby the memory usage of the device can be controlled below 1 / 2, which meets the peak usage limit of the device memory in many industries, and avoids the case of excessive system resource occupation.

[0058] Step 103, constructing a block memory image with the same size as each memory block in the memory space according to the block height and the block width of each memory block.

[0059] In this way, one memory block corresponds to one block memory image.

[0060] For example, after completing the logical division of the memory resource, the corresponding memory resource can be applied for each memory block in the memory space.

[0061] Specifically, the above step 103 can include the following step 103a:

[0062] Step 103a, applying the corresponding memory resource for each memory block in the plurality of memory blocks in the memory space, and taking the memory space as the memory space of the block memory image corresponding to the memory block.

[0063] In this way, the plurality of memory resources corresponding to the plurality of memory blocks are associated in the form of a memory data chain.

[0064] It should be noted that the block memory image adopts the data chain mode to avoid the situation that the memory application fails due to the application of too large memory at one time. For example, if the memory size of a device is 256GB, the application of 1 / 8 of the memory size (32GB) at one time will generally fail (there is no such large and continuous memory space in the memory). The use of the memory data chain mode can effectively avoid this situation. Although the memory address calculation time is increased, the increase in memory address calculation time is negligible compared to the benefits.

[0065] Step 104, determining the memory offset of the tile data contained in each image tile corresponding to the target geographic area based on the block offset of each memory block and the latitude and longitude range of the original image data corresponding to each block memory image.

[0066] For example, after applying the memory resource for each block memory image, the original image data (RAW data) corresponding to the image tile can be written into the memory resource corresponding to the block memory image corresponding to each image tile.

[0067] In one possible implementation, before the above step 104, the image tile required can be obtained through the following steps 201 and 202:

[0068] Step 201, obtaining the plurality of image tiles corresponding to the target geographic area in parallel, and determining the order of each image tile according to the latitude and longitude range corresponding to each image tile in the plurality of image tiles.

[0069] Step 202, store the plurality of image tiles in the cache pool of the memory space according to the order of each image tile, and take the hash value of the latitude and longitude coordinates and the layer number of each image tile as the index of each image tile.

[0070] As shown in the example, Figure 3 , the image tiles (the image tiles corresponding to the target geographic region) are obtained from the network in a multi-thread parallel download manner (including threads Thread 1 to Thread 6), and then the order of each image tile is determined according to the latitude and longitude range corresponding to each image tile (i.e. the range of longitude X and latitude Y), and the latitude and longitude range of the image tile corresponding to each block memory image (i.e. the latitude and longitude range of the original image data to be stored in each block memory image).

[0071] As shown in the example, Figure 3 , after determining the order of each image tile, the image tiles can be stored in the cache pool of the memory space in the form of tile objects in order, and the hash value of the latitude and longitude coordinates and the layer number of each image tile is taken as the index of each image tile (tile object).

[0072] Finally, based on the block offset of each memory block and the latitude and longitude range of the original image data corresponding to each block memory image, the memory offset of the tile data contained in each image tile of the plurality of image tiles corresponding to the target geographic region is determined.

[0073] In particular, when a certain layer (for example, Z layer) does not exist for the X, Y determined image tile, the tile of Z-1 layer is used for replacement, if the corresponding tile of Z-1 layer does not exist, the tile of Z-2 layer is used for replacement, that is, the depth of the replacement recursive layer is at most 2, and when there is still no tile after replacing 2 layers, the result image corresponding to the region is empty.

[0074] Step 105, according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data, align the original image data block obtained by decompressing the tile data to the memory space of each block memory image.

[0075] Specifically, the above step 105 can include the following step 105a:

[0076] Step 105a, after parallel decompression of the tile data contained in the image tiles in the cache pool, the original image data in order by band is obtained, and the target operation is used to write the original image data corresponding to each image tile into the memory space of the block memory image corresponding to each image tile.

[0077] The target operation includes at least one of the following: data scaling, data cropping, and data translation; the data scaling is used to scale down the resolution of the original image data to match the resolution of the resulting image; the data cropping is used to remove the parts of the original image data that do not overlap with the resulting image; the data translation is used to write the original image data corresponding to the tile data into the memory space of the corresponding block memory image according to the memory offset of the tile data.

[0078] For example, before writing the tile data from the cache pool into the memory space of the corresponding block-based memory image, the tile data needs to be decompressed. Depending on the tile data compression method, a corresponding decompression algorithm is used to decompress the tile data into band-ordered RAW data. Decompression employs a parallel decompression method using multiple tile objects. Common compression and decompression methods include JPEG and GZ.

[0079] For example, if the resolution of the original image data obtained after decompression is different from the resolution of the resulting image, it is also necessary to perform a scaling operation on the original image data.

[0080] For example, because image tiles have a minimum unit, the latitude and longitude range of the acquired image tiles may exceed the latitude and longitude range of the target geographic area. Therefore, it is necessary to crop the original image data of the excess portion.

[0081] For example, such as Figure 4 As shown, since parallel writing is used, when writing the original image data to the memory space of the corresponding block memory image, it is necessary to calculate the offset (△x, △y) of the tile data in the block memory image and write the original image data corresponding to the tile data into memory.

[0082] Step 106: Write the data from each block of memory image into the blank image at once to obtain the remote sensing image of the target geographic area.

[0083] For example, after writing all the original image data into the memory space of the corresponding block memory image, the data in the memory space of the block memory image can be written to the disk to generate remote sensing images of the target geographic area.

[0084] For example, during writing, the data in each block of memory image can be written to the disk in batches at once, converting random disk writes into continuous disk write operations, thereby further accelerating the efficiency of image stitching.

[0085] In particular, all the above-mentioned processing procedures are completed based on memory caching, without generating any temporary files on the disk, which on one hand can accelerate the efficiency of image stitching, and on the other hand can improve the parallelism and efficiency in multi-task stitching due to the high concurrency and small IO conflict of the memory.

[0086] It should be noted that the embodiment of the present application is implemented on a computer with a memory of 64 GB, and experimental verification shows that the method is feasible and realizes efficient stitching of service-oriented image tiles.

[0087] The high-performance service-oriented image tile stitching method provided by the embodiment of the present application determines the target size of the result image according to the latitude and longitude range corresponding to the target geographic area and the resolution of the result image of the target geographic area, and creates a blank image corresponding to the target size on the disk; determines the total number of a plurality of memory blocks used for caching image tile data corresponding to the target geographic area and the block parameters of each memory block in the plurality of memory blocks according to the memory space size and the target size; the block parameters include: block height, block width, and block offset; constructs a block memory image with the same size as each memory block in the memory space according to the block height and the block width of each memory block; one memory block corresponds to one block memory image; determines the memory offset of the tile data contained in each image tile corresponding to the target geographic area according to the block offset of each memory block; aligns the original image data block obtained after decompression of each tile data to the memory space of each block memory image according to the order of each image tile corresponding to each tile data and the memory address offset of each tile data; writes the data in each block memory image into the blank image at one time to obtain the remote sensing image of the target geographic area. In this way, the image tile can be quickly stitched while occupying low system resources, and the efficiency of image full-link processing is significantly improved.

[0088] It should be noted that the high-performance service-oriented image tile stitching method provided by the embodiment of the present application can be executed by a high-performance service-oriented image tile stitching device, or a control module in the high-performance service-oriented image tile stitching device for executing the high-performance service-oriented image tile stitching method. In the embodiment of the present application, the high-performance service-oriented image tile stitching device is taken as an example to illustrate the high-performance service-oriented image tile stitching device provided by the embodiment of the present application.

[0089] It should be noted that the high-performance service-based image tile splicing method shown in each of the above methods is described by taking one of the above embodiments as an example. In specific implementation, the high-performance service-based image tile splicing method shown in each of the above methods can also be implemented in combination with any other figure that can be combined as described in the above embodiments, and details are not described herein.

[0090] The high-performance service-based image tile splicing device provided in the present application is described below. The high-performance service-based image tile splicing method described below can be correspondingly referred to the high-performance service-based image tile splicing method described above.

[0091] Figure 5 The structure diagram of the high-performance service-based image tile splicing device provided in an embodiment of the present application is shown in FIG. 1, and specifically includes: Figure 5

[0092] The determining module 501 is configured to determine a target size of the result image according to a latitude and longitude range corresponding to a target geographic region and a resolution of a result image of the target geographic region; the operating module 502 is configured to create a blank image corresponding to the target size on a disk; the determining module 501 is further configured to determine a total number of a plurality of memory partitions for caching image tile data corresponding to the target geographic region and a partition parameter of each memory partition of the plurality of memory partitions according to a memory space size and the target size; the partition parameter includes a partition height, a partition width, and a partition offset; the determining module 501 is further configured to cause the operating module 502 to further construct a partition memory image with the same size as each memory partition in the memory space according to the partition height and the partition width of each memory partition; one memory partition corresponds to one partition memory image; the determining module 501 is further configured to determine a memory offset of tile data contained in each image tile of a plurality of image tiles corresponding to the target geographic region based on the partition offset of each memory partition and a latitude and longitude range of original image data corresponding to each partition memory image; the operating module 502 is further configured to align the original image data block obtained by decompressing the tile data to the memory space of each partition memory image according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data; and the operating module 502 is further configured to write the data in each partition memory image into the blank image at one time to obtain a remote sensing image of the target geographic region.

[0093] ​Optionally, the target size comprises: an image height and an image width; the determining module 501 is specifically configured to determine the image width as a block width of each memory block in the plurality of memory blocks; the block width of each memory block is the same; the determining module 501 is further specifically configured to obtain a block height of each memory block in the first memory block by dividing a memory size of a preset ratio by the block width and then dividing the result by an image data bit number parameter, and determine a difference between the image height and a total block height of each memory block in the first memory block as a block height of the second memory block; the determining module 501 is further specifically configured to determine the image height divided by the block height of the first memory block as the total number of blocks; wherein the image data bit number parameter P can be calculated based on the following formula one:

[0094] P = b / 8 (Formula One)

[0095] b is the image bit number of the result image; the second memory block is the last memory block in the plurality of memory blocks; the first memory block is a memory block other than the second memory block in the plurality of memory blocks; and the block offset is an offset of the block height and the block width of each memory block relative to the previous memory block.

[0096] Optionally, the operation module 502 is specifically configured to apply corresponding memory resources for each memory block in the plurality of memory blocks in the memory space, and use the memory resources as the memory space of the corresponding block memory image of the memory block; wherein the plurality of memory resources corresponding to the plurality of memory blocks are associated in the form of a memory data chain.

[0097] Optionally, the apparatus further comprises: an acquisition module; the acquisition module is configured to acquire a plurality of image tiles corresponding to the target geographic area in parallel; the determining module 501 is specifically configured to determine the order of each image tile according to the latitude and longitude range corresponding to each image tile in the plurality of image tiles; and the operation module 502 is further configured to store the plurality of image tiles in the cache pool of the memory space according to the order of each image tile, and use the hash value of the latitude and longitude coordinates and the layer number of each image tile as the index of each image tile.

[0098] Optionally, the operation module 502 is specifically configured to obtain the original image data in order of wave band after parallel decompression of the tile data contained in the image tile in the cache pool, and write the original image data corresponding to each image tile into the memory space of the image in the corresponding block memory of each image tile through a target operation; the target operation includes at least one of the following: data scaling, data cropping, and data translation; the data scaling is used to keep the resolution of the original image data consistent with the resolution of the result image; the data cropping is used to crop the part of the original image data that does not coincide with the result image; and the data translation is used to write the original image data corresponding to the tile data into the memory space of the image in the corresponding block memory according to the memory offset of the tile data.

[0099] The high-performance service image tile splicing device provided in the application determines the target size of the result image according to the latitude and longitude range corresponding to the target geographic area and the resolution of the result image of the target geographic area, creates a blank image corresponding to the target size on a disk, determines the total number of blocks of a plurality of memory blocks for caching image tile data corresponding to the target geographic area and the block parameters of each memory block in the plurality of memory blocks according to the memory space size and the target size, the block parameters including the block height, the block width, and the block offset, constructs a block memory image with the same size as each memory block in the memory space according to the block height and the block width of each memory block, one memory block corresponding to one block memory image, determines the memory offset of the tile data contained in each image tile in the plurality of image tiles corresponding to the target geographic area based on the block offset of each memory block, aligns the original image data block obtained after decompression of each tile data to the memory space of each block memory image according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data, and writes the data in each block memory image into the blank image at one time to obtain the remote sensing image of the target geographic area. In this way, the image tile can be quickly spliced with lower system resource occupation, and the efficiency of image full-link processing is significantly improved.

[0100] Figure 6 An example of a schematic diagram of the physical structure of an electronic device is shown in FIG. 1. Figure 6As shown, the electronic device can include a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 complete mutual communication through the communications bus 640. The processor 610 can invoke a logical instruction in the memory 630 to perform a high-performance service image tile splicing method, which includes: determining a target size of a result image according to a latitude and longitude range corresponding to a target geographic area and a resolution of the result image of the target geographic area, and creating a blank image corresponding to the target size on a disk; determining a total number of a plurality of memory partitions for caching image tile data corresponding to the target geographic area and a partition parameter of each memory partition according to a memory space size and the target size; the partition parameter includes a partition height, a partition width, and a partition offset; constructing a partition memory image with the same size as each memory partition in the memory space according to the partition height and the partition width of each memory partition; one memory partition corresponds to one partition memory image; determining a memory offset of tile data included in each image tile of a plurality of image tiles corresponding to the target geographic area based on the partition offset of each memory partition and a latitude and longitude range of original image data corresponding to each partition memory image; aligning original image data obtained by decompressing tile data to the memory space of each partition memory image according to the order of each image tile corresponding to each tile data and the memory address offset of each tile data; and writing the data in each partition memory image into the blank image at one time to obtain a remote sensing image of the target geographic area.

[0101] In addition, the logical instruction in the memory 630 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application essentially or in part or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0102] In another aspect, the present application also provides a computer program product, which comprises a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the high-performance service-oriented image tile stitching method provided by the above method, the method comprising: determining a target size of a result image according to a latitude and longitude range corresponding to a target geographic area and a resolution of the result image of the target geographic area, and creating a blank image corresponding to the target size on a disk; determining a total number of a plurality of memory partitions for caching image tile data corresponding to the target geographic area and a partition parameter of each memory partition according to a memory space size and the target size; the partition parameter comprising: a partition height, a partition width, and a partition offset; constructing a partition memory image with the same size as each memory partition in the memory space according to the partition height and the partition width of each memory partition; one memory partition corresponding to one partition memory image; determining a memory offset of tile data contained in each image tile of the plurality of image tiles corresponding to the target geographic area based on the partition offset of each memory partition and a latitude and longitude range of original image data corresponding to each partition memory image; aligning original image data obtained by decompressing the tile data to the memory space of each partition memory image according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data; and writing the data in each partition memory image into the blank image at one time to obtain a remote sensing image of the target geographic area.

[0103] In yet another aspect, the application also provides a computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the high-performance service-oriented image tile splicing method provided above, which comprises: determining a target size of a result image according to a latitude and longitude range corresponding to a target geographic region and a resolution of the result image of the target geographic region, and creating a blank image corresponding to the target size on a disk; determining a total number of a plurality of memory blocks for caching image tile data corresponding to the target geographic region and a block parameter of each memory block in the plurality of memory blocks according to a memory space size and the target size; the block parameter comprises: a block height, a block width, and a block offset; constructing a block memory image with the same size as each memory block in the memory space according to the block height and the block width of each memory block; one memory block corresponds to one block memory image; determining a memory offset of tile data contained in each image tile of the plurality of image tiles corresponding to the target geographic region based on the block offset of each memory block and a latitude and longitude range of original image data corresponding to each block memory image based on the block offset of each memory block; aligning original image data blocks obtained after decompression of the tile data to the memory space of each block memory image according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data; and writing the data in each block memory image into the blank image at one time to obtain a remote sensing image of the target geographic region.

[0104] The device embodiments described above are only schematic, wherein the units illustrated as separate components can or can not be physically separate, and the components illustrated as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme. Those skilled in the art can understand and implement without creative labor.

[0105] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0106] Finally, it should be noted that the above examples are only used to illustrate the technical solutions of the present application, and are not intended to limit the same; although the present application has been described in detail with reference to the foregoing examples, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A high-performance service-oriented image tile stitching method, characterized in that, The method comprises the following steps: determining a target size of the result image according to the latitude and longitude range corresponding to the target geographic area and the resolution of the result image of the target geographic area, and creating a blank image corresponding to the target size on a disk; determining the total number of memory blocks and the block parameters of each memory block in the plurality of memory blocks for caching the image tile data corresponding to the target geographic area according to the memory space size and the target size; the block parameters comprise a block height, a block width, and a block offset; constructing a block memory image with the same size as each memory block in the memory space according to the block height and the block width of each memory block; one memory block corresponds to one block memory image; determining the memory offset of the tile data contained in each image tile of the plurality of image tiles corresponding to the target geographic area based on the block offset of each memory block, the block offset of each memory block, and the latitude and longitude range of the original image data corresponding to each block memory image; aligning the original image data block obtained after decompression of the tile data to the memory space of each block memory image according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data; writing the data in each block memory image into the blank image at one time to obtain the remote sensing image of the target geographic area.

2. The method of claim 1, wherein, the target size comprises an image height and an image width; determining the total number of memory blocks and the block parameters of each memory block in the plurality of memory blocks for caching the image tile data corresponding to the target geographic area according to the memory space size and the target size comprises: determining the image width as the block width of each memory block in the plurality of memory blocks; the block width of each memory block is the same; dividing the quotient of the preset proportion of the memory size and the block width by the image data bit number parameter to obtain the block height of each memory block in the first memory block, and determining the difference between the image height and the total block height of each memory block in the first memory block as the block height of the second memory block; determining the quotient of the image height and the block height of the first memory block as the total number of blocks. wherein the image data bit number parameter P can be calculated based on the following formula one: P = b / 8 (formula one) b is the image bit number of the result image; the second memory block is the last memory block in the plurality of memory blocks; the first memory block is the memory block other than the second memory block in the plurality of memory blocks; and the block offset is the offset of each memory block relative to the block height and the block width of the previous memory block.

3. The method of claim 1, wherein, constructing a block memory image with the same size as each memory block in the memory space according to the block height and the block width of each memory block comprises: applying corresponding memory resources for each memory block in the plurality of memory blocks in the memory space, and taking the memory space as the memory space of the block memory image corresponding to the memory block; The plurality of memory blocks correspond to a plurality of memory resources in a memory data chain.

4. The method of claim 1, wherein, Before determining the memory offset of the tile data contained in each image tile corresponding to the target geographic area based on the block offset of each memory block and the latitude and longitude range of the original image data corresponding to each block memory image, the method further comprises: parallelly acquiring a plurality of image tiles corresponding to the target geographic area, and determining the order of each image tile according to the latitude and longitude range corresponding to each image tile in the plurality of image tiles; storing the plurality of image tiles in the cache pool of the memory space according to the order of each image tile, and taking the latitude and longitude coordinates and the hash value of the layer number of each image tile as the index of each image tile.

5. The method of claim 4, wherein, aligning the original image data block obtained after decompressing the tile data to the memory space of each block memory image according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data, comprising: parallelly decompressing the tile data contained in the image tile in the cache pool to obtain the original image data in order by band, and writing the original image data corresponding to each image tile into the memory space of the block memory image corresponding to each image tile through a target operation; wherein the target operation includes at least one of the following: data scaling, data cropping, data translation; the data scaling is used to keep the resolution of the original image data consistent with the resolution of the result image; the data cropping is used to crop the part of the original image data that does not coincide with the result image; the data translation is used to write the original image data corresponding to the tile data into the memory space of the corresponding block memory image according to the memory offset of the tile data.

6. A high-performance service-oriented image tile stitching device, characterized in that, The device comprises: a determination module configured to determine a target size of the result image according to the latitude and longitude range corresponding to the target geographic area and the resolution of the result image of the target geographic area; an operation module configured to create a blank image corresponding to the target size on a disk; The determination module is further configured to determine the total number of the plurality of memory blocks and the block parameters of each memory block in the plurality of memory blocks for caching the image tile data corresponding to the target geographic area according to the memory space size and the target size; the block parameters include: block height, block width, and block offset; The determination module is further configured to construct a block memory image with the same size as each memory block in the memory space according to the block height and the block width of each memory block by the operation module; one memory block corresponds to one block memory image; The determination module is further configured to determine the memory offset of the tile data contained in each image tile corresponding to the target geographic area based on the block offset of each memory block and the latitude and longitude range of the original image data corresponding to each block memory image. The operation module is further configured to align the raw image data block obtained by decompressing the tile data to the memory space of each sub-block memory image according to the order of the image tile corresponding to each tile data and the memory address offset of each tile data. The operation module is further configured to write the data in each sub-block memory image into the blank image at one time to obtain the remote sensing image of the target geographic region.

7. The apparatus of claim 6, wherein, The target size includes an image height and an image width. The determination module is specifically configured to determine the image width as a sub-block width of each memory sub-block in the plurality of memory sub-blocks, and the sub-block width of each memory sub-block is the same. The determination module is further configured to obtain a sub-block height of each memory sub-block in the first memory sub-block by dividing the quotient of the memory size of the preset ratio and the sub-block width by an image data bit number parameter, and determine a difference between the image height and a total sub-block height of each memory sub-block in the first memory sub-block as a sub-block height of the second memory sub-block. The determination module is further configured to determine the image height and the quotient of the sub-block total number. The image data bit number parameter P can be calculated based on the following formula (1): P = b / 8 (formula (1)) b is the image bit number of the result image; the second memory sub-block is the last memory sub-block in the plurality of memory sub-blocks; the first memory sub-block is the memory sub-block in the plurality of memory sub-blocks except the second memory sub-block; and the sub-block offset is the offset of the sub-block height and the sub-block width of each memory sub-block relative to the previous memory sub-block.

8. The apparatus of claim 6, wherein The operation module is specifically configured to apply corresponding memory resources for each memory sub-block in the plurality of memory sub-blocks in the memory space, as the memory space of the sub-block memory image corresponding to the memory sub-block. The plurality of memory resources corresponding to the plurality of memory sub-blocks are associated in the form of a memory data chain.

9. The apparatus of claim 6, wherein, The apparatus further includes an acquisition module. The acquisition module is configured to acquire a plurality of image tiles corresponding to the target geographic region in parallel. The determination module is specifically configured to determine the order of each image tile according to the latitude and longitude range corresponding to each image tile in the plurality of image tiles. The operation module is further configured to store the plurality of image tiles in the cache pool of the memory space according to the order of each image tile, and use the hash value of the latitude and longitude coordinates and the layer number of each image tile as the index of each image tile.

10. An electronic device, comprising: The computer program stored in the memory and executable on the processor implements the steps of the high-performance service image tile splicing method of any one of claims 1 to 5 when the processor executes the program.

Citation Information

Patent Citations

  • Remote sensing image tile generation and real-time deployment method

    CN110347499A

  • Picture processor, picture processing method, computer readable storage medium and program

    JP2004056447A