Method and apparatus for compressing a color image
Through decorrelation transformation and wavelet decomposition technology, color images are decomposed and grouped in rows to form data packets, solving the problem of low video bandwidth management and coding efficiency in the prior art, and achieving efficient color image compression and decompression.
Patent Information
- Application Number
- CN202280066026.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-08-26
- Filing Date
- 2022-07-22
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-07-22
AI Technical Summary
In the prior art, when compressing and decompressing color images, it is difficult to effectively manage video bandwidth requirements, resulting in low latency and encoding efficiency.
Using the decorrelation transformation and gradual order method, the color image component images are decomposed, and vertical and horizontal wavelet transformations are decomposed through (5,3) filter groups to form auxiliary subbands, and the component images are grouped into data packets in rows. , process row by row and attached to the packaged dataset.
More efficient color image compression and decompression is achieved, reducing the size of packet buffers and reordering buffers, reducing the manufacturing cost of hardware equipment and computing cost of computer programs, and improving image transmission efficiency.
Smart Images

Figure CN118044202B_ABST
Abstract
Description
Field of the Invention
[0001] The present invention relates to a method, apparatus and computer program for compressing and decompressing color images, and more particularly to packing sample data into a packed data set. The present invention also relates to a packed data set generated by the method for compression.
[0002] Description of the prior art
[0003] Color image sensors are known in the industry to produce color images. Video bandwidth requirements are growing rapidly as video resolution, frame rates, and the number of streams to be managed continue to increase.
[0004] A new standard for visually lossless, low-latency lightweight image coding, the JPEG XS standard, is currently being defined by the JPEG committee (formally ISO / IEC JT1 / SC29 / WG1) and is described in the following documents:
[0005] JPEG XS Low-latency Lightweight Image Coding System – Part 1: Core Coding System (hereinafter referred to as Reference 1)
[0006] (ISO / IEC JTC 1 / SC 29 / WG 1 N91029 - 91st meeting - Online - April 2021)
[0007] ●JPEG XS Low-latency Lightweight Image Coding System – Part 2: Profile and Buffer Model (hereinafter referred to as Reference 2)
[0008] (ISO / IEC JTC 1 / SC 29 / WG 1 N92027, 92nd meeting - online - July 2021)
[0009] The JPEG XS standard defines a progressive order, which is formally defined in subclause B.7 of Annex B of reference 1. This progressive order is called "RLBC", which stands for "resolution-line-strip-component". Note that "strips" in the JPEG XS standard are called "subbands" in this document. This means that subbands are first serialized by component, then by subband, then by subband line, and finally by resolution.
[0010] Resolution levels in the JPEG XS standard are analogous to decomposition levels in this document. The lowest resolution level is numbered 0. The resolution level increases by 1 after each bidirectional (i.e. vertical and horizontal) inverse DWT (Discrete Wavelet Transform) decomposition.
[0011] The document "RICHTER THOMAS et al.: "Bayer CFA Pattern Compression With JPEG XS", IEEE TRANSACTIONS ON IMAGE PROCESSING, IEEE, USA, Vol. 30, July 16, 2021, pp. 6557-6569" is a scientific paper that describes in a less formal way what is defined in the JPEG XS standard as defined in references 1 and 2 above.
[0012] Document WO 2021084118 discloses an image processor for processing an image comprising pixels arranged in a Bayer pattern and providing a highly decorrelated image.
[0013] Document US9332258 discloses a method and apparatus for display stream compression, wherein coefficients are grouped, a maximum coding line index (GCLI) is determined for each group, and only the GCLI lowest weight bit of the coefficient is copied to the output stream together with the GCLI value. GCLI is also known as bit plane count in the art. SUMMARY OF THE INVENTION
[0015] The object of the present invention is to provide a more efficient method for compressing and decompressing color images.
[0016] The invention is defined by the independent claim. The dependent claims define advantageous embodiments.
[0017] According to a first aspect of the present invention, there is provided a method for compressing a color image into a packed data set, the color image comprising color image samples Sij arranged in a reference grid according to a sampling pattern, the reference grid comprising a plurality of rows and columns, the row index i starting from 0 and increasing with each row, and the column index j starting from 0 and increasing with each column, the method comprising the following steps:
[0018] a) performing a decorrelation transform, thereby generating component images C0, C1 and C2 and, depending on the sampling mode, an optional component image C3, wherein a component sample Ckij is determined for each position (i, j) of the reference grid, k is a component index depending on the sampling mode, Ckij is a linear combination of image samples Si'j' at position (i', j'), wherein i' is between i-4 and i+4 inclusive and j' is between j-4 and j+4 inclusive;
[0019] b) Repeat for each component image Ck, thereby producing the decomposed component images:
[0020] - Nlky is the number of vertical DWT decompositions to be applied to the component image Ck, an integer >= 0,
[0021] - Nlkx is the number of horizontal DWT decompositions to be applied to the component image Ck, an integer >= Nlky,
[0022] - Consider the component image Ck as an auxiliary subband;
[0023] - If Nlky>0, repeat for n=0 to Nlky-1
[0024] - performing a vertical DWT decomposition on the auxiliary subbands by performing a lifting scheme on the columns of the auxiliary subbands using a (5, 3) filter bank, the resulting even numbered samples being the LLn subbands and the resulting odd numbered samples being the LHn subbands, retaining for each resulting sample a reference to the position (i, j) where the resulting sample is determined in the reference grid;
[0025] - performing a horizontal DWT decomposition on said subbands by performing a lifting scheme on the rows of said LLn subbands using a (5, 3) filter bank, the resulting even numbered samples being the LLn subbands and the resulting odd numbered samples being the HLn subbands, retaining for each resulting sample a reference to the position (i, j) in the reference grid where the resulting sample is determined;
[0026] - performing a horizontal DWT decomposition on said subbands by performing a lifting scheme on the rows of said LHn subbands using a (5, 3) filter bank, the resulting even numbered samples being the LHn subbands and the resulting odd numbered samples being the HHn subbands, retaining for each resulting sample a reference to the position (i, j) where the resulting sample is determined in the reference grid;
[0027] - subband LLn is considered as auxiliary subband;
[0028] - If Nlkx>Nlky, for n=Nlky to Nlkx-1, repeat:
[0029] - performing a horizontal DWT decomposition on said subbands by performing a lifting scheme on the rows of said LLn-1 subbands using a (5, 3) filter bank, the resulting even numbered samples being the LLn subbands and the resulting odd numbered samples being the HLn subbands, retaining for each resulting sample a reference to the position (i, j) in the reference grid where the resulting sample is determined;
[0030] - Subband LLn is considered as an auxiliary subband.
[0031] According to the present invention
[0032] c) for each consecutive row i of the reference grid,
[0033] For each component k,
[0034] (i) grouping all samples of the component k in the row i into one or more data packets;
[0035] (ii) appending the one or more data packets to the packed data set.
[0036] In processing step c), the method processes all rows of the reference grid in order of increasing row index i. For a given row, all components are processed in any order as long as the order is the same when compressing and decompressing the packed data set. The order can be in order of increasing component index k.
[0037] In the context of the present invention:
[0038] -Packetization means forming packets and appending them to a packed data set;
[0039] - the progressive order is derived from the way the component samples are grouped in data packets and the way said data packets are appended to the packed data set. The progressive order of the invention is derived from step c) of the method for compression of the invention. The progressive order of the JPEG XS standard is defined by subclause B.7 of reference 1;
[0040] A packed data set is a data set obtainable by compressing a color image using the method for compression of the present invention, the packed data set comprising a sequence of data packets having the following characteristics inferred by the method for compression of the present invention:
[0041] - Each data packet contains data from only a single decomposed component image;
[0042] - Each data packet contains only data from a single row of the decomposed component images;
[0043] - all data packets containing data from a given row of a decomposed component image precede in the packed data set any data packet containing data from a subsequent row of any decomposed component image;
[0044] - Determining whether the original data set is a packed data set according to the present invention may be performed as follows:
[0045] - applying the method for decompression of the present invention to the original data set, thereby generating an uncompressed data set;
[0046] - applying the method for compression as claimed in claim 1 to an uncompressed data set, thereby generating a packed data set;
[0047] - if the packed data set corresponds to the original data set, the original data set is the packed data set according to the present invention;
[0048] - In an embodiment of the present invention, the packed data set may only contain the data packets formed and assembled in step c) of the method for compression. In this embodiment, the device for compression and the device for decompression may be set for the same operating parameters, such as image size, number of vertical and horizontal DWT decompositions, decorrelation transform type, sampling mode, etc. In another embodiment, in addition to the data packets formed in step c) of the method for compression, the packed data set may also include metadata specifying the operating parameters for compression. Such metadata may be located in one header associated with the entire packed data set, or in several headers each associated with a data packet of the packed data set, or both;
[0049] - grouping all samples of component k located in row i of the reference grid in one or more data packets may include: considering all samples of component k present in row i (if any) and forming one or more new data packets with these samples, the one or more new data packets not already present in the packed data set, each sample being assigned to one data packet. If there are no samples of component k in row i, no new data packets may be formed for component k for row i;
[0050] - Step c) of the method for compression of the present invention is expressed in pseudo code. Below is an equivalent expression of the same step c) of the method in more everyday language. A first repetition loop is performed for each consecutive row i of the reference grid (i.e. the row index i from 0 up to the row index of the last row). In each execution of this first loop, a second repetition loop is performed for each component k (i.e. for each value of the component index k). In each execution of this second loop, two steps are performed in succession: (i) first, all samples of the current component k located in the current row i of the reference grid are grouped in one or more data packets that do not yet exist in the packed data set, each sample being assigned to a data packet; (ii) then, the one or more data packets formed in step (i) are appended to the packed data set. It can be inferred from the method for compression of the present invention that the data packets formed in step (i) do not yet exist in the packed data set. If there are no samples of the current component k in the current row i, then no new data packets are formed in step (i) of the method, and therefore no data packets can be appended to the packed data set in step (ii) of the method;
[0051] - the subbands, component images and decomposed component images consist of even rows with even numbered samples and odd numbered samples followed by odd rows with even numbered samples and odd numbered samples;
[0052] - In the case of decorrelation transform and lifting scheme operations performed on pixel locations near the image boundary, when samples outside the image boundary are needed to perform calculations, the values of samples at mirrored positions relative to the image boundary as the missing samples can be taken as substitutes;
[0053] - when performing a lifting scheme operation, assigning low frequency samples to even numbered positions and assigning high frequency samples to odd numbered positions is equivalent to assigning high frequency samples to even numbered positions and assigning low frequency samples to odd numbered positions;
[0054] - When performing a bidirectional (i.e. vertical and horizontal) DWT decomposition, performing the vertical DWT decomposition first and then the horizontal DWT decomposition is equivalent to performing the horizontal DWT decomposition first and then the vertical DWT decomposition;
[0055] -When performing the decorrelation transformation of step a), the linear combination can be taken from the immediately adjacent pixels (i' is included between i-1 and i+1, and j' is included between j-1 and j+1), or from the more distant neighboring pixels (i' is included between i-2 and i+2, and j' is included between j-2 and j+2), or from the more distant neighboring pixels (i' is included between i-3 and i+3, and j' is included between j-3 and j+3).
[0056] In a preferred embodiment, the number of vertical DWT decompositions Nlky is equal to 0 or 1.
[0057] Between step b) and step c), entropy encoding of the data may be performed.
[0058] The entropy encoding may include entropy encoding of bit-plane counts of groups of samples.
[0059] The steps of grouping the bit-plane counts for groups of samples and grouping the data representing the bit-planes may be performed.
[0060] In the sampling mode, each pixel position may include samples arranged in a Bayer pattern, where for each even i and j coordinate in the reference grid, a red pixel R is at position (i, j), a first green pixel G1 is at position (i, j+1), a second green pixel G2 is at position (i+1, j), and a blue pixel B is at position (i+1, j+1), and the decorrelation transform produces a component image C0 for the position of the red pixel, a component image C1 for the position of the first green pixel, a component image C2 for the position of the second green pixel, and a component image C3 for the position of the blue pixel.
[0061] In the sampling mode, each pixel position may include samples arranged in a 4:4:4 pattern, where for each i and j coordinates in the reference grid, the luma pixel Y, the blue chroma pixel Cb and the red chroma pixel Cr or the red pixel R, the green pixel G and the blue pixel B are superimposed at the position (i, j), and the decorrelation transform generates a component image C0 for the position of the luma pixel or the red pixel, generates a component image C1 for the position of the blue chroma pixel or the green pixel, and generates a component image C2 for the position of the red chroma pixel or the blue pixel.
[0062] In the sampling mode, each pixel position may include samples arranged in a 4:2:2 pattern, where for each i coordinate and each even j coordinate in the reference grid, the luma pixel Y, the blue chroma pixel Cb and the red chroma pixel Cr are arranged at position (i, j), and the luma pixel Y is arranged at position (i, j+1), and the decorrelation transform generates a component image C0 for the position of the luma pixel, a component image C1 for the position of the blue chroma pixel, and a component image C2 for the position of the red chroma pixel.
[0063] The decorrelation transform may be an identity mapping, where each sample of the color image is mapped to a corresponding location on the component image.
[0064] The decorrelation transform can also be an inline or full Star-Tetrix transform. The inline and full Star-Tetrix transforms are described in Annex F of Reference 1.
[0065] According to a second aspect of the present invention, there is provided a device for compressing a color image into a packed data set, the color image comprising color image samples Sij arranged in a reference grid according to a sampling pattern, the reference grid comprising a plurality of rows and columns, the row index i starting from 0 and increasing with the row, and the column index j starting from 0 and increasing with the column, the device comprising:
[0066] a) an electronic component configured to perform step a) of the compression method;
[0067] b) an electronic component configured to perform step b) of the compression method;
[0068] c) An electronic component configured to perform step c) of the compression method.
[0069] According to a third aspect of the present invention, there is provided a computer program comprising instructions which, when executed by a computer, causes the computer to perform the steps of the method for compressing of the present invention.
[0070] According to a fourth aspect of the present invention, there is provided a packed data set obtainable by compressing a color image using the method for compression of the present invention, the packed data set comprising a sequence of data packets having the following characteristics:
[0071] - Each data packet contains data from only a single decomposed component image;
[0072] - Each data packet contains only data from a single row of the decomposed component images;
[0073] - All data packets containing data from a given row of a decomposed component image precede in said packed data set any data packet containing data from a subsequent row of any decomposed component image.
[0074] According to a fifth aspect of the present invention, there is provided a method for decompressing a packed data set obtainable by executing the method for compressing of the present invention, the method comprising the following steps:
[0075] - unpacking the data packets included in the packed data set;
[0076] -Perform inverse DWT decomposition;
[0077] -Perform an inverse decorrelation transform.
[0078] According to a sixth aspect of the present invention, there is provided a device for decompressing a packed data set obtainable by executing the method for compressing of the present invention, the device comprising electronic components configured to perform the following:
[0079] - unpacking the data packets included in the packed data set;
[0080] -Perform inverse DWT decomposition;
[0081] -Perform an inverse decorrelation transform.
[0082] According to a seventh aspect of the present invention, there is provided a computer program comprising instructions which, when executed by a computer, causes the computer to perform the steps of the method for decompression of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] These and further aspects of the invention will be explained in more detail by way of example and with reference to the accompanying drawings, in which:
[0084] Figure 1 A portion of a color image is schematically shown, and the sampling pattern is the Bayer pattern;
[0085] Figure 2a Schematically shows the Figure 1A component image obtained by decorrelation transformation of the color image, wherein each component sample Ckij is represented at the position (i, j) where the component sample is determined in the reference grid;
[0086] Figure 2b Schematically shows the Figure 1 A component image obtained by decorrelation transforming the color image of the component image, wherein the component image samples are grouped in the component image;
[0087] Figure 3 2 but with a single vertical DWT decomposition applied to component images C0, C1 and C3 and without decomposition applied to component image C2, wherein each component sample Ckij is represented at the position (i, j) at which the component sample is determined in the reference grid;
[0088] Figure 4 Schematically shows the Figure 3 The same but with a single horizontal DWT decomposition applied to component images C0, C1 and C3 and without the decomposition applied to component image C2, wherein each component sample Ckij is represented at the position (i, j) in the reference grid where the component sample is determined;
[0089] Figure 5 Schematically shows the Figure 3 the same but with a single horizontal DWT decomposition applied to component images C0, C1 and C3 and without the decomposition applied to component image C2, wherein the component image samples are grouped in the component images, and wherein the samples are grouped by subband in each component image; only data for component image C0 is represented;
[0090] Figure 6 Schematic representation of how the DWT decomposition uses a (5, 3) filter bank to perform a lifting scheme on a row of samples;
[0091] Figure 7 Schematically represents the subbands generated after performing 5 horizontal DWT decompositions on the component images without performing vertical DWT decomposition;
[0092] Figure 8 Schematically shows the Figure 7 sub-bands in the case where component images C0, C1 and C3 are decomposed as shown, while component image C2 is not decomposed, and numbered arrows defining samples for forming data packets and serializing them into a packed data set according to the present invention;
[0093] Fig. 9 Schematically represents the subbands generated by performing one vertical DWT decomposition after five horizontal DWT decompositions of the component images;
[0094] Fig.10 Schematically shows the Fig. 9 sub-bands in the case where component images C0, C1 and C3 are decomposed as shown, while component image C2 is not decomposed, and numbered arrows defining samples for forming data packets and serializing them into a packed data set according to the present invention;
[0095] Fig.11 Schematically shows the Fig. 9 subbands in the case where component images C0, C1 and C3 are decomposed as shown, while component image C2 is not decomposed, and numbered arrows defining samples used to form data packets and serialize them into a packed data set according to the JPEG XS standard;
[0096] Fig.12 Schematic representation of the subbands generated in the case of performing 1 vertical and 5 horizontal DWT decompositions per component image for a 3-component image with a 4:4:4 sampling pattern, showing how data packets are formed and serialized into a packed data set according to the JPEG XS standard (upper figure) and the present invention (lower figure);
[0097] Fig.13 Schematic representation of the subbands generated in the case of performing 1 vertical and 5 horizontal DWT decompositions per component image for a 3-component image with a 4:2:2 sampling pattern, showing how data packets are formed and serialized into a packed data set according to the JPEG XS standard (upper figure) and the present invention (lower figure);
[0098] Fig.14 depicts a device for compressing color images;
[0099] Fig.15 A device for decompressing color images is depicted.
[0100] Figure 16 panel a) schematically shows Figure 4 ) schematically shows the grouping of samples of the first four rows of the image in data packets, while panel b) schematically represents the order in which the data packets are appended to the packed data set in a progressive order according to the present invention.
[0101] Figure 17 panel a) schematically shows Figure 4 ) schematically shows the grouping of samples of the first four rows of the image in data packets, while panel b) schematically represents the order in which the data packets are appended to the packed data set according to the progressive order of the JPEG XS standard. DETAILED DESCRIPTION
[0102] Figure 1is a schematic example of a color image obtained from an image sensor with a Bayer pattern. The reference grid represented by the square includes eight columns (column index j from 0 to 7) and six rows (row index i from 0 to 5), and the coordinates of the upper left corner are (0, 0). According to the Bayer pattern, each pixel position (i, j) can contain a red sample, a first green sample, a second green sample, or a blue sample. For example, reference numeral 1 represents a blue sample at reference grid position (1, 1), and reference numeral 3 represents a red sample at reference grid position (2, 4). In a real image, the number of columns and rows may be larger, such as 4096×2160.
[0103] Figure 2a is a representation of the data obtained after the decorrelation transformation, in which the red sample, the first green sample, the second green sample, and the blue image sample are replaced by samples of component images C0, C1, C2, and C3, respectively. Figure 2a As depicted, a decorrelation transform can produce a grid of component samples of the same size as the reference grid. The transform that produces a given component sample is centered around the corresponding color image sample. Thus, the spatial arrangement of the input samples is preserved by the transform.
[0104] Here is a non-exhaustive list of such decorrelation transforms:
[0105] - an identity mapping, where each sample in the input grid is mapped to a corresponding position on the output grid, i.e., for any position (i, j) in the input / output grid, C0ij = Rij; C1ij = G1ij; C2ij = G2ij; C3ij = Bij;
[0106] - Star-Tetrix transformation within the line;
[0107] -Full Star-Tetrix transformation.
[0108] Appendix F of Reference 1 describes the inline Star-Tetrix transformation and the full Star-Tetrix transformation. Figure 2a In , the samples of the component images are located at the positions of the corresponding color image samples in the reference grid. Figure 2b In , the four different component images C0, C1, C2 and C3 are represented in a way that is independent of the reference grid. However, using the knowledge of the sampling pattern and the decorrelation transform, the position (i, j) of a given component sample in the reference grid that yields that component image can be determined. For example, Figure 2b The reference numeral 2 of sample C2 on the Figure 2a The sample of component image C2 at the reference grid position (3, 2) corresponds to the sample of component image C2 at the reference grid position (3, 2).
[0109] Figure 3is a representation of the data obtained after applying a single vertical DWT decomposition to component images C0, C1, and C3, but not applying decomposition to component image C2. For component images C0, C1, and C3, subband LL0 and subband LH0 are created. For component images C0 and C1, subband LL0 appears on grid rows 0 and 4, and subband LH0 appears on grid row 2. For component image C3, these subbands appear on the row below. For component image C2, no DWT decomposition was performed, so the original samples of component image C2 are retained. The subscripts have the following meanings: LL = low frequency subband; LH = high frequency subband; E = even row; O = odd row.
[0110] Figure 4 is after applying one horizontal and one vertical DWT decomposition to component images C0, C1 and C3, but not to component image C2 (i.e. Figure 3 1 . The LL0 subband of each component image is decomposed into a new LL0 subband and HL0 subband. The LH0 subband of each component image is decomposed into a new LH0 subband and HH0 subband. Each sample is located at the position (i, j) that determines the sample in the reference grid.
[0111] Figure 5 is after applying one horizontal and one vertical DWT decomposition to component images C0, C1 and C3, but not to component image C2 (i.e. Figure 3 1, C1, and C3) on the data of , where the samples are first grouped by component and then all samples for a given component are grouped by subband. Only the data for component 0 is represented in this figure. The LL0 subband appears in the four locations in the upper left corner. The HL0 subband appears in the four locations in the upper right corner. The LH0 subband appears on the left side of the last row, and the HH0 subband appears on the right side of the last row. Similar representations can be obtained for component 1 and component 3. For the undecomposed component 2, the image is Figure 2b The C2 part. Figure 5 The decomposed component images of component 0 are presented.
[0112] When performing the decorrelation transform in step a) of the method and the continuous DWT decomposition in step b) of the method, it is required that the samples obtained by the transform and decomposition maintain a reference to the position (i, j) of these samples determined in the reference grid. This can be achieved in different ways; three possible embodiments are described below:
[0113] - In a first embodiment, each sample resulting from the transform or decomposition may be stored together with a value (i, j) defining the position of the sample in the reference grid. This is performed for each operation of the decorrelating transform and for each successive DWT decomposition.
[0114] In a second embodiment, the obtained samples are grouped and stored by components and sub-bands, such as Figure 5 shown.
[0115] - In a third embodiment, the samples resulting from the transformation or decomposition are stored in an array according to the (i, j) positions of these samples in the reference grid, i.e. with the same row and column coordinates as the original data. The array may have the same size as the original color image, or may even be the original color image itself, in which case the transformation and decomposition are so-called "in-place" transformation and decomposition. Figure 2a , Figure 3 , Figure 4 and Fig.16a Such an array is shown with the same size as the original color image.
[0116] According to the embodiment, step c) of the method is performed as follows:
[0117] - in a first embodiment, step c) of the method is performed by extracting from a memory the samples corresponding to each consecutive row and each component of the reference grid;
[0118] - In a second embodiment, step c) of the method is performed based on an address conversion between an address in the memory and a position (i, j) in the reference grid. For example, if the color image is Figure 1 The image is then:
[0119] ο The pixel at the position (1, 1) in the color image can be determined ( Figure 1 The reference numeral 1) in the figure corresponds to Figure 2b The 30th sample after the component image starts ( Figure 2b 2);
[0120] οYou can also target Figure 5 The storage of the subbands on determines a similar correspondence: the pixel at position (2, 4) in the color image ( Figure 1 The reference numeral 3) on the right corresponds to the sample at position (2, 4) in the image after DWT decomposition. Figure 4 4 on the figure, a sample of the subband LH0 of the component image C0), and also corresponds to the sample located at the position (2, 1) in the subband image of the component image C0 ( Figure 5 5);
[0121] - In a third embodiment, step c) of the method is performed by scanning the memory line by line. For example, if the color image is Figure 1 The image can be scanned line by line Figure 4 to perform step c) using the array in .
[0122] Fig.16a A representation of data obtained after applying a series of image transforms to an example color image comprising color image samples arranged in a reference grid and obtained from an image sensor having a Bayer pattern, such as Figure 1 The first four rows of the image are shown in Figure 1. The series of image transformations include:
[0123] a) performing decorrelation transformation on the color image to generate component images C0, C1, C2 and C3, as shown in FIG. Figure 2a and executed as in step a) of the method for compression of the present invention;
[0124] b) performing a vertical and a horizontal DWT decomposition on the component images C0, C1 and C3, while not decomposing the component image C2, thereby generating decomposed component images, as shown in FIG. Figure 4 The first four rows of the image are shown and are performed as in step b) of the method for compression according to the present invention.
[0125] Each sample is located at the position (i, j) that defines that sample in the reference grid.
[0126] Fig.16a and Fig.16b Together there is provided a representation of carrying out step c) of the method for compression of the invention, wherein: Fig.16a Step (i) is presented, and Fig.16b Step (ii) is shown:
[0127] c) for each consecutive row i of the reference grid,
[0128] For each component k,
[0129] (i) grouping all samples of the component k in the row i into one or more data packets;
[0130] (ii) appending the one or more data packets to the packed data set.
[0131] The first row of the reference grid is first scanned. The four samples of component 0, C0_LL0, C0_HL0, C0_LL0, C0_HL0, are found and grouped in one or more packets. In this example, a single packet (packet 0) is formed and appended to the packed data set. Subsequently, four samples of component 1 are found on the first row and processed in a similar manner to form packet 1. No other components are found on the first row of the reference grid. The second row of the reference grid is then scanned and packets 2 and 3 are formed from the samples of components 2 and 3 in a similar manner. This is performed until all rows of the reference grid have been processed, resulting in a packed data set containing 8 packets.
[0132] The order in which the data packets are formed and appended to the packed data set is in accordance with the progressive order of the present invention: for each consecutive row i of the reference grid, for each component k, all samples of the component k in the row i are grouped in one or more data packets; and the one or more data packets are appended to the packed data set.
[0133] For each row of the reference grid, the background fill of the cell of the reference grid indicates the packet that the sample associated with that cell is grouped into. The number associated with the packet indicates the serialization order of the packet in the packed dataset, with packets associated with smaller numbers being added to the packed dataset first.
[0134] This example applies to a four-component image with four rows and eight columns, where a single vertical and a single horizontal DWT decomposition is performed on three of the component images and no decomposition is performed on one component image. Other examples where the images have different numbers of components, rows, or columns and different numbers of vertical or horizontal DWT decompositions are performed on these images will also show similar characteristics, including the differences from the JPEG XS standard discussed below.
[0135] In this example, step (i) of the method generates a single data packet for each component k present in each row i of the reference grid. In another example of the method, multiple data packets may be generated in step (i) for each component k present in each row i of the reference grid. For example, Fig.16a The data packet 0 above may be replaced by two data packets, thereby including samples C0_LL0, C0_LL0 in the first data packet and samples C0_HL0, C0_HL0 in the second data packet, respectively.
[0136] Fig.16a Provides Fig.10 Equivalent description of the progressive sequence of the present invention, wherein the obvious difference is that in Fig.16aThe middle component images C0, C1 and C3 are decomposed by a single vertical and a single horizontal DWT decomposition, while Fig.10 In the decomposition, a single vertical and five horizontal DWT decompositions are used. Another difference is that Fig.16a In , samples are represented on a reference grid, while in Fig.10 In , samples are grouped by components and subbands.
[0137] Fig.17a Provided in Fig.16a A representation of the data obtained by applying the same image transformation to the same color image represented in. Each sample is located at the position (i, j) that determines the sample in the reference grid.
[0138] FIG. 17 further provides a representation of the grouping of the data in a data packet ( Fig.17a ) and the order in which the data packets are appended to the packed data set according to the progressive order of the JPEG XS standard after adjustment as shown in Table B.10 of Reference 1 ( Fig.17b ) is represented by . The difference between Table B.10 of Reference 1 and FIG. 17 is the number of horizontal DWT decompositions used for the decomposed component images: the horizontal DWT of Table B.10 is decomposed five times, while the horizontal DWT of FIG. 17 is decomposed once.
[0139] The background fill of a cell of the reference grid indicates the packet that the sample associated with that cell is grouped into. The number associated with a packet indicates the serialization order of the packet in the packed data set, with packets associated with smaller numbers being added to the packed data set first.
[0140] It can be observed that there are several differences between the data packets formed according to the progressive order of the JPEG XS standard (as shown in FIG. 17 ) and the data packets formed according to the progressive order of the present invention (as shown in FIG. 16 ). The first difference is that according to the progressive order of the JPEG XS standard, the data packets may contain samples from multiple components, while according to the progressive order of the present invention, the data packets only contain samples from a single component. The second difference is that according to the progressive order of the JPEG XS standard, the data packets may contain samples from several rows of a reference grid, while according to the progressive order of the present invention, the data packets only contain samples from a single row of the reference grid. These differences lead to advantages of the method of the present invention compared to the method of the JPEG XS standard. These advantages will be discussed below.
[0141] Fig.17a Provides Fig.11 Equivalent description of the progressive sequence of the JPEG XS standard, with the notable difference that in Fig.17a The middle component images C0, C1 and C3 are decomposed by a single vertical and a single horizontal DWT decomposition, while Fig.11 In the decomposition, a single vertical and five horizontal DWT decompositions are used. Another difference is that Fig.17a In , samples are represented on a reference grid, while in Fig.11 In , samples are grouped by components and subbands.
[0142] Figure 6 Depicts how to perform horizontal DWT decomposition on a sample row containing even (E) and odd (O) sample sequences by decomposing the sequence into high-pass (H) and low-pass (L) subbands. First, the odd samples are replaced by performing a lifting scheme using a (5, 3) filter bank on the sample row. The resulting odd-numbered samples are the H (high spatial frequency) subband, whose equation is
[0143] H i =O i -1 / 2*(E i-1 +E i+1 ).
[0144] Then replace the even samples by doing
[0145] L i =E i +1 / 4*(H i-1 +H i+1 ),
[0146] This results in the L (low spatial frequency) subband. As is well known, the above formulas for interchanging odd and even samples are equivalent. When samples outside the image are needed, the corresponding samples at the mirrored positions within the image relative to the boundary are obtained. This results in the factor of +1 / 2 instead of +1 / 4 at the lower left side of the figure (arrow pointing from H to L), and the factor of -1 instead of -1 / 2 at the upper right side of the figure (arrow pointing from E to H).
[0147] exist Figure 8 , Fig.10 , Fig.11 , Fig.12 and Fig.13 In , numbered arrows represent data packets, and the associated numbers indicate the serialization order in the packed data set, i.e., the order in which the data packets are appended to the packed data set; data packets associated with smaller numbers are serialized before data packets associated with larger numbers. A data packet regroups all samples of all subbands covered by the corresponding arrow starting from the tail of the arrow to its head.
[0148] Fig.14An apparatus 20 for compressing a color image is depicted, the apparatus comprising: a module 21 for performing a decorrelation transform on the color image to produce a component image; a module 22 for performing a DWT decomposition on the component image to produce a decomposed component image; and a module 23 for packetizing the decomposed component image to produce a packed data set. Each of these modules may include hardware such as gates and registers, FPGAs, ASICs, and / or microcontrollers.
[0149] Fig.15 An apparatus 30 for decompressing a packed data set is depicted, the apparatus comprising: a module 31 for depacketizing the packed data set to produce decomposed component images; a module 32 for performing an inverse DWT decomposition on the decomposed component images to produce component images; and a module 33 for performing an inverse decorrelation transform on the component images to produce a color image. Each of these modules may include hardware such as gates and registers, FPGAs, ASICs, and / or microcontrollers.
[0150] Example 1
[0151] In a first exemplary embodiment of the invention, the color image is sampled according to the Bayer pattern. In step b) of the method, for all component images, the number of vertical resolutions Nlky is equal to zero, for component images C0, C1 and C3, the number of horizontal resolutions Nlkx is equal to 5, and for component image C2, the number of horizontal resolutions Nlkx is equal to zero. Figure 7 is a representation of the sub-bands obtained after performing this decomposition on the component images C0, C1 and C3. Figure 8 Four decomposed component images are represented together. According to the present invention, the continuous data packets formed contain samples corresponding to the four numbered arrows marked "0", "1", "2" and "3", representing the result of executing step c) of the method. The first row of the reference grid is analyzed, which includes component 0 and component 1. All samples of component 0 are represented by arrow "0". These samples are packed in the packed data set as data packet "0". The samples of component 1 (arrow "1") are packed in the packed data set as data packet "1". The second row of the reference grid is analyzed in the same way, which includes samples of components 2 and 3 corresponding to arrows "2" and "3", which are packed in data packets "2" and "3" respectively. Subsequent rows of the reference grid are processed in the same way until the last row of the reference grid.
[0152] Example 2
[0153] In a second exemplary embodiment of the present invention, the color image is also sampled according to the Bayer pattern. For component images C0, C1 and C3, the number of vertical resolutions Nlky is equal to one, for component image C2, the number of vertical resolutions Nlky is equal to zero, for component images C0, C1 and C3, the number of horizontal resolutions Nlkx is equal to 5, for component image C2, the number of horizontal resolutions Nlkx is equal to zero. Fig. 9 is a representation of the sub-bands obtained after performing this decomposition on the component images C0, C1 and C3. Fig.10 The four decomposed component images are shown together.
[0154] The arrows numbered "0" to "7" represent the results of performing step c) of the method.
[0155] The first row of the reference grid is analyzed, which includes component 0 and component 1, wherein the samples of arrows "0" and "1" are processed and packed into the packed data set as data packets "0" and "1", respectively.
[0156] The second row of the reference grid is analyzed, which includes component 2 and component 3, wherein the samples of arrows "2" and "3" are processed and packed into the packed data set as data packets "2" and "3", respectively.
[0157] The third row of the reference grid is analyzed, which includes component 0 and component 1, wherein the samples of arrows "4" and "5" are processed and packed into the packed data set as data packets "4" and "5", respectively.
[0158] The fourth row of the reference grid is analyzed, which includes component 2 and component 3, wherein the samples of arrows "6" and "7" are processed and packed into the packed data set as data packets "6" and "7", respectively.
[0159] The subsequent rows of the reference grid are processed in the same manner until the last row of the reference grid.
[0160] Fig.11 Schematically shows the Fig.10 Subbands in a similar case, but where the numbered arrows defining the samples used to form and serialize a data packet are determined according to the JPEG XS standard.
[0161] It can be observed that in the method of the present invention, a given data packet always contains samples from a single component, while under the JPEG XS standard, a data packet may contain samples from multiple components.
[0162] Example 3
[0163] In a third exemplary embodiment of the present invention, the color image is a 3-component image sampled in a 4:4:4 sampling pattern, wherein 1 vertical and 5 horizontal DWT decompositions are performed on each component image. Fig.12 The subbands obtained after the DWT decomposition of all three component images are schematically represented; in the upper part, data packets formed according to the JPEG XS standard and serialized into a packed data set are depicted, and in the lower part, data packets formed according to the method of the present invention and serialized into a packed data set are depicted. Figure 8 As shown, the numbered arrows indicate the grouping of component samples into data packets and the order in which the data packets are appended to the packed data set.
[0164] Example 4
[0165] In a fourth exemplary embodiment of the present invention, the color image is a 3-component image sampled in a 4:2:2 sampling pattern, wherein 1 vertical and 5 horizontal DWT decompositions are performed on each component image. Fig.13 The subbands obtained after the DWT decomposition of all three component images are schematically represented; in the upper part, data packets formed according to the JPEG XS standard and serialized into a packed data set are depicted, and in the lower part, data packets formed according to the method of the present invention and serialized into a packed data set are depicted. Figure 8 As shown, the numbered arrows indicate the grouping of component samples into data packets and the order in which the data packets are appended to the packed data set.
[0166] In order to compare the way in which data packets are formed and appended to a packed data set in the JPEG XS standard and in the present invention, Table 1 shows the subband numbers for an image with 3 components, where each component image is decomposed by 1 vertical and 5 horizontal DWT decompositions. This also applies to Fig.12 and Fig.13 This also applies to 4-component images, where 3 component images are decomposed by 1 vertical and 5 horizontal DWT decompositions, and the 4th component image is not decomposed, as in Fig.10 and Fig.11 situation.
[0167] Table 1
[0168]
[0169] Table 2 shows the table B.6 in reference 1 adjusted for Fig.12 (upper) and Fig.13 (above) JPEG XS progressive sequence of images. Packet index and Fig.12 (upper) and Fig.13(above) corresponds to the numbered arrows.
[0170] Table 2
[0171]
[0172] Table 3 shows the results of the method of the present invention. Fig.12 (Next) and Fig.13 (Below) Progressive order of images. Packet index and Fig.12 (Next) and Fig.13 (below) corresponds to the numbered arrows.
[0173] Table 3
[0174] Packet Index Line Number Subbands included 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)
[0175] Table 4 shows the JPEG XS progressive order for a 4-component image, where 3 component images are decomposed by 1 vertical and 5 horizontal DWT decompositions, and the 4th component image is not decomposed. Adapted from Table B.10 of Reference 1. The undecomposed component images are treated as a single subband with 2 subband lines. Each subband line of the undecomposed component image is included in its own data packet. The subband numbers are given in Table 1. The data packet index is the same as Fig.11 The numbered arrows correspond to the
[0176] Table 4
[0177]
[0178] Figure 5 The progressive order obtained according to the present invention is shown in the same case as Table 4 (i.e., a 4-component image, where 3 component images are decomposed by 1 vertical and 5 horizontal DWT decompositions, and the 4th component image is not decomposed). Fig.10 The numbered arrows correspond to the
[0179] Table 5
[0180] Packet Index Line Number Subbands included 0 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)
[0181] Table 6 provides a comparison of data packet characteristics between the JPEG XS standard and the present invention for the situation addressed in the previous paragraph.
[0182] Table 6
[0183]
[0184] The compression method according to the invention differs from that of the JPEG XS standard and has advantages in several aspects as described in detail below.
[0185] First, compared with the solutions of the prior art, more data packets can be generated according to the present invention while keeping the size of the maximum data packet less than or equal to the size of the minimum data packet in the solutions of the prior art (see Table 6). Smaller data packets allow the size of the data packet buffer to be reduced. The data packet buffer is a memory that accumulates the entire data packet before making it possible to output the data packet, and such a buffer is required, for example, to stabilize the data rate of the packed data set. However, the smaller the data packets in a given packed data set means the more data packets, which increases the fixed cost required to track the metadata associated with the data packets in the packed data set, such as the location and size of each data packet, which can take the form of a data packet header as in the JPEG XS standard. The metadata does not contain any information related to the original color image. Therefore, for a packed data set of a given size, more metadata means lower image quality. Compared with the prior art, the present invention allows a good trade-off between the size and number of data packets, thereby allowing the size of the data packet buffer to be reduced while roughly maintaining the same amount of metadata associated with the data packets.
[0186] Secondly, according to the present invention, a given data packet contains samples from only a single row of a given decomposed component image, and thus contains samples derived from only a single row of the original color image. In contrast, the JPEG XS standard specifies that any data packet containing samples from any DWT-decomposed component image must contain samples from all DWT-decomposed component images. Thus, such a data packet may contain samples derived from several rows of the original color image, for example in the case of the Baye sampling mode (see Fig.11). Having only samples from a single row of the original color image in a given data packet allows the size of the reordering buffer to be reduced compared to the prior art. The reordering buffer is a memory used to accumulate samples after forward decorrelation transform and DWT decomposition at the encoder and output the samples in an order suitable for inverse decorrelation transform and DWT decomposition at the decoder. In fact, due to the algorithmic dependency between DWT decompositions, at the encoder, samples from more DWT decompositions are generated after samples from fewer DWT decompositions are generated. However, at the decoder, the need for such samples from more DWT decompositions precedes the need for samples from fewer DWT decompositions. Therefore, it is necessary to reorder the samples between the encoder and the decoder, which needs to be performed by the reordering buffer. An example of reducing the size of the reordering buffer in the Bayer sampling mode will be described below. In the JPEG XS standard, the reordering buffer needs to accumulate at least two rows of data to output a given data packet, because samples from all DWT decomposed component images need to be included in the data packet, and samples from one of these DWT decomposed component images can only be obtained after two rows of data are processed by DWT decomposition. Additionally, samples from the undecomposed component images are packed after samples from the decomposed component images, which means that these samples from the undecomposed component images must be stored in the reorder buffer until all samples from the decomposed component images are processed. In contrast, according to the present invention, since a given data packet contains only data from a single row of the original color image, the reorder buffer must accumulate data for only a single row. Additionally, samples from the undecomposed component images are processed in the same manner as samples from the decomposed component images, thereby avoiding the need to store samples from the undecomposed component images until all samples from the decomposed component images are processed. These two features allow the size of the reorder buffer to be reduced compared to the prior art.
[0187] Finally, in a hardware implementation of the method in the form of a hardware device, the reduction in buffer size allows for a reduction in die area, thereby reducing the manufacturing cost of the hardware device, thereby providing a more efficient method for compressing and decompressing color images. In a software implementation of the method in the form of a computer program, the reduction in buffer size allows for a reduction in memory usage, thereby reducing the cost and power consumption of a computer executing the computer program, thereby also providing a more efficient method for compressing and decompressing color images.
[0188] The accompanying drawings are neither drawn to scale nor to proportion. Generally, in the accompanying drawings, like parts are represented by like reference numerals.
Claims
1. A method for compressing a color image into a packed data set, the color image comprising color image samples Sij arranged in a reference grid according to a sampling pattern, the reference grid comprising a plurality of rows and columns, an index i starting from 0 and increasing with the row, and an index j starting from 0 and increasing with the column, the method comprising: a) performing a decorrelation transformation, thereby generating component images C0, C1 and C2 and, depending on the sampling mode, a component image C3, wherein a component sample Ckij is determined for each position (i, j) of the reference grid, k is a component index depending on the sampling mode, Ckij is a linear combination of image samples Si'j' at position (i', j'), wherein i' is included between i-4 and i+4 and j' is included between j-4 and j+4; b) Repeat for each component Ck: Nlky is the number of vertical DWT decompositions to be applied to component Ck, an integer >= 0, Nlkx is the number of horizontal DWT decompositions to be applied to component Ck, an integer >= Nlky, The component Ck is regarded as an auxiliary subband; If Nlky>0, for n=0 to Nlky-1, repeat: performing a vertical DWT decomposition on the auxiliary subband by performing a lifting scheme on the columns of the auxiliary subband using a (5, 3) filter bank, the resulting even numbered samples being the LLn subband and the resulting odd numbered samples being the LHn subband, retaining for each resulting sample a reference to a position (i, j) in the reference grid where the resulting sample is determined; performing a horizontal DWT decomposition on the subbands by performing a lifting scheme on the rows of the LLn subbands using a (5, 3) filter bank, the resulting even-numbered samples being the LLn subbands and the resulting odd-numbered samples being the HLn subbands, retaining for each resulting sample a reference to a position (i, j) in the reference grid where the resulting sample is determined; performing a horizontal DWT decomposition on the subbands by performing a lifting scheme on the rows of the LHn subbands using a (5, 3) filter bank, the resulting even numbered samples being the LHn subbands and the resulting odd numbered samples being the HHn subbands, retaining for each resulting sample a reference to a position (i, j) in the reference grid where the resulting sample is determined; Considering subband LLn as auxiliary subband, If Nlkx>Nlky, for n=Nlky to Nlkx-1, repeat: performing a horizontal DWT decomposition on the LLn-1 subband by performing a lifting scheme on the rows of the subband using a (5, 3) filter bank, the resulting even numbered samples being the LLn subband and the resulting odd numbered samples being the HLn subband, retaining for each resulting sample a reference to the position (i, j) at which the resulting sample was determined in the reference grid; and Treat subband LLn as an auxiliary subband; and c) for each consecutive row of the reference grid, For each component Ck, grouping all samples of said component Ck in said row in one or more data packets; and The one or more data packets are appended to the packed data set.
2. The method according to claim 1, wherein: The number of times Nlky of the vertical DWT decomposition is equal to 0 or 1.
3. The method according to claim 1, wherein: Between step b) and step c), entropy encoding of the data is performed.
4. The method according to claim 3, wherein: The entropy encoding includes entropy encoding of bit-plane counts of groups of samples.
5. The method of claim 4, further comprising the steps of grouping bit plane counts for groups of samples and grouping data representing the bit planes.
6. A method according to any one of the preceding claims, wherein: In the sampling mode, each pixel position includes samples arranged in a Bayer pattern, where for each even i and j coordinate in the reference grid, a red pixel R is at position (i, j), a first green pixel G1 is at position (i, j+1), a second green pixel G2 is at position (i+1, j), and a blue pixel B is at position (i+1, j+1) and is juxtaposed, and the decorrelation transform produces a component image C0 for the position of the red pixel, a component image C1 for the position of the first green pixel, a component image C2 for the position of the second green pixel, and a component image C3 for the position of the blue pixel.
7. The method according to any one of claims 1 to 5, wherein: In the sampling mode, each pixel position includes samples arranged in a 4:4:4 pattern, and the 4:4:4 pattern is that for each i and j coordinates in the reference grid, the luma pixel Y, the blue chroma pixel Cb and the red chroma pixel Cr or the red pixel R, the green pixel G and the blue pixel B are superimposed at the position (i, j), and the decorrelation transform generates a component image C0 for the position of the luma pixel or the red pixel, generates a component image C1 for the position of the blue chroma pixel or the green pixel, and generates a component image C2 for the position of the red chroma pixel or the blue pixel.
8. The method according to any one of claims 1 to 5, wherein: In the sampling mode, each pixel position includes samples arranged in a 4:2:2 pattern, and the 4:2:2 pattern is that for each i coordinate and each even j coordinate in the reference grid, the luma pixel Y, the blue chroma pixel Cb and the red chroma pixel Cr are arranged at the position (i, j), and the luma pixel Y is arranged at the position (i, j+1), and the decorrelation transform generates a component image C0 for the position of the luma pixel, a component image C1 for the position of the blue chroma pixel, and a component image C2 for the position of the red chroma pixel.
9. The method according to any one of claims 1 to 5, wherein: The decorrelation transform is an identity mapping, and wherein each sample of the color image is mapped to a corresponding location on the component images.
10. The method according to any one of claims 1 to 5, wherein: The decorrelation transform is an inline Star-Tetrix transform.
11. The method according to any one of claims 1 to 5, wherein: The decorrelation transform is a complete Star-Tetrix transform.
12. A device for compressing a color image into a packed data set, the color image comprising color image samples Sij arranged in a sampling pattern in a reference grid, the reference grid comprising a plurality of rows and columns, an index i starting from 0 and increasing with the row, and an index j starting from 0 and increasing with the column, 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 to perform step c) of the method of claim 1.
13. A non-transitory computer readable medium comprising instructions, which, when executed by a computer, cause the computer to perform the steps of the method of claim 1.
14. A method for decompressing a packed data set obtainable by executing the method according to claim 1, the method for decompressing comprising: Unpacking the data packets included in the packed data set; Perform inverse DWT decomposition; as well as Perform an inverse decorrelation transform.
15. A non-transitory computer readable medium comprising instructions which, when executed by a computer, cause the computer to perform the steps of the method of claim 14.
16. A device for decompressing a packed data set obtainable by executing the method according to claim 1, the device comprising: One or more electronic components configured to: Unpacking the data packets included in the packed data set; performing an inverse DWT decomposition; and Perform an inverse decorrelation transform.
17. A method for compressing a color image into a packed data set, the color image comprising color image samples Sij arranged in a reference grid according to a sampling pattern, the reference grid comprising a plurality of rows and columns, an index i starting from 0 and increasing with the row, and an index j starting from 0 and increasing with the column, the method comprising: a) performing a decorrelation transformation, thereby generating component images C0, C1 and C2 and, depending on the sampling mode, a component image C3, wherein a component sample Ckij is determined for each position (i, j) of the reference grid, k is a component index depending on the sampling mode, Ckij is a linear combination of image samples Si'j' at position (i', j'), wherein i' is included between i-4 and i+4 and j' is included between j-4 and j+4; b) Repeat for each component Ck: Nlky is the number of vertical DWT decompositions to be applied to component Ck, an integer >= 0, Nlkx is the number of horizontal DWT decompositions to be applied to component Ck, an integer >= Nlky, The component Ck is regarded as an auxiliary subband; If Nlky>0, for n=0 to Nlky-1, repeat: performing a vertical DWT decomposition on the auxiliary subband by performing a lifting scheme on the columns of the auxiliary subband using a (5, 3) filter bank, the resulting even numbered samples being the LLn subband and the resulting odd numbered samples being the LHn subband, retaining for each resulting sample a reference to a position (i, j) in the reference grid where the resulting sample is determined; performing a horizontal DWT decomposition on the subbands by performing a lifting scheme on the rows of the LLn subbands using a (5, 3) filter bank, the resulting even-numbered samples being the LLn subbands and the resulting odd-numbered samples being the HLn subbands, retaining for each resulting sample a reference to a position (i, j) in the reference grid where the resulting sample is determined; performing a horizontal DWT decomposition on the subbands by performing a lifting scheme on the rows of the LHn subbands using a (5, 3) filter bank, the resulting even numbered samples being the LHn subbands and the resulting odd numbered samples being the HHn subbands, retaining for each resulting sample a reference to a position (i, j) in the reference grid where the resulting sample is determined; Consider subband LLn as an auxiliary subband, if Nlkx>Nlky, for n=Nlky to Nlkx-1, repeat: performing a horizontal DWT decomposition on the LLn-1 subband by performing a lifting scheme on the rows of the subband using a (5, 3) filter bank, the resulting even numbered samples being the LLn subband and the resulting odd numbered samples being the HLn subband, retaining for each resulting sample a reference to the position (i, j) at which the resulting sample was determined in the reference grid; and Treat subband LLn as an auxiliary subband; and c) for each consecutive row of the reference grid, For each component Ck, grouping all samples of said component Ck in said row in one or more data packets; and appending the one or more data packets to the packed data set, wherein the packed data set comprises: A sequence of packets wherein each of the packets contains data only from a single component image; wherein each of the packets contains data only from a single row of a component image, and wherein all packets containing data from a given row of a component image precede any packets containing data from a subsequent row of any component image in the packed data set.