Improved Median Edge Detection (iMED) for Lossless Image Compression


  • Muhammad Shoib Amin East China Normal University, Shanghai, China
  • Summaira Jabeen Zhejiang University, Hangzhou, China
  • Changbo Wang East China Normal University, Shanghai, China
  • Hassan Ali Khan East China Normal University, Shanghai, China
  • Abdul Jabbar Zhejiang University, Hangzhou, China



Difference Vector, K-means clustering, Learning rate, Lossless image compression, Median Edge Detector (MED), Predictive Coding


A wide variety of applications are used in lossless image compression models, especially in medical, space, and aerial imaging domains. Predictive coding improves the performance of lossless image compression, which highly relies on entropy error. Lower entropy error results in better image compression. The main focus of this research is to improve the prediction process by minimizing the entropy error. This paper proposes a novel idea for improved Median Edge Detection (iMED) predictor for lossless image compression. MED predictor is improved using k-means clustering and finding the local context of pixels using 20-Dimensional Difference (DDx20) for input images and updates the cluster weights using learning rates (µi) to minimize the prediction errors of pixels. The performance of the proposed predictor is evaluated on the standard grey-scale test images dataset and KODAK image dataset. Results are obtained and compared based on entropy error, bits per pixel (bpp), and computational running time in seconds(s) with the MED, GAP, FLIF, and LBP predictors. The performance of the proposed iMED predictor improves significantly in terms of the entropy error, bpp, and computational running time in seconds(s) after comparison with different state-of-the-art predictors.


Al-Khafaji G. (2012). Intra and inter frame compression for video streaming. Computer Science.

Al-Khafaji G, Al-Mahmood H (2016). Lossless image compression using adaptive predictive coding of selected seed values. Int J Comput Appl, 141(4), 26-29.

Al-Mahmood H, Al-Rubaye Z (2014). Lossless image

compression based on predictive coding and bit plane slicing. International Journal of Computer Applications, 93(1).

Avramovi´c A, Reljin B (2010). Gradient edge detection predictor for image lossless compression. In Proceedings ELMAR-2010 (pp. 131-34). IEEE.

Azman NAN, Ali S, Rashid RA, Saparudin FA, Sarijari MA (2019). A hybrid predictive technique for lossless image compression. Bulletin of

electrical engineering and informatics, 8(4), 1289-96.

Standard Gray-Scale test images. Image Databases. Retrieved August 4, 2022, from files V3/image databases.htm

True Color Kodak Images. Kodak. Retrieved August 4, 2022, from

Fouad, MM (2015). A lossless image compression using integer wavelet transform with a simplified median-edge detector algorithm. Int J Eng Technol, 15(04), 155604-7373.

Hameed ME, Ibrahim MM, Abd Manap N, Mohammed AA. (2020). A lossless compression and encryption mechanism for remote monitoring of ECG data using Huffman coding and CBCAES. Future generation computer systems, 111, 829-40.

Haijiang T, Sei-ichiro K, Kazuyuki T (2005). A Study of Bias Correction Methods for Enhancing Median Edge Detector Prediction. In 2005 IEEE

th Workshop on Multimedia Signal Processing (pp. 1-4). IEEE.

Hussain AJ, Al-Fayadh A, Radi N (2018). Image compression techniques: A survey in lossless and lossy algorithms. Neurocomputing, 300, 44-69.

Kabir MA, Mondal MRH (2018). Edge-based and prediction-based transformations for lossless image compression. Journal of Imaging, 4(5), 64.

Kamisli F (2016). A low-complexity image compression approach with single spatial prediction mode and transform. Signal, Image and Video Processing, 10(8), 1409-16.

Kwan C, Luk Y (2018). Hybrid sensor network data compression with error resiliency. In 2018 Data Compression Conference (pp. 416). IEEE.

Kwan C, Larkin J (2018). Perceptually lossless compression for Mastcam images. In 2018 9th IEEE Annual Ubiquitous Computing,

Electronics & Mobile Communication Conference (UEMCON) (pp. 559-65). IEEE.

Li F, Hong S, Wang L (2019). A novel near lossless image compression method. In 2019 IEEE International Symposium on Circuits and Systems (ISCAS) (pp. 1-5). IEEE.

Li X, Orchard MT (2001). Edge-directed prediction for lossless compression of natural images. IEEE Transactions on image processing, 10(6), 813-17.

Marlapalli K, Bandlamudi RS, Busi R, Pranav V, Madhavrao B. (2021). A review on image compression techniques. Communication Software and Networks, 271-79.

Novikov D, Egorov N, Gilmutdinov M. (2016). Local-adaptive blocks-based predictor for lossless image compression. In 2016 XV International Symposium Problems of Redundancy in Information and Control Systems (REDUNDANCY) (pp. 92-99). IEEE.

Prasanna YL, Tarakaram Y, Mounika Y, Subramani R. (2021). Comparison of Different Lossy Image Compression Techniques. In 2021 International Conference on Innovative Computing, Intelligent Communication and Smart Electrical Systems (ICSES) (pp. 1-7). IEEE.

Qasim AJ, Din R, Alyousuf FQA. (2020). Review on techniques and file formats of image compression. Bulletin of Electrical Engineering and Informatics, 9(2), 602-10.

Rahman MA, Hamada M, Shin J. (2021). The impact of state-of-the-art techniques for lossless still image compression. Electronics, 10(3), 360.

Shanmathi G, Maniyath SR (2017). Comparative study of predictors used in lossless image compression. Asian J Appl Sci Technol (AJAST), 1, 10-13.

Sharma U, Sood M, Puthooran E (2021). A novel resolution independent gradient edge predictor for lossless compression of medical image sequences. International Journal of Computers and Applications, 43(8), 764-74.

Siddeq MM, Rodrigues MA (2017). A novel high-frequency encoding algorithm for image compression. EURASIP Journal on Advances in Signal Processing, 2017(1), 1-17.

Sneyers J, Wuille P. (2016). FLIF: Free lossless image format based on MANIAC compression. In 2016 IEEE international conference on image processing (ICIP) (pp. 66-70). IEEE.

Tiwari AK , Kumar RVR (2005). A switched adaptive predictor for lossless compression of high resolution images. In IEEE International

Conference on Communications, 2005. ICC 2005. 2005 (Vol. 2, pp. 1097-1101). IEEE.

Tiwari AK, Kumar RR (2008). Least squares based optimal switched predictors for lossless compression of images. In 2008 IEEE International Conference on Multimedia and Expo (pp. 1129-32). IEEE.

Venugopal D, Mohan S, Raja S (2016). An efficient block based lossless compression of medical images. Optik, 127(2), 754-58.

Vura S, Patil P, Patil, SB (2021). A study of different compression algorithms for multispectral images. Materials Today: Proceedings.

Weinberger MJ, Seroussi G, Sapiro G (2000). The LOCO-I lossless image compression algorithm: Principles and standardization into JPEG-LS. IEEE Transactions on Image processing, 9(8), 1309-24.

Wu J, Liang Q, Kwan C (2012). A novel and comprehensive compressive sensing-based system for data compression. In 2012 IEEE Globecom Workshops (pp. 1420-25). IEEE.

Zhou J, Kwan C (2018). A Hybrid approach for wind tunnel data compression. In 2018 Data Compression Conference (pp. 435). IEEE.




How to Cite

Amin, M. S., Jabeen, S., Wang, C., Khan, H. A., & Jabbar, A. (2023). Improved Median Edge Detection (iMED) for Lossless Image Compression. Image Analysis and Stereology, 42(1), 25–35.



Original Research Paper