CN110351559B - Image coding method and device - Google Patents

Image coding method and device Download PDF

Info

Publication number
CN110351559B
CN110351559B CN201810295369.8A CN201810295369A CN110351559B CN 110351559 B CN110351559 B CN 110351559B CN 201810295369 A CN201810295369 A CN 201810295369A CN 110351559 B CN110351559 B CN 110351559B
Authority
CN
China
Prior art keywords
coefficient
bit
value
coding
digit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810295369.8A
Other languages
Chinese (zh)
Other versions
CN110351559A (en
Inventor
赵炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Health Information Technology Ltd
Original Assignee
Alibaba Health Information Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Health Information Technology Ltd filed Critical Alibaba Health Information Technology Ltd
Priority to CN202111499180.9A priority Critical patent/CN114374840B/en
Priority to CN201810295369.8A priority patent/CN110351559B/en
Publication of CN110351559A publication Critical patent/CN110351559A/en
Application granted granted Critical
Publication of CN110351559B publication Critical patent/CN110351559B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets

Abstract

The embodiment of the application discloses an image coding method and device. The method comprises the following steps: obtaining the value and the importance state information of the serial number to be coded in the bit plane; updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state; and sending the message of converting the importance state information of the coefficient digit from the non-important state to the neighbor coefficient digit of the coefficient digit. By using the embodiment of the application, the coding efficiency of T1 layer coding in EBCOT can be improved, and the picture compression efficiency of JPEG2000 can be improved.

Description

Image coding method and device
Technology neighborhood
The present invention relates to image compression technologies, and in particular, to an image encoding method and apparatus.
Background
With the rapid development of multimedia technology and networks, people put higher demands on the quality, size and application of digital images, and hope that high-quality images can be stored and spread by using limited space and bandwidth resources. This requires that the image compression technique not only have good compression efficiency, but also ensure that the image can be restored to the original image with high quality after decompression.
In some application neighborhoods, lossless compression of images is required. Particularly in the medical community, modern medical science and technology has now widely penetrated into various segments of medicine, and computer and information technology has become key factors in reducing costs, improving efficiency, and providing patients with superior care. A large number of digital medical imaging devices are continuously used in medical clinics, such as Computed Tomography (CT), Magnetic Resonance Imaging (MRI), computed radiography, digital radiography, and so on. Medical images generated by medical imaging equipment are high in resolution, and files occupy a large storage space. However, due to the particularity of medical images, only a lossless compression mode can be adopted, so that the performance of the image compression algorithm has important significance for storage, transmission, application and the like of the medical images. Similar application neighborhoods also comprise lossless compression of satellite remote sensing images, cultural relic images and other images with special requirements.
The currently common lossless compression mode mainly comprises a JPEG2000 algorithm, and the JPEG2000 algorithm is widely applied by the high rate distortion performance and the high subjective image quality. However, due to some links of the JPEG2000 algorithm, the compression process, especially the lossless compression process, takes a long time, and the compression efficiency is low.
Therefore, there is a need in the art for an improved method for JPEG2000 algorithm to improve the compression efficiency of image compression.
Disclosure of Invention
An object of the embodiments of the present application is to provide an image encoding method and apparatus, which can improve encoding efficiency of T1 layer encoding in EBCOT and improve picture compression efficiency of JPEG 2000.
The image coding method and the image coding device provided by the embodiment of the application are specifically realized as follows:
an image encoding method, used in a bit-plane encoding process, comprising:
acquiring the numerical value and the importance state information of a coefficient bit to be coded;
updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state;
and sending the message of converting the importance state information of the coefficient digit from the non-important state to the neighbor coefficient digit of the coefficient digit.
An image encoding method, used in a bit-plane encoding process, comprising:
in a first encoding process of a bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
An image encoding apparatus, for use in a bitplane encoding process, comprising a processor and a memory for storing processor-executable instructions, the processor when executing the instructions implementing:
obtaining the value and the importance state information of the serial number to be coded in the bit plane;
updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state;
and sending the message of converting the importance state information of the coefficient digit from the non-important state to the neighbor coefficient digit of the coefficient digit.
An image encoding apparatus, for use in a bitplane encoding process, comprising a processor and a memory for storing processor-executable instructions, the processor when executing the instructions implementing:
in a first encoding process of a bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
A medical image compression method, comprising:
acquiring a medical image to be compressed;
processing the medical image, including:
acquiring the numerical value and the importance state information of a coefficient bit to be coded; updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state; sending the information of the importance state of the coefficient digit converted from the non-important state to the neighbor coefficient digit of the coefficient digit;
and outputting the compressed image.
The image coding method and the image coding device can actively synchronize the information of the change of the importance state information of the coefficient bits in the bit plane to the adjacent domain coefficient bits of the coefficient bits. Therefore, when the adjacent domain coefficient digit of the coefficient digit is coded, the importance state information of the adjacent domain coefficient digit can be rapidly known under the condition that the importance state information of the adjacent domain coefficient digit does not need to be polled, the time for coding each coefficient digit can be shortened, and the coding efficiency is improved. Further, the coding efficiency of the T1 layer coding in EBCOT can be improved, and the picture compression efficiency of JPEG2000 can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow chart of image compression using JPEG2000 standard in the prior art;
FIG. 2 is a schematic flow chart of bit-plane scanning in EBCOT;
FIG. 3 is a flow chart illustrating an embodiment of an image encoding method provided herein;
FIG. 4 is a diagram illustrating the correspondence between the number of zero-connected series in the bit plane and the probability thereof in the medical image provided by the present application;
FIG. 5 is a schematic diagram of the present application for encoding the number of zero-connected coefficient columns by using the image encoding method of the present application;
fig. 6 is a schematic block diagram of an image encoding apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions in the present application better understood by those in the technical field of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments of the present application. All other embodiments that can be obtained by a person of ordinary skill in the art without any creative effort based on the embodiments in the present application shall fall within the protection scope of the present application.
The application is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In order to facilitate the technical solutions provided by the embodiments of the present application for understanding by technicians in this neighborhood, a technical environment for implementing the technical solutions is described below.
Fig. 1 is a schematic flow chart of encoding an original image in the JPEG2000 standard, and as shown in fig. 1, in the encoding process, first, the original image data may be subjected to preprocessing, and then, the preprocessed image data may be subjected to discrete wavelet transform, and discrete wavelet coefficients may be generated. The discrete wavelet coefficients may then be quantized, and the quantized discrete wavelet coefficients may be divided into small code block units, which may be independently embedded encoded. In the Embedded Coding method, the optimized Embedded Block Coding with Optimization termination (EBCOT) not only has good compression effect, but also the generated code rate has the excellent characteristics of resolution scalability, quality scalability, random access and processing, and the like. The above excellent characteristics make EBCOT a codec engine in the JPEG2000 standard, which is also a core algorithm in the JPEG2000 standard.
As shown in fig. 1, the EBCOT may include two layers of coding, a first layer of coding (Tier 1, T1) for block coding and a second layer of coding (Tier 2, T2) for hierarchical assembly. As can be seen from the above, after performing discrete wavelet transform on the original image data, several subband coefficients are generated. Then, the subband coefficients are also quantized, and the quantized subband coefficients are divided into small code block units. In the first layer coding, the small code block units may be binary layered, and all wavelet coefficients on each bit plane may be sequentially coded from the most significant bit plane, and the specific coding manner may refer to the following description, and is not described herein again. In the first layer of coding, three-channel plane scanning, bit plane coding, arithmetic coding and other steps are mainly included, and each wavelet coefficient bit can only go through one of the steps. In the second layer encoding, the data stream generated by the previous first layer encoding may be reorganized to satisfy the JPEG2000 standard output. And (3) according to a rate-distortion optimization principle, properly intercepting the compression tail streams of all code blocks by adopting a PCRD optimization algorithm idea, and organizing the compression tail streams into compression bit stream layers with different quality levels. The compressed bit stream on each layer, together with the compressed bit streams of all layers preceding it, can reconstruct an image of a certain quality. When hierarchically organizing a compressed bitstream, it is necessary to encode contribution information of each code block on each layer. Since the code blocks are independently encoded, the corresponding code block compressed bit stream can be randomly acquired and decoded as needed to reconstruct a desired image region.
By actually measuring the time consumption of the encoding process in the JPEG2000 standard, as shown in FIG. 2, T1 accounts for 78% of the total encoding time, the wavelet transform accounts for 11%, T2 accounts for 5%, and other steps account for 6%. Therefore, reducing the time complexity of T1 encoding plays an important role in improving the encoding efficiency of the JPEG2000 standard.
Based on the practical technical requirements similar to those described above, the image encoding method provided by the present application can shorten the time consumed by the bit plane encoding process in T1, and improve the encoding efficiency.
The technical scheme provided by the embodiment of the application is applied to the client, which can be an independent application program, and can also be a functional module (such as a software development kit) embedded in the application, for example, the functional module in the mobile terminal App such as "tianmao", "naobao", and the like. The following describes in detail a specific implementation provided by the embodiments of the present application.
In the embedded coding algorithm, the sub-band coefficients generated after discrete wavelet transform are quantized first, and the quantized sub-band coefficients are divided into a plurality of independent coding blocks (code blocks). After dividing the quantized subband coefficients into encoded blocks, the wavelet quantized coefficients in an encoded block may be decomposed into a plurality of binary bit planes comprising a plurality of binary coefficient bits corresponding to one wavelet coefficient value in the encoded block. Table 1 is a schematic table of binary bit planes, where each column may represent a binary bit plane, b1 represents the highest bit plane, b2 is the highest, and the number of bit planes decreases toward the right. Each row in table 1 corresponds to a quantized wavelet coefficient value, w1, w2, … …, w5, respectively, for each wavelet coefficient value, the most significant bit is the sign bit, where 0 indicates that the wavelet coefficient is a positive number and 1 indicates that the wavelet coefficient is a negative number. Among the plurality of bit planes, the most significant bit plane is a sign bit plane, and the remaining bit planes are amplitude bit planes.
TABLE 1 wavelet coefficient bit-plane diagram
b1 b2 b3 b4
w1
0 1 0 1
w2 0 0 1 0
w3 1 1 0 1
w4 0 0 0 0
w5 0 0 1 0
As shown in fig. 2, in a single bit plane, every 4 rows constitute a Stripe (Stripe), the coding order of the stripes is from top to bottom. Within each stripe, each column is coded from top to bottom, and each column is coded from left to right. Since bit-plane coding starts from the most significant bit-plane (MSB) with non-zero elements and proceeds to the least significant bit-plane (LSB), all wavelet coefficient bits on each bit-plane are coded, i.e., in bit-plane order from high to low. Therefore, when the compressed code stream is truncated, the code block may lose some or all of the low significant bits of the coefficients, and only the high significant bits, which are more important to the image information, are transmitted, which conforms to the idea of embedded coding.
Each coefficient bit in each bit plane in the code block has associated with it a state information, called significance status bit. The significant state bit is 0 at the start of coding of the code block, and as the bit plane is coded, when the amplitude bit of the coefficient changes from 0 to 1, the significant state bit is also set to 1, and the state of the coefficient is "significant" in the subsequent bit plane.
An important role of bit-plane coding is to generate contexts required for arithmetic coding, which are used for probability selection in the arithmetic coding process and are key to influence the performance of arithmetic coding. The purpose of introducing context is to find out the information relationship between the bit currently needing to be coded and the adjacent coded bit, and apply the condition information of the coded bit to the symbol to be coded so as to achieve higher compression ratio.
The context state is related to the number of the selected neighbor coefficients, the two are in exponential relation, and if the number of the selected neighbor coefficients is too large, the number of the context states is increased sharply. Moreover, due to the limited image size, when the context state is too many, the conditional probability of the symbol to be encoded cannot be accurately estimated because there are not enough samples for learning, thereby reducing the encoding efficiency. Therefore, in order to effectively reflect the information that the current coefficient and the neighbor coefficient have been encoded, the context used in the EBCOT algorithm is determined by the significance state values of eight neighboring coefficient bits in the same code block, as shown in table 2, where X denotes the significance state of the current coefficient bit, H0, H1 denotes the significance state of the horizontal neighbor coefficient bit, V0, V1 denotes the significance state of the vertical neighbor coefficient bit, and D0, D1, D2, D3 denotes the significance state of the diagonal neighbor coefficient bit. The important state bit is a binary variable, is 0 when initialized, and indicates that the coefficient is important when the first bit of the coefficient which becomes 1 is encountered for the first time in the encoding process from the high bit plane to the low bit plane.
TABLE 2 importance status table of neighborhood coefficients
D0 V0 D1
H0 X H1
D2 V1 D3
In the EBCOT algorithm, each coefficient bit in a bit plane is encoded in only one of three encoding processes, which include an importance propagation encoding process, an amplitude refinement encoding process, and a clear encoding process in this order. After the coefficient bits are encoded, a pair of context and bits to be encoded can be generated, and the context and the bits to be encoded are sent to a subsequent arithmetic encoding unit for compression encoding processing, so as to generate a compressed code stream. The three encoding processes consist of four basic encoding algorithms: zero coding, sign coding, amplitude refinement coding and erasure coding. Wherein zero coding and sign coding are used for the significance propagation coding process, amplitude refinement coding is used for the amplitude refinement coding process, and erasure coding, zero coding and sign coding are used for the erasure coding process.
In encoding the coefficient bits of a bit plane, the significance state values of the coefficient bits may change. For example, when the coefficient bit is located in the most significant bit plane (MSB) of a wavelet coefficient having non-zero elements, although the initialized value of the significance status value of the coefficient bit is 0, when the coefficient bit is initially scanned, the significance status value of the coefficient bit changes from 0 to 1, i.e., from "insignificant" to "significant". In the encoding process in the significance propagation encoding process and the erasure encoding process, the significance state values of 8 neighborhoods of the coefficient bits need to be acquired. For example, during the zero coding algorithm in significance propagation coding, those coefficient bits that are "unimportant" themselves, but have at least one "important" coefficient bit in the neighborhood, need to be coded. That is, the significance status value of the coefficient bit is 0, but the significance status value of at least one coefficient bit in its eight neighbors is 1. Similarly, zero coding algorithms may be utilized during erasure coding, and therefore, similarly-state coefficient bits may also need to be encoded.
In the prior art, when the importance state value of the neighborhood coefficient digit of the coefficient digit needs to be determined, the importance state value of each neighborhood coefficient digit can be sequentially inquired from the memory. As shown in table 2, to determine the importance state value of the coefficient X, the importance state values of eight neighborhood coefficients, such as D0, D1, D2, D3, H1, H2, V1, and V2, need to be sequentially queried. If the significance status value of any one of the eight neighborhood coefficient bits is 1, zero-coding computation can be performed on the coefficient bit. It can be found that the above query method is passive, and the condition of repeated query occurs, and the CPU resource consumption is high.
In an embodiment of the present application, the above passive query mode may be changed to an active synchronization mode, and the image encoding method described in the present application is described in detail below with reference to the accompanying drawings. Fig. 3 is a flowchart of an image encoding method according to an embodiment of the present disclosure. Although the present application provides method steps as shown in the following examples or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In the case of steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method can be executed sequentially or in parallel (for example, in the context of a parallel processor or a multi-thread process) according to the method shown in the embodiment or the figures when the method is executed in an actual image encoding process or device.
Specifically, the method may include:
s301: the value and significance status information of the number of bits to be encoded in the bit plane are obtained.
S303: updating the significance state information of the coefficient bit to a significance state when the value of the coefficient bit is a valid value and the significance state information is a non-significance state.
S305: and sending the message of converting the importance state information of the coefficient digit from the non-important state to the neighbor coefficient digit of the coefficient digit.
As can be seen from the above, the significant state bit of a coefficient bit is 0 at the start of coding of a code block, and is also set to 1 when the amplitude bit of the coefficient changes from 0 to 1 as the bit plane is coded, and the states of the coefficient bits corresponding to the coefficient in the subsequent bit planes are all "significant". As will be described below by way of an example, for the wavelet coefficient w2 in table 1, the initial values of the significant state bits of the corresponding respective coefficient bits are all zero, and when the amplitude value of the coefficient w2 changes from 0 to 1, the significant state bit of the coefficient bit whose amplitude value starts to change is set to 1, that is, for the wavelet coefficient w2, the significant state bits of the coefficient bits on the bit plane downward from b3 are all 1.
In this embodiment, in the bit plane encoding process, a value and significance state information corresponding to a coefficient bit to be encoded in a bit plane may be obtained. When the value of the coefficient bit is a valid value and the significance status information is a non-significance status, the significance status information of the coefficient bit may be updated to a significance status. In this embodiment, the fact that the value of the coefficient bit is a valid value may include that the amplitude of the coefficient corresponding to the coefficient bit has changed from 0 to 1, and then all the subsequent coefficient bits corresponding to the coefficient bit are valid values. As for the coefficient w2 in table 1, even if the value in the b4 plane is 0 but the value of the coefficient in the b3 plane has become 1, the value in the b4 plane is also a valid value. Since the initial values of the importance state information of each coefficient bit are all non-importance states, when the value of the coefficient bit is determined to be a valid value, the importance state corresponding to the coefficient bit can be updated to an importance state, and the information that the importance state information of the coefficient bit is converted from the non-importance state to the importance state is sent to the neighborhood coefficient bit of the coefficient bit.
As can be seen from the above, when encoding each coefficient bit, it is necessary to obtain the importance state information of the neighborhood coefficient bit of the coefficient bit, and if the importance state information is queried one by one in the prior art, it takes a lot of time. In this embodiment, the message that the importance status of the coefficient bit changes may be actively sent to the neighbor coefficient bit of the coefficient bit.
Specifically, in one embodiment, context flag information for each coefficient bit may be set, which may be used to store significance status information for neighborhood coefficient bits of the coefficient bit. For example, during the zero coding algorithm in significance propagation coding, those coefficient bits that are "unimportant" themselves, but have at least one "important" coefficient bit in the neighborhood, need to be coded. That is, in the significance propagation encoding process, one of the neighborhood coefficient bits of the coefficient bit changes, and the coefficient bit may be encoded by using a zero encoding algorithm, so that the environment flag information of the coefficient bit is set, and when the significance state information of a certain neighborhood coefficient bit changes, the environment flag information may be marked by updating the environment flag information. Therefore, in the actual coding process, the process of polling each neighborhood coefficient digit one by one can be avoided, and the coding efficiency is improved.
The image coding method provided by the application can actively synchronize the information of the change of the importance state information of the coefficient bits in the bit plane to the adjacent domain coefficient bits of the coefficient bits. Therefore, when the adjacent domain coefficient digit of the coefficient digit is coded, the importance state information of the adjacent domain coefficient digit can be rapidly known under the condition that the importance state information of the adjacent domain coefficient digit does not need to be polled, the time for coding each coefficient digit can be shortened, and the coding efficiency is improved. Further, the coding efficiency of the T1 layer coding in EBCOT can be improved, and the picture compression efficiency of JPEG2000 can be improved.
As shown in fig. 2, the data stream has 4 wavelet coefficient bits as a coefficient sequence in each bit plane of the code block, and the coefficient bits are scanned point by point in the scanning pattern shown in fig. 2. The selection of this scanning method can facilitate the effective implementation of software and hardware, and the first group processing is performed on every four bits in sequence from the top, and the coefficient bits of the first coefficient sequence are scanned from the first bit downwards. Then, four bits of the second coefficient series are scanned in the same direction until the last coefficient series of the code block. The same scanning procedure is then repeated. That is, raster scanning is performed in a unit of four-bit aggregation in the vertical direction, one stripe for each group of code blocks.
If there are n bit planes, the size of the bit plane is x y, the scanning is divided into three processes, except that the first bit plane is directly entered into the clearing process, and the other processes are performed three times, namely x y x (3n-2), which is simple and clear, but is not efficient.
In view of the above problems, there is a need in the art to simplify the scanning method, typically the column group omission method. In the column group ellipsis, four adjacent coefficient columns within a stripe may be taken as a column group, and a column group flag of a subsequent process is generated when the first encoding process, i.e., the significance propagation encoding process, scans. Therefore, when the second coding process (namely the amplitude refining coding process) and the third coding process (namely the clear coding process) are used for scanning, row-column group scanning or column jump scanning can be carried out according to the column group marks generated in the first coding process, and the scanning efficiency is improved.
Currently, the commonly used column group ellipses also include eight-column group ellipses, which refer to the above principle, that is, taking each eight coefficient columns of the wavelet coefficients as a unit, if all zero, marking the column group flag as 0, if there is a value, marking the column group flag as 1, so that in the process of scanning in the second encoding process or the third encoding process, 8 columns with the column group flag as 0 can be skipped, thereby improving the scanning efficiency.
While the four column group ellipses or the eight column group ellipses described above do save some unnecessary scanning, many images are actually non-uniformly distributed in pixels. In particular, medical images, such as cranial CT, are often large patches of black or white pixels. Therefore, in the present application, the scanning manner of the bit plane is improved according to the feature analysis of the medical image.
In this embodiment, the bit planes of the wavelet coefficients of the medical images are subjected to the zero-connecting analysis, and the zero-connecting times of the medical images can be obtained through statistics by three-process scanning of the JPEG2000 native algorithm, and are drawn into a curve, so as to generate the medical image zero-connecting characteristic analysis graph shown in fig. 4. Through analysis, the frequency of the occurrence of 8-zero is only about 0.03%, and the probability is not high. It can be seen from fig. 4 that the consecutive zero condition is relatively random, and the ratio of the case greater than 8 consecutive zeros is the highest, so that the 8-column group omission method can effectively reduce the number of scanning times, but has much room for improvement.
Further analysis of the curve in figure 4 has revealed that the frequency of zero crossings above 63 is very low, around 0.05%. Thus, the run-length coded run-length flag is a 6-bit binary flag, and the basic format is XXXXXX (X is a binary number). A6-bit binary number can identify an integer K (0 ≦ K <64), that is, up to 63 zero-padding cases. As shown in fig. 5, 9 consecutive 0 s may be represented by run- length encoding 001001, and 3 consecutive 0 s may be represented by run-length encoding 000101.
By using the method of the embodiment, the number of the continuous zero coefficient sequences on the wavelet coefficient bit plane formed by the medical image can be coded according to the characteristics of the medical image. In this embodiment, a 6-bit binary format is adopted for encoding, so that the encodable range is exactly matched with the data characteristics of the medical image. When the second coding process and the third coding process are carried out, the coding values of the zero-connecting coefficient column number generated in the first process in the bit plane scanning process can be used for carrying out multi-column jump scanning, and the scanning efficiency is improved.
Another aspect of the present application further provides an image encoding apparatus, which is used in a bit-plane encoding process, and includes a processor and a memory for storing processor-executable instructions, where the processor executes the instructions to implement:
obtaining the value and the importance state information of the serial number to be coded in the bit plane;
updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state;
and sending the message of converting the importance state information of the coefficient digit from the non-important state to the neighbor coefficient digit of the coefficient digit.
Optionally, in an embodiment of the present application, the neighborhood coefficient bits may include at least one of: horizontal neighborhood coefficient, vertical neighborhood coefficient, diagonal neighborhood coefficient.
Optionally, in an embodiment of the application, after the implementing step sends the message that the importance state information of the coefficient bit is changed from the non-important state to the neighbor coefficient bit of the coefficient bit, the processor may further include:
and updating environment marking information corresponding to the neighborhood coefficient bits, wherein the environment marking information is used for storing the importance state information of the neighborhood coefficient bits of the coefficient bits.
Optionally, in an embodiment of the present application, the processor may further implement:
in a first encoding process of the bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
Optionally, in an embodiment of the application, when the processor encodes the number of the coefficient series and stores the generated encoded value, the implementing step may include:
coding the number of the series of the coefficients according to a format of six-bit binary number, and generating a coded value;
storing the generated encoded value.
Optionally, in an embodiment of the application, after implementing the step of encoding the number of the coefficient series and storing the generated encoded value, the processor may further include:
in the second coding process and the third coding process of the bit plane, obtaining coding values of the number of continuous zero coefficient columns;
decoding the coded value to obtain the number of the continuous zero coefficient series;
and omitting the scanning of the continuous zero coefficient series according to the number.
Another aspect of the present application provides another embodiment of an image encoding apparatus, which is used in a bit-plane encoding process and includes a processor and a memory for storing processor-executable instructions, where the processor executes the instructions to implement:
in a first encoding process of a bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
Optionally, in an embodiment of the application, when the processor encodes the number of the coefficient series and stores the generated encoded value, the implementing step may include:
coding the number of the series of the coefficients according to a format of six-bit binary number, and generating a coded value;
storing the generated encoded value.
Optionally, in an embodiment of the application, after the processor encodes the number of the coefficient series and stores the generated encoded value, the processor may further include:
in the second coding process and the third coding process of the bit plane, obtaining coding values of the number of continuous zero coefficient columns;
decoding the coded value to obtain the number of the continuous zero coefficient series;
and omitting the scanning of the continuous zero coefficient series according to the number.
Another aspect of the present application also provides a medical image compression method, which may include:
acquiring a medical image to be compressed;
processing the medical image by using a JPEG2000 compression algorithm, wherein in the bit plane encoding process of the JPEG2000 compression algorithm, the method comprises the following steps:
acquiring the numerical value and the importance state information of a coefficient bit to be coded; updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state; sending the information of the importance state of the coefficient digit converted from the non-important state to the neighbor coefficient digit of the coefficient digit;
and outputting the compressed image.
Optionally, in an embodiment of the present application, in the bit plane encoding process of the JPEG2000 compression algorithm, the method may further include:
in a first encoding process of the bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
In another aspect, the present application further provides a computer-readable storage medium, on which computer instructions are stored, and when the instructions are executed, the image encoding method according to any of the above embodiments may be implemented.
The computer readable storage medium may include physical means for storing information, typically by digitizing the information for storage on a medium using electrical, magnetic or optical means. The computer-readable storage medium according to this embodiment may include: devices that store information using electrical energy, such as various types of memory, e.g., RAM, ROM, etc.; devices that store information using magnetic energy, such as hard disks, floppy disks, tapes, core memories, bubble memories, and usb disks; devices that store information optically, such as CDs or DVDs. Of course, there are other ways of storing media that can be read, such as quantum memory, graphene memory, and so forth.
Although the present application provides method steps as described in an embodiment or flowchart, more or fewer steps may be included based on conventional or non-inventive means. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or client product executes, it may execute sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
The modules illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by a product with certain functions. For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations as the present application. Of course, a module that implements the same function may also be implemented by multiple sub-modules or a combination of sub-modules in a unit module described in this application.
Those skilled in the art will also appreciate that, in addition to implementing the controller as purely computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may therefore be considered as a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, classes, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by software plus necessary general hardware platform. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, or the like, and includes several instructions for enabling a computer device (which may be a personal computer, a mobile terminal, a server, or a network device) to execute the method according to the embodiments or some parts of the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, and the same or similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
While the present application has been described with examples, those skilled in the art will appreciate that there are numerous variations and permutations of the present application without departing from the spirit of the application, and it is intended that the appended claims encompass such variations and modifications without departing from the spirit of the application.

Claims (13)

1. An image encoding method, used in a bit-plane encoding process, comprising:
acquiring the numerical value and the importance state information of a coefficient bit to be coded;
updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state;
sending the information of the importance state of the coefficient digit converted from the non-important state to the neighbor coefficient digit of the coefficient digit; wherein, include: and updating environment marking information corresponding to the neighborhood coefficient bits, wherein the environment marking information is used for storing the importance state information of the neighborhood coefficient bits of the coefficient bits.
2. The method of claim 1, wherein the neighborhood coefficient bits comprise at least one of: horizontal neighborhood coefficient, vertical neighborhood coefficient, diagonal neighborhood coefficient.
3. The method of claim 1, further comprising:
in a first encoding process of the bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
4. The method of claim 3, wherein encoding the number of series of coefficients and storing the generated encoded value comprises:
coding the number of the series of the coefficients according to a format of six-bit binary number, and generating a coded value;
storing the generated encoded value.
5. The method of claim 3, wherein after said encoding the number of series of coefficients and storing the generated encoded value, the method further comprises:
in the second coding process and the third coding process of the bit plane, obtaining coding values of the number of continuous zero coefficient columns;
decoding the coded value to obtain the number of the continuous zero coefficient series;
and omitting the scanning of the continuous zero coefficient series according to the number.
6. An image encoding apparatus, for use in a bit-plane encoding process, comprising a processor and a memory for storing processor-executable instructions, the processor when executing the instructions implementing:
obtaining the value and the importance state information of the serial number to be coded in the bit plane;
updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state;
sending the information of the importance state of the coefficient digit converted from the non-important state to the neighbor coefficient digit of the coefficient digit; wherein, include: and updating environment marking information corresponding to the neighborhood coefficient bits, wherein the environment marking information is used for storing the importance state information of the neighborhood coefficient bits of the coefficient bits.
7. The apparatus of claim 6, wherein the neighborhood coefficient bits comprise at least one of: horizontal neighborhood coefficient, vertical neighborhood coefficient, diagonal neighborhood coefficient.
8. The apparatus of claim 6, wherein the processor further implements:
in a first encoding process of the bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
9. The apparatus of claim 8, wherein the processor, when implementing the steps of encoding the number of the series of coefficients and storing the generated encoded value, comprises:
coding the number of the series of the coefficients according to a format of six-bit binary number, and generating a coded value;
storing the generated encoded value.
10. The apparatus of claim 8, wherein the processor, after implementing the step of encoding the number of the series of coefficients and storing the generated encoded value, further comprises:
in the second coding process and the third coding process of the bit plane, obtaining coding values of the number of continuous zero coefficient columns;
decoding the coded value to obtain the number of the continuous zero coefficient series;
and omitting the scanning of the continuous zero coefficient series according to the number.
11. A computer-readable storage medium having stored thereon computer instructions which, when executed, implement the steps of the method of any one of claims 1 to 5.
12. A method of medical image compression, comprising:
acquiring a medical image to be compressed;
processing the medical image, including:
acquiring the numerical value and the importance state information of a coefficient bit to be coded; updating the importance state information of the coefficient digit to an importance state when the value of the coefficient digit is a valid value and the importance state information is a non-importance state; sending the information of the importance state of the coefficient digit converted from the non-important state to the neighbor coefficient digit of the coefficient digit; wherein, include: updating environment marking information corresponding to the neighborhood coefficient bits, wherein the environment marking information is used for storing importance state information of the neighborhood coefficient bits of the coefficient bits;
and outputting the compressed image.
13. The method of claim 12, wherein the processing the medical image further comprises:
in a first encoding process of a bit plane, counting the number of coefficient sequences with continuous zero values in the bit plane, wherein the bit plane comprises a plurality of strips, each strip comprises a plurality of coefficient sequences, each coefficient sequence comprises a plurality of coefficient bits, and when the coefficient bits in the coefficient sequences are all zero, the numerical values of the coefficient sequences are zero;
and coding the number of the series of the coefficients, and storing the generated coded value.
CN201810295369.8A 2018-04-04 2018-04-04 Image coding method and device Active CN110351559B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111499180.9A CN114374840B (en) 2018-04-04 2018-04-04 Image coding method, device and storage medium
CN201810295369.8A CN110351559B (en) 2018-04-04 2018-04-04 Image coding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810295369.8A CN110351559B (en) 2018-04-04 2018-04-04 Image coding method and device

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202111499180.9A Division CN114374840B (en) 2018-04-04 2018-04-04 Image coding method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110351559A CN110351559A (en) 2019-10-18
CN110351559B true CN110351559B (en) 2022-01-28

Family

ID=68173513

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202111499180.9A Active CN114374840B (en) 2018-04-04 2018-04-04 Image coding method, device and storage medium
CN201810295369.8A Active CN110351559B (en) 2018-04-04 2018-04-04 Image coding method and device

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202111499180.9A Active CN114374840B (en) 2018-04-04 2018-04-04 Image coding method, device and storage medium

Country Status (1)

Country Link
CN (2) CN114374840B (en)

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6947874B2 (en) * 2000-11-16 2005-09-20 Canon Kabushiki Kaisha Entropy coding
WO2003053066A1 (en) * 2001-12-17 2003-06-26 Microsoft Corporation Skip macroblock coding
JP4182426B2 (en) * 2003-10-10 2008-11-19 ソニー株式会社 Image processing apparatus, image processing method, and image processing program
US7565022B2 (en) * 2003-12-19 2009-07-21 Intel Corporation Bit-plane formatting including zero bit-plane detection
US20050135684A1 (en) * 2003-12-19 2005-06-23 Golla Kumar S. Magnitude refinement coding
US7352903B2 (en) * 2004-08-17 2008-04-01 Pegasus Imaging Corporation Methods and apparatus for implementing JPEG 2000 encoding operations
CN101056399A (en) * 2007-04-19 2007-10-17 华中科技大学 Bit plane coding method and circuit for realizing the same
CN102333222B (en) * 2011-10-24 2013-06-05 哈尔滨工业大学 Two-dimensional discrete wavelet transform circuit and image compression method using same
CN103686193B (en) * 2013-12-09 2016-09-28 中国电影科学技术研究所 A kind of JPEG2000 picture decoding and the method for coding
GB2536026A (en) * 2015-03-05 2016-09-07 Nokia Technologies Oy Method and apparatus for encoding and decoding images
WO2017013307A1 (en) * 2015-07-17 2017-01-26 Nokia Technologies Oy Method and apparatus for encoding and decoding images

Also Published As

Publication number Publication date
CN114374840A (en) 2022-04-19
CN114374840B (en) 2024-04-12
CN110351559A (en) 2019-10-18

Similar Documents

Publication Publication Date Title
Cheng et al. Energy compaction-based image compression using convolutional autoencoder
US6347157B2 (en) System and method for encoding a video sequence using spatial and temporal transforms
Zhou et al. End-to-end Optimized Image Compression with Attention Mechanism.
JP5027936B2 (en) Method, recording medium, program and processing device for adaptive scan ordering.
Walker et al. Wavelet-based image compression
US6917711B1 (en) Embedded quadtree wavelets in image compression
JPH11168633A (en) Reconstruction execution method, reconstruction execution device, record medium, inverse conversion execution method, inverse conversion execution device, suitable reconstruction generating method, suitable reconstruction generator, coding data processing method, coding data processing unit and data processing system
CN108881913B (en) Method and apparatus for image encoding
CN113079378B (en) Image processing method and device and electronic equipment
CN111247797A (en) Method and apparatus for image encoding and decoding
Anantha Babu et al. Lossless compression algorithm using improved RLC for grayscale image
Song et al. Novel near-lossless compression algorithm for medical sequence images with adaptive block-based spatial prediction
Cui et al. An efficient deep quantized compressed sensing coding framework of natural images
CN105163130B (en) A kind of Lossless Image Compression Algorithm method based on discrete Tchebichef orthogonal polynomial
Kabir et al. Edge-based transformation and entropy coding for lossless image compression
CN110351559B (en) Image coding method and device
CN115102934B (en) Decoding method, encoding device, decoding equipment and storage medium for point cloud data
CN110650339A (en) Video compression method and device and terminal equipment
Hasnat et al. Luminance approximated vector quantization algorithm to retain better image quality of the decompressed image
JP2013187692A (en) Image processing device and image processing method
KR20110071204A (en) Parallel processing method in wavelet-based jpeg2000
CN110913220A (en) Video frame coding method and device and terminal equipment
Pabi et al. Tri-mode dual level 3-D image compression over medical MRI images
US20230039840A1 (en) Picture processing method and apparatus
Pandey et al. Hybrid image compression based on fuzzy logic technology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant