
This paper presents an adaptive method for extracting fabric pattern templates, focusing on efficiently and accurately digitizing textural features in traditional fabric images. Using Segment Anything Model 2 (SAM2) automatic mask generation as the core, this study precisely segments color blocks in fabric images, providing high-quality data for further processing. The method employs a multistep strategy. First, color quantization and bilateral filtering reduce image complexity, remove noise, and enhance edges. Second, advanced edge detection algorithms identify prominent edges to assist SAM2 segmentation, ensuring accuracy and reliability. Finally, masks generated by SAM2 are classified and merged based on their covered colors in the original images, producing clear pattern templates. This method is validated with numerous real fabric images, and it shows strong adaptability and efficiency in extracting color templates. It provides robust support for digital preservation of traditional fabric patterns and opens up opportunities for innovative applications and heritage development, marking a significant advancement in this field.
Ziqi Wang, Enyin Fang, Xiaonan Qin, Pengfei Cheng, Zhaoqi Fang, "Adaptive Extraction Method of Textile Patterns based on Image Segmentation" in Journal of Imaging Science and Technology, 2026, pp 1 - 10, https://doi.org/10.2352/J.ImagingSci.Technol.2026.70.1.010408