METHOD AND APPARATUS FOR PERFORMING COMPRESSION OF A COLOR IMAGE
20230064397 · 2023-03-02
Assignee
Inventors
- Allan BARREA (Mont-Saint-Guibert, BE)
- Naomi ROUSSEAU (Mont-Saint-Guibert, BE)
- Pascal PELLEGRIN (Mont-Saint-Guibert, BE)
- Gaël ROUVROY (Mont-Saint-Guibert, BE)
- Christophe BIERNAUX (Mont-Saint-Guibert, BE)
- Charles BUYSSCHAERT (Mont-Saint-Guibert, BE)
Cpc classification
H04N1/64
ELECTRICITY
International classification
Abstract
The disclosure relates to a method for compressing in a packed data set a color image comprising color image samples arranged in a reference grid according to a sampling pattern, and comprising the steps of (a) performing a decorrelative transform providing component images, (b) performing a number of discrete wavelet decompositions on said component images and (c) forming packets in the packed data set by processing each consecutive line in the reference grid and each component and grouping all samples of said component in said line in one or more packets, and appending said one or more packets to the packed data set. The disclosure also relates to a device for compressing, a computer program for compressing, a method for decompressing, a device for decompressing, and a computer program for decompressing. The disclosure also relates to the packed data set produced by said method for compressing.
Claims
1. A method for compressing a color image comprising color image samples Sij arranged in a reference grid according to a sampling pattern, the reference grid comprising a number of lines and columns, the index i starting at 0 and increasing with the lines, and the index j starting at 0 and increasing with the columns, into a packed data set, the method comprising: a) performing a decorrelative transform, wherein for each position (i,j) of the reference grid, a component sample Ckij is determined, k being a component index depending on the sampling pattern, Ckij being a linear combination of the image samples Si′j′ at positions (i′,j′), wherein i′ is comprised between i−4 and +4, and j′ is comprised between j−4 and j+4, producing component images C0, C1, and C2, and, depending on the sampling pattern, an optional component image C3; b) repeating for each component Ck: NIky being a number of vertical DWT decompositions to be applied to component Ck, being an integer>=0, NIkx being a number of horizontal DWT decompositions to be applied to component Ck, being an integer>=NIky, considering the component Ck as an auxiliary subband; if NIky>0, repeat, for n=0 to NIky−1, performing on said auxiliary subband a vertical DWT decomposition, by performing a lifting scheme with (5,3) filter-bank on the columns of said auxiliary subband, the resulting even numbered samples being a LLn subband, the resulting odd numbered samples being a LHn subband, keeping for each resulting sample a reference to the position (i,j) in the reference grid wherefrom they are determined; performing on said LLn subband a horizontal DWT decomposition, by performing a lifting scheme with (5,3) filter-bank on the lines of said subband, the resulting even numbered samples being a LLn subband, the resulting odd numbered samples being a HLn subband, keeping for each resulting sample a reference to the position (i,j) in the reference grid wherefrom they are determined; performing on said LHn subband a horizontal DWT decomposition, by performing a lifting scheme with (5,3) filter-bank on the lines of said subband, the resulting even numbered samples being a LHn subband, the resulting odd numbered samples being a HHn subband, keeping for each resulting sample a reference to the position (i,j) in the reference grid wherefrom they are determined; considering subband LLn as an auxiliary subband, if NIkx>NIky, repeat, for n=NIky to NIkx−1, performing on said LLn−1 subband a horizontal DWT decomposition, by performing a lifting scheme with (5,3) filter-bank on the lines of said subband, the resulting even numbered samples being a LLn subband, the resulting odd numbered samples being a HLn subband, keeping for each resulting sample a reference to the position (i,j) in the reference grid wherefrom they are determined; and considering subband LLn as an auxiliary subband; and c) for each consecutive line of the reference grid, for each component Ck, grouping all samples of said component Ck in said line in one or more packets; and appending said one or more packets to the packed data set.
2. The method according to claim 1, wherein the number NIky of vertical DWT decompositions is equal to 0 or 1.
3. The method according to claim 1, wherein between step b) and step c), an entropy coding of the data is performed.
4. The method according to claim 3, wherein said entropy coding comprises an entropy coding of the bitplane count of groups of samples.
5. The method according to claim 4, further comprising: grouping bitplane counts of groups of samples; and grouping data representing the bitplanes.
6. The method according to claim 1, wherein in said sampling pattern, each pixel position comprises samples arranged in a Bayer pattern, a Bayer pattern being, for each even i and j coordinates in the reference grid, a juxtaposition of a red pixel R at position (i,j), a first green pixel G1 at position (i,j+1), a second green pixel G2 at position (i+1,j), and a blue pixel B at position (i+1,j+1), said decorrelative transform producing a component image C0 for the positions of the red pixels, a component image C1 for the positions of the first green pixels, a component image C2 for the positions of the second green pixels, and a component image C3 for the positions of the blue pixels.
7. The method according to claim 1, wherein in said sampling pattern, each pixel position comprises samples arranged in a 4:4:4 pattern, a 4:4:4 pattern being, for each i and j coordinates in the reference grid, a superposition at position (i,j) of a luminance pixel Y, a blue chrominance pixel Cb, and a red chrominance pixel Cr, or of a red pixel R, a green pixel G, and a blue pixel B, said decorrelative transform producing a component image C0 for the positions of the luminance or red pixels, a component image C1 for the positions of the blue chrominance or green pixels, and a component image C2 for the positions of the red chrominance or blue pixels.
8. The method according to claim 1, wherein in said sampling pattern, each pixel position comprises samples arranged in a 4:2:2 pattern, a 4:2:2 pattern being, for each i and each even j coordinates in the reference grid, an arrangement at position (i,j) of a luminance pixel Y, a blue chrominance pixel Cb, and a red chrominance pixel Cr, and a luminance pixel Y at position (i,j+1), said decorrelative transform producing a component image C0 for the positions of the luminance pixels, a component image C1 for the positions of the blue chrominance pixels, and a component image C2 for the positions of the red chrominance pixels.
9. The method according to claim 1, wherein said decorrelative transform is an identity mapping, and wherein each sample of the color image is mapped to a corresponding position on the component images.
10. The method according to claim 1, wherein said decorrelative transform is an in-line Star-Tetrix transform.
11. The method according to claim 1, wherein said decorrelative transform is a full Star-Tetrix transform.
12. A device for compressing a color image, the color image comprising color image samples Sij arranged in a reference grid according to a sampling pattern, the reference grid comprising a number of lines and columns, the index i starting at 0 and increasing with the lines, and the index j starting at 0 and increasing with the columns, into a packed data set, the device comprising: one or more electronic components configured to perform step a) of the method of claim 1; one or more electronic components configured to perform step b) of the method of claim 1; and one or more electronic components configured for perform step c) of the method of claim 1.
13. A computer program comprising instructions which, when the program is executed by a computer, cause the computer to carry out the method of claim 1.
14. A packed data set obtainable by compressing a color image with the method of claim 1, the packed data set comprising: a sequence of packets, wherein each packet contains only data from a single component image, wherein each packet contains only data from a single line of a component image, and wherein all packets contains data from a given line of a component image being located in the packed data set before any packet containing data from a subsequent line of any component image.
15. A method for decompressing a packed data set obtainable by performing the method according to claim 1, the method for decompressing comprising: unpacking the packets comprised in the packed data set; performing an inverse DWT decomposition; and performing an inverse decorrelative transform.
16. A computer program comprising instructions which, when the program is executed by a computer, causes the computer to carry out the method of claim 15.
17. A device for decompressing a packed data set obtainable by performing the method according to claim 1, comprising: one or more electronic components configured to: unpack the packets comprised in the packed data set; perform an inverse DWT decomposition; and perform an inverse decorrelative transform.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0057] These and further aspects of the present disclosure will be explained in greater detail by way of example and with reference to the accompanying drawings in which:
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
DETAILED DESCRIPTION
[0074]
[0075]
Here is a non-exhaustive list of such decorrelative transforms: [0076] identity mapping, where each sample of the input grid is mapped to the corresponding position on the output grid, i.e. for any position (i,j) in the input/output grid, C0ij=Rij; C1j=G1 ij; C2ij=G2ij; C3ij=Bij; [0077] in-line Star-Tetrix transform; [0078] full Star-Tetrix transform.
The in-line Star-Tetrix transform and full Star-Tetrix transform are described in Annex F of Reference 1. In
[0079]
[0080]
[0081]
[0082] In performing the decorrelative transforms in step a) of the method, and the successive DWT decompositions in step b) of the method, the samples resulting from the transforms and decompositions may keep a reference to the position (i,j) in the reference grid wherefrom they are determined. This may be achieved in different ways; three possible embodiments are described below: [0083] in a first embodiment, each sample resulting from a transform or decomposition may be stored together with the values (i,j) of the position in the reference grid wherefrom it is determined. This may be done for each operation of the decorrelative transforms, as well as for each successive DWT decomposition. [0084] in a second embodiment, the resulting samples may be memorized grouped by component and by subband, as represented in
[0086] According to said embodiments, step c) of the method may be performed as follows: [0087] in the first embodiment, step c) of the method may be performed by extracting from the storage the samples corresponding to each consecutive line of the reference grid and each component; [0088] in the second embodiment, step c) of the method may be performed on the basis of address translation between the addresses in the storage, and positions (i,j) in the reference grid. For example, if the color image is the image of
[0092]
H.sub.i=O.sub.i-½*(E.sub.i−1+E.sub.i+1).
Even samples may then be replaced by performing the operation
L.sub.i=E.sub.i+¼*(H.sub.i−1+H.sub.i+1),
producing a L (low spatial frequency) subband. As is well known, formulas where odd and even samples are interchanged in the above formulas are equivalent. When samples outside the image are needed, the corresponding samples at mirror position with respect to the border, inside the image, may be taken. This results in the factor +½ instead of +¼ at the left, below in the diagram (arrow going from H to L), and a factor−1 instead of −½ at the right, above in the diagram (arrow going from E to H).
[0093] In
[0094]
[0095]
Example 1
[0096] In a first example embodiment of the disclosure, the color image may be sampled according to a Bayer pattern. In step b) of the method, the number of vertical decompositions NIky is equal to zero for all components, and the number of horizontal decompositions NIkx is equal to 5 for components C0, C1 and C3, and is equal to zero for component C2.
Example 2
[0097] In a second example embodiment of the disclosure, the color image is also sampled according to a Bayer pattern. The number of vertical decompositions NIky is equal to one for components C0, C1 and C3, and is equal to zero for component C2, and the number of horizontal decompositions NIkx is equal to 5 for components C0, C1 and C3, and is equal to zero for component C2.
Arrows numbered “0” to “7” represent the result of the performance of step c) of the method.
The first line of the reference grid may be analyzed and may comprise components C0 and C1 wherein samples of arrows “0” and “1” are treated.
The second line of the reference grid may be analyzed and may comprise components C2 and C3 wherein samples of arrows “2” and “3” are treated.
The third line of the reference grid may be analyzed and may comprise components C0 and C1 wherein samples of arrows “4” and “5” are treated.
The fourth line of the reference grid may be analyzed and may comprise components C2 and C3 wherein samples of arrows “6” and “7” are treated.
Subsequent lines of the reference grid are processed in the same way up to the last line of the reference grid.
One can observe that in the method of the disclosure, a given packet always contain data from a single component image, whereas in the JPEG XS standard, a packet may contain data from different component images.
Example 3
[0098] In a third example embodiment of the disclosure, the color image is a 3-component image sampled according to a 4:4:4 sampling pattern where 1 vertical and 5 horizontal DWT decompositions are performed on each component image.
Example 4
[0099] In a fourth example embodiment of the disclosure, the color image is a 3-component image sampled according to a 4:2:2 sampling pattern where 1 vertical and 5 horizontal DWT decompositions are performed on each component image.
[0100] For comparing how packets are formed and appended to the packed data set in the JPEG XS standard and in the present disclosure, Table 1 shows subbands numbering for an image with 3 components where each component is decomposed by 1 vertical and 5 horizontal DWT decompositions. This applies for the images of
TABLE-US-00001 TABLE 1 Subband Subband Subband Subband Subband Subband # name # name # name 0 LL4 (C.sub.0) 1 LL4 (C.sub.1) 2 LL4 (C.sub.2) 3 HL4 (C.sub.0) 4 HL4 (C.sub.1) 5 HL4 (C.sub.2) 6 HL3 (C.sub.0) 7 HL3 (C.sub.1) 8 HL3 (C.sub.2) 9 HL2 (C.sub.0) 10 HL2 (C.sub.1) 11 HL2 (C.sub.2) 12 HL1 (C.sub.0) 13 HL1 (C.sub.1) 14 HL1 (C.sub.2) 15 HL0 (C.sub.0) 16 HL0 (C.sub.1) 17 HL0 (C.sub.2) 18 LH0 (C.sub.0) 19 LH0 (C.sub.1) 20 LH0 (C.sub.2) 21 HH0 (C.sub.0) 22 HH0 (C.sub.1) 23 HH0 (C.sub.2) 24 (undecomposed — — component)
Table 2 shows the JPEG XS progression order for the images of
TABLE-US-00002 TABLE 2 Packet index Line number Included subbands 0 0 (0,1,2) (3,4,5) (6,7,8) (9,10,11) (12,13,14) 1 0 (15,1647) 2 1 (18,19,20) 3 1 (21,22,23)
Table 3 shows the progression order for the images of
TABLE-US-00003 TABLE 3 Packet index Line number Included subbands 0 0 (0, 3, 6,9, 12, 15) 1 0 (1, 4, 7,10, 13, 16) 2 0 (2, 5, 8, 11, 14, 17) 3 1 (18, 21) 4 1 (19, 22) 5 1 (20, 23)
Table 4 shows the JPEG XS progression order for a 4-component image in which 3 components are decomposed by 1 vertical and 5 horizontal DWT decompositions and the 4th component is not decomposed. Adapted from Table B-10 in Reference 1. The undecomposed component is treated as a single subband with 2 subband lines. Each subband line of the undecomposed component is included in its own packet. See Table 1 for subbands numbering. The packet index corresponds to the numbered arrows of
TABLE-US-00004 TABLE 4 Packet index Line number Included subbands 0 0 (0,1,2) (3,4,5) (6,7,8) (9,10,11) (12,13,14) 1 0 (15,1647) 2 1 (18,19,20) 3 1 (21,22,23) 4 0 (24) 5 1 (24)
[0101] Table 5 shows the progression order resulting from the disclosure in the same case as for Table 4, i.e. a 4-component image in which 3 components are decomposed by 1 vertical and 5 horizontal DWT decompositions, and the 4th component is not decomposed. The packet index corresponds to the numbered arrows of
TABLE-US-00005 TABLE 5 Packet index Line number Included subbands 6 0 (0, 3, 6,9, 12, 15) 1 0 (1, 4, 7, 10, 13, 16) 2 0 (24) 3 0 (2, 5, 8, 11, 14, 17) 4 1 (18, 21) 5 1 (19, 22) 6 1 (24) 7 1 (20, 23)
[0102] Table 6 provides a comparison of packets properties between the JPEG XS standard and the present disclosure in the cases addressed in the previous paragraph.
TABLE-US-00006 TABLE 6 Min/Max packet size Number of packets (in image width units) Sampling pattern JPEG XS Disclosure JPEG XS Disclosure Bayer (FIG. 10, 6 8 0.5/0.75 0.5/0.5 FIG. 11) 4:4:4 (Fig.12) 4 6 1.5/1.5 1/1 4:2:2 (Fig.13) 4 6 1/1 0.5/1
[0103] The compression method according to the disclosure differs and offers advantages with respect to the method of the JPEG XS standard in several aspects detailed hereafter.
First, more packets may be generated according to the disclosure than in the prior art solution, while keeping the maximal packet size smaller than or equal to the minimal packet size in the prior art solution (see Table 6). Having smaller packets allows a reduction of the size of packet buffers. A packet buffer may be a storage that accumulates a whole packet before making it available at its output, such buffer being needed for instance in order to smooth the data rate of the packed data set. However, smaller packets in a given packed data set means more packets, which increases the fixed cost needed to keep track of packet-related metadata in the packed data set, such as the position and size of each packet, which may take the form of packet headers, as in the JPEG XS standard. Said metadata does not contain any information related to the original color image. Therefore, more metadata means less image quality for a given size of the packed data set. The disclosure allows a good trade-off between the size and the number of packets, allowing a reduction of the size of the packet buffers while keeping roughly the same amount of packet-related metadata compared to the prior art.
Second, according to the disclosure, a given packet contains only samples from a single line of a given component image, and therefore said packet contains only samples derived from a single line of the original color image. In comparison, the JPEG XS standard prescribes that any packet containing samples from any DWT decomposed component image must contain samples from all DWT decomposed component images. Therefore, such packet may contain samples derived from several lines of the original color image, for instance in the case of Bayer sampling pattern (see
Finally, in a hardware implementation of the method in the form of a hardware device, a reduction of buffer sizes allows a reduction of the die area and thus a reduction of the fabrication cost of the hardware device, thereby providing a more efficient method for compressing and decompressing of a color image. In a software implementation of the method in the form of a computer program, a reduction of buffer sizes allows a reduction of the memory usage and thus a reduction of the cost and power consumption of the computer executing the computer program, thereby also providing a more efficient method for compressing and decompressing of a color image.
[0104] The drawings of the figures are neither drawn to scale nor proportioned. Generally, identical components are denoted by the same reference numerals in the figures.