A clothing quality judgment method and system based on visual data analysis
Through visual data analysis technology, the edges of clothing are identified and marked, shape and grayscale characteristics are analyzed, and quality evaluation and defect comparison are carried out, which solves the problems of inefficiency of traditional detection methods and the impact of subjective judgment, and realizes the automation and precision of clothing quality inspection.
Patent Information
- Application Number
- CN202411426934.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-14
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-10-14
AI Technical Summary
Traditional clothing quality testing methods are inefficient, easily affected by subjective judgment, difficult to accurately identify and classify various defects, and difficult to compare and evaluate horizontally, and cannot meet modern fast-paced, high-yield production needs and consumers' improvement in quality requirements.
Using a method based on visual data analysis, we take pictures of the clothing surface, perform pre-processing and edge detection, identify and mark the clothing profile and internal edges, analyze edge shape and grayscale characteristics, and conduct quality evaluation. If the preliminary evaluation fails, a quality alarm will be triggered, and the comparison and shooting will be performed. By comparing the grayscale comparison diagram with the preset reference diagram, the type and severity of the defect will be determined.
It realizes the automation, efficiency and precision of clothing quality inspection, solves the inefficiency and subjective judgment of traditional artificial quality inspection methods, and greatly improves the accuracy and consistency of inspections.
Smart Images

Figure CN119251202B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of clothing production line monitoring, and in particular to a method and system for judging clothing quality based on visual data analysis. Background Art
[0002] In the field of clothing manufacturing, quality control is a core link to ensure the final quality of products, improve consumer satisfaction, and maintain brand reputation. However, current clothing quality inspection faces multiple challenges: The traditional manual quality inspection method is inefficient, difficult to meet the production requirements of modern fast-paced and high-output, and is easily affected by the subjective judgment of inspectors, resulting in inconsistent inspection results and a high misjudgment rate; There are various types and forms of clothing defects, and traditional inspection methods are difficult to accurately identify and classify various defects; At the same time, the clothing quality inspection standards are diverse and not unified, making it difficult to horizontally compare and evaluate inspection results; In addition, with the increasing requirements of consumers for clothing quality, quality inspection needs to be more refined and real-time, while traditional methods often cannot meet this requirement. Summary of the Invention
[0003] The purpose of the present invention is to provide a method and system for judging clothing quality that can cope with the rapid production of clothing production lines.
[0004] The present invention discloses a method for judging clothing quality based on visual data analysis, including:
[0005] Lay the clothing flat on the shooting background board, and use the shooting module to shoot the clothing on the shooting background board to obtain the clothing surface image, preprocess the clothing surface image, and use edge detection technology to determine several edges on the clothing in the clothing surface image;
[0006] Analyze the gray-scale features beside each edge, and use the condition that the gray-scale features match the gray-scale features of the shooting background board as the screening condition to screen out the clothing contour edges. Based on the contour edge length, shape, and the relationship between adjacent clothing contour edges of the clothing contour edges, determine the part to which the clothing contour edges belong, and mark the part to which it belongs. Analyze the distance features between other edges and the clothing contour edges to determine the part to which the other edges belong, denoted as the clothing inner edges, and mark the part to which it belongs;
[0007] Analyze the self-shape features of the clothing contour edges and the clothing inner edges respectively to obtain the first analysis result, and analyze the gray-scale features beside the clothing contour edges and the clothing inner edges respectively to obtain the second analysis result. Based on the first analysis result and the second analysis result, determine the first quality assessment of the clothing;
[0008] If the first quality assessment result is less than or equal to the preset value, quality alarm is given for the corresponding clothing. The clothing with quality alarm is accurately laid flat at the specified position on the shooting background board, and the direction of the clothing is accurately adjusted. Then, the shooting module is used to shoot the clothing on the background board again to obtain a clothing comparison image, and the clothing comparison image is grayscaled to obtain a clothing grayscale comparison map.
[0009] The clothing grayscale comparison map is compared with the preset clothing grayscale reference map to determine the grayscale difference features between the two, and based on the manifestation of the grayscale difference features, the defects existing on the clothing are determined.
[0010] In some embodiments disclosed by the present invention, the method for determining several edges on the clothing in the clothing surface image by using edge detection technology includes:
[0011] The clothing surface image is preprocessed, including removing noise and enhancing contrast, and an edge detection algorithm is used to calculate the gradient of each pixel point, and the position points of the edges are determined according to the magnitude and direction of the gradient.
[0012] The position points of the edges with the distance between several adjacent edges less than or equal to the preset value are connected to obtain linear edges.
[0013] In some embodiments disclosed by the present invention, the method for determining the part to which the clothing contour edge belongs based on the length, shape of the clothing contour edge and the relationship between adjacent clothing contour edges includes:
[0014] A reference clothing contour map is set for the clothing that needs to be judged for quality. The reference clothing contour map includes several segments of reference contour edges, and a reference edge length is set for each reference contour edge.
[0015] Based on the length difference between the contour edge length of each clothing contour edge and the reference edge length, all clothing contour edges are mapped to the corresponding positions on the clothing contour map. If the contour edge lengths of several clothing contour edges all meet the mapping conditions for the same reference contour edge, then the operation of mapping all clothing contour edges to the clothing contour map is performed several times to form several contour mapping maps.
[0016] Based on the inter - figure similarity parameter between the contour mapping map and the reference clothing contour map, the most similar contour mapping map is selected, and based on the mapping relationship between the most similar contour mapping map and the clothing contour map, the part to which each clothing contour edge on the most similar contour mapping map belongs is determined.
[0017] In some embodiments disclosed by the present invention, the method for determining the inter - figure similarity parameter between the contour mapping map and the reference clothing contour map includes:
[0018] Compare the length difference between each clothing contour edge and the reference contour edge, and determine the first similarity parameter between the clothing contour edge and the reference contour edge based on the length difference;
[0019] Analyze the shape matching parameter between the clothing contour edge and the reference contour edge, and based on the shape matching parameter, correct the first similarity parameter to obtain the second similarity parameter. Combine the second similarity parameters of other clothing contour edges beside the clothing contour edge to correct the second similarity parameter to obtain the third similarity parameter;
[0020] Calculate the sum of the third similarity parameters of all clothing contour edges, which is recognized as the inter - figure similarity parameter;
[0021] Among them, the expression for calculating the inter - figure similarity parameter is:
[0022] ;
[0023] Among them, the expression for calculating the third similarity parameter of the clothing contour edge is:
[0024] ;
[0025] Among them, the expression for calculating the second similarity parameter is:
[0026] ;
[0027] Among them, is the inter - figure similarity parameter, is the third similarity parameter corresponding to the i - th clothing contour edge, n is the number of clothing contour edges, is the second similarity parameter of the i - th clothing contour edge, is the second similarity parameter of the clothing contour edge before the i - th clothing contour edge, is the second similarity parameter of the clothing contour edge after the i - th clothing contour edge, is the influence adjustment coefficient of the second similarity parameter, is the influence adjustment constant of the second similarity parameter, is the preset minimum second similarity parameter, is the preset standard length difference, is the absolute value of the length difference between the clothing contour edge and the reference contour edge, is the shape matching parameter between the clothing contour edge and the reference contour edge, J is the influence adjustment coefficient of the shape matching parameter, b is the influence adjustment constant of the shape matching parameter.
[0028] In some embodiments disclosed in the present application, the method for determining the shape matching parameter between the clothing contour edge and the reference contour edge includes:
[0029] Two parallel contour lines are set for the reference contour edge, and on both sides of the reference contour edge, the area between the parallel contour lines is recognized as the reference contour edge area;
[0030] The edge length of the clothing contour edge falling into the reference contour edge area is recognized as the shape matching parameter.
[0031] In some embodiments disclosed by the present invention, the method for analyzing the self-shape characteristics of the clothing contour edge and the inner edge of the clothing to obtain the first analysis result includes:
[0032] The clothing contour edge and the inner edge of the clothing are respectively compared with their respective preset standards to determine the clothing contour edge or the inner edge of the clothing that does not match, and mark it as a defective edge;
[0033] The method for respectively analyzing the gray-scale characteristics beside the clothing contour edge and the inner edge of the clothing to obtain the second analysis result includes:
[0034] A preset standard clothing gray-scale map is set for the clothing, and based on the parts of the clothing contour edge and the inner edge of the clothing, the standard part gray-scale area for comparison on the standard clothing gray-scale map is determined;
[0035] The clothing contour edge and the side of the inner edge of the clothing are gray-scaled and extracted to obtain the part gray-scale area for comparison, and the part gray-scale area for comparison is compared with the standard part gray-scale area. If the difference characteristics between the two meet the preset standard, the clothing part corresponding to the part gray-scale area is recognized as a defective clothing part.
[0036] In some embodiments disclosed by the present invention, based on the first analysis result and the second analysis result, the first quality evaluation of the clothing is determined:
[0037] Based on the first analysis result and the second analysis result, the defective edges and defective areas existing on the clothing are determined, and based on the number of the defective edges and defective areas, the first quality evaluation of the clothing is determined.
[0038] In some embodiments disclosed by the present invention, the method for comparing the clothing gray-scale comparison map with the preset clothing gray-scale reference map includes:
[0039] Probe mapping arrays are respectively set for the clothing grayscale comparison map and the clothing grayscale reference map. The probe mapping array includes several grayscale probes. The grayscale values corresponding to the same grayscale probe on the clothing grayscale comparison map and the clothing grayscale reference map are respectively extracted, denoted as the first grayscale value and the second grayscale value, and the combination of the first grayscale value and the second grayscale value is denoted as the comparison grayscale value group. Each comparison grayscale value group corresponds to a grayscale probe. If the difference amount of the grayscale values in the comparison grayscale value group corresponding to each grayscale probe is greater than or equal to the preset value, it is determined that the comparison grayscale value group is an abnormal comparison grayscale value group, and the grayscale probe is marked as an abnormal grayscale probe;
[0040] Several scanning blocks are randomly projected for the targeted probe mapping array. If the number of abnormal grayscale probes in the same scanning block is greater than or equal to the preset value, the scanning block is marked, denoted as a defective scanning block;
[0041] The defective scanning block is mapped onto the clothing grayscale comparison map, showing the defects existing on the clothing.
[0042] In some embodiments disclosed in the present invention, there is also disclosed a clothing quality judgment system based on visual data analysis, including:
[0043] The first module lays the clothing flat on the shooting background board, and uses the shooting module to shoot the clothing on the shooting background board to obtain the clothing surface image. The clothing surface image is preprocessed, and the edge detection technology is used to determine several edges on the clothing in the clothing surface image;
[0044] The second module analyzes the grayscale features beside each edge, uses the matching of the grayscale features with the grayscale features of the shooting background board as the screening condition to screen out the clothing contour edges. Based on the contour edge length, shape of the clothing contour edges and the relationship between adjacent clothing contour edges, the belonging part of the clothing contour edges is determined, and its belonging part is marked. The distance features between other edges and the clothing contour edges are analyzed to determine the belonging part of other edges, denoted as the clothing inner edges, and its belonging part is marked;
[0045] The third module analyzes the self-shape features of the clothing contour edges and the clothing inner edges respectively to obtain the first analysis result, and analyzes the grayscale features beside the clothing contour edges and the clothing inner edges respectively to obtain the second analysis result. Based on the first analysis result and the second analysis result, the first quality assessment of the clothing is determined;
[0046] Fourth module, if the first quality assessment result is less than or equal to the preset value, quality alarm is given for the corresponding clothing, the clothing with quality alarm is accurately laid flat at the specified position on the shooting background board, and the direction of the clothing is accurately adjusted. Then, the shooting module is used to shoot the clothing on the background board again to obtain a clothing comparison image, and the clothing comparison image is grayscale processed to obtain a clothing grayscale comparison map;
[0047] Fifth module, the clothing grayscale comparison map is compared with the preset clothing grayscale reference map to determine the grayscale difference features between the two, and based on the performance of the grayscale difference features, the defects existing on the clothing are determined.
[0048] The present invention discloses a method and system for judging clothing quality based on visual data analysis, which relates to the technical field of clothing production line monitoring. Specifically, it discloses that then contour edge recognition and part marking are carried out, the clothing contour and internal detail edges are screened out by using grayscale features, and each part is marked; then a preliminary quality assessment is carried out, and the clothing quality is preliminarily judged by analyzing the edge shape, grayscale features, etc.; if the assessment result does not meet the standard, a quality alarm is triggered, and the alarm clothing is accurately photographed to obtain a comparison image; finally, defect comparison and confirmation are carried out, the comparison image is compared with the preset grayscale reference map to determine the grayscale difference features, so as to accurately judge the type and severity of the defects. The above solution realizes the automation, high efficiency and precision of clothing quality detection, effectively solves the problems of low efficiency and great influence of subjective judgment existing in the traditional manual quality inspection method, and improves the accuracy and consistency of clothing quality detection.
[0049] The technical solution of the present invention will be further described in detail below through the drawings and embodiments. Brief Description of the Drawings
[0050] Figure 1 It is a method step diagram of a method for judging clothing quality based on visual data analysis disclosed in the embodiment of the present invention. Detailed Embodiment
[0051] The technical solution of the present invention will be further described below through the drawings and embodiments.
[0052] The technical solution of the present invention will be clearly and completely described below in conjunction with the drawings and specific embodiments. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention and cannot be construed as limiting the protection scope of the present invention. Those skilled in the art can make some non-essential improvements and adjustments according to the content of the present invention described below. In the present invention, unless otherwise clearly defined and limited, the technical terms used in the present invention should be of the ordinary meaning understood by those skilled in the art of the present invention.
[0053] Embodiment:
[0054] Refer to Figure 1 , the present invention discloses a method for judging the quality of clothing based on visual data analysis, including:
[0055] Step S100, lay the clothing flat on the shooting background board, and use the shooting module to shoot the clothing on the shooting background board to obtain the clothing surface image, preprocess the clothing surface image, and use edge detection technology to determine several edges on the clothing in the clothing surface image.
[0056] This step aims to obtain the surface image of the clothing and perform preliminary processing on it for subsequent analysis. First, lay the clothing flat on the shooting background board to ensure that the clothing is flat and has no wrinkles, so as to accurately capture its shape and details. Then, use the shooting module (such as a high-definition camera) to shoot the clothing to obtain the surface image of the clothing. Next, preprocess the image, including operations such as denoising and enhancing contrast, to improve the image quality, and use edge detection technology to identify the edge information in the image.
[0057] For example, assume that the shooting background board is pure white and the clothing is dark blue jeans. The image obtained by the shooting module may contain some ambient light interference or image noise. The preprocessing stage will use a filtering algorithm to remove these noises and enhance the image contrast through histogram equalization, making the contours and details of the jeans clearer. Edge detection technology can identify the edges of the jeans, including the contour lines of the legs, waist, pockets, etc.
[0058] In some embodiments disclosed by the present invention, the method for determining several edges on the clothing in the clothing surface image by using edge detection technology includes:
[0059] Step S101, preprocess the clothing surface image, including removing noise and enhancing contrast, and use an edge detection algorithm to calculate the gradient of each pixel point, and determine the position points of the edges according to the magnitude and direction of the gradient.
[0060] Step S102, connect the position points of several edges with adjacent distances less than or equal to a preset value to obtain linear edges.
[0061] Step S200, analyze the gray-scale features beside each edge, use the gray-scale features matching those of the shooting background board as the screening condition to screen out the clothing contour edges, determine the parts to which the clothing contour edges belong based on the contour edge lengths, shapes of the clothing contour edges and the relationships between adjacent clothing contour edges, mark the parts to which they belong, analyze the distance features between other edges and the clothing contour edges, determine the parts to which the other edges belong, record them as clothing inner edges, and mark the parts to which they belong.
[0062] This step filters out the contour edges of the clothing by analyzing the gray-scale features beside the edges. Since there is a significant color difference between the photographed background board and the clothing, the contour edges of the clothing can be identified by comparing the gray-scale values beside the edges with those of the background board. Subsequently, based on the length, shape of the contour edges, and the relationships between adjacent contour edges, each part of the clothing (such as sleeves, collars, fronts, etc.) is determined and marked. At the same time, by analyzing the distance features between other edges and the contour edges, the detailed edges inside the clothing (such as stitching lines, decorative lines, etc.) are determined and also marked with their corresponding part information. Continuing with the example of dark blue jeans. By comparing the gray-scale values of the edges with those of the white background board, the contour edges of the jeans can be accurately identified. Further analyzing the shapes and mutual relationships of these edges, the contours of parts such as trouser legs, waistbands, and pockets can be determined and marked. At the same time, the stitching lines on the jeans are also identified as internal edges and marked with the corresponding part information.
[0063] In some embodiments disclosed in the present invention, the method for determining the part to which a clothing contour edge belongs based on the length, shape of the clothing contour edge, and the relationships between adjacent clothing contour edges includes:
[0064] Step S201, a reference clothing contour map is set for the clothing to be judged for quality. The reference clothing contour map includes several segments of reference contour edges, and a reference edge length is set for each reference contour edge.
[0065] This step is the basis of the whole method, which establishes a standard template - the reference clothing contour map. This template contains the contour edge information of each part of the clothing, and each segment of the edge has a preset reference edge length. This length is the average value or typical value obtained based on a large number of sample statistics and can represent the general characteristics of the edges of that part. By setting the reference clothing contour map, a clear benchmark is provided for the subsequent identification and matching of clothing contour edges.
[0066] Step S202, based on the length difference between the contour edge length of each clothing contour edge and the reference edge length, all clothing contour edges are mapped to the corresponding positions on the clothing contour map. If the contour edge lengths of several clothing contour edges all meet the mapping conditions for the same reference contour edge, then the operation of mapping all clothing contour edges to the clothing contour map is performed several times to form several contour mapping diagrams.
[0067] This step maps the clothing contour edges to the corresponding positions on the reference clothing contour map by using the difference between the actual length of the clothing contour edges and the reference edge length. This mapping relationship is established based on the similarity of lengths, assuming that edges with similar lengths are likely to belong to the same part of the clothing. However, due to the complexity and diversity of the actual clothing contour, there may be multiple clothing contour edges that meet the mapping conditions for the same reference contour edge. To solve this problem, step S202 adopts a method of multiple mapping operations, that is, a contour mapping map is generated for each possible mapping relationship. Although this increases the computational amount, it can comprehensively consider various possibilities and improve the accuracy of subsequent part determination.
[0068] Step S203, based on the inter - figure similarity parameter between the contour mapping map and the reference clothing contour map, selects the most similar contour mapping map, and determines the part to which each clothing contour edge on the most similar contour mapping map belongs based on the mapping relationship between the most similar contour mapping map and the clothing contour map.
[0069] This step selects the contour mapping map that best conforms to the actual contour characteristics of the clothing by comparing the similarity degree (i.e., the inter - figure similarity parameter) between each contour mapping map and the reference clothing contour map. The inter - figure similarity parameter is a comprehensive evaluation index, which may include information such as the length, shape, direction, and adjacent relationship of the contour edges. By calculating the similarity of this information, the similarity degree between each contour mapping map and the reference clothing contour map can be obtained. After selecting the most similar contour mapping map, according to the mapping relationship between this map and the clothing contour map, the part to which each clothing contour edge belongs can be determined. This method makes full use of the overall characteristics and local detail information of the clothing contour, improving the accuracy and reliability of part determination.
[0070] In summary, the above - mentioned technical steps achieve the goal of determining the part to which the clothing contour edge belongs based on the length, shape, and adjacent relationship of the clothing contour edge by setting a reference clothing contour map, performing mapping and multiple operations on the clothing contour edge, and selecting the most similar contour mapping map and determining the part to which the edge belongs. This method has the advantages of clear principle, simple operation, and accurate results, and has a wide application prospect in the field of clothing quality inspection.
[0071] In some embodiments disclosed by the present invention, the method for determining the inter - figure similarity parameter between the contour mapping map and the reference clothing contour map includes:
[0072] Step S2031, compare the difference in length between each clothing contour edge and the reference contour edge, and determine the first similarity parameter between the clothing contour edge and the reference contour edge based on the length difference.
[0073] Step S2032: Analyze the shape matching parameter between the clothing contour edge and the reference contour edge, and based on the shape matching parameter, correct the first shape similarity parameter to obtain the second shape similarity parameter. Combine the second shape similarity parameters of other clothing contour edges beside the clothing contour edge to correct the second shape similarity parameter and obtain the third shape similarity parameter.
[0074] Step S2033: Calculate the sum of the third shape similarity parameters of all clothing contour edges and determine it as the inter - figure shape similarity parameter.
[0075] Among them, the expression for calculating the inter - figure shape similarity parameter is:
[0076] 。
[0077] Among them, the expression for calculating the third shape similarity parameter of the clothing contour edge is:
[0078] 。
[0079] Among them, the expression for calculating the second shape similarity parameter is:
[0080] 。
[0081] Among them, is the inter - figure shape similarity parameter, is the third shape similarity parameter corresponding to the i - th clothing contour edge, n is the number of clothing contour edges, is the second shape similarity parameter of the i - th clothing contour edge, is the second shape similarity parameter of the previous clothing contour edge of the i - th clothing contour edge, is the second shape similarity parameter of the next clothing contour edge of the i - th clothing contour edge, is the second shape similarity parameter influence adjustment coefficient, is the second shape similarity parameter influence adjustment constant, is the preset minimum second shape similarity parameter, is the preset standard length difference amount, is the absolute value of the length difference amount between the clothing contour edge and the reference contour edge, is the shape matching parameter between the clothing contour edge and the reference contour edge, J is the shape matching parameter influence adjustment coefficient, b is the shape matching parameter influence adjustment constant.
[0082] In some embodiments disclosed in the present application, the method for determining the shape matching parameter between the clothing contour edge and the reference contour edge includes:
[0083] Step S20321: Set two parallel contour lines for the reference contour edge, and set on both sides of the reference contour edge. The area between the parallel contour lines is identified as the reference contour edge area.
[0084] Step S20322: Identify the edge length of the clothing contour edge falling into the reference contour edge area as the shape matching parameter.
[0085] Step S300: Analyze the self - shape characteristics of the clothing contour edge and the clothing inner edge respectively to obtain the first analysis result, and analyze the gray - scale characteristics beside the clothing contour edge and the clothing inner edge respectively to obtain the second analysis result. Based on the first analysis result and the second analysis result, determine the first quality assessment of the clothing.
[0086] In this step, the quality of the clothing is preliminarily evaluated by analyzing the self - shape characteristics and the gray - scale characteristics beside the clothing contour edge and the inner edge. Specifically, it will check whether the edges are continuous and smooth, whether the shape meets the design requirements, whether the gray - scale characteristics are uniform, etc. These analysis results will comprehensively form the first quality assessment of the clothing. In the example of jeans, if it is detected that there are discontinuities or serrated defects at the leg edges, or abnormal gray - scale characteristics (such as obvious color differences or stains) at the seams, then these will all be regarded as negative factors for the quality assessment. After comprehensively analyzing these factors, it can be preliminarily judged whether the quality of the jeans is qualified.
[0087] In some embodiments disclosed by the present invention, the method for analyzing the self - shape characteristics of the clothing contour edge and the clothing inner edge to obtain the first analysis result includes:
[0088] Step S301: Compare the clothing contour edge and the clothing inner edge with their respective preset standards respectively, identify the clothing contour edge or the clothing inner edge that does not match, and mark it as a defective edge.
[0089] The method for analyzing the gray - scale characteristics beside the clothing contour edge and the clothing inner edge respectively to obtain the second analysis result includes:
[0090] Step S302: Set a preset standard clothing gray - scale map for the clothing, and based on the positions of the clothing contour edge and the clothing inner edge, determine the standard part gray - scale area on the standard clothing gray - scale map for comparison.
[0091] Step S303: Perform gray - scale extraction on the sides of the clothing contour edge and the clothing inner edge to obtain the comparison part gray - scale area, and compare the comparison part gray - scale area with the standard part gray - scale area. If the difference characteristics between the two meet the preset standard, then the clothing part corresponding to the part gray - scale area is identified as a defective clothing part.
[0092] In some embodiments disclosed by the present invention, based on the first analysis result and the second analysis result, a first quality assessment of the clothing is determined:
[0093] Step S304: Based on the first analysis result and the second analysis result, determine the defective edges and defective blocks existing on the clothing, and based on the quantities of the defective edges and defective blocks, determine the first quality assessment of the clothing.
[0094] Step S400: If the first quality assessment result is less than or equal to a preset value, issue a quality alarm for the corresponding clothing, precisely lay the clothing with the quality alarm flat at a designated position on the shooting background board, precisely adjust the direction of the clothing, use the shooting module to reshoot the clothing on the background board to obtain a clothing comparison image, and perform grayscale processing on the clothing comparison image to obtain a clothing grayscale comparison map.
[0095] If the preliminary quality assessment result does not meet the preset quality standard (i.e., the assessment result is less than or equal to the preset value), a quality alarm mechanism is triggered. At this time, the clothing with the alarm will be precisely laid flat at a designated position on the shooting background board, and its direction will be adjusted to ensure the shooting angle is consistent. Then, the shooting module is used to reshoot the clothing again to obtain a clearer comparison image. The comparison image is subjected to grayscale processing to facilitate comparison and analysis with a preset clothing grayscale reference map.
[0096] Step S500: Compare the clothing grayscale comparison map with the preset clothing grayscale reference map, determine the grayscale difference features between the two, and based on the manifestation of the grayscale difference features, determine the defects existing on the clothing.
[0097] In this step, the grayscale difference features between the clothing grayscale comparison map and the preset clothing grayscale reference map are determined through comparison and analysis. These difference features will directly reflect the possible defects on the clothing (such as stains, color differences, damages, etc.). Based on the manifestation form and degree of the grayscale difference features, the type and severity of the defects on the clothing can be accurately judged. In the example of jeans, if there are obvious grayscale differences between the grayscale comparison map and the reference map in the leg part (for example, the reference map is uniformly dark blue while the comparison map is light blue or has spots), it can be judged that there are color difference or stain defects on the jeans leg. The severity of the defects can be further evaluated according to the degree of the grayscale difference.
[0098] In some embodiments disclosed by the present invention, the method for comparing the clothing grayscale comparison map with the preset clothing grayscale reference map includes:
[0099] Step S501: Probe point mapping arrays are respectively set for the clothing grayscale comparison map and the clothing grayscale reference map. The probe point mapping array includes a number of grayscale probe points. The grayscale values corresponding to the same grayscale probe point on the clothing grayscale comparison map and the clothing grayscale reference map are respectively extracted, denoted as the first grayscale value and the second grayscale value, and the combination of the first grayscale value and the second grayscale value is denoted as the comparison grayscale value group. Each comparison grayscale value group corresponds to a grayscale probe point. If the difference amount of the grayscale values in the comparison grayscale value group corresponding to each grayscale probe point is greater than or equal to the preset value, it is determined that the comparison grayscale value group is an abnormal comparison grayscale value group, and the grayscale probe point is marked as an abnormal grayscale probe point;
[0100] Step S502: Randomly project a number of scanning blocks on the probe point mapping array. If the number of abnormal grayscale probe points in the same scanning block is greater than or equal to the preset value, the scanning block is marked, denoted as a defective scanning block;
[0101] Step S503: Map the defective scanning block onto the clothing grayscale comparison map to show the defects existing on the clothing.
[0102] In some embodiments disclosed by the present invention, there is also disclosed a clothing quality judgment system based on visual data analysis, including:
[0103] The first module: Lay the clothing flat on the shooting background board, and use the shooting module to shoot the clothing on the shooting background board to obtain the clothing surface image. Preprocess the clothing surface image, and use edge detection technology to determine a number of edges on the clothing in the clothing surface image;
[0104] The second module: Analyze the grayscale features beside each edge. Taking the grayscale features being consistent with the grayscale features of the shooting background board as the screening condition, screen out the clothing contour edges. Based on the contour edge length, shape of the clothing contour edges and the relationship between adjacent clothing contour edges, determine the part to which the clothing contour edges belong, and mark the part to which it belongs. Analyze the distance features between other edges and the clothing contour edges, determine the part to which the other edges belong, denoted as the clothing inner edges, and mark the part to which it belongs;
[0105] The third module: Analyze the self-shape features of the clothing contour edges and the clothing inner edges respectively to obtain the first analysis result, and analyze the grayscale features beside the clothing contour edges and the clothing inner edges respectively to obtain the second analysis result. Based on the first analysis result and the second analysis result, determine the first quality assessment of the clothing;
[0106] The fourth module is used to, if the first quality assessment result is less than or equal to a preset value, give a quality alarm for the corresponding clothing, accurately lay the clothing with the quality alarm flat at a specified position on the shooting background board, and accurately adjust the direction of the clothing, then use the shooting module to take another picture of the clothing on the background board to obtain a clothing comparison image, and perform grayscale processing on the clothing comparison image to obtain a clothing grayscale comparison map;
[0107] The fifth module is used to compare the clothing grayscale comparison map with a preset clothing grayscale reference map, determine the grayscale difference features between the two, and determine the defects existing on the clothing based on the performance of the grayscale difference features.
[0108] The present invention discloses a clothing quality judgment method and system based on visual data analysis, which relates to the technical field of clothing production line monitoring. Specifically, it discloses that then contour edge recognition and part marking are carried out, the clothing contour and internal detail edges are screened out by using grayscale features, and each part is marked; then a preliminary quality assessment is carried out, and the clothing quality is preliminarily judged by analyzing the edge shape, grayscale features, etc.; if the assessment result does not meet the standard, a quality alarm is triggered, and the alarm clothing is accurately photographed to obtain a comparison image; finally, defect comparison and confirmation are carried out, the comparison image is compared with a preset grayscale reference map to determine the grayscale difference features, so as to accurately judge the type and severity of the defects. The above solution realizes the automation, high efficiency and precision of clothing quality detection, effectively solves the problems existing in the traditional manual quality inspection method such as low efficiency and great influence of subjective judgment, and improves the accuracy and consistency of clothing quality detection.
[0109] Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by hardware or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of the present invention.
[0110] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that: they can still modify or equivalently replace the technical solution of the present invention, and these modifications or equivalent replacements do not make the modified technical solution deviate from the spirit and scope of the technical solution of the present invention.
Claims
1. A clothing quality judgment method based on visual data analysis, characterized in that: include: The clothing is laid flat on a shooting background board, and the clothing on the shooting background board is photographed by a shooting module to obtain a clothing surface image, the clothing surface image is preprocessed, and a plurality of edges on the clothing in the clothing surface image are determined by edge detection technology; Analyze the grayscale features beside each edge, use the grayscale features and the grayscale features of the shooting background plate as the screening conditions, screen out the clothing outline edge, determine the part to which the clothing outline edge belongs based on the length and shape of the clothing outline edge and the relationship between adjacent clothing outline edges, and mark the part to which it belongs, analyze the distance features between other edges and the clothing outline edge, determine the part to which other edges belong, record them as the inner edge of the clothing, and mark the part to which they belong; Analyze the shape features of the garment contour edge and the inner edge of the garment to obtain a first analysis result, and analyze the grayscale features of the garment contour edge and the inner edge of the garment to obtain a second analysis result, and determine a first quality assessment of the garment based on the first analysis result and the second analysis result; If the first quality evaluation result is less than or equal to the preset value, a quality alarm is issued for the corresponding clothing, the clothing with the quality alarm is accurately laid out at the designated position of the shooting background plate, and the direction of the clothing is accurately adjusted, and the clothing on the background plate is photographed again by using the shooting module to obtain a clothing comparison image, and the clothing comparison image is grayed to obtain a clothing gray comparison map; The clothing grayscale comparison image is compared with the preset clothing grayscale reference image to determine the grayscale difference characteristics between the two, and based on the performance of the grayscale difference characteristics, the defects on the clothing are determined.
2. A method for judging clothing quality based on visual data analysis according to claim 1, characterized in that: Methods for determining several edges on clothing in clothing surface images using edge detection technology include: Preprocess the clothing surface image, including removing noise and enhancing contrast, and use edge detection algorithm to calculate the gradient of each pixel, and determine the edge position point according to the size and direction of the gradient; Connect several edge positions whose adjacent distances are less than or equal to a preset value to obtain a linear edge.
3. The method for judging clothing quality based on visual data analysis according to claim 1, characterized in that: Based on the length and shape of the edge of the garment outline and the relationship between adjacent garment outline edges, the method for determining the part to which the garment outline edge belongs includes: A reference garment outline diagram is set for the garments that need to be judged for quality. The reference garment outline diagram includes a plurality of reference contour edges, and a reference edge length is set for each reference contour edge. Based on the length difference between the contour edge length of each garment contour edge and the reference edge length, all garment contour edges are mapped to corresponding positions on the garment contour map, and if there are several garment contour edges whose contour edge lengths all satisfy the mapping condition for the same reference contour edge, the operation of mapping all garment contour edges to the garment contour map is performed several times to form several contour mapping maps; Based on the inter-image similarity parameter between the contour mapping image and the reference clothing contour image, the most similar contour mapping image is selected, and based on the mapping relationship between the most similar contour mapping image and the clothing contour image, the location of each clothing contour edge on the most similar contour mapping image is determined.
4. The method for judging clothing quality based on visual data analysis according to claim 3, characterized in that: The method for determining the inter-image similarity parameter between the contour map and the reference garment contour includes: Comparing the length difference between each garment outline edge and the reference outline edge, and determining the first shape similarity parameter of the garment outline edge and the reference outline edge based on the length difference; Analyze the shape matching parameters of the clothing contour edge and the reference contour edge, and based on the shape matching parameters, correct the first shape similarity parameter to obtain the second shape similarity parameter, and combine the second shape similarity parameters of other clothing contour edges beside the clothing contour edge to correct the second shape similarity parameter to obtain the third shape similarity parameter; Calculate the sum of the third similarity parameters of all clothing contour edges and identify it as the inter-image similarity parameter; Among them, the expression for calculating similar parameters between graphs is: ; Among them, the expression for calculating the third shape parameter of the clothing contour edge is: ; The expression for calculating the second shape parameter is: ; in, is the shape parameter between the figures, is the third shape parameter corresponding to the i-th clothing contour edge, n is the number of clothing contour edges, is the second shape parameter of the i-th clothing contour edge, is the second similarity parameter of the previous clothing contour edge of the i-th clothing contour edge, is the second similarity parameter of the next clothing contour edge after the i-th clothing contour edge, is the influence adjustment coefficient of the second shape parameter, is the second shape parameter affecting the adjustment constant, To preset the minimum second shape parameter, is the preset standard length difference, is the absolute value of the length difference between the edge of the garment contour and the edge of the reference contour, is the shape matching parameter between the edge of the garment contour and the edge of the reference contour, J is the influence adjustment coefficient of the shape matching parameter, and b is the influence adjustment constant of the shape matching parameter.
5. The method for judging clothing quality based on visual data analysis according to claim 4, characterized in that: The method for determining the shape matching parameters of the garment contour edge and the reference contour edge includes: Two parallel contour lines are set for the reference contour edge, and the two sides of the reference contour edge are set, and the block between the parallel contour lines is identified as the reference contour edge block; The edge length of the garment contour edge falling into the reference contour edge block is identified as the shape matching parameter.
6. The method for judging clothing quality based on visual data analysis according to claim 1, characterized in that: The method of analyzing the shape characteristics of the edge of the garment outline and the inner edge of the garment to obtain the first analysis result includes: Comparing the garment outline edge and the garment inner edge with respective preset standards, determining the garment outline edge or the garment inner edge that does not match the standard, and marking it as a defective edge; The method of analyzing the grayscale features of the edge of the clothing outline and the side of the inner edge of the clothing to obtain the second analysis result includes: A preset standard clothing grayscale image is set for clothing, and based on the clothing outline edge and the clothing inner edge, a standard part grayscale block for comparison on the standard clothing grayscale image is determined; The grayscale extraction of the edge of the clothing contour and the side of the inner edge of the clothing is performed to obtain the grayscale block of the comparison part, and the grayscale block of the comparison part is compared with the grayscale block of the standard part. If the difference characteristics between the two meet the preset standards, the clothing part corresponding to the grayscale block is identified as the defective clothing part.
7. The method for judging clothing quality based on visual data analysis according to claim 1, characterized in that: Based on the first analysis result and the second analysis result, a first quality assessment of the garment is determined: Based on the first analysis result and the second analysis result, defective edges and defective blocks on the clothing are determined, and based on the number of defective edges and defective blocks, a first quality assessment of the clothing is determined.
8. The method for judging clothing quality based on visual data analysis according to claim 1, characterized in that: The method for comparing the clothing grayscale comparison image with the preset clothing grayscale reference image includes: A probe point mapping array is set for the clothing grayscale comparison image and the clothing grayscale reference image, respectively. The probe point mapping array includes a plurality of grayscale probe points. The grayscale values corresponding to the same grayscale probe point on the clothing grayscale comparison image and the clothing grayscale reference image are extracted, respectively, and recorded as the first grayscale value and the second grayscale value, and the combination of the first grayscale value and the second grayscale value is recorded as a comparison grayscale value group. Each comparison grayscale value group corresponds to a grayscale probe point. If the grayscale value difference in the comparison grayscale value group corresponding to each grayscale probe point is greater than or equal to a preset value, the comparison grayscale value group is identified as an abnormal comparison grayscale value group, and the grayscale probe point is marked as an abnormal grayscale probe point. A plurality of scanning blocks are randomly projected on the probe point mapping array. If the number of abnormal grayscale probe points in the same scanning block is greater than or equal to a preset value, the scanning block is marked as a defective scanning block. The defect scanning block is mapped onto the grayscale comparison image of the clothing to show the defects on the clothing.
9. A clothing quality judgment system based on visual data analysis, characterized in that: include: The first module lays the clothing on the shooting background board, and uses the shooting module to shoot the clothing on the shooting background board to obtain a clothing surface image, pre-processes the clothing surface image, and uses edge detection technology to determine several edges on the clothing in the clothing surface image; The second module analyzes the grayscale features beside each edge, and uses the grayscale features that match the grayscale features of the shooting background plate as the screening condition to screen out the clothing outline edge. Based on the length and shape of the clothing outline edge and the relationship between the adjacent clothing outline edges, the part to which the clothing outline edge belongs is determined, and the part to which it belongs is marked. The distance features between other edges and the clothing outline edge are analyzed to determine the part to which other edges belong, which are recorded as the inner edge of the clothing, and the part to which they belong is marked. The third module analyzes the shape characteristics of the clothing contour edge and the inner edge of the clothing to obtain a first analysis result, and analyzes the grayscale characteristics of the clothing contour edge and the side of the inner edge of the clothing to obtain a second analysis result, and determines a first quality assessment of the clothing based on the first analysis result and the second analysis result; The fourth module, if the first quality evaluation result is less than or equal to the preset value, a quality alarm is issued for the corresponding clothing, the clothing with the quality alarm is accurately laid out at the designated position of the shooting background plate, and the direction of the clothing is accurately adjusted, and the clothing on the background plate is photographed again by using the shooting module to obtain a clothing comparison image, and the clothing comparison image is grayed to obtain a clothing gray comparison map; The fifth module compares the clothing grayscale comparison image with the preset clothing grayscale reference image to determine the grayscale difference characteristics between the two, and based on the performance of the grayscale difference characteristics, determines the defects on the clothing.
Citation Information
Patent Citations
Textile defect detecting algorithm based on texture gradients
CN103413314A
Deep learning model training method and wearable clothes defect recognition method and device
CN111681229A