| Yun Brocade is a traditional Chinese jacquard silk product with rich colors and exquisite craftsmanship,which has concentrated the history,culture and technology of China for nearly 7000 years.It is known as the "crown of brocade".However,due to expensive raw materials and the complex weaving processes,Yun brocade faces the problems of high costs and low production efficiency,which limit its development.In addition,the pattern design of Yun Brocade lacks modern elements,resulting in a small audience and lagging promotion,making it difficult to activate and inherit in the contemporary era.In order to realize the innovative design of Yun Brocade and expand its consumer market,this paper reconstructs the patterns,colors,and other features of Yun Brocade,proposes a local style transfer model based on color optimization,and combines the texture of Yun Brocade to establish a system for image generation.The main work of this paper is summarized as follows:(1)Analysis of Yun Brocade imagesThe surface feature elements of Yun Brocade include patterns and textures.This paper provides an in-depth analysis of the surface features of Yun Brocade from three aspects: pattern,color,and texture vision: In terms of pattern,the contents of Yun Brocade are mainly divided into ten categories,which are relatively fixed and have a rigorous layout;In terms of color,K-means clustering algorithm is used to extract the main colors of Yun brocade.The results show that the colors of it are mainly red orange and chartreuse,supplemented by blue purple and brown;In terms of texture vision,silk has a strong sense of grain,and peacock feather thread has a strong sense of three-dimensional and unique luster.Gold thread presents different texture effects based on its shape and gold content.(2)Construction of a Local Style Transfer Model for Yun Brocade Based on Color OptimizationIn order to achieve innovation in Yun Brocade,a local style transfer model based on color optimization for Yun Brocade is proposed.This model optimizes the local effects of style transfer by adding color loss.The experimental results show that the optimized algorithm proposed reduces the color differences in generated images and improves the semantic recognition of the pattern.The transfer renderings are evaluated by the average similarity index and the data shows that the overall average similarity of the renderings obtained by the optimized algorithm is 0.382,which is 9.14% higher than that of the local transfer algorithm.(3)Construction of a Layered Model for Yun Brocade Style ImagesFirstly,in terms of texture,primitives of textures of Yun Brocade are extracted through algorithms like edge detection and dilation corrosion.Using the texture synthesis algorithm of image quilting to generate texture template with a size of 512×512 pixels.Then,the super-resolution processing algorithm is used to zoom in and improve the clarity of the transfer renderings,and the longest edge is set to 512 pixels,while the image maintains its original scale to obtain a standard size.Simultaneously perform the same cutting on each texture template to achieve size matching between patterns and textures.Finally,by combining texture templates and the masks of content images,various texture layers are obtained.Fusing the following layers in the order of heddle interfilar texture layer,special texture layer,transfer rendering,silk texture layer,and base fabric texture layer.(4)Development of Yun Brocade style image generation systema Yun Brocade style image generation system is developed by using Python language and Tkinter.The system consists of three modules: transfer renderings,texture layers,and Yun Brocade style image generation.The test results of the example show that the generated image retains the style of the Yun Brocade pattern,and the texture is natural and realistic. |