Clothes pattern extraction method and system based on image recognition

By using the method of using image processing and classification algorithms in image recognition technology, the problem of insufficient image extraction of non -heritage decorative pattern image image features is solved, and the pattern image features in the complex background are accurately extracted, and the accuracy of extraction is improved.

CN119380035AInactive Publication Date: 2025-01-28MINJIANG UNIVERSITY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411520751.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the process of extracting regional intangible cultural heritage clothing patterns based on image recognition technology, due to the rich patterns and complex background, the extracted pattern image characteristics are not accurate enough.

Method used

Use a clothing pattern extraction method based on image recognition, including obtaining image data from different parts of non -heritage clothing and labeling to perform grayscale and filtering. Obtain edge location information through edge detection operators Finally, the pixels are accurately classified by classified algorithms to extract the characteristics of pattern image image.

Benefits of technology

The accurate extraction of pattern image features is achieved in complex background, the accuracy of the characteristics of pattern image features is improved, and it is suitable for further promotion and application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119380035A_ABST
    Figure CN119380035A_ABST
Patent Text Reader

Abstract

The invention discloses a clothing pattern extraction method and system based on image recognition. The method comprises the following steps: acquiring non-abandoned clothing image data, and carrying out marking and gray processing on the non-abandoned clothing image data; carrying out filtering and edge enhancement processing on the image, and obtaining edge position information through an edge detection operator; matching and splicing the images to obtain a complete costume grayscale image and an original costume image; performing weighted average on the gray values of the pixel points at the edge position of the gray-scale image, and obtaining the maximum and minimum gray values of the pixel points at the edge position of the gray-scale image; classifying pixel points on the two sides of the edge position in the grey-scale map through a classification algorithm; dividing the edge position and pixel points of the same type as the edge position into an integral image feature, and positioning a position area corresponding to each integral image feature from the grey-scale map; and extracting each overall image feature from the complete original costume image. The method can achieve the accurate extraction of the pattern image features in the complex background of the non-abandoned clothes, and is suitable for further popularization and application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for extracting clothing patterns based on image recognition. Background Art

[0002] Most of the regional intangible cultural heritage costumes integrate the cultural characteristics of various regions in China. They are ancient and elegant, magnificent, gorgeous but simple, sophisticated and have life characteristics. Extracting patterns from artistic elements such as embroidery techniques, decorative patterns, and clothing colors on intangible cultural heritage costumes can provide data support for the establishment of subsequent clothing culture graphic image resource databases. The constructed graphic image database can be used to develop cultural creation, animation, animation, and mascot IP image design, which has a positive role in promoting the promotion and inheritance of regional characteristic culture.

[0003] In the process of extracting patterns of regional characteristic intangible cultural heritage clothing based on image recognition technology, since the patterns in regional characteristic intangible cultural heritage clothing are relatively rich, the background in the image is relatively complex, which can easily lead to the extracted pattern image features being not accurate enough. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a clothing pattern extraction method and system based on image recognition.

[0005] In order to achieve the above technical objectives, the technical solution adopted by the present invention is: a clothing pattern extraction method based on image recognition, comprising:

[0006] S1: Obtain image data of different parts of intangible cultural heritage clothing and mark them, and then perform grayscale processing on the acquired image data;

[0007] S2: After filtering the grayscale image, edge enhancement is performed on the image, and edge position information in the image is obtained through an edge detection operator;

[0008] S3: Match and splice the grayscale images according to the feature information in the image to obtain a complete grayscale image of clothing, and then splice the original image data in step S1 with reference to the matching splicing information of the grayscale images to obtain a complete original clothing image;

[0009] S4: Perform weighted averaging on the grayscale values ​​of the pixels at the edge of the grayscale image to obtain the grayscale threshold T, and obtain the maximum grayscale value T of the pixels at the edge of the grayscale image max With the minimum gray value T min ;

[0010] S5: Using gray value T max With T min, and classify the pixels on both sides of the edge position in the complete clothing grayscale image through a classification algorithm;

[0011] S6: dividing the edge position in the grayscale image and the pixel points of the same type as the edge position into an overall image feature, and locating the position area corresponding to each overall image feature from the grayscale image;

[0012] S7: extracting each overall image feature from the complete original clothing image according to the positioning result of the position area corresponding to each overall image feature in the grayscale image, thereby realizing the extraction of clothing patterns.

[0013] As a possible implementation, further, in step S1, each image data is digitally marked, and the images are sorted and matched according to the digital marks during matching and splicing.

[0014] As a preferred implementation, preferably, in step S2, the grayscale image is smoothed by a Gaussian filter model to remove noise in the image.

[0015] As a preferred implementation, preferably, in step S2, edge position information in the image is obtained by using a Sobel edge detection operator.

[0016] As a possible implementation, further, step S3 specifically includes the following steps:

[0017] S3.1: sorting the positions of each image according to the marking information of the image data;

[0018] S3.2: Obtaining corner point (inflection point) information in the image from the image edge information identified in step S2;

[0019] S3.3: Using the corner points in the image as matching points, matching and splicing the adjacent images to obtain a complete grayscale image of the clothing;

[0020] S3.4: According to the matching stitching related parameters of adjacent images when the grayscale images are stitched, the original image data that has not been grayscale processed in step S1 is stitched to obtain a complete original clothing image.

[0021] As a possible implementation, further, step S5 specifically includes the following steps:

[0022] S5.1: Calculate the feature difference of each pixel point on both sides of the edge position in the complete clothing grayscale image by a classification algorithm;

[0023] The classification algorithm is expressed as follows:

[0024]

[0025] In the above formula, i is the horizontal coordinate of the pixel point, j is the vertical coordinate of the pixel point; T ij is the gray value of the pixel corresponding to the (i, j) coordinate; a and b are preset fixed values; T i ′ j Indicates the feature difference of the pixel corresponding to the (i, j) coordinate;

[0026] S5.2: The feature difference T of each pixel point on both sides of the edge position in the complete clothing grayscale image i ′ j and (T max -T min ) / 2 for comparison;

[0027] When the feature difference of the pixel point T i ′ j ≤(T max -T min ) / 2, it is determined that the pixel point and the edge position belong to the same category;

[0028] When the feature difference of the pixel point T i ′ j >(T max -T min ) / 2, it is determined that the pixel point and the edge position belong to different classes.

[0029] As a possible implementation, further, step S7 specifically includes the following steps:

[0030] S7.1: using the position regions corresponding to the overall image features in the grayscale image, locate the same position regions from the complete original clothing image;

[0031] S7.2: Extract the overall image features of each location from the complete original clothing image to achieve clothing pattern extraction.

[0032] The present invention also provides a clothing pattern extraction system based on image recognition, which applies the above-mentioned clothing pattern extraction method based on image recognition. The clothing pattern extraction system based on image recognition comprises:

[0033] An image acquisition module is used to acquire image data of different parts of intangible cultural heritage clothing and mark them;

[0034] An image processing module is used to perform grayscale, filtering and edge enhancement processing on the acquired image data;

[0035] An edge detection module is used to obtain edge position information in an image through an edge detection operator;

[0036] An image stitching module is used to match and stitch the grayscale images according to the feature information in the image to obtain a complete grayscale image of clothing, and then stitch the original image data in step S1 with reference to the matching stitching information of the grayscale image to obtain a complete original clothing image;

[0037] The data processing module is used to perform weighted averaging of the grayscale values ​​of the pixels at the edge of the grayscale image and obtain the maximum grayscale value T of the pixels at the edge of the grayscale image. max With the minimum gray value T min ;

[0038] Classification module, used to use the gray value T max With T min , and classify the pixels on both sides of the edge position in the complete clothing grayscale image through a classification algorithm;

[0039] A classification module is used to classify the edge position and the pixel points of the same type as the edge position in the grayscale image into an overall image feature, and locate the position area corresponding to each overall image feature from the grayscale image;

[0040] The image extraction module is used to extract each overall image feature from the complete original clothing image according to the positioning result of the position area corresponding to each overall image feature in the grayscale image.

[0041] Based on the above, the present invention provides a computer device, the computer device comprising:

[0042] at least one processor, and

[0043] A memory and a communication interface communicatively connected to the at least one processor;

[0044] The memory stores instructions that can be executed by the at least one processor, and the at least one processor executes the instructions stored in the memory and uses the communication interface to perform the above-mentioned clothing pattern extraction method based on image recognition.

[0045] The present invention also provides a computer-readable storage medium, in which at least one instruction, at least one program, code set or instruction set is stored. The at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the above-mentioned clothing pattern extraction method based on image recognition.

[0046] By adopting the above technical solution, the present invention has the following beneficial effects compared with the prior art:

[0047] The present invention provides a clothing pattern extraction method and system based on image recognition, which can realize the accurate extraction of pattern image features in the complex background of regional characteristic intangible cultural heritage clothing, realize the accurate classification of pixel points through image processing and classification algorithm, effectively improve the accuracy of pattern image feature extraction, and is suitable for further promotion and application. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.

[0049] Figure 1 1 is a schematic diagram of a brief flow chart of a clothing pattern extraction method based on image recognition provided by an embodiment of the present invention;

[0050] Figure 2 It is a schematic diagram of a system implementation structure of a clothing pattern extraction method based on image recognition corresponding to the solution of the present invention;

[0051] Figure 3 is a module schematic diagram of a computer device provided by an embodiment of the present invention;

[0052] Figure 4 It is a schematic diagram of a computer-readable storage medium provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The present invention will be further described in detail below in conjunction with the accompanying drawings and examples. It is particularly noted that the following examples are only used to illustrate the present invention, but are not intended to limit the scope of the present invention. Similarly, the following examples are only partial embodiments of the present invention rather than all embodiments, and all other embodiments obtained by those of ordinary skill in the art without creative work are within the scope of protection of the present invention.

[0054] Embodiment 1

[0055] Refer to the attached Figure 1 As shown, this embodiment provides a clothing pattern extraction method based on image recognition, comprising:

[0056] S1: Obtain image data of different parts of intangible cultural heritage clothing and mark them, and then grayscale process the acquired image data. In this embodiment, each image data is marked digitally, and the images are sorted and matched according to the digital marks when matching and splicing. For example: when taking pictures, the clothing is divided into nine areas in a nine-square grid and photographed. After the image data is obtained, each image is numbered from 1 to 9 from left to right or from top to bottom. When splicing, the digital label is used to identify the position of each image, which is conducive to subsequent image matching and splicing operations.

[0057] S2: After filtering the grayscale image, edge enhancement is performed on the image, and the edge position information in the image is obtained through the Sobel edge detection operator. In this embodiment, the grayscale image is smoothed by the Gaussian filter model to remove noise in the image, which can effectively remove interference from bright and dark spots in the image, and is beneficial to the subsequent edge recognition operation of the image.

[0058] S3: Match and splice the grayscale images according to the feature information in the image to obtain a complete grayscale image of clothing, and then splice the original image data in step S1 with reference to the matching splicing information of the grayscale images to obtain a complete original clothing image; specifically, the steps include:

[0059] S3.1: sorting the positions of each image according to the marking information of the image data;

[0060] S3.2: Obtaining corner point (inflection point) information in the image from the image edge information identified in step S2;

[0061] S3.3: Using the corner points in the image as matching points, matching and splicing the adjacent images to obtain a complete grayscale image of the clothing;

[0062] S3.4: According to the matching stitching related parameters of adjacent images when stitching grayscale images (the related parameters include: rotation, translation, etc.), the original image data that has not been grayscale processed in step S1 is stitched to obtain a complete original clothing image.

[0063] S4: Perform weighted averaging on the grayscale values ​​of the pixels at the edge of the grayscale image to obtain the grayscale threshold T, and obtain the maximum grayscale value T of the pixels at the edge of the grayscale image max With the minimum gray value T min .

[0064] S5: Using gray value T max With T min , and classify the pixels on both sides of the edge position in the complete clothing grayscale image through a classification algorithm; specifically, the following steps are included:

[0065] S5.1: Calculate the feature difference of each pixel point on both sides of the edge position in the complete clothing grayscale image by a classification algorithm;

[0066] The classification algorithm is expressed as follows:

[0067]

[0068] In the above formula, i is the horizontal coordinate of the pixel point, j is the vertical coordinate of the pixel point; T ij is the grayscale value of the pixel corresponding to the (i, j) coordinate; a and b are preset fixed values ​​(where a and b are usually 1 to 3, preferably 1); T i ′ j Indicates the feature difference of the pixel corresponding to the (i, j) coordinate;

[0069] S5.2: The feature difference T of each pixel point on both sides of the edge position in the complete clothing grayscale image i ′ j and (T max -T min ) / 2 for comparison;

[0070] When the feature difference of the pixel point T i ′ j ≤(T max -T min ) / 2, it is determined that the pixel point and the edge position belong to the same category;

[0071] When the feature difference of the pixel point T i ′ j >(T max -T min ) / 2, it is determined that the pixel point and the edge position belong to different classes.

[0072] Through the above processing, accurate classification of each pixel and edge information can be achieved, effectively improving the accuracy of pattern image feature extraction.

[0073] S6: dividing the edge position in the grayscale image and the pixel points of the same type as the edge position into an overall image feature, and locating the position area corresponding to each overall image feature from the grayscale image.

[0074] S7: extracting the overall image features from the complete original clothing image according to the positioning results of the position areas corresponding to the overall image features in the grayscale image, thereby extracting clothing patterns; specifically comprising the following steps:

[0075] S7.1: Using the position areas corresponding to the overall image features in the grayscale image, locate the same position areas from the complete original clothing image; specifically, overlap the complete clothing grayscale image with the complete clothing original image, and then forward project the position areas corresponding to the overall image features in the grayscale image onto the original image, thereby locating the position areas corresponding to the overall image features in the original image.

[0076] S7.2: Extract the overall image features of each location from the complete original clothing image, and then realize the extraction of clothing patterns.

[0077] Embodiment 2

[0078] Refer to the attached Figure 2 As shown, this embodiment provides a clothing pattern extraction system based on image recognition, which applies the clothing pattern extraction method based on image recognition in the first embodiment. The clothing pattern extraction system based on image recognition includes:

[0079] An image acquisition module is used to acquire image data of different parts of intangible cultural heritage clothing and mark them;

[0080] An image processing module is used to perform grayscale, filtering and edge enhancement processing on the acquired image data;

[0081] An edge detection module is used to obtain edge position information in an image through an edge detection operator;

[0082] An image stitching module is used to match and stitch the grayscale images according to the feature information in the image to obtain a complete grayscale image of clothing, and then stitch the original image data in step S1 with reference to the matching stitching information of the grayscale image to obtain a complete original clothing image;

[0083] The data processing module is used to perform weighted averaging of the grayscale values ​​of the pixels at the edge of the grayscale image and obtain the maximum grayscale value T of the pixels at the edge of the grayscale image. max With the minimum gray value T min ;

[0084] Classification module, used to use the gray value T max With T min , and classify the pixels on both sides of the edge position in the complete clothing grayscale image through a classification algorithm;

[0085] A classification module is used to classify the edge position and the pixel points of the same type as the edge position in the grayscale image into an overall image feature, and locate the position area corresponding to each overall image feature from the grayscale image;

[0086] The image extraction module is used to extract each overall image feature from the complete original clothing image according to the positioning result of the position area corresponding to each overall image feature in the grayscale image.

[0087] Embodiment 3

[0088] Refer to the attached Figure 3 As shown, based on the same inventive concept, this embodiment provides a computer device, including at least one processor, and a memory and a communication interface communicatively connected to the at least one processor, Figure 3 A processor is shown as an example.

[0089] The memory stores instructions executable by the at least one processor, and the at least one processor executes the clothing pattern extraction method based on image recognition as described in Example 1 by using the communication interface by executing the instructions stored in the memory.

[0090] Embodiment 4

[0091] Refer to the attached Figure 4 As shown, based on the same inventive concept, this embodiment provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the clothing pattern extraction method based on image recognition as described in Example 1.

[0092] In the specific implementation process, computer-readable storage media include: Universal Serial Bus flash drive (USB), mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other storage media that can store program codes.

[0093] The device embodiments described above are merely illustrative, wherein the units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units / modules, i.e., they may be located in one place, or they may be distributed over multiple network units / modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0095] The above descriptions are only some embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any equivalent device or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A clothing pattern extraction method based on image recognition, characterized in that: include: S1: Obtain image data of different parts of intangible cultural heritage clothing and mark them, and then perform grayscale processing on the acquired image data; S2: After filtering the grayscale image, edge enhancement is performed on the image, and edge position information in the image is obtained through an edge detection operator; S3: Match and splice the grayscale images according to the feature information in the image to obtain a complete grayscale image of clothing, and then splice the original image data in step S1 with reference to the matching splicing information of the grayscale images to obtain a complete original clothing image; S4: Perform weighted averaging on the grayscale values ​​of the pixels at the edge of the grayscale image to obtain the grayscale threshold T, and obtain the maximum grayscale value T of the pixels at the edge of the grayscale image max With the minimum gray value T min ; S5: Using gray value T max With T min , and classify the pixels on both sides of the edge position in the complete clothing grayscale image through a classification algorithm; S6: dividing the edge position in the grayscale image and the pixel points of the same type as the edge position into an overall image feature, and locating the position area corresponding to each overall image feature from the grayscale image; S7: extracting each overall image feature from the complete original clothing image according to the positioning result of the position area corresponding to each overall image feature in the grayscale image, thereby realizing the extraction of clothing patterns.

2. The clothing pattern extraction method based on image recognition according to claim 1 is characterized in that: In step S1, each image data is digitally marked, and the images are sorted and matched according to the digital marks during matching and splicing.

3. The clothing pattern extraction method based on image recognition according to claim 1, characterized in that: In step S2, the grayscale image is smoothed by a Gaussian filter model to remove noise in the image.

4. The clothing pattern extraction method based on image recognition according to claim 1, characterized in that: In step S2, the edge position information in the image is obtained by using the Sobel edge detection operator.

5. The clothing pattern extraction method based on image recognition according to claim 1, characterized in that: Step S3 specifically includes the following steps: S3.1: sorting the positions of each image according to the marking information of the image data; S3.2: Obtaining corner point (inflection point) information in the image from the image edge information identified in step S2; S3.3: Using the corner points in the image as matching points, matching and splicing the adjacent images to obtain a complete grayscale image of the clothing; S3.4: According to the matching stitching related parameters of adjacent images when the grayscale images are stitched, the original image data that has not been grayscale processed in step S1 is stitched to obtain a complete original clothing image.

6. The clothing pattern extraction method based on image recognition according to claim 1, characterized in that: Step S5 specifically includes the following steps: S5.1: Calculate the feature difference of each pixel point on both sides of the edge position in the complete clothing grayscale image by a classification algorithm; The classification algorithm is expressed as follows: In the above formula, i is the horizontal coordinate of the pixel point, j is the vertical coordinate of the pixel point; T ij is the gray value of the pixel corresponding to the (i, j) coordinate; a and b are preset fixed values; T i ′ j Indicates the feature difference of the pixel corresponding to the (i, j) coordinate; S5.2: The feature difference T of each pixel point on both sides of the edge position in the complete clothing grayscale image i ′ j and (T max -T min ) / 2 for comparison; When the feature difference of the pixel point T i ′ j ≤(T max -T min ) / 2, it is determined that the pixel point and the edge position belong to the same category; When the feature difference of the pixel point T i ′ j >(T max -T min ) / 2, it is determined that the pixel point and the edge position belong to different classes.

7. The clothing pattern extraction method based on image recognition according to claim 1, characterized in that: Step S7 specifically includes the following steps: S7.1: using the position regions corresponding to the overall image features in the grayscale image, locate the same position regions from the complete original clothing image; S7.2: Extract the overall image features of each location from the complete original clothing image to achieve clothing pattern extraction.

8. A clothing pattern extraction system based on image recognition, characterized in that: The clothing pattern extraction method based on image recognition according to any one of claims 1 to 7 is applied, and the clothing pattern extraction system based on image recognition comprises: An image acquisition module is used to acquire image data of different parts of intangible cultural heritage clothing and mark them; An image processing module is used to perform grayscale, filtering and edge enhancement processing on the acquired image data; An edge detection module is used to obtain edge position information in an image through an edge detection operator; An image stitching module is used to match and stitch the grayscale images according to the feature information in the image to obtain a complete grayscale image of clothing, and then stitch the original image data in step S1 with reference to the matching stitching information of the grayscale image to obtain a complete original clothing image; The data processing module is used to perform weighted averaging of the grayscale values ​​of the pixels at the edge of the grayscale image and obtain the maximum grayscale value T of the pixels at the edge of the grayscale image. max With the minimum gray value T min ; Classification module, used to use the gray value T max With T min , and classify the pixels on both sides of the edge position in the complete clothing grayscale image through a classification algorithm; A classification module is used to classify the edge position and the pixel points of the same type as the edge position in the grayscale image into an overall image feature, and locate the position area corresponding to each overall image feature from the grayscale image; The image extraction module is used to extract each overall image feature from the complete original clothing image according to the positioning result of the position area corresponding to each overall image feature in the grayscale image.

9. A computer device, characterized in that: The computer device comprises: at least one processor, and A memory and a communication interface communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, and the at least one processor executes the clothing pattern extraction method based on image recognition as described in any one of claims 1 to 7 by executing the instructions stored in the memory and utilizing the communication interface.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the clothing pattern extraction method based on image recognition as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Classical costume design analysis system based on image recognition

    CN121685755A

  • An image recognition-based classical costume design analysis system

    CN121685755B