fbpx
Wikipedia

Block Truncation Coding

Block Truncation Coding (BTC) is a type of lossy image compression technique for greyscale images. It divides the original images into blocks and then uses a quantizer 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 color long before DXTC using a very similar approach called Color Cell Compression.[1] BTC has also been adapted to video compression.[2]

BTC was first proposed by Professors Mitchell and Delp at Purdue University.[3] 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 and also typically results in a lower Mean Squared Error (MSE). AMBTC was proposed by Maximo Lema and Robert Mitchell.[4]

Using sub-blocks of 4×4 pixels gives a compression ratio of 4:1 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.

The BTC algorithm was used for compressing Mars Pathfinder's rover images.[5]

Compression procedure

A pixel image is divided into blocks of typically 4×4 pixels. For each block the Mean and Standard Deviation of the pixel values are calculated; these statistics generally change from block to block. The pixel values selected for each reconstructed, or new, block are chosen so that each block of the BTC compressed image will have (approximately) the same mean and standard deviation as the corresponding block of the original image. A two level quantization on the block is where we gain the compression and is performed as follows:

 

Here   are pixel elements of the original block and   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:

 

 

Where   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 ( )

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.[6]

Example

Encoder

Take a 4×4 block from an image, in this case the mountain test image:[7]

 

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.36. From this the values of "a" and "b" can be calculated using the previous equations. They come out to be 236.935 and 245.718 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.

 

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:

 

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 quantized everything to integers in the encoder.

See also

References

  1. ^ Liou, D. -M.; Huang, Y.; Reynolds, N. (1990). "A new microcomputer based imaging system with C/sup 3/ technique". IEEE TENCON'90: 1990 IEEE Region 10 Conference on Computer and Communication Systems. Conference Proceedings. p. 555. doi:10.1109/TENCON.1990.152671. ISBN 0-87942-556-3.
  2. ^ Healy, D.; Mitchell, O. (1981). "Digital Video Bandwidth Compression Using Block Truncation Coding". IEEE Transactions on Communications. 29 (12): 1809. Bibcode:1981ITCom..29.1809H. doi:10.1109/TCOM.1981.1094938.
  3. ^ Delp, E.; Mitchell, O. (1979). "Image Compression Using Block Truncation Coding". IEEE Transactions on Communications. 27 (9): 1335. Bibcode:1979STIA...8011525D. doi:10.1109/TCOM.1979.1094560.
  4. ^ Lema, M.; Mitchell, O. (1984). "Absolute Moment Block Truncation Coding and akhand Its Application to Color Images". IEEE Transactions on Communications. 32 (10): 1148. doi:10.1109/TCOM.1984.1095973.
  5. ^ "Rover Camera Instrument Description". NASA. Retrieved 2021-05-18.
  6. ^ Leis, J 2008, ELE4607 Advance Digital Communications, Module 3: Image & Video Coding. Lecture Slides, University of Southern Queensland, 2008.
  7. ^ Waterloo Fractal Coding and Analysis Group

External links

  •   Media related to Block Truncation Coding at Wikimedia Commons

block, truncation, coding, type, lossy, image, compression, technique, greyscale, images, divides, original, images, into, blocks, then, uses, quantizer, reduce, number, grey, levels, each, block, whilst, maintaining, same, mean, standard, deviation, early, pr. Block Truncation Coding BTC is a type of lossy image compression technique for greyscale images It divides the original images into blocks and then uses a quantizer 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 color long before DXTC using a very similar approach called Color Cell Compression 1 BTC has also been adapted to video compression 2 BTC was first proposed by Professors Mitchell and Delp at Purdue University 3 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 and also typically results in a lower Mean Squared Error MSE AMBTC was proposed by Maximo Lema and Robert Mitchell 4 Using sub blocks of 4 4 pixels gives a compression ratio of 4 1 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 The BTC algorithm was used for compressing Mars Pathfinder s rover images 5 Contents 1 Compression procedure 2 Example 2 1 Encoder 2 2 Decoder 3 See also 4 References 5 External linksCompression procedure EditA pixel image is divided into blocks of typically 4 4 pixels For each block the Mean and Standard Deviation of the pixel values are calculated these statistics generally change from block to block The pixel values selected for each reconstructed or new block are chosen so that each block of the BTC compressed image will have approximately the same mean and standard deviation as the corresponding block of the original image A two level quantization on the block is where we gain the compression and is performed as follows y i j 1 x i j gt x 0 x i j x displaystyle y i j begin cases 1 amp x i j gt bar x 0 amp x i j leq bar x end cases Here x i j displaystyle x i j are pixel elements of the original block and y i j displaystyle 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 x s q m q displaystyle a bar x sigma sqrt cfrac q m q b x s m q q displaystyle b bar x sigma sqrt cfrac m q q Where s displaystyle 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 x displaystyle bar 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 x i j a y i j 0 b y i j 1 displaystyle x i j begin cases a amp y i j 0 b amp y i j 1 end cases 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 6 Example EditEncoder Edit Take a 4 4 block from an image in this case the mountain test image 7 245 239 249 239 245 245 239 235 245 245 245 245 245 235 235 239 displaystyle begin matrix 245 amp 239 amp 249 amp 239 245 amp 245 amp 239 amp 235 245 amp 245 amp 245 amp 245 245 amp 235 amp 235 amp 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 36 From this the values of a and b can be calculated using the previous equations They come out to be 236 935 and 245 718 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 1 0 1 0 1 1 0 0 1 1 1 1 1 0 0 0 displaystyle begin matrix 1 amp 0 amp 1 amp 0 1 amp 1 amp 0 amp 0 1 amp 1 amp 1 amp 1 1 amp 0 amp 0 amp 0 end matrix Decoder Edit 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 245 236 245 236 245 245 236 236 245 245 245 245 245 236 236 236 displaystyle begin matrix 245 amp 236 amp 245 amp 236 245 amp 245 amp 236 amp 236 245 amp 245 amp 245 amp 245 245 amp 236 amp 236 amp 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 quantized everything to integers in the encoder See also EditColor Cell Compression a newer derivative of Block Truncation Coding References Edit Liou D M Huang Y Reynolds N 1990 A new microcomputer based imaging system with C sup 3 technique IEEE TENCON 90 1990 IEEE Region 10 Conference on Computer and Communication Systems Conference Proceedings p 555 doi 10 1109 TENCON 1990 152671 ISBN 0 87942 556 3 Healy D Mitchell O 1981 Digital Video Bandwidth Compression Using Block Truncation Coding IEEE Transactions on Communications 29 12 1809 Bibcode 1981ITCom 29 1809H doi 10 1109 TCOM 1981 1094938 Delp E Mitchell O 1979 Image Compression Using Block Truncation Coding IEEE Transactions on Communications 27 9 1335 Bibcode 1979STIA 8011525D doi 10 1109 TCOM 1979 1094560 Lema M Mitchell O 1984 Absolute Moment Block Truncation Coding and akhand Its Application to Color Images IEEE Transactions on Communications 32 10 1148 doi 10 1109 TCOM 1984 1095973 Rover Camera Instrument Description NASA Retrieved 2021 05 18 Leis J 2008 ELE4607 Advance Digital Communications Module 3 Image amp Video Coding Lecture Slides University of Southern Queensland 2008 Waterloo Fractal Coding and Analysis GroupExternal links Edit Media related to Block Truncation Coding at Wikimedia Commons Retrieved from https en wikipedia org w index php title Block Truncation Coding amp oldid 1023847614, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.