Skip to main content
Log in

Improved near-lossless technique using the Huffman coding for enhancing the quality of image compression

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

Digital data compression aims to reduce the size of digital files in line with technological development. However, most data is distinguished by its large size, which requires a large storage capacity, and requires a long time in transmission operations via the Internet. Therefore, a new compress files method is needed to reduce the image size, maintain its quality, utilize storage spaces, and minimize time. This paper aims to improve digital image compression’s compression rates by dividing the image into several blocks. Thus, a new near-lossless method using the Huffman Coding technique is proposed. Digital image compression techniques are classified as lossless and lossy. Huffman Coding is a lossless-based technique used in the proposed method to maintain image quality during compression. The proposed method consists of several steps, which are dividing the image into blocks, finding the lowest value in each block and subtracting it from the rest of the values in the same block, then subtracting one from the odd numbers, dividing all the values on two, and finally applying the Huffman Coding technique to the block. The proposed method is applied to a well-known gray and color set with different types and different dimensions. Standard evaluation measures are used (i.e., PSNR, MSE, and CR) to evaluate the proposed method’s performance. When compressing images using the proposed method, the results demonstrated 0.11% enhancement when used two by two blocks. It also got high compression rates (25%).

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

References

  1. Abuowaida SFA et al. (2021) A novel instance segmentation algorithm based on improved deep learning algorithm for multi-object images. Jordanian Journal of Computers and Information Technology (JJCIT), 7(01)

  2. Aceves SM, Espinosa-Loza F, Ledesma-Orozco E, Ross TO, Weisberg AH, Brunner TC, Kircher O (2010) High-density automotive hydrogen storage with cryogenic capable pressure vessels. Int J Hydrog Energy 35(3):1219–1226

    Article  Google Scholar 

  3. Agarwal R, Salimath C, Alam K (2019) Multiple image compression in medical imaging techniques using wavelets for speedy transmission and optimal storage. Biomedical and Pharmacology Journal 12(1):183–198

    Article  Google Scholar 

  4. Aldemir E, Tohumoglu G, Selver MA (2019) Binary medical image compression using the volumetric run-length approach. The Imaging Science Journal 67(3):123–135

    Article  Google Scholar 

  5. Alkhalayleh MA, Otair A (2015) A new lossless method of image compression by decomposing the tree of Huffman technique. Int J Imaging Robot 15(2):79–96

    Google Scholar 

  6. Al-Khasawneh MA et al (2021) An improved chaotic image encryption algorithm using Hadoop-based MapReduce framework for massive remote sensed images in parallel IoT applications. Clust Comput 25:1–15

    Google Scholar 

  7. Aràndiga F, Mulet P, Renau V (2013) Lossless and near-lossless image compression based on multiresolution analysis. J Comput Appl Math 242:70–81

    Article  MathSciNet  Google Scholar 

  8. Ballé J et al. (2018) Variational image compression with a scale hyperprior. arXiv preprint arXiv:1802.01436

  9. Chen Y, Xiao X, Zhou Y (2019) Low-rank quaternion approximation for color image processing. IEEE Trans Image Process 29:1426–1439

    Article  MathSciNet  Google Scholar 

  10. Cosman PC, Gray RM, Olshen RA (1994) Evaluating quality of compressed medical images: SNR, subjective rating, and diagnostic accuracy. Proc IEEE 82(6):919–932

    Article  Google Scholar 

  11. Dey N et al. (2020) Firefly algorithm and its variants in digital image processing: A comprehensive review, in Applications of Firefly Algorithm and Its Variants. Springer. p. 1–28

  12. Dhou K (2020) A new chain coding mechanism for compression stimulated by a virtual environment of a predator–prey ecosystem. Futur Gener Comput Syst 102:650–669

    Article  Google Scholar 

  13. Dhou K, Cruzen C (2019) An innovative chain coding technique for compression based on the concept of biological reproduction: an agent-based modeling approach. IEEE Internet Things J 6(6):9308–9315

    Article  Google Scholar 

  14. Dhou K, Cruzen C (2021) A highly efficient chain code for compression using an agent-based modeling simulation of territories in biological beavers. Futur Gener Comput Syst 118:1–13

    Article  Google Scholar 

  15. Diaz N, Hinojosa C, Arguello H (2019) Adaptive grayscale compressive spectral imaging using optimal blue noise coding patterns. Opt Laser Technol 117:147–157

    Article  Google Scholar 

  16. Ewees AA, Abualigah L, Yousri D, Sahlol AT, al-qaness MAA, Alshathri S, Elaziz MA (2021) Modified artificial ecosystem-based optimization for multilevel thresholding image segmentation. Mathematics 9(19):2363

    Article  Google Scholar 

  17. Gong L, Qiu K, Deng C, Zhou N (2019) An image compression and encryption algorithm based on chaotic system and compressive sensing. Opt Laser Technol 115:257–267

    Article  Google Scholar 

  18. Houssein EH, Hussain K, Abualigah L, Elaziz MA, Alomoush W, Dhiman G, Djenouri Y, Cuevas E (2021) An improved opposition-based marine predators algorithm for global optimization and multilevel thresholding image segmentation. Knowl-Based Syst 229:107348

    Article  Google Scholar 

  19. Huang L et al. (2020) OctSqueeze: Octree-Structured Entropy Model for LiDAR Compression. in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition

  20. Ibrahim M, Gbolagade K (2019) A Chinese Remainder Theorem based enhancements of Lempel-Ziv-Welch and Huffman coding image compression. Asian Journal of Research in Computer Science: 1–9

  21. Jasmi RP, Perumal B, Rajasekaran MP (2015) Comparison of image compression techniques using huffman coding, DWT and fractal algorithm. In 2015 international conference on computer communication and informatics (ICCCI). IEEE

  22. Kasban H, Hashima S (2019) Adaptive radiographic image compression technique using hierarchical vector quantization and Huffman encoding. J Ambient Intell Humaniz Comput 10(7):2855–2867

    Article  Google Scholar 

  23. Kumar R, Jung K-H (2019) A systematic survey on block truncation coding based data hiding techniques. Multimed Tools Appl 78(22):32239–32259

    Article  Google Scholar 

  24. Lee C-F et al. (2020) An improved lossless information hiding in SMVQ compressed images. in Proceedings of the 2020 The 6th International Conference on Frontiers of Educational Technologies

  25. Lin S, Jia H, Abualigah L, Altalhi M (2021) Enhanced slime Mould algorithm for multilevel thresholding image segmentation using entropy measures. Entropy 23(12):1700

    Article  Google Scholar 

  26. Liu Z et al. (2019) Machine vision guided 3d medical image compression for efficient transmission and accurate segmentation in the clouds. in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

  27. Ma S et al. (2019) Image and video compression with neural networks: a review. IEEE Transactions on Circuits and Systems for Video Technology

  28. Mentzer F et al. (2019) Practical full resolution learned lossless image compression. in Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

  29. Morales CN, Claure G, Álvarez J, Nanni A (2020) Evaluation of fiber content in GFRP bars using digital image processing. Compos Part B 200:108307

    Article  Google Scholar 

  30. Otair M, Shehadeh F (2016) Lossy image compression by rounding the intensity followed by dividing (RIFD). Res J Appl Sci Eng Technol 12(6):680–685

    Article  Google Scholar 

  31. Poolakkachalil TK, Chandran S (2019) Summative stereoscopic image compression using arithmetic coding. Indonesian Journal of Electrical Engineering and Informatics (IJEEI) 7(3):564–576

    Article  Google Scholar 

  32. Rahman M, Hamada M (2019) Lossless image compression techniques: a state-of-the-art survey. Symmetry 11(10):1274

    Article  Google Scholar 

  33. Rawat C, Meher S (2013) A hybrid image compression scheme using DCT and fractal image compression. Int Arab J Inf Technol 10(6):553–562

    Google Scholar 

  34. Rege S et al (2013) 2D geometric shape and color recognition using digital image processing. International journal of advanced research in electrical, electronics and instrumentation engineering 2(6):2479–2487

    Google Scholar 

  35. Santos L, Gómez A, Sarmiento R (2019) Implementation of CCSDS standards for lossless multispectral and hyperspectral satellite image compression. IEEE Trans Aerosp Electron Syst 56(2):1120–1138

    Article  Google Scholar 

  36. Seeram E (2019) Digital image processing concepts, in Digital Radiography. p. 21–39.

  37. Setia V, Kumar V (2012) Coding of DWT coefficients using run-length coding and Huffman coding for the purpose of color image compression. International Journal of Computer and Communication Engineering 6:201–204

    Google Scholar 

  38. Shehab M, Daoud MS, AlMimi HM, Abualigah LM, Khader AT (2019) Hybridising cuckoo search algorithm for extracting the ODF maxima in spherical harmonic representation. International Journal of Bio-Inspired Computation 14(3):190–199

    Article  Google Scholar 

  39. Simpson AL et al. (2019) A large annotated medical image dataset for the development and evaluation of segmentation algorithms. arXiv preprint arXiv:1902.09063.

  40. Sumari P, Syed SJ, Abualigah L (2021) A novel Deep learning pipeline architecture based on CNN to detect Covid-19 in chest X-ray images. Turkish Journal of Computer and Mathematics Education (TURCOMAT) 12(6):2001–2011

    Article  Google Scholar 

  41. Talukder KH, Harada K (2010) Haar wavelet based approach for image compression and quality assessment of compressed image. arXiv preprint arXiv:1010.4084

  42. Theis L et al. (2017) Lossy image compression with compressive autoencoders. arXiv preprint arXiv:1703.00395

  43. Touil DE, Terki N (2020) Optimized color space for image compression based on DCT and Bat algorithm. Multimed Tools Appl 80:1–21

    Google Scholar 

  44. Underwood R et al. (2020) FRaZ: A Generic High-Fidelity Fixed-Ratio Lossy Compression Framework for Scientific Floating-point Data. arXiv preprint arXiv:2001.06139

  45. Wang A, Zhang W, Wei X (2019) A review on weed detection using ground-based machine vision and image processing techniques. Comput Electron Agric 158:226–240

    Article  Google Scholar 

  46. Witten IH et al. (1999) Managing gigabytes: compressing and indexing documents and images: Morgan Kaufmann.

  47. Yousri D, Abd Elaziz M, Abualigah L, Oliva D, al-qaness MAA, Ewees AA (2021) COVID-19 X-ray images classification based on enhanced fractional-order cuckoo search optimizer using heavy-tailed distributions. Appl Soft Comput 101:107052

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Laith Abualigah.

Ethics declarations

Conflict of interest

There is no confict of interest.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix A: Set of the images used in the experiments

Appendix A: Set of the images used in the experiments

1.1 Color Image

figure bfigure b

1.2 Grayscale image

figure cfigure c

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Otair, M., Abualigah, L. & Qawaqzeh, M.K. Improved near-lossless technique using the Huffman coding for enhancing the quality of image compression. Multimed Tools Appl 81, 28509–28529 (2022). https://doi.org/10.1007/s11042-022-12846-8

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-022-12846-8

Keywords

Navigation