Call for Paper - November 2023 Edition
IJCA solicits original research papers for the November 2023 Edition. Last date of manuscript submission is October 20, 2023. Read More

Inter-Color Context Classifier for High Performance Lossless Bayer Image Compression

International Journal of Computer Applications
Foundation of Computer Science (FCS), NY, USA
Year of Publication: 2021
D.A. Mitchell, H.B. Mitchell

D A Mitchell and H B Mitchell. Inter-Color Context Classifier for High Performance Lossless Bayer Image Compression. International Journal of Computer Applications 183(14):1-7, July 2021. BibTeX

	author = {D.A. Mitchell and H.B. Mitchell},
	title = {Inter-Color Context Classifier for High Performance Lossless Bayer Image Compression},
	journal = {International Journal of Computer Applications},
	issue_date = {July 2021},
	volume = {183},
	number = {14},
	month = {Jul},
	year = {2021},
	issn = {0975-8887},
	pages = {1-7},
	numpages = {7},
	url = {},
	doi = {10.5120/ijca2021921451},
	publisher = {Foundation of Computer Science (FCS), NY, USA},
	address = {New York, USA}


Switched prediction algorithms are widely used for lossless image compression including Bayer image compression. All switched predictions algorithms have the same structure consisting of two separate functions working in tandem: A local pixel pattern function, or context classifier, and a set of pixel-value prediction functions. For each local context a different prediction function is selected. In this article we describe a new switched prediction algorithm specifically for lossless Bayer image compression. The new algorithm uses generic context classifier which may be used with any set of prediction functions. We show that using the generic context classifier we obtain a substantial improvement in lossless Bayer image compression. The new context classifier is both simple and fast to implement with a low memory requirement.


  1. M. J. Weinberger, G. Seroussi, G. Sapiro, Loco-I lossless image compression algorithm: Principles and standardization into jpeg-ls, IEEE Trans Image Process 9 (2000) 1309–1326.
  2. A. Bazhyna, A. Gotchev, K. Egiazarian, Lossless compression of Bayer pattern color filter arrays, in: Proceedings SPIE, volume 5672, 2005, pp. 378–387.
  3. A. Trifan, A. J. R. Neves, A survey on lossless compression of Bayer color filter array images, Int J Computer Inform Engineer 10 (2016) 729–734.
  4. N. Memon, D., X. Wu, Recent developments in contextbased predictive techniques for lossless image compression, Compter J. 40 (1997) 127–136.
  5. X. Wu, N. D. Memon, Context-based, adaptive, lossless image coding, IEEE Trans Commun 45 (1997) 437–444.
  6. C.-C. Chang, G.-I. Chen, Enhancement algorithm for nonlinear context-based predictors, IEE Proc Vision Image and Signal Process 150 (2003) 15–19.
  7. J. Jiang, B. Guo, S. Y. Yang, Revisiting the JPEG-LS prediction scheme, IEE Proc Vis Image Signal Process 20 (2000) 575–580.
  8. X. Li, Demosaicking by successive approximation, IEEE Trans Image Process 14 (2005) 370–379.
  9. D. Kiku, M. Monno, Y.and Tanaka, M. Okutomi, Beyond color difference: Residual interpolation for color image demosacking, IEEE Trans Image Process 25 (2016) 1288–1300.
  10. D. Menon, G. Calvagno, Color image demosaicking: an overview, Image Communication 26 (2011) 518–533.
  11. M. Hernandez-Cabronero, I. Blanes, F. Auli-Llinas, M. W. Marcellin, , J. Serra-Sagrista, Mosaic-based color transform optimization for lossy and lossy-to-lossless compression of pathology whole-slide images, IEEE Trans Medical Imaging 38 (2019) 21–32.
  12. M. Hernandez-Cabronero, M. W. Marcellin, I. Blancs, I. Serra-Sagrista, Lossless compression of color filter array mosaic images with visualization via jpeg 2000, IEEE Trans Multimedia 20 (2018) 257–270.
  13. S. K. Mohammed, K. M. Mafijur Rahman, K. A. Wahid, Lossless compression in Bayer color filter array for capsule endoscopy, IEEE Access 5 (2017) 13823–13834.
  14. A. Bazhyna, Image compression in digital cameras, in: PhD thesis, Tampere University of Technology, Finland, (2009)
  15. M.W. Alam, M.M. Hasan, S.K. Mohammed, F. Deeba, K.A.Wahid, Are current advances of compression algorithms for capsule endoscopy enough? a technical review, IEEE Reviews in Biomedical Engineering 10 (2017) 26–43.
  16. N. Lian, L. Chang, V. Zagorodnov, Y. Tan, Reversing demosaicking and compression in colour filter array image processing: performance analysis and modeling, IEEE Trans Image Process 15 (2006) 3261–3278.
  17. S.-Y. Lee, A. Ortega, A novel approach for image compression in digital cameras with a bayer color filter array, in: IEEE Int Conf Image Process (ICIP’01), volume 3, 2001, pp. 482– 485.
  18. K.-H. Chung, Y.-H. Chen, A lossless compression scheme for Bayer color filter array images, IEEE Trans Image Process 17 (2008) 134–144.
  19. N. Zhang, X. Wu, Lossless compression of color mosaic images, IEEE Trans Image Process 15 (2005) 1379–1388.
  20. S. Marusic, G. Deng, Adaptive prediction for lossless image compression, Image Communication 17 (2002) 363–372.
  21. S.W. Golomb, Run-length encodings, IEEE Trans Inf Theory 12 (1966) 399–401.
  22. G. G. Langdon Jr, An introduction to arithmetic coding, IBM J Res Develop 28 (1984) 135–149.
  23. S. K. Mohammed, K. A.Wahid, Lossless and reversible color space transformation for Bayer color filter array images, IEE Image Process 12 (2018) 1485–1490.


Lossless image compression, Bayer image compression, switched prediction, inter-color context, JPEG-LS, CALIC