# An Efficient Palette Generation Method for Color Image Quantization
## 5 Conclusions  
In this article, an efficient method is presented to generate the color palette. The proposed method consists of two stages. The first stage is to generate the initial palette. First, the \(N\) colors are generated according to the data distribution of the input image in the RGB color space. Then, one color is selected from the \(N\) colors and this color is added to the initial palette, and the step is repeated until the color number of the initial palette is equal to \(K\). The second stage is to generate the quantized images using the fast K-means algorithm. The data sampling process and the Wu-Lin method are employed to achieve reduction in computation time.  
Many sampling rates are used in this study. Experimental results show that the visual quality of the 256 colors quantized image is approximately the same as that of the original image. When the sampling rate = 0.125, the computation time of the proposed method is less than 0.3 s. In other words, the proposed method can generate high-quality quantized images while consuming little computational cost. It is thus suitable for real-time multimedia applications.  
**Funding:** This research received no external funding.  
**Informed Consent Statement:** Not applicable.  
**Data Availability Statement:** The data presented in this study are available on request from the corresponding author.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline  & & & \multicolumn{2}{c}{\(K\) = 32} & \multicolumn{4}{c}{\(K\) = 64} & \multicolumn{4}{c}{\(K\) = 128} & \multicolumn{4}{c}{\(K\) = 256} \\ \hline
**Image** & **Iter** & **MSE\({}_{a}\)** & **dev** & **T** & **MSE\({}_{a}\)** & **dev** & **T** & **MSE\({}_{a}\)** & **dev** & **T** & **MSE\({}_{a}\)** & **dev** & **T** \\ \hline \multirow{3}{*}{Lena} & 1 & 126.44 & 2.09 & 468 & 77.30 & 1.27 & 723 & 50.00 & 0.46 & 1172 & 32.77 & 0.30 & 2074 \\  & 5 & 119.26 & 0.61 & 2373 & 73.05 & 0.60 & 3616 & 46.96 & 0.32 & 5827 & 30.84 & 0.21 & 10412 \\  & 10 & 118.56 & 0.41 & 4764 & 72.53 & 0.38 & 7219 & 46.66 & 0.27 & 11787 & 30.61 & 0.20 & 20783 \\ \hline \multirow{3}{*}{Baboon} & 1 & 390.16 & 3.87 & 478 & 247.09 & 2.29 & 716 & 159.21 & 1.24 & 1177 & 103.40 & 0.64 & 2042 \\  & 5 & 376.97 & 1.19 & 2401 & 238.57 & 0.87 & 3593 & 153.75 & 0.65 & 5869 & 98.77 & 0.39 & 10209 \\  & 10 & 375.43 & 0.58 & 4803 & 237.79 & 0.70 & 7224 & 153.24 & 0.53 & 11712 & 98.41 & 0.34 & 20452 \\ \hline \multirow{3}{*}{Peppers} & 1 & 245.47 & 4.81 & 478 & 148.21 & 3.19 & 739 & 91.79 & 2.65 & 1167 & 59.87 & 0.88 & 2049 \\  & 5 & 230.25 & 1.19 & 2382 & 136.12 & 1.78 & 3678 & 84.76 & 0.81 & 5894 & 55.42 & 0.42 & 10244 \\  & 10 & 229.31 & 1.37 & 4727 & 134.59 & 1.51 & 7325 & 84.31 & 0.47 & 11746 & 54.66 & 0.34 & 20484 \\ \hline \multirow{3}{*}{Lake} & 1 & 216.97 & 4.06 & 474 & 143.66 & 3.40 & 712 & 95.53 & 1.77 & 1156 & 63.32 & 1.27 & 2043 \\  & 5 & 204.89 & 0.76 & 2358 & 132.67 & 0.88 & 3595 & 87.01 & 0.52 & 5890 & 56.94 & 0.33 & 10223 \\ \cline{1-1}  & 10 & 203.73 & 0.79 & 4718 & 131.69 & 0.49 & 7183 & 85.75 & 0.43 & 11735 & 55.53 & 0.36 & 20447 \\ \hline \multirow{3}{*}{Airplane} & 1 & 130.06 & 17.75 & 469 & 67.12 & 10.42 & 701 & 38.70 & 3.40 & 1182 & 24.98 & 1.06 & 2055 \\ \cline{1-1}  & 5 & 91.88 & 14.08 & 2366 & 53.00 & 3.74 & 3501 & 33.06 & 2.22 & 5874 & 21.68 & 0.83 & 10242 \\ \cline{1-1}  & 10 & 71.61 & 4.97 & 4707 & 46.94 & 2.31 & 7004 & 31.49 & 1.49 & 11761 & 21.08 & 0.72 & 20588 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Results of the method proposed by [PERSON] [17]. (Iter: iteration of the algorithm, MSE\({}_{a}\): average MSE, dev: standard deviation of MSE, T: average computation time (milliseconds)).  
**Acknowledgments: This work was partially supported by the Ministry of Science and Technology, Taiwan, under Grant MOST 104-2221-E-153-012.**  
**Conflicts of Interest: The author declares that there is no conflict of interest.**