Method, apparatus and system for image compression and decompression

By determining the content associations of multiple compressed images in biological tissue image data, and recompressing only the associated images, the problem of insufficient recompressed data volume in existing technologies is solved, achieving more efficient utilization of storage resources.

CN122179568APending Publication Date: 2026-06-09CHENGDU HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHENGDU HUAWEI TECH CO LTD
Filing Date
2024-12-02
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies do not significantly reduce the amount of data when recompressing biological tissue image data, resulting in excessive consumption of storage resources.

Method used

By obtaining image content association information between multiple compressed images, the compressed images with associated image content are identified, and only the associated images are recompressed. The uncompressed images are then reconstructed using the image content association information, thereby reducing the amount of recompressed data.

Benefits of technology

It improves recompression efficiency, reduces the number of images that need to be recompressed, and lowers storage resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179568A_ABST
    Figure CN122179568A_ABST
Patent Text Reader

Abstract

The application discloses an image compression, decompression method, device and system, and relates to the technical field of image processing. The image compression method comprises the following steps: in the case that the image content correlation of a first compressed image and a second compressed image in a plurality of compressed images is determined, obtaining the image content correlation information between the first compressed image and the second compressed image; and re-compressing the first compressed image to obtain a first re-compression result, and obtaining a re-compression result of a to-be-processed image according to the image content correlation information and the first re-compression result. According to the re-compression result of the to-be-processed image, a plurality of reconstructed compressed images of the plurality of compressed images can be obtained. In this way, the data amount of the re-compression of the plurality of compressed images can be reduced, the data amount of the re-compression result of the to-be-processed image can be smaller, and the number of images that need to be re-compressed is smaller, so that the compression efficiency is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically to methods, apparatus and systems for image compression and decompression. Background Technology

[0002] Imaging biological tissues (such as pathological sections) using scanning equipment such as digital microscopes yields image data of the biological tissue. This image data can include images of the biological tissue at multiple magnifications, helping users to understand the condition of the tissue more clearly and accurately. Furthermore, the images of biological tissues obtained through scanning equipment are typically compressed, for example, images compressed using the Joint Photographic Experts Group (JPEG) standard.

[0003] Image data of biological tissues can be stored on storage devices for easy access and viewing when needed. Recompressing biological tissue image data can reduce its size. Storing the recompressed result on storage devices further reduces storage resource consumption. For biological tissue image data, images at multiple magnifications can be recompressed one by one to obtain the recompressed result. However, the data reduction achieved by this recompression method is still relatively small, and further improvements in the data reduction achieved by recompressing biological tissue image data are urgently needed. Summary of the Invention

[0004] This application provides a method, apparatus, and system for image compression and decompression, which can improve the reduction of data volume when recompressing multiple already compressed images.

[0005] A first aspect provides an image compression method, comprising: acquiring an image to be processed, the image to be processed including multiple compressed images of a target object at multiple magnifications; and, upon determining that the image content of a first compressed image and a second compressed image among the multiple compressed images are associated, acquiring image content association information between the first compressed image and the second compressed image, wherein the first compressed image is a compressed image of the target object at a first magnification, and the second compressed image is a compressed image of the target object at a second magnification; and recompressing the first compressed image to obtain a first recompression result, and obtaining a recompression result of the image to be processed based on the image content association information and the first recompression result.

[0006] Because the image to be processed contains multiple compressed images of the target object at multiple magnification levels, the image content in these compressed images is related to each other. For example, the image content of the first compressed image and the second compressed image both contain the target object or a region of the target object, but the magnification levels of the first compressed image and the second compressed image are different, that is, the image quality (such as sharpness) of the image content of the first compressed image and the second compressed image are different.

[0007] In the image compression method provided in this application embodiment, when it is possible to determine which compressed images among multiple compressed images have related image content, information indicating the association relationship between the image content of the first compressed image and the image content of the second compressed image (referred to as image content association information) is obtained. This image content association information can be used to indicate how to reconstruct the second compressed image based on the first compressed image. Thus, when recompressing the image to be processed, only the first compressed image can be recompressed to obtain a first recompression result, and the recompression result of the image to be processed can be obtained based on the first recompression result and the image content association information. The recompression result of the image to be processed may not include the image data of the second compressed image (for example, the second compressed image can be deleted from the image to be processed). Based on this recompression result, the first compressed image and the second compressed image can be successfully reconstructed, that is, multiple compressed images at multiple magnifications can be reconstructed.

[0008] The image compression method provided by the embodiments of this application can reduce the amount of data when recompressing multiple compressed images that have already been compressed. The amount of data in the recompressed image of the image to be processed can be smaller, and the number of images that need to be recompressed is less, resulting in higher compression efficiency.

[0009] In some possible implementations, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

[0010] In some scenarios, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image. Thus, the operational parameters of the acquired target sampling operation can indicate how to reconstruct the second compressed image based on the first compressed image.

[0011] In some other possible implementations, obtaining image content association information between the first compressed image and the second compressed image includes: obtaining at least one candidate sampling operation parameter, searching among the at least one candidate sampling operation parameter to see if there is an operation parameter for the target sampling operation, and obtaining the operation parameter for the target sampling operation if it exists.

[0012] In some scenarios, computing devices cannot directly obtain the operation parameters of the target sampling operation. Therefore, in this embodiment, by acquiring at least one candidate sampling operation parameter, the operation parameters of the target sampling operation can be found among at least one candidate parameter, ensuring the smooth execution of the recompression method provided in this embodiment.

[0013] In some other possible implementations, searching for the existence of the target sampling operation parameter among at least one candidate sampling operation parameter includes: performing a sampling operation on the first compressed image according to the candidate sampling operation parameter to obtain a candidate sampled image; and determining whether the candidate sampling operation parameter is the target sampling operation parameter based on whether the candidate sampled image matches the second compressed image.

[0014] Based on whether the candidate sampled image matches the second compressed image, it can be ensured that the operation parameters of the target sampling operation are accurately found among at least one candidate sampling operation parameters.

[0015] In some other possible implementations, the image content association information includes the residual of the second compressed image obtained by inter-frame prediction of the second compressed image based on the first compressed image.

[0016] The first compressed image and the second compressed image are related in terms of image content, thus exhibiting similarity between their contents. Therefore, the residual of the acquired second compressed image can indicate how to reconstruct the second compressed image based on the first compressed image.

[0017] In some other possible implementations, the method includes acquiring an image data file, which includes the image to be processed and metadata of the image data file, and obtaining the image to be processed from the image data file.

[0018] Furthermore, the method may also include: obtaining metadata from an image data file, obtaining image information of multiple compressed images contained in the image to be processed from the metadata, and determining the image content association between a first compressed image and a second compressed image among the multiple compressed images based on the image information of the multiple compressed images.

[0019] Metadata may include image information of each compressed image, so that the computing device can automatically and accurately determine the first and second compressed images that have image content association based on the image information of multiple compressed images included in the metadata.

[0020] In some other possible implementations, each of the multiple compressed images is a compressed image of a portion of the target object. The image information of the compressed image may include information indicating the magnification of the compressed image and information indicating the image region to which the image content of the compressed image belongs.

[0021] In some scenarios, compressed images are stored as image blocks, where each compressed image represents a portion of the target object. Thus, by including information such as the magnification of the compressed image and the region to which its content belongs in the image information, the computing device can accurately determine the first and second compressed images that have a shared image content.

[0022] In some other possible implementations, the method further includes: if it is not possible to determine that there is a first compressed image and a second compressed image with image content association among the multiple compressed images, recompress the multiple compressed images to obtain the recompressed image to be processed.

[0023] In some scenarios, computing devices cannot determine whether a first compressed image and a second compressed image have related image content among multiple compressed images. In such cases, the computing device can still obtain the recompression result of multiple compressed images by recompressing them one by one.

[0024] In some other possible implementations, where the image to be processed is included in an image data file, and the image data file includes metadata of the image to be processed and the image data file, the method further includes: compressing the metadata to obtain a compressed result of the metadata; and obtaining a compressed result of the image data file based on the recompression result of the image to be processed and the compressed result of the metadata.

[0025] In some scenarios, the image to be processed is stored as an image data file, which also includes metadata. Therefore, the computing device also compresses the metadata to obtain a compressed metadata result, ensuring that the computing device can obtain a recompressed image data file.

[0026] Secondly, an image decompression method is provided. The method includes obtaining recompression results of multiple compressed images of a target object at multiple magnifications. The multiple compressed images include a first compressed image of the target object at a first magnification and a second compressed image of the target object at a second magnification, as well as image content association between the first and second compressed images. The recompression results include a first recompression result obtained by recompressing the first compressed image and image content association information between the first and second compressed images. Then, the first recompression result is decompressed to obtain a reconstructed first compressed image. Furthermore, a reconstructed second compressed image is generated based on the image content association information and the reconstructed first compressed image. Finally, multiple reconstructed compressed images of the multiple compressed images are obtained based on the reconstructed first compressed image and the reconstructed second compressed image.

[0027] Image content association information can be used to indicate how to reconstruct the second compressed image from the first compressed image. The image decompression method provided in this application embodiment can successfully decode the recompression results (excluding image data of the second compressed image) of multiple compressed images obtained by the image compression method provided in this application embodiment, and reconstruct multiple compressed images (including the first compressed image and the second compressed image).

[0028] In some possible implementations, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

[0029] In some other possible implementations, generating a reconstructed second compressed image based on image content association information and the reconstructed first compressed image includes: performing a sampling operation on the reconstructed first compressed image according to the operation parameters of the target sampling operation to obtain the reconstructed second compressed image.

[0030] In some scenarios, the second compressed image is obtained by performing a target sampling operation on the first compressed image. The operation parameters of the target sampling operation indicate how to reconstruct the second compressed image based on the first compressed image. Thus, by performing a sampling operation on the reconstructed first compressed image according to the operation parameters of the target sampling operation, the reconstructed second compressed image can be successfully obtained.

[0031] In some other possible implementations, the image content association information includes the residual of the second compressed image obtained by inter-frame prediction of the second compressed image based on the first compressed image.

[0032] In some other possible implementations, generating a reconstructed second compressed image based on image content association information and a reconstructed first compressed image includes: obtaining predicted pixels of the second compressed image based on the reconstructed first compressed image, and obtaining the reconstructed second compressed image based on the predicted pixels of the second compressed image and the residual of the second compressed image.

[0033] The first compressed image and the second compressed image are related in terms of image content, thus exhibiting similarity between their contents. The residual of the acquired second compressed image indicates how to reconstruct the second compressed image based on the first compressed image. Therefore, by using the predicted pixels of the acquired second compressed image and the residual between the predicted pixels and the second compressed image, the reconstructed second compressed image can be successfully obtained.

[0034] Thirdly, an image compression device is provided, which includes an image acquisition module and a recompression module.

[0035] The image acquisition module is used to acquire images to be processed, which include multiple compressed images of the target object at multiple magnifications.

[0036] The recompression module is used to obtain image content association information between a first compressed image and a second compressed image when the image content association between the first compressed image and the second compressed image is determined to be among multiple compressed images. The first compressed image is a compressed image of the target object at a first magnification, and the second compressed image is a compressed image of the target object at a second magnification. The recompression module is also used to recompress the first compressed image to obtain a first recompression result. Furthermore, the recompression module is also used to obtain a recompression result for the image to be processed based on the image content association information and the first recompression result.

[0037] In some possible implementations, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

[0038] In some other possible implementations, the recompression module is also used to: obtain at least one candidate sampling operation parameter, and search among the at least one candidate sampling operation parameter to find whether the target sampling operation parameter exists, and if it exists, obtain the target sampling operation parameter.

[0039] In some other possible implementations, the recompression module is also used to: perform a sampling operation on the first compressed image according to the candidate sampling operation parameters to obtain a candidate sampled image; and determine whether the candidate sampling operation parameters are the operation parameters of the target sampling operation based on whether the candidate sampled image matches the second compressed image.

[0040] In some other possible implementations, the image content association information includes the residual of the second compressed image obtained by inter-frame prediction of the second compressed image based on the first compressed image.

[0041] In some other possible implementations, the image acquisition module is also used to acquire an image data file, which includes the image to be processed and the metadata of the image data file, as well as to obtain the image to be processed based on the image data file.

[0042] In some other possible implementations, each of the multiple compressed images is a compressed image of a portion of the target object. The image information of the compressed image may include information indicating the magnification of the compressed image and information indicating the image region to which the image content of the compressed image belongs.

[0043] In some other possible implementations, the recompression module is also used to: recompress multiple compressed images to obtain a recompressed image of the object to be processed when it is not possible to determine that there is a first compressed image and a second compressed image with image content association among multiple compressed images.

[0044] In some other possible implementations, where the image to be processed is included in an image data file, and the image data file includes metadata of the image to be processed and the image data file, the recompression module is further configured to: compress the metadata to obtain a compressed result of the metadata; and, based on the recompression result of the image to be processed and the compressed result of the metadata, obtain a compressed result of the image data file.

[0045] Fourthly, an image decompression device is provided, which includes a communication module and a decompression module.

[0046] The communication module is used to obtain the recompression results of multiple compressed images of the target object at multiple magnifications. The multiple compressed images include a first compressed image of the target object at a first magnification and a second compressed image of the target object at a second magnification. The image content of the first compressed image and the second compressed image are associated. The recompression result includes a first recompression result obtained by recompressing the first compressed image and image content association information between the first compressed image and the second compressed image.

[0047] The decompression module decompresses the first compression result to obtain the reconstructed first compressed image. The decompression module also generates a reconstructed second compressed image based on image content association information and the reconstructed first compressed image. Furthermore, the decompression module generates multiple reconstructed compressed images from multiple compressed images based on the reconstructed first compressed image and the reconstructed second compressed image.

[0048] In some possible implementations, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

[0049] In some other possible implementations, the decompression module is also used to: perform a sampling operation on the reconstructed first compressed image according to the operation parameters of the target sampling operation to obtain the reconstructed second compressed image.

[0050] In some other possible implementations, the image content association information includes the residual of the second compressed image obtained by inter-frame prediction of the second compressed image based on the first compressed image.

[0051] In some other possible implementations, the decompression module is also used to: obtain the predicted pixels of the second compressed image based on the reconstructed first compressed image, and obtain the reconstructed second compressed image based on the predicted pixels of the second compressed image and the residual of the second compressed image.

[0052] Fifthly, a compression apparatus is provided, comprising at least one processor and a memory, wherein the memory is used to store a computer program such that when the computer program is executed by at least one processor, it implements the image compression method as described in the first aspect.

[0053] In a sixth aspect, a decompression device is provided, comprising at least one processor and a memory, wherein the memory is used to store a computer program such that when the computer program is executed by at least one processor, it implements the image decompression method as described in the second aspect.

[0054] In a seventh aspect, a computer program product containing instructions is provided, which, when executed by a computer device, cause the computer device to perform the image compression method as described in the first aspect or the image decompression method as described in the second aspect.

[0055] Eighthly, a computer-readable storage medium is provided, including instructions that, when executed on a computer device, cause the computer device to perform an image compression method as described in the first aspect or an image decompression method as described in the second aspect.

[0056] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods.

[0057] The following description includes more specific details about the implementation methods provided for the above aspects. Attached Figure Description

[0058] Figure 1 A schematic diagram of multiple compressed images of a target object provided in an embodiment of this application;

[0059] Figure 2 This is a schematic diagram of the architecture of the image processing system provided in the embodiments of this application;

[0060] Figure 3 A schematic flowchart illustrating the image compression method provided in this application embodiment;

[0061] Figure 4 This is a flowchart illustrating the image decompression method provided in an embodiment of this application.

[0062] Figure 5 This is a schematic diagram of the structure of the image compression device provided in the embodiments of this application;

[0063] Figure 6This is a schematic diagram of the image decompression device provided in the embodiments of this application;

[0064] Figure 7 A schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0065] By imaging biological tissues (such as pathological sections) using scanning equipment such as digital microscopes, image data of biological tissues can be obtained. This image data can include images of the biological tissue at multiple magnifications, thus helping users to understand the condition of the biological tissue more clearly, quickly, and accurately.

[0066] Taking biological tissue as a pathological slide as an example, the microscopic slide containing the pathological slide is imaged using scanning equipment such as a microscope to obtain a digital pathological image of the pathological slide at 40x magnification (referred to as a pathological image). Furthermore, the pathological image at 40x magnification is downsampled to obtain pathological images at multiple magnifications, such as 30x, 20x, 10x, and 5x. Based on the aforementioned pathological images at multiple magnifications, an image data file of the pathological slide (also referred to as a digital pathological image data file) is obtained.

[0067] Images of biological tissues obtained through scanning devices are typically compressed images, such as compressed images obtained using the Joint Photographic Experts Group (JPEG) standard or the Portable Network Graphics (PNG) standard.

[0068] Figure 1 The diagram illustrates multiple compressed images of a target object. As an example, the target object is a pathological slide, and compressed images 1-3 are multiple compressed images of the target object at multiple magnifications.

[0069] Among them, compressed image 1 is a compressed image of the target object at the highest magnification (e.g., m) among multiple magnifications, compressed image 2 is a compressed image of the target object at the second highest magnification (e.g., m / 2) among multiple magnifications, and compressed image 3 is a compressed image of the target object at the lowest magnification (e.g., m / n) among multiple magnifications.

[0070] Thus, compressed image 1 has the highest resolution among the compressed images, compressed image 2 has the second highest resolution, and compressed image 3 has the lowest resolution.

[0071] In some embodiments, each compressed image of the target object may be a compressed image that includes the entire target object (which may be referred to as the complete compressed image of the target object).

[0072] In other embodiments, the complete compressed image of the target object can be divided into multiple image blocks for storage; these image blocks can be referred to as tiles. In this case, the multiple compressed images of the target object include multiple image blocks (also referred to as multiple tiles) obtained by dividing multiple complete compressed images of the target object at multiple magnifications. Thus, each compressed image is a compressed image of a portion of the target object.

[0073] As an example, such as Figure 1 As shown, compressed image 3 can be divided into 4 image blocks (which can be represented as n3.1, n3.2, n3.3, and n3.4 respectively), and compressed image 2 can be divided into 4... 2 Image blocks (which can be represented as n2.1, n2.2, n2.3, n2.4, n2.5, n2.6, n2.7, n2.8, n2.9, n2.10, n2.11, n2.12, n2.13, n2.14, n2.15, n2.16 respectively) can be divided into 4 image blocks. 3 There are several image blocks (which can be represented as n1.1, ..., n1.64, respectively). All the image blocks obtained by dividing compressed images 1 to 3 as described above constitute multiple compressed images of the target object.

[0074] Image data files of biological tissues can be stored on storage devices for easy access and viewing when needed. For example, digital pathology image data files can be stored in hospital storage systems and made available to doctors and other users to help them clearly understand the details of pathology slides, facilitating scenarios such as remote consultations, case discussions, and teaching and research.

[0075] Image data files of biological tissues (such as digital pathology imaging data files from hospitals) are large in size, require long storage times, and have high image quality requirements (e.g., high resolution, high definition). Therefore, storing image data consumes significant storage resources, and insufficient storage resources in the storage system can fail to meet these demands. Thus, image data files need to be compressed.

[0076] Using general-purpose compression algorithms (such as DEFLATE, ZSTD, etc.) to compress biological tissue image data files is a feasible option, as these algorithms offer relatively fast compression and decompression speeds. However, in some scenarios, the images in biological tissue image data files have already been compressed, making it very difficult to recompress such already compressed data using general-purpose compression algorithms. The compression effects often overlap, and the resulting data size may increase.

[0077] Data recompression technology can be used to recompress already compressed image data (such as JPEG images, PNG images, etc.), thereby reducing the amount of data in the compressed image.

[0078] As an example, recompressing a JPEG image may include: decoding the JPEG image to obtain a decoded image, and then performing operations such as Discrete Cosine Transform (DCT), quantization, and entropy coding on the decoded image to obtain a recompressed image. The recompressed image is compressed again on top of the original compressed image, further reducing the amount of image data.

[0079] Therefore, recompressing image data files of biological tissues (including already compressed images) can reduce the size of the image data files. Storing the recompressed image data files on a storage device further reduces storage resource consumption.

[0080] Furthermore, for image data files of biological tissues, the current method requires recompressing each compressed image at multiple magnifications to obtain multiple recompression results, and then using these multiple recompression results to obtain the recompression result of the image data file. However, the amount of data reduced by this recompression method is still not high, and there is an urgent need to further improve the amount of data reduced by recompressing image data files of biological tissues.

[0081] This application provides an image compression method. The method includes acquiring an image to be processed, which includes multiple compressed images of a target object at multiple magnifications. Furthermore, if it is determined that the image content of a first compressed image and a second compressed image among the multiple compressed images are related, image content association information between the first compressed image and the second compressed image is acquired, wherein the first compressed image is a compressed image of the target object at a first magnification, and the second compressed image is a compressed image of the target object at a second magnification. Additionally, the first compressed image is recompressed to obtain a first recompression result, and a recompression result of the image to be processed is obtained based on the image content association information and the first recompression result.

[0082] The target object can refer to any object that can be imaged, such as biological tissues like pathological sections. The magnification can be any desired magnification, such as magnification greater than 1 or magnification less than 1.

[0083] The first compressed image and the second compressed image can be a set of images associated with any image content from multiple compressed images. The first magnification can be greater than the second magnification, or the first magnification can be less than the second magnification.

[0084] Because the image to be processed contains multiple compressed images of the target object at multiple magnification levels, the image content in these compressed images is related to each other. For example, the image content of the first compressed image and the second compressed image both contain the target object or a region of the target object, but the magnification levels of the first compressed image and the second compressed image are different, that is, the image quality (such as sharpness) of the image content of the first compressed image and the second compressed image are different.

[0085] Based on this, in the image compression method provided in this application embodiment, when it is possible to determine which compressed images among multiple compressed images have related image content, information indicating the association relationship between the image content of the first compressed image and the image content of the second compressed image (referred to as image content association information) is obtained. This image content association information can be used to indicate how to reconstruct the second compressed image based on the first compressed image. Thus, when recompressing the image to be processed, only the first compressed image can be recompressed to obtain a first recompression result, and the recompression result of the image to be processed can be obtained based on the first recompression result and the image content association information. The recompression result of the image to be processed may not include the image data of the second compressed image (for example, the second compressed image in the image to be processed can be deleted). Based on this recompression result, the first compressed image and the second compressed image can be successfully reconstructed, that is, multiple compressed images at multiple magnifications can be reconstructed.

[0086] Compared with the method of recompressing compressed images with multiple magnifications in the image to be processed one by one, the image compression method provided by the embodiments of this application results in a smaller data volume of the recompressed image and a smaller number of images that need to be recompressed, thus achieving higher compression efficiency.

[0087] This application also provides an image decompression method. The method includes obtaining recompression results of multiple compressed images of a target object at multiple magnifications. The multiple compressed images include a first compressed image of the target object at a first magnification and a second compressed image of the target object at a second magnification, as well as image content association between the first and second compressed images. The recompression results include a first recompression result obtained by recompressing the first compressed image and image content association information between the first and second compressed images. Then, the first recompression result is decompressed to obtain a reconstructed first compressed image. A reconstructed second compressed image is generated based on the image content association information and the reconstructed first compressed image. Finally, multiple reconstructed compressed images of multiple compressed images are obtained based on the reconstructed first compressed image and the reconstructed second compressed image.

[0088] Image content association information can be used to indicate how to reconstruct the second compressed image from the first compressed image. The image decompression method provided in this application embodiment can successfully decode the recompression results (excluding image data of the second compressed image) of multiple compressed images obtained by the image compression method provided in this application embodiment, and reconstruct multiple compressed images (including the first compressed image and the second compressed image).

[0089] The image compression and decompression methods provided in this application are applicable to recompressing multiple compressed images (including multiple compressed images of the target object at multiple magnifications) obtained by imaging various types of target objects. For example, the target object may be biological tissue such as pathological sections, or objects in the natural environment.

[0090] Furthermore, the image compression and decompression methods provided in this application are applicable to recompressing multiple compressed images of various types and decoding the recompression results of multiple compressed images. For example, they are applicable to recompressing multiple compressed images of various compression methods such as JPEG and PNG and decoding the recompression results of multiple compressed images.

[0091] The image processing system provided in this application is described below. Figure 2 This is a schematic diagram of the architecture of the image processing system provided in an embodiment of this application.

[0092] Figure 2 The image processing system 200 shown can be used to implement the image compression method and image decompression method provided in the embodiments of this application. For example... Figure 2 As shown, the image processing system 200 includes an image acquisition device 210, an image compression device 220, a storage medium 230, and an image decompression device 240.

[0093] Image acquisition device 210 is used to acquire multiple images of a target object at multiple magnifications, and these multiple images can be saved as multiple compressed images (e.g., saved as compressed images of JPEG, PNG, etc.). An image data file of the target object can be obtained from the multiple compressed images of the target object. In addition to the multiple compressed images, the image data file may also include metadata.

[0094] Image acquisition device 210 may include various devices capable of acquiring or generating compressed images of a target object. For example, image acquisition device 210 includes various devices such as cameras, digital microscopes, digital radiography (DR), and computed tomography (CT) scanners.

[0095] Image compression device 220 is used to acquire a target object image to be processed from image acquisition device 210, or to acquire an image data file of the target object and obtain metadata of the target image and the image data file based on the image data file. The target image includes multiple compressed images of the target object at multiple magnifications. Image compression device 220 is also used to recompress the acquired target object image to obtain a recompressed image. Alternatively, image compression device 220 is also used to compress the target object image data file (including recompressing the target object image to be processed) to obtain a compressed image data file.

[0096] In some embodiments, the image compression device 220 may execute the image compression method provided in this application embodiment to recompress the image to be processed of the target object and to compress the image data file of the target object.

[0097] For example, the image compression device 220 can determine whether there is a first compressed image and a second compressed image with image content association among multiple compressed images of the target object included in the image to be processed at multiple magnifications. Furthermore, if it is determined that the first compressed image and the second compressed image among the multiple compressed images have image content association, it obtains image content association information between the first compressed image and the second compressed image, wherein the first compressed image is a compressed image of the target object at a first magnification, and the second compressed image is a compressed image of the target object at a second magnification. Additionally, it recompresses the first compressed image to obtain a first recompression result, and obtains a recompression result of the image to be processed based on the image content association information and the first recompression result.

[0098] Furthermore, the image compression device 220 can also compress the metadata of the image data file of the target object to obtain a compressed metadata result. Additionally, the image compression device 220 can obtain a compressed image data file result based on the recompression result of the image to be processed and the compressed metadata result.

[0099] For more detailed information on the image compression method provided in the embodiments of this application, please refer to [link / reference needed]. Figure 3 And its related descriptions.

[0100] Image compression device 220 may include various computing devices capable of performing image compression processing. For example, image compression device 220 may include servers, desktop computers, mobile computing devices, laptop computers, tablet computers, cameras, scanning devices, etc.

[0101] The image compression device 220 can also store the recompression result of the target object's image to be processed or the compression result of the image data file on the storage medium 230. The storage medium 230 may include various types or combinations of storage media such as optical discs, disks (including floppy disks, hard disks, etc.), and solid-state drives.

[0102] Image decompression device 240 is used to acquire the recompression result of the image to be processed of the target object from storage medium 230 or image compression device 220, or to acquire the compression result of image data file (including the recompression result of the image to be processed of the target object). Furthermore, image decompression device 240 is also used to decompress the acquired recompression result of the image to be processed, or to decompress the compression result of the image data file, to obtain multiple reconstructed compressed images of multiple compressed images.

[0103] In some embodiments, the image decompression device 240 can execute the image decompression method provided in this application embodiment to decode the recompression result of the image to be processed obtained by the image compression method provided in this application embodiment (excluding image data of the second compressed image) and reconstruct multiple compressed images (including a first compressed image and a second compressed image). For example, the recompression result of the image to be processed includes a first recompression result obtained by recompressing the first compressed image and image content association information between the first compressed image and the second compressed image. The image decompression device 240 can decompress the first recompression result to obtain a reconstructed first compressed image. Furthermore, the image decompression device 240 also generates a reconstructed second compressed image based on the image content association information and the reconstructed first compressed image. Additionally, the image decompression device 240 obtains multiple reconstructed compressed images of multiple compressed images based on the reconstructed first compressed image and the reconstructed second compressed image.

[0104] For more detailed information on the image decompression method provided in the embodiments of this application, please refer to [link / reference]. Figure 4 And its related descriptions.

[0105] Image decompression device 240 may include various computing devices capable of performing image decompression processing. For example, image decompression device 220 may include servers, desktop computers, mobile computing devices, laptop computers, tablet computers, cameras, display devices, etc.

[0106] Multiple reconstructed compressed images obtained from the image decompression device 240 can be displayed on a display device. Figure 2 (Not shown in the image) is displayed, for example, the display device decompresses the reconstructed compressed image and displays the image, and the user can view the image on the monitor to understand the target object.

[0107] Figure 2This is merely a schematic diagram of the architecture of an image processing system provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc. shown in the figure do not constitute any limitation.

[0108] For example, in Figure 2 In this embodiment, the image acquisition device 210 and the image compression device 220 are different devices. In other cases, the image acquisition device 210 and the image compression device 220 may be implemented by the same device.

[0109] The image compression and decompression methods provided in the embodiments of this application are described in detail below. The image compression and decompression methods provided in the embodiments of this application can be used in… Figure 2 The image processing system 200 shown is implemented on it.

[0110] Figure 3 This is a schematic flowchart of the image compression method provided in an embodiment of this application. Figure 3 The method shown can be performed by a computing device or a processing device. For example, it can be performed by the image compression device 220 in the image processing system 200.

[0111] like Figure 3 As shown, the image compression method provided in this application embodiment may include the following steps:

[0112] Step 310: Obtain the image to be processed, which includes multiple compressed images of the target object at multiple magnifications.

[0113] In this embodiment of the application, the compressed image that needs to be recompressed is called the image to be processed.

[0114] As mentioned above, in the embodiments of this application, the target object can be various types of objects, such as biological tissues like pathological slides, objects in the natural environment, etc. The compressed image can be various types of compressed images such as JPEG images and PNG images.

[0115] Multiple compressed images of a target object at multiple magnifications can be obtained by imaging the target object, or by other feasible methods such as image generation algorithms.

[0116] In some embodiments, among multiple compressed images of a target object at multiple magnifications, some compressed images can be obtained by sampling some of the compressed images. For example, with Figure 1 Taking compressed images 1, 2, and 3 as examples, compressed image 1 has the highest magnification, while compressed images 2 and 3 are compressed images obtained by downsampling compressed image 1. For example, consider... Figure 1Taking compressed image 1, compressed image 2, and compressed image 3 as examples, the one with the lowest magnification is compressed image 3. Compressed image 1 and compressed image 2 are compressed images obtained by upsampling compressed image 3.

[0117] In some embodiments, multiple compressed images of the target object may be stored in an image data file of the target object. In other words, multiple compressed images of the target object may be stored in the form of an image data file. In addition to the multiple compressed images, the image data file of the target object may also include metadata.

[0118] In step 310, the image data file of the target object can be obtained, and the image data file of the target object can be parsed to obtain the image to be processed (including multiple compressed images of the target object at multiple magnifications) and the metadata of the image data file.

[0119] Metadata for an image data file may include data that describes the characteristics / information of the image data within the file. For example, the metadata for an image data file of a target object may include image information for each compressed image.

[0120] The image information of the compressed image may include: the location of the compressed image in the file, the image size of the compressed image (such as the width and height of the image), the magnification information of the compressed image (which may include magnification, magnification order, and other information indicating magnification), and the resolution of the compressed image (which reflects the magnification of the compressed image; the higher the resolution, the higher the magnification).

[0121] In some embodiments, if the multiple compressed images of the target object include multiple image blocks obtained by dividing multiple complete compressed images of the target object at multiple magnifications (i.e., each compressed image is an image block of a complete compressed image, which is also a compressed image of a part of the target object), the image information of the compressed image may further include: indication information of the image region to which the image content of the compressed image belongs.

[0122] The indication information of the image region to which the image content of the compressed image belongs is used to indicate the image region to which the image content of the compressed image belongs. This indication information can be represented by various feasible data. As an example, the indication information includes the coordinate position of the compressed image, which indicates the position of the compressed image within the complete compressed image.

[0123] The image compression method provided in this application embodiment offers multiple methods to recompress the image to be processed, resulting in a recompressed image. The computing device can employ one or more of these methods to recompress the image to be processed.

[0124] In some embodiments, because the computing device does not support the file format for processing or parsing metadata files, it cannot obtain image information of multiple compressed images based on the metadata, and therefore cannot determine that multiple compressed images have image content association among them. When the computing device cannot determine that multiple compressed images have image content association among them, and cannot obtain image content association information between the compressed images, the image to be processed can be recompressed using the following step 322.

[0125] Step 322: Recompress each of the multiple compressed images included in the image to be processed to obtain multiple recompression results of the multiple compressed images, and then obtain the recompression result of the image to be processed based on the multiple recompression results.

[0126] In step 322, the recompression method can be any method that can recompress an already compressed image.

[0127] In some embodiments, when the computing device can determine that multiple compressed images have image content association among multiple compressed images, and obtain image content association information between the compressed images, the computing device can recompress some of the compressed images among the multiple compressed images, and then obtain the recompression result of the image to be processed based on the recompression result of the partial compressed images and the image content association information. The following describes this implementation method in detail through steps 324 to 328.

[0128] Step 324: If the image content of the first compressed image and the second compressed image are determined to be related among multiple compressed images, obtain the image content association information between the first compressed image and the second compressed image.

[0129] Because the image to be processed contains multiple compressed images of the target object at multiple magnification levels, the image content within these compressed images is related, meaning there is a content correlation between them. A content correlation between two compressed images can mean that both the first and second compressed images contain the target object or a region of the target object, but their magnification levels are different, meaning their image quality (e.g., sharpness) differs.

[0130] For ease of description, any set of images with related image content can be referred to as the first compressed image and the second compressed image.

[0131] The first compressed image and the second compressed image have different magnification ratios. The first compressed image is a compressed image of the target object at the first magnification ratio, and the second compressed image is a compressed image of the target object at the second magnification ratio.

[0132] In the embodiments of this application, a set of images with associated image content can be determined through various feasible methods. For example, a first compressed image and a second compressed image with associated image content can be manually identified and determined. Alternatively, a computing device can automatically determine the sets of images with associated image content based on the image information of multiple compressed images.

[0133] The following section details the method by which computing devices automatically determine groups of images that have related image content.

[0134] As mentioned earlier, the computing device can obtain image information of multiple compressed images contained in the image to be processed based on the metadata of the image data file. The image information may include information indicating the magnification of the compressed image, information indicating the image region to which the image content of the compressed image belongs, etc.

[0135] It is understandable that, for cases where each compressed image is a complete target object, the sets of compressed images with related image content can be identified based on the magnification information of the compressed images. For example, taking... Figure 1 Taking compressed images 1, 2, and 3 as examples, compressed image 1 has the largest magnification. Compressed images 2 and 3 are compressed images obtained by downsampling compressed image 1. Based on the magnification indication information, it can be determined that there is an image content association between compressed image 1 and compressed images 2 and 3. Compressed image 1 can be used as the first compressed image, and compressed images 2 and 3 can be used as the second compressed images.

[0136] It can also be understood that, for cases where each compressed image is a compressed region of the target object—that is, each compressed image is an image block—based on the magnification information of the compressed images and the information indicating the image region to which the image content belongs, groups of compressed images with related image content can be identified. For example, taking... Figure 1Taking the image blocks shown as an example, the image region composed of image blocks n1.1~n1.4, n1.9~n1.12, n1.17~n1.20, and n1.25~n1.28 of compressed image 1, the image region composed of image blocks n2.1, n2.2, n2.5, and n2.6 of compressed image 2, and the image region where image block n3.1 of compressed image 3 is located are the same image region. Thus, there is an image content association between image blocks n1.1~n1.4, n1.9~n1.12, n1.17~n1.20, and n1.25~n1.28 of compressed image 1, image blocks n2.1, n2.2, n2.5, and n2.6 of compressed image 2, and image block n3.1 of compressed image 3. Among them, image blocks n1.1 to n1.4, n1.9 to n1.12, n1.17 to n1.20, and n1.25 to n1.28 of compressed image 1 can be used as the first compressed image, and image blocks n2.1, n2.2, n2.5, and n2.6 of compressed image 2 and image block n3.1 of compressed image 3 can be used as the second compressed image.

[0137] In the embodiments of this application, the image content association information between the first compressed image and the second compressed image may include a variety of information, and correspondingly, the image content association information between the first compressed image and the second compressed image can be obtained according to a variety of implementation methods.

[0138] The following describes several methods for obtaining the image content association information between the first compressed image and the second compressed image.

[0139] In the first implementation, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image. The image content association information between the first and second compressed images includes the operation parameters of the target sampling operation. The target sampling operation can be an upsampling operation, a downsampling operation, etc.

[0140] For example, the first compressed image is a compressed image with a high magnification, and the second compressed image is an image with a lower magnification obtained by downsampling the first compressed image. The image content association information between the first compressed image and the second compressed image includes the operation parameters of the downsampling operation.

[0141] For example, the first compressed image is a compressed image with a lower magnification, and the second compressed image is an image with a higher magnification obtained by upsampling the first compressed image. The image content association information between the first compressed image and the second compressed image includes the operation parameters of the upsampling operation.

[0142] In some embodiments, the computing device cannot directly know the operation parameters of the aforementioned target sampling operation, and the computing device can obtain the operation parameters of the target sampling operation by: obtaining at least one candidate sampling operation parameter, searching among the at least one candidate sampling operation parameter to see if the operation parameters of the target sampling operation exist, and if they exist, obtaining the operation parameters of the target sampling operation. (In this embodiment, this process can be referred to as sampling detection.)

[0143] Candidate sampling operation parameters can be any operation parameters that can be used for sampling operations (such as downsampling or upsampling). These candidate parameters may or may not be parameters of the target sampling operation. Candidate sampling operation parameters can be obtained through various methods, such as being generated by computing devices, input by personnel, or retrieved from other storage devices.

[0144] The method of finding whether the target sampling operation parameter exists among at least one candidate sampling operation parameter can be achieved by performing a sampling operation on the first compressed image according to the candidate sampling operation parameter to obtain a candidate sampling image; and determining whether the candidate sampling operation parameter is the target sampling operation parameter based on whether the candidate sampling image matches the second compressed image.

[0145] If the candidate sampled image matches the second compressed image, the candidate sampling operation parameters are determined to be the operation parameters of the target sampling operation. If the candidate sampled image does not match the second compressed image, the candidate sampling operation parameters are determined to be non-operational parameters of the target sampling operation.

[0146] Furthermore, a match between a candidate sampled image and the second compressed image can be defined as two images being identical or having high similarity (e.g., similarity exceeding a similarity threshold). A mismatch between a candidate sampled image and the second compressed image can be defined as two images having low similarity (e.g., similarity below a similarity threshold).

[0147] As an example, the actual target sampling operation parameter is downsampling at a 2.5:1 aspect ratio. The computing device acquired three candidate sampling operation parameters: downsampling at a 2:1 aspect ratio, downsampling at a 3:1 aspect ratio, and downsampling at a 2.5:1 aspect ratio. Based on these three candidate sampling operation parameters, the first compressed image was sampled, resulting in three candidate sampled images: 1, 2, and 3. Among the three candidate sampled images, candidate sampled image 3 showed a high similarity of 95% with the second compressed image, while candidate sampled images 1 and 2 showed a low similarity of 70% with the second compressed image. Therefore, candidate sampled image 3 was determined to match the second compressed image, and the candidate sampling operation parameter "downsampling at a 2.5:1 aspect ratio" corresponding to candidate sampled image 3 was selected as the target sampling operation parameter.

[0148] In some embodiments, the target sampling operation parameters may specifically include the configuration parameters of the sampling operation (e.g., the aforementioned downsampling at a width-to-height ratio of 2.5:1) and the sampling relationship (indicating that the target sampling operation is used to sample a specific first compressed image to obtain a specific second compressed image).

[0149] In some embodiments, if the target sampling operation parameter is not present among at least one candidate sampling operation parameter, it can be considered that the target sampling operation parameter cannot be obtained. In this case, other image content association information can be obtained through a second implementation method for subsequent recompression of the image to be processed. Alternatively, in this case, the recompression of the image to be processed can be performed through step 322 instead of steps 324-328.

[0150] In the second implementation, the image content association information includes the residual of the second compressed image obtained by performing inter-frame prediction on the second compressed image based on the first compressed image.

[0151] The first compressed image and the second compressed image are related in terms of image content, thus the image content of the first compressed image and the image content of the second compressed image are similar. By using the second compressed image as the current frame and the first compressed image as the reference frame, inter-frame prediction can be performed based on the reference frame and the current frame to obtain the predicted pixels of the current frame, and the residual of the current frame (indicating the difference between the current frame and its predicted pixels) can be obtained based on the current frame and the predicted pixels of the current frame.

[0152] Step 326: Recompress the first compressed image to obtain the first recompression result.

[0153] Thus, in step 326, the computing device can recompress the first compressed image, and the resulting recompressed image can be referred to as the first recompressed image. Various feasible recompressing methods can be used, and this embodiment does not limit the specific methods employed.

[0154] Step 328: Obtain the recompression result of the image to be processed based on the image content association information and the first compression result.

[0155] The image content association information between the first compressed image and the second compressed image can indicate how to reconstruct the second compressed image based on the first compressed image. Thus, in the image compression method provided in this embodiment, the second compressed image may not need to be recompressed; for example, the computing device can delete the second compressed image from the image to be processed. In step 328, the recompression result of the image to be processed may not include the image data of the second compressed image.

[0156] In step 328, the recompression result of the image to be processed includes the first recompression result and image content association information. Furthermore, the recompression result of the image to be processed can be obtained based on the image content association information and the first recompression result in various ways.

[0157] When the image content association information is the operation parameters of the target sampling operation, the operation parameters of the target sampling operation and the first compression result can be directly used as the recompression result of the image to be processed. For example, the operation parameters of the target sampling operation can be used as metadata and together with the first compression result as the recompression result of the image to be processed.

[0158] If the image content association information is the residual of the aforementioned second compressed image, the residual of the second compressed image can also be recompressed along with the first compressed image to obtain the compression result of the residual. Furthermore, the compression result of the residual and the first recompression result can be used together as the recompression result of the image to be processed.

[0159] In some embodiments, where the image to be processed is stored in an image data file, and the image data file may include metadata in addition to the image to be processed: the computing device may also compress the metadata of the image data file (which may be referred to as the data file to be processed) to obtain a compression result of the metadata, and obtain a compression result of the image data file based on the recompression result of the image to be processed and the compression result of the metadata.

[0160] In some embodiments, an image data file may include multiple copies of the same metadata, such as multiple copies of the metadata. The computing device may also delete (this deletion may be referred to as deduplication) multiple copies of the same metadata, leaving only one copy for recompression.

[0161] In conclusion, it can be seen that through Figure 3 The provided image compression method produces a recompressed image that excludes the data from the second compressed image, resulting in a significantly reduced data size compared to the original compressed image, thus saving more storage resources. Furthermore, Figure 3 The provided image compression method eliminates the need for recompression of the second compressed image, reducing the amount of computation, saving computing resources, and improving the processing speed of recompression. Furthermore, through... Figure 3 The provided image compression method can make full use of the content association information between multiple compressed images, and improve the compression ratio of recompression. For example, it can improve the compression ratio of recompression from 1.2:1 in the existing scheme to 2:1.

[0162] Figure 4 This is a schematic flowchart of the image decompression method provided in the embodiments of this application. Figure 4The method shown can be performed by a computing device or a processing device. For example, it can be performed by the image compression device 220 in the image processing system 200.

[0163] Figure 4 The provided image decompression method can be used to... Figure 3 The recompressed result obtained by the provided image compression method is decoded (or decompressed) to reconstruct multiple compressed images (including the first compressed image and the second compressed image) at multiple magnifications.

[0164] like Figure 4 As shown, the image decompression method provided in this application embodiment may include the following steps:

[0165] Step 410: Obtain the recompression results of multiple compressed images of the target object at multiple magnifications.

[0166] In step 410, the obtained recompression result includes the first recompression result obtained by recompressing the first compressed image and the image content association information between the first compressed image and the second compressed image.

[0167] In some embodiments, a computing device may obtain the recompression result of an image data file, which may include the recompression result of multiple compressed images and the compression result of metadata.

[0168] Step 420: Decompress the first compression result to obtain the reconstructed first compressed image.

[0169] In step 420, the first compression result can be decompressed using a decompression method corresponding to the recompression method used in step 326 to obtain the reconstructed first compressed image.

[0170] Step 430: Generate a reconstructed second compressed image based on the image content association information and the reconstructed first compressed image.

[0171] Image content association information can be used to indicate how to reconstruct a second compressed image from a first compressed image. Thus, the computing device can generate a reconstructed compressed image based on the image content association information and the reconstructed first compressed image. The specific method for generating the reconstructed compressed image is described below.

[0172] As mentioned earlier, in some implementations, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation. In this case, the reconstructed first compressed image can be sampled according to the operation parameters of the target sampling operation to obtain the reconstructed second compressed image.

[0173] As mentioned earlier, in some implementations, the image content association information includes the residual of the second compressed image obtained by performing inter-frame prediction on the second compressed image based on the first compressed image. In this case, the predicted pixels of the second compressed image can be obtained from the reconstructed first compressed image, and the reconstructed second compressed image can be obtained from the predicted pixels of the second compressed image and the residual of the second compressed image.

[0174] Step 440: Obtain multiple reconstructed compressed images based on the reconstructed first compressed image and the reconstructed second compressed image.

[0175] After generating the first and second reconstructed compressed images, multiple reconstructed compressed images of multiple compressed images can be obtained. In this way, multiple compressed images of the desired target object at multiple magnifications are successfully decompressed.

[0176] It is understood that, in order to achieve the functions in the above embodiments, the computing device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0177] The above text combines Figures 3 to 4 The present application describes in detail the data encoding method and data decoding method provided according to the embodiments of this application. The following will be combined with... Figure 5 and Figure 6 This application describes the apparatus provided according to the present application. These apparatuses can be used to implement the functions of the processor in the above method embodiments, and thus can also achieve the beneficial effects of the above method embodiments.

[0178] This application also provides an image compression apparatus 500, such as... Figure 5 As shown, it includes an image acquisition module 510 and a recompression module 520.

[0179] The image acquisition module 510 is used to acquire the image to be processed, which includes multiple compressed images of the target object at multiple magnifications.

[0180] The recompression module 520 is used to obtain image content association information between the first compressed image and the second compressed image when the image content association between the first compressed image and the second compressed image among multiple compressed images is determined. The first compressed image is a compressed image of the target object at a first magnification, and the second compressed image is a compressed image of the target object at a second magnification. The recompression module 520 is also used to recompress the first compressed image to obtain a first recompression result. Furthermore, the recompression module 520 is also used to obtain a recompression result of the image to be processed based on the image content association information and the first recompression result.

[0181] In some possible implementations, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

[0182] In some other possible implementations, the recompression module 520 is also used to: acquire at least one candidate sampling operation parameter, and search among the at least one candidate sampling operation parameter to find whether the target sampling operation parameter exists, and acquire the target sampling operation parameter if it exists.

[0183] In some other possible implementations, the recompression module 520 is also used to: perform a sampling operation on the first compressed image according to the candidate sampling operation parameters to obtain a candidate sampled image; and determine whether the candidate sampling operation parameters are the operation parameters of the target sampling operation based on whether the candidate sampled image matches the second compressed image.

[0184] In some other possible implementations, the image content association information includes the residual of the second compressed image obtained by inter-frame prediction of the second compressed image based on the first compressed image.

[0185] In some other possible implementations, the image acquisition module 510 is also used to acquire an image data file, which includes the image to be processed and the metadata of the image data file, and to obtain the image to be processed based on the image data file.

[0186] In some other possible implementations, each of the multiple compressed images is a compressed image of a portion of the target object. The image information of the compressed image may include information indicating the magnification of the compressed image and information indicating the image region to which the image content of the compressed image belongs.

[0187] In some other possible implementations, the recompression module 520 is also used to: recompress the multiple compressed images to obtain the recompression result of the image to be processed when it is not possible to determine that there is a first compressed image and a second compressed image with image content association among the multiple compressed images.

[0188] In some other possible implementations, where the image to be processed is included in an image data file, and the image data file includes metadata of the image to be processed and the image data file, the recompression module 520 is further configured to: compress the metadata to obtain a compressed result of the metadata; and, based on the recompression result of the image to be processed and the compressed result of the metadata, obtain a compressed result of the image data file.

[0189] For more details on the operations performed by the image acquisition module 510 and the recompression module 520, please refer to [link to relevant documentation]. Figure 3 And its related descriptions.

[0190] This application also provides an image decompression apparatus 600, such as... Figure 6 As shown, it includes a communication module 610 and a decompression module 620.

[0191] The communication module 610 is used to acquire the recompression results of multiple compressed images of the target object at multiple magnifications. The multiple compressed images include a first compressed image of the target object at a first magnification and a second compressed image of the target object at a second magnification. The image content of the first compressed image and the second compressed image are associated. The recompression result includes a first recompression result obtained by recompressing the first compressed image and image content association information between the first compressed image and the second compressed image.

[0192] The decompression module 620 is used to decompress the first compression result to obtain the reconstructed first compressed image. The decompression module 620 is also used to generate a reconstructed second compressed image based on image content association information and the reconstructed first compressed image. The decompression module 620 is further used to obtain multiple reconstructed compressed images of multiple compressed images based on the reconstructed first compressed image and the reconstructed second compressed image.

[0193] In some possible implementations, the second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

[0194] In some other possible implementations, the decompression module 620 is also used to: perform a sampling operation on the reconstructed first compressed image according to the operation parameters of the target sampling operation to obtain a reconstructed second compressed image.

[0195] In some other possible implementations, the image content association information includes the residual of the second compressed image obtained by inter-frame prediction of the second compressed image based on the first compressed image.

[0196] In some other possible implementations, the decompression module 620 is also used to: obtain the predicted pixels of the second compressed image based on the reconstructed first compressed image, and obtain the reconstructed second compressed image based on the predicted pixels of the second compressed image and the residual of the second compressed image.

[0197] For more details on the operations performed by the communication module 610 and the decompression module 620, please refer to [link to relevant documentation]. Figure 4 And its related descriptions.

[0198] Optionally, the image acquisition module 510 and the recompression module 520 may each include multiple sub-modules, which can be deployed separately to implement some of the functions of the corresponding module, such as implementing the aforementioned... Figure 3 The image compression method shown includes one or more steps. Furthermore, the communication module 610 and decompression module 620 may each include multiple sub-modules, which can be deployed separately to implement certain functions of their respective modules, such as implementing the aforementioned... Figure 4 One or more steps in the image decompression method shown.

[0199] The image acquisition module 510, recompression module 520, communication module 610, and decompression module 620 can all be implemented in software or hardware. For example, the implementation of the image acquisition module 510 will be described below. The implementation of the recompression module 520, communication module 610, and decompression module 620 is similar to that of the image acquisition module 510.

[0200] As an example of a software functional unit, the image acquisition module 510 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Furthermore, the aforementioned computing instance may be one or more. For example, module A may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.

[0201] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0202] As an example of a hardware functional unit, the image acquisition module 510 may include at least one computing device, such as a server. Alternatively, module A may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.

[0203] The image acquisition module 510 includes multiple computing devices that can be distributed in the same region or in different regions. Similarly, the multiple computing devices in module A can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices in module A can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0204] It should be noted that, in other embodiments, the image acquisition module 510 and the recompression module 520 can be used to perform the functions described in the embodiments of this application. Figure 3 The steps in the image compression method, and the steps implemented by the image acquisition module 510 and the recompression module 520, can be specified as needed. The image acquisition module 510 and the recompression module 520 respectively implement different steps in the image compression method provided in this application embodiment to achieve all the functions of the image compression device. Similarly, the communication module 610 and the decompression module 620 can be used to perform the functions described in the embodiments of this application. Figure 4The steps in the image decompression method, and the steps implemented by the communication module 610 and the decompression module 620, can be specified as needed. The communication module 610 and the decompression module 620 respectively implement different steps in the image decompression method provided in this application embodiment to realize all the functions of the image compression device.

[0205] This application also provides a computing device 700. The computing device 700 can be used to implement the image compression device and image decompression device in the embodiments of this application.

[0206] like Figure 7 As shown, the computing device 700 includes a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. The computing device 700 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 700.

[0207] The 702 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus 702 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 702 may include a path for transmitting information between various components of the computing device 700 (e.g., memory 706, processor 704, communication interface 708).

[0208] Processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0209] The memory 706 may include volatile memory, such as random access memory (RAM). The processor 104 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0210] The memory 706 stores executable program code, and the processor 704 executes the executable program code to implement the functions of the aforementioned image acquisition module 510 and recompression module 520, thereby achieving the functionality described in the embodiments of this application. Figure 3 The image compression method described above may also implement the functions of the communication module 610 and the decompression module 620 respectively, thereby achieving the results described in the embodiments of this application. Figure 4 The image decompression method described above. That is, the memory 706 stores information for performing the method described in the embodiments of this application. Figure 3 The image compression method mentioned above, or Figure 4 The instructions for the image decompression method.

[0211] Alternatively, the memory 706 stores executable code, and the processor 704 executes the executable code to implement the functions of the aforementioned image compression device, or image compression apparatus, or image compression apparatus, thereby implementing the image compression method, or image compression method, or image compression method. That is, the memory 706 stores code for executing the functions described in the embodiments of this application. Figure 3 The image compression method mentioned above, or Figure 4 The instructions for the image decompression method.

[0212] The communication interface 708 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks.

[0213] This application also provides a computer program product containing instructions, which may be a software or program product containing instructions capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform the actions described in the embodiments of this application. Figure 3 The image compression method mentioned above, or Figure 4 The image decompression method described above.

[0214] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to perform the actions described in the embodiments of this application. Figure 3 The image compression method mentioned above, or Figure 4 The image decompression method described above.

[0215] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

[0216] The terms “first,” “second,” “third,” and “fourth,” etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to define a specific order.

[0217] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

Claims

1. An image compression method, characterized in that, The method includes: Acquire an image to be processed, which includes multiple compressed images of the target object at multiple magnifications; If the image content of the first compressed image and the second compressed image among the plurality of compressed images is determined to be related, the image content association information between the first compressed image and the second compressed image is obtained, wherein the first compressed image is the compressed image of the target object at a first magnification, and the second compressed image is the compressed image of the target object at a second magnification; The first compressed image is recompressed to obtain the first compression result; The recompression result of the image to be processed is obtained based on the image content association information and the first recompression result.

2. The method according to claim 1, characterized in that, The second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

3. The method according to claim 2, characterized in that, The step of obtaining the image content association information between the first compressed image and the second compressed image includes: Obtain at least one candidate sampling operation parameter; The system searches among the at least one candidate sampling operation parameters to determine if the target sampling operation parameter exists, and if it does, obtains the target sampling operation parameter.

4. The method according to claim 3, characterized in that, The step of searching for the existence of the target sampling operation parameter among the at least one candidate sampling operation parameters includes: The first compressed image is sampled according to the candidate sampling operation parameters to obtain a candidate sampled image; Based on whether the candidate sampled image matches the second compressed image, it is determined whether the candidate sampling operation parameters are the operation parameters of the target sampling operation.

5. The method according to any one of claims 1-4, characterized in that, The image content association information includes the residual of the second compressed image obtained by performing inter-frame prediction on the second compressed image based on the first compressed image.

6. The method according to any one of claims 1-5, characterized in that, The acquisition of the image to be processed includes: Obtain an image data file, wherein the image data file includes the image to be processed and the metadata of the image data file; The image to be processed is obtained from the image data file; The method further includes: The metadata is obtained from the image data file; Based on the metadata, obtain the image information of the multiple compressed images contained in the image to be processed; Based on the image information of the plurality of compressed images, the image content association between the first compressed image and the second compressed image among the plurality of compressed images is determined.

7. The method according to claim 6, characterized in that, Each of the plurality of compressed images is a compressed image of a portion of the target object; The image information of the compressed image includes an indication of the magnification of the compressed image and an indication of the image region to which the image content of the compressed image belongs.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: If it is not possible to determine whether there is a first compressed image and a second compressed image with image content association among the plurality of compressed images, the plurality of compressed images are recompressed to obtain the recompressed image to be processed.

9. The method according to any one of claims 1-8, characterized in that, The image to be processed is included in an image data file, the image data file including metadata of the image to be processed and the image data file, and the method further includes: The metadata is compressed to obtain the compressed metadata result; The compression result of the image data file is obtained based on the recompression result of the image to be processed and the compression result of the metadata.

10. An image decompression method, characterized in that, The method includes: The recompression results of multiple compressed images of a target object at multiple magnifications are obtained. The multiple compressed images include a first compressed image of the target object at a first magnification and a second compressed image of the target object at a second magnification. The image content of the first compressed image and the second compressed image are associated. The recompression result includes a first recompression result obtained by recompressing the first compressed image and image content association information between the first compressed image and the second compressed image. Decompress the first compression result to obtain the reconstructed first compressed image; Based on the image content association information and the reconstructed first compressed image, a reconstructed second compressed image is generated; Multiple reconstructed compressed images are obtained from the reconstructed first compressed image and the reconstructed second compressed image.

11. The method according to claim 10, characterized in that, The second compressed image is an image obtained by performing a target sampling operation on the first compressed image, and the image content association information includes the operation parameters of the target sampling operation.

12. The method according to claim 11, characterized in that, The step of generating a reconstructed second compressed image based on the image content association information and the reconstructed first compressed image includes: The reconstructed first compressed image is sampled according to the operation parameters of the target sampling operation to obtain the reconstructed second compressed image.

13. The method according to claim 10, characterized in that, The image content association information includes the residual of the second compressed image obtained by performing inter-frame prediction on the second compressed image based on the first compressed image.

14. The method according to claim 13, characterized in that, The step of generating a reconstructed second compressed image based on the image content association information and the reconstructed first compressed image includes: The predicted pixels of the second compressed image are obtained based on the reconstructed first compressed image; The reconstructed second compressed image is obtained based on the predicted pixels of the second compressed image and the residual of the second compressed image.

15. An image compression device, characterized in that, The image compression device includes an image acquisition module and a recompression module; The image acquisition module is used to acquire the image to be processed, which includes multiple compressed images of the target object at multiple magnifications. The recompression module is used to obtain image content association information between the first compressed image and the second compressed image when it is determined that the image content of the first compressed image and the second compressed image are associated. The first compressed image is the compressed image of the target object at a first magnification, and the second compressed image is the compressed image of the target object at a second magnification. The recompression module is also used to recompress the first compressed image to obtain a first recompression result; The recompression module is also used to obtain the recompression result of the image to be processed based on the image content association information and the first recompression result.

16. An image decompression device, characterized in that, The image decompression device includes a communication module and a decompression module; The communication module is used to obtain the recompression results of multiple compressed images of the target object at multiple magnifications. The multiple compressed images include a first compressed image of the target object at a first magnification and a second compressed image of the target object at a second magnification. The image content of the first compressed image and the second compressed image are associated. The recompression result includes a first recompression result obtained by recompressing the first compressed image and image content association information between the first compressed image and the second compressed image. The decompression module is used to decompress the first compression result to obtain the reconstructed first compressed image; The decompression module is also used to generate a reconstructed second compressed image based on the image content association information and the reconstructed first compressed image; The decompression module is also used to obtain multiple reconstructed compressed images of the multiple compressed images based on the reconstructed first compressed image and the reconstructed second compressed image.

17. A compression device, characterized in that, The compression device includes at least one processor and a memory, wherein the memory is used to store a computer program such that when the computer program is executed by the at least one processor, it implements the method as described in any one of claims 1-9.

18. A decompression device, characterized in that, The decompression device includes at least one processor and a memory, wherein the memory is used to store a computer program such that when the computer program is executed by the at least one processor, it implements the method as described in any one of claims 10-14.

19. A computer program product containing instructions, characterized in that, When the instructions are executed by a computer device, the computer device performs the method as described in any one of claims 1-9 or the method as described in any one of claims 10-14.

20. A computer-readable storage medium, characterized in that, The storage medium includes computer program instructions, which, when executed by a computing device, perform the method as described in any one of claims 1-9 or the method as described in any one of claims 10-14.