Image pyramid production method and apparatus, and computing device

By configuring containers and scanning image blocks into the image pyramid, downsampling and transmission are performed in the lowest container, the problem of excessive memory usage in the prior art is solved, efficient image pyramid production is achieved, adapting to data of different scales and improving scalability.

CN120198282APending Publication Date: 2025-06-24SHENZHEN HUADA SANJIAN QIFA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311726248.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-13
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

When producing image pyramids, the prior art requires loading all original small resolution images into memory, resulting in excessive memory usage, unable to meet data production exceeding the production environment capabilities, and high usage costs.

Method used

By obtaining the number of thumbnail layers in the image pyramid, configuring the corresponding container, scanning image blocks from multiple original small-resolution images to the lowest container in the image pyramid, and downsampling transmission are performed to realize the production of the image pyramid.

Benefits of technology

It effectively reduces memory overhead, remains basically constant in total memory, adapts to small-resolution image data of different scales, is theoretically not limited by the number of images, has high scalability, and improves the efficiency of image pyramid production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198282A_ABST
    Figure CN120198282A_ABST
Patent Text Reader

Abstract

The invention discloses an image pyramid production method and apparatus, and a computing device. The production method of the image pyramid comprises the following steps: acquiring the number of thumbnail layers in the image pyramid; according to the number of the thumbnail layers, containers corresponding to all the thumbnail layers in the image pyramid are configured, and the containers are used for loading image blocks; scanning image blocks from a plurality of original small-resolution images to a bottommost container in an image pyramid, writing the image block in any container into an image pyramid file, and performing down-sampling on the image block in any container to obtain a down-sampled image block; and transmitting the down-sampling image block of the any container to the container of the upper layer of the corresponding layer of the any container in the image pyramid. The embodiment of the invention has the advantages of small memory occupation and high image pyramid production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technologies, and in particular, to a method, apparatus, and computing device for producing an image pyramid. Background Art

[0002] In related technologies, when implementing an image pyramid, as Figure 7 shown, all original small-resolution images (i.e., a super-large number of small-resolution images) are loaded at once and stitched according to rules to obtain a complete large image. Then, the obtained complete large image is used as the bottom layer of the target image pyramid, and based on this, multiple downsamplings with gradually increasing downscaling ratios (usually setting fixed values) are performed to obtain multiple thumbnail images with gradually decreasing resolutions as other target levels of the target image pyramid. However, since all original small-resolution images need to be loaded, it is limited by the memory capacity of the production environment and cannot meet data production exceeding the production environment's capabilities. In addition, the usage cost is high. To meet data production on a scale exceeding the existing production environment's capabilities, only memory can be added, so the cost is high. Summary of the Invention

[0003] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a method, apparatus, and computing device for producing an image pyramid, which have the advantages of small memory occupation and high image pyramid production efficiency.

[0004] In a first aspect, an embodiment of the present application provides a method for producing an image pyramid, including:

[0005] Obtaining the number of thumbnail layers in the image pyramid;

[0006] Configuring containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks;

[0007] Scanning image blocks from the multiple original small-resolution images into the containers at the bottom layer of the image pyramid, where the image blocks in any container are written into the image pyramid file, and the image blocks in any container are downsampled, and the downsampled image blocks of any container are transmitted to the container in the upper layer corresponding to the layer of any container in the image pyramid.

[0008] Further, the obtaining the number of thumbnail layers in the image pyramid includes:

[0009] Obtaining a downscaling factor and the size of the image block;

[0010] Obtaining the number of thumbnail layers of the image pyramid according to the number of multiple original small-resolution images, the downscaling factor, and the size of the image block.

[0011] Further, obtaining the downscaling ratio factor and the size of the image block includes:

[0012] Obtaining the occupied space of the multiple original small-resolution images, and obtaining the downscaling ratio factor according to the occupied space, or using a preset value as the downscaling ratio factor;

[0013] Obtaining the resolution of any one of the multiple original small-resolution images, and obtaining the size of the image block according to the resolution of the any one original small-resolution image.

[0014] Further, configuring the containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers includes:

[0015] Obtaining the number of the containers according to the number of thumbnail layers;

[0016] Determining the size of the containers according to the downscaling ratio factor;

[0017] Configuring the containers with set capacities to each thumbnail layer in the image pyramid respectively.

[0018] Further, after scanning the image blocks from the multiple original small-resolution images into the containers in the bottom layer of the image pyramid, it further includes:

[0019] Returning the position coordinates of the next image block of the original small-resolution image in the container in the bottom layer once.

[0020] Further, each time an original small-resolution image is scanned and loaded into the bottom-layer container, the position coordinates of the next image block of the original small-resolution image in the bottom layer are returned once, where the returned positions include:

[0021] If the current layer does not meet the propagation condition, calculate the coordinates of the next image block from the current layer;

[0022] If the current layer meets the propagation condition, after propagating to the next layer, start recursive calculation from the next layer until reaching the bottom layer to determine the scanning position of the original small-resolution image.

[0023] Further, the position coordinates are determined in the following manner:

[0024] When the container in the current layer is not full, calculate the position coordinates of the next image block from the current layer;

[0025] When the container in the current layer is full, after propagating to the container in the next layer, start recursive calculation from the next layer until obtaining the position coordinates of the next image block in the container in the bottom layer.

[0026] Further, downsample the image blocks in any one of the containers, and transmit the downsampled image blocks of any one of the containers to the container in the upper layer corresponding to the layer of any one of the containers in the image pyramid, including:

[0027] When the propagation condition is satisfied, automatically start the propagation of the current layer to the position of the corresponding image blocks in the next layer, where the propagation condition is: when any container in the image pyramid is filled, or, the image blocks in the current layer have been scanned to the end of a row or a column, or, the original small-resolution image has been fully scanned.

[0028] In a second aspect, an embodiment of the present application provides an image pyramid production device, including:

[0029] A level determination module, configured to obtain the number of thumbnail layers in the image pyramid;

[0030] A configuration module, configured to configure the containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks;

[0031] A production module, configured to scan image blocks from the multiple original small-resolution images into the containers in the bottom layer of the image pyramid, where the image blocks in any one of the containers are written into the image pyramid file, and the image blocks in any one of the containers are downsampled, and the downsampled image blocks of any one of the containers are transmitted to the container in the upper layer corresponding to the layer of any one of the containers in the image pyramid.

[0032] In a third aspect, an embodiment of the present application provides a computing device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, the method for producing an image pyramid as described in the first aspect above is implemented.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program is used to implement the method for producing an image pyramid as described in the first aspect above.

[0034] In a fifth aspect, an embodiment of the present application provides a computer program product, on which a computer program is stored, and the computer program is used to implement the method for producing an image pyramid as described in the first aspect above.

[0035] The method, apparatus, and computing device for generating an image pyramid provided by the embodiments of the present application do not require all the original low-resolution images to be read into the memory, and do not require the support of a large memory for the original low-resolution images that occupy a large amount of storage space. Therefore, the memory overhead can be effectively reduced, the total amount of memory used remains basically constant, and it can adapt to different scales of low-resolution image data, achieving theoretically no limit on the number of images and having high scalability. In addition, the number of pyramid levels and the resolution of each level adapt to the scale of the original low-resolution image data, which can improve the efficiency of generating an image pyramid based on a large number of original low-resolution images. Description of the Drawings

[0036] By reading the following detailed description of the non-limiting embodiments with reference to the accompanying drawings, other features, objectives, and advantages of the present application will become more apparent:

[0037] Figure 1 It is a flowchart of the method for generating an image pyramid according to the embodiments of the present application;

[0038] Figure 2 It is a schematic diagram of the corresponding relationship of image pyramid levels;

[0039] Figure 3 It is a schematic diagram of the block-based self-propagating downsampling method of the method for generating an image pyramid according to the embodiments of the present application;

[0040] Figure 4 It is a schematic diagram of the scanning propagation feedback process of the method for generating an image pyramid according to the embodiments of the present application;

[0041] Figure 5 It is a schematic diagram of the scanning order of image blocks of the method for generating an image pyramid according to the embodiments of the present application;

[0042] Figure 6 It is a schematic diagram of a Gaussian image pyramid;

[0043] Figure 7 It is a schematic diagram of generating an image pyramid in the prior art;

[0044] Figure 8 It is a schematic diagram of the structure of the apparatus for generating an image pyramid according to the embodiments of the present application;

[0045] Figure 9 It is a schematic diagram of the structure of the computing device according to the embodiments of the present application. Detailed Embodiments

[0046] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are merely for explaining the relevant disclosure and not for limiting the disclosure. Additionally, it should be noted that for the sake of description, only the parts related to the disclosure are shown in the drawings.

[0047] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the drawings and embodiments.

[0048] The method, apparatus, and computing device for producing an image pyramid according to an embodiment of the present application will be described below in conjunction with the accompanying drawings.

[0049] The implementation environment of the application embodiment can be a personal computing device, such as a computer, a mobile terminal, etc., which obtains the number of thumbnail layers in the image pyramid; configures the containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks; scans image blocks from the multiple original small-resolution images into the containers at the bottom layer of the image pyramid, where the image blocks in any container are written into the image pyramid file, and the image blocks in any container are downsampled, and the downsampled image blocks of any container are transmitted to the container in the upper layer corresponding to the layer of any container in the image pyramid.

[0050] Alternatively, it can also be implemented by a server. For example, a personal computing device sends a request to the server, and the server obtains the number of thumbnail layers in the image pyramid; configures the containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks; scans image blocks from the multiple original small-resolution images into the containers at the bottom layer of the image pyramid, where the image blocks in any container are written into the image pyramid file, and the image blocks in any container are downsampled, and the downsampled image blocks of any container are transmitted to the container in the upper layer corresponding to the layer of any container in the image pyramid, and finally, the image pyramid is returned to the personal computing device.

[0051] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0052] Due to different ways of producing image pyramids, in practical applications, it mainly includes producing image pyramids based on a single image with ultra-large-scale resolution and producing image pyramids based on small-resolution images with ultra-large-scale quantity.

[0053] In an embodiment of the present invention, it is a technical implementation of producing an image pyramid based on small-resolution images with ultra-large-scale quantity. In the related art, when producing an image pyramid based on small-resolution images with ultra-large-scale quantity, all the original images (i.e., small-resolution images with ultra-large-scale quantity) need to be loaded into the memory of the production environment. And the memory consumption calculation after the images are loaded is shown in Formula 1:

[0054]

[0055] Among them, n is the number of original small-resolution images, h is the resolution height of the original small-resolution images, w is the resolution width of the original small-resolution images, c is the number of channels of the original small-resolution images, and d is the storage bit depth of the original small-resolution images. Therefore, the method in the related art has the technical problem of large memory consumption.

[0056] Figure 1 It is a flowchart of the method for producing an image pyramid according to an embodiment of the present application, as Figure 1 shown. According to the method for producing an image pyramid according to an embodiment of the present application, it includes the following steps:

[0057] S101: Obtain the number of thumbnail layers in the image pyramid.

[0058] Specifically, obtain the downscaling ratio factor and the size of the image block; according to the number of multiple original small-resolution images, the downscaling ratio factor, and the size of the image block, obtain the number of thumbnail layers in the image pyramid.

[0059] In a specific example, obtaining the downscaling ratio factor and the size of the image block includes: obtaining the occupied space of the multiple original small-resolution images, and obtaining the downscaling ratio factor according to the occupied space; obtaining the resolution of any one of the multiple original small-resolution images, and obtaining the size of the image block according to the resolution of the any one original small-resolution image.

[0060] In this example, the downscaling ratio factor increases with the increase of the occupied space of the multiple original small-resolution images; the size of the image block is determined according to the width and height of the resolution of any one of the original small-resolution images.

[0061] For example, the method for determining the downscaling ratio factor of the image pyramid can calculate the memory overhead for loading the full-size original low-resolution image using Formula 1, and then divide the corresponding ratio factors according to a certain magnitude unit. As a specific application, it is as follows:

[0062] If it is less than 5GB, f = 1,

[0063] If it is greater than 5GB and less than 10GB, f = 2,

[0064] If it is greater than 10GB and less than 50GB, f = 4,

[0065] If it is greater than 50GB, f = 8.

[0066] Where f is the downscaling ratio factor.

[0067] It should be noted that the downscaling ratio factor f can be flexibly adjusted as needed, as long as it is ensured to increase as the memory overhead increases.

[0068] The image blocks are processed in a segmented manner, that is: the thumbnail images of each level (i.e., layer) of the image pyramid are all segmented according to a certain size (w b ·h b ) width and height, divided into a certain number (x b ·y b ) of image blocks, and the position relationship of the image blocks in the grid two-dimensional coordinate system is calculated. For the convenience of calculation and algorithm efficiency, in the embodiments of the present invention, the resolution width and height of the segmentation size (i.e., the size of the image block) are determined as the resolution width and height of the original low-resolution image.

[0069] As Figure 2 shown, the image pyramid is an image set composed of multiple sub-images of a single image with different resolutions. It is generated by continuously downsampling the original image (i.e., multiple original low-resolution images), that is: a low-resolution approximate image (small size) is generated from a high-resolution image (large size).

[0070] Before describing in detail how to obtain the number of layers of the image pyramid based on the number of multiple original low-resolution images, the downscaling ratio factor, and the size of the image blocks, it should be noted first that the method for generating the image pyramid in the embodiments of the present invention is a segmented vertical self-propagation algorithm for generating the image pyramid. Among them:

[0071] Vertical: The image pyramid has a logical vertical multi-level concept.

[0072] Self-propagation: When a certain position p 总层级数 in the (n - 1)th (n ≤ N n-1 {x b ,y b} The small image grid reaches the corresponding position p in the next lower level n {x b ,y b}, when the propagation condition is met, the propagation is automatically started.

[0073] As Figure 2 shown, the image pyramid is an image set composed of multiple sub-images of different resolutions of an image. It is generated by continuously downsampling the original image (i.e., multiple original small-resolution images), that is, a low-resolution approximate image (small size) is generated from a high-resolution image (large size).

[0074] After analyzing the concept of the image pyramid and the experience of practical application, it is obtained that the thumbnail images at each level of the image pyramid have a logical correspondence relationship, which is mainly reflected in two aspects of correspondence: pixel resolution, formula 2:

[0075]

[0076] For example, n = 2, assuming w n = 8, h n=8 , f = 2, then

[0077] The starting coordinates of the upper left corner of the image block, formula 3

[0078]

[0079] Among them,

[0080] F is the downscaling factor, applicable to:

[0081] From the resolution of the thumbnail image of the n-1th layer to the resolution of the thumbnail image of the nth layer,

[0082] From the image block of the thumbnail image of the n-1th layer to the image block of the thumbnail image of the nth layer,

[0083] P n The resolution of the thumbnail image of the nth layer,

[0084] w n The width of the resolution of the thumbnail image of the nth layer,

[0085] h n The height of the resolution of the thumbnail image of the nth layer,

[0086] B n The coordinate array of the image block of the thumbnail image of the nth layer,

[0087] x The horizontal coordinate of the image block of the thumbnail image of the nth layer, the calculation method is:

[0088]

[0089] The vertical coordinate of the thumbnail image block in the nth layer is calculated as follows:

[0090]

[0091] Therefore, the method for determining the number of pyramid levels and the resolution of each level is as follows: The resolution of the full - scale original small - resolution image width and height is accumulated under the arrangement rule to obtain the resolution of the complete large - image as the 0th level of the image pyramid, P0(w0, h0). Use formula ② to loop - calculate the thumbnail resolution of the next level (here, the down - scaling ratio factor for each level of the image pyramid is a same determined value) until the width and height of a certain level are both not greater than the pixel size of the image block (w b ·h b ). Thus, the thumbnail resolutions of each level P n (w n , h n ) and the total number of levels N are obtained.

[0092] S102: Configure the containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks.

[0093] Specifically, configuring the containers of each layer in the image pyramid according to the number of layers includes: obtaining the number of containers according to the number of layers; determining the size of the containers according to the down - scaling ratio factor; and respectively configuring the containers with set capacities to each layer in the image pyramid.

[0094] That is: Storing data: Each level of the image pyramid holds a container. What is loaded in the container is an image block. The default capacity C with logical coordinates b{x, y} is the square of the down - scaling ratio factor (f 2 ). When the number of image blocks in the current level is less than the default capacity C of the container, to further reduce the memory overhead, the capacity of the container is adjusted to the number of image blocks in the current level. What is loaded includes:

[0095] The decoded pixel array of the small - resolution original image,

[0096] The pixel array of the thumbnail sub - block of each level of the image pyramid.

[0097] S103: Scan image patches from the multiple original low-resolution images into the containers at the bottom layer of the image pyramid. Among them, write the image patches in any container into the image pyramid file, downsample the image patches in any container, and transfer the downsampled image patches of any container to the container in the upper layer corresponding to the layer of any container in the image pyramid. Among them, downsample the image patches in any container and transfer the downsampled image patches of any container to the container in the upper layer corresponding to the layer of any container in the image pyramid, including: when the propagation condition is satisfied, automatically start the propagation of the current layer to the position of the corresponding image patch in the next layer, where the propagation condition is: when any container in the image pyramid is filled, or the image patches in the current layer have been scanned to the end of the row or column, or the original low-resolution images have been fully scanned.

[0098] In an embodiment of the present invention, after scanning image patches from the multiple original low-resolution images into the containers at the bottom layer of the image pyramid, it further includes: transmitting back the position coordinates of the next image patch of the original low-resolution image in the container at the bottom layer once.

[0099] In this example, the position coordinates are determined in the following manner: when the container in the current layer is not filled, calculate the position coordinates of the next image patch from the current layer; when the container in the current layer is filled, after propagating to the container in the next layer, perform recursive calculation starting from the next layer until the position coordinates of the next image patch in the container at the bottom layer are obtained.

[0100] Each time an original low-resolution image is scanned and loaded into the bottom-layer container, the position coordinates of the next image patch of the original low-resolution image in the bottom layer are transmitted back once. Among them, the transmitted-back positions include: if the propagation condition is not reached in the current layer, calculate the coordinates of the next image patch from the current layer; or, if the propagation condition is reached in the current layer, after propagating to the next layer, perform recursive calculation starting from the next layer until reaching the bottom layer to determine the scanning position of the original low-resolution image.

[0101] Specifically, the propagation condition: when the container held by a certain level in the image pyramid is filled, or after blockification of the current level, it has been scanned to the end of the row or column, or the original low-resolution images have been fully scanned.

[0102] Propagation data: when the propagation condition is satisfied, automatically start the propagation of the current level to the position of the corresponding image patch in the next level. The calculation method of the image patch position in the next level refers to Formula 3 and Formula 4.

[0103] Transmitted-back position: Each time an original low-resolution image is scanned and loaded into the bottom-layer container, the position coordinates b{x,y} of the next image patch of the original low-resolution image in the bottom layer B are transmitted back once. The transmitted-back positions are divided into two types:

[0104] The current level does not meet the propagation condition, and the coordinates of the next image block are calculated from the current level.

[0105] When the current level meets the propagation condition, after propagating to the next level, start calculating from the next level and perform recursive calculation until the bottom level, which can then guide the scanning position of the original small-resolution image.

[0106] As Figure 3 shown, a self-propagating downsampling method is shown. Combining the above relationships of each level of the image pyramid, in the production process, in order to use the smallest possible memory overhead, and still keep the total memory overhead roughly constant in terms of magnitude despite changes in the total memory capacity and data scale of the production environment, the program needs to meet the following requirements: the total number of levels of the image pyramid is controllable, the current memory overhead of each level is minimized, the condition for propagating to the next level of the image pyramid can be achieved by scanning the smallest number of original images, each grid-like image block of each level of the image pyramid is dumped into the storage file at the fastest speed and the memory is released, and the original small-resolution images (the bottom level in the image pyramid) are scanned in a loop until the automatic propagation completes the top level of the image pyramid, at which point the program automatically exits. As Figure 4 shown, a feedback process is shown.

[0107] As Figure 5 shown, the scanning order of the image blocks is that for f2 number of blocks in the downscaling factor, in column-major order, from top to bottom, and from left to right.

[0108] According to the method for producing an image pyramid of an embodiment of the present invention, it is not necessary to read all the original small-resolution images into the memory, and for the original small-resolution images that occupy a large amount of storage space, large memory support is not required either. Therefore, the memory overhead can be effectively reduced, and the total amount of memory used remains basically constant, which can adapt to different scales of small-resolution image data, achieving theoretically unlimited image quantity and having high scalability. In addition, the number of pyramid levels and the resolution of each level adapt to the data scale of the original small-resolution images, which can improve the efficiency of producing an image pyramid based on a large number of original small-resolution images.

[0109] On the other hand, as Figure 8 shown, an embodiment of the present application provides an apparatus for producing an image pyramid, including: a level determination module 810, a configuration module 820, and a production module 830, where:

[0110] The level determination module 810 is configured to obtain the number of thumbnail layers in the image pyramid;

[0111] The configuration module 820 is configured to configure containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks;

[0112] A production module 830 is configured to scan image patches from the multiple original small-resolution images into a container at the bottom layer of an image pyramid. Among them, the image patches in any container are written into an image pyramid file, and the image patches in the any container are downsampled, and the downsampled image patches of the any container are transmitted to a container at the upper layer corresponding to the layer of the any container in the image pyramid.

[0113] The image pyramid production device according to the embodiment of the present invention does not need to read all the original small-resolution images into the memory. For the original small-resolution images that occupy a large amount of storage space, it also does not require the support of a large memory. Therefore, the memory overhead can be effectively reduced, and the total amount of memory used remains basically constant, which can adapt to small-resolution image data of different scales, achieving theoretically unlimited image quantity and having high scalability. In addition, the number of pyramid levels and the resolution of each level adapt to the scale of the original small-resolution image data, which can improve the efficiency of producing an image pyramid based on a large number of original small-resolution images.

[0114] It should be noted that the specific implementation manner of the image pyramid production device in the embodiment of the present application is similar to the specific implementation manner of the image pyramid production method in the embodiment of the present application. For details, please refer to the description in the method part, and will not be elaborated here.

[0115] Figure 9 It is a schematic structural diagram of a computing device according to an embodiment of the present application.

[0116] As Figure 9 shown, the computing device 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 602 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computing device 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0117] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.

[0118] Specifically, according to an embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product that includes a computer program carried on a machine-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from the removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, the above-described functions defined in the computing device of the present application are executed.

[0119] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor computing device, system, or device, or any combination of the above. More specific examples of a computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction-executing computing device, system, or device. And in this application, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable medium can send, propagate, or transmit a program for use by or in combination with an instruction-executing computing device, system, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of a processing receiving device, method, and computer program product according to various embodiments of this application. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code, and the aforementioned module, program segment, or part of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks can occur in a different order than marked in the accompanying drawings. For example, two consecutively shown blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based computing device that executes a specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.

[0121] The units or modules involved in the embodiments of the present application can be implemented in software or in hardware. The described units or modules can also be provided in a processor, and when the processor executes the program, it implements the method for generating an image pyramid:

[0122] Obtain the number of thumbnail layers in the image pyramid;

[0123] Configure containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks;

[0124] Scan image blocks from the multiple original small-resolution images into the containers at the bottom layer of the image pyramid, where the image blocks in any container are written into the image pyramid file, and the image blocks in any container are downsampled, and the downsampled image blocks of any container are transmitted to the container in the upper layer corresponding to the layer of the any container in the image pyramid.

[0125] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the computing device described in the above embodiments; or may exist alone without being assembled into the computing device. The above computer-readable storage medium stores one or more programs, and when the foregoing programs are executed by one or more processors, they implement the method for generating an image pyramid described in the present application:

[0126] Obtain the number of thumbnail layers in the image pyramid;

[0127] Configure containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks;

[0128] Scan image blocks from the multiple original small-resolution images into the containers at the bottom layer of the image pyramid, where the image blocks in any container are written into the image pyramid file, and the image blocks in any container are downsampled, and the downsampled image blocks of any container are transmitted to the container in the upper layer corresponding to the layer of the any container in the image pyramid.

[0129] As another aspect, the present application further provides a computer program product, which may be included in the computing device described in the above embodiments; or may exist alone without being assembled into the computing device. The above computer program product stores one or more programs, and when the foregoing programs are executed by one or more processors, they implement the method for generating an image pyramid described in the present application:

[0130] Obtain the number of thumbnail layers in the image pyramid;

[0131] Configure containers corresponding to each thumbnail layer in the image pyramid according to the number of the thumbnail layers, wherein the containers are used to load image blocks;

[0132] Scan image blocks from the multiple original small-resolution images into the containers at the bottom layer of the image pyramid, wherein write the image blocks in any container into the image pyramid file, perform downsampling on the image blocks in the any container, and transmit the downsampled image blocks of the any container to the container at the upper layer corresponding to the layer of the any container in the image pyramid.

[0133] The above description is only the preferred embodiments of the present application and the description of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the foregoing disclosure concept. For example, the technical solutions formed by mutually replacing the above features with the technical features (but not limited to) having similar functions disclosed in the present application.

Claims

1. A method for producing an image pyramid, characterized in that, Including: Obtaining the number of thumbnail layers in the image pyramid; Configuring containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks; Scanning image blocks from multiple original small-resolution images into the containers at the bottom layer of the image pyramid, where the image blocks in any container are written into the image pyramid file, and the image blocks in the any container are downsampled, and the downsampled image blocks of the any container are transmitted to the container at the upper layer corresponding to the layer of the any container in the image pyramid.

2. The method for producing an image pyramid according to claim 1, wherein The obtaining the number of thumbnail layers in the image pyramid includes: Obtaining a downscaling factor and the size of the image blocks; Obtaining the number of thumbnail layers of the image pyramid according to the number of multiple original small-resolution images, the downscaling factor, and the size of the image blocks.

3. The method for producing an image pyramid according to claim 2, wherein The obtaining the downscaling factor and the size of the image blocks includes: Obtaining the occupied space of the multiple original small-resolution images, and obtaining the downscaling factor according to the occupied space, or using a preset value as the downscaling factor; Obtaining the resolution of any one of the multiple original small-resolution images, and obtaining the size of the image blocks according to the resolution of the any one of the original small-resolution images.

4. The method for producing an image pyramid according to claim 1, characterized in that, The configuring containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers includes: Obtaining the number of the containers according to the number of thumbnail layers; Determining the size of the containers according to the downscaling factor; Respectively configuring the containers with set capacities to each thumbnail layer in the image pyramid.

5. The production method of the image pyramid according to any one of claims 1-4, characterized in that, After scanning image blocks from the multiple original small-resolution images into the containers at the bottom layer of the image pyramid, it further includes: Returning the position coordinates of the next image block of the original small-resolution image in the container at the bottom layer once.

6. The method for producing an image pyramid according to claim 5, wherein Each time an original small-resolution image is scanned and loaded into the bottom-layer container, the position coordinates of the next image block of the original small-resolution image at the bottom layer are returned once, where the returned positions include: If the current layer does not meet the propagation condition, calculate the coordinates of the next image block from the current layer; If the current layer meets the propagation condition, after propagating to the next layer, start recursive calculation from the next layer until reaching the bottom layer to determine the scanning position of the original small-resolution image.

7. The method for producing an image pyramid according to claim 5, characterized in that, The position coordinates are determined by the following method: When the container at the current layer is not filled, calculate the position coordinates of the next image block from the current layer; When the container at the current layer is filled, after propagating to the container at the next layer, start recursive calculation from the next layer until obtaining the position coordinates of the next image block in the container at the bottom layer.

8. The method for producing an image pyramid according to claim 1, wherein Downsampling the image blocks in any container, and transmitting the downsampled image blocks of the any container to the container at the upper layer corresponding to the layer of the any container in the image pyramid, includes: When the propagation condition is met, the propagation to the position of the corresponding image block in the next layer from the current layer is automatically started, where the propagation condition is: when any container in the image pyramid has been filled, or, the image block in the current layer has been scanned to the end of a row or column, or, the original small-resolution image has been fully scanned.

9. An apparatus for producing an image pyramid, characterized in that, Including: A layer determination module, configured to obtain the number of thumbnail layers in the image pyramid; A configuration module, configured to configure the containers corresponding to each thumbnail layer in the image pyramid according to the number of thumbnail layers, where the containers are used to load image blocks; A production module, configured to scan image blocks from multiple original small-resolution images into the containers at the bottom layer of the image pyramid, where the image blocks in any container are written into the image pyramid file, and the image blocks in the any container are downsampled, and the downsampled image blocks of the any container are transmitted to the container in the upper layer corresponding to the layer of the any container in the image pyramid.

10. A computing device, characterized in that, The computing device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor is configured to implement the production method of the image pyramid according to any one of claims 1-8 when executing the program.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the production method of the image pyramid according to any one of claims 1-8.

12. A computer program product, on which a computer program is stored, characterized in that, When the program is executed by the processor, it implements the production method of the image pyramid according to any one of claims 1-8.