中文说明:此Matlab代码用于使用哈夫曼算法压缩图像。此代码包中有两个主要函数,im2huff和huff2im。im2huff将数字灰度图像转换为结构变量。huff2im则相反。
English Description:
This Matlab code is used to compress image using Huffman algorithm. There are two main function in this code packet, im2huff and huff2im. im2huff convert an digital gray level image into a structure variable. huff2im does inversely. The structure variable has 5 fields: + size: the size of original image + gray: the gray levels of the original image + hist : the histogram of image + codlen: the Huffman code length +code: the Huffman-encoded values stored in a uint16 vector. Three function byte.m, compare.m, imratio.m are defined in the book "Digital Image Processing using Matlab", Gonzalez