METHOD AND APPARATUS FOR ENCODING AND DECODING LISTS OF PIXELS
The present disclosure relates to methods and apparatus for encoding and decoding pixel lists of an image. The pixels of an image are clustered according to at least one relationship. Clusters are stored as pixel lists. An integer matrix of the same size as the image is generated. A pixel of the image at the first index belongs to one list. The next pixel in the list has a second index. An integer is calculated according to the two indices and is stored at the first index in the matrix. The matrix may be compressed according to a lossless compression method. At decoding, a pixel with a first index in the image is associated with a pixel list. A second index is calculated according to the integer at the first index in the matrix and the pixel at the second index in the image is added to the list.
1 . A method of encoding lists of pixels of an image in a matrix of integers, said matrix having a size equal to a size of said image, the method comprising, for a first pixel at a first index in the image, said first pixel belonging to a list of said pixel lists:
obtaining a second pixel at a second index in the image, said second pixel being next to said first pixel in said list; and
encoding an integer relative to said first index and/or said second index at the first index in the matrix.
2 . The method according to claim 1 wherein said lists of pixels are sorted in ascending or descending order of indices of pixels of said lists of pixels.
3 . The method according to claim 1 wherein said integer to be encoded is the second index.
4 . The method according to claim 1 wherein said integer to be encoded is the difference between the second index and the first index.
5 . The method according to claim 1 , further comprising compressing the matrix with an image lossless compression method.
6 . The method according to claim 1 , further comprising transmitting the image associated with the matrix to a destination medium.
7 . A method of decoding lists of pixels of an image from a matrix of integers, said matrix having a size equal to a size of said image, the method comprising, for a first pixel at a first index in the image, said first pixel belonging to a list of said lists of pixels:
calculating a second index according to said first index and/or an integer at the first index in the matrix; and
setting a second pixel at the second index in the image as a pixel next to first pixel in the list.
8 . The method according to claim 7 wherein said second index is the integer at first index in the matrix.
9 . The method according to claim 7 wherein said second index is the summing of the first index with the integer at the first index in the matrix.
10 . The method according to claim 7 , wherein said list is created and initialized with said first pixel.
11 . The method according to claim 7 , first comprising decompressing the matrix with an image lossless compression method.
12 . The method according to claim 7 , first comprising receiving the image associated with the matrix from a source medium.
13 . An apparatus configured for encoding lists of pixels of an image in a matrix of integers, said matrix having a size equal to a size of said image, the apparatus comprising a memory associated with at least one processor configured to, for a first pixel at a first index in the image, said pixel belonging to a list of said pixel lists:
obtain a second pixel at a second index in the image, said second pixel being next to said first pixel in said list; and
encode an integer relative to said first index and/or said second index at the first index in the matrix.
14 . The apparatus according to claim 13 wherein said processor is configured to sort said lists of pixels in ascending or descending order of indices of pixels of said lists of pixels.
15 . The apparatus according to claim 13 wherein said integer to be encoded is the second index.
16 . The apparatus according to claim 13 wherein said integer to be encoded is the difference between the second index and the first index.
17 . The apparatus according to claim 13 , said processor is configured to compress the matrix with an image lossless compression method.
18 . An apparatus configured for decoding lists of pixels of an image from a matrix of integers, said matrix having a size equal to a size of said image, the apparatus comprising, a memory associated with at least one processor configured to, for a first pixel at a first index in the image, said pixel belonging to a list of said lists of pixels:
calculate a second index according to said first index and/or an integer at the first index in the matrix; and
set a second pixel at the second index in the image as a pixel next to the first pixel in the list.
19 . The apparatus according to claim 18 wherein said second index is the integer at first index in the matrix.
20 . The apparatus according to claim 18 wherein said second index is the summing of the first index with the integer at the first index in the matrix.
21 . The apparatus according to claim 18 , wherein said processor is configured to create and initialize said list with said first pixel.
22 . The apparatus according to one of claim 18 , first comprising decompressing the matrix with an image lossless compression method.
23 . The apparatus according to one of claim 18 , first comprising receiving the image associated with the matrix from a source medium.