Edge defect detection method for liquid crystal panels
Through line scanning cameras and image processing technology, automated detection of edge defects of LCD panels is achieved, solving the problems of traditional low detection efficiency and missed detection, and improving detection accuracy and production stability.
Patent Information
- Application Number
- CN202510839126.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-06-23
AI Technical Summary
Traditional artificial visual and contact detection of LCD panel edge defects is inefficient and has high risk of mis-checking and missing detection, making it difficult to meet the needs of modern high-precision manufacturing.
The line scanning camera is used to scan the edge of the LCD panel, and the positioning and search frames are used to locate the edge positions. It combines detection frames of different defect types for automated detection, including identification of collapsed edges, black dots, nodules and corner defects. It is spliced and feature extraction through image processing technology to achieve automated detection.
The accuracy of defect detection is improved to 95%-99%, reducing human errors, and ensuring the quality and production stability of LCD panel products.
Smart Images

Figure CN120355710B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a method for detecting edge defects of a liquid crystal panel. Background Art
[0002] Liquid crystal panels are widely used in consumer electronics, industrial displays, and automotive electronics, and their quality directly impacts the performance and user experience of end products. During production, large-scale LCD panels undergo precise cutting processes, which inevitably damage the glass surface. However, during the cutting process, mechanical stress, machining errors, or environmental factors can cause defects such as microcracks, notches, and chipping at the glass edges, impacting subsequent assembly and product quality. Therefore, after cutting, LCD panels undergo rigorous edge inspection to ensure dimensional accuracy, edge integrity, and surface quality.
[0003] Traditional glass edge inspection mainly relies on manual visual inspection or simple contact measurement methods. These methods are not only inefficient, but also have the risk of false detection and missed detection, and cannot meet the needs of modern high-precision manufacturing. Summary of the Invention
[0004] The technical problem to be solved by the present invention is that manual or contact detection methods are inefficient and have a high risk of false detection and missed detection. The present invention provides a method for edge defect detection of liquid crystal panels, which can achieve automated and standardized detection of liquid crystal panel edges.
[0005] The technical solution adopted by the present invention to solve the technical problem is: a method for detecting edge defects of a liquid crystal panel, comprising the following steps:
[0006] S1, scanning the edge of the liquid crystal panel using a line scan camera to obtain an image of the liquid crystal panel;
[0007] S2, using a positioning frame to locate the edge position of the liquid crystal panel in the liquid crystal panel image, using a search frame to search for a Mark point in the liquid crystal panel image; and calling out detection frames of different defect types;
[0008] S3, using the detection frames of different defect types to detect the edge of the liquid crystal panel image to obtain a defect detection result;
[0009] S4. Display the defect detection result in the liquid crystal panel image and send it to the machine.
[0010] In one embodiment, step S1 includes:
[0011] S11, scanning the edge of the liquid crystal panel using the line scan camera to obtain a plurality of image segments;
[0012] S12, pre-processing the plurality of image segments;
[0013] S13: Create a blank canvas and stitch the pre-processed image segments together to obtain a complete liquid crystal panel image.
[0014] In one embodiment, the splicing process of step S13 includes:
[0015] Assign an ID to each of the image segments according to the scanning sequence, which are respectively recorded as 、 ,..., , n represents the number of image segments; the size of the image segment is W×H n , W represents the width of the image segment, H n Indicates the height of the nth image fragment;
[0016] Set the maximum overlap height between two adjacent image segments , crop the previous image segment The image area at the bottom with height h , for the current image segment Perform sliding window processing, each sliding height is h, and the image fragment The image area captured by the middle sliding window With the image area Perform overlapping area matching, y represents the dynamic variable of the actual matching overlapping height during the sliding window processing, h [0, ];
[0017] Set the overlap matching evaluation index , find the evaluation index Maximized ,
[0018] ,
[0019] in, Indicates the sliding offset, represents the area formed by the bottom h vertical rows and horizontal x columns in the i-1th image segment, represents the grayscale mean of the i-1th image segment within the sliding window, Indicates the number of pixels from the i-th image segment The row starts from the area formed by the vertical h rows and horizontal x columns. Represents the grayscale mean of the i-th image segment in the sliding window;
[0020] Determining the optimal slide offset After that, the i-1th image segment is completely retained and the i-th image segment is removed from the The line starts to be spliced with the i-1th image segment to obtain the spliced image .
[0021] In one embodiment, the detection frames of different defect types include: chipped edge inner frame, black spot inner frame, excess material outer frame, and broken corner frame, wherein:
[0022] The edge chipping inner frame is used to detect edge chipping defects on the edge of the liquid crystal panel;
[0023] The black dot inner frame is used to detect black dot defects on the edge of the liquid crystal panel;
[0024] The excess material frame is used to detect whether there is residual material at the edge of the liquid crystal panel;
[0025] The broken corner frame is used to detect broken corner defects on the edge of the liquid crystal panel.
[0026] In one embodiment, the positioning frame is used to locate the starting point and the ending point of the edge area of the liquid crystal panel, and the positioning frame contains a cross mark point;
[0027] The search box is used to frame the upper left corner area and the lower left corner area of the edge of the liquid crystal panel, and the positioning box is used to locate the cross mark point in the upper left corner area and the lower left corner area;
[0028] The positioning process of the positioning frame includes:
[0029] Template training: manually select the cross mark area in the sample image and crop it to obtain the positioning template image , Is the template image at position Grayscale value, where a represents the horizontal coordinate of the image, b represents the vertical coordinate of the image, the size of the template image is w*×h*, w* represents the width, h* represents the height, calculate the positioning template image Gray mean ;
[0030] Template matching, on the LCD panel image to be detected, matching is performed in the form of a sliding window with a window size of w*×h*. The area selected by the sliding window is matched with the positioning template image. Perform normalized cross-correlation to calculate the matching score , the matching score Highest regional position As the cross mark point area.
[0031] In one embodiment, the process of detecting material defects includes:
[0032] The detection area is determined in the image of the liquid crystal panel to be detected using the outer frame of the excess material, and a convolution kernel of size M×N is used to slide through the detection area. The grayscale mean of each sliding traversal is calculated, and the grayscale mean is compared with a preset threshold. If the grayscale mean is greater than the preset threshold, it indicates that there is residual material there.
[0033] In one embodiment, the process of detecting edge chipping defects and corner broken defects includes:
[0034] Binarize the image of the liquid crystal panel to be inspected from a grayscale image to a black and white image;
[0035] Performing dilation processing on the black and white image to fill the gap, and then performing erosion processing on the black and white image to remove noise and isolated pixels;
[0036] Mark all independent foreground areas in the black and white image as different connected blocks, and connect the connected blocks;
[0037] Feature extraction is used to determine whether there are edge collapse defects and corner broken defects.
[0038] In one embodiment, step S12 includes:
[0039] Converting the image segment into a grayscale image and performing enhancement processing on the grayscale image;
[0040] Performing histogram equalization processing on the grayscale image to enhance image brightness;
[0041] The grayscale image is subjected to denoising, grayscale stretching and filtering.
[0042] The beneficial effect of the present invention is that the accuracy of the present invention in automatically identifying defects in liquid crystal panels reaches 95%-99%, which is a huge improvement compared to traditional manual visual inspection methods. It not only improves detection efficiency, but also reduces human errors, thereby ensuring the production quality and production stability of liquid crystal panel products. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The present invention will be further described below with reference to the accompanying drawings and examples.
[0044] Figure 1 It is a flow chart of the edge defect detection method of the liquid crystal panel of the present invention.
[0045] Figure 2 Schematic diagram of an image segment obtained by scanning with a line scan camera of the present invention.
[0046] Figure 3 Schematic diagram of matching overlapping parts of image segments according to the present invention.
[0047] Figure 4Schematic diagram of the search box and cross mark points of the present invention.
[0048] Figure 5 Schematic diagram of edge collapse defect of the liquid crystal panel of the present invention.
[0049] Figure 6 Schematic diagram of a broken corner defect at the edge of a liquid crystal panel of the present invention.
[0050] Figure 7 Schematic diagram of a material defect at the edge of a liquid crystal panel (residual material at the edge) according to the present invention.
[0051] Figure 8 Schematic diagram of black spot defects at the edge of the liquid crystal panel of the present invention.
[0052] Figure 9 It is a schematic diagram of the linkage between the detection frame position and the positioning starting point of the present invention.
[0053] Figure 10 Schematic diagram of the trapezoidal edge of the present invention.
[0054] Figure 11 Schematic diagram of the arc-shaped edge of the present invention.
[0055] Figure 12 It is a schematic diagram of the triangular broken corner frame of the present invention. DETAILED DESCRIPTION
[0056] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0057] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, features defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.
[0058] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0059] like Figure 1 As shown, the edge defect detection method of the liquid crystal panel of the present invention includes the following steps: S1. Scanning the edge of the liquid crystal panel using a line scan camera to obtain a liquid crystal panel image. S2. Locating the edge position of the liquid crystal panel in the liquid crystal panel image using a positioning frame, searching for mark points in the liquid crystal panel image using a search frame; and retrieving detection frames for different defect types. S3. Detecting the edge of the liquid crystal panel image using the detection frames for different defect types to obtain defect detection results. S4. Displaying the defect detection results in the liquid crystal panel image and sending them to the machine.
[0060] It should be noted that the line scan camera uses a DALSA high-resolution (8k / line) line scan camera, which can continuously scan the edge of the LCD panel along its direction of motion. For example, the line scan camera is mounted on one side of the machine. The LCD panel to be inspected is transported to the inspection position by a conveyor mechanism, where the line scan camera then takes a picture of the panel edge. During the scanning process, the LCD panel moves, while the line scan camera remains stationary. LCD panels are generally rectangular. Some panels only require inspection of one long edge, while others require inspection of one long edge and one short edge. In the case of inspection of one long edge and one short edge, the short edge is scanned first, then the LCD panel is rotated 90 degrees before scanning the long edge. Because the scanning length of a line scan camera is limited by the total number of triggered lines and the pixel pitch per line, the scanned image is segmented and does not capture a complete image of a single edge of the LCD panel. Therefore, multiple image segments are stitched together before defect detection.
[0061] like Figures 2 to 3 As shown, step S1 includes: S11, using a line scan camera to scan the edge of the liquid crystal panel to obtain multiple image segments; S12, preprocessing the multiple image segments; S13, creating a blank canvas, and splicing the preprocessed multiple image segments to obtain a complete liquid crystal panel image.
[0062] The preprocessing process includes converting the image segments into grayscale images and enhancing them to improve contrast. Histogram equalization is performed on the grayscale images to enhance image brightness. For example, the number of occurrences of each grayscale value is counted, and then the histogram is equalized to make the grayscale values of the pixels more evenly distributed, thereby enhancing image brightness. Denoising, grayscale stretching, and filtering are performed on the grayscale images. For example, calculating the average value of the image pixels reduces image noise, enhancing image quality and making it more suitable for subsequent edge detection, morphological processing, and other operations. Grayscale stretching involves first calculating the maximum and minimum grayscale values of the image, and then mapping the grayscale values of all pixels to the range of 0-255. This enhances the overall contrast of the image, making dark areas clearer and bright areas more prominent, thereby improving visual quality. Mean filtering involves averaging the values of neighboring pixels to smooth the image. Preprocessing the image segments can make the image clearer and its features more prominent.
[0063] The created canvas parameter settings include: Width, set to the width required after the LCD panel scans the entire image; Height, set to the height required after the LCD panel scans the entire image; Type, consistent with the image format obtained by Image Retrieve (usually 8-bit or 24-bit); Initial Value, set to black.
[0064] The stitching process of step S13 includes: assigning IDs to each image segment according to the scanning sequence, which are respectively recorded as 、 ,..., , n represents the number of image segments; the size of the image segment is W×H n , W represents the width of the image segment, H n Indicates the height of the nth image segment. Sets the maximum overlap height between two adjacent image segments. (For example, it can be set to 500 lines), crop the previous image segment The image area at the bottom with height h , for the current image segment Perform sliding window processing, each sliding height is h, and the image fragment The image area captured by the middle sliding window With the image area Perform overlapping area matching, y represents the dynamic variable of the actual matching overlapping height during the sliding window processing, h [0, ] Set the overlap matching evaluation index. , find the evaluation index Maximized , The calculation formula is:
[0065] ,
[0066] in, Indicates the sliding offset, represents the area formed by the bottom h vertical rows and horizontal x columns in the i-1th image segment, represents the grayscale mean of the i-1th image segment within the sliding window, Indicates the number of pixels from the i-th image segment The row starts from the area formed by the vertical h rows and horizontal x columns. Represents the grayscale mean of the i-th image segment in the sliding window. Determine the optimal sliding offset After that, the i-1th image segment is completely retained and the i-th image segment is removed from the The line starts to be spliced with the i-1th image segment to obtain the spliced image .
[0067] It should be noted that since the line scan camera scans line by line, the width of the image segments obtained is the same, but the height of the image segments may be the same or different. The height of the image segments can be reflected by the number of scanned lines. In order to prevent missed scans, part of the scanned image segment will be repeated with the previous image segment. In order to improve the accuracy of subsequent defect detection, the repeated parts need to be processed when stitching the images. For example, taking two image segments as an example, they are recorded as image segments. (size W×H1) and image fragments (size is W×H2), image fragments can be understood The bottom of the image fragment There will be some overlap at the top. The last h rows at the bottom (recorded as image area ), set the height of the sliding window to h rows, and use the sliding window to select the image segments Starting from the top, each time we intercept h rows (recorded as image area ), the offset of each sliding window is For example, the first time, we start to intercept h rows from the first row, and the second time, we start from the The line starts to intercept h, Less than . The image area captured each time With the image area When matching, set the overlap matching evaluation index , The larger the value, the smaller the image area. ) and image area The higher the overlap. , W represents the width of the image region (number of columns), h represents the height of the image region involved in the calculation (number of rows), x represents the xth horizontal column of the image region, and y represents the yth vertical row of the image region. Find The largest value, and then the complete image fragment With image fragments No. Line (here is the best value) to start splicing and get the final LCD panel image .
[0068] After obtaining the LCD panel image, defect detection can be performed, such as Figures 5 to 8 As shown in the figure, the most common defects during LCD panel manufacturing include edge chipping, black spot defects, excess material defects, and broken corner defects. Each defect has a different form, so different inspection frames are required for detection. The inspection frames for different defect types include: inner frame for edge chipping, inner frame for black spot defects, outer frame for excess material defects, and broken corner frame. The inner frame for edge chipping is used to detect edge chipping defects; the inner frame for black spot defects is used to detect black spot defects; the outer frame for excess material defects is used to detect residual material at the edge of the LCD panel; and the broken corner frame is used to detect broken corner defects at the edge of the LCD panel.
[0069] Since the LCD panel image contains not only the edge of the LCD panel but also the background color, which is not part of the detection area, the positioning frame and search frame are needed to search and locate the edge of the LCD panel during detection. Figure 4 As shown, the search box is mainly used to select the upper left corner area and the lower left corner area of the liquid crystal panel in the image. A cross mark point is provided at the edge of the liquid crystal panel in the liquid crystal panel image. The positioning box can be used to locate the cross mark point in the area selected by the search box to determine the edge position of the liquid crystal panel. It can be understood that the edge of the liquid crystal panel refers to the edge area, not simply the edge line. The cross mark point can be set at the upper and lower parts of the edge of the liquid crystal panel, the upper cross mark point is recorded as the starting point, and the lower mark point is recorded as the end point. Matching and positioning are performed in the area framed by the search box through the positioning box. For example, the positioning process of the positioning box includes: template training, manually selecting the cross mark point area in the sample image, and cropping to obtain the positioning template image , Is the template image at position Grayscale value, where a represents the horizontal coordinate of the image, b represents the vertical coordinate of the image, the size of the template image is w* (width) × h* (height), calculate the positioning template image Gray mean , Indicates the location Gray value at the location. Template matching, on the LCD panel image to be detected, matching is performed in the form of a sliding window with a window size of w*×h*. The area selected by the sliding window is matched with the positioning template image. Perform normalized cross-correlation (NCC) to calculate the matching score , the matching score Highest regional position As the cross mark point area.
[0070] For example, let the current sliding window be at the top corner , the grayscale mean of the area selected by the sliding window is , matching score , the best position . Matching points The value range is [-1, 1]. The closer the value is to 1, the higher the matching degree. Once the positioning frame matches the cross mark point of the edge area, the edge position can be located.
[0071] In this embodiment, the starting and ending positions of the outer frame of the quotation material, the inner frame of the broken edge, and the inner frame of the black dots are linked to the starting and ending points of the positioning frame. When the starting and ending points are changed, the starting and ending positions of the outer frame of the quotation material, the inner frame of the broken edge, and the inner frame of the black dots will also change accordingly (e.g. Figure 9 As shown). This can significantly improve the efficiency of inspection. In addition, by calculating the distance between the starting point and the end point, the distance offset between the outer frame of the material, the inner frame of the broken edge, the inner frame of the black spot and the edge line of the panel can be adjusted. For example, to adjust the distance between the outer frame of the material and the edge line of the panel, first calculate the horizontal distance between the horizontal coordinate x of the starting point and the edge line of the panel. , this Attaching it to the starting point can achieve the position offset of the detection frame.
[0072] In this embodiment, the process for detecting black dot defects is similar to the matching process for positioning frames. First, template training is performed to crop a template image representing the black dot defect from the sample image. The grayscale mean of the template image is then calculated. Due to the presence of the black dot defect, the grayscale mean of the template image will inevitably differ from that of the normal image. Image matching is then performed using a sliding window, and a matching score is calculated. If the matching score exceeds a set threshold, a black dot defect is considered present.
[0073] In this embodiment, the process of detecting material defects includes: using the material frame to determine the detection area in the image of the LCD panel to be detected, using a convolution kernel of size M×N to slide through the detection area, calculating the grayscale mean of each sliding traversal, and comparing the grayscale mean with a preset threshold. If the grayscale mean is greater than the preset threshold, it indicates that there is residual material at that location. For example, the convolution kernel size can be set to 3*3, 5*5, etc., and the grayscale mean of the sliding traversal is , , , Represents the grayscale value within the neighborhood. The threshold setting process here is as follows: select two grayscale values, one in the dark and one in the bright area of the panel edge region in the image, and then use these two grayscale values as a reference to set an appropriate binarization parameter as the preset threshold. If the mean grayscale value of the sliding traversal is greater than this binarization parameter, it indicates the presence of residual material.
[0074] In another embodiment, material defect detection can also be based on connected domain analysis, directly examining the physical connectivity between binarized pixels. This eliminates reliance on grayscale statistics and allows identification as long as a connected domain with the background is formed, resulting in higher sensitivity. When residual material is present at the edge and is too small (for example, occupying less than 5% of the sliding window area), the grayscale value of the residual material is "diluted" by the background grayscale, causing the calculated grayscale mean of the window image to fall below the preset threshold, potentially leading to missed detections. Using connected domain analysis can reduce reliance on grayscale mean values and improve missed detections.
[0075] Chipped edge defects refer to gaps at the edges of the LCD panel, and broken corner defects refer to gaps at the corners of the edges of the LCD panel. Therefore, these two defects can be detected in the same way. The detection process of chipped edge defects and broken corner defects includes: converting the LCD panel image to be detected from a grayscale image to a black and white image through binarization; dilating the black and white image to fill the gaps, and then corroding the black and white image to remove noise and isolated pixels; marking all independent foreground areas in the black and white image as different connected blocks, and connecting the connected blocks; and determining whether there are chipped edge defects and broken corner defects through feature extraction. Converting a grayscale image to a black and white image can highlight the foreground (such as the edge of the panel, the defective area). A threshold Q is set, and each pixel value in the grayscale image is compared with the threshold Q. If the pixel value is greater than or equal to the threshold Q, the pixel value is replaced with 1 after conversion to a black and white image. If the pixel value is less than the threshold Q, the pixel value is replaced with 0 after conversion to a black and white image, thereby obtaining a black and white image. Then for the black and white image Dilation processing expands the foreground area and fills small gaps to improve edge connectivity. Then, erosion processing is performed on the dilated image to remove small noise and isolated pixels and reduce the foreground area. When extracting connected areas, all independent foreground areas in the black and white image are marked as different connected blocks. For example, let pixel p belong to the foreground (i.e. =1), two pixels p1 and p2 are connected when there exists a path p1→p2 where all pixels have the value 1 and are adjacent to each other.
[0076] This embodiment can also calculate the defect size of the identified defects. According to the identified defect area, the total number of pixels in the defect area is counted. Defect area = number of pixels × area of a single pixel. The area threshold S can be set in the detection system, and the calculated defect area is compared with the area threshold S. If the defect area ≥ area threshold S, the defect cannot be ignored; if the defect area < area threshold S, the defect is too small and can be ignored.
[0077] like Figures 10 and 11 As shown in the figure, the shape of the edge of the LCD panel is roughly rectangular, and the shape of the short side of the edge can be square, trapezoidal, arc, etc. The detection method of the special-shaped edge is similar to the detection of the conventional shape. The difference is that when detecting the broken corner defect, the shape of the broken corner frame can be changed according to the edge shape, such as Figure 12 As shown, the broken corner frame used in this embodiment is a triangle.
[0078] In this embodiment, edge location also includes: setting an ROI line segment (region of interest) to extract image information of the target edge area; using an adaptive threshold method to enhance edge contrast; and using the FindEdge algorithm to obtain a preliminary panel edge position. The specific parameters of the FindEdge algorithm are described as follows:
[0079] ROI: limits the area for edge finding calculation to avoid interference. The area shape can be rectangular, straight line, or circular. This embodiment uses a straight line shape.
[0080] Edge Polarity: Edge polarity. When detecting edges, you can set it to go from dark to light or from light to dark. This embodiment uses the method from black to white or from white to black to find edges.
[0081] Edge Threshold: Set a gradient threshold. Gradients above this value are considered edges. It is used to filter out noise. Proper adjustment can avoid detecting false edges.
[0082] Number of Edges: Set the number of edges to be detected. The default is 1, but you can set multiple edges.
[0083] Edge Selection Mode: Strongest selects the edge point with the largest gradient, First selects the first edge detected in the ROI area, and Last selects the last edge detected in the ROI.
[0084] Subpixel Accuracy: Enables the subpixel interpolation algorithm to improve edge detection accuracy.
[0085] Edge Angle: Calculates the direction angle of the edge to determine whether the edge conforms to the expected direction.
[0086] The sub-pixel interpolation algorithm uses the second-order parabola fitting algorithm or the Gaussian fitting algorithm to perform sub-pixel interpolation calculation on the edge points, specifically including: assuming that the gray value distribution of the edge point t is , find the point with maximum gradient and its adjacent points and , by fitting these three points with a second-order parabola, calculating the extreme points, the final t obtained is the edge position with sub-pixel accuracy.
[0087] The overall process of defect detection in this embodiment is as follows:
[0088] Read the original LCD panel image and convert it into a grayscale image for subsequent processing.
[0089] The LCD panel image is sequentially subjected to image enhancement, mean filtering, grayscale averaging, denoising, and pattern recognition. This smoothes the image, improves contrast, and evenly distributes pixel values within the 0-255 range, optimizing grayscale balance. By enhancing brightness, the image becomes clearer and more visible, improving the overall visual effect.
[0090] The LCD panel image is binarized, adjusting the background of the original image from a higher grayscale value to a lower grayscale value, and the region of interest (the defect) from a lower grayscale value to a higher grayscale value. Subsequently, the low grayscale background is set to 0, and the region of interest (the defect) is set to 255 to achieve clear binary segmentation.
[0091] Calculate all the contours of the region of interest after binarization processing to obtain the required target area.
[0092] On the target area image, call out the positioning frame, inner frame of broken edges, inner frame of black spots, outer frame of material, and broken corner frame, and then preset the binarization threshold, length, width, and offset of each called out frame. The unit of the offset is mm. These preset settings are all definitions of the defect position and defect area size. The positioning frame has its own separate parameter template, and the threshold is very flexible.
[0093] The edge of the LCD panel is cross-marked, the upper and lower edges are searched, and the starting point of the detection frame is located to accurately locate the detection frame. The position of each detection frame is determined according to the position of the positioning starting point. The size of the offset is the quantified distance between each detection frame and the starting point.
[0094] Then click the Run Detection button to automatically detect the panel edge and give the detected defect results. If the LCD panel does not detect any defects, it is judged as an OK product and displayed on the software system. If it is an NG product, the type and number of detected defects will be displayed in the upper left corner of the visual system software.
[0095] In summary, the present invention's method for detecting edge defects in liquid crystal panels enables automated inspection of liquid crystal panel edges, achieving a defect recognition accuracy of 95%-99%, far exceeding the 85%-90% achieved by manual visual inspection. This significantly improves accuracy compared to traditional manual visual inspection methods. This invention not only improves detection efficiency but also reduces human error, ensuring the quality and production stability of liquid crystal panel products.
[0096] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical spirit of this invention. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A method for detecting edge defects of a liquid crystal panel, characterized in that: The following steps are involved: S1, scanning the edge of the liquid crystal panel using a line scan camera to obtain an image of the liquid crystal panel; S2, using a positioning frame to locate the edge position of the liquid crystal panel in the liquid crystal panel image, using a search frame to search for a Mark point in the liquid crystal panel image; and calling out detection frames of different defect types; S3, using the detection frames of different defect types to detect the edge of the liquid crystal panel image to obtain a defect detection result; S4, displaying the defect detection result in the liquid crystal panel image and sending it to the machine; The detection frames of different defect types include: edge chipping inner frame, black spot inner frame, material margin outer frame, and broken corner frame, wherein, The edge chipping inner frame is used to detect edge chipping defects on the edge of the liquid crystal panel; The black dot inner frame is used to detect black dot defects on the edge of the liquid crystal panel; The excess material frame is used to detect whether there is residual material at the edge of the liquid crystal panel; The broken corner frame is used to detect broken corner defects on the edge of the liquid crystal panel; The positioning frame is used to locate the starting point and the ending point of the edge area of the liquid crystal panel. The positioning frame contains a cross mark point. The starting and ending positions of the outer frame of the material, the inner frame of the broken edge, and the inner frame of the black dot follow the starting and ending points located by the positioning frame. The search box is used to frame the upper left corner area and the lower left corner area of the edge of the liquid crystal panel, and the positioning box is used to locate the cross mark point in the upper left corner area and the lower left corner area; The positioning process of the positioning frame includes: Template training: manually select the cross mark area in the sample image and crop it to obtain the positioning template image , Is the template image at position Grayscale value, where a represents the horizontal coordinate of the image, b represents the vertical coordinate of the image; the size of the template image is w*×h*, w* represents the width, h* represents the height, calculate the positioning template image Gray mean ; Template matching, on the LCD panel image to be detected, matching is performed in the form of a sliding window with a window size of w*×h*. The area selected by the sliding window is matched with the positioning template image. Perform normalized cross-correlation to calculate the matching score , the matching score Highest regional position As the cross mark point area.
2. The method for detecting edge defects of a liquid crystal panel according to claim 1, wherein: Step S1 includes: S11, scanning the edge of the liquid crystal panel using the line scan camera to obtain a plurality of image segments; S12, pre-processing the plurality of image segments; S13: Create a blank canvas and stitch the pre-processed image segments together to obtain a complete liquid crystal panel image.
3. The method for detecting edge defects of a liquid crystal panel according to claim 2, wherein: The splicing process of step S13 includes: Assign an ID to each of the image segments according to the scanning sequence, which are respectively recorded as 、 ,..., , n represents the number of image segments; the size of the image segment is W×H n , W represents the width of the image segment, H n Indicates the height of the nth image fragment; Set the maximum allowed overlap height between two adjacent image segments , crop the previous image segment The image area at the bottom with height h , for the current image segment Perform sliding window processing, each sliding height is h, and the image fragment The image area captured by the sliding window With the image area Perform overlapping area matching, y represents the dynamic variable of the actual matching overlapping height during the sliding window processing, h [0, ]; Set the overlap matching evaluation index , find the evaluation index Maximized , , in, Indicates the sliding offset, represents the area formed by the bottom h vertical rows and x horizontal columns in the i-1th image segment, represents the grayscale mean of the i-1th image segment within the sliding window, Indicates the number of pixels from the i-th image segment The row starts from the area formed by the vertical h rows and horizontal x columns. Represents the grayscale mean of the i-th image segment in the sliding window; Determining the optimal slide offset After that, the i-1th image segment is completely retained and the i-th image segment is removed from the The line starts to be spliced with the i-1th image segment to obtain the spliced image .
4. The method for detecting edge defects of a liquid crystal panel according to claim 1, wherein: The process of detecting material defects includes: The detection area is determined in the image of the liquid crystal panel to be detected using the outer frame of the excess material, and a convolution kernel of size M×N is used to slide through the detection area. The grayscale mean of each sliding traversal is calculated, and the grayscale mean is compared with a preset threshold. If the grayscale mean is greater than the preset threshold, it indicates that there is residual material there.
5. The method for detecting edge defects of a liquid crystal panel according to claim 1, wherein: The detection process of edge chipping and corner broken defects includes: Binarize the image of the liquid crystal panel to be inspected from a grayscale image to a black and white image; Performing dilation processing on the black and white image to fill the gap, and then performing erosion processing on the black and white image to remove noise and isolated pixels; Mark all independent foreground areas in the black and white image as different connected blocks, and connect the connected blocks; Feature extraction is used to determine whether there are edge collapse defects and corner broken defects.
6. The method for detecting edge defects of a liquid crystal panel according to claim 2, wherein: Step S12 includes: Converting the image segment into a grayscale image and performing enhancement processing on the grayscale image; Performing histogram equalization processing on the grayscale image to enhance image brightness; The grayscale image is subjected to denoising, grayscale stretching and filtering processing.
Citation Information
Patent Citations
Method and system for detecting in-plane and edge defects of cell
CN116152184A
Fuel cell surface defect detection method, electronic equipment, medium and detection device
CN117974550A