IE970441A1 - Compression of image data - Google Patents

Compression of image data

Info

Publication number
IE970441A1
IE970441A1 IE970441A IE970441A IE970441A1 IE 970441 A1 IE970441 A1 IE 970441A1 IE 970441 A IE970441 A IE 970441A IE 970441 A IE970441 A IE 970441A IE 970441 A1 IE970441 A1 IE 970441A1
Authority
IE
Ireland
Prior art keywords
image data
samples
sample
template
block
Prior art date
Application number
IE970441A
Inventor
Noel Brady
Liam Ward
Tommy Curran
Noel Murphy
Original Assignee
Univ Dublin City
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Univ Dublin City filed Critical Univ Dublin City
Priority to IE970441A priority Critical patent/IE970441A1/en
Publication of IE970441A1 publication Critical patent/IE970441A1/en

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Image data such as binary mask image data is compressed by partitioning the data into blocks. The arithmetic encoder is initiated for each block and terminated at the end of the block. For each block, there is a fixed template/PDF table pair model which is chosen at the beginning of the block according to motion compensation and other inputs. One model has a template with spatially-correlating samples only, the other having both temporally and spatially-correlating samples. Estimations are made for values of samples which border the current block according to simple rules for the particular template. <Fig.1>

Description

The invention relates to compression and decompression of binary image data using arithmetic encoding. An example of the image data is a binary mask representing an object shape.
Prior Art Discussion The paper Arithmetic Coding by J. Rissanen and G. Langdon in IBM Journal of Research and Development, Vol. 23, No. 2, March 1979 describes compression by arithmetic coding using a statistical model for a data source.
As far as the inventors are aware arithmetic coding has not been applied to moving binary images, and indeed there are problems associated with its use for static binary images.
The paper Compression of Black-White Images with Arithmetic Coding, IEEE Transactions on Communications, Vol. 29, No. 6, pp. 858-867, June 1981 describes what is now known as context-based arithmetic encoding (CAE) for compression of binary images. The method comprises a modelling part and a coding part. The modelling part comprised two parts. The first part of the model, called the neighbourhood template, defined, for a given binary sample X, those other samples in the image which were considered to have an influence on the value of X. The word neighbourhood was used because it is normally a local correlation which exists in binary images. The OPEN to posuc INSPECTION UNDER SEC RON R5 A&D RULE 23 JNL No.....l&Zdr.......ΟΡΠ/.'ί/^ IE 970441 * - 2 configuration of the binary samples in this template was represented by an N bit number, where N is the number of pixels in the template. This N bit number was termed the context, denoted C. The second part was the conditional statistical model or conditional probability density function (PDF). This was a function P(X/C) defining the probability of X=0 and X=1 conditional upon C(X) i.e. the context at sample X.
The encoding of a binary image involved firstly an initialisation of the arithmetic encoder. Secondly, each sample of the image was scanned and coded in raster order. The coding of a sample X involved the computation of C(X) based on a predefined template T. The value C(X) was used to access a PDF table containing a representation of P(X/C) . The value of X and P(X/C) was used to drive an arithmetic encoder. When the final sample of the image was encoded the arithmetic encoder was terminated. The result was a compressed (arithmetic) code representing the whole binary image.
The decoding of the compressed arithmetic code involved an initialisation of the arithmetic decoder. Samples were then decoded in the same order as used at the encoder. Decoding of sample X required the computation of C(X) and subsequent access to P(X/C). The arithmetic decoder used P(X/C) and the next bits in the arithmetic code to ascertain the value of X. When the last pixel was decoded, the arithmetic decoder was terminated.
Since the compression efficiency is governed by the PDF, it is very important to use one which matches well with the data. Langdon and Rissanen experimented with fixed PDFs and adaptive PDFs. The fixed PDF was generated by analysing a set of typical images (training set) and averaging the statistics over the whole set. For encoding - 3 a given image, the PDF was not allowed to change from sample to sample. The problem with this approach was that compression efficiency varied depending on how close the source image was to the average. An image which was atypical of the initial training set would not be compressed efficiently.
To overcome this problem, an adaptive PDF model was employed. The adaptive PDF model used an update algorithm to allow it to keep in touch with the varying local statistics present in many binary images. As each sample value was encoded, the PDF model was changed according to some statistical criterion. At the decoder, the sample update algorithm was used as each sample was decoded. However, this adaptive approach imposes some limitations in terms of error resilience. This is due to the fact that the update algorithm must rely on samples which have already been coded/decoded. If, due to bitstream error, a given sample is decoded incorrectly, then the update algorithm can cause the decoder to desynchronise and the error can propagate unlimited through the remainder of the image resulting in a highly distorted decoded image. Therefore, compression efficiency is achieved through PDF adaptation at the grave expense of error resilience.
Objects of the Invention One object of the invention is to provide a method for efficient arithmetic encoding of static and moving binary images.
Another object is to minimise the chances of error propagation, with little effect on compression efficiency. - 4 IE 970441 Summary of Invention According to the invention, there is provided a method of encoding binary image data comprising the steps of:receiving the image data; determining for each sample a PDF table; computing for each sample a context number according to a template; selecting for each sample a PDF from the PDF table according to the context number; an arithmetic encoder encoding each sample in turn according to the PDF and the sample value, characterised in that, the received image data is partitioned into discrete blocks, each block comprising a plurality of samples, the arithmetic encoder is initialised at the start of each block; the samples of each block are encoded using a fixed template to compute the context number, and a fixed PDF table; and the arithmetic encoder is terminated at the end of each block. - 5 IE 970441 Preferably, the context number is computed by assigning estimated values to samples of the template which are in neighbouring blocks.
In one embodiment, the estimation is performed using rules which are set for each template.
Preferably, the fixed template includes samples from a previous image in an image sequence for exploiting temporal correlations.
In a further embodiment, the template samples from the previous image are determined according to motion compensation.
Preferably, motion compensation is performed by block translation and preferably the block translation includes neighbouring samples.
In one embodiment the fixed template and PDF table are chosen from a set of template/PDF table pair models, at least one model exploiting temporal correlations and at least one other model exploiting spatial correlations only.
In another embodiment, each temporal model exploits both temporal and spatial correlations.
Preferably, the temporal model includes four spatiallycorrelating samples and five temporally-correlating samples .
In a further embodiment, the spatially-correlating samples include the previous sample in the same row and three samples of the previous row centralised above the sample. - 6 Preferably, the temporally-correlating samples include a sample at a position corresponding to the current sample, and the four vertically and horizontally adjoining samples .
Detailed Description of the Invention Brief Description of the Drawings The invention will be more clearly understood from the following description of some embodiments thereof, given by way of example only, with reference to the accompanying drawings, in which:Figs. 1(a) and 1(b) are flow diagrams illustrating encoding and decoding methods of the invention; Fig. 2 is a diagram illustrating the manner in which received image data is partitioned into blocks; Fig. 3 is a diagram illustrating a particular block; Fig. 4 is a diagram illustrating a motion compensated block; and Figs. 5 and 6 are diagrams illustrating templates used in the method.
Detailed Description of the Preferred Embodiment Referring to Fig.l an encoding method of the invention is described. The method is indicated generally by the numeral 1.
In step 2, image data is received. In this embodiment, the image data is a binary mask representing an object - 7 shape, in which each sample is an individual pixel. Pixels representing the object have a value 1 and other pixels have a value 0. In step 3, the received image data is partitioned into n blocks, each having m samples. Fig. 2 illustrates one screen 29 of received image data, in which there is a first set of blocks BI to Bll, and so n=ll. Thus, the processor partitions the received data one row at a time, each row having 11 blocks.
Let i equal the particular block number in a row, this being initially set in step 4 to zero. In decision step 5, a decision is made as to whether or not the block is to be encoded. All of the pixels of the block may be outside the object, or they may be inside the object, or the block may fall on the object border. Encoding only takes place for the latter situation. If encoding is not to take place, then i is incremented in step 6 and the decision step 5 is repeated. When the block which is to be encoded is reached, in step 7 the processor initialises an arithmetic encoder.
In step 8, a template is chosen and retrieved. The choice is signalled to a decoder. In step 9 a PDF table is retrieved. The template/PDF table pair may be referred to as a model. In this embodiment, there are two possible models, namely, an inter model, and an intra model. The inter model has a template which includes samples from a previous image in an image sequence so that it exploits temporal correlations. In addition, the template also includes spatially-correlating samples in the current image.
Referring to Fig. 5, there is illustrated a template 50 for the intra-model, and a template 60 for the intermodel. The template 50 comprises ten spatiallycorrelating samples CO to C9 which are spatially related -βIE 970441 ίο the current sample X as illustrated in the diagram. The context number C is determined according to the algorithm shown underneath the template 50 - the value of each sample contributing one bit of a ten-bit context number.
Referring to Fig. 6, the template 60 comprises two sets of samples. The first set, CO to C3, are spatially related to the current sample X. The second set, C4 to C8, includes a sample which corresponds to the position of X in an equivalent next-previous image, and also the four adjoining samples in the vertical and horizontal directions. The samples C4 to C8 are determined according to motion compensation by block translation. The context number C is determined according to a similar algorithm, as shown in Fig. 6.
In step 10, the integer j is set to zero, j indicating the current sample or pixel being encoded at any particular time. In step 11, the context number for the pixel is computed according to the relevant algorithm illustrated in Fig. 5 or Fig. 6. In step 12 the relevant PDF is retrieved from the PDF table according to the context number. In step 13, the processor inputs to the arithmetic encoder the actual sample value and the PDF.
Referring to Fig. 3, in this embodiment each block 30 comprises 16x16 pixels and so n=256. Fig. 3 also shows neighbouring pixels. These illustrate an important aspect of the invention whereby during computation of the context number in step 11, estimated values are assigned to samples of the template which are in neighbouring blocks.
These samples from neighbouring blocks are indicated by the numeral 32 in Fig. 3. Those marked with 0 are unknown at decoding time and their values must be - 9 estimated during context number computation. These estimations are performed according to simple rules. For example, the following rules are used in the defined sequences for the template 50.
RULEl. if (C7 is unknown) C7=C8 RULE2. if (C3 is unknown) C3=C4 RULE3. if (C2 is unknown) C2=C3.
Similarly, the rule for template 60 is as follows.
RULEl. If (cl is unknown) cl=c2 Referring again to the sample of neighbouring blocks indicated by the numeral 32, those marked with x” are known at decoding times and thus, their values do not need to be estimated. The exception to this is when packetbased error propagation control is required. In this case, any neighbouring samples which are not part of the current packet are assumed to have a value of zero.
Where the template 60 is used, samples C4 to C8 are from the previous image data. The particular samples are determined according to motion compensation which is performed by block translation. The block translation is performed using neighbouring samples for a block, as illustrated in Fig. 4. In this diagram, the block is indicated by the numeral 41 and the neighbouring samples, the values for all of which are known, by the numeral 42. Motion compensation is used to find a block in the previous image which closely approximates the current block. This is referred to as a motion compensated block, MCB. The location of the MCB is signalled to the decoder by transmission of the relative offset between it and the block to be encoded. This offset is called the motion vector. - 10 IE 970441 As indicated by the steps 13 to 15, encoding takes place for each sample in turn of the current block until all samples have been encoded as determined by the decision step 14.
An important aspect of the invention is the fact that when samples of a particular block have been encoded, the encoder is terminated in step 16. As indicated by the decision step 17, i is incremented to begin encoding the next block and the steps are repeated. When all of the n currently partitioned blocks have been encoded, a decision is made in step 18 as to whether or not there is any further image data. If not, the method ends in step 19. If there is further image data, the next set of n blocks is partitioned in step 3 and the following steps repeated.
Referring to Fig.l (b) decoding is now described. The decoder works in a complementary manner to the encoder and like steps are indicated by the same reference numerals. The decoder relies on the aforementioned signalling information to determine if a block is encoded by arithmetic encoding or not. If the decoder ascertains that a block is coded by arithmetic encoding then further signalling information is interpreted to ascertain which model has been used by the arithmetic decoder. These operations are indicated by the steps 22 and 23.
For any block which has been encoded by the arithmetic encoder, the decoder begins by initialising the arithmetic decoder in step 25. At each pixel of the block, a context number is computed using same template and methods as the encoder. The context number is used to access the PDF. The PDF and the next bits of the compressed arithmetic code are used by the arithmetic decoder to decode the pixel value in step 26. The decoder is terminated in step - 11 27 at the end of each block.
It will be appreciated that the invention provides for a highly efficient compression because a model is chosen for each individual block. The available models include one which allows for only spatial correlations, and one which allows for both spatial and temporal correlations. The choice which is made depends on the feedback from the motion compensation steps, the important point being that where there is a relevant block in the previous image, the information from this block can be used in a highly efficient manner. The arithmetic encoder is terminated at the end of each block, thus helping to reduce propagation of errors.
It will also be appreciated that the method is extremely simple as the individual steps are each made using straight-forward parameter inputs.
The arithmetic encoder is initialised at the start of every block and terminated at the end of every block, thus allowing the compressed block codes to be multiplexed with other compressed data for the block e.g. coded texture data as in the case of colour images or coded motion and texture data as in the case of colour video.
The method is highly suited to incorporation within packet-based error propagation control mechanisms since it does not use an adaptive model and since it can be chosen to use only pixels from the current packet when computing the context numbers .
The invention is not limited to the embodiments described, but may be varied in construction and detail within the scope of the claims.

Claims (12)

1. A method of encoding binary image data comprising the steps of :receiving the image data; 5 determining for each sample a PDF table; computing for each sample a context number according to a template; selecting for each sample a PDF from the PDF table according to the context number; 10 an arithmetic encoder encoding each sample in turn according to the PDF and the sample value, characterised in that, the received image data is partitioned into discrete blocks, each block comprising a plurality of samples, 15 the arithmetic encoder is initialised at the start of each block; the samples of each block are encoded using a fixed template to compute the context number, and a fixed PDF table; and 20 the arithmetic encoder is terminated at the end of each block.
2. A method of encoding image data as claimed in claim 1, wherein the context number is computed by assigning estimated values to samples of the template - 13 which are in neighbouring blocks.
3. A method of encoding image data as claimed in claim 2, wherein the estimation is performed using rules which are set for each template.
4. A method of encoding image data as claimed in any preceding claim, wherein the fixed template includes samples from a previous image in an image sequence for exploiting temporal correlations.
5. A method of encoding image data as claimed in claim 4, wherein the template samples from the previous image are determined according to motion compensation.
6. A method of encoding image data as claimed in claim 5, wherein motion compensation is performed by block translation.
7. A method of encoding image data as claimed in claim 6, wherein the block translation includes neighbouring samples.
8. A method of encoding image data as claimed in any of claims 4 to 7, wherein the fixed template and PDF table are chosen from a set of template/PDF table pair models, at least one model exploiting temporal correlations and at least one other model exploiting spatial correlations only.
9. A method of encoding image data as claimed in claim 4, wherein each temporal model exploits both temporal and spatial correlations. - 14 IE 970441
10. A method of encoding image data as claimed in claim 9, wherein the temporal model includes four spatially-correlating samples and five temporallycorrelating samples. 5
11. A method of encoding image data as claimed in claim 10, wherein the spatially-correlating samples include the previous sample in the same row and three samples of the previous row centralised above the sample.
12. A method of encoding image data as claimed in claim 10 10, wherein the temporally-correlating samples include a sample at a position corresponding to the current sample, and the four vertically and horizontally adjoining samples.
IE970441A 1996-06-13 1997-06-13 Compression of image data IE970441A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
IE970441A IE970441A1 (en) 1996-06-13 1997-06-13 Compression of image data

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
IE960440 1996-06-13
IE970441A IE970441A1 (en) 1996-06-13 1997-06-13 Compression of image data

Publications (1)

Publication Number Publication Date
IE970441A1 true IE970441A1 (en) 1997-12-17

Family

ID=26319934

Family Applications (1)

Application Number Title Priority Date Filing Date
IE970441A IE970441A1 (en) 1996-06-13 1997-06-13 Compression of image data

Country Status (1)

Country Link
IE (1) IE970441A1 (en)

Similar Documents

Publication Publication Date Title
US9967589B2 (en) Method and apparatus for updating predictions when coding motion information
EP0215229B1 (en) Method for compressing bi-level data
US7336711B2 (en) Image encoding method, image decoding method, image encoder, image decode, program, computer data signal, and image transmission system
JP3570863B2 (en) Moving picture decoding apparatus and moving picture decoding method
US6157745A (en) Method and system for coding and decoding a sequence of segmented images
EP0707427A2 (en) Method and apparatus for a region-based approach to coding a sequence of video images
US5909513A (en) Bit allocation for sequence image compression
WO1998005159A1 (en) Picture encoder, picture decoder, picture encoding method, picture decoding method, and medium
EP0813168B1 (en) Compression of image data
Masmoudi et al. A new arithmetic coding model for a block-based lossless image compression based on exploiting inter-block correlation
GB2333412A (en) A context based coding/decoding method and apparatus
JP3466164B2 (en) Image encoding device, image decoding device, image encoding method, image decoding method, and medium
US6898322B2 (en) Coding method, coding apparatus, decoding method and decoding apparatus using subsampling
Salembier et al. Coding of partition sequences
JPH09121359A (en) Picture coding and decoding methods
US6198508B1 (en) Method of encoding picture data and apparatus therefor
JPH10507331A (en) Method and system for encoding an image sequence and associating the encoded signal with a storage medium, and method and system for decoding such an encoded signal
IE970441A1 (en) Compression of image data
KR100186267B1 (en) Motion estimation and compensation using by adaptive block division
JP3750367B2 (en) Image encoding / decoding device
JPH08331565A (en) Image coding method and device therefor
Shen et al. Quad-tree block-based binary shape coding
Lai et al. Coding of image sequences using variable size block matching and vector quantization with gray-level segmentation and background memory
Sun et al. Predictive vector quantization based upon first-order Markov model for image transmission
Li et al. Hybrid VQ of video sequences using quadtree motion segmentation

Legal Events

Date Code Title Description
FK9A Application deemed to have been withdrawn section 23(9)