Image compressing method based on JPEG-LS
An image compression method based on JPEG-LS is presented. In the method, the M×N pixels in the source image are divided into k groups. M, N, and k are all integers larger than one. Each group corresponds to a plurality of pixels among the M×N pixels. The decorrelation procedure and the context modeling procedure are performed for each of the plurality of pixels in the i th group of the k groups. The compensation look-up table is not refreshed until all pixels in the i th group are performed with the decorrelation procedure and the context modeling procedure.
1. An image compression method based on JPEG-LS performed by a computer hardware, comprising:
dividing M×N pixels in a source image into k groups, wherein M, N, and k are integers larger than one, and each of the groups corresponds to a plurality of pixels among the M×N pixels;
performing a decorrelation procedure and a context modeling procedure for each of the pixels in i th group of the k groups;
not refreshing a compensation look-up table corresponding to the context modeling procedure before the decorrelation procedure and the context modeling procedure for the plurality of pixels in the i th group are accomplished; and
refreshing the compensation look-up table after the decorrelation procedure and the context modeling procedure for the plurality of pixels in the i th group are accomplished.
2. The method in claim 1 , wherein M is an amount of rows of the pixels in the source image, and N is an amount of columns of the pixels in the source image.
3. The method in claim 2 , wherein k is larger than or equal to N.
4. The method in claim 2 , wherein, in the step of dividing the M×N pixels in the source image into the k groups, each of the M rows of pixels in the source image is divided into x sub-groups, and x is a positive factor of N.
5. The method in claim 1 , wherein an amount of the pixels in each of the groups is 2P, and p is a positive integer.
6. The method in claim 5 , wherein the amount of the pixels in each of the groups is larger than or equal to 2.
7. The method in claim 1 , wherein, in the step of performing the decorrelation procedure and the context modeling procedure for each of the pixels in the i th group of the k groups, the decorrelation procedure and the context modeling procedure are both performed for each of the pixels in parallel.
8. The method in claim 1 , wherein the step of performing the decorrelation procedure and the context modeling procedure for each of the pixels in the i th group of the k groups comprises:
determining whether each of the pixels in the (i−1) th group is performed with the decorrelation procedure and the context modeling procedure;
when the decorrelation procedure and the context modeling procedure are not performed for each of the pixels in the (i−1) th group, performing the decorrelation procedure and the context modeling procedure for each of the pixels in the (i−1) th group;
when the decorrelation procedure and the context modeling procedure are performed for each of the pixels in the (i−1) th group, performing the decorrelation procedure and the context modeling procedure for each of the pixels in the ith group; and
increasing a value of i.