An interactive system design method and system for the digital process of Chaozhou embroidery

Through the interactive system of Chaozhou Paigao embroidery digital process production process, image decomposition and path detection technology are used, combined with circular confrontation generation network, the problem that existing technology cannot provide teaching guidance is solved, and the visual interactive teaching of Chaozhou embroidery is realized, which is improved. Learning efficiency and cultural communication effect.

CN118350276BActive Publication Date: 2024-11-01GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410497859.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2024-11-01
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

The existing embroidery workbench cannot provide teaching guidance, and digital interactive technology only stays at the cultural dissemination of innovative art forms, and cannot help beginners and enthusiasts effectively learn Chaozhou embroidery culture.

Method used

Design an interactive system for the production process of Chaozhou grading embroidery digital process. Through image decomposition, path detection and height adjustment technology, it provides interactive teaching guidance, and combines circular confrontation generation network and style transfer technology to generate decomposition step diagrams and dynamic embroidery paths. , realize user visual learning.

Benefits of technology

Provide convenient and efficient visual teaching guidance for beginners and enthusiasts, improve learning efficiency, promote the dissemination of Chaozhou embroidery culture and the digital development of intangible cultural heritage culture, and realize a novel way of Chaozhou embroidery entity visual interactive teaching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118350276B_ABST
    Figure CN118350276B_ABST
Patent Text Reader

Abstract

The present invention discloses an interactive system design method and system for the production process of digital process of Chaozhou padding embroidery. The system determines the image type according to the image uploaded by the user and the database trained by the system, generates a decomposition step diagram, and projects it onto the embroidery cloth through a projector. The user starts embroidering according to the projected image. The picture taken by the camera is automatically intercepted, and the path is compared with the corresponding step decomposition diagram generated by the system. When the overlap reaches 70% required by the system, the next step can be carried out. When it comes to padding, the built-in projector will project a stereoscopic image profile to the opposite moving rod. The user can judge whether the padding height is appropriate through projection occlusion. The system will also intercept and compare the picture taken by the left camera to analyze and detect the user's padding height. The camera will record the user's operations from the initial embroidery to the final finished product, including the system's detection feedback, and upload it to the cloud system synchronously for the user to review and organize.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of embroidery digital interaction, and in particular to an interactive system design method and system for a Chaozhou padding embroidery digital process production process. Background Art

[0002] Existing embroidery workbenches generally change their form based on the traditional embroidery workbenches from the perspective of practical operation, increase storage space or become more compact and convenient, but such improved workbenches are only suitable for enthusiasts and craftsmen with rich embroidery experience, and cannot provide teaching assistance to enthusiasts and beginners. The purpose of the present invention is to guide users to learn and participate in embroidery step by step through technologies such as image decomposition and interactive mapping, and deepen the embroidery teaching experience.

[0003] Currently, most of the existing digital interactive projects related to embroidery are interactive devices or works for display. For example, the team of the Media and Interaction Laboratory of Tsinghua University has created two dynamic Suzhou embroidery works - "Mulan" and "Splendid Orchid Butterfly". Their works use specially designed shape memory alloy wires as skeletons embedded in the embroidery pieces. By precisely controlling the current of the alloy wires and using SMA string frames, the butterflies on the embroidery surface flutter and the orchids bloom, realizing the dynamic expression of traditional Chinese embroidery. Junichi Yamaoka of Keio University in Japan proposed a design of smart textiles using conductive sequins produced by a 3D printer based on traditional sequin embroidery technology. The design uses conductive and non-conductive resins to print two types of sequins through a 3D printer, and then combines and embroiders them using traditional sequin embroidery technology. When a force such as touch or pressure is applied to the conductive sequins, the signal generated from the circuit will be sent to the computer. The computer can visualize the electrical signals of this textile and sense the changes in the state of the textile, breaking through the limitations of the sequin fabric in vertex modeling capabilities.

[0004] However, the above settings can only provide a superficial cultural communication significance, and cannot help beginners and enthusiasts to participate in learning Chaozhou embroidery and promote the dissemination of intangible cultural heritage from a practical perspective. The present invention is developed to solve the problem that the public's understanding of Chaozhou embroidery remains superficial and there is a shortage of teaching videos or teaching aids for intangible cultural heritage in the market, and is committed to providing a teaching platform for the dissemination and learning of Chaozhou embroidery culture. Summary of the invention

[0005] The purpose of the present invention is to provide an interactive system design method and system for the digital process production process of Chaozhou padding embroidery, which realizes a novel teaching guidance method of Chaozhou embroidery entity visualization interactive teaching, applies and integrates digital technology, makes Chaozhou embroidery teaching more rigorous and scientific, and broadens the channels for the digital development and innovation of intangible cultural heritage.

[0006] To achieve the above object, the present invention provides an interactive system design method for the digital process of Chaozhou embroidery, comprising the following steps:

[0007] S1. Classify Chaozhou embroidery according to themes and establish a Chaozhou embroidery database with pictures of Chaozhou embroidery works and videos of the embroidery process;

[0008] S2, based on the Chaozhou embroidery model library established in step S1 and the improved image-generated model, the picture input by the user is decomposed to obtain the Chaozhou embroidery style transfer effect picture and the three-dimensional image, and the Chaozhou embroidery database is combined with the adversarial generative network to generate the Chaozhou embroidery production step diagram;

[0009] S3, the user draws a sketch according to the Chaozhou embroidery production step diagram in step S2, and a color block is placed in the designated padding area on the sketch to remind the user that cotton wool needs to be added here to achieve the padding effect, and different colors represent different amounts of cotton wool;

[0010] S4, detecting the height of cotton wool filled by the user;

[0011] S5, extracting the embroidery path and performing detection;

[0012] S6. By recording the embroidery process from the initial embroidery to the final product and the feedback records of the user that need to be modified during the embroidery process, upload them to the cloud system for the user to review.

[0013] Preferably, in step S1, the following steps are included:

[0014] S11. Collect pictures of Chaozhou embroidery works and videos of the embroidery process according to the results of Chaozhou embroidery classification;

[0015] S12. The captured Chaozhou embroidery production process video needs to automatically identify the frames of the key links of the embroidery through the key frame detection algorithm, so that in the embroidery process video, each time the operator completes a step, it can automatically capture the frame of the key link of the embroidery. Figure 1 The pictures are input into the system as step diagrams for training the model library, including:

[0016] First, the frame difference method is used to compare the pixel differences between consecutive video frames to identify the moments when the picture changes significantly;

[0017] For complex scene changes, the system uses a machine learning-based algorithm to further analyze content changes between frames, identify key steps in the embroidery process, and obtain key frame images;

[0018] After automatic screenshots, annotate the image stream of automatically captured key frames and record the key action descriptions of each step;

[0019] S13, input the main view, top view, and left view of three Chaozhou embroidery works of different themes, set the height of each Chaozhou embroidery work into four levels: the highest level, the second highest level, the third highest level, and the plane level, measure the height of each level in turn, integrate the data of each level, calculate the average value of each level, and finally formulate a height level color classification table;

[0020] S14, extracting features from images of key frames and images of Chaozhou embroidery works of different themes to obtain a Chaozhou embroidery database;

[0021] Preferably, in step S2, the following steps are included:

[0022] S21, automatically dividing each part of the image into layers according to the previously generated stereo image and converting it into a pattern line drawing through Canny edge detection;

[0023] S22, train the cyclic adversarial neural network through the Chao embroidery database. After the user uploads the image, read the image and split it into continuous embroidery actions according to the Chao embroidery database preset in the previous text. Each action generates a dynamic image. The cyclic adversarial neural network and style transfer technology are used to automatically generate a corresponding frame-by-frame image sequence for each step, and play it according to the image sequence to form an intuitive animation, which specifically includes:

[0024] (1) Establish a generator A, which is a multi-layer neural network decoder. The input is x and the output is G(x). The input and output dimensions are the same.

[0025] (2) Establish a discriminator A, which is also a multi-layer neural network decoder. The input is instance A or G(x), and the output is a Softmax predicted probability value.

[0026] (3) Establish a generator B, which is a multi-layer neural network decoder. The input is y and the output is F(y). The input and output dimensions are the same.

[0027] (4) Establish a discriminator B, which is also a multi-layer neural network decoder. The input is instance B or F(y), and the output is a Softmax predicted probability value.

[0028] (5) Obtain the embroidery process data sets of x and y, establish Dataloader, and set the number of iterations and batch size;

[0029] (6) Select the Adam optimization method for gradient descent optimization;

[0030] (7) Input the data set x into the generator A and the discriminator A to generate G(x), and calculate the loss L with the data set y. GAN (F,D X, Y, X) and And back propagate to update the gradient;

[0031] (8) Input the dataset y into the generator B and the discriminator B to generate F(y), and calculate the loss L with the dataset x. GAN (F,D Y , X, Y) and And back propagate to update the gradient;

[0032] (9) When all rounds of iterations are completed, the model parameters that make the generators G and F work best are obtained;

[0033] (10) Use the trained recurrent adversarial generative network to input the images uploaded by the user and generate a sequence of embroidery sample images for each step in the embroidery process.

[0034] Preferably, in step S4, the following steps are included:

[0035] S41, the user raises the height by projecting the shield detection

[0036] The built-in projector is embedded in the central part of the moving rod at the lower edge of the workbench, and the 3D image generated by the system is projected to the upper edge of the workbench to simulate the three-dimensional cross-sectional view of the effect after the padding. The user adjusts the actual padding height of the work in combination with the images projected by the upper projector and the built-in projector. When the cotton wool actually padded by the user completely blocks the image projected by the built-in projector after the user's operation, it means that the user's padding embroidery has reached the ideal padding height; if it does not completely block the image projected by the built-in projector, the user needs to continue to add cotton wool until it is completely blocked;

[0037] S42, System screenshot recognition height

[0038] When the stereoscopic cross-section image is first projected, the system automatically captures the image from the left camera. After the user completes the padding, he / she makes an "OK" gesture within the visible range of the camera. The system recognizes the user's gesture through a lightweight dynamic gesture recognition network model based on spatiotemporal feature extraction.

[0039] According to the screenshot, it is detected that in the picture taken by the left camera, the projection image originally projected on the upper edge of the moving rod has been covered by the shadow of the user's embroidery and turned into a dark color. If the overlap rate of the two pictures is less than 10%, it is determined that the user's raising height is effective, and a prompt sound is issued to remind the user to proceed to the next step;

[0040] The lightweight dynamic gesture recognition network model for spatiotemporal feature extraction includes a cascaded three-dimensional residual network and a temporal convolutional network. The lightweight dynamic gesture recognition network model for spatiotemporal feature extraction unifies the original data in time and space dimensions, and uses the Res C3D module constructed by a three-dimensional convolutional neural network and residual ideas to extract the short-term spatiotemporal features of dynamic gestures, and then uses TCN to encode the short-term spatiotemporal features. The lightweight dynamic gesture recognition network model for spatiotemporal feature extraction inputs the spatiotemporal features into a multi-layer perceptron network for gesture recognition. After successful recognition, the system will issue a screenshot command to the camera. The two screenshots are uploaded to the system, and the image features of the projection image on the upper moving rod are extracted and matched again through the SIFT technology.

[0041] Preferably, in step S5, the following steps are included:

[0042] S51, embroidery path extraction, the specific steps include:

[0043] S511, obtaining a user input image: first, obtaining an embroidery image provided by a user as input;

[0044] S512, grayscale conversion: converting the user input image into a grayscale image;

[0045] S513, Gaussian filtering: applying a Gaussian filter to the grayscale image for smoothing;

[0046] S514, applying Canny edge detection: applying the Canny edge detection algorithm to the Gaussian filtered image, specifically including: calculating the gradient amplitude and direction of the Gaussian filtered image, applying non-maximum suppression to the gradient amplitude image, using double threshold processing, dividing pixels into three categories of strong edge, weak edge and non-edge according to the gradient amplitude, performing edge connection, and forming a complete edge path by connecting strong edge pixels with their surrounding weak edge pixels;

[0047] S515, post-processing: post-processing the extracted edge path according to actual needs, removing irrelevant edges and filling broken edges;

[0048] S516, extracting the embroidery path: extracting the user's embroidery path according to the edge path.

[0049] S52, extract and match image features through SIFT, and compare with the corresponding step decomposition diagram provided to the user by the system before. The specific steps include:

[0050] S521, loading image: first, loading the embroidery path image and the corresponding step decomposition diagram for the user;

[0051] S522, detecting key points: using SIFT algorithm to detect key points in the embroidery path image and the corresponding step decomposition diagram given to the user;

[0052] S523, calculating descriptors: for each detected key point, calculating a descriptor;

[0053] S524, feature matching: for the embroidery path image and the corresponding step decomposition diagram provided to the user, matching the feature descriptor of the embroidery path image with the feature descriptor of the step decomposition image provided by the system;

[0054] S525, screening matching points: for the result of feature matching, using a screening method to exclude incorrect matching points;

[0055] The system judges the overlap between the image embroidered by the user and the decomposition diagram of the corresponding step. If the overlap does not exceed 70%, a prompt sound feedback is given to the user, and the user can make modifications and corrections through the prompt sound issued by the system; if the overlap exceeds 70%, it is judged that the operation is correct and proceeds to the next step to continue.

[0056] An interactive system design system for the digital process of Chaozhou pad-up embroidery production, comprising a workbench, with a first support arm assembly and a second support arm assembly symmetrically arranged on both sides of the workbench, a height adjustment assembly arranged below the workbench, and the height adjustment assembly and the workbench connected via a rotating assembly.

[0057] Preferably, a first support column is arranged on one side of the workbench, a second support column is arranged on the workbench on the opposite side of the first support column, a first moving rod and a second moving rod are respectively arranged at both ends of the first support column, and the first moving rod and the second moving rod are vertically connected to the first support column.

[0058] Preferably, a third support column is provided on the first support arm assembly, a fourth support column and a fifth support column are provided at one end of the third support column and connected thereto, a sixth support column is provided at one end of the fourth support column, a seventh support column is provided at one end of the fifth support column, and one end of the sixth support column is connected to the seventh support column.

[0059] Preferably, a first camera is provided at the connecting end of the sixth support column and the seventh support column, a first projector is provided on the second support arm assembly, a second camera is provided on the first moving rod, a second projector is provided on the second moving rod, and a third camera is provided on the first support column.

[0060] Therefore, the present invention adopts the above-mentioned interactive system design method and system for the digital process of Chaozhou padding embroidery, and its technical effects are as follows:

[0061] (1) In view of the problems that the existing embroidery workbench only remains at the level of ordinary operating tools and the current digital interaction in the embroidery field only remains at the level of cultural communication with innovative forms of expression but cannot provide teaching guidance, the present invention is based on interactive mapping, image decomposition, path detection and other technologies from the perspective of retaining the characteristics of Chaozhou embroidery craft, and develops a workbench and interactive system design for the digital process production process of Chaozhou embroidery for auxiliary teaching.

[0062] (2) It provides a convenient and efficient visual teaching guide for Chaozhou embroidery enthusiasts and beginners, and provides an interactive teaching model in which tourists can participate for cultural communication venues such as museums and Chaozhou embroidery workshops.

[0063] (3) The present invention can solve the problem that the existing embroidery workbench only stays at the level of ordinary operating tools and cannot provide teaching guidance. At the same time, the present invention can solve the problem that the current digital interaction in the embroidery field only stays at the level of innovative cultural communication in the form of expression of artworks or art installations. The technical application field is not wide. Thereby, it is possible to decompose the pattern to generate a step diagram, generate the embroidery path and project it, detect its path and adjust the padding height to restore and perfect the characteristics of Chaozhou embroidery's three-dimensional padding to the greatest extent. Thereby, the user only needs to upload the embroidery sample to obtain the step decomposition diagram of the actual operation of the embroidery sample, and embroider step by step according to the decomposition diagram. The embroidery surface can be adjusted through system detection. During the operation, the cultural charm of Chaozhou embroidery can be felt, the user's impression of Chaozhou embroidery can be deepened, and the intangible cultural heritage of Chaozhou embroidery can be promoted.

[0064] (4) The emergence of the present invention conforms to the current national demand for the protection and dissemination of intangible cultural heritage and the trend of cultural innovation of the era of combining digital interaction with traditional intangible cultural heritage, and realizes a novel teaching guidance method of Chaozhou embroidery entity visualization interactive teaching. The application and integration of digital technology makes Chaozhou embroidery teaching more rigorous and scientific, broadens the channels for the digital development and innovation of intangible cultural heritage, and provides a learning system that is more suitable for beginners and enthusiasts.

[0065] (5) Provide functional supplements to the existing embroidery workbench, and specially design a height detection function based on the three-dimensional raised characteristics of Chaozhou embroidery.

[0066] (6) It can effectively improve the learning efficiency of Chaozhou embroidery beginners and enthusiasts and reduce the learning difficulty;

[0067] (7) The workbench and cloud system design combines the form of digital interaction, innovates the form of intangible cultural heritage inheritance, and provides ideas for the innovative development of other intangible cultural heritage;

[0068] (8) By training the CNN convolutional neural network to establish a database, the system can decompose the embroidery sample images uploaded by users and generate step-by-step diagrams to guide teaching;

[0069] (9) Through Canny edge detection and SIFT technology, it can generate embroidery paths based on embroidery sample images uploaded by users and provide modification guidance;

[0070] (10) Users can organize and review the operation records uploaded by the camera to the cloud system;

[0071] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 It is a flow chart of an interactive system design method and system for a digital process production process of Chaozhou padding embroidery according to the present invention;

[0073] Figure 2 It is a method flow chart of an interactive system design for a digital process of Chaozhou pad embroidery production process according to the present invention;

[0074] Figure 3 This is a schematic diagram of the Chaozhou embroidery database input video and actual operation shooting angle;

[0075] Figure 4 This is the embroidery process taking the padding embroidery as an example;

[0076] Figure 5 It is a schematic diagram of some projection steps;

[0077] Figure 6 It is the color classification table of height levels;

[0078] Figure 7 It is made by Kang Huifang, the inheritor of the intangible cultural heritage of the small double-sided Chaozhou embroidery "Golden Dragon Fish";

[0079] Figure 8 It is a schematic diagram of projecting and raising the color block;

[0080] Fig. 9 The present invention is a structural diagram of an interactive system for the digital process of Chaozhou pad embroidery production.

[0081] Reference numerals

[0082] 1. Workbench; 11. First support column; 12. Second support column; 13. First moving rod; 14. Second moving rod; 2. First support arm assembly; 21. Third support column; 22. Fourth support column; 23. Fifth support column; 24. Sixth support column; 25. Seventh support column; 3. Second support arm assembly; 4. Height adjustment assembly; 5. Rotation assembly; 6. First camera; 7. First projector; 8. Second camera; 9. Second projector; 10. Third camera. DETAILED DESCRIPTION

[0083] The technical solution of the present invention is further described below through the accompanying drawings and embodiments.

[0084] Unless otherwise defined, technical or scientific terms used in the present invention shall have the common meanings understood by one having ordinary skills in the field to which the present invention belongs.

[0085] Embodiment 1

[0086] The present invention provides an interactive system design method for the production process of digital process of Chaozhou padding embroidery. The process is constructed as follows: the user uploads the image he wants to embroider to the cloud system, the system determines the image type according to the image uploaded by the user and the database trained by the system, generates a decomposition step diagram, and projects it onto the embroidery cloth through a projector, and the user starts embroidering according to the projected image. After each step is completed, the system will automatically intercept the picture taken by the camera, compare it with the path of the corresponding step decomposition diagram generated by the system, and proceed to the next step when the overlap reaches 70% required by the system. When the padding step is reached, the built-in projector will project a stereoscopic image profile to the opposite moving rod, and the user can judge whether the padding height is appropriate by projecting occlusion. The system will also intercept and compare the picture taken by the left camera to analyze and detect the user's padding height. If the overlap with the image generated by the system is less than or equal to 10% of the system requirement during the user's operation, it will be judged as an embroidery error, and the system will issue a sound prompt to remind the user to make modifications. The camera will record the user's entire operation from the initial embroidery to the final completion of the product, including the system's detection feedback, and upload it to the cloud system simultaneously for the user to review and organize.

[0087] The following steps are involved:

[0088] S1. Construction of Chaozhou embroidery database

[0089] In order to improve the training effect of this teaching auxiliary system, a Chaozhou embroidery database was constructed based on deep learning technology, especially recurrent adversarial neural network and style transfer technology.

[0090] S11, Chaozhou embroidery theme classification

[0091] The present invention classifies the themes of Chaozhou embroidery, including three themes: people, animals, and plants. The themes of people are mostly myths and legends, historical allusions, immortals and gods, local dramas, etc.; while the themes of animals are basically butterflies, fish, insects, and animals commonly seen in life, and there are also totems such as auspicious unicorns, dragons, and phoenixes that express traditional folk preferences. Influenced by Lingnan culture, the plant themes of Chaozhou embroidery include plants, flowers, and fruits from tropical areas of Guangdong in addition to traditional plants such as peony and lotus, the most famous of which is lychee. At the same time, influenced by marine culture, many myths and legends related to the ocean, life scenes, and marine specialties are the themes of Chaozhou embroidery, which fully demonstrates the strong regional cultural characteristics of Chaozhou embroidery.

[0092] The choice of thematic classification is because it is directly related to the cultural and artistic value of Chaozhou embroidery, thus ensuring that the database construction and training process can effectively capture and reproduce the unique style of Chaozhou embroidery. This strategy ensures that the Chaozhou embroidery database can cover a wide range of cultural elements and embroidery techniques, providing a rich and high-quality data source for the training of style transfer and recurrent adversarial neural networks. By focusing on the three major themes of people, animals, and plants, the system can understand and simulate the details in Chaozhou embroidery more carefully, ensuring that the generated images are highly consistent with the Chaozhou embroidery tradition. This method can significantly improve the system's learning efficiency of Chaozhou embroidery characteristics and the accuracy of generated images, and is the key to building an efficient and high-precision teaching assistance system.

[0093] S12. How to train Chaozhou embroidery database

[0094] After the Chaozhou embroidery is classified, pictures of related works and videos of the embroidery process are collected and input into the cloud system background of the present invention to train the recurrent adversarial generative neural network and establish a Chaozhou embroidery database exclusive to the present invention. Specifically, the specific steps of the recurrent adversarial generative neural network algorithm are as follows:

[0095] (1) Establish a generator A, which is a multi-layer neural network decoder. The input is x and the output is G(x). The input and output dimensions are the same.

[0096] (2) Establish a discriminator A, which is also a multi-layer neural network decoder. The input is instance A or G(x), and the output is a Softmax predicted probability value.

[0097] (3) Establish a generator B, which is a multi-layer neural network decoder. The input is y and the output is F(y). The input and output dimensions are the same.

[0098] (4) Establish a discriminator B, which is also a multi-layer neural network decoder. The input is instance B or F(y), and the output is a Softmax predicted probability value.

[0099] (5) Obtain two Chao embroidery datasets, x and y, establish Dataloader, and set the number of iterations and batch size;

[0100] (6) Select the Adam optimization method for gradient descent optimization;

[0101] (7) Input the data set x into the generator A and the discriminator A to generate G(x), and calculate the loss L with the data set y. GAN (F,D X , Y, X) and And back propagate to update the gradient;

[0102] (8) Input the dataset y into the generator B and the discriminator B to generate F(y), and calculate the loss L with the dataset x. GAN (F,D Y , X, Y) and And back propagate to update the gradient;

[0103] (9) After all rounds of iteration are completed, the model parameters that make generators G and F work best are obtained.

[0104] S121, Input video standards

[0105] The first step in establishing a database is to input the video of the Chaozhou embroidery production process. In order to provide users with better reference and the system with more accurate error detection, the main input is videos shot from the top of the operator's head, from the front of the operator, and from the left of the operator. The overhead shooting angle provides a panoramic view, which is convenient for capturing the overall embroidery process and detailed layout, which is conducive to the system's understanding of the spatial layout and step sequence of embroidery, and focuses on capturing the operator's movements and skills. It is particularly important for capturing details such as needlework and line changes, which helps the model learn the specific operations of embroidery. The front and left shooting angles are specially designed to obtain the height value of the Chaozhou embroidery pad embroidery. The angle and height difference between the needle and the cloth are captured from the side view, providing the system with accurate data on the embroidery height, and then training the model to accurately predict and guide the pad embroidery. The shooting angle of the video refers to the angle direction actually used by the user, so that the images generated by the system and the projection effect are more accurate when actually used.

[0106] During the data preprocessing stage, it is necessary to perform quality control on the collected images and videos, and select data with a resolution of up to 1080P, appropriate angles (overhead shots, frontal shots, left side shots), unified formats (MP4), and high color reproduction for training.

[0107] S122, Automatic capture steps diagram

[0108] The video of Chaozhou embroidery production process needs to be automatically identified through the key frame detection algorithm implemented by OpenCV, so that in each video, the system can automatically capture the frames of the key links of embroidery every time the operator completes a step. Figure 1 The pictures are input into the system as step diagrams for training the model library.

[0109] This process is based on the combined application of frame differencing and scene change detection algorithms. The system first uses frame differencing to compare the pixel differences between consecutive video frames to identify moments when the picture changes significantly, such as the start or end of color filling during embroidery. For complex scene changes, the system uses a machine learning-based algorithm to further analyze content changes between frames and identify, for example, needle method conversions or the beginning of embroidering a new pattern part. The two algorithms work together to enable the system to intelligently determine which frames represent key steps in the embroidery process. After the automatic screenshot, the R&D team will use the Video SwinTransformer network to annotate the image stream of the automatically captured key frames, record the key action descriptions of each step, and clarify the embroidery techniques and key points of each step.

[0110] Using the overall network architecture of Video Swin Transformer, the size of the input keyframe image stream is defined as T×H×W×3, consisting of T frames, each containing H×W×3 pixels. In Video Swin Transformer, we treat each 3D patch of size 2×4×4×3 as a token. Therefore, the 3D patch partition layer obtains 3D tokens, each patch / token consists of a 96-dimensional feature. A linear embedding layer is then applied to project the features of each token to an arbitrary dimension represented by C.

[0111] Instead of downsampling along the temporal dimension, it consists of four stages and performs 2× spatial downsampling in the patch merging layer of each stage. The patch merging layer concatenates the features of each set of 2×2 spatially adjacent patches and applies a linear layer to project the concatenated features to half their dimension.

[0112] The main component of the network is the Video Swin Transformer block, which is constructed by replacing the multi-head self-attention (MSA) module in the standard Transformer layer with a 3D shifted window based multi-head self-attention module and keeping other components unchanged.

[0113] Finally, the trained Video Swin Transformer network will output action descriptions of the key steps in each embroidery process.

[0114] For example, a picture of a rough sketch is "Drafting," and a picture of the steps to fill with wadding is "Padded."

[0115] Take the Chaozhou embroidery work "Golden Dragon Fish" as an example: First, use OpenCV to pre-process the recorded video to check whether the input video clarity, angle and other values ​​meet the standards to meet the needs of subsequent processing. Use OpenCV's frame difference method to analyze the top-view video and automatically identify the key steps in the embroidery process, such as line outline completion and color layering completion. For videos from the front and left angles, the scene change detection algorithm is used to identify key frames with significant height changes during the embroidery process, and the system automatically screenshots and saves the identified key frames.

[0116] S123 input three views of the work

[0117] In addition, it is necessary to shoot and input the main view, top view, and left view of three Chao embroidery works of different themes, and the auxiliary system will make category judgments on the images uploaded by users to make the generated step-by-step diagram more accurate.

[0118] S124, Model library sample data

[0119] Through on-site research and actual filming by the R&D team, a total of 5,000 Chaozhou embroidery production process videos were collected, including 1,500 with human themes, 1,500 with plant themes, and 2,000 with animal themes. A total of 30,000 step-by-step pictures were captured from the videos, with about 6 pictures taken from each video to ensure that every key step of the embroidery process is covered, thereby providing detailed training data for the system.

[0120] S125. Extract image features

[0121] Take Chaozhou embroidery works with figures as an example. The figures in Chaozhou embroidery generally use the "open face" embroidery method, that is, the figure needs to be laid with thick wool thread as the base (i.e. raised), and then the facial features are carved on it, so that the facial expressions are exaggerated and vivid. For example, if you want to depict the "birthday star", you need to raise the forehead of the birthday star.

[0122] Take Chaozhou embroidery works with plant themes as an example. In Chaozhou embroidery, the plant themes are mostly flowers as the protagonists, and leaves as the background. Therefore, flowers usually occupy the center of the picture or a large area, and leaves are distributed around the flowers. In terms of shape, Chaozhou embroidery likes to focus on outlining the shape of the plant, with petals stacked layer by layer, highlighting the edges of the petals to increase the presence of the petals, and leaves are also outlined with gold thread that is brighter than the color of the leaves themselves. In terms of color, the golden color of Chaozhou embroidery is often used. Flowers usually use bright colors, the parts close to the stamens are represented by bright colors, and the leaves are darker colors. Compared with plant embroidery in other regions such as Hunan embroidery, Chaozhou embroidery uses wavy stripes to enrich the details of the petals.

[0123] Take animal-themed Chaozhou embroidery works as an example. Influenced by the cultural beliefs of the Chaoshan area, animal-themed Chaozhou embroidery works mostly feature animals with beautiful meanings, such as dragons and phoenixes, mandarin ducks, and fish. Gold thread embroidery is often used in color to highlight luxury. In terms of depicting facial expressions, Chaozhou embroidery prefers solemn images. For example, dragons often appear with eyes wide open, teeth bared, and claws bared, and a deterrent image appears in Chaozhou embroidery works. Animals with scales, such as fish and dragons, have different depictions of scales: the dragon is slender and its scales are hard, so it is represented by a fine needle embroidery method; fish scales are larger than dragon scales, so they are represented by a round fan shape. This method is also often used for the back hair of some feathered animals, such as the phoenix.

[0124] The three themes are obviously different in appearance and easy to distinguish. That is, after inputting the images uploaded by the user, it is easy to search and classify them according to the previously extracted features of each theme. However, it should be noted that Chaozhou embroidery works not only present a single theme, but also have two themes at the same time. In this case, it is necessary to mobilize the model library of two or more themes for retrieval and analysis. The images uploaded by the user are scanned to analyze which pattern occupies the visual center of the entire image, and the model library retrieval and classification of this pattern is prioritized.

[0125] Take the Chaozhou embroidery work "Pine and Crane Longevity" as an example: there are only two images in the picture, the pine tree and the white crane. At this time, the system analyzes the picture effect. The white crane occupies two-thirds of the picture and is brightly colored, while the pine tree is only in the upper one-third of the picture and is darker in color. Therefore, after the analysis is completed, it is judged that this image should be an animal theme, and then the appearance of the white crane is extracted and entered into the model library of animal themes for retrieval.

[0126] Since animals in Chaozhou embroidery also have plants as background to enrich the picture, and people in Chaozhou embroidery also have a small amount of animals and plants as decoration, when searching for the main image, the secondary image is also searched. For example, in Chaozhou embroidery works, lotus and lotus leaves often appear in works depicting mandarin ducks. So when searching for the model of mandarin ducks, the models without lotus and lotus leaves will be filtered out first, and then matched. If no similar model can be found in the model library of the main image for matching, the model library of the secondary image needs to be called to search for the secondary image.

[0127] The reason why Chaozhou embroidery image features are extracted based on the three previously classified Chaozhou embroidery themes is that Chaozhou embroidery culture is profound, with rich patterns and shapes, and each embroidery method has its own techniques. If its features are not extracted, the model library may not be able to accurately identify specific embroidery techniques and styles from the images uploaded by users, affecting the accuracy of model generation and the effectiveness of system embroidery guidance. By distinguishing Chaozhou embroidery by subject matter and performing detailed feature extraction on the images, it can ensure that each match is as accurate as possible, making subsequent style transfer, generating decomposition step diagrams and other steps more accurate, and ensuring that users can obtain the best embroidery guidance that matches their uploaded patterns.

[0128] In summary, in actual application, the system compares the images uploaded by users with a large number of annotated Chaozhou embroidery images stored in the model library. This matching process is not only based on the visual features of the image, such as color and shape, but also includes the style of the pattern and embroidery techniques. When processing the images uploaded by users, the system prioritizes identifying and analyzing the theme pattern that occupies the visual center, and searches the model library of the corresponding subject matter based on the characteristics of the pattern. If the image contains multiple subjects, the system will use multiple model libraries for a more comprehensive analysis and classification, thereby providing users with a detailed decomposition step diagram to guide them to complete precise embroidery works.

[0129] S126, Chaozhou embroidery style migration

[0130] Taking a fish embroidery pattern uploaded by a user as an example, the system first scans the image and extracts key parts for analysis, and concludes that the pattern uploaded by the user is a "fish", which belongs to the animal theme. Then the model in the established Chao embroidery database is used for retrieval to match the fish theme model similar to it. Combined with the finished pictures, step screenshots and process videos of these models in the model library, the system uses style transfer technology to train the adversarial generative neural network and apply the unique style of Chao embroidery to the generated image. Specifically, we use the two sets of data sets of different styles, the fish theme data set and the finished Chao embroidery data set; using the adversarial generative neural network, the input is the fish theme data set, and the generated Chao embroidery picture reconstructed after the generator is used together with the Chao embroidery data set as the input of the discriminator, so that the discriminator can judge whether the Chao embroidery style picture is real, thereby guiding the generator to generate a picture that is Chao embroidery style and real. In this way, the generator G learns a mapping from the fish theme style to the finished Chao embroidery style by optimizing the adversarial loss, and can convert any input fish material picture into a finished picture in the Chao embroidery style.

[0131] Through further training of the recurrent adversarial generative neural network, the system refines each step of the generated image to ensure that each step diagram can accurately reflect the key skills and details in the embroidery process. Finally, the system generates a series of step diagrams, from basic outlines to detailed elevations, each step showing in detail how to complete the Chaozhou embroidery work of this fish step by step. After classifying Chaozhou embroidery, not only can the decomposition step diagrams be generated better and more accurately, but the system's detection feedback and voice guidance to users during user operation will also be more accurate and targeted.

[0132] S2. The user uploads the embroidery sample image to the cloud system to generate a decomposition step diagram

[0133] Based on the Chaozhou embroidery model library established above, in actual operation, users can select the patterns they want to embroider and upload them to the cloud system.

[0134] S21, SD applications and connections

[0135] The cloud system uses API calls to access the Stable Diffusion network model. First, the system will obtain the embroidery sample image input by the user, and then upload the embroidery sample image through the key accessed by the Stable Diffusion API. Finally, Stable Diffusion will output the embroidered image and the embroidery style image to the user for reference of the finished product effect. Stable Diffusion is an image generation technology based on deep learning that can understand and transform image content to produce high-quality image results. This technology trains a large neural network model to learn the distribution of a large amount of image data, so that it can generate new images based on a given input image or description. Specifically, the Stable Diffusion model contains the following steps:

[0136] 1. Prompt word input, text information is converted into semantic vectors and transmitted to the text encoder (TextEncoder); at the same time, the original image is passed through the image encoder (VAE Encoder) to generate Latent Feature (latent space feature) as input;

[0137] 2. Input the above information into the "image optimization module" of the model. In the latent space, the model "diffuses" the image by gradually adding noise, and finally transforms the image into a completely random noise distribution. This process simulates the diffusion phenomenon in physics, causing the features of the image to gradually disappear; in the generation stage, the model uses a noise predictor to estimate the noise of the image in the latent space, and gradually removes the noise. It also guides the generation of the image through prompt words, so as to restore a clear image from the noise.

[0138] 3. Input the Latent Feature after optimization and iteration of the image optimization module into the image decoder (VAEDecoder) to reconstruct the Latent Feature into a pixel-level image.

[0139] During this process, the controlnet plug-in and revAnimated_v122 model were introduced to further optimize the image generation process, enabling it to support more complex conversions, such as converting flat line drawings into three-dimensional graphics.

[0140] The system needs to integrate the stable diffusion environment, including installing the required deep learning libraries and dependencies, such as PyTorch and Transformers. Then, install the controlnet plug-in, which is an extension designed for stable diffusion to enhance the model's control over image structure, especially when dealing with tasks that require high accuracy and detail, such as 3D graphics generation. Controlnet introduces additional conditional information or control signals to enable the model to better follow the structure and guidance information of the input image, thereby generating a three-dimensional graphic that matches the original plane image.

[0141] Next, the system will call a specific model, revAnimated_v122, which has been specially trained to support the conversion from flat images to stereo images. This conversion involves complex geometric and visual processing. The model needs to be able to understand the lines, shapes, and spatial relationships in the flat image and construct a three-dimensional shape based on this. The revAnimated_v122 model plays a core role in this link. It has mastered the ability to convert two-dimensional images into three-dimensional visual representations by learning a large number of image pairs (flat images and corresponding stereo images).

[0142] Finally, an image with a three-dimensional effect is generated. The three-dimensional effect here refers to the three-dimensional sense of certain parts (such as the elevated parts) in the simulated image, making the image look like it is in three-dimensional space. The starting point for the application of this technology in the present invention is based on the characteristics of the three-dimensional elevation effect of Chaozhou embroidery. The generation of three-dimensional images is mainly used in the elevation step, with the purpose of simulating the effect of three-dimensional elevation. Based on the generated three-dimensional image, the user can have a prediction of the final presentation effect of the entire embroidery. This three-dimensional image can also better help the user understand if the image he uploaded is applied to three-dimensional elevation, and which parts of the embroidery will be more three-dimensional and more effective. At the same time, the three-dimensional image can provide a better reference for the system to generate a decomposition diagram, helping the system to identify which parts need to be elevated and which areas should be processed first during the embroidery process. (Supplement the Stable Diffusion image generation technology, and supplement how the cloud system and database of the present invention are connected with Stable Diffusion)

[0143] S22. Generation and projection of decomposition step animation

[0144] To prevent the system analysis from being inconsistent with the actual situation and to better restore the images uploaded by the user, the system automatically divides the image parts into layers based on the previously generated stereoscopic image and converts them into pattern line drawings through Canny edge detection. Users can draw sketches based on the projected line drawings. Specifically, the steps of the Canny edge detection algorithm include:

[0145] Grayscale: Convert the original image uploaded by the user into a grayscale image. You can use the standard grayscale conversion formula, such as taking the weighted average of the red, green, and blue channel values ​​of each pixel of the RGB image.

[0146] Gaussian filtering: Applying a Gaussian filter to a grayscale image smoothes the image to reduce the effects of noise. Gaussian filtering can be implemented as a convolution operation, where the degree of smoothing is controlled by choosing an appropriate filter size and standard deviation.

[0147] Calculate the gradient: Calculate the magnitude and direction of the gradient on the smoothed image. You can use Sobel, Prewitt, or other operators to calculate the gradient. The magnitude of the gradient indicates the edge strength of the image, while the direction of the gradient indicates the direction of the edge.

[0148] Non-maximum suppression: Non-maximum suppression is performed on the gradient magnitude image to refine the edges and suppress non-maximum points. For each pixel, only the local maximum along the gradient direction is retained, and other neighboring pixels are set to zero.

[0149] Double threshold processing: threshold processing is performed on the image after non-maximum suppression based on two thresholds, namely high threshold and low threshold. According to the gradient amplitude of the pixel, the pixels are divided into three categories: strong edge, weak edge and non-edge. Generally speaking, the high threshold is used to determine the strong edge, the low threshold is used to determine the weak edge, and the non-edge pixels are excluded.

[0150] Edge connection: A complete edge is formed by connecting strong edge pixels with their surrounding weak edge pixels. Connectivity analysis or other algorithms can be used to achieve edge connection, and finally a line drawing of the pattern uploaded by the user is obtained.

[0151] Then, by inputting a large number of images and videos of the Chao embroidery production process into the system to establish a database, and training the recurrent adversarial neural network, the system will regenerate the embroidery step-by-step diagram based on the images uploaded by the user and the three-dimensional images generated by the system. The user can get a rough reference of the finished product based on the three-dimensional image generated by the system, and gradually carry out embroidery according to the generated decomposition step-by-step diagram.

[0152] After the user uploads the image, the system reads the image and splits it into continuous embroidery actions according to the preset database model in the previous article. Each action generates 30 frames of images to ensure the smoothness of the animation. Through the cyclic adversarial generative neural network and style transfer technology, the corresponding frame-by-frame image sequence is automatically generated for each step.

[0153] Specifically, the specific steps of using the recurrent adversarial generative neural network algorithm to obtain frame-by-frame images of the embroidery process are as follows:

[0154] (1) Establish a generator A, which is a multi-layer neural network decoder. The input is x and the output is G(x). The input and output dimensions are the same.

[0155] (2) Establish a discriminator A, which is also a multi-layer neural network decoder. The input is instance A or G(x), and the output is a Softmax predicted probability value.

[0156] (3) Establish a generator B, which is a multi-layer neural network decoder. The input is y and the output is F(y). The input and output dimensions are the same.

[0157] (4) Establish a discriminator B, which is also a multi-layer neural network decoder. The input is instance B or F(y), and the output is a Softmax predicted probability value.

[0158] (5) Obtain the embroidery process data sets of x and y, establish Dataloader, and set the number of iterations and batch size;

[0159] (6) Select the Adam optimization method for gradient descent optimization;

[0160] (7) Input the data set x into the generator A and the discriminator A to generate G(x), and calculate the loss L with the data set y. GAN (F,D X , Y, X) and And back propagate to update the gradient;

[0161] (8) Input the dataset y into the generator B and the discriminator B to generate F(y), and calculate the loss L with the dataset x. GAN (F,D Y , X, Y) and And back propagate to update the gradient;

[0162] (9) When all rounds of iterations are completed, the model parameters that make the generators G and F work best are obtained;

[0163] (10) Use the trained recurrent adversarial generative network to input the images uploaded by the user and generate a sequence of embroidery sample images for each step in the embroidery process.

[0164] Aiming at the artistic style of Chaozhou embroidery, the style transfer algorithm based on the recurrent adversarial generative network is applied to the image sequence to enhance the texture and color features. Through the iterative optimization training process, the network generates a frame-by-frame picture of the embroidery process. While retaining the structure of the content image, the image has the texture and color features of the Chaozhou embroidery image, so that each frame shows the Chaozhou embroidery effect. The dynamic image is played at 24 to 30 frames per second to form an intuitive animation, and the decomposition step diagram of the teaching process is projected in the form of animation to improve the intuitiveness and understanding of teaching.

[0165] Taking the fins of the Golden Arowana as an example, the fins are relatively small, and 300 to 500 frames are required to generate the fin splitting step animation, which generates about 10 to 15 seconds of animation. The system backend uses distributed computing to optimize data generation and processing, ensuring that the response time and performance meet teaching needs. The dynamic decomposition step diagram allows users to observe the dynamic process of embroidery techniques, which is easy to learn and understand.

[0166] Taking the padding embroidery as an example, the embroidery process is: drafting, padding, covering with organza, fixing, and embroidering from high to low. The decomposition step diagram is projected onto the embroidery cloth on the workbench through a projector. The first step is to project the line drawing. Users can use the projected line drawing to make a draft.

[0167] When it comes to the step of officially starting embroidery, the system will analyze and determine whether the image actually embroidered by the user meets the standard for the next step: that is, it will compare the path with the corresponding step decomposition diagram generated by the system. If the overlap reaches 70% of the system requirement, it can proceed to the next step. The projector will project the outline embroidery, partial embroidery and other step diagrams in sequence. The user only needs to embroider according to the projected pictures to complete the finished product.

[0168] S3, Elevation Technology Projection Teaching

[0169] When the user has finished the draft according to the projected sketch, the system detects that the first step has been completed through the image captured by the camera, and then the next step - the three-dimensional heightening image will be projected. Color blocks will be projected in the designated heightening area on the user's existing sketch to remind the user that cotton wool needs to be added here to achieve the heightening effect. Different colors represent different amounts of cotton wool to avoid the three-dimensional effect being insignificant due to the same height.

[0170] However, in actual Chaozhou embroidery production, there has never been a standard for the height increase value from ancient times to the present. However, in order to enable beginners to get started better and more efficiently, the R&D team set the height increase of each work into four levels based on the 500 works previously entered into the database: the highest level, the second highest level, the third highest level, and the plane level, and measured the height increase in turn. Then, the data of each level was integrated, the average value of each level was calculated, and finally a height level color division table was formulated. This table provides a height reference for users who are performing the height increase embroidery steps, and also sets a threshold for the height recognition system, so that the final presentation of the height increase embroidery work is more scientific and accurate, ensuring the final three-dimensional effect. This approach greatly optimizes the learning curve, allowing beginners to quickly master the height increase skills through intuitive visual feedback, thereby improving learning efficiency and the quality of the work.

[0171] The following takes the classic Chaozhou embroidery work "Golden Dragon Fish" as an example: From the actual embroidery, it can be observed that only the fins, tail, and mouth of the whole fish are not padded with cotton wool. In order to distinguish the fish body, fish eyes and other parts, the amount of cotton wool used is also different.

[0172] The actual projected image will refer to the following two pictures: the most protruding position is the fish eye, which uses a red block, representing the highest layer; the second is the fish gills, which use an orange block, representing the second highest layer; then the fish body, which uses a yellow block, representing the third highest layer; the rest of the parts that do not need to be raised have no color blocks filled in and can be directly embroidered with embroidery thread.

[0173] S4. Height detection based on the three-dimensional heightening characteristics of Chaozhou embroidery

[0174] The purpose of this invention is not to replace traditional handicrafts, but to simplify the learning process of handicrafts, help more people to deeply understand the intangible cultural heritage of Chaozhou embroidery, and at the same time maintain the traditional essence of Chaozhou embroidery. In order to preserve the essence of Chaozhou embroidery, based on the three-dimensional heightening feature of Chaozhou embroidery, the camera will capture the user's flat embroidery picture and perform height detection on the user's cotton filling height.

[0175] S41, the user raises the height by projecting the shield detection

[0176] The built-in projector is embedded in the central part of the moving rod at the bottom of the workbench, and projects the 3D image generated by the system to simulate the three-dimensional cross-section of the effect after the padding to the upper edge of the workbench plane. The user can adjust the actual padding height of the work in combination with the image projected by the upper projector and the built-in projector. If the cotton wool actually padded by the user after the operation can completely block the image projected by the built-in projector, it means that the user's padding embroidery has reached the ideal padding height. If it does not completely block the image projected by the built-in projector, the user needs to continue to add cotton wool until it is completely blocked, and finally achieve the padding effect.

[0177] S42, System screenshot recognition height

[0178] Considering that there may be errors in the user's self-judgment of the padding height through the blocked image in step S41, the screenshot operation here is mainly used for the input system to analyze whether the user's actual padding height reaches the specified value, increase the rigor of the judgment, and for the user's gesture recognition. At this time, the camera standing on the left can capture the left side perspective of the entire table (that is, the distance from the upper edge camera to the built-in projector). The perspective captured by the camera is parallel to the left side of the user, and the picture captured by the camera includes the upper edge of the table for receiving the image of the built-in projector and the left side section of the embroidery sample actually embroidered by the user.

[0179] At the beginning of the step of raising the projection, the system prompts the user to make a specific gesture "OK" within the range of the left camera through voice. The system recognizes that the image captured by the camera is an unobstructed projection image and an actual embroidery sample that has not been raised. After the three-second countdown, the system can take the first screenshot. After the user completes the raising, the specific gesture "OK" is recognized within the visible range of the left camera, and the system automatically takes a second screenshot of the obstructed projection image and the actual embroidery sample that has been raised. The purpose of prompting the user to take a screenshot through voice is to control the quality of the screenshot. If the screenshot is taken without the user's preparation, the image may be blocked by the user's hand, thereby affecting the judgment result.

[0180] The system recognizes user gestures through a lightweight dynamic gesture recognition network model based on spatiotemporal feature extraction. The model includes a cascaded 3D residual network (3D Residual Network) and a temporal convolutional network (Temporal Convolutional Network). The model unifies the original data in time and space dimensions, and uses the Res C3D module constructed by a 3D convolutional neural network and residual ideas to extract short-term spatiotemporal features of dynamic gestures, and then uses TCN to encode short-term spatiotemporal features to capture long-term spatiotemporal information. The model inputs the spatiotemporal features into a multi-layer perceptron network for gesture recognition.

[0181] After the two screenshots are taken successfully, they will be uploaded to the system and the image features of the projection image on the upper moving rod will be extracted and matched again through SIFT technology. By comparing the effects before and after the padding, it is determined whether the user's actual padding has reached the specified height. If it is detected from the screenshot that the projection image originally projected on the upper edge of the moving rod in the picture taken by the left camera has been covered by the shadow of the user's embroidery and turned into a dark color, and the overlap rate of the two pictures is less than 10%, then it is determined that the user's padding height is valid, and a prompt sound is issued to remind the user to proceed to the next step.

[0182] The specific steps of SIFT algorithm include:

[0183] Scale space extremum detection: The SIFT algorithm first constructs a scale space by Gaussian filtering at different scales. A Gaussian difference pyramid is used to detect key points in the two screenshots, which correspond to local extremum points of the image.

[0184] Key point localization: At different levels of the scale space, the position and scale of the key points are determined by comparing the gradient magnitude and direction of each pixel with its neighboring pixels.

[0185] Direction assignment: For each key point, the SIFT algorithm calculates the gradient direction histogram of its local image area. The main direction of the key point is determined based on the peak direction of the histogram.

[0186] Key point description: In the neighborhood of the key point, the feature descriptor of the local image area is calculated based on the gradient direction. The descriptor captures the characteristics of the gradient direction and magnitude of the area around the key point.

[0187] Feature matching: Use the distance metric between descriptors (such as Euclidean distance) to perform feature matching. For a given descriptor, find the descriptor closest to it in another image, which is considered to be the matching feature point.

[0188] Screening matching points: In order to exclude incorrect matching points, the nearest neighbor distance ratio (ratio test) is often used for screening. For each feature point, select the feature point closest to its descriptor and the second closest feature point, and calculate the distance ratio between them. If the ratio of the nearest neighbor distance to the second nearest neighbor distance is lower than the set threshold, then the match is considered valid.

[0189] If it is detected according to the screenshot that in the picture taken by the left camera, the projected image originally projected on the upper edge of the moving rod has been covered by the shadow of the user's embroidery and turned into darkness, and the overlap rate of the two pictures is less than 10%, it is determined that the user's raising height is effective, and a prompt sound is issued to remind the user that they can proceed to the next step.

[0190] S5. The camera captures the image and extracts the embroidery path for detection

[0191] In order to make the teaching guidance of this system more accurate and effective, the upper camera will capture the overall image of the user's embroidery sample after each step, and the user's embroidery path will be extracted through the Canny edge detection technology based on the image captured by the camera on the workbench. By comparing the user's actual operation path with the predetermined path in the teaching content, the accuracy and deviation in the user's operation can be pointed out, such as whether the user's embroidery path accurately follows the teaching instructions and where adjustments or improvements are needed.

[0192] By analyzing the user's embroidery path, the system can also analyze and understand each user's learning progress and ability level. If the user's embroidery path is almost the same as the predetermined path in the teaching content, it can be analyzed that the user's current level has become mature, and the difficulty can be increased in the next teaching, and other personalized teaching upgrades can be implemented.

[0193] The minimum tolerance set by the system is 70%, that is, if the overlap between the image embroidered by the user and the corresponding step decomposition diagram provided by the system reaches 70%, it can be judged that the operation is correct and the next step can be continued. If the SSI structural similarity index of the two images is greatly different and lower than the minimum tolerance set by the system, it means that the image embroidered by the user and the corresponding step decomposition diagram provided by the system cannot overlap, and the difference is large. There may be problems such as wrong embroidery, narrow embroidery, path deviation, etc., which may affect the effect of the finished product. In this case, a prompt sound feedback will be sent to the user through the cloud system, and the user can make modifications and corrections through the prompt sound issued by the system. The specific steps include:

[0194] Get user input image: First, get the embroidery image provided by the user as input.

[0195] Grayscale: Convert the user input image to a grayscale image. You can use the standard grayscale conversion formula to convert a color image to a grayscale image.

[0196] Gaussian filtering: Apply a Gaussian filter to the grayscale image for smoothing to reduce the interference of noise. Choose an appropriate filter size and standard deviation to control the degree of smoothing.

[0197] Apply Canny Edge Detection: Apply the Canny edge detection algorithm to the Gaussian filtered image. This can be done by following the steps below:

[0198] Calculate the gradient magnitude and direction of an image.

[0199] Applies non-maximum suppression to the gradient magnitude image to refine edges and suppress non-maximum points.

[0200] Using double threshold processing, pixels are divided into three categories: strong edge, weak edge and non-edge according to the gradient amplitude.

[0201] Perform edge connection by connecting strong edge pixels with their surrounding weak edge pixels to form a complete edge path.

[0202] Post-processing: Perform post-processing on the extracted edge paths according to actual needs. It may be necessary to remove small irrelevant edges, fill broken edges, or perform other morphological operations.

[0203] Extract embroidery path: Extract the embroidery path created by the user based on the edge path. This process mainly identifies closed contours or extracts the path required by the user based on certain rules and conditions.

[0204] Secondly, the system extracts and matches image features through SIFT and compares them with the corresponding step decomposition diagram provided to the user by the previous system. The specific steps include:

[0205] Loading image: First, load the image after the embroidery path extraction mentioned above, as well as the corresponding step decomposition diagram provided by the system to the user.

[0206] Detect key points: Use the SIFT algorithm to detect key points in the image. The SIFT algorithm achieves scale invariance by finding stable image feature points at different scales and rotations. Common SIFT implementation libraries include OpenCV and VLFeat.

[0207] Calculate descriptors: For each detected keypoint, calculate its descriptor. A descriptor is a numerical representation of the local features of the area around the keypoint. The descriptor captures features such as the gradient direction and magnitude around the keypoint.

[0208] Feature matching: For these two images, the feature descriptor of the embroidery path image is matched with the feature descriptor of the step decomposition image provided by the system. Common feature matching methods include nearest neighbor matching and nearest neighbor ratio test.

[0209] Screening matching points: For the result of feature matching, some screening methods can be used to exclude wrong matching points. For example, the RANSAC algorithm (random sampling consensus) can be used to estimate the model and eliminate wrong matches.

[0210] The minimum tolerance set by the system is 70%, that is, if the overlap between the image embroidered by the user and the corresponding step decomposition diagram provided by the system reaches 70%, it can be judged that the operation is correct and the next step can be continued. If the SSI structural similarity index of the two images is greatly different and lower than the minimum tolerance set by the system, it means that the image embroidered by the user and the corresponding step decomposition diagram provided by the system cannot overlap and the difference is large. There may be problems such as wrong embroidery, narrow embroidery, path deviation, etc., which may affect the effect of the finished product. Then, a prompt sound feedback will be sent to the user through the cloud system, and the user can make modifications and corrections through the prompt sound issued by the system.

[0211] S6. Users can establish learning reviews based on the present invention

[0212] The present invention will use the camera on the workbench to shoot and record the user's embroidery process from the initial embroidery to the final finished product from three angles: "top down", "left side plane" and "front plane". During the embroidery process, the system will analyze and compare the pictures taken by the camera with the feedback records that need to be modified according to the algorithm. The complete records will be uploaded to the cloud system for users to view and review at any time. Users can witness their own growth through the embroidery process records and feedback, and draw lessons from experience to summarize.

[0213] S7. Users can adjust the angle and height of the workbench

[0214] In order to meet the needs of different users, the invention designs a workbench with adjustable height and angle. The legs of the workbench are composed of two lifting buckles. The height can be adjusted by touching the fixing button of the buckle and lifting or pressing the side frame of the workbench. The lifting height is 650-900mm, and the lifting range is about 250mm, which is suitable for people of different heights. There is a rotating knob on each side of the joint between the table top and the table legs. The table top can be rotated by turning the handle of the rotating knob upright. The rotation angle is between 0° and 90°. The rotating knob can be fixed by rotating the handle downward. Users can adjust the workbench according to their own comfortable posture. If the angle of the projected image of the projector is tilted or the camera is not aimed at the subject, the user can also adjust it by himself. This function enables users to easily complete embroidery work, reduce the pressure on the cervical and lumbar vertebrae, and improve work comfort and efficiency.

[0215] The present invention provides an interactive system design system for the digital process production process of Chaozhou padding embroidery, comprising a workbench 1, a first support column 11 is arranged on one side of the workbench 1, a second support column 12 is arranged on the opposite side of the first support column 11 and on the workbench 1, a first moving rod 13 and a second moving rod 14 are respectively arranged at both ends of the first support column 11, and the first moving rod 13 and the second moving rod 14 are vertically connected to the first support column 11.

[0216] A first support arm assembly 2 and a second support arm assembly 3 are symmetrically arranged on both sides of the workbench 1. A third support column 21 is arranged on the first support arm assembly 2. A fourth support column 22 and a fifth support column 23 are connected to the third support column 21 at one end. A sixth support column 24 is arranged at one end of the fourth support column 22. A seventh support column 25 is arranged at one end of the fifth support column 23. One end of the sixth support column 24 is connected to one end of the seventh support column 25.

[0217] A height adjustment component 4 is provided below the workbench 1 , and the height adjustment component 4 and the workbench 1 are connected via a rotating component 5 , which is a rotating knob.

[0218] A first camera 6 is provided at the connecting end of the sixth support column 24 and the seventh support column 25, a first projector 7 is provided on the second support arm assembly 3, a second camera 8 is provided on the first moving rod 13, a second projector 9 is provided on the second moving rod 14, the second projector 9 is embedded in the second moving rod 14, and a third camera 10 is provided on the first support column 11.

[0219] This invention aims to assist beginners and enthusiasts of Chaozhou embroidery to learn and create more effectively by combining modern technology with traditional Chaozhou embroidery handicraft technology. The design focus of this project is not to replace traditional handicrafts, but to simplify the learning process while maintaining the traditional essence of Chaozhou embroidery. Its core concept is to use technology to assist the learning and creation of Chaozhou embroidery art, promote its inheritance and development, and attract the younger generation to learn and inherit this intangible cultural heritage, so that it can be reborn in modern society. In addition, on this basis, the invention provides a new dimension for the display of cultural and educational venues such as museums. It is not limited to displaying the handicrafts themselves, but by providing an interactive learning experience, visitors, especially the younger generation, can intuitively understand and appreciate the skills of Chaozhou embroidery. This method of integrating modern technology with traditional handicrafts not only retains the core elements of Chaozhou embroidery art, but also makes it easier for the public to accept and learn.

[0220] Therefore, the present invention adopts the above-mentioned interactive system design method and system for the digital process production of Chaozhou pad embroidery, realizes a novel teaching guidance method of Chaozhou embroidery entity visualization interactive teaching, applies and integrates digital technology, makes Chaozhou embroidery teaching more rigorous and scientific, and broadens the channels for digital development and innovation of intangible cultural heritage.

[0221] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solution of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solution to deviate from the spirit and scope of the technical solution of the present invention.

Claims

1. An interactive system design method for the digital process of Chaozhou embroidery, characterized in that: The following steps are involved: S1. Classify Chaozhou embroidery according to themes and establish a Chaozhou embroidery database with pictures of Chaozhou embroidery works and videos of the embroidery process; In step S1, the following steps are included: S11. Collect pictures of Chaozhou embroidery works and videos of the embroidery process according to the results of Chaozhou embroidery classification; S12. The captured Chaozhou embroidery production process video needs to automatically identify the frames of the key links of the embroidery through the key frame detection algorithm, so that in the embroidery process video, every time the operator completes a step, a picture can be automatically captured as a step diagram and input into the system for training the model library, including: First, the frame difference method is used to compare the pixel differences between consecutive video frames to identify the moments when the picture changes significantly; For complex scene changes, the system uses a machine learning-based algorithm to further analyze content changes between frames, identify key steps in the embroidery process, and obtain key frame images; After automatic screenshots, annotate the image stream of automatically captured key frames and record the key action descriptions of each step; S13, input the main view, top view, and left view of three Chaozhou embroidery works of different themes, set the height of each Chaozhou embroidery work into four levels: the highest level, the second highest level, the third highest level, and the plane level, measure the height of each level in turn, integrate the data of each level, calculate the average value of each level, and finally formulate a height level color classification table; S14, extracting features from images of key frames and images of Chaozhou embroidery works of different themes to obtain a Chaozhou embroidery database; S2, based on the Chaozhou embroidery model library established in step S1 and the improved image-generated model, the picture input by the user is decomposed to obtain the Chaozhou embroidery style transfer effect picture and the three-dimensional image, and the Chaozhou embroidery database is combined with the adversarial generative network to generate the Chaozhou embroidery production step diagram; In step S2, the following steps are included: S21, automatically dividing each part of the image into layers according to the previously generated stereo image and converting it into a pattern line drawing through Canny edge detection; S22, train the cyclic adversarial neural network through the Chao embroidery database. After the user uploads the image, read the image and split it into continuous embroidery actions according to the Chao embroidery database preset in the previous text. Each action generates a dynamic image. The cyclic adversarial neural network and style transfer technology are used to automatically generate a corresponding frame-by-frame image sequence for each step, and play it according to the image sequence to form an intuitive animation, which specifically includes: (1) Create a generator , the generator is a multi-layer neural network decoder with input , generated as , and the input and output dimensions are the same; (2) Establishing the discriminator , the discriminator is also a multi-layer neural network decoder, with the input being the instance or , the output is a Prediction probability value; (3) Create a generator , the generator is a multi-layer neural network decoder with input , generated as , and the input and output dimensions are the same; (4) Establishing the discriminator , the discriminator is also a multi-layer neural network decoder, with the input being the instance or , the output is a Prediction probability value; (5) Obtain and Two Chaozhou embroidery process datasets are used to establish Dataloader, set the number of iterations and batch size; (6) Selection The optimization method performs gradient descent optimization; (7) Dataset Input to the generator With the discriminator In, generate , and the dataset , calculate the loss and , and back propagate to update the gradient; (8) Dataset Input to the generator With the discriminator In, generate , and the dataset , calculate the loss and , and back propagate to update the gradient; (9) When all rounds of iteration are completed, the generator is obtained. and The model parameters that work best; (10) Use the trained recurrent adversarial generative network to input the pictures uploaded by the user and generate a sequence of embroidery sample pictures for each step in the embroidery process; S3, the user draws a sketch according to the Chaozhou embroidery production step diagram in step S2, and a color block is placed in the designated padding area on the sketch to remind the user that cotton wool needs to be added here to achieve the padding effect, and different colors represent different amounts of cotton wool; S4, detecting the height of cotton wool filled by the user; S5, extracting the embroidery path and performing detection; In step S5, the following steps are included: S51, embroidery path extraction, the specific steps include: S511, obtaining a user input image: first, obtaining an embroidery image provided by a user as input; S512, grayscale conversion: converting the user input image into a grayscale image; S513, Gaussian filtering: applying a Gaussian filter to the grayscale image for smoothing; S514, applying Canny edge detection: applying the Canny edge detection algorithm to the Gaussian filtered image, specifically including: calculating the gradient amplitude and direction of the Gaussian filtered image, applying non-maximum suppression to the gradient amplitude image, using double threshold processing, dividing pixels into three categories of strong edge, weak edge and non-edge according to the gradient amplitude, performing edge connection, and forming a complete edge path by connecting strong edge pixels with their surrounding weak edge pixels; S515, post-processing: post-processing the extracted edge path according to actual needs, removing irrelevant edges and filling broken edges; S516, extracting the embroidery path: extracting the user's embroidery path according to the edge path; S52, extract and match image features through SIFT, and compare with the corresponding step decomposition diagram provided to the user by the system before. The specific steps include: S521, loading image: first, loading the embroidery path image and the corresponding step decomposition diagram for the user; S522, detecting key points: using SIFT algorithm to detect key points in the embroidery path image and the corresponding step decomposition diagram given to the user; S523, calculating descriptors: for each detected key point, calculating a descriptor; S524, feature matching: for the embroidery path image and the corresponding step decomposition diagram provided to the user, matching the feature descriptor of the embroidery path image with the feature descriptor of the step decomposition image provided by the system; S525, screening matching points: for the result of feature matching, using a screening method to exclude incorrect matching points; The system determines the overlap between the embroidered image and the decomposition diagram of the corresponding steps. If the overlap does not exceed 70%, a prompt sound feedback is given to the user, and the user can make modifications and corrections through the prompt sound issued by the system. If the overlap exceeds 70%, the operation is judged to be correct and the user proceeds to the next step to continue the operation. S6. By recording the embroidery process from the initial embroidery to the final product and the feedback records of the user that need to be modified during the embroidery process, upload them to the cloud system for the user to review.

2. The interactive system design method for the digital process of Chaozhou embroidery according to claim 1 is characterized in that: In step S4, the following steps are included: S41, the user raises the height by projecting the shield detection The built-in projector is embedded in the central part of the moving rod at the lower edge of the workbench, and the 3D image generated by the system is projected to the upper edge of the workbench to simulate the three-dimensional cross-sectional view of the effect after the padding. The user adjusts the actual padding height of the work in combination with the images projected by the upper projector and the built-in projector. When the cotton wool actually padded by the user completely blocks the image projected by the built-in projector after the user's operation, it means that the user's padding embroidery has reached the ideal padding height; if it does not completely block the image projected by the built-in projector, the user needs to continue to add cotton wool until it is completely blocked; S42, System screenshot recognition height When the stereoscopic cross-section image is first projected, the system automatically captures the image from the left camera. After the user completes the padding, he / she makes an "OK" gesture within the visible range of the camera. The system recognizes the user's gesture through a lightweight dynamic gesture recognition network model based on spatiotemporal feature extraction. According to the screenshot, it is detected that in the picture taken by the left camera, the projection image originally projected on the upper edge of the moving rod has been covered by the shadow of the user's embroidery and turned into a dark color. If the overlap rate of the two pictures is less than 10%, it is determined that the user's raising height is effective, and a prompt sound is issued to remind the user to proceed to the next step; The lightweight dynamic gesture recognition network model for spatiotemporal feature extraction includes a cascaded three-dimensional residual network and a temporal convolutional network. The lightweight dynamic gesture recognition network model for spatiotemporal feature extraction unifies the original data in time and space dimensions, and uses the Res C3D module constructed by a three-dimensional convolutional neural network and residual ideas to extract the short-term spatiotemporal features of dynamic gestures, and then uses TCN to encode the short-term spatiotemporal features. The lightweight dynamic gesture recognition network model for spatiotemporal feature extraction inputs the spatiotemporal features into a multi-layer perceptron network for gesture recognition. After successful recognition, the system will issue a screenshot command to the camera. The two screenshots are uploaded to the system, and the image features of the projection image on the upper moving rod are extracted and matched again through the SIFT technology.

3. A design system for the interactive system design method of the Chaozhou embroidery digital process according to claim 1, characterized in that: It comprises a workbench, wherein a first supporting arm assembly and a second supporting arm assembly are symmetrically arranged on both sides of the workbench, a height adjusting assembly is arranged below the workbench, and the height adjusting assembly and the workbench are connected via a rotating assembly.

4. The interactive system design system for the digital process of Chaozhou embroidery according to claim 3 is characterized in that: A first support column is arranged on one side of the workbench, a second support column is arranged on the workbench on the opposite side of the first support column, a first moving rod and a second moving rod are arranged at both ends of the first support column respectively, and the first moving rod and the second moving rod are vertically connected to the first support column.

5. The interactive system design system for the digital process of Chaozhou embroidery according to claim 4 is characterized in that: A third support column is arranged on the first support arm assembly, a fourth support column and a fifth support column are arranged at one end of the third support column and connected thereto, a sixth support column is arranged at one end of the fourth support column, a seventh support column is arranged at one end of the fifth support column, and one end of the sixth support column is connected to one end of the seventh support column.

6. The interactive system design system for the digital process of Chaozhou embroidery according to claim 5 is characterized in that: A first camera is arranged at the connecting end of the sixth support column and the seventh support column, a first projector is arranged on the second support arm assembly, a second camera is arranged on the first moving rod, a second projector is arranged on the second moving rod, and a third camera is arranged on the first support column.