# An Efficient Palette Generation Method for Color Image Quantization
## 4 Experimental Results and Discussion
Figures 10 and 11 illustrate the quantized images of Splash and Tree, respectively. These quantized images are produced by the proposed method with a sampling rate of 0.125. The results show that the proposed method can generate high-quality quantized images. It is observed that the visual quality of the 256 colors quantized image is approximately the same as that of the original image. Figure 9: (**a**) The Airplane image, (**b**) 32 colors with MSE = 70.21, (**c**) 64 colors with MSE = 41.62, (**d**) 128 colors with MSE = 27.27, (**e**) 256 colors with MSE = 19.22. Figure 10: **(a)** The Splash image, (**b**) 32 colors with MSE = 96.72, (**c**) 64 colors with MSE = 52.64, (**d**) 128 colors with MSE = 30.65, (**e**) 256 colors with MSE = 19.31. The effect of the parameter _Thr_ on the solution is discussed in this section. The comparison is applied to the Baboon and Peppers images. The MSE obtained will be shown in a figure for comparison. The proposed method only considers the cubes for which the point number contained in them is greater than or equal to _Thr_ in order to generate the initial palette. Figure 12 compares the results of _Thr_ = {3, 10, 30, 60} for the Baboon image. This figure shows that the mean square errors obtained when _Thr_ = 3, 10 and 30 are near, and the average mean square error obtained when _Thr_ = 60 is slightly higher than that obtained when _Thr_ = 3, 10 and 30. Figure 13 compares the results of _Thr_ = {3, 10, 30, 60} for the Peppers image. This figure shows that the average mean square error obtained when _Thr_ = 10 is slightly lower than that obtained when _Thr_ = 3 and 30, and the average mean square error obtained when _Thr_ = 60 is higher than that obtained when _Thr_ = 3, 10 and 30. Therefore, the value selected for the parameter _Thr_ of the proposed algorithm was 10. Figure 11: (**a**) The Tree image, (**b**) 32 colors with MSE = 34.50, (**c**) 64 colors with MSE = 20.92, (**d**) 128 colors with MSE = 13.79, (**e**) 256 colors with MSE = 9.44. In 2020, a color image quantization algorithm, identified as PSO+ATCQ-3, that combines particle swarm optimization and artificial ants was proposed by [PERSON] [17]. The quality of the quantized images produced by PSO+ATCQ-3 is better than that produced by some well-known color image quantization methods. The PSO+ATCQ-3 algorithm was implemented in C language and executed on a PC running under the Linux operating system with an I7 processor (2 GHz) and 16 GBytes of RAM [17]. The experimental results obtained by PSO+ATCQ-3 are shown in Table 3.  
First, the performance of the proposed method with sampling rate = 0.125 is compared to the iteration 1 of PSO+ATCQ-3. The MSE obtained by PSO+ATCQ-3 is higher than that obtained by the proposed method for all cases. The computation time of PSO+ATCQ-3 is between 468 and 2074 milliseconds. The computation time of the proposed method is  
\[MSE=\frac{1}{512\times 512}\sum_{i=0}^{511}\sum_{j=0}^{511}SED\big{(}f(i,j),\ f^{ \prime}(i,j)\big{)}, \tag{8}\]0 Compare the results of _Thr_ = {3, 10, 30, 60} for the Baboon image, (**a**) MSE—32 colors, (**b**) MSE—64 colors, (**c**) MSE—128 colors, (**d**) MSE—256 colors. \[MSE=\frac{1}{512\times 512}\sum_{i=0}^{511}\sum_{j=0}^{511}SED\big{(}f(i,j),\ f^{ \prime}(i,j)\big{)}, \tag{8}\]1 Compare the results of _Thr_ = {3, 10, 30, 60} for the Peppers image, (**a**) MSE—32 colors, (**b**) MSE—64 colors, (**c**) MSE—128 colors, (**d**) MSE—256 colors. between 30 and 230 milliseconds. It reveals that PSO+ATCQ-3 consumes more computation time than the proposed method. Second, the performance of the proposed method with sampling rate = 0.25 is compared to the iteration 5 of PSO+ATCQ-3. For the Lena, Baboon, Peppers and Lake images, the MSE obtained by PSO+ATCQ-3 is slightly lower than that obtained by the proposed method. For the Airplane image, the MSE obtained by PSO+ATCQ-3 is higher than that obtained by the proposed method. The computation time of PSO+ATCQ-3 is between 2358 and 10.412 milliseconds.