摘要
本文主要研究由于瓷砖厂马赛克瓷砖颜色有限,而原始图像颜色过多产生的最优颜色瓷砖的替代问题。考虑到图像的表现力,只要瓷砖的RGB颜色点能够尽量均匀分布在空间中,找出与已定22种颜色组成后能最大限度拟合整个RGB色块的颜色。再将整个RGB块分割为8个区域,取每个色块顶点作为待选点,采用离散型选址问题,结合加权后的像素颜色欧式距离公式以及迭代算法计算出最优解,使得每增加一种颜色后,根据算法输出的颜色距离值最小的点即为增加的颜色点,再通过贪心算法得出需要增加的1~10种颜色。
This paper mainly studies the replacement of optimal color tiles due to the limited color of mosaic tiles in ceramic tile factory and too many original image colors. Considering the expressiveness of the image, as long as the RGB color points of the ceramic tile can be evenly distributed in the space as far as possible, the color of the whole RGB color block can be fitted to the greatest extent after finding out the composition with the determined 22 colors. Then divide the whole RGB block into 8 regions, take the vertex of each color block as the point to be selected, use the discrete location problem, combined with the weighted pixel color Euclidean distance formula and iterative algorithm to calculate the optimal solution, so that after each color is added, the point with the smallest color distance value output by the algorithm is the added color point, and then obtain 1 ~ 10 colors to be added through the greedy algorithm.
作者
廖育铭
孔诗瑞
梁讯
LIAO Yuming;KONG Shirui;LIANG Xun(Chongqing Jiaotong University,Chongqing 400074,China)
出处
《信息与电脑》
2022年第6期81-84,共4页
Information & Computer