Ru Xin, Chen Ran, Peng Laihu, Shi Weimin
College of Mechanical Engineering, Zhejiang Sci-Tech University, Hangzhou 310018, China.
Sensors (Basel). 2024 Jan 3;24(1):281. doi: 10.3390/s24010281.
Patterns entered into knitting CAD have thousands or tens of thousands of different colors, which need to be merged by color-separation algorithms. However, for degraded patterns, the current color-separation algorithms cannot achieve the desired results, and the clustering quantity parameter needs to be managed manually. In this paper, we propose a fast and automatic FCM color-separation algorithm based on superpixels, which first uses the Real-ESRGAN blind super-resolution network to clarify the degraded patterns and obtain high-resolution images with clear boundaries. Then, it uses the improved MMGR-WT superpixel algorithm to pre-separate the high-resolution images and obtain superpixel images with smooth and accurate edges. Subsequently, the number of superpixel clusters is automatically calculated by the improved density peak clustering (DPC) algorithm. Finally, the superpixels are clustered using fast fuzzy c-means (FCM) based on a color histogram. The experimental results show that not only is the algorithm able to automatically determine the number of colors in the pattern and achieve the accurate color separation of degraded patterns, but it also has lower running time. The color-separation results for 30 degraded patterns show that the segmentation accuracy of the color-separation algorithm proposed in this paper reaches 95.78%.
输入到针织CAD中的图案有数千种或数万种不同颜色,需要通过分色算法进行合并。然而,对于退化图案,当前的分色算法无法达到理想效果,且聚类数量参数需要手动管理。在本文中,我们提出了一种基于超像素的快速自动FCM分色算法,该算法首先使用Real-ESRGAN盲超分辨率网络来清晰化退化图案并获得具有清晰边界的高分辨率图像。然后,使用改进的MMGR-WT超像素算法对高分辨率图像进行预分割,得到边缘平滑且准确的超像素图像。随后,通过改进的密度峰值聚类(DPC)算法自动计算超像素聚类的数量。最后,基于颜色直方图使用快速模糊c均值(FCM)对超像素进行聚类。实验结果表明,该算法不仅能够自动确定图案中的颜色数量并实现退化图案的准确分色,而且运行时间更短。对30个退化图案的分色结果表明,本文提出的分色算法的分割准确率达到95.78%。