LED light bar dispensing quality detection equipment and method based on visual detection

Through the visual inspection-based LED light bar dispensing quality inspection equipment, using image processing, contour analysis and edge division compensation modules, the problem of edge missed detection or false detection caused by grayscale distribution overlap is solved, and the automated and precise detection of the dispensing area is realized, thereby improving the reliability and accuracy of the detection.

CN120689319APending Publication Date: 2025-09-23SUZHOU GOOD AUTOMATION EQUIP CO
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510808488.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

In the existing technology of LED light bar glue dispensing quality inspection, the real edge pixels are missed or misdetected due to the overlapping grayscale distribution, resulting in the edge of the glue dispensing area being cut off, resulting in misjudgment.

Method used

The visual inspection-based LED light bar dispensing quality inspection equipment includes an image processing module, a contour analysis and judgment module, and an edge segmentation and compensation module. The image processing module uses threshold segmentation to separate the dispensing area from the background area. The contour analysis and judgment module determines defects, insufficient glue, and excessive glue. The edge segmentation and compensation module adjusts edge pixels to ensure edge integrity.

Benefits of technology

It realizes automated and precise detection of the dispensing area, improves the reliability and accuracy of detection, adapts to complex scenarios, reduces computing costs, and ensures the physical integrity of the dispensing area and the robustness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120689319A_ABST
    Figure CN120689319A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of industrial big data, in particular to LED light bar dispensing quality detection equipment based on visual inspection, which comprises an image processing module, a contour analysis and judgment module and an edge division compensation module, converting the dispensing area image into a grayscale image by using an image processing algorithm, and separating a dispensing area from a background area by using a threshold segmentation method; the contour analysis and judgment module is used for judging whether the glue dispensing area has defects, less glue and more glue; the edge division compensation module adopts an edge division method to extract edge pixel points in the gray level image, if the edge pixel points in the dispensing area in the image processing module are different from the edge pixel points in the gray level image in coordinate, the edge pixel points in the dispensing area are adjusted, the image processing module provides basic segmentation, the contour analysis module realizes logic judgment, and the image processing module processes the edge pixel points in the gray level image. And the edge division compensation module corrects local errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial big data technology, and in particular to a device and method for detecting the quality of LED light bar dispensing based on visual detection. Background Art

[0002] In today's industrial manufacturing sector, with the rapid development of LED lighting technology, LED light strips, with their significant advantages such as light weight, energy saving, long life, and rich colors, have been widely used in many important fields such as indoor and outdoor decorative lighting, automotive lighting, and display backlights. In the entire production process of LED light strips, the dispensing process undoubtedly occupies a vital position. The role of dispensing covers many key aspects, including the firm fixation of components, the effective protection of circuits from external interference, the enhancement of the product's heat dissipation performance to ensure its stable operation, and the significant improvement of the product's sealing and waterproof properties. It can be said that the quality of dispensing is directly related to the electrical performance, mechanical performance, and service life of the LED light strip, and thus has a decisive impact on the product's competitiveness in the market.

[0003] The quality of glue dispensing will have a direct impact on the electrical performance, mechanical properties and service life of LED light strips, and thus affect the market competitiveness of the product. At present, in the detection of glue dispensing quality of LED light strips, since the traditional global threshold segmentation method relies on the assumption that "the grayscale distribution of the glue dispensing area and the background is significantly different", when the grayscale distribution of the two overlaps, since the core logic of the traditional global threshold is to forcibly divide the pixels of the entire image into two categories through a fixed threshold, when the grayscale distribution overlaps, the same grayscale value may exist in the glue dispensing area and the background at the same time, which will cause the pixels at the real edge to be missed because the grayscale value falls into the overlapping interval; the noise pixels in the non-edge area are misdetected because the grayscale value accidentally approaches the glue dispensing area. In the further process of glue dispensing quality detection, some pixels in the glue dispensing area will be misjudged as background pixels, resulting in the edge of the glue dispensing area being "cut off" and forming a misjudgment of "insufficient glue". In view of this, we propose a glue dispensing quality detection device and method for LED light strips based on visual detection. Summary of the Invention

[0004] The purpose of the present invention is to solve the problem that when grayscale distributions overlap, the same grayscale value may exist in both the dispensing area and the background, which will cause pixels at the real edge to be missed because the grayscale value falls into the overlapping interval.

[0005] To achieve the above objectives, the present invention provides a device for detecting the quality of LED light bar dispensing based on visual inspection, comprising an image processing module, a contour analysis and judgment module, and an edge division and compensation module, wherein:

[0006] The image processing module senses the image of the LED light strip glue area, converts the glue area image into a grayscale image using an image processing algorithm, and uses a threshold segmentation method to separate the glue area from the background area; the contour analysis and judgment module is used to determine whether there are defects, insufficient glue, or excessive glue in the glue area;

[0007] The edge division compensation module uses the edge division method to extract edge pixels in the grayscale image. If the edge pixels in the glue spotting area in the image processing module have different coordinates from the edge pixels in the grayscale image, the edge pixels in the glue spotting area are adjusted.

[0008] As a further improvement of the present technical solution, the working principle of the image processing algorithm in the image processing module is as follows: the image of the glue dot area is converted into a grayscale image, the color information is removed while retaining the true light and dark relationship in the image of the glue dot area, the brightness of the colors in the image of the glue dot area is weightedly combined, and each pixel is converted into a unique grayscale value, thereby generating a grayscale value that only reflects the brightness and darkness of the image.

[0009] The beneficial effect of the above further solution is that the image of the dispensing area is converted into a grayscale image through the image processing algorithm in the image processing module, only the light and dark relationship is retained, color interference (such as the difference between the colloid color and the substrate color) is removed, and the complexity of data processing is reduced;

[0010] Moreover, the difference in brightness and darkness in the grayscale image provides a direct basis for calculating the inter-class variance in setting the segmentation threshold, ensuring the accuracy of the global threshold segmentation. By converting it into a grayscale image, the grayscale distribution of the glue-dot area and the background is more likely to show a bimodal feature (that is, the grayscale values ​​of the two types of pixels are concentrated in different intervals), satisfying the assumption of "significant grayscale differences" in the threshold segmentation method.

[0011] On the basis of the above technical solution, the present invention can also be improved as follows.

[0012] As a further improvement of this technical solution, the threshold segmentation method in the image processing module works as follows: the grayscale value corresponding to the pixel in the grayscale image is compared with the optimal grayscale threshold. In contrast, all pixels with grayscale values ​​≤ the segmentation threshold are the dispensing area, and all pixels with grayscale values ​​> the segmentation threshold are the background area.

[0013] As a further improvement of the present technical solution, the segmentation threshold setting method is as follows: calculate the inter-class variance of the pixels corresponding to the glue area and the background area in the grayscale image, and match the optimal grayscale threshold that maximizes the inter-class variance. , count the number of times each gray value appears in the grayscale image, form a grayscale histogram, start from the lowest grayscale value, and end with the highest grayscale value, and try each optimal grayscale threshold in turn , matching the optimal grayscale threshold that maximizes the inter-class variance , as the segmentation threshold.

[0014] The beneficial effect of the above further scheme is that by traversing all possible grayscale values ​​in the grayscale histogram, calculating the inter-class variance when each value is used as the threshold in turn, and finally selecting the grayscale value that makes the inter-class variance the largest as the optimal segmentation threshold, the automatic separation of the glue spot area and the background is achieved without human intervention; the automation, precision and efficiency of the glue spot area segmentation are achieved, and its core advantages lie in strong adaptability, global optimal guarantee, low computational cost, and high synergy with subsequent modules.

[0015] On the basis of the above technical solution, the present invention can also be improved as follows.

[0016] As a further improvement of the present technical solution, the contour analysis and judgment module senses the glue spot area and calls out the edge pixels of the glue spot area, randomly selects one edge pixel as the starting pixel, and then connects the adjacent pixels in the same order. If the distance between adjacent pixels is greater than the distance threshold, and all adjacent pixels less than the distance threshold are connected, no closed contour is formed, then it is judged that there is a defect in the glue spot area. If the starting and ending coordinates of all adjacent pixels less than the distance threshold are the same after connection, and all edge pixels are accessed, then it is indicated that the glue spot area forms a closed contour, and it is judged that there is no defect in the glue spot area.

[0017] As a further improvement of this technical solution, the contour analysis and judgment module calls out all pixels of the closed contour Coordinate set, calculate the maximum vertical distance of the closed contour as the dispensing area width ;

[0018] Normal range of sensing strip width , if the dispensing area width If When the glue strip is detected, it is judged that there is multiple glues. The contour analysis and judgment module relies on the segmentation result of the image processing module to obtain edge pixels to ensure the accuracy of the basic area of ​​contour analysis, and monitors the glue discharge stability in real time through width measurement. It is especially suitable for multi-segment continuous dispensing scenarios (such as segmented dispensing of meter-level light strips) to ensure that the width of the entire glue strip is consistent.

[0019] The beneficial effect of the above-mentioned further scheme is that through the clear logic of "edge tracking-closure verification-defect judgment", the automatic detection of the physical integrity of the dispensing area is realized. Its core advantages lie in rigorous logic, strong anti-interference ability, adaptability to complex scenarios, and high linkage with the production line. The distance threshold eliminates the interference of discrete noise pixels (such as substrate stains and image noise) and only connects adjacent pixels with a spacing ≤ the threshold to ensure that the contour construction is based on the real colloid edge, which solves the efficiency and accuracy bottlenecks of traditional detection methods in judging the physical integrity of dispensing.

[0020] On the basis of the above technical solution, the present invention can also be improved as follows.

[0021] As a further improvement of this technical solution, the edge division method in the edge division compensation module works as follows:

[0022] Step 1: Filtering: Remove the grayscale image noise and retain the true features of the glue area in the grayscale image. Specifically, set the size to the neighborhood , calculate the neighborhood The average value of the inner pixels replaces the pixel value in the grayscale image;

[0023] Step 2: Use horizontal gradient kernel , vertical gradient kernel Calculate the horizontal and vertical gradients to get the gradient amplitude of the neighborhood and direction :

[0024] By The grayscale change rates in the left and right directions and the up and down directions are accumulated, and the accumulated grayscale change rates are converted into neighborhood gradient amplitudes through square root operations; the gradient direction Reflects the pixel direction in the grayscale image by calculating the pixel points in the neighborhood The ratio of the grayscale change rate in the left-right direction and the up-down direction is calculated by the inverse tangent function to obtain the angle value, which is the gradient direction.

[0025] Step 3: Non-maximum suppression: refine edge pixels and retain only the local maximum in the gradient direction;

[0026] Step 4: Double threshold algorithm: Set two thresholds, high and low. Pixels above the high threshold are determined as edge pixels, pixels below the low threshold are excluded, and pixels between the two are defined as weak edge pixels. If there are strong edge pixels in the neighborhood of the weak edge pixels, the weak edge pixels will be marked as edge pixels, otherwise the weak edge pixels will be eliminated.

[0027] As a further improvement of the present technical solution, the edge division compensation module adjusts the edge pixel points of the glue spotting area: if the edge pixel points of the glue spotting area are different from the edge pixel points in the grayscale image, the distance between the edge pixel points is calculated. If the distance is less than the distance threshold in the contour analysis and judgment module, it is judged that the edge pixel points of the glue spotting area are lost. At this time, the edge pixel points in the grayscale image whose distance is less than the distance threshold are added as the edge pixel points of the glue spotting area.

[0028] The beneficial effect of the above further scheme is that the edge division and compensation module adjusts the edge pixel points of the dispensing area by comparing the coordinate difference between the edge of the dispensing area and the real edge of the grayscale image, and realizes dynamic compensation of the edge pixels in combination with the distance threshold in the contour analysis and judgment module. In response to the edge loss problem of the global threshold segmentation of the image processing module in the grayscale overlapping scene, the edge refinement logic with local feature priority is used to accurately identify the edge pixel loss caused by threshold deviation (such as the edge point that is mistakenly judged as the background when the colloid and the background grayscale overlap), and automatically supplement the real edge pixels based on the preset distance threshold to ensure the integrity of the dispensing area contour, effectively improving the robustness of edge detection in complex scenes (such as transparent colloids and low-contrast substrates), avoiding the contour analysis and judgment module from misjudging the contour as non-closed or width measurement deviation due to edge loss, and at the same time, by reusing the distance threshold of the contour analysis and judgment module to ensure the consistency of the detection parameters, forming a collaborative closed loop of "global coarse segmentation-local refinement", and ultimately achieving sub-pixel optimization of the edge positioning accuracy of the dispensing area, significantly improving the reliability and accuracy of the dispensing quality detection of LED light strips.

[0029] On the basis of the above technical solution, the present invention can also be improved as follows.

[0030] As a further improvement of this technical solution, a method for detecting the quality of LED light strip dispensing based on visual inspection includes the following steps:

[0031] Step 1: Use image processing algorithms to convert the dispensing area image into a grayscale image, and separate the dispensing area and background area in the grayscale image;

[0032] Step 2: Determine whether there are defects, insufficient glue, or excessive glue in the dispensing area;

[0033] Step 3: Use the edge segmentation method to extract edge pixels in the grayscale image. If the edge pixels in the glue-dispensing area have different coordinates from those in the grayscale image, adjust the edge pixels in the glue-dispensing area.

[0034] In addition to the above-described objects, features and advantages, the present invention has other objects, features and advantages. The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 This is the overall module principle diagram of the present invention;

[0036] Figure 2 This is a flowchart of the working principle of the image processing module of the present invention;

[0037] Figure 3 This is a flow chart showing the working principle of the edge division compensation module of the present invention;

[0038] Figure 4 It is a flow chart of the working steps of the present invention.

[0039] The meaning of each number in the figure is:

[0040] 100, image processing module; 200, contour analysis and judgment module; 300, edge division and compensation module. DETAILED DESCRIPTION

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making any creative efforts shall fall within the scope of protection of the present invention.

[0042] refer to Figure 1-Figure 3 As shown, the LED light bar dispensing quality inspection device based on visual inspection includes an image processing module 100, a contour analysis and judgment module 200 and an edge division compensation module 300, wherein:

[0043] The image processing module 100 uses the sensing camera technology to collect the image of the LED light bar glue area, uses the image processing algorithm to convert the glue area image into a grayscale image, and uses the threshold segmentation method to separate the glue area from the background area in the grayscale image, providing a pre-processed grayscale image for subsequent contour analysis and edge refinement;

[0044] The image processing algorithm in the image processing module 100 works as follows: the image of the colored glue dot area is converted into a grayscale image, retaining the true light and dark relationship in the colored glue dot area image while removing the color information: ,in are the red, green, and blue channel values ​​of the pixels in the color dot area image, is the calculated grayscale value; thus, the three channel information of the color dispensing area image is integrated into a single grayscale value, reducing the data dimension and improving the subsequent processing efficiency;

[0045] The threshold segmentation method in the image processing module 100 works as follows: the grayscale value corresponding to the pixel in the grayscale image is compared with the optimal grayscale threshold. By contrast, the grayscale image is divided into the dispensing area and the background area; the number of occurrences of each grayscale value in the grayscale image is counted to form a grayscale histogram, starting from the lowest grayscale value (the lowest grayscale value is 0) to the highest grayscale value (the highest grayscale value is 255), and each optimal grayscale threshold is tried in turn. , and calculate the inter-class variance of the pixels corresponding to the glue area and the background area in the grayscale image (the inter-class variance reflects the average grayscale difference of the pixels corresponding to the glue area and the background area), and match the optimal grayscale threshold that maximizes the inter-class variance ; Then pass the optimal grayscale threshold Divide the grayscale image into the dispensing area and the background area: all grayscale values ​​≤ the optimal grayscale threshold The pixel is the dispensing area, and all gray values ​​are greater than the optimal gray threshold The pixels are the background area;

[0046] Calculate the inter-class variance of the dispensing area and the background area , used to measure the grayscale difference between the dispensing area and the background area. The greater the grayscale difference, the better the threshold segmentation effect. for ,in are the ratios of pixels in the dispensing area to the background area, and are the average grayscale values ​​of the dispensing area and the background area in the grayscale image respectively;

[0047] Matching the between-class variance The maximum optimal grayscale threshold , as the segmentation threshold, by automatically determining the optimal segmentation threshold, without manual intervention, the glue-dispensing area and the background can be quickly separated. Moreover, when the grayscale difference between the glue-dispensing area and the background is significant (such as black colloid with a white substrate, and the grayscale distribution has no overlap), the threshold segmentation method in the image processing module 100 can quickly and accurately complete the separation, and the detection efficiency and accuracy are excellent.

[0048] The contour analysis and judgment module 200 is used to sense the dispensing area and call out the edge pixels of the dispensing area, randomly select one edge pixel as the starting pixel, and then connect the adjacent pixels in the same order (clockwise or counterclockwise). If the distance between adjacent pixels is greater than the distance threshold, and all adjacent pixels less than the distance threshold are connected, no closed contour is formed, then it is judged that there is a defect in the dispensing area. If the starting point and the end point coordinates are the same after all adjacent pixels less than the distance threshold are connected, and all edge pixels are accessed, then it means that the dispensing area forms a closed contour, and it is judged that there is no defect in the dispensing area. Through the process of "starting point-adjacent pixel connection-contour closure verification", the accuracy of defect judgment is ensured and misjudgment of a single indicator is avoided; then the contour analysis and judgment module 200 calculates the maximum spacing of the closed contour in the vertical direction, which is the width of the dispensing area: call out the maximum spacing of all pixels of the closed contour Coordinate Set , the width of the dispensing area is ;

[0049] Normal range of sensing strip width , if the dispensing area width If When the glue strip is judged to have multiple glues, the contour analysis and judgment module 200 relies on the segmentation result of the image processing module 100 to obtain the edge pixels, ensuring the accuracy of the basic area of ​​the contour analysis, and monitoring the glue output stability in real time through width measurement, which is especially suitable for multi-segment continuous glue dispensing scenarios (such as segmented glue dispensing of meter-level light strips) to ensure that the width of the entire glue strip is consistent.

[0050] The threshold segmentation method in the image processing module 100 is based on the assumption that "there is a significant difference in the grayscale value distribution between the glue spot area and the background". The segmentation threshold is determined by global grayscale statistics (such as maximizing the inter-class variance). If the grayscale distribution of the glue spot area and the background overlap (such as 50~100 in the glue spot area and 80~180 in the background), the grayscale values ​​of the two types of pixels are mixed. If the threshold is too high, some pixels in the glue spot area (grayscale values ​​higher than the threshold) are divided into the background area, resulting in the loss of the glue spot area (such as the edge of the glue strip is cut off); if the threshold is too low, some background pixels (grayscale values ​​lower than the threshold) are divided into the glue spot area, resulting in the mixing of background noise; in order to avoid the above situation, the edge segmentation compensation module 300 uses the edge segmentation method to determine the edge pixel points in the grayscale image, and the perception image processing module 100 uses the threshold segmentation method to separate the edge pixel points corresponding to the glue spot area and the background area. If the glue spot area If the coordinates of the edge pixel points in the grayscale image are different from those of the edge pixel points in the grayscale image, the distance between the edge pixel points is calculated. If the distance is less than the distance threshold in the contour analysis and judgment module 200, it is determined that the edge pixel points in the dispensing area are lost. At this time, the edge pixel points in the grayscale image whose distance is less than the distance threshold and the corresponding edge pixel points are added as the edge pixel points of the dispensing area. The edge division and compensation module 300 extracts more accurate edge pixel points through the edge division method to address the limitations of the image processing module 100 in scenes with overlapping grayscale distributions (such as the overlap of the dispensing area 50~100 with the background 80~180), and corrects edge loss or misjudgment caused by threshold deviation. In scenes such as transparent colloids, low-contrast substrates, and uneven lighting, the real boundary is located by the local gradient features of the edge (rather than the global grayscale value), thereby solving the edge ambiguity problem caused by grayscale overlap in the image processing module 100.

[0051] The edge division method in the edge division compensation module 300 works as follows:

[0052] Step 1: Filtering: Remove grayscale image noise, improve grayscale image quality, and retain the true features of the dispensing area in the grayscale image. Specifically, set the size to the neighborhood , calculate the neighborhood Replace pixel values ​​in a grayscale image with the mean of the inner pixels: , where Grayscale image coordinates The pixel value at is the pixel value of the corresponding coordinate of the grayscale image after filtering, To set the size of the neighborhood, specifically, As the center, select Line and Neighborhood of column size;

[0053] Step 2: Use horizontal gradient kernel , vertical gradient kernel Calculate the horizontal and vertical gradients to get the gradient amplitude of the neighborhood and direction :

[0054] 、 ,in Divided into horizontal and vertical gradients, is a smoothed grayscale image to be smoothed;

[0055] Gradient amplitude Reflects the pixel intensity in the grayscale image by The grayscale change rates in the left and right directions and the up and down directions are accumulated, and the accumulated grayscale change rates are converted into neighborhood gradient amplitudes through square root operations: ;

[0056] Gradient direction Reflects the pixel direction in the grayscale image by calculating the pixel points in the neighborhood The ratio of the grayscale change rate in the left-right direction and the up-down direction reflects the relative size of the change in the up-down direction and the change in the left-right direction. The angle value calculated by the inverse tangent function is the gradient direction: ;

[0057] Step 3: Non-maximum suppression: Refine edge pixels, retain only the local maximum in the gradient direction, remove non-edge pixels, and enhance edge pixel positioning accuracy:

[0058] Perceive the gradient magnitude and gradient direction of each pixel in the neighborhood, divide the gradient direction into 4 main directions (divide the 360° gradient direction into 4 main directions according to horizontal, vertical, and two 45° oblique directions), match the front and back pixels of the gradient direction, and for the current pixel , take out the gradient amplitude of the two neighboring pixels in the gradient direction, recorded as and , compare the gradient magnitude of the current pixel and 、 :

[0059] If the gradient amplitude is the maximum value, then retain the pixel. If the gradient amplitude If it is not the maximum value, the pixel is suppressed. The above operation is performed step by step on each pixel in the grayscale image. In the final grayscale image, the edge pixels are refined into a single pixel width and the non-edge pixels are suppressed.

[0060] Step 4: Double threshold algorithm: set two thresholds, high and low. Pixels above the high threshold are determined as edge pixels, pixels below the low threshold are excluded, and pixels between the two are defined as weak edge pixels. If there are strong edge pixels in the neighborhood of the weak edge pixels, the weak edge pixels are marked as edge pixels, otherwise the weak edge pixels are eliminated. In this way, whether the weak edge pixels are edge pixels is determined based on the connectivity between the weak edge pixels and the high threshold pixels, effectively removing false edge pixels.

[0061] In the contour analysis and judgment module 200 and the edge division and compensation module 300, the distance between edge pixels and the distance between adjacent pixels are calculated in the same way. Taking the distance between adjacent pixels as an example, the corresponding calculation formula is as follows: and , then the distance : .

[0062] refer to Figure 4 As shown in the figure, the method for detecting the dispensing quality of LED light strips based on visual inspection includes the following steps:

[0063] Step 1: Use image processing algorithms to convert the dispensing area image into a grayscale image, and separate the dispensing area and background area in the grayscale image;

[0064] Step 2: Determine whether there are defects, insufficient glue, or excessive glue in the dispensing area;

[0065] Step 3: Use the edge segmentation method to extract edge pixels in the grayscale image. If the edge pixels in the glue-dispensing area have different coordinates from those in the grayscale image, adjust the edge pixels in the glue-dispensing area.

[0066] The above shows and describes the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely preferred examples of the present invention and are not intended to limit the present invention. Various changes and improvements may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and improvements fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. LED light bar dispensing quality inspection equipment based on visual inspection, characterized by: It comprises an image processing module (100), a contour analysis and judgment module (200) and an edge division and compensation module (300), wherein: The image processing module (100) senses the image of the glue spotting area of ​​the LED light strip, converts the glue spotting area image into a grayscale image using an image processing algorithm, and separates the glue spotting area from the background area using a threshold segmentation method; the contour analysis and judgment module (200) is used to judge whether there are defects, insufficient glue, or excessive glue in the glue spotting area; The edge division compensation module (300) uses an edge division method to extract edge pixel points in the grayscale image, and if the edge pixel points in the glue spotting area in the image processing module (100) have different coordinates from the edge pixel points in the grayscale image, the edge pixel points in the glue spotting area are adjusted.

2. The visual inspection-based LED light bar dispensing quality inspection device according to claim 1 is characterized in that: The working principle of the image processing algorithm in the image processing module (100) is as follows: the image of the glue dot area is converted into a grayscale image, the color information is removed while retaining the true light and dark relationship in the glue dot area image, the brightness of the colors in the glue dot area image is weightedly combined, and each pixel is converted into a unique grayscale value, thereby generating a grayscale value that only reflects the brightness and darkness of the image.

3. The visual inspection-based LED light bar dispensing quality inspection device according to claim 2 is characterized in that: The threshold segmentation method in the image processing module (100) works as follows: the grayscale value corresponding to the pixel in the grayscale image is compared with the optimal grayscale threshold. In contrast, all pixels with grayscale values ​​≤ the segmentation threshold are the dispensing area, and all pixels with grayscale values ​​> the segmentation threshold are the background area.

4. The visual inspection-based LED light bar dispensing quality inspection device according to claim 3 is characterized by: The segmentation threshold setting method is as follows: calculating the inter-class variance of pixels corresponding to the glue-dotting area and the background area in the grayscale image, matching the optimal grayscale threshold that maximizes the inter-class variance, counting the number of occurrences of each grayscale value in the grayscale image to form a grayscale histogram, starting from the lowest grayscale value and ending with the highest grayscale value, trying each optimal grayscale threshold in turn, and matching the optimal grayscale threshold that maximizes the inter-class variance as the segmentation threshold.

5. The visual inspection-based LED light bar dispensing quality inspection device according to claim 4 is characterized in that: The contour analysis and judgment module (200) senses the glue spotting area and calls out the edge pixels of the glue spotting area, randomly selects one edge pixel as the starting pixel, and then connects the adjacent pixels in the same order. If the distance between the adjacent pixels is greater than the distance threshold, and all adjacent pixels with a spacing less than the distance threshold are connected, no closed contour is formed, then it is judged that there is a defect in the glue spotting area. If the starting point and end point coordinates are the same after all adjacent pixels with a spacing less than the distance threshold are connected, and all edge pixels are accessed, then it is indicated that a closed contour is formed in the glue spotting area, and it is judged that there is no defect in the glue spotting area.

6. The visual inspection-based LED light bar dispensing quality inspection device according to claim 5, characterized in that: The contour analysis and judgment module (200) calls out all pixels of the closed contour Coordinate set, calculate the maximum vertical distance of the closed contour as the dispensing area width ; The normal range of the width of the rubber strip is sensed. If the width of the glue-dispensing area is less than the lower limit of the normal range of the width of the rubber strip, it is judged that there is less glue in the rubber strip; if the width of the glue-dispensing area is greater than the upper limit of the normal range of the width of the rubber strip, it is judged that there is more glue in the rubber strip. The contour analysis and judgment module (200) relies on the segmentation result of the image processing module (100) to obtain edge pixels to ensure the accuracy of the basic area of ​​the contour analysis, and monitors the glue-dispensing stability in real time through width measurement. It is especially suitable for multi-segment continuous glue-dispensing scenarios (such as segmented glue-dispensing of meter-level light strips) to ensure that the width of the entire rubber strip is consistent.

7. The visual inspection-based LED light bar dispensing quality inspection device according to claim 1, characterized in that: The edge division method in the edge division compensation module (300) operates as follows: Step 1: Filtering: Remove the grayscale image noise, set the neighborhood, calculate the average value of the pixels in the neighborhood to replace the pixel value in the grayscale image; Step 2: Use the horizontal gradient kernel and vertical gradient kernel to calculate the horizontal and vertical gradients to obtain the gradient amplitude and direction of the neighborhood: by accumulating the grayscale change rates of the pixels in the neighborhood in the left-right direction and the up-down direction, and converting the accumulated grayscale change rates into the neighborhood gradient amplitude through the square root operation; the gradient direction reflects the direction of the pixels in the grayscale image. By calculating the ratio of the grayscale change rates of the pixels in the neighborhood in the left-right direction and the up-down direction, the angle value calculated by the inverse tangent function is the gradient direction; Step 3: Non-maximum suppression: refine edge pixels and retain only the local maximum in the gradient direction; Step 4: Double threshold algorithm: Set two thresholds, high and low. Pixels above the high threshold are determined as edge pixels, pixels below the low threshold are excluded, and pixels between the two are defined as weak edge pixels. If there are strong edge pixels in the neighborhood of the weak edge pixels, the weak edge pixels will be marked as edge pixels, otherwise the weak edge pixels will be eliminated.

8. The visual inspection-based LED light bar dispensing quality inspection device according to claim 7, characterized in that: The edge division compensation module (300) adjusts the edge pixel points of the glue spotting area: if the edge pixel points of the glue spotting area are different from the edge pixel points in the grayscale image, the distance between the edge pixel points is calculated. If the distance is less than the distance threshold in the contour analysis judgment module (200), it is determined that the edge pixel points of the glue spotting area are missing. At this time, the edge pixel points in the grayscale image whose distance is less than the distance threshold and the corresponding edge pixel points are added as edge pixel points of the glue spotting area.

9. A method for detecting the quality of LED light bar dispensing glue based on visual inspection, applied to the device for detecting the quality of LED light bar dispensing glue based on visual inspection according to any one of claims 1 to 8, characterized in that: The following steps are involved: Step 1: Use image processing algorithms to convert the dispensing area image into a grayscale image, and separate the dispensing area and background area in the grayscale image; Step 2: Determine whether there are defects, insufficient glue, or excessive glue in the dispensing area; Step 3: Use the edge segmentation method to extract edge pixels in the grayscale image. If the edge pixels in the glue-dispensing area have different coordinates from those in the grayscale image, adjust the edge pixels in the glue-dispensing area.

Citation Information

Cited By

  • Monitor shell bonding quality detection system based on machine vision

    CN121563826A