Block Truncation Coding

Block Truncation Coding

Block Truncation Coding, or BTC, is a type of lossy image compression technique for greyscale images. It divides the original images into blocks and then uses a quantiser to reduce the number of grey levels in each block whilst maintaining the same mean and standard deviation. It is an early predecessor of the popular hardware DXTC technique, although BTC compression method was first adapted to colour long before DXTC using a very similar approach called Colour Cell Compression [1990 IEEE Colour Cell Compression Paper [http://ieeexplore.ieee.org/iel5/498/3989/00152671.pdf] ] . BTC has also been adapted to video compression [1981 IEEE Paper "Digital Video Bandwidth Compression Using Block Truncation Coding" [http://ieeexplore.ieee.org/iel5/8159/23934/01094938.pdf] ]

BTC was first proposed by Professors Mitchell and Delp at Purdue University. Another variation of BTC is Absolute Moment Block Truncation Coding or AMBTC, in which instead of using the standard deviation the first absolute moment is preserved along with the mean. AMBTC is computationally simpler than BTC. AMBTC was proposed by Lema and Mitchell.

Sub blocks of 4x4 pixels allow compression of about 25% assuming 8-bit integer values are used during transmission or storage. Larger blocks allow greater compression ("a" and "b" values spread over more pixels) however quality also reduces with the increase in block size due to the nature of the algorithm.

Compression procedure

A 256x256 pixel image is divided into blocks of typically 4x4 pixels. For each block the Mean and Standard Deviation are calculated, these values change from block to block. These two values define what values the reconstructed or new block will have, in other words the blocks of the BTC compressed image will all have the same mean and standard deviation of the original image. A two level quantization on the block is where we gain the compression, it is performed as follows:

y(i,j) = egin{cases} 1, & x(i,j) > ar x \ 0, & x(i,j) le ar x end{cases}

Where x(i,j) are pixel elements of the original block and y(i,j) are elements of the compressed block. In words this can be explained as: If a pixel value is greater than the mean it is assigned the value "1", otherwise "0". Values equal to the mean can have either a "1" or a "0" depending on the preference of the person or organisation implementing the algorithm.

This 16 bit block is stored or transmitted along with the values of Mean and Standard Deviation. Reconstruction is made with two values "a" and "b" which preserve the mean and the standard deviation.The values of "a" and "b" can be computed as follows:

a=ar x - sigma sqrt{cfrac {q}{m-q

b=ar x + sigma sqrt{cfrac {m-q}{q

Where sigma is the standard deviation, m is the total number of pixels in the block and q is the number of pixels greater than the mean (ar x)

To reconstruct the image, or create its approximation, elements assigned a 0 are replaced with the "a" value and elements assigned a 1 are replaced with the "b" value. This demonstrates that the algorithm is asymmetric in that the encoder has much more work to do than the decoder. This is because the decoder is simply replacing 1's and 0's with the estimated value whereas the encoder is also required to calculate the mean, standard deviation and the two values to use.

x(i,j) = egin{cases} a, & y(i,j) = 0 \ b, & y(i,j) = 1 end{cases} [Leis, J 2008, ELE4607 Advance Digital Communications, Module 3: Image & Video Coding. Lecture Slides, University of Southern Queensland, 2008.] .

Example

Encoder

Take a 4x4 block from an image, in this case the mountain test image [ [http://links.uwaterloo.ca/bragzone.base.html Waterloo BragZone ] ] :

egin{matrix} 245 & 239 & 249 & 239 \ 245 & 245 & 239 & 235 \ 245 & 245 & 245 & 245 \ 245 & 235 & 235 & 239 end{matrix}

Like any small block from an image this appears rather boring to work with as the numbers are all quite similar, this is the nature of lossy compression and how it can work so well for images. Now we need to calculate two values from this data, that is the mean and standard deviation. The mean can be computed to 241.875, this is a simple calculation which should require no further explanation. The standard deviation is easily calculated at 4.5. From this the values of "a" and "b" can be calculated using the previous equations. They come out to be 236.773 and 245.844 respectively. The last calculation that needs to be done on the encoding side is to set the matrix to transmit to 1's and 0's so that each pixel can be transmitted as a single bit.

egin{matrix} 1 & 0 & 1 & 0 \ 1 & 1 & 0 & 0 \ 1 & 1 & 1 & 1 \ 1 & 0 & 0 & 0 end{matrix}

Decoder

Now at the decoder side all we need to do is reassign the "a" and "b" values to the 1 and 0 pixels. This will give us the following block:

egin{matrix} 245 & 236 & 245 & 236 \ 245 & 245 & 236 & 236 \ 245 & 245 & 245 & 245 \ 245 & 236 & 236 & 236 end{matrix}

As can be seen, the block has been reconstructed with the two values of "a" and "b" as integers (because images aren't defined to store floating point numbers). When working through the theory, this is a good point to calculate the mean and standard deviation of the reconstructed block. They should equal the original mean and standard deviation. Remember to use integers, otherwise much quantization error will become involved, as we previously quantised everything to integers in the encoder.

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Color Cell Compression — is an early lossy image compression algorithm first described by Campbell et. al. in 1986.[1] It is a variant of Block Truncation Coding.[2] The encoding process works on small blocks of pixels. For each block, it first partitions the pixels in… …   Wikipedia

  • S3 Texture Compression — (S3TC) (sometimes also called DXTn or DXTC) is a group of related lossy texture compression algorithms originally developed by Iourcha et al. of S3 Graphics, Ltd. [1] for use in their Savage 3D computer graphics accelerator. The method of… …   Wikipedia

  • Mars Pathfinder — Pathfinder and Sojourner at JPL in October 1996 Operator NASA – JPL Mission type Lander, rover …   Wikipedia

  • BTC — is a three letter acronym that could mean: * BAL Bashkirian Airlines * Baku Tbilisi Ceyhan pipeline * Baptist Theological College of Southern Africa * Batticaloa Airport * Beat the Clock, a game show * Behavior Tech Computer, Taiwanese computer… …   Wikipedia

  • BTC — Die Abkürzung BTC steht für: Baku Tiflis Ceyhan Pipeline, eine Pipeline, die Rohöl von Ölfeldern aus Aserbaidschan und Kasachstan nach Ceyhan an der türkischen Mittelmeerküste transportiert Block Truncation Coding Bulgarian Telecom Business… …   Deutsch Wikipedia

  • Btc — Die Abkürzung BTC steht für: Baku Tiflis Ceyhan Pipeline Block Truncation Coding Bulgarian Telecom Business Technology Consulting; siehe BTC AG Die Abkürzung BtC steht für: Business to Consumer, häufiger mit B2C abgekürzt …   Deutsch Wikipedia

  • ABTC — Adaptive Block Truncation Coding …   Acronyms

  • GBTC — Generalized Block Truncation Coding …   Acronyms

  • ABTC — Adaptive Block Truncation Coding …   Acronyms von A bis Z

  • GBTC — Generalized Block Truncation Coding …   Acronyms von A bis Z

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”