Medical image compression method and decoding method

文档序号:664102 发布日期:2021-04-27 浏览:23次 中文

阅读说明:本技术 一种医学图像压缩方法及解码方法 (Medical image compression method and decoding method ) 是由 袁梦兮 李�根 黄利磊 徐霞丽 黄文静 冯博伦 毛海波 黄能超 于 2020-12-25 设计创作,主要内容包括:本发明公开了一种医学图像压缩方法及解码方法,该压缩方法的步骤包括:步骤S101:对原始图像进行第一次压缩处理;步骤S102:获取原始图像在压缩处理过程中的损失图像;步骤S103:依据所述原始图像,对损失图像进行恢复,形成恢复图像;步骤S104:将所述恢复图像及步骤S101中第一次压缩处理后的图像合并构成图像压缩文件。该解码方法是用来对上述压缩后的图像进行解码。本发明具有可有效提升压缩率、提高图像保真率、进而提高医学图像分析精确性等优点。(The invention discloses a medical image compression method and a decoding method, wherein the compression method comprises the following steps: step S101: performing first compression processing on an original image; step S102: obtaining a loss image of an original image in a compression processing process; step S103: restoring the lost image according to the original image to form a restored image; step S104: and combining the recovered image and the image subjected to the first compression processing in the step S101 to form an image compressed file. The decoding method is used for decoding the compressed image. The invention has the advantages of effectively improving the compression ratio, improving the image fidelity ratio, further improving the accuracy of medical image analysis and the like.)

1. A method of medical image compression, the steps comprising:

step S101: performing first compression processing on an original image;

step S102: obtaining a loss image of an original image in a compression processing process;

step S103: restoring the lost image according to the original image to form a restored image;

step S104: and combining the recovered image and the image subjected to the first compression processing in the step S101 to form an image compressed file.

2. The medical image compression method according to claim 1, wherein the step S101 includes: and processing the original image org by using a compression algorithm alg0 to obtain a code stream bin0, and decoding and recovering the code stream bin0 to obtain a reconstructed image rec.

3. The medical image compression method according to claim 2, wherein the step S102 includes: subtracting the reconstructed image rec from the original image org yields the loss image res of the compression algorithm alg 0.

4. A medical image compression method according to claim 3, wherein the step S103 includes:

step S1031: analyzing an original image org, and processing the loss image res according to a set loss principle to obtain a recovered image res 2;

step S1032: and compressing the recovered image res2 by using a lossless compression algorithm alg2 to obtain a coded stream bin 2.

5. The medical image compression method according to claim 4, wherein the step S104 comprises: and combining the alg0 and alg2 flags with the coded stream bin0 and bin2 to obtain a coded stream bin, wherein the coded stream bin is a final compression result.

6. A medical image compression method according to any one of claims 1-5, wherein in step S101, the compression process is completed by processing the original image with an image smoothing compression algorithm.

7. A medical image compression method according to claim 4 or 5, wherein the loss principle is:

(1) finding out a key image area according to the requirements of the medical image, and completely reserving the lost image pixel value of the key image;

(2) and when the absolute value of the pixel of the lost image in other areas is larger than a preset threshold value, keeping the pixel value of the lost image.

8. An image decoding method according to any one of claims 1 to 7, comprising the steps of:

step S201: when decoding, respectively reading the code streams of the restored image and the image after the first compression processing from the image compressed file;

step S202: respectively decoding the restored image and the image subjected to the first compression processing;

step S203: and analyzing and synthesizing the recovery image and the image subjected to the first compression processing to obtain a final decoded image.

9. The image decoding method of claim 8, wherein the step S201 comprises reading alg0, alg2, bin0 and bin2 in a coded stream bin of the image compressed file.

10. The image decoding method according to claim 9, wherein the decoding of the bin0 with the alg0 in the step S202 results in a lost image rec, and the decoding of the bin2 with the alg2 results in a restored image res 2; in step S203, the final decoded image dec can be obtained by adding the lost image rec to the restored image res 2.

Technical Field

The invention mainly relates to the technical field of medical image processing, in particular to a medical image compression method and a medical image decoding method.

Background

Modern medicine often uses various medical images in the diagnosis process, but when the medical images are analyzed, the requirements on the authenticity and the accuracy of the images are extremely high, and the change of a few pixels in the images can directly influence the analysis result.

At present, the compression of medical images usually adopts a lossless compression algorithm, and the compression rate is low, so that the transmission and storage cost of the images is high. In the mainstream image smooth compression algorithm in the traditional technology, due to the adoption of compression technologies such as DCT and quantization, the distortion condition of a pixel value cannot be estimated, and the analysis result is influenced.

Disclosure of Invention

The technical problem to be solved by the invention is as follows: aiming at the technical problems in the prior art, the invention provides a medical image compression method and a decoding method which can effectively improve the compression ratio, improve the image fidelity ratio and further improve the medical image analysis accuracy.

In order to solve the technical problems, the invention adopts the following technical scheme:

a method of medical image compression, the steps comprising:

step S101: performing first compression processing on an original image;

step S102: obtaining a loss image of an original image in a compression processing process;

step S103: restoring the lost image according to the original image to form a restored image;

step S104: and combining the recovered image and the image subjected to the first compression processing in the step S101 to form an image compressed file.

As a further improvement of the compression method of the present invention: the step S101 includes: and processing the original image org by using a compression algorithm alg0 to obtain a code stream bin0, and decoding and recovering the code stream bin0 to obtain a reconstructed image rec.

As a further improvement of the compression method of the present invention: the step S102 includes: subtracting the reconstructed image rec from the original image org yields the loss image res of the compression algorithm alg 0.

As a further improvement of the compression method of the present invention: the step S103 includes:

step S1031: analyzing an original image org, and processing the loss image res according to a set loss principle to obtain a recovered image res 2;

step S1032: and compressing the recovered image res2 by using a lossless compression algorithm alg2 to obtain a coded stream bin 2.

As a further improvement of the compression method of the present invention: the step S104 includes: and combining the alg0 and alg2 flags with the coded stream bin0 and bin2 to obtain a coded stream bin, wherein the coded stream bin is a final compression result.

As a further improvement of the compression method of the present invention: in step S101, an image smoothing compression algorithm is used to process the original image, thereby completing the compression process.

As a further improvement of the compression method of the present invention: the loss principle is as follows:

(1) finding out a key image area according to the requirements of the medical image, and completely reserving the lost image pixel value of the key image;

(2) and when the absolute value of the pixel of the lost image in other areas is larger than a preset threshold value, keeping the pixel value of the lost image.

The invention further provides an image decoding method based on the image compression method, which comprises the following steps:

step S201: when decoding, respectively reading the code streams of the restored image and the image after the first compression processing from the image compressed file;

step S202: respectively decoding the restored image and the image subjected to the first compression processing;

step S203: and analyzing and synthesizing the recovery image and the image subjected to the first compression processing to obtain a final decoded image.

As a further improvement of the decoding method of the present invention: the step S201 includes reading alg0, alg2 and bin0, bin2 in the code stream bin of the image compression file.

As a further improvement of the decoding method of the present invention: in the step S202, decoding the bin0 with the alg0 to obtain a loss image rec, and decoding the bin2 with the alg2 to obtain a recovery image res 2; in the step S203, the final decoded image dec can be obtained by adding the lost image rec to the restored image res2

Compared with the prior art, the invention has the advantages that: the medical image compression method and the decoding method of the invention adopt the integral scheme of the image smooth compression algorithm and the lossless compression to recover the compressed image and calculate the loss, then combine the compression and the analysis synthesis, and reasonably adjust the image quality according to the loss principle, thereby effectively improving the compression ratio, improving the image fidelity ratio and further improving the accuracy of medical image analysis.

Drawings

FIG. 1 is a schematic flow diagram of the compression method of the present invention.

FIG. 2 is a flow chart of compression in a specific application example of the present invention.

Fig. 3 is a flow chart of the decoding method of the present invention.

Fig. 4 is a flow chart of decoding in a specific application example of the invention.

FIG. 5 is a graph showing the results of experiment 1 in the specific application example of the present invention.

FIG. 6 is a graph showing the results of experiment 2 in the specific application example of the present invention.

Detailed Description

The invention will be described in further detail below with reference to the drawings and specific examples.

As shown in fig. 1, a medical image compression method of the present invention includes the steps of:

step S101: compressing the original image;

step S102: obtaining a loss image of an original image in a compression processing process;

step S103: restoring the lost image according to the original image to form a restored image;

step S104: and merging and compressing the restored image and the image compressed in the step S101 to form an image compression result.

Referring to fig. 2, in a specific application example, in step S101, according to actual needs, an image smoothing compression algorithm may be used to process an original image, and complete a first compression process. It is understood that in other embodiments, the original image may be compressed for the first time in other manners, and this is also within the scope of the present invention.

Taking the example of processing the original image by using the image smoothing compression algorithm, in a specific application example, the step S101 may include: processing an original image org by using an image smoothing compression algorithm alg0 to obtain a code stream bin0, and decoding and recovering the code stream bin0 to obtain a reconstructed image rec;

in a specific application example, the step S102 may include: subtracting the reconstructed image rec from the original image org yields the loss image res of the compression algorithm alg 0.

In a specific application example, the step S103 may include:

step S1031: analyzing an original image org, and processing the loss image res according to a set loss principle to obtain a recovered image res 2;

step S1032: and compressing the recovered image res2 by using a lossless compression algorithm alg2 to obtain a coded stream bin 2.

In a specific application example, the step S104 includes: and combining the alg0 and alg2 flags with the coded stream bin0 and bin2 to obtain a coded stream bin, wherein the coded stream bin is a final compression result.

As shown in fig. 3, the present invention further provides a medical image decoding method, which comprises the steps of:

step S201: when decoding, respectively reading the code streams of the restored image and the image after the first compression processing from the image compressed file;

step S202: respectively decoding the restored image and the image subjected to the first compression processing;

step S203: and analyzing and synthesizing the recovery image and the image subjected to the first compression processing to obtain a final decoded image.

Referring to fig. 4, in a specific application example, the step S201 includes reading alg0, alg2, bin0 and bin2 in the code stream bin of the image compression file.

In a specific application example, in the step S202, the bin0 is decoded by the alg0 to obtain a loss image rec, and the bin2 is decoded by the alg2 to obtain a recovery image res 2.

In a specific application example, the final decoded image dec can be obtained by adding the lost image rec to the restored image res2 in step S203.

Thus, the decoded image dec obtained as described above can satisfy the loss rule set.

In a specific application example, the loss principle is as follows:

(1) finding out a key image area according to the requirements of the medical image, and completely reserving the lost image pixel value of the key image;

(2) and when the absolute value of the pixel of the lost image in other areas is larger than a certain threshold value, the pixel value of the lost image is reserved.

The invention performs compression and decoding processing on medical images in specific experiments, and refers to two specific application examples of fig. 5 and 6. In the figure, the result is the original org in the upper left corner and the decompressed dec in the upper right corner. The lower left corner "diff > 0" is an image with pixel difference value greater than 0, white represents difference value greater than 0, and black represents difference value 0; the lower right corner "diff > 2" is an image with pixel difference value greater than 2, white represents difference value greater than 2, and black represents difference value less than or equal to 2. Therefore, the difference value of the chromosome and the periphery thereof in the result is 0, and the lossless compression of the region of interest is ensured. Meanwhile, the image with the disparity value larger than 2 has no white area, which proves that other area compression is limited to an extremely small value.

The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above-mentioned embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may be made by those skilled in the art without departing from the principle of the invention.

11页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种直播业务处理方法和装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类