正在加载图片...
The entropy of an information source S is defined as H(S)=SUM,(P Log2(1/P) where Pi is the probability that symbol S, in S will occur Log2(1/P)indicates the amount of information contained in Si, i.e., the number of bits needed to code s Encoding for the Shannon-Fano Algorithm A top-down approach 1. Sort symbols according to their frequencies/probabilities, e.g., ABCDE 3 Recursively divide into two parts, each with approx. same number of counts (Huffman algorithm also valid indicated below) A simple transform coding example A Simple Transform Encoding procedure maybe described by the following steps for a 2x2 block of monochrome pixels 1. Take top left pixel as the base value for the block, pixel A 2. Calculate three other transformed values by taking the difference between these(respective) pixels and pixel A, i.e. B-A, C-A, D-A 3. Store the base pixel and the differences as the values of the transform Given the above we can easily for the forward transform and the inverse transform is trivial The above transform scheme may be used to compress data by explo redundancy in the data Any redundancy in the data has been transformed to values, Xi. So we can compress the data by using fewer bits to represent the differences. I. e if we use 8 bits per pixel then the 2x2 block uses 32 bits/ If we keep 8 bits for the ba pixel, XO, and assign 4 bits for each difference then we only use 20 bits Which is better than an average 5 bits/pixel 7 MARKS--- BOOKWORKThe entropy of an information source S is defined as: H(S) = SUMI (PI Log2 (1/PI) where PI is the probability that symbol SI in S will occur. Log2 (1/PI) indicates the amount of information contained in SI, i.e., the number of bits needed to code SI. Encoding for the Shannon-Fano Algorithm: A top-down approach 1. Sort symbols according to their frequencies/probabilities, e.g., ABCDE. 3 Recursively divide into two parts, each with approx. same number of counts. (Huffman algorithm also valid indicated below) A simple transform coding example A Simple Transform Encoding procedure maybe described by the following steps for a 2x2 block of monochrome pixels: 1. Take top left pixel as the base value for the block, pixel A. 2. Calculate three other transformed values by taking the difference between these (respective) pixels and pixel A, i.e. B-A, C-A, D-A. 3. Store the base pixel and the differences as the values of the transform. Given the above we can easily for the forward transform: and the inverse transform is trivial The above transform scheme may be used to compress data by exploiting redundancy in the data: Any Redundancy in the data has been transformed to values, Xi. So We can compress the data by using fewer bits to represent the differences. I.e if we use 8 bits per pixel then the 2x2 block uses 32 bits/ If we keep 8 bits for the base pixel, X0, and assign 4 bits for each difference then we only use 20 bits. Which is better than an average 5 bits/pixel 7 MARKS --- BOOKWORK
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有