Encoding true-color images with a limited palette via soft vector clustering as an instance of dithering multidimensional signals Mohamed Attia a,b,c, , Waleed Nazih d , Mohamed Al-Badrashiny e , Hamed Elsimary d a The Engineering Company for the Development of Computer Systems, RDI, Giza, Egypt b Luxor Technology Inc., Oakville, Ontario L6L6V2, Canada c Arab Academy for Science & Technology (AAST), Heliopolis Campus, Cairo, Egypt d College of Computer Engineering and Sciences, Salman University, AlKharj, Saudi Arabia e King Abdul-Aziz City for Science and Technology (KACST), Riyadh, Saudi Arabia article info Article history: Received 3 October 2012 Accepted 24 October 2013 Available online 6 November 2013 Keywords: Digital signal processing, Digital image processing Dithering Multidimensional signals Quantization noise Reduced color depth Soft vector clustering Soft Data Clustering abstract One of the classic problems of digital image processing is to encode true-color images for the optimal viewing on displays with a limited set of colors. A major manifestation of optimal viewing in this regard is to maximally remove parasitic artifacts in the degraded encoded images such as the contouring effect. Several robust attempts have been made to solve this problem over the past 50 years, and the first contribution of this paper is to introduce a simple – yet effective – novel solution that is based on soft vector clustering. The other contribution of this paper is to propose the application of the soft clustering methodology deployed in our color-encoding solution for the dithering of multidimensional signals. Dithering essen- tially adds controlled noise to the analog signal upon its digitization so that the resulting quantization noise is dispersed over a much wider band of the frequency domain and is therefore less perceptible in the digitized signal. This comes of course at the price of more overall quantization noise. Dithering is a vital operation that is performed via well-known simple schemes upon the analog-to-digital conver- sion of one-dimensional signals; however, the published literature is still missing a general neat scheme for the dithering of multidimensional signals that is able to handle arbitrary dimensionality, arbitrary number and distribution of quantization centroids, and with computable and controllable noise power. This gap is also filled by this paper. Ó 2013 Elsevier Inc. All rights reserved. 1. Introduction The digitization of an analog one dimensional signal – known as Analog-to-Digital (‘‘A-to-D’’ or ‘‘A2D’’) conversion – aims at mapping any given sample of the signal within its dynamic range q min 6 q 6 q max to one element of a pre-defined set of quantum lev- els fc 1 ; c 2 ; ... ; c i ; ... :; c L g; q min 6 c i 6 q max ; L P 2. In order to mini- mize the digitization error, this mapping is typically done through the minimum-distance criterion; i.e. the signal sample is mapped to the nearest quantum level, which can be formulated as follows: q ! AtoD i 0 : i 0 ¼ arg min 8k;16k6L fdðq; c k Þg ð1Þ ...where d(q 1 , q 2 ) is any legitimate distance criterion between q 1 ; q 2 2 R 1 . The digitization of a given signal sample in the 1D space is reduced into a simple selection of one of – at most – the two quantum levels enclosing that signal sample as illustrated by Fig. 1 below. [1,2] The sum of the squared digitization errors of all the emerging signal samples make the quantization noise which is formulated as follows [1,2]: E 2 q ¼ X 8q e 2 q ðqÞ¼ X 8q ðq c i 0 Þ 2 ð2Þ The distribution of the set of quantum levels over the dynamic range of the signal may be regular that c i ¼ q min þði 1Þ q max q min L and is then called regular quantization. When the distribution of emerging signal samples to be digitized is significantly irregular, the distribution of the quantum levels may be designed to track that irregular one of emerging samples, and is then called adaptive quantization. 1 Adaptive quantization aims at minimizing the quanti- zation noise for any given number of quantum levels: L. [1,2] 1047-3203/$ - see front matter Ó 2013 Elsevier Inc. All rights reserved. http://dx.doi.org/10.1016/j.jvcir.2013.10.008 Corresponding author at: Luxor Technology Inc., Oakville, Ontario L6L6V2, Canada. E-mail address: m_Atteya@RDI-eg.com (M. Attia). URLs: http://www.RDI-eg.com, http://www.AAST.edu (M. Attia), http://www.sau.edu.sa (W. Nazih), http://www.KACST.edu.sa (M. Al-Badrashiny), http://www.sau.edu.sa (H. Elsimary). 1 The distribution of the quantum levels in Fig. 1 is assumed to belong to this second kind of quantization. J. Vis. Commun. Image R. 25 (2014) 349–360 Contents lists available at ScienceDirect J. Vis. Commun. Image R. journal homepage: www.elsevier.com/locate/jvci