Luggage production defect detection system and method

Through high-definition camera and image processing technology combined with machine learning methods, the shortcomings of the existing luggage detection system in edge and detail processing are solved, high-precision defect detection and quality control are achieved, and production optimization is supported.

CN120471827AInactive Publication Date: 2025-08-12WEN ZHOU SHI YA WANG DA XIANG BAO YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510404664.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-08-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing luggage detection system has defects in edge and detail processing, making it difficult to accurately identify edge features of complex materials, and is prone to misjudgment or omission of defects. In addition, traditional histogram equalization does not consider regional differences, which may destroy the original grayscale level, and sharpening processing does not combine frequency characteristics, resulting in high-frequency details missing and reduce detection accuracy.

Method used

Image acquisition is carried out using a high-definition camera, combined with an image enhancement sub-module, an edge detection module and an image segmentation module, edge contrast is enhanced through non-sharpening mask algorithm and gradient analysis, high-frequency details are enhanced by image frequency characteristics, and defect detection is adopted by machine learning methods, model construction is used to judge features by deep learning algorithms, and multimodal sensor information is used for detection.

Benefits of technology

Improves edge and detail clarity, ensures detection accuracy, accurately identify subtle defects, and supports production optimization through historical data analysis, improving quality and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471827A_ABST
    Figure CN120471827A_ABST
Patent Text Reader

Abstract

The invention discloses a luggage production defect detection system and method, relates to the technical field of luggage detection, and aims to solve the technical problems that a current detection system lacks identification difference degree on edge increase, original gray level is easy to damage on detail enhancement to influence judgment, and high-frequency details are difficult to highlight and easy to omit. In the aspect of edge enhancement, the image is sharpened by using a non-sharpening mask algorithm, so that the edge is clearer and distinguishable; gradient-based analysis processing is carried out on the image, the position and the strength of the edge are determined according to the size and the change trend of a gradient value, and corresponding processing is carried out; for the enhancement of detail parts, on the basis of histogram equalization, a processing mode is further optimized; in the sharpening processing process, in combination with the frequency characteristic of the image, the high-frequency part is enhanced in a targeted mode, the definition of details is improved, and the detection precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of luggage inspection, and more particularly to a luggage production defect inspection system and method. Background Art

[0002] Luggage, a storage and carrying tool widely used in daily life, business trips, vacations, and various professional fields, is a comprehensive term for a wide variety of bags, boxes, and other containers. With a rich variety of shapes, materials, designs, and functional features, it meets people's needs for organizing, transporting, and storing items in different situations. From compact and exquisite clutches to large-capacity totes; from comfortable backpacks to convenient and haulable suitcases; from simple and practical briefcases to complex outdoor adventure bags, the variety of luggage is truly diverse. Materials include soft leather, tough canvas, lightweight nylon, durable plastic, and various new composite materials, each of which gives luggage a unique texture, weight, durability, and protective properties. Before leaving the factory, luggage undergoes inspection systems to detect defects.

[0003] However, existing detection systems have many shortcomings in edge and detail processing. In terms of edge enhancement, it is difficult to cope with complex luggage images. For example, when the edge features of different materials vary greatly, inaccurate edge detection and blurred information are prone to occur. At the same time, existing technologies lack in-depth analysis and adaptive processing of gradient values, making it difficult to perform targeted enhancement based on differences in edge importance, which can easily lead to omissions or misjudgments of defects in the zipper area. In terms of detail enhancement, traditional histogram equalization does not take into account regional detail differences, which can easily cause over-enhancement of small component details or insufficient enhancement of large areas, and may also destroy the original grayscale levels and affect texture judgment. In addition, the sharpening process does not combine frequency characteristics and cannot effectively highlight high-frequency details. It is easy to miss subtle defects and reduce detection accuracy. In view of this, we propose a luggage production defect detection system and method. Summary of the Invention

[0004] The purpose of the present invention is to overcome the shortcomings of the existing technology, adapt to actual needs, and provide a luggage production defect detection system and method to solve the technical problems that the current detection system lacks recognition difference in edge addition, easily destroys the original grayscale and affects judgment in detail enhancement, and is difficult to highlight high-frequency details and is easily missed.

[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: a bag production defect detection system, comprising an image acquisition module: for acquiring image information of bags;

[0006] Image processing module: used to process the collected images;

[0007] Defect detection module: performs defect detection on bags based on the processing results of the image processing module;

[0008] Result output module: used to output the test results to the user.

[0009] Preferably, the image acquisition module includes at least one high-definition camera for taking omnidirectional photos of the luggage and adjusting the parameters of the camera to ensure the quality and clarity of the image.

[0010] Preferably, the image processing module includes an image enhancement submodule, an edge detection module, and an image segmentation module;

[0011] Image enhancement submodule, used to improve the quality and clarity of images;

[0012] Edge detection module, used to determine the edge position and contour information in the image;

[0013] The image segmentation module is used to separate the various parts of the bag for individual inspection.

[0014] Preferably, the image enhancement submodule improves the quality and clarity of the image by: performing histogram equalization on the image to make the grayscale distribution of the image more uniform; using an unsharp mask algorithm to sharpen the image to enhance the contrast of boundaries and edges; and reducing image noise to remove and suppress small areas.

[0015] Preferably, the edge detection module determines the edge position and contour information in the image by the following method: using the Sobel operator to convolve the image and calculate the gradient amplitude and direction of each pixel; generating a gradient image based on the gradient amplitude and binarizing the gradient image; using the Hough transform to perform straight line detection on the binarized image to determine the straight lines in the image.

[0016] Preferably, the image segmentation module segments the image by the following method: first, the RGB image obtained by the image processing module is converted into the HSI color space, and then the H component of the HSI color space is extracted; the maximum inter-class variance method is used to obtain the optimal threshold of the image, and the image is binarized to obtain a binary image of a triple edge combination of black, white and gray; through morphological processing, including corrosion, expansion, opening operation and closing operation operations, the image is smoothed and denoised, thereby obtaining various parts of the image.

[0017] Preferably, the defect detection module uses a machine learning method to perform defect detection on images: a number of defect-free luggage images are collected as samples, each image represents the front, back, left, right and top surface respectively, and each image includes several parts, including zippers, stitching, zippers and surfaces, and the collected images are inspected.

[0018] Preferably, the output process of the result output module includes the following steps:

[0019] S1: Calculate the difference between the image and the standard image: Calculate the difference between the image and the standard image through feature matching;

[0020] S101: Color features: Calculate the color histograms of the image and the standard image, and calculate the Euclidean distance between them; if the distance exceeds a preset threshold, it means that the color features of the image and the standard image are different, and there may be a defect;

[0021] S102: Texture features: A local binary pattern algorithm is used to extract texture features from the image and the reference image, and the Euclidean distance between them is calculated. If the distance exceeds a preset threshold, it indicates that the texture features of the image and the reference image are different, indicating a possible defect.

[0022] S103: Shape features: The image and the standard image are converted into contour images and skeletons are extracted. The distance between the two skeletons is calculated to determine whether their shape features are the same. If the distance exceeds a preset threshold, it indicates that the shape features of the image and the standard image are different, and there may be a defect.

[0023] S104: If the difference between one or more of the above three features exceeds a preset threshold, it indicates that the image is different from the standard image and there may be a defect;

[0024] S2: Determine the defect type and location: If there is a difference between the image and the standard image, determine the defect type and location, and mark the location and range of the defect on the image;

[0025] S201: Zipper defects: Compare the zipper's stitching to see if it is neat, has extra stitching, or has extra sliders. If the zipper's stitching is not neat, or has extra stitching, or has extra sliders, it indicates that the zipper may be defective.

[0026] S202: Suture defects: Compare each suture site to see if there are loose, skewed, or overlapping sutures. If there are loose, skewed, or overlapping sutures at each suture site, it indicates that there may be suture defects.

[0027] S203: Zipper Defects: Compare each zipper part to see if there are any skewed, missing, or extra stitches. If there are any skewed, missing, or extra stitches on the zipper part, it indicates that the zipper may have defects.

[0028] S3: Surface defects: Compare each surface area to see if there are scratches, damages, or stains. If there are scratches, damages, or stains on the surface, it indicates that there may be surface defects.

[0029] S4: Output test results: The test results are output to the display screen to alert the operator; if a defect is detected, the location and type of the defect are marked; if the test result is normal, the words "no defect" are displayed; the test results can also be stored for subsequent statistical analysis and quality traceability.

[0030] Preferably, the color features of step S101 are set as image I and standard image I std , the color histograms are H(I) and H(I std ), the Euclidean distance d of the color feature color The calculation formula is:

[0031]

[0032] Where n is the number of bins in the color histogram, H(I)[i] represents the value of the i-th bin in the color histogram of image I, and H(I std )[i] represents the standard image I std The value of the i-th bin in the color histogram;

[0033] In the texture features of step S102, it is assumed that image I and standard image I std , the feature vectors obtained after extracting texture features using the local binary pattern algorithm are T(I) and T(I std ), Euclidean distance d of texture features texture The calculation formula is:

[0034]

[0035] Among them, m is the dimension of the texture feature vector, T(I)[j] represents the jth element in the texture feature vector of image I, T(I std )[j] represents the standard image I std The jth element in the texture feature vector of ;

[0036] In the shape feature of step S103, the image I and the standard image I are set std The skeletons obtained after conversion to contour image and skeleton extraction are S(I) and S(I std ), for point P on the skeleton I (x I ,y I ) on the skeleton S(I), In the skeleton S(I std ) on the shape feature, the distance d shape The calculation formula is:

[0037]

[0038] Among them, K is the number of skeleton points selected for distance calculation, x I [k] and y I [k] represents the horizontal and vertical coordinates of the kth point on the skeleton of image I, and Represents the standard image I std The horizontal and vertical coordinates of the kth point on the skeleton.

[0039] A method for implementing a bag production defect detection system includes the following steps:

[0040] S5: Image acquisition: Place the bag in the detection area, start the image acquisition module, take a full-scale photo of the bag, and obtain image information of the bag;

[0041] S6: Image processing: Processing the collected images, including image enhancement, denoising, edge detection and image segmentation, to improve the quality and clarity of the image and separate the various parts of the image;

[0042] S7: Defect detection: Use image processing technology and machine learning algorithms to detect defects in various parts of the luggage;

[0043] S8: Result output: The test results are output to the user in an intuitive manner, such as displaying the location and type of defects on a display screen, or issuing alarms through sound or light; at the same time, the test results can be stored for subsequent statistical analysis and quality traceability.

[0044] Compared with the prior art, the present invention has the following beneficial effects:

[0045] 1. In terms of edge enhancement, the present invention uses an unsharp mask algorithm to sharpen the image, making the edge clearer and more discernible by increasing the contrast of the edge pixels. In addition, the image is analyzed and processed based on the gradient, the gradient value of each pixel in the image is calculated, the position and intensity of the edge are determined according to the size and change trend of the gradient value, and corresponding processing is performed according to the gradient value. For the enhancement of detail parts, the processing method is further optimized on the basis of histogram equalization. At the same time, during the sharpening process, the high-frequency part is targetedly enhanced in combination with the frequency characteristics of the image to improve the clarity of the details, ensure that no subtle defects are missed during the detection process, and improve the accuracy of detection.

[0046] 2. The result output module of the present invention adopts a machine learning method to achieve efficient and accurate detection, and has a complete historical data storage function. In terms of machine learning detection, a deep learning algorithm is used to build a model to collect a large number of luggage images of different styles, materials, and colors, including images without defects and images of various types of defects. These images are input into the deep learning model for training. The model automatically learns the characteristic patterns in the image, such as color distribution patterns, texture feature laws, and shape structure characteristics, to determine whether the image has defects and the type of defects; in terms of historical data storage, after each detection is completed, the detection results will be stored according to detailed classification rules; including classification according to detection time, luggage model, and batch information, and recording relevant parameters and image data in the detection process. Through statistical analysis of historical data, rich information can be obtained, such as the defect rate change trend of luggage in different batches and the common defect types of luggage of specific models; this information provides strong data support for the optimization and improvement of production processes, monitoring of raw material quality, and formulation of quality control strategies, which helps to improve the quality and efficiency of the entire luggage production process.

[0047] 3. In terms of improving imaging clarity, the image processing module of the present invention suppresses image noise through denoising processing, thereby providing high-quality images for subsequent detection. Denoising avoids blurring of texture details and ensures texture continuity and clarity, so that in subsequent detection, it can accurately identify whether there are scratches and stains on the surface of luggage, thereby improving the accuracy and reliability of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 Schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0049] Example 1, as Figure 1 As shown, the present invention relates to a bag production defect detection system, comprising:

[0050] Image acquisition module: used to collect image information of luggage.

[0051] The image acquisition module includes at least one high-definition camera for taking all-round photos of the luggage and adjusting the camera parameters to ensure the quality and clarity of the image.

[0052] Design a suitable camera layout based on the size and shape of the luggage to be inspected. For example, for larger suitcases, multiple cameras can be used to simultaneously capture images from different angles, ensuring that the entire suitcase surface is captured without blind spots. A primary camera can be placed on the top to capture the entire surface, while auxiliary cameras can be placed on the sides and bottom to capture details around the edges and bottom. This layout reduces defects missed due to camera angle issues and improves comprehensiveness of inspection.

[0053] An automated image acquisition process was designed. When a bag enters the inspection area, sensors trigger the image acquisition process. The system automatically identifies the bag's position and posture and controls the camera to capture images based on preset shooting parameters and paths. This not only improves inspection efficiency but also reduces errors that can be introduced by manual operation. For example, object detection algorithms based on machine vision technology are used to quickly locate the bag's position and orientation on the inspection platform. The camera is then driven sequentially according to a pre-set shooting sequence, ensuring consistent and accurate images every time.

[0054] Image processing module: used to process the collected images.

[0055] The image processing module includes an image enhancement submodule, an edge detection module, and an image segmentation module;

[0056] The image enhancement submodule is used to improve the quality and clarity of the image; the image enhancement submodule improves the quality and clarity of the image through the following methods: performing histogram equalization on the image to make the grayscale distribution of the image more uniform; using the unsharp mask algorithm to sharpen the image to enhance the contrast of the boundaries and edges; and reducing the removal and suppression of small areas of image noise.

[0057] Adaptive histogram equalization (AHE) can be used in histogram equalization. Compared to traditional AHE, adaptive AHE can dynamically adjust grayscale distribution based on the local characteristics of the image, avoiding over-enhancement of certain areas during global equalization, which can lead to loss of detail. For example, for luggage surfaces with distinct patterns or textures, AHE can enhance overall contrast while preserving the details of the patterns and textures, resulting in a more natural and clear image.

[0058] An adjustable sharpening intensity parameter is introduced during the sharpening process of the unsharp mask algorithm. The sharpening intensity is automatically adjusted based on the material and initial image clarity. For fine-textured leather or fabric surfaces, a relatively low sharpening intensity is used to prevent over-sharpening and artifacts. For rougher surfaces with less distinct details, the sharpening intensity is increased to emphasize boundaries and edges, enhancing the visual quality of the image.

[0059] To reduce image noise, in addition to removing and suppressing noise in small areas, multi-frame averaging can also be used. When capturing the same bag part multiple times, the captured frames are averaged. Because noise is randomly distributed across frames, while the target image information is relatively stable, multi-frame averaging can effectively reduce its impact and improve the image's signal-to-noise ratio. For example, when inspecting zippers, the metal surface of the zipper teeth may generate some reflective noise. Multi-frame averaging can reduce noise interference without compromising the zipper's structural details, allowing for more accurate visualization of the zipper's stitching and shape.

[0060] The edge detection module is used to determine edge locations and contour information within an image. This is done by: convolving the image using the Sobel operator to calculate the gradient magnitude and direction for each pixel; generating a gradient image based on the gradient magnitude and binarizing the gradient image; and performing line detection on the binarized image using the Hough transform to identify straight lines within the image. Regions with large gradient values are identified as having a high likelihood of being edges, and these regions are subjected to special processing to further enhance their contrast and highlight edge features.

[0061] After using the Sobel operator for convolution to calculate the gradient magnitude and direction, the non-maximum suppression algorithm can be further applied. This algorithm compares the gradient magnitude of each pixel with its neighbors along the gradient direction in the gradient image, retaining only the pixels with the largest local gradient magnitude as edge points. This refines edges, reducing their width for greater precision and clarity. For example, when detecting the outline of a bag, the non-maximum suppression algorithm can remove false edges caused by uneven lighting or varying material textures, resulting in more accurate contour information.

[0062] Line fitting and screening are performed on the line results obtained after Hough transform line detection. Because actual images may contain interference factors that may cause discontinuities or errors in the detected lines, a line fitting algorithm connects similar line segments into complete lines. Lines are then screened based on parameters such as length and angle to remove short and irregular line segments while retaining the key line features related to the bag structure. For example, when detecting straight line structures such as seams or borders on bags, line fitting and screening can more accurately determine the neatness of the seams and the linearity of the borders, improving the accuracy of defect detection.

[0063] The image segmentation module is used to separate the various parts of the luggage for individual inspection. The image segmentation module segments the image using the following methods: first, the RGB image obtained by the image processing module is converted into the HSI color space, and then the H component of the HSI color space is extracted; the maximum inter-class variance method is used to obtain the optimal threshold of the image, and the image is binarized to obtain a binary image with a triple edge combination of black, white and gray; through morphological processing, including corrosion, expansion, opening operation and closing operation operations, the image is smoothed and denoised to obtain the various parts of the image.

[0064] After converting the RGB image to HSI color space and extracting the H component, further segmentation optimization can be performed by incorporating texture information. Texture feature extraction algorithms (such as the gray-level co-occurrence matrix) are used to calculate the image's texture features. The segmentation threshold is then determined based on a combination of color and texture information. For bag parts with similar colors but different textures, such as printed fabric surfaces, accurate segmentation may not be possible based solely on color information. Incorporating texture information can better separate the printed pattern from the background fabric, improving image segmentation accuracy.

[0065] During morphological processing, the parameters and order of the corrosion, expansion, opening, and closing operations are dynamically adjusted based on the different bag locations and defect types. For example, when inspecting zippers, due to the small shape and spacing of the zipper teeth, an corrosion operation is first performed on the smaller structural elements to remove the tiny connecting parts between the teeth. Then, an expansion operation is performed to restore the general shape of the zipper teeth, allowing for a clearer view of the zipper's stitching and structural integrity. When inspecting large stains or damage on the bag surface, a closing operation can be performed on the larger structural elements first to fill in small holes and cracks. Then, an corrosion operation can be performed to highlight the edges of the stain or damage, improving defect detection effectiveness.

[0066] Defect detection module: Based on the processing results of the image processing module, the defect detection module performs defect detection on the luggage; the defect detection module uses machine learning methods to detect defects in images: a number of defect-free luggage images are collected as samples, each image represents the front, back, left, right and top surface, and each image includes several parts, including zippers, stitching, zippers and surfaces, and the collected images are inspected.

[0067] When using machine learning methods for defect detection, in addition to collecting images of bags and luggage without defects as samples, it's also important to collect images of bags and luggage with defects, and to carefully classify and annotate the defect types. For example, zipper defects can be subdivided into categories such as broken seams, damaged sliders, and missing teeth. Stitching defects can be further categorized into loose stitches, skewed stitches, and excessive stitch overlap. Zipper defects can also be further subdivided, while surface defects can include scratches, wear, stains, and color differences. By increasing sample diversity and annotating accuracy, more targeted and accurate machine learning models can be trained.

[0068] Defect detection models are built using deep learning algorithms, such as convolutional neural networks (CNNs). CNNs can automatically learn feature representations in images and are better able to identify complex bag images and diverse defect types. A multi-layer CNN architecture, including convolutional layers, pooling layers, and fully connected layers, is constructed and trained with a large amount of sample data, enabling the model to accurately identify the characteristic patterns of various defects. For example, in the convolutional layer, convolution kernels of varying sizes are used to extract local image features, such as edges, textures, and shapes. The pooling layer performs dimensionality reduction and compression on these features, reducing computational effort. The fully connected layer integrates and classifies the extracted features, ultimately outputting information about the defect type and location.

[0069] Cross-validation is used to evaluate trained machine learning models. Sample data is divided into training, validation, and test sets. During training, the model's parameters and structure are adjusted based on the validation set's performance metrics (such as accuracy, recall, and F1 score). For example, if the model's accuracy in detecting a certain type of defect is low, the number of samples with that type of defect can be increased or the model's network structure can be adjusted, such as increasing the depth of the convolutional layer or adjusting the step size of the pooling layer. The model can then be retrained and evaluated until it achieves satisfactory performance on the test set.

[0070] In addition to image-based defect detection, multimodal detection can be performed by combining information from other sensors. For example, when testing the stitching strength of luggage, pressure sensors can be used to detect deformation of the stitching under a certain tension. The data collected by the pressure sensors is combined with the appearance characteristics of the stitching in the image for a more comprehensive assessment of stitching defects. If the stitching appears normal in the image, but the pressure sensor detects significant deformation at a low tension, this may indicate a defect in the internal stitching. This multimodal detection approach can improve the reliability and accuracy of defect detection.

[0071] Infrared thermal imaging technology is used to detect structural defects or hidden foreign objects inside luggage. Luggage made of different materials and structures has different heat conduction characteristics when in a normal state and when defective. An infrared thermal imager is used to capture temperature distribution images of the luggage surface and compare them with normal thermal images. For example, when the presence of foreign objects or structural damage inside a luggage causes abnormal heat distribution, infrared thermal imaging can detect this discrepancy and, combined with the image detection results, further determine the location and type of the defect. This multimodal information fusion detection method overcomes the limitations of single-image detection and improves the overall quality inspection of luggage.

[0072] Result output module: used to output the test results to the user.

[0073] The output process of the result output module includes the following steps:

[0074] S1: Calculate the difference between the image and the standard image: Calculate the difference between the image and the standard image through feature matching.

[0075] S101: Color features: Calculate the color histograms of the image and the standard image, and calculate the Euclidean distance between them; if the distance exceeds a preset threshold, it means that the color features of the image and the standard image are different, and there may be a defect; in the color features of step S101, let image I and standard image I std , the color histograms are H(I) and H(I std ), Euclidean distance d of color features color The calculation formula is:

[0076]

[0077] Where n is the number of bins in the color histogram, H(I)[i] represents the value of the i-th bin in the color histogram of image I, and H(I std )[i] represents the standard image I std The value of the i-th bin in the color histogram of .

[0078] S102: Texture features: Use the local binary pattern algorithm to extract texture features from the image and the standard image, and calculate the Euclidean distance between them; if the distance exceeds a preset threshold, it means that the texture features of the image and the standard image are different, and there may be a defect; in the texture features of step S102, let image I and standard image I std , the feature vectors obtained after extracting texture features using the local binary pattern algorithm are T(I) and T(I std ), Euclidean distance d of texture features texture The calculation formula is:

[0079]

[0080] Among them, m is the dimension of the texture feature vector, T(I)[j] represents the jth element in the texture feature vector of image I, T(I std )[j] represents the standard image I std The jth element in the texture feature vector of .

[0081] S103: Shape features: The image and the standard image are converted into contour images and skeletons are extracted. The distance between the two skeletons is calculated to determine whether their shape features are the same. If the distance exceeds a preset threshold, it means that the shape features of the image and the standard image are different and there may be a defect. In the shape features of step S103, the image I and the standard image I are set to be the same. std The skeletons obtained after conversion to contour image and skeleton extraction are S(I) and S(I std ), for point P on the skeleton I (x I ,y I ) on the skeleton S(I), In the skeleton S(I std ) on the shape feature, the distance d shape The calculation formula is:

[0082]

[0083] Among them, K is the number of skeleton points selected for distance calculation, x I [k] and y I [k] represents the horizontal and vertical coordinates of the kth point on the skeleton of image I, and Represents the standard image I std The horizontal and vertical coordinates of the kth point on the skeleton.

[0084] S104: If the difference between one or more of the above three features exceeds a preset threshold, it indicates that there is a difference between the image and the standard image, and there may be a defect.

[0085] S2: Determine the defect type and location: If there is a difference between the image and the standard image, determine the defect type and location, and mark the location and range of the defect on the image.

[0086] S201: Zipper defects: Compare whether the zipper's stitching is neat, whether there are extra stitching, and whether there are extra sliders; if the zipper's stitching is not neat, or there are extra stitching, or there are extra sliders, it means that the zipper may have defects.

[0087] S202: Suture defects: Compare each suture site to see if there are loose, skewed, or overlapping sutures. If there are loose, skewed, or overlapping sutures at each suture site, it indicates that there may be suture defects.

[0088] S203: Zipper Defects: Compare each zipper part to see if there are any crooked, missing, or extra stitches. If there are any crooked, missing, or extra stitches on the zipper part, it indicates that the zipper may have defects.

[0089] S3: Surface defects: Compare each surface area for scratches, damage, or stains. If scratches, damage, or stains are present on the surface, it indicates that there may be surface defects.

[0090] S4: Output test results: The test results are output to the display screen to alert the operator; if a defect is detected, the location and type of the defect are marked; if the test result is normal, the words "no defect" are displayed; the test results can also be stored for subsequent statistical analysis and quality traceability.

[0091] Design an intuitive and detailed visual inspection result interface. The display screen not only shows the location and type of defects, but also highlights defects of different severity with different colors and icons. For example, red icons represent defects that seriously affect the use of luggage (such as complete damage to the zipper, large-area surface damage, etc.), yellow icons represent moderate defects (such as minor scratches, a small amount of loose stitching, etc.), and green icons represent minor defects or potential risks (such as surface stains, individual zippers are crooked, etc.). At the same time, you can click on the defect icon on the interface to view detailed defect information, including image details such as the size, shape, and relationship with the surrounding structure of the defect, so that operators can quickly understand the quality of the luggage and take corresponding measures.

[0092] The system can automatically generate a luggage production defect inspection report, which includes basic information about the luggage (such as model, batch, production date, etc.), inspection time, inspection results (no defects or a list of all defects by type, location, and severity), image evidence (with screenshots of defective areas attached), and information about the inspector. The inspection report can be saved in an electronic document format (such as PDF) to facilitate subsequent quality traceability and data analysis. For example, in production batch management, if a batch of luggage has many defects of the same type, the cause of the defects can be analyzed by querying the image evidence and detailed data in the inspection report, and the production process or raw material procurement can be adjusted in a timely manner to improve product quality.

[0093] In addition to displaying inspection results on the screen, an audible and visual alarm function has been added. When a severe defect is detected, a rapid alarm sounds and a flashing red light alert the operator. Moderate defects emit a gentler tone and a yellow light. Minor defects or potential risks are detected with a simple display of information on the screen, without audible or visual alarms. This alarm mechanism alerts the operator based on the severity of the defect, improving production efficiency and timely quality control.

[0094] A feedback system has been established, allowing operators to confirm test results, mark false positives, and add comments on the test result screen. If an operator deems a defect detection result inaccurate, they can mark it as a false positive and explain the reason. This feedback is collected and fed back to the machine learning model training system to optimize and improve the model. For example, if a normal decorative thread on a piece of luggage is mistakenly identified as a stitching defect, the operator can mark it as a false positive and indicate that it is a decorative thread. Based on this feedback, the system can adjust the model's criteria for stitching defects, reducing false positives and improving defect detection accuracy.

[0095] Example 2, the present invention relates to a method for implementing a bag production defect detection system, comprising the following steps:

[0096] S5: Image acquisition: Place the bag in the detection area, start the image acquisition module, take a full-scale photo of the bag, and obtain the image information of the bag.

[0097] S6: Image processing: Process the collected images, including image enhancement, denoising, edge detection and image segmentation, to improve the quality and clarity of the image and separate the various parts of the image.

[0098] S7: Defect detection: Use image processing technology and machine learning algorithms to detect defects in various parts of the luggage.

[0099] S8: Result output: The test results are output to the user in an intuitive manner, such as displaying the location and type of defects on a display screen, or issuing alarms through sound or light; at the same time, the test results can be stored for subsequent statistical analysis and quality traceability.

[0100] The embodiments disclosed in the present invention are preferred embodiments, but are not limited to them. Ordinary technicians in this field can easily understand the spirit of the present invention based on the above embodiments and make different extensions and changes. As long as they do not deviate from the spirit of the present invention, they are all within the scope of protection of the present invention.

Claims

1. A bag production defect detection system, characterized in that: include: Image acquisition module: used to collect image information of bags; Image processing module: used to process the collected images; Defect detection module: performs defect detection on bags based on the processing results of the image processing module; Result output module: used to output the test results to the user.

2. A bag production defect detection system according to claim 1, characterized in that: The image acquisition module includes at least one high-definition camera for taking all-round photos of the luggage and adjusting the parameters of the camera to ensure the quality and clarity of the image.

3. A bag production defect detection system according to claim 2, characterized in that: The image processing module includes an image enhancement submodule, an edge detection module, and an image segmentation module; Image enhancement submodule, used to improve the quality and clarity of images; Edge detection module, used to determine the edge position and contour information in the image; The image segmentation module is used to separate the various parts of the bag for individual inspection.

4. A bag production defect detection system according to claim 3, characterized in that: The image enhancement submodule improves the quality and clarity of the image by: performing histogram equalization on the image to make the grayscale distribution of the image more uniform; using an unsharp mask algorithm to sharpen the image to enhance the contrast of boundaries and edges; and reducing image noise to remove and suppress small areas.

5. The bag production defect detection system according to claim 3, characterized in that: The edge detection module determines the edge position and contour information in the image by: convolving the image with the Sobel operator to calculate the gradient magnitude and direction of each pixel; A gradient image is generated according to the gradient amplitude and the gradient image is binarized. The Hough transform is used to perform line detection on the binarized image to determine the straight lines in the image.

6. The bag production defect detection system according to claim 3, characterized in that: The image segmentation module segments the image by the following method: first, the RGB image obtained by the image processing module is converted into the HSI color space, and then the H component of the HSI color space is extracted; the maximum inter-class variance method is used to obtain the optimal threshold of the image, and the image is binarized to obtain a binary image with a triple edge combination of black, white and gray; through morphological processing, including corrosion, expansion, opening operation and closing operation operations, the image is smoothed and denoised, thereby obtaining various parts of the image.

7. A bag production defect detection system according to claim 6, characterized in that: The defect detection module uses a machine learning method to detect defects in images: a number of defect-free luggage images are collected as samples, each image represents the front, back, left, right and top surfaces, and each image includes several parts, including zippers, seams, zippers and surfaces, and the collected images are inspected.

8. The bag production defect detection system according to claim 7, characterized in that: The output process of the result output module includes the following steps: S1: Calculate the difference between the image and the standard image: Calculate the difference between the image and the standard image through feature matching; S101: Color features: Calculate the color histograms of the image and the standard image, and calculate the Euclidean distance between them; if the distance exceeds a preset threshold, it means that the color features of the image and the standard image are different, and there may be a defect; S102: Texture features: A local binary pattern algorithm is used to extract texture features from the image and the reference image, and the Euclidean distance between them is calculated. If the distance exceeds a preset threshold, it indicates that the texture features of the image and the reference image are different, indicating a possible defect. S103: Shape features: The image and the standard image are converted into contour images and skeletons are extracted. The distance between the two skeletons is calculated to determine whether their shape features are the same. If the distance exceeds a preset threshold, it indicates that the shape features of the image and the standard image are different, and there may be a defect. S104: If the difference between one or more of the above three features exceeds a preset threshold, it indicates that the image is different from the standard image and there may be a defect; S2: Determine the defect type and location: If there is a difference between the image and the standard image, determine the defect type and location, and mark the location and range of the defect on the image; S201: Zipper defects: Compare the zipper's stitching to see if it is neat, has extra stitching, or has extra sliders. If the zipper's stitching is not neat, or has extra stitching, or has extra sliders, it indicates that the zipper may be defective. S202: Suture defects: Compare each suture site to see if there are loose, skewed, or overlapping sutures. If there are loose, skewed, or overlapping sutures at each suture site, it indicates that there may be suture defects. S203: Zipper Defects: Compare each zipper part to see if there are any skewed, missing, or extra stitches. If there are any skewed, missing, or extra stitches on the zipper part, it indicates that the zipper may be defective. S3: Surface defects: Compare each surface area for scratches, damage, or stains. If scratches, damage, or stains are present, it indicates that there may be surface defects. S4: Output test results: The test results are output to the display screen to alert the operator; if a defect is detected, the location and type of the defect are marked; if the test result is normal, the word "no defect" is displayed; the test results can also be stored for subsequent statistical analysis and quality traceability.

9. The bag production defect detection system according to claim 8, characterized in that: In the color feature of step S101, the image I and the standard image I are set std , the color histograms are H(I) and H(I std ), the Euclidean distance d of the color feature color The calculation formula is: Where n is the number of bins in the color histogram, H(I)[i] represents the value of the i-th bin in the color histogram of image I, and H(I std )[i] represents the standard image I std The value of the i-th bin in the color histogram; In the texture features of step S102, it is assumed that image I and standard image I std , the feature vectors obtained after extracting texture features using the local binary pattern algorithm are T(I) and T(I std ), Euclidean distance d of texture features texture The calculation formula is: Among them, m is the dimension of the texture feature vector, T(I)[j] represents the jth element in the texture feature vector of image I, T(I std )[j] represents the standard image I std The jth element in the texture feature vector of ; In the shape feature of step S103, the image I and the standard image I are set std The skeletons obtained after conversion to contour image and skeleton extraction are S(I) and S(I std ), for point P on the skeleton I (x I ,y I ) on the skeleton S(I), In the skeleton S(I std ) on the shape feature, the distance d shape The calculation formula is: Among them, K is the number of skeleton points selected for distance calculation, x I [k] and y I [k] represents the horizontal and vertical coordinates of the kth point on the skeleton of image I, and Represents the standard image I std The horizontal and vertical coordinates of the kth point on the skeleton.

10. The method for implementing a bag production defect detection system according to claim 9, characterized in that: The following steps are involved: S5: Image acquisition: Place the bag in the detection area, start the image acquisition module, take a full-scale photo of the bag, and obtain image information of the bag; S6: Image processing: Processing the collected images, including image enhancement, denoising, edge detection and image segmentation, to improve the quality and clarity of the image and separate the various parts of the image; S7: Defect detection: Use image processing technology and machine learning algorithms to detect defects in various parts of the luggage; S8: Result output: The test results are output to the user in an intuitive manner, such as displaying the location and type of defects on a display screen, or issuing alarms through sound or light; at the same time, the test results can be stored for subsequent statistical analysis and quality traceability.