System and method for stitching oversized images
Through the combination of image acquisition, parameter acquisition and mosaic modules, large-scale satellite images are automatically spliced, which solves the problem of time-consuming, cumbersome and error-prone manual splicing, and achieves efficient and accurate image splicing and big data processing.
Patent Information
- Application Number
- CN202310308645.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-27
- Publication Date
- 2024-10-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult to efficiently and automatically stitch large-scale satellite image data with existing technology, making manual stitching time-consuming, cumbersome and error-prone.
Provided is a system and method, including an image acquisition module, a parameter acquisition module and a puzzle module, which automatically splices multiple small images into a large image by acquiring puzzle parameters, and optionally performs shape completion and storage path setting, capable of processing Images larger than 2GB in bytes.
Automatic stitching is realized, processing efficiency is improved, errors in manual stitching are avoided, the quality and accuracy of large images is ensured, and transmission and storage problems are solved.
Smart Images

Figure CN118735772A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and more particularly, to a system and method, an electronic device, and a computer-readable storage medium for stitching together a very large image. Background Art
[0002] With the development of science and technology, a large amount of image data has been widely used in various fields, such as geographic information systems, weather forecasting, agriculture, urban planning, etc. For example, satellite images are a common type of image data, with the characteristics of global coverage, high precision, and all-weather. However, due to the huge amount of satellite image data, transmission, storage, and processing face huge challenges. Therefore, how to efficiently process these large-scale satellite image data has become one of the current research hotspots.
[0003] Satellite images are usually stored and transmitted in a block-based manner, that is, a large image is divided into several small blocks, each of which is usually 256x256, 512x512, etc. When processing these satellite image data, it is necessary to stitch these small blocks into a large image for subsequent processing and analysis. However, manually stitching these small blocks is very time-consuming, tedious, and prone to errors. Therefore, studying how to automatically stitch these small blocks into a large image has become one of the important directions of current research. Summary of the invention
[0004] The present disclosure provides a system and method for stitching together a super-large image, as well as an electronic device and a computer-readable storage medium, to at least solve the above-mentioned problems in the related art, or may not solve any of the above-mentioned problems.
[0005] According to a first aspect of the present disclosure, a system for puzzle is provided, which may include: an image acquisition module, configured to acquire a plurality of first images; a parameter acquisition module, configured to acquire puzzle parameters, wherein the puzzle parameters include the number of rows and columns according to which the plurality of first images are stitched into a second image; and a puzzle module, configured to stitch the plurality of first images into a second image based on the puzzle parameters.
[0006] Optionally, the second image may be an image with a byte size greater than 2 GB.
[0007] Optionally, before stitching the multiple first images into a second image based on the puzzle parameters, the system may further include a completion module, configured to: identify whether each first image among the multiple first images is a preset shape of a preset size, if the first image is not the preset shape of the preset size, then complete the first image to the preset shape of the preset size, if the shape of the first image is the preset shape of the preset size, then do not complete the first image, wherein the puzzle module may be configured to: stitch the completed first images and the non-completed first images among the multiple first images into a second image based on the puzzle parameters.
[0008] Optionally, the parameter acquisition module may be further configured to: acquire a storage path of the stitched second image, and the puzzle module may be further configured to: store the second image in the acquired storage path.
[0009] Optionally, the puzzle module can be configured to: obtain size information of the multiple first images, determine the size of the second image based on the size information and the puzzle parameters, and create an empty picture whose size is the same as that of the second image, import each of the multiple first images into the empty picture in turn, and move the multiple first images to corresponding positions on the empty picture according to corresponding position offsets, so as to splice the multiple first images into a second image.
[0010] According to a second aspect of the present disclosure, a method for jigsaw puzzle is provided, the method comprising: acquiring a plurality of first images; acquiring jigsaw puzzle parameters, wherein the jigsaw puzzle parameters may include the number of rows and columns according to which the plurality of first images are to be spliced into a second image; and splicing the plurality of first images into a second image based on the jigsaw puzzle parameters.
[0011] Optionally, the second image may be an image with a byte size greater than 2 GB.
[0012] Optionally, stitching the multiple first images into a second image based on the puzzle parameters may include: identifying whether each first image among the multiple first images is a preset shape of a preset size, if the first image is not the preset shape of the preset size, completing the first image to the preset shape of the preset size, if the shape of the first image is the preset shape of the preset size, not completing the first image, and stitching the completed first images and the non-completed first images among the multiple first images into a second image based on the puzzle parameters.
[0013] Optionally, the method may further include: acquiring a storage path of the stitched second image, and storing the second image in the acquired storage path.
[0014] Optionally, stitching the multiple first images into a second image based on the puzzle parameters may include: obtaining size information of the multiple first images, determining the size of the second image based on the size information and the puzzle parameters, and creating an empty picture whose size is the same as that of the second image, importing each of the multiple first images into the empty picture in turn, and moving the multiple first images to corresponding positions on the empty picture according to corresponding position offsets, so as to stitch the multiple first images into a second image.
[0015] According to a third aspect of the present disclosure, there is provided an electronic device, which may include: at least one processor;
[0016] At least one memory storing computer executable instructions, wherein the computer executable instructions, when executed by at least one of the processors, cause at least one of the processors to perform the method for puzzle making.
[0017] According to a fourth aspect of the present disclosure, a computer-readable storage medium storing instructions is provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to execute the method for puzzle making.
[0018] According to the embodiments of the present disclosure, by automatically stitching small images into large images (such as satellite images), the tedious and time-consuming manual stitching is avoided, thereby improving processing efficiency. The method can automatically detect and repair problems such as gaps and offsets that occur during the stitching process, ensure the quality and accuracy of large images, avoid errors that are prone to occur during manual stitching, and can also process large image data exceeding 2GB, avoiding transmission and storage problems, and has strong data processing capabilities.
[0019] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a schematic block diagram illustrating a system 100 for puzzle-solving according to an example embodiment of the present disclosure;
[0021] Figure 2 is a schematic diagram illustrating stitching a plurality of first images into a second image according to an exemplary embodiment of the present disclosure;
[0022] Figure 3 is a flowchart illustrating a method for jigsaw puzzle according to an example embodiment of the present disclosure; and
[0023] Figure 4 is a schematic block diagram illustrating an electronic device 400 according to an example embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The implementation methods described in the following examples do not represent all implementation methods consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims.
[0026] It should be noted that “at least one of the several items” appearing in the present disclosure refers to three types of parallel situations: “any one of the several items”, “a combination of any multiple of the several items”, and “all of the several items”. For example, “including at least one of A and B” includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is “executing at least one of step one and step two”, which means the following three parallel situations: (1) executing step one; (2) executing step two; (3) executing step one and step two. “A and / or B” and “A and / or B” appearing in the present disclosure refer to the following three parallel situations: only A; only B; both A and B.
[0027] Figure 1 is a schematic block diagram illustrating a system 100 for puzzle-solving according to an example embodiment of the present disclosure.
[0028] The system 100 may include an image acquisition module 110, a parameter acquisition module 120, and a puzzle module 130. The system 100 may be installed in various electronic devices or as a module / plug-in of various image processing software for puzzle making, or various modules in the system 100 may implement corresponding functions in a separate manner, or the system 100 may be distributed online or in the cloud for use by users.
[0029] The image acquisition module 110 may acquire a plurality of first images. As an example only, the plurality of first images may be input through a user interface for the system 100. For example, a user may drag the plurality of first images from a folder where the plurality of first images are located into the user interface, or a user may select the plurality of first images in a corresponding folder through the user interface. Here, each of the plurality of first images may be an image of any size.
[0030] The parameter acquisition module 120 may acquire jigsaw parameters. The jigsaw parameters may include the number of rows and columns by which the plurality of first images are stitched into the second image. For example, a user may input or select the number of rows and columns through a user interface. Here, the second image may be an image of any size, and may even be an image with a byte count greater than 2 GB, for example, the second image may be a 70 GB satellite image.
[0031] Figure 2 is a schematic diagram illustrating stitching a plurality of first images into a second image according to an exemplary embodiment of the present disclosure.
[0032] The mosaic module 130 may mosaic the plurality of first images into a second image based on the mosaic parameters. Figure 2 As shown, when the number of rows and the number of columns obtained are 3 and 3 respectively, nine first images can be spliced into one second image. According to an exemplary embodiment of the present disclosure, the jigsaw module 130 can obtain the size information of the multiple first images, determine the size of the second image based on the size information and the jigsaw parameters, and create an empty picture with the same size as the second image, import each of the multiple first images into the empty picture in turn, and move the multiple first images to the corresponding positions on the empty picture according to the corresponding position offsets, so as to splice the multiple first images into the second image. Here, the number of bytes / size of the second image is only limited by the processing power of the jigsaw module 130.
[0033] In addition, the parameter acquisition module 120 may also acquire the storage path of the spliced second image, and the puzzle module 130 may also store the second image in the acquired storage path. For example, the user may input / select the storage path of the second image through the user interface of the system 100, and thus, the second image may be stored in the storage path.
[0034] In the present disclosure, before stitching the multiple first images into a second image based on the puzzle parameters, the system 100 may further include a completion module (not shown). The completion module may identify whether the shape of each of the multiple first images is a preset shape of a preset size. If the shape of the first image is not the preset shape of the preset size, the first image is completed to the preset shape of the preset size; if the shape of the first image is the preset shape of the preset size, the first image is not completed. The puzzle module 130 may stitch all the first images (the completed first images and the uncompleted first images in the multiple first images) into a second image based on the puzzle parameters. Here, the preset shape may be a rectangle, a square, a triangle, etc. The preset size may be a size preset by the user, or it may be the size of the largest first image in the multiple first images.
[0035] As an example only, the system 100 may be installed on any image processing software, and the operation of the system 100 will be described in detail below.
[0036] For example, first, the folder path and the number of rows and columns of the first image may be obtained through the user interface. After the above information is confirmed, the puzzle program of the system 100 may be executed.
[0037] For example, after obtaining the folder path, multiple first images can be imported into the image processing software, and then a new image can be created in the image processing software. The length of the image can be the number of columns * the length of the first image, and the width can be the number of rows * the width of the first image. For the first row and the first column, the coordinates of the upper left corner are (0,0). First, the first first image can be imported, its coordinates when imported are obtained, the offset of the coordinates from (0,0) is calculated, and the coordinates of the upper left corner vertex of the first first image are moved to (0,0) based on this offset. For the first row and the second column, the coordinates of the upper left corner are (0,1). First, the second first image can be imported, its coordinates when imported are obtained, the offset of the coordinates from (0,1) is calculated, and the coordinates of the upper left corner vertex of the second first image are moved to (0,1) based on this offset. By analogy, the subsequent first images are also moved to the specified position in a similar manner. In this way, a spliced second image can be obtained.
[0038] Figure 3 is a flow chart illustrating a method for puzzle-making according to an example embodiment of the present disclosure.
[0039] At step 310 , a plurality of first images may be acquired.
[0040] In step 320, mosaic parameters may be obtained, which may include the number of rows and columns by which the plurality of first images are mosaicked into the second image.
[0041] In step 330, the multiple first images are stitched into a second image based on the puzzle parameters. Specifically, it can be identified whether each of the multiple first images is a preset shape of a preset size. If the first image is not a preset shape of the preset size, the first image is complemented to the preset shape of the preset size. If the shape of the first image is the preset shape of the preset size, the first image is not complemented, and the complemented first images and the uncomplemented first images in the multiple first images are stitched into a second image based on the puzzle parameters. The stitching process may include: obtaining the size information of the multiple first images, determining the size of the second image based on the size information and the puzzle parameters, and creating an empty picture with the same size as the second image, importing each of the multiple first images into the empty picture in turn, and moving the multiple first images to corresponding positions on the empty picture according to corresponding position offsets, so as to stitch the multiple first images into a second image.
[0042] According to an exemplary embodiment of the present disclosure, the second image may be an image with a byte size greater than 2 GB. In addition, a storage path of the spliced second image may be obtained, and the second image may be stored in the obtained storage path.
[0043] Figure 4 is a schematic block diagram illustrating an electronic device 400 according to an example embodiment of the present disclosure.
[0044] According to an exemplary embodiment of the present disclosure, an electronic device 400 may also be provided, and the electronic device 400 may include a processor 410 and a memory 420 storing computer executable instructions. When the computer executable instructions are executed by the processor 410, the processor 410 is prompted to perform the above-mentioned method for collage according to the exemplary embodiment of the present disclosure. Here, the number of bytes / size of the second image is only limited by the processing capability of the processor 410.
[0045] According to an embodiment of the present disclosure, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to perform a method for puzzling according to an exemplary embodiment of the present disclosure. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0046] According to an embodiment of the present disclosure, a computer program product may also be provided. Instructions in the computer program product may be executed by at least one processor in an electronic device to perform the method according to the exemplary embodiment of the present disclosure.
[0047] According to the embodiments of the present disclosure, by automatically stitching small images into large images (such as satellite images), the tedious and time-consuming manual stitching is avoided, thereby improving processing efficiency. The method can automatically detect and repair problems such as gaps and offsets that occur during the stitching process, ensure the quality and accuracy of large images, avoid errors that are prone to occur during manual stitching, and can also process large image data exceeding 2GB, avoiding transmission and storage problems, and has strong data processing capabilities.
[0048] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0049] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims.
Claims
1. A system for puzzles, include: An image acquisition module, configured to acquire a plurality of first images; A parameter acquisition module is configured to acquire puzzle parameters, wherein the puzzle parameters include the number of rows and columns according to which the plurality of first images are spliced into a second image; as well as The mosaic module is configured to mosaic the plurality of first images into a second image based on the mosaic parameters.
2. The system according to claim 1, in, The second image is an image whose byte size is greater than 2 GB.
3. The system of claim 1, before stitching the plurality of first images into a second image based on the stitching parameters, the system further comprises a completion module configured to: identifying whether each of the plurality of first images is a preset shape with a preset size, If the first image is not of the preset shape and the preset size, the first image is completed into the preset shape and the preset size, If the shape of the first image is the preset shape of the preset size, the first image is not completed. in, The mosaic module is configured to: stitch the completed first images and the uncompleted first images among the plurality of first images into a second image based on the mosaic parameters.
4. The system according to claim 1, in, The parameter acquisition module is further configured to: acquire the storage path of the spliced second image, The puzzle module is further configured to store the second image in the acquired storage path.
5. The system according to claim 1, in, The Jigsaw module is configured as: obtaining size information of the plurality of first images, determining the size of the second image based on the size information and the puzzle parameters, and creating an empty picture with the same size as the second image, Each of the multiple first images is sequentially imported into the empty picture, and the multiple first images are moved to corresponding positions on the empty picture according to corresponding position offsets, so as to splice the multiple first images into a second image.
6. Methods used for puzzles, include: acquiring a plurality of first images; Acquire puzzle parameters, wherein the puzzle parameters include the number of rows and columns according to which the plurality of first images are stitched into a second image; as well as The plurality of first images are stitched together into a second image based on the stitching parameters.
7. The method according to claim 6, in, The second image is an image whose byte size is greater than 2 GB.
8. The method according to claim 6, in, The method further comprises: stitching the plurality of first images into a second image based on the mosaic parameter, comprising: identifying whether each of the plurality of first images is a preset shape with a preset size, If the first image is not of the preset shape and the preset size, the first image is completed into the preset shape and the preset size, If the shape of the first image is the preset shape of the preset size, the first image is not completed. The completed first images and the uncompleted first images among the plurality of first images are spliced into a second image based on the splicing parameters.
9. The method according to claim 6, further comprising: include: Get the storage path of the stitched second image, The second image is stored in the acquired storage path.
10. The method according to claim 6, in, The method further comprises: stitching the plurality of first images into a second image based on the mosaic parameter, comprising: obtaining size information of the plurality of first images, determining the size of the second image based on the size information and the puzzle parameters, and creating an empty picture with the same size as the second image, Each of the multiple first images is sequentially imported into the empty picture, and the multiple first images are moved to corresponding positions on the empty picture according to corresponding position offsets, so as to splice the multiple first images into a second image.
11. Electronic equipment, include: at least one processor; at least one memory storing computer executable instructions, When the computer executable instructions are executed by at least one of the processors, the computer executable instructions cause at least one of the processors to execute the method according to any one of claims 6 to 10.
12. A computer-readable storage medium storing instructions, It is characterized in that When the instructions are executed by at least one processor, the at least one processor is prompted to perform the method according to any one of claims 6 to 10.
