Glue surface defect analysis method and system based on machine vision
By enhancing the segmentation of the glue surface image and designing the glue surface defect recognition model, the problem of degradation in accuracy caused by poor image quality and large feature differences when detecting glue surface defects by machine vision is solved, and the accurate identification and analysis of multiple defects of multiple glues is achieved, providing effective guidance for glue production.
Patent Information
- Application Number
- CN202510048328.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, due to the large differences in surface characteristics of different types of glue, machine vision cannot make unified judgments, and due to factors such as lighting conditions and camera angles, the accuracy of machine vision detection defects will decrease.
By enhancing the segmentation of the glue surface images, the enhancement algorithm and image segmentation algorithm are used to optimize the poor quality images, and a glue surface defect recognition model is designed to train different types of glues and defects, so that the model has good generalization ability.
The problem of low accuracy of machine vision detection caused by poor image quality is solved, and the accuracy of identification and analysis of multiple defects of multiple glues is achieved, providing effective guidance for glue production.
Smart Images

Figure CN119887729A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a glue surface defect analysis method and system based on machine vision. Background Art
[0002] Glue surface defects refer to some undesirable conditions or features that appear on the surface during the use of glue. These defects may affect the use effect and appearance of the glue. Common glue surface defects include honeycomb, whitening, oil / oil spots, pits, etc.
[0003] The basic principle of machine vision to judge the surface defects of glue is to take an image of the glue surface through a camera, transfer the image to a computer for processing and analysis, and thus identify the defects on the glue surface. The machine vision system converts the light signal into an image signal through image acquisition hardware (such as a camera, lens, and light source), and transmits it to the image processing software. The image processing software extracts the features of the target and makes corresponding judgments based on information such as pixel brightness and color distribution, and controls the on-site equipment based on the output results to realize the detection function. In the process of glue making, due to the influence of factors such as materials, equipment, and processes, defects such as bubbles, impurities, and cracks may appear on the glue surface. These defects not only affect the appearance of the product, but may also affect its performance and even cause safety hazards. Machine vision technology can identify, measure, and locate defects on the glue surface by simulating the human visual system and using a computer to collect, process, and analyze images. The advantages of sampling machine vision for detecting surface defects of glue include: non-contact detection: no damage to the glue surface. High efficiency: automated detection greatly improves the detection speed. High precision: can detect tiny defects that are difficult for humans to find. Stability: It has high detection accuracy and stability.
[0004] However, in the existing technology, due to the large differences in surface features of different types of glue, machine vision cannot make a unified judgment. In addition, factors such as lighting conditions and camera angles can affect image quality, resulting in a decrease in the accuracy of machine vision defect detection. Summary of the invention
[0005] The purpose of the present invention is to provide a glue surface defect analysis method and system based on machine vision. The method solves the problem of low machine vision detection accuracy due to poor image quality caused by lighting conditions and shooting conditions by enhancing and segmenting the glue surface image. At the same time, a glue surface defect recognition model is designed, and the glue surface defect recognition model is trained for different types of glue and different types of defects, so that the glue surface defect recognition model has good generalization ability and can detect various defects of various glues. A glue surface defect analysis method based on machine vision, comprising: Acquire glue surface image; Performing feature recognition on the glue surface image to determine whether there are defects; If a defect exists, determine the type of defect.
[0006] Preferably, after acquiring the glue surface image, the process further includes preprocessing the glue surface image, specifically: Grayscale the glue surface image; Local mean square error is used to remove noise from the glue surface image; The denoised glue surface image is segmented.
[0007] Preferably, the performing feature recognition on the glue surface image to determine whether there is a defect includes: Extract feature information of glue surface image; Inputting feature information of the glue surface image into the glue defect recognition model; The glue defect recognition model outputs the defect area of the glue surface.
[0008] Preferably, the step of extracting characteristic information of the glue surface image includes: For each edge segment in the image block, calculate the local distribution significance, which is the difference between the edge segment and other edge segments in the image block in terms of gradient value and position distribution; Compare the saliency of edge segments between different image blocks to obtain the global edge saliency; The defect features of the glue surface image are identified according to the global edge saliency.
[0009] Preferably, it also includes: The edge image is used as a guide image, and the original grayscale image is filtered using a guided filtering algorithm; Enhance the weight value of the pixel points on the edge segment; The weight value is adjusted according to the position correlation consistency of the feature area to generate a glue surface enhanced image.
[0010] Preferably, the step of performing image segmentation on the denoised glue surface image comprises: Use the Sobel operator to detect the image and calculate the gradient value and direction of the image; Performing non-maximum suppression on the image gradient value to obtain possible edge points; Use a double threshold algorithm to detect and connect edge points.
[0011] Preferably, if a defect exists, determining the type of the defect includes: Compare the defect area in each glue surface enhancement image with a plurality of standard defect features one by one; Calculate the correlation between the defect area in the glue surface enhancement image and the standard defect features; If the correlation between the defect area in the glue surface enhanced image and the standard defect feature is greater than a preset value, it is determined that the glue has a current defect.
[0012] A glue surface defect analysis system based on machine vision, comprising: An image acquisition module, used for acquiring an image of the glue surface; A first judgment module is used to perform feature recognition on the glue surface image to determine whether there is a defect; The second judgment module is used to judge the type of defect if a defect exists.
[0013] An electronic device comprises: a chip, a processor and a memory, wherein the memory is used to store computer program codes, and the computer program codes include computer instructions. When the chip executes the computer instructions, the electronic device executes a glue surface defect analysis method based on machine vision.
[0014] A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a glue surface defect analysis method based on machine vision.
[0015] The beneficial effects of the present invention are: 1. The sampling image enhancement algorithm and image segmentation algorithm of the present invention optimize images of poor quality, thereby solving the technical problem of low accuracy of machine vision identification of glue surface defects due to poor image quality; 2. The present invention sets up a glue defect recognition model, which can not only accurately identify the defective area on the glue surface, but also analyze the specific type of defect, thereby providing effective guidance for glue production. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor. Figure 1 This is a flow chart of a glue surface defect analysis method based on machine vision of the present invention; Figure 2A flow chart for preprocessing the glue surface image of the present invention; Figure 3 This is a flow chart of judging the defects of the glue surface image of the present invention; Figure 4 The figure is a schematic diagram of the hardware structure of an electronic device of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0019] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0020] In the existing technology, due to the large differences in surface features of different types of glue, machine vision cannot make a unified judgment. In addition, factors such as lighting conditions and camera angles will affect the image quality, resulting in a decrease in the accuracy of machine vision defect detection.
[0021] The sampling image enhancement algorithm and image segmentation algorithm of the present invention optimize images of poor quality, thereby solving the technical problem of low accuracy of machine vision in identifying glue surface defects due to poor image quality; the present invention sets up a glue defect recognition model, which can not only accurately identify the defective area on the glue surface, but also analyze the specific type of defect, thereby providing effective guidance for glue production.
[0022] A glue surface defect analysis method based on machine vision, reference Figure 1 ,include: S100, obtaining a glue surface image; Images of glue surfaces captured by machine vision can be achieved through a variety of technologies, including hyperspectral cameras, infrared imaging systems, 3D vision technology, and deep ultraviolet imaging. Hyperspectral cameras can cover spectrums of different wavelengths, such as near infrared (NIR), short wave infrared (SWIR), and medium wave infrared (MWIR). These wavelengths of light can be absorbed or reflected by glue, making the glue visible in the image. This technology can be used to detect different types of glue on cardboard and synthetic rubber. Infrared imaging systems use the longer wavelength of infrared light and can be used in conjunction with infrared camera lenses to present transparent colloids as black images, solving the problem of transparent colloid imaging. 3D vision technology, such as laser line scanning 3D testers, can quickly scan the morphology of the glue line of the flexible screen glue dispensing and display the 3D contour of the entire glue path. Through specific algorithms, the glue surface can be accurately found and defects can be detected. This technology can measure glue thickness, glue width, glue breakage, etc., and is compatible with hot melt glue and two-component glue of various colors. In the production process of PCB boards, transparent glue is invisible under natural light, but it is sensitive under 254nm ultraviolet light and can be identified. The deep UV camera developed using high-performance sCMOS sensors can sense the UV band for imaging, thereby detecting glue on PCB boards.
[0023] S200, performs feature recognition on the glue surface image to determine whether there are defects; Hyperspectral camera: The advantage is that it can provide rich spectral information and is suitable for the detection of a variety of materials and environments; the disadvantage is that the equipment cost is high and the operation is complicated. Infrared imaging system: The advantage is that it can penetrate transparent materials and is suitable for the detection of transparent glue; the disadvantage is that it is sensitive to ambient temperature and easily affected by external interference. 3D vision technology: The advantage is that it can provide accurate three-dimensional information and is suitable for the detection of complex shapes; the disadvantage is that the equipment is expensive and the operation is complicated. Deep ultraviolet imaging: The advantage is that it is sensitive to ultraviolet light of a specific wavelength and is suitable for the detection of specific materials; the disadvantage is that the equipment and technology requirements are high. Therefore, the present invention makes the defects of glue as features, and the sampling glue defect recognition model directly identifies the defect features, so that it can directly determine whether there are defects without relying on expensive equipment and an excellent environment.
[0024] S300: If a defect exists, determine the type of the defect.
[0025] When machine vision is judging the surface defects of glue, the types of defects that can be detected include: uneven size of glue dots, position offset, missing dots, multiple dots, bubbles, broken glue strips, uneven width of glue strips, etc. . The steps for machine vision to judge the surface defects of glue include: Image capture and analysis : The machine vision system captures images of the dispensing process through a camera, including the start, flow, contact and end of the glue. These images are transferred to the computer and analyzed by special image processing software . Image preprocessing : The captured images are preprocessed, including denoising, enhancement, binarization and other operations, so as to better extract the dispensing features. Then, the dispensing area is separated from the background through image segmentation technology, and features such as the outline and shape of the dispensing area are extracted . Feature extraction and classification : The extracted features are trained and learned using machine learning algorithms to construct a dispensing defect classifier. This classifier can automatically classify and judge new dispensing images and identify whether there are defects in them, such as insufficient dispensing, excessive dispensing, dispensing offset and other problems . Parameter setting and optimization: During the detection process, you can adjust the sensitivity and accuracy of the classifier by setting thresholds and parameters to achieve the best detection effect. At the same time, by continuously optimizing algorithms and models, you can improve the speed and accuracy of detection.
[0026] Machine vision uses advanced image processing technology to achieve high-precision inspection of products. It can accurately identify and analyze small defects and complex shapes. Compared with traditional manual inspection, machine vision has higher accuracy and efficiency, avoiding omissions and misjudgments in manual inspection. The machine vision system can be linked with other equipment on the production line to achieve automated production and further improve production efficiency. Machine vision not only performs well in dispensing defect detection, but can also be applied to the detection of various defects such as scratches, stains, dents, protrusions, holes, cracks, uneven colors, and color differences on the surface of products.
[0027] Preferably, reference Figure 2 , S100, after obtaining the glue surface image, it also includes preprocessing the glue surface image, specifically: S110, grayscale processing of the glue surface image; Grayscale processing refers to the process of converting a color image into a grayscale image. A grayscale image is a process of converting a color image into a black and white image by calculating the brightness values of the three color channels of red (R), green (G), and blue (B).
[0028] S120, using local mean square error to remove noise from the glue surface image; The local mean square error denoising algorithm identifies flat areas and edge areas by calculating the mean and variance of local areas of the image. In flat areas, the local variance is small, which means that the pixel values in the area are similar, so the noise can be removed by the local mean; while in the edge area, the local variance is large, which means that the pixel values in the area are very different, so the original pixel values are retained to maintain the edge information. This method can retain the edge information of the image while removing noise. When processing images, the local mean square error method adopts different processing strategies for flat areas and edge areas. In flat areas, since the gray value changes little and the local mean square error is small, the noise is mainly removed by the local average value; while in the edge area, since the gray value changes greatly and the local mean square error is large, the original pixel value is retained, thereby retaining the edge information. Although traditional spatial filters such as mean filtering can effectively remove noise, they will cause image blur, especially the loss of edge information is more serious. The local mean square error method distinguishes between flat areas and edge areas, filters the flat areas, and retains the original pixel values in the edge areas, thereby reducing image blur. After removing noise through the local mean square error method, the visual effect and detail retention of the image will be improved. Especially when processing images of glue surfaces, this method can effectively remove noise caused by uneven glue application or bubbles, making the image clearer.
[0029] S130, performing image segmentation on the denoised glue surface image.
[0030] Image segmentation is a technique for dividing an image into non-overlapping regions with their own characteristics. These characteristics can be grayscale, color, texture, etc. The purpose of image segmentation is to separate the target in the image from the background, so that the pixels in the same region have certain common characteristics, while the characteristics between different regions are significantly different.
[0031] Preferably, S200, performing feature recognition on the glue surface image to determine whether there is a defect includes: S210, extracting feature information of the glue surface image; The characteristic information of the glue surface image includes: Geometric features: including position and direction, perimeter, area, major axis and minor axis, distance (such as Euclidean distance, cosine distance), etc. Shape features: Through geometric morphological analysis (such as Blob analysis), rectangularity, circularity, invariant moments, eccentricity, polygon description, curve description, etc. can be extracted. Histogram features: The statistical characteristics of the image are described by statistical features (such as mean, variance, energy, entropy, L1 norm, L2 norm, etc.). It has translation and rotation invariance, is insensitive to the precise spatial distribution of color pixels, and is often used for surface detection and defect recognition. Color features: including color histograms and color moments, suitable for describing the surface properties of images or image areas, and are insensitive to changes in the direction, size, etc. of images or image areas.
[0032] S220, inputting feature information of the glue surface image into a glue defect recognition model; S230, the glue defect recognition model outputs the defect area of the glue surface.
[0033] The glue defect recognition model can quickly process the feature information of the glue surface image, match the feature information of the surface image with the defect features, and quickly output the glue surface defect area.
[0034] The glue defect recognition model can more accurately identify defects on the glue surface through big data training. Compared with traditional digital image processing methods, the neural network model can process more complex image features and reduce misjudgments caused by factors such as lighting and shadows, thereby improving detection accuracy. The glue defect recognition model can be integrated into the automated production line to achieve real-time detection. This not only reduces the labor intensity of manual detection, but also improves production efficiency and ensures quality control in the production process. Defect detection through the glue defect recognition model can reduce dependence on manual labor and reduce labor costs. The automated detection system can work 24 hours a day, reducing the impact of human factors on the detection results. The glue defect recognition model can adapt to different production environments and process conditions through training, and has good versatility for different glue types and defect types. This allows it to play a good role in a variety of production scenarios. The glue defect recognition model can not only identify the existence of defects, but also classify and locate defects. Through defect classification, different types of defects (such as bubbles, broken glue strips, etc.) can be distinguished, and through defect location, the location of the defect can be accurately marked for subsequent processing.
[0035] Preferably, S210, extracting feature information of the glue surface image includes: S211, for each edge segment in the image block, calculating the local distribution significance, that is, the difference between the edge segment and other edge segments in the image block in terms of gradient value and position distribution; Local distribution saliency refers to the degree of prominence of a region or feature in an image in image processing. It is usually used to describe the prominence of a local region in an image relative to other regions, and is often used in tasks such as object detection and image segmentation.
[0036] In an embodiment of the present invention, the glue surface image is decomposed into multiple local areas or patches, using 8x8 or 16x16 pixel blocks. Feature extraction is performed on each patch, for example, using SIFT, SURF and other algorithms to extract local features. The saliency of each patch is calculated by comparing its features with the features of other patches.
[0037] S212, comparing the saliency of edge segments between different image blocks to obtain a global edge saliency; The local saliency is combined with the global saliency to form the final saliency map.
[0038] S213, identifying defect features of the glue surface image according to the global edge saliency.
[0039] Global edge saliency is used to measure the saliency of edge information in an image, and is used to evaluate the strength and importance of edge information in an image. It is often used in tasks such as target detection and image segmentation. Global edge saliency can help identify key areas and targets in an image. In the embodiment of the present invention, the area with high saliency is the defect feature in the glue surface image.
[0040] Preferably, it also includes: The edge image is used as a guide image, and the original grayscale image is filtered using a guided filtering algorithm; Image filtering refers to a method of suppressing the noise of a target image while preserving the image's detailed features as much as possible. It is an indispensable operation in image preprocessing, and the quality of its processing will directly affect the effectiveness and reliability of subsequent image processing and analysis. Through filtering, random noise in the image can be effectively removed, making the image clearer. While removing noise, the detailed features of the image, such as edges and textures, are preserved as much as possible. This provides a better foundation for subsequent image analysis and processing, ensuring the accuracy and reliability of the analysis results.
[0041] Enhance the weight value of the pixel points on the edge segment; The main function of enhancing the weight value of the pixel points on the edge segment is to highlight the edge features in the image, making the edge of the image clearer and facilitating subsequent image analysis and processing. In image processing, edge enhancement is achieved by highlighting the areas where the grayscale value changes dramatically in the image. These areas usually correspond to the boundaries or details of the object. Edge enhancement technology can detect edges through first-order derivatives or second-order derivatives. Commonly used operators include Sobel operator and Laplace operator. The basic principle of edge detection is to identify edges by calculating the gradient amplitude and direction of each pixel in the image. The gradient amplitude indicates the speed of pixel change, while the direction indicates the direction of the edge. By setting the threshold, it is possible to determine which points are edge points, thereby performing edge enhancement.
[0042] The weight value is adjusted according to the position correlation consistency of the feature area to generate a glue surface enhanced image.
[0043] The purpose of adjusting the weight value is mainly to optimize the glue surface image and ensure that the glue surface image performs well in terms of position correlation consistency of different feature areas.
[0044] Preferably, performing image segmentation on the denoised glue surface image includes: Use the Sobel operator to detect the image and calculate the gradient value and direction of the image; The template in the X direction is expressed as: ; The template in the y direction is expressed as: ; The matrix representation of the glue surface image K is: ; Then the convolution value Gx in the X direction and the convolution value Gy in the Y direction are: Gx=(a2+2a4+a7)-(a0+2a3+a5); Gx=(a2+2a4+a7)-(a0+2a3+a5); Then the gradient value of the glue surface image is: ; The orientation angle of the glue surface image is: ; Perform non-maximum suppression on the image gradient value to obtain possible edge points; Use a double threshold algorithm to detect and connect edge points.
[0045] Dual threshold algorithm is used for edge detection and image segmentation. The algorithm distinguishes the edges in the image by setting two thresholds (high threshold and low threshold). The high threshold is usually set to 2 to 3 times the low threshold. Each pixel of the image is traversed and the comparison result between its gradient value and the two thresholds is used to determine whether the point is an edge point.
[0046] Preferably, reference Figure 3 , S300, if there is a defect, the type of defect is determined to include: S310, comparing the defective area in each glue surface enhancement image with a plurality of standard defect features one by one; S320, calculating the correlation between the defect area in the glue surface enhancement image and the standard defect feature; ; ; ; ; is the i-th defect feature, is the bubble defect parameter, is the correlation between the i-th defect feature and the bubble defect parameter, is the pit defect parameter, is the correlation between the i-th defect feature and the pit defect parameters, is the crack defect parameter, is the correlation between the i-th defect feature and the crack defect parameters, is the impurity defect parameter, is the correlation between the i-th defect feature and the impurity defect parameter. Correlation detection is used to measure the degree of association between two or more variables, and quantifies the linear relationship or rank correlation between variables by calculating correlation coefficients (such as Pearson correlation coefficient, Spearman rank correlation coefficient, etc.).
[0047] S330: If the correlation between the defect area in the glue surface enhanced image and the standard defect feature is greater than a preset value, it is determined that the glue has a current defect.
[0048] The greater the correlation between the defect area in the glue surface enhancement image and the standard defect feature, the stronger the relationship between the two variables is. When the correlation between the defect area in the glue surface enhancement image and the standard defect feature exceeds the preset value, it means that the glue has a current defect.
[0049] Example 2 A glue surface defect analysis system based on machine vision, comprising: An image acquisition module, used for acquiring an image of the glue surface; The first judgment module is used to perform feature recognition on the glue surface image to determine whether there are defects; The second judgment module is used to judge the type of defect if a defect exists.
[0050] Example 3 An electronic device includes: a chip, a processor and a memory, the memory is used to store computer program codes, the computer program codes include computer instructions, and when the chip executes the computer instructions, the electronic device executes a glue surface defect analysis method based on machine vision.
[0051] refer to Figure 4 , the electronic device 2 includes a processor 21, a memory 22, an input device 23, and an output device 24. The processor 21, the memory 22, the input device 23, and the output device 24 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present invention. It should be understood that in various embodiments of the present invention, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0052] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present invention.
[0053] The memory 22 can be used to store computer program instructions and various computer program codes including program codes for executing the scheme of the present invention. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read only memory (EPROM), or portable read only memory (CD-ROM), which is used for related instructions and data.
[0054] The input device 23 is used to input data and / or signals, and the output device 24 is used to output data and / or signals. The output device 24 and the input device 23 may be independent devices or an integrated device.
[0055] Example 4 A computer-readable storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a glue surface defect analysis method based on machine vision.
[0056] The sampling image enhancement algorithm and image segmentation algorithm of the present invention optimize images of poor quality, thereby solving the technical problem of low accuracy of machine vision in identifying glue surface defects due to poor image quality; the present invention sets up a glue defect recognition model, which can not only accurately identify the defective area on the glue surface, but also analyze the specific type of defect, thereby providing effective guidance for glue production.
[0057] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A glue surface defect analysis method based on machine vision, characterized in that: include: Acquire glue surface image; Performing feature recognition on the glue surface image to determine whether there are defects; If a defect exists, determine the type of defect.
2. The method for analyzing glue surface defects based on machine vision according to claim 1, characterized in that: After obtaining the glue surface image, the process further includes preprocessing the glue surface image, specifically: Grayscale the glue surface image; Local mean square error is used to remove noise from the glue surface image; The denoised glue surface image is segmented.
3. The method for analyzing glue surface defects based on machine vision according to claim 1, characterized in that: The performing feature recognition on the glue surface image to determine whether there is a defect includes: Extract feature information of glue surface image; Inputting feature information of the glue surface image into the glue defect recognition model; The glue defect recognition model outputs the defect area of the glue surface.
4. The method for analyzing glue surface defects based on machine vision according to claim 3, characterized in that: The feature information of the glue surface image extracted includes: For each edge segment in the image block, calculate the local distribution significance, which is the difference between the edge segment and other edge segments in the image block in terms of gradient value and position distribution; Compare the saliency of edge segments between different image blocks to obtain the global edge saliency; The defect features of the glue surface image are identified according to the global edge saliency.
5. The method for analyzing glue surface defects based on machine vision according to claim 4, characterized in that: Also includes: The edge image is used as a guide image, and the original grayscale image is filtered using a guided filtering algorithm; Enhance the weight value of the pixel points on the edge segment; The weight value is adjusted according to the position correlation consistency of the feature area to generate a glue surface enhanced image.
6. The method for analyzing glue surface defects based on machine vision according to claim 2, characterized in that: The image segmentation of the denoised glue surface image comprises: Use the Sobel operator to detect the image and calculate the gradient value and direction of the image; Performing non-maximum suppression on the image gradient value to obtain possible edge points; Use a double threshold algorithm to detect and connect edge points.
7. The method for analyzing glue surface defects based on machine vision according to claim 5, characterized in that: If there are defects, the types of defects include: Compare the defect area in each glue surface enhancement image with a plurality of standard defect features one by one; Calculate the correlation between the defect area in the glue surface enhancement image and the standard defect features; If the correlation between the defect area in the glue surface enhanced image and the standard defect feature is greater than a preset value, it is determined that the glue has a current defect.
8. A glue surface defect analysis system based on machine vision, characterized in that: include: An image acquisition module, used for acquiring an image of the glue surface; A first judgment module is used to perform feature recognition on the glue surface image to determine whether there is a defect; The second judgment module is used to judge the type of defect if a defect exists.
9. An electronic device, characterized in that: include: A chip, a processor and a memory, wherein the memory is used to store computer program codes, wherein the computer program codes include computer instructions, and when the chip executes the computer instructions, the electronic device executes a glue surface defect analysis method based on machine vision as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes a glue surface defect analysis method based on machine vision as described in any one of claims 1 to 7.
Citation Information
Cited By
Glue smearing defect detection method and system based on image processing
CN120635096A
Image Processing-Based Method and System for Detecting Defects in Adhesive Application
CN120635096B
Code nail doubling gluing defect detection method and system based on machine vision
CN121164292A
Ring main unit sealing element aging identification method and system
CN121438283A