AN IMAGE DITHERING VIA TCHEBICHEF MOMENT TRANSFORM

Many image display applications and printing devices allow only limited number of colours. They have limited computational power and storage to produce high quality outputs on high bit-depth colour image. A dithering technique is called for here in order to improve the perceptual visual quality of the limited bit-depth images. A dithered image is represented by a natural colour in the low bit depth image colour for displaying and printing. This technique obtains low cost colour image in displaying the colour and printing image pixels. This study proposes the dithering technique based on Tchebichef Moment Transform (TMT) to produce high quality image at low-bit colour. Earlier, a 2 · 2 Discrete Wavelet Transform (DWT) has been proposed for better image quality on dithering. The 2 · 2 TMT has been chosen here since it performs better than the 2 · 2 DWT. TMT provides a compact support on 2 · 2 blocks. The result shows that 2 · 2 TMT gives perceptually better quality on colour image dithering in significantly efficient fashion.


INTRODUCTION
Most colour image printing and displaying devices have limited capability of reproducing dot points. Consequently, the number of bit depth colours has to be scaled down to limited colour palette. A true colour image is represented by 24 bits to specify the colour for each pixel in the screen display. However, a higher computing power is needed to support such a display on high fidelity images. At the same time, many printer devices have a limited number of colours to print a high quality true colour image. The printer devices are only expected to be equipped with low computing power and storage.
Alternatively, an image dithering approach can display the colour image in limited number of bits where the specific colour at each pixel are defined in colour tables or colour palette. Image dithering is a useful technique to reduce the colour depth in the image display.
Digital dithering is a process of generating a pattern of dot with limited colour numbers to reproduce a visually appealing result (Yao and Wan, 2010). It diffuses the quantization error in a local area of an image to its neighbouring area. The aim of dithering is to distribute errors among pixels to exploit visual perception on colour images displayed with a limited colour option. Direct reduction of the bit depth will result in image staggering. The use of dithering technique will produce perceptually smoothen image display through using limited colours.
Previously, a Discrete Wavelet Transform (DWT) has been proposed for better image quality on dithering than Floyd Steinberg method (Ernawan et al., 2012). A DWT requires heavy computing using a special wavelet filter. In order to overcome the complexity of DWT, this study proposes Tchebichef moments for efficiency and simplicity to dither colour image. Without going into complex field, TMT has been widely used in image and audio processing. For examples, they are used in image Science Publications JCS analysis , texture segmentation, multispectral texture, template matching, pose estimation, pattern recognition, image projection (Abu et al., 2010a), image compression (Ernawan et al., 2011a;Abu et al., 2010b;Lang et al., 2009;Rahmalan et al., 2010), adaptive image compression (Ernawan et al., 2013a), speech recognition (Ernawan et al., 2011b) and vowel recognition (Ernawan et al., 2013b). TMT does not involve any numerical approximation unlike other popular continuous transforms. The Tchebichef moment consists of rational numbers only. In addition, Tchebichef moment requires a simple evaluation of algebraic expression only.
In this study, image dithering based on 2×2 Tchbichef moment is utilized on colour images dithering. A 2×2 pixel block is chosen here instead the popular standard 8×8 sub block image to produce minimum reconstruction error. In the previous research, image dithering for gray scale image based on 2×2 TMT has performed better than 2×2 DWT (Ernawan et al., 2012). Experimental results also show that TMT requires lower computation to dither colour image than DWT. This study will not only inspect the image quality visually but also evaluate the difference between the original image and its reconstructed image.

Discrete Wavelet Transform
The wavelet transform is computed separately for different segment on the time domain signals at different frequencies. DWT uses multi resolution filter banks and special wavelet filters for the analysis and reconstruction of signals. Filtering the image with 2-D DWT increases the phase distortion. Most DWT implementations use separable filtering with real coefficient filters associated with real wavelets resulting in real valued approximations and details.
In two dimensions, a scaling function φ(x,y) and three wavelets Ψ H (x,y), Ψ V (x,y) and Ψ D (x,y) and are necessary. The Ψ H (x,y) measures variations along columns (horizontal), Ψ V (x,y) responds to variation along rows (vertical) and Ψ D (x,y) corresponds to variations along diagonals (diagonal). Each scaling wavelet function is the by product of the basis wavelet functions. The scaling function (1) and separable directional sensitive wavelet functions (2)-(4) are given as follows Equation 1-4: The decomposition of DWT in the image is shown in Fig. 1.
In 2D-DWT, the scaled and translated basis functions are shown in Equations 5 and 6 (Ye et al., 2009): where, index i identifies the directional wavelet in terms of value of H (Horizontal), V (Vertical) and D (Diagonal). The DWT of function f(x,y) of size 2×2 is given in (7) and (8)

JCS
where, i = {H,V,D}, j 0 is the starting scale, the w j (j 0 ,m,n) coefficients define the approximation of f(x,y), i Ψ W (j,m,n) coefficients represent the horizontal, vertical and diagonal details for scales j≥j 0 . Here j 0 = 0 and select N+M = 2 j so that j = 0,1 and m, n = 0,1. Then the inverse of the DWT is given in (9) as follows Equation 9 (Ye et al., 2009)

Tchebichef Moment Transform
Tchebichef moment transform is a transform method based on discrete orthogonal Tchebichef polynomials which carry energy compactness properties for both graphical and natural images. For a given set {t n (x)} of input a value (image intensity values) of size N = 2, the forward discrete orthogonal Tchebichef Moments of order m + n is given as follows Equation 10 (Ernawan et al., 2012): where m = 0, 1 and n = 0, 1. f (x, y) denotes the intensity value at the pixel position (x, y) in the image. The t n (x) are defined using the following recursive relation Equation 11 and 12: The set {t n (x)} has a squared-norm given by Equation 13: The process of image reconstruction from its moments, the inverse moment Tchebichef moments are given as follows Equation 14: 1 1 m n mn m=0 n = 0 for m = 0, 1 and n = 0, 1. where, f(x, y) ɶ denotes the reconstructed intensity distribution. Tchebichef moment transform has its own advantage in image processing which has not been fully explored. The TMT involves only algebraic expressions and it can be computed easily using a set recurrence relation (10)-(13).

AN EXPERIMENTAL DESIGN
In this experiment, Floyd Steinberg method, DWT and TMT shall be used on image dithering. This experimental used 80 sample images containing 40 natural images and 40 graphical images. The samples of 40 natural images and 40 graphical images of size 512×512 pixels were analyzed and evaluated on image dithering. A sample true colour of natural and graphical images with size 512×512 pixels is shown in Fig. 2 and 3.
They are reduced to 4-bit using the popular clustering technique, K-means method.

K-Means Algorithm
The mapping or initial colour palette is accomplished by clustering the colour partition into a number of distinct groups. This study used K-Mean clustering to distinguish colour for displaying the image with a limited colour palette. The initial palette colour is chosen based on K-means algorithm. This approach is obtained to reduce the bit depth from 8-bit into 4-bit colour image.
The clustering approaches can be categorized into partition and hierarchical clustering algorithms. The partition clustering algorithms such as K-means clustering is a popular technique for clustering colour image processing by partitions data set into k sets or a number of distinct groups. When an image is quantized into a limited number of colours, the colour regions are clustered into one of the colours in the palette. The results of the degradation among the colours can still be perceived by human eye.
Typically K-mean begins with k arbitrary centers chosen uniformly at random from the data points. Each point is then assigned to the nearest center and each center is recomputed as the center of mass of all points assigned to it. These two steps (assignment and center calculation) are repeated until the process stabilizes. K-Means algorithm attempts to find the cluster centre s 1 , ..., s j , that sum of squared distance of each data point x i to its nearest cluster centre s j is minimized. The membership for each data point belongs to nearest centre depends on minimum distance. This membership is given in (15) where, N refers to numbers of data point, x i is each data point, s j is cluster centre and k is the number of clusters the data will be partitioned. The outputs of natural and graphical images with 4-bit of size 512×512 pixels using K-Means algorithm are shown in Fig. 4 and 5. The experimental results of reduced colour using K-Mean as presented in Fig. 4 and 5 shows that the image outputs has much lower quality than original 24-bit RGB image. Another adverse effect of reducing the bit-depth of colour image gives a smearing effect surrounding an edge. The colours on two sides of the edge are smeared to each Science Publications JCS other and sharp edges are converted to jagged edges. In this experiment, the colour image has been clustered into 16 clusters. The number of clusters is determined to classify number of colour images.
Next, the 4-bit RGB image with 16 colours is divided into 2×2 pixel blocks of pixels. Each block is transformed from the pixel domain to the moment coefficient by 2×2 TMT. The weight filter table is used to adjust the image output. Next, the error diffusion for TMT is proposed to distribute errors among its pixels. 2×2 TMT is implemented to achieve better performance on image dithering. During the image dithering, 2×2 blocks of pixels are processed from left to right and from top to bottom. In this experiment, 2×2 sub block image becomes useful due to its size advantage in the image dithering. A 2×2 sub block image becomes popular and efficient in image reconstruction (Ernawan et al., 2012). Next, each block of the image is computed with 2×2 orthogonal Tchebichef polynomials independently.
Having large number of pixels on true colour images, K-Means may be computationally faster than hierarchical clustering. This palette is representing the pixel colours in the sample above. The palette tables specification of the 4bit colours on natural image and graphical image of size 512×512 pixels are presented in Table 1 and 2 respectively. The visualization of TMT colour image dithering scheme is presented in Fig. 6.

Moment Coefficients
The block size N is taken to be 2 and moments are compared to the image dithering with N = 2 using DWT. Based on discrete orthogonal moments as defines in (11)-(13), a kernel matrix K (2×2) is given as follows Equation 16: The matrix T (2×2) of moments is defined based on (16) and (17) This process is repeated for every block in the original image to generate the coefficients of discrete orthogonal Tchebichef Moments. The inverse moments relation in (19) used to reconstruct the image block from the above moments is given as follow Equation 19: where, G (2×2) denotes the matrix image of the reconstructed intensity values. This process is repeated for every block on the coefficients Tchebichef Moments. In order to adjust the contrast of the image, the filtering process is applied on TMT coefficients. The filtering process is given as follows Equation 20: where, c (2×2) is the TMT coefficient and P is the weight on the filtering process. The weight table is given in (21) as follows Equation 21: 1.0 0.7 P = 0.7 0.4 The sample weight above is applied for filtering process on colour image dithering based on 2×2 TMT and 2×2 DWT respectively.

Error Diffusion
The reduced numbers of colour image to the limited number of colours will disturb in the edge region of the image. The error diffusion is used to reproduce the illusion having more colours and make smooth transitional colours. It has been done by spreading the error to the neighboring pixels. The neighbor pixels are biased in the opposite direction. The Floyd and Steinberg error diffusion technique has been widely used in most half toning image (Chang et al., 2009). The Floyd steinberg algorithm diffuse the quantization error to the neighbour pixels are shown in Fig. 7. The error is being dispersed among the pixels to the right hand side and below the current pixel. The Floyd Steinberg method has occasionally produced an intrusive effect on sharp pattern over the edge. The dot diffusion produces blur in the edge image due to the diffusion operation. The error diffusion Floyd Steinberg method is presented in Fig. 7. where, X represents the current pixel and A, B, C and D represent the neighbouring pixels that receive 7/16, 3/16, 5/16 and 1/16 of the error respectively. The nearest intensity scale of the current pixel is divided into 16 options. The image dithering based on DWT will apply the same error diffusion from Floyd Steinberg method to dither the colours. In order to apply Tchebichef moment, this study proposes new scheme error diffusion in image dithering based on TMT. The error is dispersed among pixels to the right and below the current pixel according to the pattern as presented in Fig. 8.
The effect of error diffusion of a pixel is distributed among to neighboring pixels such that the neighboring pixels are biased in the reverse direction. Error diffusion typically forms uniform color shade on the surrounding region and produces false edges. The error diffusion method is used to reduce undesirable distortion, such as non-linear distortion (worm artifact), linear distortion (sharpening) and noise (Lee et al., 2010).

Image Quality Measurement
The image reconstruction error is typically calculated by obtaining the differences between the dithered image g(i, j, k) and the original image f (i, j, k) as follows Equation 22: where, the image size is M×N and the third index refers to the RGB colours. Another convenient measurement is the Means Squared Error (MSE), it is defined as follows Equation 23 (Hore and Ziou, 2010): The next measurement is Peak Signal to Noise Ratio (PSNR). The PSNR is defined as follows Equation 24 (Yim and Bovik, 2011):  MD = max(max(max( g(i, j,k) ))) The average error score of colour image dithering based on Floyd Steinberg, 2×2 DWT and 2×2 TMT for 40 natural images and 40 graphical images of size 512×512 pixels are shown in Table 3 and 4. The average time taken from colour image dithering on 40 natural images and 40 graphical images of size 512×512 pixels is shown in Table 5.
In order to observe the effectiveness on visual image output, the sample natural and graphical images are shown on the right of Fig. 9 and 12 with zoomed in up to 200%. The comparison between image output of 4-bit RGB image and colour image dithering based on Floyd Steinberg on zoomed in image 200% are given on the left and right of Fig. 10 and 13. The visual image coming out of image dithering using 2×2 DWT and 2×2 TMT are shown on the left and right of Fig. 11 and 14.

DISCUSSION
The experimental results of colour image dithering for 4-bit RGB image using Floyd Steinberg, 2×2 DWT and 2×2 TMT have been done. In the previous research, image dithering based on 2×2 DWT produce better visual quality on the output image than Floyd Steinberg method. In addition, DWT consumes significantly longer time to dither colour images. In this study TMT has been proposed as a contender to DWT with lower computational and simpler mathematical framework. An image dithering based on 2×2 TMT is more efficient to dither a colour image than 2×2 DWT. Image dithering based on TMT can produce smooth transition between two colours.
And image dithering based on Floyd Steinberg method, 2×2 DWT and 2×2 TMT on the 4-bit RGB image may be observed as presented in Fig. 10, 11, 13 and 14. A dithered image output from 2×2 DWT for natural image as shown on the left of Fig. 11 show that DWT produce perceptually more natural image than a dithered image output from Floyd Steinberg as shown on the right of Fig. 10. Referring to Fig. 14, a dithered image output based on 2×2 DWT for graphical image produce visually better quality image than the dithered image output from Floyd Steinberg as presented on the right of Fig. 13. Otherwise, the dithered image output based on 2×2 TMT produce visually similar quality output image than a dithered image output from 2×2 DWT. TMT dithering consistently produces perceptually similar quality output to DWT dithering at the expense faster speed.
According to the experimental results as presented in Table 3, the average error score of an image dithering output based on 2×2 TMT produces significantly better quality image measurement score than a dithered image output from Floyd Steinberg on 40 natural images. The results show that TMT has significant advantages to dither colour image with a limited colour palette. The experiment results also shows that the proposed TMT as presented in Table 5 is faster to dither colour image than DWT.

CONCLUSSION
An image display spends significant amount of computing power to display true colour images. An image dithering technique is an alternative approach that offers higher perceptual quality on image display using limited colours. The image dithering based on Tchebichef moment has been proposed in this study to provide efficient computation with simple mathematical framework. The experimental results show that Tchebichef moment produces better dithering output than Floyd Steinberg. At the same time, TMT dithers faster than DWT. Hence, 2×2 TMT is ideal for high fidelity colour image dithering.