Method and system for digitally repairing and reproducing non-abandoned textiles
By converting the non-missing images of textiles into graphic color coordinates and combining the conditions to generate virtual repeating unit patterns, the problems of difficulty in identifying materials and high repair costs in the digital repair process of non-legacy textiles are solved, and a fast and accurate repair effect is achieved.
Patent Information
- Application Number
- CN202411894210.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the digital restoration and reproduction of non-legacy textiles, the problems of difficulty in identifying and classifying materials, complex repair algorithms, high cost, and high computing resources are occupied in the process of digital restoration and reproduction of non-legacy textiles.
By obtaining non-missing images of textiles, converting their feature images into graphic color coordinates, identifying missing area profile images, calculating complementary color coordinates, generating virtual repeating unit patterns through image input conditions, and obtaining repaired and reproduced images through fuzzy matching.
It has achieved rapid and accurate repair of intangible textiles, reduced repair costs, improved computing efficiency, and provided new ideas for brocade restoration.
Smart Images

Figure CN119809987A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a digital restoration and reproduction system for intangible cultural heritage textiles, a digital restoration and reproduction method for intangible cultural heritage textiles, a computer device and a storage medium. Background Art
[0002] The digital restoration and reproduction of intangible cultural heritage textiles is a complex and challenging process. Due to the diversity and complexity of textile cultural relics, it is difficult to accurately identify and classify their materials. Although digital technology is constantly developing, the digital restoration and reproduction technology for intangible cultural heritage textiles still needs further research and improvement; moreover, the existing restoration algorithms are relatively complex, the restoration cost is relatively high, and it takes up more computing resources. Summary of the invention
[0003] In view of the above problems, embodiments of the present invention are proposed to provide a method for digitally repairing and reproducing intangible cultural heritage textiles, a system for digitally repairing and reproducing intangible cultural heritage textiles, a computer device and a storage medium that overcome the above problems or at least partially solve the above problems.
[0004] In order to solve the above problems, the embodiment of the present invention discloses a method for digitally repairing and reproducing intangible cultural heritage textiles, comprising: Obtaining a non-missing image of the textile; Converting the characteristic image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; identifying a contour image of a missing area of the textile; Calculate the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; Inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; Superimposing the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; The repaired and reproduced textile image is obtained by fuzzy matching the missing image with the non-missing image.
[0005] Preferably, converting the feature image of the non-missing image into different graphic color coordinates comprises: Identify the RGB color value of the non-missing image; Classifying the colors of the non-missing image into multiple color types according to the RGB color values; Associating the color type with the coordinate type to obtain a variety of graphic color coordinates; Extracting a repeating unit pattern of the non-missing image, and identifying a specific color type of the repeating unit pattern; The specific color type is matched with the color type in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern.
[0006] Preferably, the identifying the missing area contour image of the textile comprises: Convert the non-missing image to a grayscale image; identifying a first edge image of the grayscale image; converting the first edge image into a binary image; identifying a first contour of the binary image; Extracting a repeating unit pattern of the non-missing image, identifying a missing edge of the repeating unit pattern; identifying a contour segment of the missing edge, and combining the contour segments into a second contour; Determining whether the positions of the first contour and the second contour are the same; If the positions of the first contour and the second contour are the same, the first contour is determined as the missing area contour image.
[0007] Preferably, the calculating of the complementary color coordinates corresponding to the missing area contour image by using the graphic color coordinates includes: Acquire an adjacent image of the missing area contour image; converting the adjacent images into adjacent color coordinates; A complementary color coordinate is generated according to the adjacent color coordinate and the graphic color coordinate.
[0008] Preferably, generating the complementary color coordinates according to the adjacent color coordinates and the graphic color coordinates includes: Obtaining coordinate information corresponding to the repeating unit pattern in the graphic color coordinates; The coordinate information corresponding to the repeating unit pattern is filled into the adjacent color coordinates, and the repeated coordinate information is deleted to obtain the completed color coordinates.
[0009] Preferably, the step of inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern comprises: Inputting the graphic color coordinates and the repeating unit pattern of the non-missing image into the conditional generative adversarial network, performing an iterative process of the generator and the discriminator, iteratively optimizing the generator and the discriminator through a textile characteristic loss function, and obtaining a trained conditional generative adversarial network; The new textile sample data is input into the trained conditional generative adversarial network to obtain the output virtual repeating unit pattern.
[0010] The embodiment of the present invention discloses a digital restoration and reproduction system for intangible cultural heritage textiles, comprising: An acquisition module, used for acquiring a non-missing image of the textile; A conversion module, used to convert the feature image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; A recognition module, used to recognize the contour image of the missing area of the textile; A calculation module, used for calculating the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; A generation module, used for inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; A superposition module, used for superimposing the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; The fuzzy matching module is used to perform fuzzy matching between the missing image and the non-missing image to obtain a repaired and reproduced textile image.
[0011] Preferably, the conversion module comprises: A color value recognition submodule, used to recognize the RGB color value of the non-missing image; A division submodule, used for dividing the color of the non-missing image into multiple color types according to the RGB color value; An association submodule, used to associate the color type with the coordinate type to obtain a variety of graphic color coordinates; A color type recognition submodule, used to extract the repeating unit pattern of the non-missing image and recognize the specific color type of the repeating unit pattern; The matching submodule is used to match the specific color type with the color type in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern.
[0012] An embodiment of the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned steps of digitally repairing and reproducing an intangible cultural heritage textile when executing the computer program.
[0013] An embodiment of the present invention further discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of digitally repairing and reproducing the above-mentioned intangible cultural heritage textile are implemented.
[0014] The embodiments of the present invention include the following advantages: The digital restoration and reproduction method of intangible cultural heritage textiles in the embodiment of the present invention comprises: acquiring a non-missing image of the textile; converting a characteristic image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; identifying a missing area contour image of the textile; calculating the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; superimposing the complementary color coordinates with the virtual repeating unit pattern to obtain a missing image; performing fuzzy matching between the missing image and the non-missing image to obtain a restored and reproduced textile image; obtaining a more accurate image of the part to be restored, achieving a technical effect of rapid restoration, and providing a new idea for brocade restoration. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Figure 1 is a schematic diagram of a pattern of a textile according to an embodiment of the present invention; Figure 2 It is a flowchart of the steps of an embodiment of a method for digitally repairing and reproducing intangible cultural heritage textiles according to an embodiment of the present invention; Figure 3 is a schematic diagram of a repeating unit pattern of a textile according to an embodiment of the present invention; Figure 4 is a schematic diagram of the conversion of a graphic color coordinate according to an embodiment of the present invention; Figure 5 It is a structural block diagram of a digital restoration and reproduction system for intangible cultural heritage textiles according to an embodiment of the present invention; Figure 6 The diagram is a diagram of the internal structure of a computer device according to an embodiment. DETAILED DESCRIPTION
[0016] In order to make the technical problems, technical solutions and beneficial effects solved by the embodiments of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0017] In a core concept of an embodiment of the present invention, Figure 1As shown in the figure, by utilizing the characteristics of intangible cultural heritage textiles with repeating patterns and fixed colors of repeating patterns, the intact part of the textile to be repaired is converted into coordinate data representing different color types, and the textile image of the intact part is represented as a coordinate data graph. Because textiles are composed of warp and weft, the textile pattern is expressed by color and associated ordinates and abscissas, and there is no need to convert all of them into image pixel data, which can improve calculation accuracy and save computing resources. Then, the part to be repaired in the textile image is identified, and the coordinate data of the part to be repaired in the textile image is inferred by completing the coordinate data of the intact part. Then, by generating a virtual repeating pattern output by a generative adversarial network, the virtual repeating pattern is combined with the coordinate data of the part to be repaired to obtain a more accurate image of the part to be repaired, thereby achieving the technical effect of rapid repair and providing new ideas for brocade repair.
[0018] A digital restoration and reproduction method for intangible cultural heritage textiles provided by an embodiment of the present invention can be applied to an application environment including a terminal and a server, and can also be applied to an application environment of a terminal. The terminal communicates with the server via a network. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The operating system of the terminal may include Android, Harmony OS, IOS, Windows Phone, Windows, etc. The server can be implemented as an independent server or a server cluster consisting of multiple servers.
[0019] Reference Figure 2 , shows a flowchart of a method for digitally repairing and reproducing intangible cultural heritage textiles according to an embodiment of the present invention, which may specifically include the following steps: Step 101, obtaining a non-missing image of the textile; In the embodiment of the present invention, the textile may include Tujia brocade, Zhuang brocade, Shu brocade, Song brocade, Zhuang brocade and other textiles, and the embodiment of the present invention does not impose too many restrictions on this; and the non-missing image refers to the undamaged part of the textile that has been preserved for a long time, such as Figure 3 As shown; the black part is the image to be repaired, that is, the missing area, and the other parts are non-missing images; it is worth noting that Figure 3 The pattern that appears repeatedly in the same direction in the textile image is called a repeating unit pattern.
[0020] Step 102, converting the characteristic image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; In the embodiment of the present invention, the characteristic image may include a repeated unit pattern and an incomplete unit pattern adjacent to the missing region; that is, in the embodiment of the present invention, the characteristic image of the non-missing image needs to be further converted into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; For example, the graphic color coordinates can be ;in, It means that the color of the image is blue, and the numbers 4 and 6 represent the ordinate and abscissa of the pattern of the color coordinates of the graphic respectively; because textiles are composed of warp and weft, the textile pattern is expressed by color and the associated ordinate and abscissa, which does not need to be converted into image pixel data, which can improve calculation accuracy and save computing resources.
[0021] In a specific example of an embodiment of the present invention, converting the characteristic image of the non-missing image into different graphic color coordinates includes: identifying the RGB color value of the non-missing image; dividing the color of the non-missing image into multiple color types according to the RGB color value; associating the color type with the coordinate type to obtain a plurality of graphic color coordinates; extracting the repeating unit pattern of the non-missing image and identifying the specific color type of the repeating unit pattern; matching the specific color type with the color type in the color coordinate to obtain the graphic color coordinates of the repeating unit pattern.
[0022] In an embodiment of the present invention, the color type of the non-missing image is first determined, such as blue, green, yellow, white, black, etc. Specifically, the RGB color value of the non-missing image is identified and the corresponding color type is obtained through the numerical range of the RGB color value. For example, the numerical range of the RGB color value is (255, 255, 255) to (245, 245, 245), which can be defined as white. The above-mentioned numerical range definition of the RGB color value is only an example of an embodiment of the present invention. The numerical range of the RGB color value can also be adjusted in other ways. The embodiment of the present invention does not impose too many restrictions on the adjustment method of the numerical range of the RGB color value of the color type.
[0023] Furthermore, the coordinate positions of the warp and weft of the repeating unit pattern in the entire textile image can also be obtained, that is, the coordinate type is the coordinate positions of the warp and weft of the repeating unit pattern in the entire textile image. Specifically, the positions of the warp and weft of the repeating unit pattern can be respectively identified by image recognition and converted into coordinate positions, and then the coordinate positions are associated with color types to obtain multiple graphic color coordinates; On the other hand, the non-missing image can be divided into a plurality of complete repeating unit patterns by means of contour recognition, and then a plurality of specific color types of the repeating unit pattern can be identified; the plurality of specific color types can be matched with the color types in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern; like Figure 4 As shown, in Figure 4 In this paper, the pattern style "Chair Flower" of Tujia brocade Xilankapu is used as an example to illustrate that a certain repeating unit pattern in the pattern style "Chair Flower" is as follows Figure 4 The two overlapping large rhombuses shown above (the large rhombuses include three green small rhombuses in a vertical row in the center and two red small rhombuses in a vertical row on the left and right sides) include two colors: green and pink. Let green be represented by A and pink be represented by B. Then the color coordinates of the graphic can be represented by (BX1, BY1), (AX2, A Y2); Specifically, X1 and X2 may represent the coordinate positions of the warp lines of the repeating unit pattern, and Y1 and Y2 may represent the coordinate positions of the weft lines of the repeating unit pattern, which can be obtained by Figure 4 The manner shown represents the graphic color coordinates of the repeating unit pattern, that is, the graphic color coordinates of three green small diamonds in a central vertical row and two red small diamonds in a vertical row on the left and right sides.
[0024] It should be noted that the above-mentioned graphic color coordinate representation of the repeating unit pattern is only an example of an embodiment of the present invention. The above-mentioned repeating unit pattern can also be represented by other methods, and the embodiment of the present invention does not impose too many restrictions on this.
[0025] Step 103, identifying a contour image of a missing area of the textile; In actual application to the embodiment of the present invention, the contour image of the missing area of the textile can be further identified, and the contour image of the missing area is the contour image of the part of the image to be repaired, such as Figure 3 The outer contour of the missing area is shown.
[0026] Specifically, the method of identifying the missing area contour image of the textile includes: converting a non-missing image into a grayscale image; identifying a first edge image of the grayscale image; converting the first edge image into a binary image; identifying a first contour of the binary image; extracting a repeating unit pattern of the non-missing image, and identifying missing edges of the repeating unit pattern; identifying contour segments of the missing edges, and combining the contour segments into a second contour; determining whether the positions of the first contour and the second contour are the same; if the positions of the first contour and the second contour are the same, determining the first contour as the missing area contour image.
[0027] In an embodiment of the present invention, firstly, the first contour of the non-missing image can be identified, and the first contour refers to the irregular edge contour in the non-missing image; on the other hand, the repeating unit pattern of the non-missing image can be divided, and then the contour segments of the irregular missing edges of the repeating unit pattern can be identified, and the contour segments are combined into a second contour; the second contour is compared with the irregular edge contour in the non-missing image, and when the coordinate positions of the two are the same, the contour image of the missing area can be obtained. In an embodiment of the present invention, the accuracy of contour recognition is improved by verifying and comparing the two contour data.
[0028] Step 104, calculating the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; In actual application to the embodiment of the present invention, after obtaining the graphic color coordinates and the missing area contour image, the complement color coordinates are calculated based on the two.
[0029] In the embodiment of the present invention, the step of calculating the complementary color coordinates corresponding to the missing region contour image by using the graphic color coordinates includes: acquiring an adjacent image of the missing region contour image; The adjacent images are converted into adjacent color coordinates; and complementary color coordinates are generated according to the adjacent color coordinates and the graphic color coordinates.
[0030] The adjacent color coordinates are the image color coordinates of the image adjacent to the missing area contour image, and the complementary color coordinates can be inferred and generated according to the adjacent color coordinates and the graphic color coordinates; by Figure 4 For example, when certain adjacent color coordinates are (A79, A85) to (A83, A85), according to the graphic color coordinates, the complementary color coordinates between the adjacent color coordinates are (A80 to A82, A85), or, when certain adjacent color coordinates are (B78, B 89) to (B84, B 89), according to the graphic color coordinates, the complementary color coordinates between the adjacent color coordinates are (B79, B 89), (A80 to A82, A89), (B83, B 89). In an embodiment of the present invention, the complementary color coordinates are obtained by matching the adjacent color coordinates with the graphic color coordinates.
[0031] In a preferred embodiment of the embodiments of the present invention, the generation of the completed color coordinates based on the adjacent color coordinates and the graphic color coordinates includes: obtaining the coordinate information corresponding to the repeated unit pattern in the graphic color coordinates; filling the coordinate information corresponding to the repeated unit pattern into the adjacent color coordinates, and deleting the repeated coordinate information to obtain the completed color coordinates.
[0032] In another case, the coordinate information in the graphic color coordinates of the repeating unit pattern can be matched and filled into the adjacent color coordinates, and the coordinate information is adaptively matched and adjusted with the adjacent color coordinates to obtain the completed color coordinates; the vertical and horizontal coordinates of the adjacent color coordinates are as follows: Figure 4 As shown in the gradually increasing or decreasing example, the corresponding ordinate data and abscissa data are matched with the ordinate and abscissa data of the adjacent color coordinates to obtain the completed color coordinates.
[0033] Step 105, inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; In an embodiment of the present invention, the conditional generative adversarial network can be used to generate data that approximates real data. The conditional generative adversarial network may include a generator and a discriminator. The conditional generative adversarial network controls the generation of a simulated virtual repeating unit pattern by embedding conditional information into the network of the generator and the discriminator, and converts discrete category label conditions into a continuous vector form; wherein the function of the generator is to generate false data that is as close to the real data as possible; the function of the discriminator is to distinguish whether the input data is from a real data set or false data generated by the generator, thereby obtaining the final output of the simulated virtual repeating unit pattern, that is, the virtual repeating unit pattern refers to a simulated repeating unit pattern containing image graphic information.
[0034] Specifically applied to the embodiment of the present invention, the step of inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern includes: Inputting the graphic color coordinates and the repeating unit pattern of the non-missing image into the conditional generative adversarial network, performing an iterative process of the generator and the discriminator, iteratively optimizing the generator and the discriminator through a textile characteristic loss function, and obtaining a trained conditional generative adversarial network; The new textile sample data is input into the trained conditional generative adversarial network to obtain the output virtual repeating unit pattern.
[0035] The main function of the virtual repeating unit pattern is to match color types. If the completed color coordinates are regarded as a pattern frame, the virtual repeating unit pattern mainly provides a color reference. The color corresponding to the completed color coordinates can be further adjusted according to the color type of the virtual repeating unit pattern to improve the restoration effect of the textile image.
[0036] In an embodiment of the present invention, the additional information in the textile characteristic loss function of the conditional generative adversarial network is that the number of cycles is less than the number of identified warps, which helps the function converge.
[0037] It should be noted that the application of the conditional generative adversarial network is only an example of an embodiment of the present invention. The corresponding virtual repeating unit pattern can also be output through other neural network training with prediction functions, and the embodiment of the present invention does not impose too many restrictions on this. In addition, the composition of the generator and discriminator of the conditional generative adversarial network may include multiple convolutional layers, normalization and activation function layers and other structures, and the embodiment of the present invention does not impose too many restrictions on this.
[0038] Step 106, superimposing the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; Further applied to the embodiment of the present invention, after obtaining the complement color coordinates and the virtual repeating unit pattern, the virtual repeating unit pattern can be matched to the complement color coordinates according to the color types and coordinate information of the two to obtain the missing image.
[0039] In actual application in the embodiments of the present invention, multiple color types of the virtual repeating unit pattern are identified, and the color type is compared with the image color in the complementary color coordinates. If the two are the same, the complementary color coordinates are superimposed on the virtual repeating unit pattern to obtain the missing image; for example, if the complementary color coordinates are color A from (A79, A85) to (A83, A85), the color A is compared with the color type of the virtual repeating unit pattern. If the multiple color types of the virtual repeating unit pattern all match the image color of the complementary color coordinates, it means that the two are matched, and the complementary color coordinates are superimposed on the virtual repeating unit pattern to obtain the missing image.
[0040] Step 107: Obtain a restored and reproduced textile image by performing fuzzy matching between the missing image and the non-missing image.
[0041] In an embodiment of the present invention, the image key points and descriptors of the missing image and the non-missing image can be first extracted, and fuzzy logic operations can be performed based on the descriptors of the missing image and the non-missing image to determine the similarity between the two, and obtain the coordinate information of the matching between the two. The missing image is synthesized into the non-missing image to obtain a repaired and reproduced textile image. Fuzzy matching can be performed in a variety of ways, and the embodiment of the present invention does not impose too many restrictions on this.
[0042] The digital restoration and reproduction method of intangible cultural heritage textiles in the embodiment of the present invention comprises: acquiring a non-missing image of the textile; converting a characteristic image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; identifying a missing area contour image of the textile; calculating the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; superimposing the complementary color coordinates with the virtual repeating unit pattern to obtain a missing image; performing fuzzy matching between the missing image and the non-missing image to obtain a restored and reproduced textile image; obtaining a more accurate image of the part to be restored, achieving a technical effect of rapid restoration, and providing a new idea for brocade restoration.
[0043] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0044] Reference Figure 5 , shows a structural block diagram of an embodiment of a digital restoration and reproduction system for intangible cultural heritage textiles according to an embodiment of the present invention, which may specifically include the following modules: An acquisition module 301 is used to acquire a non-missing image of the textile; The conversion module 302 is used to convert the feature image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; The recognition module 303 is used to recognize the contour image of the missing area of the textile; A calculation module 304, configured to calculate the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; A generating module 305 is used to input the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; A superposition module 306 is used to superimpose the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; The fuzzy matching module 307 is used to perform fuzzy matching between the missing image and the non-missing image to obtain a restored and reproduced textile image.
[0045] Preferably, the conversion module comprises: A color value recognition submodule, used to recognize the RGB color value of the non-missing image; A division submodule, used for dividing the color of the non-missing image into multiple color types according to the RGB color value; An association submodule, used to associate the color type with the coordinate type to obtain a variety of graphic color coordinates; A color type recognition submodule, used to extract the repeating unit pattern of the non-missing image and recognize the specific color type of the repeating unit pattern; The matching submodule is used to match the specific color type with the color type in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern.
[0046] Preferably, the identification module comprises: A first conversion submodule, used for converting a non-missing image into a grayscale image; A first recognition submodule, used for recognizing a first edge image of the grayscale image; A second conversion submodule, used for converting the first edge image into a binary image; A second recognition submodule, used to recognize a first contour of the binary image; a third recognition submodule, configured to extract the repeating unit pattern of the non-missing image, identify the missing edge of the repeating unit pattern, identify the contour segment of the missing edge, and combine the contour segments into a second contour; A determination submodule, used to determine whether the positions of the first contour and the second contour are the same; The determination submodule is used to determine the first contour as a missing area contour image if the positions of the first contour and the second contour are the same.
[0047] Preferably, the calculation module includes: An acquisition submodule, used to acquire adjacent images of the missing area contour image; An adjacent color coordinate conversion submodule, used for converting the adjacent images into adjacent color coordinates; The generating submodule is used to generate the complementary color coordinates according to the adjacent color coordinates and the graphic color coordinates.
[0048] Preferably, the generating submodule comprises: A coordinate information acquisition unit, used to acquire coordinate information corresponding to a repeating unit pattern in the graphic color coordinates; A filling unit is used to fill the coordinate information corresponding to the repeated unit pattern into the adjacent color coordinates, and delete the repeated coordinate information to obtain the completed color coordinates.
[0049] Preferably, the generating module comprises: A conditional generative adversarial network submodule, used for inputting the graphic color coordinates and the repeating unit pattern of the non-missing image into the conditional generative adversarial network, performing an iterative process of the generator and the discriminator, iteratively optimizing the generator and the discriminator through a textile characteristic loss function, and obtaining a trained conditional generative adversarial network; The output submodule is used to input new textile sample data into the trained conditional generative adversarial network to obtain an output virtual repeating unit pattern.
[0050] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0051] For the specific definition of a digital repair and reproduction system for intangible cultural heritage textiles, please refer to the definition of a digital repair and reproduction method for intangible cultural heritage textiles mentioned above, which will not be repeated here. Each module in the above-mentioned digital repair and reproduction system for intangible cultural heritage textiles can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0052] The digital restoration and reproduction system for intangible cultural heritage textiles provided above can be used to execute the digital restoration and reproduction method for intangible cultural heritage textiles provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0053] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for simulating daylighting is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0054] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0055] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented: Obtaining a non-missing image of the textile; Converting the characteristic image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; identifying a contour image of a missing area of the textile; Calculate the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; Inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; Superimposing the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; The repaired and reproduced textile image is obtained by fuzzy matching the missing image with the non-missing image.
[0056] Preferably, converting the feature image of the non-missing image into different graphic color coordinates comprises: Identify the RGB color value of the non-missing image; Classifying the colors of the non-missing image into multiple color types according to the RGB color values; Associating the color type with the coordinate type to obtain a variety of graphic color coordinates; Extracting a repeating unit pattern of the non-missing image, and identifying a specific color type of the repeating unit pattern; The specific color type is matched with the color type in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern.
[0057] Preferably, the identifying the missing area contour image of the textile comprises: Convert the non-missing image to a grayscale image; identifying a first edge image of the grayscale image; converting the first edge image into a binary image; identifying a first contour of the binary image; Extracting a repeating unit pattern of the non-missing image, identifying a missing edge of the repeating unit pattern; identifying a contour segment of the missing edge, and combining the contour segments into a second contour; Determining whether the positions of the first contour and the second contour are the same; If the positions of the first contour and the second contour are the same, the first contour is determined as the missing area contour image.
[0058] Preferably, the calculating of the complementary color coordinates corresponding to the missing area contour image by using the graphic color coordinates includes: Acquire an adjacent image of the missing area contour image; converting the adjacent images into adjacent color coordinates; A complementary color coordinate is generated according to the adjacent color coordinate and the graphic color coordinate.
[0059] Preferably, generating the complementary color coordinates according to the adjacent color coordinates and the graphic color coordinates includes: Obtaining coordinate information corresponding to the repeating unit pattern in the graphic color coordinates; The coordinate information corresponding to the repeating unit pattern is filled into the adjacent color coordinates, and the repeated coordinate information is deleted to obtain the completed color coordinates.
[0060] Preferably, the step of inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern comprises: Inputting the graphic color coordinates and the repeating unit pattern of the non-missing image into the conditional generative adversarial network, performing an iterative process of the generator and the discriminator, iteratively optimizing the generator and the discriminator through a textile characteristic loss function, and obtaining a trained conditional generative adversarial network; The new textile sample data is input into the trained conditional generative adversarial network to obtain the output virtual repeating unit pattern.
[0061] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Obtaining a non-missing image of the textile; Converting the characteristic image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; identifying a contour image of a missing area of the textile; Calculate the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; Inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; Superimposing the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; The repaired and reproduced textile image is obtained by fuzzy matching the missing image with the non-missing image.
[0062] Preferably, converting the feature image of the non-missing image into different graphic color coordinates comprises: Identify the RGB color value of the non-missing image; Classifying the colors of the non-missing image into multiple color types according to the RGB color values; Associating the color type with the coordinate type to obtain a variety of graphic color coordinates; Extracting a repeating unit pattern of the non-missing image, and identifying a specific color type of the repeating unit pattern; The specific color type is matched with the color type in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern.
[0063] Preferably, the identifying the missing area contour image of the textile comprises: Convert the non-missing image to a grayscale image; identifying a first edge image of the grayscale image; converting the first edge image into a binary image; identifying a first contour of the binary image; Extracting a repeating unit pattern of the non-missing image, identifying a missing edge of the repeating unit pattern; identifying a contour segment of the missing edge, and combining the contour segments into a second contour; Determining whether the positions of the first contour and the second contour are the same; If the positions of the first contour and the second contour are the same, the first contour is determined as the missing area contour image.
[0064] Preferably, the calculating of the complementary color coordinates corresponding to the missing area contour image by using the graphic color coordinates includes: Acquire an adjacent image of the missing area contour image; converting the adjacent images into adjacent color coordinates; A complementary color coordinate is generated according to the adjacent color coordinate and the graphic color coordinate.
[0065] Preferably, generating the complementary color coordinates according to the adjacent color coordinates and the graphic color coordinates includes: Obtaining coordinate information corresponding to the repeating unit pattern in the graphic color coordinates; The coordinate information corresponding to the repeating unit pattern is filled into the adjacent color coordinates, and the repeated coordinate information is deleted to obtain the completed color coordinates.
[0066] Preferably, the step of inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern comprises: Inputting the graphic color coordinates and the repeating unit pattern of the non-missing image into the conditional generative adversarial network, performing an iterative process of the generator and the discriminator, iteratively optimizing the generator and the discriminator through a textile characteristic loss function, and obtaining a trained conditional generative adversarial network; The new textile sample data is input into the trained conditional generative adversarial network to obtain the output virtual repeating unit pattern.
[0067] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0068] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0069] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0070] The embodiments of the present invention are described with reference to flowcharts and / or block diagrams of apparatuses, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0071] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction method, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0073] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0074] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, device, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a..." do not exclude the existence of other identical elements in the process, device, article or terminal device including the elements.
[0075] The above describes in detail a method for digital restoration and reproduction of intangible cultural heritage textiles, a system for digital restoration and reproduction of intangible cultural heritage textiles, a computer device and a storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for digital restoration and reproduction of intangible cultural heritage textiles, characterized in that: include: Obtaining a non-missing image of the textile; Converting the characteristic image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; identifying a contour image of a missing area of the textile; Calculate the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; Inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; Superimposing the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; The repaired and reproduced textile image is obtained by fuzzy matching the missing image with the non-missing image.
2. The method according to claim 1, characterized in that The step of converting the feature image of the non-missing image into different graphic color coordinates includes: Identify the RGB color value of the non-missing image; Classifying the colors of the non-missing image into multiple color types according to the RGB color values; Associating the color type with the coordinate type to obtain a variety of graphic color coordinates; Extracting a repeating unit pattern of the non-missing image, and identifying a specific color type of the repeating unit pattern; The specific color type is matched with the color type in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern.
3. The method according to claim 1, characterized in that The step of identifying the missing area contour image of the textile comprises: Convert the non-missing image to a grayscale image; identifying a first edge image of the grayscale image; converting the first edge image into a binary image; identifying a first contour of the binary image; Extracting a repeating unit pattern of the non-missing image, identifying a missing edge of the repeating unit pattern, identifying a contour segment of the missing edge, and combining the contour segments into a second contour; Determining whether the positions of the first contour and the second contour are the same; If the positions of the first contour and the second contour are the same, the first contour is determined as the missing area contour image.
4. The method according to claim 1, characterized in that The calculating the complement color coordinates corresponding to the missing area contour image by using the graphic color coordinates includes: Acquire an adjacent image of the missing area contour image; converting the adjacent images into adjacent color coordinates; A complementary color coordinate is generated according to the adjacent color coordinate and the graphic color coordinate.
5. The method according to claim 4, characterized in that The generating of the complementary color coordinates according to the adjacent color coordinates and the graphic color coordinates includes: Obtaining coordinate information corresponding to the repeating unit pattern in the graphic color coordinates; The coordinate information corresponding to the repeating unit pattern is filled into the adjacent color coordinates, and the repeated coordinate information is deleted to obtain the completed color coordinates.
6. The method according to claim 3, characterized in that The step of inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern comprises: Inputting the graphic color coordinates and the repeating unit pattern of the non-missing image into the conditional generative adversarial network, performing an iterative process of the generator and the discriminator, iteratively optimizing the generator and the discriminator through a textile characteristic loss function, and obtaining a trained conditional generative adversarial network; The new textile sample data is input into the trained conditional generative adversarial network to obtain the output virtual repeating unit pattern.
7. A digital restoration and reproduction system for intangible cultural heritage textiles, characterized in that: include: An acquisition module, used for acquiring a non-missing image of the textile; A conversion module, used to convert the feature image of the non-missing image into different graphic color coordinates; wherein the graphic color coordinates refer to coordinate data representing a combination of different colors and corresponding position data; A recognition module, used to recognize the contour image of the missing area of the textile; A calculation module, used for calculating the complementary color coordinates corresponding to the missing area contour image through the graphic color coordinates; A generation module, used for inputting the non-missing image into a conditional generative adversarial network to generate a virtual repeating unit pattern; A superposition module, used for superimposing the complement color coordinates with the virtual repeating unit pattern to obtain a missing image; The fuzzy matching module is used to perform fuzzy matching between the missing image and the non-missing image to obtain a repaired and reproduced textile image.
8. The system according to claim 7, characterized in that The conversion module comprises: A color value recognition submodule, used to identify the RGB color value of the non-missing image; A division submodule, used for dividing the color of the non-missing image into multiple color types according to the RGB color value; An association submodule, used to associate the color type with the coordinate type to obtain a variety of graphic color coordinates; A color type recognition submodule, used to extract the repeating unit pattern of the non-missing image and recognize the specific color type of the repeating unit pattern; The matching submodule is used to match the specific color type with the color type in the color coordinates to obtain the graphic color coordinates of the repeating unit pattern.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for digital repair and reproduction of intangible cultural heritage textiles described in any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for digitally repairing and reproducing intangible cultural heritage textiles described in any one of claims 1 to 6 are implemented.