Methods, systems and equipment for online calibration and monitoring of semi-finished products in the garment industry
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2026-08-14
AI Technical Summary
服装由于面料柔的特性,铸就了这种劳动作业生产的方式只能通过人的双手进行操作
Smart Images

Figure CN118365598B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computers, and more particularly to a method, system, and equipment for online calibration and monitoring of semi-finished products in the garment industry. Background Technology
[0002] Cutting is one of the most crucial steps in garment production, and the quality of cut pieces significantly impacts garment quality, especially in personalized customization. Personalized customization has the following characteristics: 1) It is significantly less efficient than traditional mass production; 2) The target customer group for customization differs from that of mass production, with customization customers exhibiting a higher level of quality focus; 3) Enterprises require real-time quality inspection data collection based on needs such as digital production and online quality traceability.
[0003] The garment industry is a flexible production process, unlike industries such as electronics and automotive, which can achieve unmanned or standardized operations. Due to the soft nature of garment fabrics, this type of production can only be carried out by human hands. Therefore, it is necessary to strengthen the control of semi-finished products during the garment production process, conduct real-time online calibration and monitoring, and supervise the compliance of frontline workers' operations during actual production. Summary of the Invention
[0004] One of the objectives of this invention is to provide a method, system, and equipment for online calibration and monitoring of semi-finished products in the garment industry, which can perform online calibration and monitoring of semi-finished products on the garment production line.
[0005] One of the objectives of this invention is to provide a method, system, and device for online calibration and monitoring of semi-finished products in the apparel industry, which can perform image contour comparison through a graphic comparison edge computing model and output compliance monitoring results.
[0006] To achieve at least one objective of this invention, the present invention provides an online calibration and monitoring method for semi-finished products in the garment industry, comprising the following steps:
[0007] Obtain the order information corresponding to the current workstation and the corresponding garment CAD drawing file. The garment CAD drawing file is projected onto the current workstation's operating table at a 1:1 scale, where the projection of the garment CAD drawing file coincides with the actual outer contour of the semi-finished garment on the current workstation.
[0008] Acquire the physical image of the semi-finished garment at the current workstation and project the garment CAD drawing file;
[0009] The model constructs an image comparison edge calculation model by projecting CAD drawing files and inputting physical images of semi-finished garments; and performs image contour comparison.
[0010] The edge computing model outputs compliance monitoring results through image comparison;
[0011] The image comparison edge calculation model also includes the following steps: performing crop segmentation; performing image erosion; performing edge detection; and performing matching degree calculation. The image comparison edge calculation model outputs compliance monitoring results based on the matching degree calculation results.
[0012] In some embodiments, the edge detection process further includes the following steps: smoothing the image with a Gaussian filter to remove noise; solving for the intensity gradient of the image; suppressing the edge detection by using a gradient magnitude threshold or lower limit to eliminate stray responses; determining potential edges by using a dual threshold; and tracking edges by hysteresis.
[0013] In some embodiments, the step of performing the matching degree calculation further includes the following steps: performing normalization processing on the images; calculating the cosine similarity of the images; and returning the similarity.
[0014] In some embodiments, the step of solving the intensity gradient of the execution image further includes the following steps: when multiple directions are detected at the edge of the cropped image, the horizontal, vertical and diagonal edges are detected by a filter to determine the edge gradient and direction.
[0015] In some embodiments, the step of eliminating stray responses of edge detection by gradient magnitude thresholding or lower limit cutoff further includes the following steps: comparing the edge intensity of the current pixel with the edge intensity in the positive and negative gradient directions of the pixel; if the edge intensity of the current pixel is the largest compared with other pixels in the mask with the same direction, the value is retained; otherwise, the value is suppressed.
[0016] In some embodiments, the step of tracking edges by hysteresis further includes the step of completing edge detection by suppressing all other weaker edges that are not connected to the strong edge.
[0017] In some embodiments, the cropping step further includes performing a grayscale conversion step: performing a calculation from a three-channel color image to a grayscale image.
[0018] In some embodiments, the cropping step further includes performing a gamma transformation step: performing gamma processing on the input grayscale image.
[0019] In some embodiments, the cropping step further includes performing a mean denoising step: denoising the pixels in the image.
[0020] In some embodiments, the cropping step further includes the step of performing a personalized threshold solution.
[0021] In some embodiments, the piece segmentation step further includes the step of determining an optimal threshold.
[0022] In some embodiments, the step of determining the optimal threshold further includes the steps of: calculating the peak signal-to-noise ratio (PSNR) and the structural similarity value (SSIM); and calculating a weighted value based on the PSNR and the SSIM.
[0023] In some embodiments, after the optimal threshold determination step is performed, the following step is further included: after obtaining the optimal threshold, image binarization is performed.
[0024] According to another aspect of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, performs the steps of the online calibration and monitoring method for semi-finished products in the garment industry.
[0025] According to another aspect of the present invention, an online calibration and monitoring device for semi-finished products in the garment industry is also provided, comprising:
[0026] Memory, used to store software applications.
[0027] A processor is used to execute the software application, wherein each program of the software application correspondingly performs each step of the online calibration and monitoring method for semi-finished products in the garment industry.
[0028] According to another aspect of the present invention, an online calibration and monitoring system for semi-finished garments is also provided. The system includes a semi-finished product calibration and testing unit and a CAD unit. The CAD unit includes a garment CAD file database module, a variation layout module, and a garment CAD file matching module. The garment CAD file database module stores measurement data, patterns, specification sheets, and material information data from garment orders. The variation layout module retrieves garment CAD files from the garment CAD file database module and generates a graphic file of a single pattern for each garment. The matching module is used to generate a corresponding serial number from the single graphic file generated by the variant layout module according to the layout plan during order layout. The semi-finished product calibration and detection unit includes an image acquisition module, an image processing module, a graphic comparison edge calculation model module, and a semi-finished product calibration monitoring result output module. The image acquisition module is used to acquire images. The image processing module acquires the physical image of the semi-finished garment on the current workstation and the projection information of the CAD graphic file, and inputs them into the graphic comparison edge calculation model module. The graphic comparison edge calculation model module performs image contour comparison and outputs the results through the semi-finished product calibration monitoring result output module.
[0029] In some embodiments, the image comparison edge calculation model module includes a crop segmentation calculation module, an image erosion module, an edge detection module, and a matching degree calculation module. The crop segmentation calculation module is used to perform crop segmentation, the image erosion module is used to perform image erosion, the edge detection module is used to perform edge detection, and the matching degree calculation module is used to perform matching degree calculation.
[0030] In some embodiments, the cropping calculation module includes an image grayscale conversion module for performing calculations from a three-channel color image to a grayscale image.
[0031] In some embodiments, the cropping calculation module includes a gamma transformation module, which is used to perform gamma processing on the input grayscale image.
[0032] In some embodiments, the cropping calculation module further includes a mean denoising module, which is used to perform noise reduction processing on pixels in the image.
[0033] In some embodiments, the cut piece segmentation calculation module further includes a personalized threshold solving module, which is used to perform personalized threshold solving.
[0034] In some embodiments, the cut piece segmentation calculation module further includes an optimal threshold determination module for determining an optimal threshold.
[0035] In some embodiments, the edge detection module of the image comparison edge calculation model module further includes a noise removal module, an image intensity gradient solving module, a stray response elimination module, a latent edge determination module, and a hysteresis tracking edge module. The noise removal module is used to perform noise removal by smoothing the image with a Gaussian filter. The image intensity gradient solving module is used to solve the intensity gradient of the image. The stray response elimination module is used to eliminate stray responses in edge detection by suppressing gradient magnitude thresholds or lower limits. The latent edge determination module is used to determine potential edges by using dual thresholds. The hysteresis tracking edge module is used to complete edge detection by suppressing all other weaker edges that are not connected to strong edges.
[0036] In some embodiments, the stray response elimination module is configured to: compare the edge intensity of the current pixel with the edge intensity of the positive and negative gradient directions of the pixel; if the edge intensity of the current pixel is the largest compared with other pixels in the mask with the same direction, the value will be retained; otherwise, the value will be suppressed.
[0037] In some embodiments, the potential edge determination module is configured to: filter out edge pixels with weak gradient values and retain edge pixels with high gradient values; if the gradient value of an edge pixel is higher than a high threshold, it is marked as a strong edge pixel; if the gradient value of an edge pixel is less than a high threshold but greater than a low threshold, it is marked as a weak edge pixel; if the gradient value of an edge pixel is less than a low threshold, the edge pixel is suppressed.
[0038] In some embodiments, the matching degree calculation module of the image comparison edge calculation model module includes an image normalization processing module, a cosine similarity calculation module, and a similarity return processing module. The image normalization processing module is used to perform normalization processing on the image, the cosine similarity calculation module is used to calculate the cosine similarity between two comparison images, and the similarity return processing module is used to return the similarity.
[0039] In some embodiments, the semi-finished product calibration monitoring result output module calculates and outputs results based on the matching degree of the graphic comparison edge calculation model module.
[0040] In some embodiments, the crop segmentation calculation module further includes a threshold determination module, configured to perform: acquiring a crop image; performing SNR (signal-to-noise ratio) determination; if the SNR determination result is higher than the threshold, then calling the OTU algorithm to calculate a first threshold; if the SNR determination result is lower than the threshold, then calling the Bernsen algorithm to calculate a second threshold.
[0041] In some embodiments, the piece segmentation calculation module is further configured to perform: performing PSNR peak signal-to-noise ratio and SSIM structural similarity value calculation; calculating a weighted value based on PSNR peak signal-to-noise ratio and SSIM structural similarity value; determining whether the weighted value corresponding to the second threshold is greater than the weighted value corresponding to the first threshold; if the determination result is yes, then outputting the second threshold; if the determination result is no, then outputting the first threshold. Attached Figure Description
[0042] Figure 1 This is a physical image of the original garment semi-finished product at the current workstation, based on an embodiment of the present invention, of a method for online calibration and monitoring of semi-finished products in the garment industry.
[0043] Figure 2 The image is a physical image of a garment semi-finished product at the current workstation, obtained by the online calibration and monitoring method for semi-finished products in the garment industry according to the above embodiments of the present invention.
[0044] Figure 3 The image is a feedback image of the edge detection result after the edge detection is performed by the online calibration and monitoring method for semi-finished products in the garment industry according to the above embodiments of the present invention.
[0045] Figure 4 This is a flowchart illustrating the steps of an online calibration and monitoring method for semi-finished products in the garment industry according to an embodiment of the present invention. Figure 5 This is a flowchart illustrating the steps of the online calibration and monitoring method for semi-finished products in the garment industry according to the above embodiments of the present invention. Detailed Implementation
[0046] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.
[0047] It is understood that the term "a" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element can be one, while in another embodiment, the number of the element can be multiple, and the term "a" should not be understood as a limitation on the number.
[0048] The monitoring of semi-finished products on the garment production line mainly involves monitoring the compliance of workers' workstations during operations. Through image comparison, the system monitors whether workers are operating according to standard procedures. If they fail to operate according to the standard procedures, the system will issue a prompt and provide comparison images of non-compliant practices to the platform for enhanced management in the future.
[0049] This invention relates to computer programs. It describes a solution to the problems identified in this invention, based on a computer program processing flow, which involves executing a computer program written according to the aforementioned flow to control or process external or internal objects of the computer.
[0050] The online calibration and monitoring method for semi-finished products in the garment industry includes the following steps:
[0051] S100: Obtain the order information corresponding to the current workstation and the garment CAD drawing file corresponding to the order. The garment CAD drawing file is projected onto the current workstation operating table at a 1:1 scale. The projection of the garment CAD drawing file coincides with the physical outline of the garment semi-finished product on the current workstation.
[0052] S200: Obtain the physical image of the semi-finished garment at the current workstation and the projection of the garment CAD drawing file;
[0053] S300: Inputs the CAD drawing file projection and the physical image of the semi-finished garment into the graphic comparison edge calculation model, and performs image contour comparison; and
[0054] S400: The edge computing model outputs compliance monitoring results for graph comparison.
[0055] Specifically, the edge calculation model for image comparison also includes the following steps:
[0056] S310: Perform piece segmentation;
[0057] S320: Perform image erosion;
[0058] S330: Performs edge detection; and
[0059] S340: Perform a matching degree calculation.
[0060] In step S400, the image comparison edge computing model outputs compliance monitoring results based on the matching degree calculation results.
[0061] More specifically, step S310, which involves cropping, further includes the following steps: performing grayscale conversion; performing gamma transformation; performing mean denoising; performing personalized threshold calculation; and performing image binarization.
[0062] More specifically:
[0063] S311 performs the grayscale conversion step: it performs the calculation from a three-channel color image (RGB) to a grayscale image, H = 0.299R + 0.587G + 0.114B, where R, G, and B represent the red, green, and blue components of the three-channel image, respectively;
[0064] S312 performs the gamma transform step:
[0065] The input grayscale image is subjected to gamma processing based on the following formula.
[0066]
[0067] Where γ is defined as follows:
[0068]
[0069] S313 performs the mean denoising step: denoising is applied to the pixels in the image using the following formula: [Formula omitted]. This is the original pixel grayscale value. It is the grayscale value of the new pixel after processing.
[0070]
[0071] Where W(ij) is the weight of pixel (i,j), and M and N are the number of rows and columns of the image (i.e., width and height), respectively. This weight is calculated as follows:
[0072]
[0073] The mean squared error (MSE) is defined as follows:
[0074]
[0075] Where H(i,j) and H′(i,j) represent the gray values of the pixel at (i,j) and other pixels in the image.
[0076] S314 performs the personalized threshold calculation steps:
[0077] For each type of fabric, the signal-to-noise ratio (SNR) of the image is calculated, and the SNR corresponding to the processed result with a small amount of noise is used to calculate the binarization threshold τ. The calculation logic is as follows: Figure 5 As shown.
[0078] Specifically, the online calibration and monitoring method for semi-finished products in the garment industry also includes the following steps:
[0079] Get the input cropped image;
[0080] Perform SNR (Signal-to-Noise Ratio) determination;
[0081] If the SNR is determined to be below the threshold, the Bernsen algorithm is called to calculate the threshold τ.
[0082] If the SNR is higher than the threshold, the OTU algorithm is called to calculate the threshold t. The calculation process is as follows:
[0083] The logic for calculating t is to minimize the inter-class variance, which is defined as follows:
[0084]
[0085] in, Let be the probability that a pixel belongs to class 0. Let Y0 and Y1 represent the probabilities that a pixel belongs to class 1, and respectively the number of pixels below and above the threshold t. Further decomposition of the inter-class variance is then performed.
[0086]
[0087] The definitions of μ0(t) and μ1(t) are as follows, where A i This represents the pixel value of the i-th pixel.
[0088]
[0089]
[0090] Execute global grayscale μ T calculate:
[0091]
[0092] More specifically, perform the following steps:
[0093] Calculate the normalized histogram of the input image using w j (t), j∈{0,1}, t∈{0,L} represents the probability that a pixel is classified into class j at step t.
[0094] Execute formula (2) to calculate the global plotting μ. T ;
[0095] Calculate the inter-class variance using formula (1).
[0096] Obtain the optimal threshold t * Let t = t * .
[0097] S315 performs the optimal threshold determination step: It obtains two thresholds, t and τ, and generates an image p by binarizing the image based on these two thresholds. t and p τ Then calculate p t and p τ The structural similarity value (SSIM) and peak signal-to-noise ratio (PSNR) are used to calculate a weighted value based on the PSNR and the SSIM structural similarity value.
[0098] Determine whether the weighted value corresponding to threshold τ is greater than the weighted value corresponding to threshold t. If the result is yes, output threshold τ; if the result is no, output threshold t. Let the output value be t. c .
[0099] After obtaining the optimal threshold using S316, image binarization is performed:
[0100]
[0101] S317 performs the image erosion step.
[0102] More specifically, step S320, which involves performing edge detection, further includes the following steps:
[0103] S321: Perform noise removal by smoothing the image using a Gaussian filter;
[0104]
[0105] S322: Calculate the intensity gradient of the image;
[0106] In a specific embodiment, the edges of the cropped image may have multiple directions. Therefore, further, horizontal, vertical, and diagonal edges are detected using filters to determine the edge gradient and direction.
[0107] First, calculate the derivative C of the image with respect to x. x Here, x refers to the x-direction, which has the same meaning as i mentioned earlier. Then, the derivative G of the image with respect to y is calculated. y Here, y has the same meaning as j mentioned above. The specific calculation formula is as follows:
[0108]
[0109]
[0110] Get G x and G y Then, the gradient G can be calculated using the following formula.
[0111]
[0112] After obtaining the gradient G, the gradient direction Θ can be calculated using the following formula:
[0113] S323: Eliminate stray responses in edge detection by using gradient magnitude thresholding or lower limit cutoff suppression;
[0114] The edge strength of the current pixel is compared with the edge strength in the positive and negative gradient directions of that pixel. If the edge strength of the current pixel is the largest compared with other pixels in the mask that have the same direction (for example, a pixel pointing in the y direction will be compared with the pixels above and below it on the vertical axis), the value will be preserved; otherwise, the value will be suppressed.
[0115] S324: Identify potential edges using dual thresholds;
[0116] Filter out edge pixels with weak gradient values and retain edge pixels with high gradient values. If the gradient value of an edge pixel is higher than a high threshold, it is marked as a strong edge pixel. If the gradient value of an edge pixel is lower than the high threshold but higher than the low threshold, it is marked as a weak edge pixel. If the gradient value of an edge pixel is lower than the low threshold, the edge pixel will be suppressed.
[0117] S325: Edge tracking by hysteresis: Edge detection is accomplished by suppressing all other weaker edges that are not connected to strong edges.
[0118] In specific embodiments, such as Figure 1 The physical object of the original semi-finished garment at the current workstation. Figure 2 To obtain a physical image of the semi-finished garment at the current workstation, Figure 3 This is an image reflecting the edge detection results after edge detection has been performed. In a specific embodiment, the following steps are performed: finding the largest connected component; marking the number of connected components in the image; calculating the area of each connected component; and finding the largest connected component.
[0119] More specifically, step S330, which involves calculating the matching degree, further includes the following steps:
[0120] S331: Perform normalization on the image;
[0121] In a specific embodiment, the specific code is as follows:
[0122]
[0123] S332: Calculate the cosine similarity D between images A and B. C (A,B);
[0124] D C (A,B)=1-S C (A,B)
[0125] in,
[0126]
[0127] S333: Return similarity D C (A,B)
[0128] Through the above steps, the edge computing model for graphic comparison outputs compliance monitoring results based on the matching degree calculation.
[0129] Those skilled in the art will understand that embodiments of the present invention can be provided in the form of methods, systems, or computer program products. Therefore, the present invention can take the form of an all-hardware embodiment, an all-software embodiment, or an embodiment combining software and hardware.
[0130] This invention can be embedded in a computer program product, which includes all the features that enable the methods described herein to be implemented. The computer program product is contained in one or more computer-readable storage media having computer-readable program code contained therein. According to another aspect of the invention, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, is capable of performing the steps of the methods of the invention. A computer storage medium is a medium in a computer memory used to store some discontinuous physical quantity. Computer storage media include, but are not limited to, semiconductors, disk drives, magnetic cores, magnetic drums, magnetic tapes, laser disks, etc. Those skilled in the art will understand that computer storage media are not limited to the foregoing examples, which are merely illustrative and not intended to limit the invention.
[0131] According to another aspect of the present invention, an online calibration and monitoring device for semi-finished garments is also provided. This device includes: a software application, a memory for storing the software application, and a processor for executing the software application. Each program in the software application is capable of correspondingly executing the steps in the online calibration and monitoring method for semi-finished garments of the present invention.
[0132] A typical combination of hardware and software can be a general-purpose computer system with computer programs that, when loaded and executed, control the computer system to perform the methods disclosed in this invention.
[0133] Those skilled in the art will understand that the online calibration and monitoring method for semi-finished garments of the present invention can be implemented through hardware, software, or a combination of both. The invention can be implemented centrally in at least one computer system, or distributed in a decentralized manner by different parts distributed across several interconnected computer systems. Any computer system or other device capable of implementing the method is applicable. A common combination of hardware and software can be a general-purpose computer system with computer programs installed, controlling the computer system to operate according to the method by installing and executing the programs.
[0134] Corresponding to the embodiments of the method of the present invention, according to another aspect of the present invention, an online calibration and monitoring system for semi-finished products in the garment industry is also provided. This online calibration and monitoring system for semi-finished products in the garment industry is an application of the online calibration and monitoring method for semi-finished products in the garment industry of the present invention through computer program improvement.
[0135] The online calibration and monitoring system for semi-finished products in the garment industry includes a semi-finished product calibration and testing unit, a CAD unit, a MES unit, and an ERP unit.
[0136] The CAD unit includes a garment CAD file database module, a variation layout module, and a garment CAD file matching module. The garment CAD file database module stores garment order measurement data, patterns, specification sheets, and material information. The variation layout module retrieves garment CAD files from the database module and generates a unique graphic file for each garment, one pattern per person. The garment CAD file matching module generates a corresponding serial number for this single graphic file based on the order layout plan. The serial number for each unique pattern per person corresponds one-to-one with the serial number of the cut pieces after cutting, ensuring the correspondence between the garment CAD file and the actual garment during semi-finished product verification on the production line. The CAD system unit also includes a feedback module, which sends the generated unique pattern per person file and its corresponding layout diagram back to the corresponding order information in the MES unit. The MES unit manages the flow direction of cut pieces within a single garment unit module, the setting of order workflows, and the transmission of the corresponding garment CAD file at the workstation. The ERP unit can manage production scheduling in the garment production workshop, including the storage of materials, the layout of the logistics and human-machine workstations, the setting of workstations, and the flow of orders.
[0137] The semi-finished product calibration and monitoring unit includes an image acquisition module, an image processing module, an image comparison edge calculation model module, and a semi-finished product calibration and monitoring result output module.
[0138] The image acquisition module is used to acquire images. The image processing module acquires the physical image of the semi-finished garment on the current workstation operating table and the projection information of the CAD graphic file, and inputs it into the graphic comparison edge calculation model module. The graphic comparison edge calculation model module performs image contour comparison and outputs the results through the semi-finished product calibration monitoring result output module.
[0139] Furthermore, the image comparison edge calculation model module includes a crop segmentation calculation module, an image erosion module, an edge detection module, and a matching degree calculation module. The crop segmentation calculation module is used to perform crop segmentation, the image erosion module is used to perform image erosion, the edge detection module is used to perform edge detection, and the matching degree calculation module is used to perform matching degree calculation.
[0140] More specifically, the cropping calculation module includes an image grayscale conversion module, which is used to perform the calculation of a three-channel color image (RGB) to a grayscale image, H = 0.299R + 0.587G + 0.114B, where R, G, and B represent the red, green, and blue components of the three-channel image, respectively.
[0141] More specifically, the cropping calculation module further includes a gamma transform module, which performs gamma processing on the input grayscale image, wherein the formula is:
[0142]
[0143] Where γ is defined as follows:
[0144]
[0145] More specifically, the cropping segmentation calculation module further includes a mean denoising module, which is used to denoise pixels in the image. The processing formula is as follows: This is the original pixel grayscale value.
[0146] It is the grayscale value of the new pixel after processing.
[0147]
[0148] Where W(ij) is the weight of pixel (i,j), and M and N are the number of rows and columns of the image (i.e., width and height), respectively. This weight is calculated as follows:
[0149]
[0150] The mean squared error (MSE) is defined as follows:
[0151]
[0152] Where H(i,j) and H′(i,j) represent the gray values of the pixel at (i,j) and other pixels in the image.
[0153] More specifically, the fabric piece segmentation calculation module also includes a personalized threshold solving module, which is configured to perform the following: for each type of fabric, calculate the signal-to-noise ratio of the image, and calculate the binarized threshold τ based on the signal-to-noise ratio corresponding to the processing result with a small amount of noise.
[0154] More specifically, the cut piece segmentation calculation module of the online calibration and monitoring system for semi-finished products in the garment industry further includes a threshold judgment module. This threshold judgment module is configured to: acquire cut piece images; perform SNR (signal-to-noise ratio) determination; if the SNR determination result is below a threshold, then call the Bernsen algorithm to calculate the threshold τ; if the SNR determination result is above the threshold, then call the OTU algorithm to calculate the threshold t. In a specific preferred embodiment, the calculation process for t is as follows:
[0155] The logic for calculating t is to minimize the inter-class variance, which is defined as follows:
[0156]
[0157] in, Let be the probability that a pixel belongs to class 0. Let Y0 and Y1 represent the probabilities that a pixel belongs to class 1, and respectively the number of pixels below and above the threshold t. Further decomposition of the inter-class variance is then performed.
[0158]
[0159] The definitions of μ0(t) and μ1(t) are as follows, where A i This represents the pixel value of the i-th pixel.
[0160]
[0161]
[0162] Execute global grayscale μ T calculate:
[0163]
[0164] More specifically, the cut piece segmentation calculation module is also configured to perform:
[0165] Calculate the normalized histogram of the input image using w j (t), j∈{0,1}, t∈{0,L} represents the probability that a pixel is classified into class j at step t.
[0166] Execute formula (2) to calculate the global plotting μ. T ;
[0167] Calculate the inter-class variance using formula (1).
[0168] Obtain the optimal threshold t * Let t = t * ;
[0169] More specifically, the cut piece segmentation calculation module further includes an optimal threshold determination module, which is configured to perform:
[0170] Obtain two thresholds t and τ, and generate an image p by binarizing the image based on these two thresholds. t and p τ Then calculate p t and p τ The structural similarity value (SSIM) and peak signal-to-noise ratio (PSNR) are used to calculate a weighted value based on the PSNR and the SSIM structural similarity value.
[0171] Determine whether the weighted value corresponding to threshold τ is greater than the weighted value corresponding to threshold t. If the result is yes, output threshold τ; if the result is no, output threshold t. Let the output value be t. c .
[0172] After obtaining the optimal threshold, image binarization is performed:
[0173]
[0174] More specifically, the image erosion module is used to perform image erosion.
[0175] Furthermore, the edge detection module of the image comparison edge calculation model module also includes a noise removal module, an image intensity gradient solving module, a stray response elimination module, a latent edge determination module, and a hysteresis tracking edge module. The noise removal module is used to smooth the image using a Gaussian filter to remove noise, as shown in the formula:
[0176]
[0177] The image intensity gradient solving module is used to solve the intensity gradient of the image. The stray response elimination module is used to eliminate stray responses of edge detection by suppressing gradient magnitude thresholds or lower limits. The potential edge determination module is used to determine potential edges by using dual thresholds. The hysteresis tracking edge module is used to complete edge detection by suppressing all other weaker edges that are not connected to strong edges.
[0178] More specifically, in a specific embodiment, the image intensity gradient solving module is configured to: detect horizontal, vertical, and diagonal edges through filters, and determine the edge gradient and direction.
[0179] First, calculate the derivative G of the image with respect to x. x Here, x refers to the x-direction, which has the same meaning as i mentioned earlier. Then, the derivative G of the image with respect to y is calculated. y Here, y has the same meaning as j mentioned above. The specific calculation formula is as follows:
[0180]
[0181]
[0182] Get G x and G y Then, the gradient G can be calculated using the following formula.
[0183]
[0184] After obtaining the gradient G, the gradient direction Θ can be calculated using the following formula:
[0185] More specifically, in a specific embodiment, the stray response elimination module is configured to: compare the edge intensity of the current pixel with the edge intensity in the positive and negative gradient directions of the pixel; if the edge intensity of the current pixel is the largest compared with other pixels in the mask that have the same direction (for example, a pixel pointing in the y direction will be compared with the pixels above and below it on the vertical axis), the value will be retained; otherwise, the value will be suppressed.
[0186] More specifically, in a specific embodiment, the potential edge determination module is configured to: filter out edge pixels with weak gradient values and retain edge pixels with high gradient values; if the gradient value of an edge pixel is higher than a high threshold, it is marked as a strong edge pixel; if the gradient value of an edge pixel is less than the high threshold but greater than a low threshold, it is marked as a weak edge pixel; if the gradient value of an edge pixel is less than the low threshold, the edge pixel is suppressed.
[0187] In a specific embodiment, the physical image of the semi-finished garment is acquired by capturing it with an industrial camera. The semi-finished garment is laid out on a table, overlapping with the projection of the corresponding CAD drawing file. The camera captures the overall outline of the projection and the overall outline of the semi-finished garment, and uploads this image to the graphic comparison edge calculation model module of the semi-finished product calibration and monitoring unit for calibration and monitoring comparison. In a specific embodiment, compliance is determined based on the output of the semi-finished product calibration and monitoring result output module.
[0188] More specifically, the matching degree calculation module includes an image normalization processing module, a cosine similarity calculation module, and a similarity return processing module. The image normalization processing module performs normalization processing on the images, and the cosine similarity calculation module calculates the cosine similarity D between two comparison images A and B. C (A,B);
[0189] D C (A,B)=1-S C (A,B)
[0190] in,
[0191] The similarity return processing module is used to return the similarity D. C (A,B)
[0192] The semi-finished product calibration monitoring result output module calculates and outputs results based on the matching degree of the graphic comparison edge calculation model module.
[0193] The ERP unit is used to manage the orders generated for clothing, and to manage and transmit necessary data such as order information, process sheets, color cards, body measurements, specification sheets, material information, and electronic patterns to the CAD unit and the MES unit.
[0194] Those skilled in the art will understand that the invention has been described with reference to flowchart illustrations and / or block diagrams of methods, systems, and computer program products according to the invention. Each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can obviously be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, thereby instructing (the instructions via the processor of the computer or other programmable data processing apparatus) to generate means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or block diagrams.
[0195] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are merely examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and any modifications or variations of the embodiments of the present invention may be made without departing from these principles.
Claims
1. A method for online calibration and monitoring of semi-finished products in the garment industry, characterized in that, The online calibration and monitoring method for semi-finished products in the garment industry includes the following steps: Obtain the order information corresponding to the current workstation and the corresponding garment CAD drawing file. The garment CAD drawing file is projected onto the current workstation's operating table at a 1:1 scale, where the projection of the garment CAD drawing file coincides with the actual outer contour of the semi-finished garment on the current workstation. Obtain a physical image of the semi-finished garment at the current workstation, as well as a projection of the garment's CAD drawing file; The model constructs an edge comparison calculation model by projecting CAD drawing files and inputting physical images of semi-finished garments; and performs image contour comparison. The edge computing model outputs compliance monitoring results through image comparison; The image comparison edge calculation model also includes the following steps: performing crop segmentation; performing image erosion; performing edge detection; and performing matching degree calculation; wherein the image comparison edge calculation model outputs compliance monitoring results based on the matching degree calculation results. The fabric segmentation step further includes the following steps: performing personalized threshold calculation, calculating the signal-to-noise ratio (SNR) of the image for each type of fabric, and calculating the binarized threshold based on the SNR corresponding to the processing result with a small amount of noise; the personalized threshold calculation step further includes the following steps: acquiring the input fabric image; performing SNR determination; if the SNR determination result is lower than a preset threshold, then calling the Bernsen algorithm to calculate a first threshold; and if the SNR determination result is higher than a preset threshold, then calling the OTU algorithm to calculate a second threshold; The cropping step further includes the step of determining the optimal threshold. The optimal threshold determination step further includes the following steps: obtaining two thresholds calculated in the personalized threshold solution step, generating images by binarization based on these two thresholds, and calculating the SSIM structural similarity value and PSNR peak signal-to-noise ratio of the images; calculating a weighted value based on the PSNR peak signal-to-noise ratio and the SSIM structural similarity value; determining whether the weighted value corresponding to the second threshold is greater than the weighted value corresponding to the first threshold. If the determination result is yes, the second threshold is output; if the determination result is no, the first threshold is output. The optimal threshold determination step is followed by the following steps: after obtaining the optimal threshold, image binarization is performed.
2. The online calibration and monitoring method for semi-finished products in the garment industry as described in claim 1, wherein the edge detection further includes the following steps: Noise removal is performed by smoothing the image with a Gaussian filter; the intensity gradient of the image is solved; stray responses of edge detection are eliminated by gradient magnitude thresholding or lower limit cutoff suppression; potential edges are identified by dual thresholding; and edges are tracked by hysteresis.
3. The online calibration and monitoring method for semi-finished products in the garment industry as described in claim 2, wherein the step of performing the matching degree calculation further includes the following steps: Perform normalization on the image; Calculate the cosine similarity of the images; And return the similarity score.
4. The online calibration and monitoring method for semi-finished products in the garment industry as described in claim 2, wherein the step of solving the intensity gradient of the execution image further includes the following steps: When multiple directions are detected at the edges of a cropped image, the horizontal, vertical, and diagonal edges are detected by a filter to determine the edge gradient and direction.
5. The online calibration and monitoring method for semi-finished products in the garment industry as described in claim 2, wherein the step of eliminating stray responses of edge detection by suppressing them through gradient magnitude thresholds or lower limits further includes the following steps: The edge strength of the current pixel is compared with the edge strength in the positive and negative gradient directions of the pixel. If the edge strength of the current pixel is the largest compared with other pixels in the mask with the same direction, the value is preserved; otherwise, the value is suppressed.
6. The online calibration and monitoring method for semi-finished products in the garment industry as described in claim 5, wherein the step of tracking the edge by hysteresis further includes the following steps: Edge detection is accomplished by suppressing all other weaker edges that are not connected to strong edges.
7. The online calibration and monitoring method for semi-finished products in the garment industry as described in any one of claims 1 to 6, wherein the cut piece segmentation step further includes performing a grayscale conversion step: performing a calculation from a three-channel color image to a grayscale image.
8. The online calibration and monitoring method for semi-finished products in the garment industry as described in claim 7, wherein the cutting piece segmentation step further includes performing a gamma transformation step: performing gamma processing on the input grayscale image.
9. The online calibration and monitoring method for semi-finished products in the garment industry as described in claim 8, wherein the piece segmentation step further includes a mean denoising step: denoising the pixels in the image.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program performs the steps of the online calibration and monitoring method for semi-finished products in the garment industry as described in any one of claims 1 to 9.
11. An online calibration and monitoring device for semi-finished products in the garment industry, characterized in that, include: Memory, used to store software applications. A processor is configured to execute the software application, wherein each program of the software application correspondingly performs a step of the online calibration and monitoring method for semi-finished products in the garment industry as described in any one of claims 1 to 9.
12. An online calibration and monitoring system for semi-finished products in the garment industry, characterized in that, The online calibration and monitoring system for semi-finished products in the garment industry includes a semi-finished product calibration and testing unit and a CAD unit. The CAD unit includes a garment CAD file database module, a variation layout module, and a garment CAD file matching module. The garment CAD file database module is used to store garment order measurement data, patterns, specification sheets, and material information data. The variation layout module is used to obtain garment CAD files from the garment CAD file database module and generate a graphic file of a single pattern for each person. The garment CAD file matching module is used to generate a corresponding serial number from the single graphic file generated by the variation layout module according to the layout plan during order layout. The semi-finished product calibration and detection unit includes an image acquisition module, an image processing module, an image comparison edge calculation model module, and a semi-finished product calibration monitoring result output module. The image acquisition module acquires images. The image processing module obtains the physical image of the semi-finished garment on the current workstation and the projection information of the CAD graphic file, inputting these into the image comparison edge calculation model module. The image comparison edge calculation model module performs image contour comparison and outputs the results through the semi-finished product calibration monitoring result output module. The image comparison edge calculation model module includes a piece segmentation calculation module, an image erosion module, an edge detection module, and a matching degree calculation module. The piece segmentation calculation module performs piece segmentation, the image erosion module performs image erosion, the edge detection module performs edge detection, and the matching degree calculation module performs matching degree calculation. The piece segmentation calculation module also includes a personalized threshold solution module, which performs personalized threshold solution for each type of... The fabric segmentation calculation module calculates the signal-to-noise ratio (SNR) of the image and uses the SNR corresponding to the processing result with a small amount of noise to calculate the binarization threshold. The segmentation calculation module also includes a threshold judgment module, configured to perform: acquiring the segment image; performing SNR judgment; if the SNR judgment result is higher than a preset threshold, then calling the OTU algorithm to calculate the first threshold; if the SNR judgment result is lower than the preset threshold, then calling the Bernsen algorithm to calculate the second threshold. The segmentation calculation module also includes an optimal threshold determination module, used to determine the optimal threshold. The optimal threshold determination module is further configured to perform: acquiring the first threshold and the second threshold, performing binarization to generate an image based on these two thresholds respectively, performing SSIM structural similarity value and PSNR peak signal-to-noise ratio calculation of the image; calculating a weighted value based on the PSNR peak signal-to-noise ratio and the SSIM structural similarity value; determining whether the weighted value corresponding to the second threshold is greater than the weighted value corresponding to the first threshold. If the determination result is yes, then the second threshold is output; if the determination result is no, then the first threshold is output.
13. The online calibration and monitoring system for semi-finished products in the garment industry as described in claim 12, wherein the cut piece segmentation calculation module includes an image grayscale conversion module for performing calculations from a three-channel color image to a grayscale image.
14. The online calibration and monitoring system for semi-finished products in the garment industry as described in claim 13, wherein the cut piece segmentation calculation module includes a gamma transformation module, the gamma transformation module being used to perform gamma processing on the input grayscale image.
15. The online calibration and monitoring system for semi-finished products in the garment industry as described in claim 14, wherein the cut piece segmentation calculation module further includes a mean denoising module, the mean denoising module being used to denoise pixels in the image.
16. The online calibration and monitoring system for semi-finished products in the garment industry as described in any one of claims 12 to 15, wherein the edge detection module of the image comparison edge calculation model module further includes a noise removal module, an image intensity gradient solving module, a stray response elimination module, a potential edge determination module, and a hysteresis tracking edge module, wherein the noise removal module is used to perform noise removal by smoothing the image with a Gaussian filter, the image intensity gradient solving module is used to solve the intensity gradient of the image, the stray response elimination module is used to eliminate stray responses in edge detection by suppressing gradient magnitude thresholds or lower limits, the potential edge determination module is used to determine potential edges by using dual thresholds, and the hysteresis tracking edge module is used to complete edge detection by suppressing all other weaker edges that are not connected to strong edges.
17. The online calibration and monitoring system for semi-finished products in the garment industry as described in claim 16, wherein the stray response elimination module is configured to: compare the edge intensity of the current pixel with the edge intensity in the positive and negative gradient directions of the pixel; if the edge intensity of the current pixel is the largest compared with other pixels in the mask having the same direction, then the value will be retained; otherwise, the value will be suppressed.
18. The online calibration and monitoring system for semi-finished products in the garment industry as described in claim 16, wherein the potential edge determination module is configured to: filter out edge pixels with weak gradient values and retain edge pixels with high gradient values, and mark an edge pixel as a strong edge pixel if the gradient value of the edge pixel is higher than a high threshold. If the gradient value of an edge pixel is less than the high threshold and greater than the low threshold, it is marked as a weak edge pixel. If the gradient value of an edge pixel is less than the low threshold, the edge pixel is suppressed.
19. The online calibration and monitoring system for semi-finished products in the garment industry as described in any one of claims 12 to 15, wherein the matching degree calculation module of the image comparison edge calculation model module includes an image normalization processing module, a cosine similarity calculation module, and a similarity return processing module, wherein the image normalization processing module is used to perform normalization processing on the image, the cosine similarity calculation module is used to calculate the cosine similarity between two comparison images, and the similarity return processing module is used to return the similarity.
20. The online calibration and monitoring system for semi-finished products in the garment industry as described in any one of claims 12 to 15, wherein the semi-finished product calibration and monitoring result output module calculates and outputs results based on the matching degree of the graphic comparison edge calculation model module.
Citation Information
Patent Citations
Projector and method for making its partial image profile clear
CN101169579A
Clothing customizing method and system, and computer readable storage medium
CN107704688A