Homogeneous Image Compression Techniques with the Shannon-Fano Algorithm

  • Fathahillah Fathahillah Universitas Negeri Makassar
  • Satria Gunawan Zain Universitas Negeri Makassar
  • Rismawati Rismawati Universitas Negeri Makassar
Keywords: Compression, Decompression, Image Size, Lossless Compression Technique, Resolution Image


Compression is a field that needed at this time where increasingly high-tech digital and computing makes it possible to process data in a size that is large enough like multimedia. Compression needed to keep pressing the storage media consumption of data and information stored on computer media. The Shannon-Fano compression algorithm is one of the well-known compression algorithms and is useful in saving data storage space. Shannon-Fano compression algorithms can be performed on text and digital images. In this study applying the Shannon-Fano method to homogeneous digital images using applications created with the MATLAB Program. The product of this research will be tested using several images taken using a webcam. The product tested to find out whether the coding used is correct or has errors. The product will be successful if it can reduce the size of the compressed image from the original image. Homogeneous images that have tested using the Shannon-Fano image compression application have an average compression ratio value of 52%. The size of the compression results reaches half of the original image. The Shannon-Fano compression algorithm detects the number of times that characters appear in each experiment, then the coding of the frequency of characters appearing in binary numbers.


[1] A. Rowstron and P. Druschel, “Storage management and caching in past, a large-scale, persistent peer-to-peer storage utility,” in ACM SIGOPS Operating Systems Review, 2001, vol. 35, no. 5, pp. 188–201.
[2] S. Eickeler, S. Muller, and G. Rigoll, “High quality face recognition in JPEG compressed images,” in Proceedings 1999 International Conference on Image Processing (Cat. 99CH36348), 1999, vol. 1, pp. 672–676.
[3] M. Mancuso and S. Battiato, “An introduction to the digital still camera technology,” ST J. Syst. Res., vol. 2, no. 2, 2001.
[4] N. Goldberg, Camera technology: the dark side of the lens. Elsevier, 1992.
[5] K. Yabuta and H. Kitazawa, “Optimum camera placement considering camera specification for security monitoring,” in 2008 IEEE International Symposium on Circuits and Systems, 2008, pp. 2114–2117.
[6] A. C. Bovik, Handbook of image and video processing. Academic Press, 2010.
[7] R. Gryder and K. Hake, “Survey of data compression techniques,” Oak Ridge National Lab., TN (United States), 1991.
[8] G. Held and T. R. Marshall, Data and image compression: tools and techniques. John Wiley & Sons, Inc., 1996.
[9] K. Sayood, Introduction to data compression. Morgan Kaufmann, 2017.
[10] L. G. Rueda and B. J. Oommen, “A nearly-optimal Fano-based coding algorithm,” Inf. Process. Manag., vol. 40, no. 2, pp. 257–268, 2004.
[11] L. Rueda and B. J. Oommen, “A fast and efficient nearly-optimal adaptive Fano coding scheme,” Inf. Sci. (Ny)., vol. 176, no. 12, pp. 1656–1683, 2006.
[12] J. S. Vitter, “Design and analysis of dynamic Huffman coding,” in 26th Annual Symposium on Foundations of Computer Science (sfcs 1985), 1985, pp. 293–302.
[13] J. S. Vitter, “Dynamic Huffman coding,” 1989.
[14] D. E. Knuth, “Dynamic Huffman coding,” J. algorithms, vol. 6, no. 2, pp. 163–180, 1985.
[15] D. A. Huffman, “A method for the construction of minimum-redundancy codes,” Proc. IRE, vol. 40, no. 9, pp. 1098–1101, 1952.
[16] I. H. Witten, R. M. Neal, and J. G. Cleary, “Arithmetic coding for data compression,” Commun. ACM, vol. 30, no. 6, pp. 520–540, 1987.
[17] P. G. Howard and J. S. Vitter, “Arithmetic coding for data compression,” Proc. IEEE, vol. 82, no. 6, pp. 857–865, 1994.
[18] J. Ziv and A. Lempel, “Compression of individual sequences via variable-rate coding IEEE Transactions Information Theory, 24: 530-53 (1978),” Math. Sci. Dir. by Grad. Sch. Math. Sci.
[19] J. Ziv and A. Lempel, “A universal algorithm for sequential data compression,” IEEE Trans. Inf. theory, vol. 23, no. 3, pp. 337–343, 1977.
[20] M. Nelson, “LZW data compression,” Dr. Dobb’s J., 1989.
[21] H. Al-Bahadili and S. M. Hussain, “An adaptive character wordlength algorithm for data compression,” Comput. Math. with Appl., vol. 55, no. 6, pp. 1250–1256, 2008.
[22] S. Shanmugasundaram and R. Lourdusamy, “A comparative study of text compression algorithms,” Int. J. Wisdom Based Comput., vol. 1, no. 3, pp. 68–76, 2011.
[23] S. R. Kodituwakku and U. S. Amarasinghe, “Comparison of lossless data compression algorithms for text data,” Indian J. Comput. Sci. Eng., vol. 1, no. 4, pp. 416–425, 2010.
[24] M. Vaidya, E. S. Walia, and A. Gupta, “Data compression using Shannon-fano algorithm implemented by VHDL,” in 2014 International Conference on Advances in Engineering & Technology Research (ICAETR-2014), 2014, pp. 1–5.
[25] T. J. Lynch, Data compression: techniques and applications, vol. 1. Lifetime Learning Publications Belmont, CA, 1985.
[26] M. Nelson and J.-L. Gailly, The data compression book. M & t Books New York, 1996.
[27] G. J. Myers, C. Sandler, and T. Badgett, “The art of software testing, JohnWiley & Sons,” Inc, Canada, 1979.
[28] R. S. Pressman, Software engineering: a practitioner’s approach. Palgrave Macmillan, 2005.
[29] R. L. De Queiroz, “Processing JPEG-compressed images and documents,” IEEE Trans. Image Process., vol. 7, no. 12, pp. 1661–1672, 1998.
[30] B. C. Smith and L. A. Rowe, “Algorithms for manipulating compressed images,” IEEE Comput. Graph. Appl., vol. 13, no. 5, pp. 34–42, 1993.
How to Cite
F. Fathahillah, S. G. Zain, and R. Rismawati, “Homogeneous Image Compression Techniques with the Shannon-Fano Algorithm”, Int. J. Environ. Eng. Educ., vol. 1, no. 2, pp. 59-66, Aug. 2019.
Research Article