Intelligent detection method and system for garment quality inspection
By fusing multi-view images and spectral data, and combining stereo vision and optical distortion correction, the accuracy problems of local color difference and size deviation in garment quality inspection have been solved, achieving high-precision garment inspection and automated quality inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENYANG INSTITUTE OF CHEMICAL TECHNOLOGY
- Filing Date
- 2026-01-21
- Publication Date
- 2026-05-01
AI Technical Summary
Existing garment quality inspection technologies cannot effectively integrate multi-view two-dimensional images and spectral data, making it difficult to accurately identify local color differences caused by three-dimensional surface deformation and optical distortion. Furthermore, information on dimensional deviations, seam defects, and printing defects is isolated and lacks comprehensive correlation analysis, resulting in insufficient detection accuracy.
Using rigidly installed and jointly calibrated image acquisition components, multi-view two-dimensional image data and spectral data are acquired simultaneously. The three-dimensional surface morphology is reconstructed through stereo vision algorithms. Optical distortion correction is performed by combining CIELAB color space and three-dimensional curvature distribution. Defect correlation analysis is conducted under a unified spatial coordinate system to generate associated defect identifiers containing defect type and confidence level.
It achieves high-precision recognition of garment appearance features, improves the reliability of color difference detection and the objectivity of size measurement, enhances the depth and interpretability of quality inspection results, and improves the automation level and overall accuracy of quality inspection.
Smart Images

Figure CN121963183A_ABST
Abstract
Description
A smart detection method and system for garment quality inspection Technical Field
[0001] This application relates to the fields of computer vision and intelligent manufacturing technology, and in particular to an intelligent inspection method and system for garment quality inspection. Background Technology
[0002] With the rapid development of the apparel industry and the upgrading of consumption, the requirements for garment quality inspection are becoming increasingly stringent. Traditional manual quality inspection relies on experience-based judgment, which suffers from low inspection efficiency, long processing time, and strong subjectivity, making it difficult to accurately identify defects such as size deviations, local color differences, and fabric deformation. Existing automated inspection methods are mostly based on two-dimensional images or single sensor data, lacking the ability to fuse multi-view, multi-modal information and perform spatial correlation analysis. They struggle to accurately distinguish apparent color differences caused by garment surface deformation or printing distortion, and cannot comprehensively integrate size, color difference, and local defect information to generate quantitative defect labels and confidence level evaluations.
[0003] Therefore, existing technologies still have significant shortcomings in terms of accuracy, comprehensiveness, and automation in garment quality inspection. There is an urgent need for an intelligent inspection method and system that can integrate multi-view two-dimensional images and spectral data, combined with three-dimensional surface reconstruction, key component size calculation, and spatial relationship determination. This would enable precise detection of dimensional deviations, local color differences, and surface optical distortions in key garment components, and generate quantifiable defect type identifiers and confidence level information, thereby significantly improving quality inspection efficiency and accuracy. Summary of the Invention
[0004] The purpose of this application is to provide an intelligent detection method and system for garment quality inspection. It solves the technical problems of existing technologies where local color differences are easily affected by the three-dimensional curved surface deformation and optical distortion of garments, and where information such as dimensional deviations, seam and printing defects, and local color differences are isolated and lack comprehensive correlation analysis, leading to insufficient detection accuracy.
[0005] In view of the above technical problems, this application provides an intelligent detection method and system for garment quality inspection.
[0006] A first aspect of this application provides an intelligent inspection method for garment quality inspection. The method includes: simultaneously acquiring multi-view two-dimensional image data and spectral data of the garment to be inspected using a rigidly installed and jointly calibrated image acquisition component; performing feature analysis on the multi-view two-dimensional image data to identify seam areas and printed areas on the garment surface, and mapping the identified areas to a unified spatial coordinate system based on joint calibration parameters; reconstructing the three-dimensional surface morphology of the garment to be inspected using a stereo vision algorithm based on the multi-view two-dimensional image data, and comparing the reconstruction result with pre-stored standard garment size data to calculate the dimensional deviation of key parts of the garment. The stereo vision algorithm includes binocular stereo matching, structured light triangulation, or multi-view... At least one of the following: 3D reconstruction; converting the spectral data to the CIELAB color space and comparing it with standard color data to determine local color difference regions and generating corresponding local color difference region identifiers; performing optical distortion correction on the local color difference region identifiers based on the curvature distribution of the reconstructed 3D surface morphology to obtain optically distorted local color difference region identifiers; performing correlation analysis on the spatial distribution of the optically distorted local color difference region identifiers, the seam area, and the dimensional deviation under the unified spatial coordinate system to identify associated defects that cannot be determined by single defect information, and generating associated defect identifiers containing defect type identifiers and their corresponding confidence information; generating a quality report based on the associated defect identifiers.
[0007] A second aspect of this application provides an intelligent inspection system for garment quality inspection. The system includes: a data acquisition module, which synchronously acquires multi-view two-dimensional image data and spectral data of the garment to be inspected via a rigidly installed and jointly calibrated image acquisition component; a feature analysis module, which performs feature analysis on the multi-view two-dimensional image data to identify seam areas and printed areas on the garment surface, and maps the identified areas to a unified spatial coordinate system based on joint calibration parameters; and a three-dimensional reconstruction and size deviation analysis module, which reconstructs the three-dimensional surface morphology of the garment to be inspected based on the multi-view two-dimensional image data using a stereo vision algorithm, compares the reconstruction result with pre-stored standard garment size data, and calculates the size deviation of key parts of the garment. The stereo vision algorithm includes at least one of binocular stereo matching, structured light triangulation, or multi-view three-dimensional reconstruction. The system includes: a color difference detection module, which converts the spectral data to the CIELAB color space and compares it with standard color data to determine local color difference regions and generate corresponding local color difference region identifiers; a color difference optical distortion correction module, which performs optical distortion correction on the local color difference region identifiers based on the curvature distribution of the reconstructed three-dimensional surface morphology to obtain optically distorted local color difference region identifiers; a defect association analysis module, which performs association analysis on the spatial distribution of the optically distorted local color difference region identifiers, the seam area, and the dimensional deviation under the unified spatial coordinate system to identify associated defects that cannot be determined by single defect information and generate associated defect identifiers containing defect type identifiers and their corresponding confidence information; and a quality report generation module, which generates a quality report based on the associated defect identifiers.
[0008] One or more technical solutions provided in this application have at least the following technical effects or advantages: They achieve high-precision recognition of garment appearance features. By performing pixel-level feature analysis on multi-view two-dimensional image data and combining connectivity and regional morphological features for region filtering, they can stably identify seam areas and printed areas, improving the accuracy and robustness of region positioning; they solve the problem of color difference misjudgment caused by three-dimensional curved surface deformation. By converting spectral data to the CIELAB color space and combining it with three-dimensional curvature distribution for optical distortion correction, they can distinguish between true color difference and apparent color difference caused by curved surface bending, creases, and local protrusions, significantly improving the reliability of color difference detection; and they enable automated three-dimensional measurement of key garment dimensions. This system employs stereo vision algorithms to reconstruct 3D surface morphology and calculates the Euclidean distance between key feature points in a unified spatial coordinate system. This addresses the issues of low efficiency and large errors in traditional manual measurement, improving the objectivity and consistency of dimensional inspection. It provides comprehensive correlation analysis capabilities across defect types, mapping dimensional deviations, seam areas, printing areas, and corrected local color differences to the same spatial coordinate system. This constructs a multi-source defect analysis mechanism with spatial constraints, enabling the identification of complex defects or stress deformation defects that cannot be determined by a single defect, thus improving the depth and interpretability of quality inspection results. It also enhances the automation and overall accuracy of garment quality inspection. Through multi-source data fusion, spatial correlation analysis, and automatic defect label generation, quality inspection no longer relies on manual experience, enabling stable and repeatable intelligent inspection in large-scale production scenarios. This system solves the technical problems of existing technologies where local color differences are easily affected by 3D surface deformation and optical distortion of garments, and where information on dimensional deviations, seam and printing defects, and local color differences is isolated and lacks comprehensive correlation analysis, leading to insufficient detection accuracy.
[0009] The above description is merely an overview of the technical solution of this application. In order to more clearly explain the technical means of this application, and to enable its implementation in accordance with the contents of the specification, and to make the above and other objectives, features and advantages of this application more apparent and understandable, specific embodiments of this application are described below. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments of this disclosure will be briefly described below. Flowcharts are used in this application to illustrate the operations performed by the system according to the embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.
[0011] Figure 1 is a flowchart illustrating an intelligent detection method for garment quality inspection provided in an embodiment of this application; Figure 2 is a structural diagram illustrating an intelligent detection system for garment quality inspection provided in an embodiment of this application.
[0012] Figure labeling: Data acquisition module 10, feature analysis module 20, 3D reconstruction and dimensional deviation analysis module 30, color difference detection module 40, color difference optical distortion correction module 50, defect correlation analysis module 60, quality report generation module 70. Detailed Implementation
[0013] This application provides an intelligent detection method and system for garment quality inspection, which solves the technical problems of existing technologies where local color difference is easily affected by the three-dimensional curved surface deformation and optical distortion of garments, and where information such as size deviation, seam and printing defects and local color difference is isolated and lacks comprehensive correlation analysis, resulting in insufficient detection accuracy.
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0015] It should be noted that the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or modules that are not explicitly listed or that are inherent to such processes, methods, products, or devices.
[0016] Example 1, as shown in Figure 1, provides an intelligent detection method for garment quality inspection. The method includes: synchronously acquiring multi-view two-dimensional image data and spectral data of the garment to be inspected using a rigidly mounted and jointly calibrated image acquisition component; further, the synchronous acquisition includes: mounting multiple two-dimensional cameras and spectral acquisition devices in a fixed spatial pose relationship using a rigid mounting bracket; simultaneously sending pulse signals to the multiple two-dimensional cameras and the spectral acquisition devices based on an external hardware trigger circuit to control all devices to acquire multi-view two-dimensional image data and spectral data of the same garment to be inspected at the same time; during the synchronous acquisition... First, joint calibration is performed to establish the spatial mapping relationship and unified spatial coordinate system between the two-dimensional camera and the spectral acquisition device. The joint calibration includes simultaneously acquiring calibration two-dimensional image data and calibration spectral data using a standard calibration board with known spectral and two-dimensional geometric features, based on the multi-view arrangement of the image acquisition components. Based on the calibration two-dimensional image data, the intrinsic and extrinsic parameter matrices of each two-dimensional camera are calculated, and a unified spatial coordinate system based on a certain two-dimensional camera coordinate system is established. Based on the calibration spectral data and calibration two-dimensional image data results, the extrinsic parameter matrix of the spectral acquisition device in the unified spatial coordinate system is solved through pixel correspondence.
[0017] Specifically, multi-view two-dimensional image data and spectral data of the garment under inspection are synchronously acquired through rigidly mounted and jointly calibrated image acquisition components. The image acquisition components include at least three two-dimensional cameras and at least one spectral acquisition device. Four two-dimensional cameras and one spectral acquisition device are used as an example, but those skilled in the art can choose more or fewer devices depending on the actual detection accuracy requirements. First, multiple two-dimensional cameras and spectral acquisition devices are mounted in a fixed spatial pose using rigid mounting brackets. For example, four two-dimensional cameras are fixed in front, left, right, and top positions at the garment processing station, respectively, keeping the relative spatial positions of each device constant. The spectral acquisition device is fixed adjacent to the front two-dimensional cameras, ensuring its optical center covers the garment under inspection within the same working range. To achieve "synchronous acquisition," pulse signals are simultaneously sent to the multiple two-dimensional cameras and the spectral acquisition device based on an external hardware trigger circuit, ensuring that all devices perform image and spectral acquisition on the same garment under inspection at the same time. The external hardware trigger circuit can include a TTL trigger circuit, an RS422 trigger circuit, or other synchronous trigger circuits commonly used in industrial cameras. For example, a commercially available synchronous trigger controller can be used, outputting TTL pulses to the trigger ports of each device, ensuring strict alignment for each exposure. Before synchronous acquisition, joint calibration is performed on the image acquisition component to establish the spatial mapping relationship and unified spatial coordinate system between the 2D camera and the spectral acquisition device. In this embodiment, a standard calibration board with known spectral and 2D geometric features is used. The 2D geometric features can be a common 9×6 checkerboard pattern, and the spectral features can be several color patches with known reflectance. The standard calibration board can be a checkerboard calibration board, a dotted calibration board, or a composite calibration board containing a spectral reflectance standard sheet. The calibration board is placed in the working space of the image acquisition component, and calibration 2D images and calibration spectral data are acquired simultaneously through the multi-view arrangement of the image acquisition component. Based on the calibration 2D images, the intrinsic parameter matrix (including focal length, optical center, and distortion coefficients) and extrinsic parameter matrix (camera attitude) of each 2D camera are calculated using a calibration method, and the coordinate system of the front 2D camera is selected as the reference for the unified spatial coordinate system. Subsequently, based on the calibration spectral data and calibration 2D image data results, the extrinsic parameter matrix of the spectral acquisition device in the unified spatial coordinate system is solved through pixel correspondence. Specifically, a pixel coordinate correspondence for the same color patch region can be established between the two-dimensional camera image and the spectral reflectance map acquired by the spectral device, and least squares fitting can be performed on multiple corresponding points to obtain the rotation matrix and translation vector of the spectral acquisition device relative to the reference two-dimensional camera, so that it is mapped to a unified spatial coordinate system.
[0018] Feature analysis is performed on the multi-view two-dimensional image data to identify seam and print areas on the garment surface, and the identified areas are mapped to a unified spatial coordinate system based on joint calibration parameters. Further, the feature analysis of the multi-view two-dimensional image data includes: performing pixel-level category determination based on the multi-view two-dimensional image data to obtain an initial classification result including seam category, print category, and background category; performing region filtering processing on the seam category region and print category region based on the connectivity features and region morphology features of the initial classification result to remove noise regions and correct boundaries; generating seam region identifiers and print region identifiers for subsequent quality inspection based on the filtered seam category region and print category region, respectively, wherein the seam region identifiers and print region identifiers contain the pixel coordinate range and region boundary information of each region; and mapping the seam region identifiers and print region identifiers to a unified spatial coordinate system to obtain their spatial positions.
[0019] Specifically, in an embodiment of an intelligent inspection method for garment quality inspection, feature analysis is performed on the multi-view two-dimensional image data to identify seam and print areas on the garment surface, and the identified areas are mapped to a unified spatial coordinate system based on joint calibration parameters. Specifically, the system inputs the multi-view two-dimensional image data acquired by each two-dimensional camera into a pixel-level category determination model. The pixel-level category determination can employ a semantic segmentation model based on a convolutional neural network (e.g., DeepLab, U-Net, SegFormer, or any network capable of outputting pixel classification results) to obtain initial classification results including seam category, print category, and background category. Based on this, region filtering processing is performed on the seam category region and print category region based on the connectivity features and region morphology features of the initial classification results. The connectivity features can employ 4-neighbor or 8-neighbor connected component analysis to aggregate similar pixels into candidate regions. The region morphological features include region area, aspect ratio of the circumscribed rectangle, and boundary gradient change rate. Specifically: 1) The area feature is used to delete noise regions with an area smaller than a preset minimum area threshold Amin. Amin can be set empirically based on image resolution and actual suture width, for example, Amin can be set to 30–80 pixels; 2) The aspect ratio of the circumscribed rectangle is used to identify noise regions with abnormal shapes. When the aspect ratio is less than a preset ratio Rmin or greater than Rmax, the region is determined to be a non-suture / non-printed region and is removed; 3) The boundary gradient change rate is used to determine whether the region boundary is smooth. Regions with a gradient change rate greater than a preset threshold are subject to boundary correction or deletion operations. To further improve the quality of region boundaries, the system performs morphological opening and closing operations and boundary smoothing filtering on regions that have passed the initial screening to remove isolated noise points and ensure boundary continuity. After screening, the system generates stitch area identifiers and print area identifiers for the screened stitch category areas and print category areas, respectively. These identifiers include at least the pixel coordinate range of the area, the area center point, and the sequence of area boundary points (which can be polygonal boundaries or equidistant boundary sampling points) to ensure accurate reference of the area range in subsequent quality inspections. Since the area coordinates from different 2D cameras belong to different viewpoints, the corresponding stitch area identifiers and print area identifiers are mapped to a unified spatial coordinate system based on the joint calibration parameters. The mapping process can be achieved by converting the pixel coordinates into 3D coordinates sequentially through the camera intrinsic parameter matrix, extrinsic parameter matrix, and depth estimation model, or by restoring depth through stereo parallax and then performing coordinate system transformation according to the camera extrinsic parameters. When multiple viewpoints cover the same stitch area or print area, the system generates the target area position in a unified spatial coordinate system based on spatial reprojection consistency or a weighted fusion method based on area overlap ratio to ensure spatial consistency for subsequent defect detection and dimensional analysis.
[0020] Based on the multi-view two-dimensional image data, the three-dimensional surface morphology of the garment to be inspected is reconstructed using a stereo vision algorithm. The reconstruction result is then compared with pre-stored standard garment size data to calculate the dimensional deviation of key parts of the garment. The stereo vision algorithm includes at least one of binocular stereo matching, structured light triangulation, or multi-view three-dimensional reconstruction. Further, the process of reconstructing the three-dimensional surface morphology of the garment to be inspected using a stereo vision algorithm based on the multi-view two-dimensional image data, and comparing the reconstruction result with pre-stored standard garment size data to calculate the dimensional deviation of key parts of the garment, includes: extracting feature points of key parts based on seam area markers and printed area markers mapped to the unified spatial coordinate system. The key components include at least garment length, sleeve length, shoulder width, and waist circumference. The key component feature points are image feature points used to represent the spatial position of the key components, including seam endpoints, garment edge corners, and texture feature points. Based on the joint calibration parameters of the image acquisition component, the three-dimensional coordinates of the key component feature points in the unified spatial coordinate system are obtained. For each key component, in the unified spatial coordinate system, the Euclidean distance between the three-dimensional coordinates of a pair of specific key component feature points corresponding to the key component is calculated as the actual measured size of the component. The difference between the calculated actual measured size and the corresponding standard size value in the pre-stored standard garment size data is taken as the size deviation.
[0021] Specifically, based on the multi-view two-dimensional image data, the three-dimensional surface morphology of the garment under inspection is reconstructed using a stereo vision algorithm. The stereo vision algorithm may include at least one of binocular stereo matching, structured light triangulation, or multi-view three-dimensional reconstruction. Each implementation can be used individually or in combination as needed; any equivalent algorithm capable of outputting the three-dimensional spatial information of the garment based on jointly calibrated multi-view images should be included. The following is merely illustrative and does not constitute a limitation on the scope of protection of this application. The three-dimensional surface morphology, under the unified spatial coordinate system, can be represented as a dense triangular mesh model or a set of feature point three-dimensional coordinates. Based on the three-dimensional surface morphology and the seam area markers and print area markers mapped to the unified spatial coordinate system, the dimensions of key parts are calculated. Those skilled in the art can adopt appropriate dimension calculation methods according to the specific representation of the three-dimensional surface morphology. As an exemplary dimension calculation method, three-dimensional feature points corresponding to key parts can be determined from the three-dimensional surface morphology. For example, based on the seam area markers and print area markers, feature points representing key parts, such as seam endpoints and garment edge corners, can be located. Subsequently, the three-dimensional coordinates of the key feature points are obtained in the unified spatial coordinate system. For key parts such as garment length, sleeve length, shoulder width, and waist circumference, the Euclidean distance between the three-dimensional coordinates of two feature points corresponding to the key part is calculated in the unified spatial coordinate system, and this distance is taken as the actual measured size of that part. For example, garment length can be obtained by calculating the Euclidean distance between the "shoulder and neck point" and the "midpoint of the hem". Finally, the calculated actual measured size is compared with the corresponding standard size value in the pre-stored standard garment size data, and the difference is the size deviation. The pre-stored standard garment size data can be derived from garment pattern data, standard size tables, or a statistical database of historical qualified samples. The size deviation is used for subsequent quality judgment, spatial correlation analysis, and quality report generation.
[0022] The spectral data is converted to the CIELAB color space and compared with standard color data to determine local color difference regions and generate corresponding local color difference region identifiers. Specifically, the spectral data acquired by the image acquisition component first undergoes spectral preprocessing, including dark current correction, whiteboard correction, and noise filtering, to obtain accurate spectral reflectance information. Subsequently, the processed spectral data is mapped to the CIELAB color space using a standard spectrum-to-color space conversion formula to obtain the L value corresponding to each pixel. a b Numerical values. The standard color data can be pre-measured standard garment color chart data, color sample data provided by textile factories, or a dataset generated by averaging the spectral measurements of historical qualified samples. Specifically, for each pixel, its CIELAB value is compared with the corresponding position in the standard color data to calculate the color difference value ΔE. (For example, using CIE76, CIE94, or CIEDE2000 formulas), and determining whether a pixel has a color anomaly based on a preset threshold. All pixels with color difference values exceeding the threshold form a local color difference region. The threshold can be dynamically adjusted according to different fabrics, printing types, and lighting conditions; for example, the threshold for a cotton shirt is ΔE. >2.5, the threshold for polyester fabric is ΔE To ensure the accuracy and applicability of the detection, after obtaining the set of all pixels with color difference values exceeding the threshold based on the threshold, this embodiment further performs regional structured representation of the pixel set to facilitate subsequent processing and generates corresponding local color difference region identifiers. Specifically, connected component detection, spatial proximity-based clustering algorithms (such as DBSCAN), or superpixel segmentation-based region merging algorithms can be used to group pixels with abnormal color differences into regions, obtaining one or more independent local color difference regions. For each local color difference region, its region identifier information is generated. The region identifier information includes at least: region ID, the set of pixel coordinates of the region boundary, the index of the region in a unified spatial coordinate system, the region area or number of pixels, and the average ΔE value or maximum ΔE value corresponding to the region. The local color difference region identifiers serve as structured output data for direct use in subsequent optical distortion correction steps, realizing the region-by-region mapping and correction of color difference regions from two-dimensional pixel space to three-dimensional curved surface space.
[0023] Based on the curvature distribution of the reconstructed three-dimensional surface morphology, optical distortion correction is performed on the local color difference region markers to obtain optically distorted local color difference region markers. Further, the optical distortion correction includes: calculating the curvature of each pixel within the local color difference region marker and the corresponding surface normal vector based on the three-dimensional surface morphology of the garment to be inspected; obtaining the tilt angle of each pixel based on the angle between the surface normal vector and the spectral acquisition direction; calculating an optical distortion correction factor based on the curvature and the tilt angle, and performing pixel-by-pixel correction on the pixel color difference data within the local color difference region marker; and performing local neighborhood weighted smoothing processing on the corrected pixel color difference data to generate optically distorted local color difference region markers.
[0024] Specifically, based on the curvature distribution of the reconstructed three-dimensional surface morphology, optical distortion correction is performed on the local color difference region markers to obtain optically distorted local color difference region markers. The specific steps are: 1. Extracting the spatial position of each pixel within the local color difference region. and corresponding curvature values The curvature was obtained from the three-dimensional surface reconstruction results. 2. Originally measured color difference It is calculated in two-dimensional image pixel coordinates, with each pixel corresponding one-to-one with the pixel identified by the local color difference region. The Z coordinate is used to calculate the normal direction and tilt angle during the optical distortion correction stage. 3. Calculate the surface normal vector for each pixel. With respect to the direction of light collection The included angle The normal vector n(X,Y,Z) is calculated from the first-order partial derivatives of the local surface: n=(-p,-q,1) / √(p²+q²+1), where 4. Based on pixel curvature. and tilt angle Calculate the optical distortion correction factor The calculation formula is as follows: and pixel-by-pixel correction is performed on the pixel color difference data within the local color difference region identifier; the optical distortion correction factor can be calculated using the following exemplary formula: ,in This is an empirical coefficient, the value of which is obtained through experimental calibration: the standard flat color chart is photographed at different curvatures / angles, and the color difference is measured and recorded. Color difference from reality By minimizing the error function E=Σ( / (1+ ·K· )– Solving for )² yields 5. Regarding the originally measured color difference Perform correction: ,in, 2D image pixels Original color difference at position It is the optical distortion correction factor, determined by the three-dimensional spatial position of the pixel. curvature With tilt angle Decide, The corrected color difference is used to eliminate the apparent color difference caused by surface deformation. 6. The corrected color difference value is then processed at the pixel level. local neighborhood Weighted smoothing is performed within the range, with weights set based on distance or curvature differences. An example weighted smoothing formula is as follows: The example weights are defined as follows: ;in The local neighborhood set of a pixel (X,Y) (e.g., a circular neighborhood of radius r or a k×k window). Let be the Euclidean distance from pixel (i,j) to the center pixel (X,Y) in the two-dimensional pixel plane. This is the distance attenuation factor (set based on pixel resolution and fabric texture experience). The 3D curvature of the center pixel and neighboring pixels is calculated based on the reconstructed 3D surface data. This is the curvature attenuation coefficient (examples can be set according to the curvature dimensions). The smoothed and corrected color difference is used for subsequent multi-source defect correlation analysis in a unified spatial coordinate system. 7. Pixel-level color difference information based on the final correction. The local color difference region identifiers are updated, including: the correction ΔE value corresponding to each pixel within the region, the region average ΔEavg (ΔEavg is the arithmetic mean of ΔEsmoothed(i,j) of all pixels within the local color difference region), and the region maximum ΔEavg. For each local color difference region, calculate its confidence score (Confidence_region): Confidence score formula example algorithm. in: Average color difference of pixels within a local color difference area : Preset color difference threshold : The maximum color difference among pixels within a local area. When ≤ When Confidence_region=0; Approaching When Confidence_region approaches 1, this confidence level reflects the degree of anomaly in the local color difference region, ranging from 0 to 1. It can be directly used to update the confidence field of the local color difference region identifier. For example, measuring a local printed area on the cuff of a T-shirt, the measured original color difference ΔE... The value is 3.2, with local curvature. When the tilt angle θ = 15°, the correction formula above is used to obtain... =3.0, after weighted smoothing =2.95, if =2.5, =3.0, then =2.95, Confidence_region≈min(1,(2.95-2.5) / (3.0-2.5))≈0.9. It should be noted that the steps regarding curvature calculation, surface normal calculation, tilt angle acquisition, optical distortion correction factor calculation, and weighted smoothing in this embodiment are all exemplary implementations. Those skilled in the art should understand that the above steps can also be implemented in other equivalent ways. For example, curvature can be obtained based on locally fitted quadratic surfaces, normal vectors can be obtained based on principal component analysis (PCA) or polynomial surface fitting, and weighted smoothing can also employ Gaussian filtering, bilateral filtering, or other filtering algorithms that preserve edge characteristics. Therefore, the formulas, symbols, and calculation methods listed in this embodiment are merely exemplary expressions for ease of understanding and do not constitute a limitation on the scope of protection of this application.
[0025] Under the unified spatial coordinate system, a correlation analysis is performed on the spatial distribution of the optically distorted local color difference region identifier, the seam region, and the dimensional deviation to identify associated defects that cannot be determined by single defect information, and to generate associated defect identifiers containing defect type identifiers and their corresponding confidence information. Further, the correlation analysis includes: within the correlation analysis region, calculating a weighted spatial density based on the spatial distribution of key feature points corresponding to the dimensional deviation to form a comprehensive dimensional anomaly index; within the correlation analysis region, calculating a weighted spatial density based on the spatial distribution of pixels contained in the optically distorted local color difference region to form a comprehensive color difference anomaly index; when the comprehensive dimensional anomaly index exceeds the dimensional anomaly threshold calculated based on historical standard garment data, and the comprehensive color difference anomaly index exceeds the color difference anomaly threshold calculated based on historical standard garment data, a defect type identifier characterizing stress deformation defects and its corresponding confidence information are output to form an associated defect identifier.
[0026] Specifically, under the unified spatial coordinate system, a correlation analysis is performed on the spatial distribution of the optically distorted local color difference region identifiers, the seam area, and the dimensional deviation to identify associated defects that cannot be determined by single defect information, and to generate associated defect identifiers containing defect type identifiers and their corresponding confidence information. Further, the garment surface is divided into several correlation analysis regions. For each correlation analysis region, a weighted spatial density calculation of dimensional deviation and local color difference is performed: within the correlation analysis region, the optically distorted local color difference region identifiers and the set of key feature point identifiers are first analyzed. Perform weighted spatial density calculation. For each critical part i, determine its importance score fi (based on the critical part's influence on the overall garment size, historical defect data, and process standard settings), and normalize the importance score to calculate the weight. ,in This involves identifying all key components within the correlation analysis region; within this region, the spatial distribution of feature points of these key components is multiplied by their corresponding weights to calculate the weighted spatial density. ,in This represents the local spatial density of key feature points in a unified spatial coordinate system. Defined as: =Σ ,in Let feature point i and its neighboring feature points be... The three-dimensional distance This is the smoothing coefficient. For each local color difference area... The set of pixels and area identified by using this local color difference region. Color difference intensity curvature influence coefficient Determine the initial importance score The importance scores are normalized into weights. Within the correlation analysis region, the local chromatic aberration region identifiers after optical distortion correction are multiplied by their corresponding weights to calculate the weighted spatial density. ,in This represents the local spatial density of the local color difference region in a unified spatial coordinate system. The calculated comprehensive dimensional anomaly index... Abnormal threshold for historical standard garment size Comparison, combining color difference abnormality indicators Color difference threshold from historical standard ready-to-wear Compare; when and When a stress deformation defect is detected in the area, a defect type identifier and corresponding confidence level are generated. The confidence level can be calculated based on the degree to which the average ΔE, maximum ΔE, and threshold in the area identifier exceed the threshold, as well as historical data experience. For example, Confidence=0.5 (Ds-Ts) / Ts+0.5 The above operation (Dc-Tc) / Tc is repeated for all associated analysis areas on the garment surface to generate complete associated defect identifiers. The calculation method of weighted spatial densities Ds and Dc in this embodiment is merely an illustrative example to illustrate the association analysis approach of this application. Those skilled in the art can construct equivalent comprehensive anomaly indicators based on the density of key feature points, color difference area density, or other statistical quantities. As long as a comprehensive characterization of dimensional deviations and color difference distribution can be achieved, it falls within the protection scope of this application.
[0027] A quality report is generated based on the associated defect identifiers.
[0028] Specifically, based on the associated defect identifiers obtained in the aforementioned steps, a quality report for garment quality assessment is further generated. Specifically, after calculating the weighted spatial density of dimensional deviation (Ds) and the weighted spatial density of color difference (Dc) for each associated analysis area, and obtaining the corresponding defect type identifier and its corresponding confidence level information based on the dimensional anomaly threshold (Ts) and the color difference anomaly threshold (Tc), the system summarizes the associated defect identifiers for all associated analysis areas and displays them globally based on a unified spatial coordinate system. The system first structures the fields contained in each associated defect identifier (including but not limited to defect type identifier, confidence level, area location, involved local color difference area identifier, involved seam area, and involved dimensional deviation data), and generates corresponding content according to a preset quality report template. The report should include at least: ① the ID of each correlation analysis region and its spatial location in a unified spatial coordinate system; ② the defect type identifier for each region, such as stress deformation defect, structural deformation defect, or color difference anomaly, listed in an "OR" manner when multiple defect types exist in a region; ③ the corresponding confidence information, where the confidence level can be obtained by the aforementioned calculation formula, such as Confidence=0.5·(Ds-Ts) / Ts+0.5·(Dc-Tc) / Tc, or based on ΔEavg, and The degree of excess is determined; ④ The identification information of the local color difference areas involved, including the information after optical distortion correction and weighted smoothing. Area, Maximum Area ⑤ Information on the seam area involved, including seam offset, seam continuity, and local abnormal density of the seam; ⑥ Information on the dimensional deviation involved, including the offset of key feature points, the calculation process of the weighted spatial density Ds and its exceeding the limit; ⑦ Speculation on possible causes of defects (optional), such as stress deformation characteristics determined based on historical garment data, or process deviation patterns; ⑧ Quality grade assessment results, when multiple defects exist at the same time, a comprehensive judgment is made using "AND" logic. For example, in a T-shirt sample, the weighted spatial density Ds=1.32 corresponding to a size deviation was detected in the correlation analysis area under the left armpit, which is higher than the historical standard garment size anomaly threshold Ts=1.10. Simultaneously, the weighted spatial density Dc=0.48 of the local color difference area after optical distortion correction in this area is higher than the color difference anomaly threshold Tc=0.40 calculated based on historical standard garment data. Therefore, the system determines that there is a stress deformation defect in this area, and its confidence level is obtained using the formula: Confidence=0.5·(1.32-1.10) / 1.10+0.5·(0.48-0.40) / 0.40≈0.36. The system summarizes this result along with the defect information from other areas to generate a quality report containing the above information. The final output quality report can intuitively display the overall quality status of the garment, as well as at least the defect type identifier for each area and its corresponding confidence level information, enabling ordinary engineers to make production adjustment or rework decisions based on the report without creative labor.
[0029] In summary, the embodiments of this application have at least the following technical effects: Multi-view two-dimensional image data and spectral data of the garment to be inspected are simultaneously acquired through a rigidly installed and jointly calibrated image acquisition component; feature analysis is performed on the multi-view two-dimensional image data to identify the seam and printed areas on the garment surface, and the identified areas are mapped to a unified spatial coordinate system based on joint calibration parameters; based on the multi-view two-dimensional image data, the three-dimensional surface morphology of the garment to be inspected is reconstructed using a stereo vision algorithm, and the reconstruction result is compared with pre-stored standard garment size data to calculate the dimensional deviation of key parts of the garment. The stereo vision algorithm includes at least one of binocular stereo matching, structured light triangulation, or multi-view three-dimensional reconstruction. One method involves: converting the spectral data to the CIELAB color space and comparing it with standard color data to determine local color difference regions and generate corresponding local color difference region identifiers; performing optical distortion correction on the local color difference region identifiers based on the curvature distribution of the reconstructed three-dimensional surface morphology to obtain optically distorted local color difference region identifiers; performing correlation analysis on the spatial distribution of the optically distorted local color difference region identifiers, the seam area, and the dimensional deviation under the unified spatial coordinate system to identify associated defects that cannot be determined by single defect information and generating associated defect identifiers containing defect type identifiers and their corresponding confidence information; and generating a quality report based on the associated defect identifiers.
[0030] Example 2: Based on the same inventive concept as the intelligent detection method for garment quality inspection in the previous example, as shown in Figure 2, this application provides an intelligent detection system for garment quality inspection. The system and method examples in this application are based on the same inventive concept. The system includes: a data acquisition module 10, which is used to synchronously acquire multi-view two-dimensional image data and spectral data of the garment to be inspected through a rigidly installed and jointly calibrated image acquisition component; a feature analysis module 20, which is used to perform feature analysis on the multi-view two-dimensional image data, identify the seam area and printed area on the surface of the garment, and map the identified area to a unified spatial coordinate system based on the joint calibration parameters; a three-dimensional reconstruction and size deviation analysis module 30, which is used to reconstruct the three-dimensional surface morphology of the garment to be inspected based on the multi-view two-dimensional image data through a stereo vision algorithm, and compare the reconstruction result with pre-stored standard garment size data to calculate the size deviation of key parts of the garment. The stereo vision algorithm includes at least one of binocular stereo matching, structured light triangulation, or multi-view three-dimensional reconstruction; and a color difference detection module 40. Block 40 is used to convert the spectral data to the CIELAB color space and compare it with standard color data to determine local color difference regions and generate corresponding local color difference region identifiers; Color difference optical distortion correction module 50 is used to perform optical distortion correction on the local color difference region identifiers based on the curvature distribution of the reconstructed three-dimensional surface morphology to obtain optically distorted local color difference region identifiers; Defect association analysis module 60 is used to perform association analysis on the spatial distribution of the optically distorted local color difference region identifiers, the seam area, and the dimensional deviation in the unified spatial coordinate system to identify associated defects that cannot be determined by single defect information and generate associated defect identifiers containing defect type identifiers and their corresponding confidence information; Quality report generation module 70 is used to generate a quality report based on the associated defect identifiers.
[0031] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0032] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0033] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and modifications fall within the scope of this application and its equivalents, this application intends to include such modifications and modifications.
Claims
1. An intelligent detection method for garment quality inspection, characterized in that, The method includes: simultaneously acquiring multi-view two-dimensional image data and spectral data of the garment to be inspected through a rigidly installed and jointly calibrated image acquisition component; performing feature analysis on the multi-view two-dimensional image data to identify seam areas and printed areas on the garment surface, and mapping the identified areas to a unified spatial coordinate system based on joint calibration parameters; reconstructing the three-dimensional surface morphology of the garment to be inspected based on the multi-view two-dimensional image data using a stereo vision algorithm, and comparing the reconstruction result with pre-stored standard garment size data to calculate the dimensional deviation of key parts of the garment, wherein the stereo vision algorithm includes at least one of binocular stereo matching, structured light triangulation, or multi-view three-dimensional reconstruction; and transferring the spectral data... The data is converted to the CIELAB color space and compared with standard color data to identify local color difference areas and generate corresponding local color difference area identifiers. Based on the curvature distribution of the reconstructed three-dimensional surface morphology, optical distortion correction is performed on the local color difference area identifiers to obtain optically distorted local color difference area identifiers. Under the unified spatial coordinate system, correlation analysis is performed on the spatial distribution of the optically distorted local color difference area identifiers, the seam area, and the dimensional deviation to identify associated defects that cannot be determined by single defect information, and generate associated defect identifiers containing defect type identifiers and their corresponding confidence information. A quality report is generated based on the associated defect identifiers.
2. The intelligent detection method for garment quality inspection as described in claim 1, characterized in that, The synchronous acquisition includes: mounting multiple 2D cameras and spectral acquisition devices in a fixed spatial pose relationship using a rigid mounting bracket; simultaneously sending pulse signals to the multiple 2D cameras and the spectral acquisition devices based on an external hardware trigger circuit to control all devices to acquire multi-view 2D image data and spectral data of the same garment under inspection at the same time; performing joint calibration before synchronous acquisition to establish a spatial mapping relationship and a unified spatial coordinate system between the 2D cameras and the spectral acquisition devices; the joint calibration includes synchronously acquiring and calibrating 2D image data and calibrating spectral data based on the multi-view arrangement of the image acquisition components using a standard calibration plate with known spectral and 2D geometric features; calculating the intrinsic and extrinsic parameter matrices of each 2D camera based on the calibrated 2D image data, and establishing a unified spatial coordinate system based on a certain 2D camera coordinate system; and solving the extrinsic parameter matrix of the spectral acquisition device in the unified spatial coordinate system based on the calibrated spectral data and calibrated 2D image data results through pixel correspondence.
3. The intelligent detection method for garment quality inspection as described in claim 1, characterized in that, The feature analysis of the multi-view two-dimensional image data includes: performing pixel-level category determination based on the multi-view two-dimensional image data to obtain an initial classification result including stitch category, print category, and background category; performing region filtering processing on the stitch category region and print category region based on the connectivity features and region morphology features of the initial classification result to remove noise regions and correct boundaries; generating stitch region identifiers and print region identifiers for subsequent quality inspection based on the filtered stitch category region and print category region, respectively, wherein the stitch region identifier and print region identifier contain the pixel coordinate range and region boundary information of each region; and mapping the stitch region identifier and print region identifier to a unified spatial coordinate system to obtain their spatial positions.
4. The intelligent detection method for garment quality inspection as described in claim 1, characterized in that, The process involves reconstructing the three-dimensional surface morphology of the garment under inspection using a stereo vision algorithm based on the multi-view two-dimensional image data, comparing the reconstruction result with pre-stored standard garment size data, and calculating the dimensional deviation of key parts of the garment. This includes: extracting key part feature points based on seam area identifiers and print area identifiers mapped to the unified spatial coordinate system, wherein the key parts include at least garment length, sleeve length, shoulder width, and waist circumference, and the key part feature points are image feature points used to represent the spatial position of the key parts, including seam endpoints, garment edge corner points, and texture feature points; obtaining the three-dimensional coordinates of the key part feature points in the unified spatial coordinate system based on the joint calibration parameters of the image acquisition component; for each key part, calculating the Euclidean distance between the three-dimensional coordinates of a pair of specific key part feature points corresponding to the key part in the unified spatial coordinate system, which is taken as the actual measured size of the part; and subtracting the calculated actual measured size from the corresponding standard size value in the pre-stored standard garment size data as the dimensional deviation.
5. The intelligent detection method for garment quality inspection as described in claim 1, characterized in that, The correlation analysis includes: within the correlation analysis area, calculating a weighted spatial density based on the spatial distribution of feature points of key parts corresponding to the size deviation to form a comprehensive size anomaly index; within the correlation analysis area, calculating a weighted spatial density based on the spatial distribution of pixels contained in the local color difference area after optical distortion correction to form a comprehensive color difference anomaly index; when the comprehensive size anomaly index exceeds the size anomaly threshold calculated based on historical standard garment data, and the comprehensive color difference anomaly index exceeds the color difference anomaly threshold calculated based on historical standard garment data, outputting a defect type identifier characterizing stress deformation defects and its corresponding confidence information to form a correlated defect identifier.
6. The intelligent detection method for garment quality inspection as described in claim 1, characterized in that, The optical distortion correction includes: calculating the curvature of each pixel and the corresponding surface normal vector within the local color difference region identifier based on the three-dimensional surface morphology of the garment to be inspected; obtaining the tilt angle of each pixel based on the angle between the surface normal vector and the spectral acquisition direction; calculating the optical distortion correction factor based on the curvature and the tilt angle, and correcting the pixel color difference data within the local color difference region identifier pixel by pixel; and performing local neighborhood weighted smoothing processing on the corrected pixel color difference data to generate a local color difference region identifier with optical distortion correction.
7. An intelligent inspection system for garment quality inspection, characterized in that, The system is used to implement the intelligent detection method for garment quality inspection as described in any one of claims 1 to 6. The system includes: a data acquisition module, which synchronously acquires multi-view two-dimensional image data and spectral data of the garment to be inspected via a rigidly installed and jointly calibrated image acquisition component; a feature analysis module, which performs feature analysis on the multi-view two-dimensional image data, identifies seam areas and printed areas on the garment surface, and maps the identified areas to a unified spatial coordinate system based on joint calibration parameters; and a three-dimensional reconstruction and size deviation analysis module, which reconstructs the three-dimensional surface morphology of the garment to be inspected based on the multi-view two-dimensional image data using a stereo vision algorithm, compares the reconstruction result with pre-stored standard garment size data, and calculates the size deviation of key parts of the garment. The stereo vision algorithm includes binocular stereo matching, structured light triangulation, or multi-view three-dimensional reconstruction. At least one of the following: a color difference detection module, which converts the spectral data to the CIELAB color space and compares it with standard color data to determine local color difference regions and generate corresponding local color difference region identifiers; a color difference optical distortion correction module, which performs optical distortion correction on the local color difference region identifiers based on the curvature distribution of the reconstructed three-dimensional surface morphology to obtain optically distorted local color difference region identifiers; a defect association analysis module, which performs association analysis on the spatial distribution of the optically distorted local color difference region identifiers, the seam area, and the dimensional deviation under the unified spatial coordinate system to identify associated defects that cannot be determined by single defect information and generate associated defect identifiers containing defect type identifiers and their corresponding confidence information; and a quality report generation module, which generates a quality report based on the associated defect identifiers.