Display panel laser cutting channel detection method based on machine vision
Through machine vision technology, the laser cutting short-circuit structure is detected in real time, which solves the problems of detection error and missed detection in the existing technology, realizes automatic detection, reduces costs and improves efficiency, and is suitable for short-circuit structures in any cutting direction.
Patent Information
- Application Number
- CN202411235949.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-01-10
AI Technical Summary
In the prior art, laser welding and cutting machines have problems of missed detection and missed detection of the cutting lines of the display panel, and manual detection costs are high and low efficiency.
Using machine vision-based detection method, by acquiring images from the camera, positioning the cutting line, rotating the image to correct the cutting line direction, extracting the cutting line area, calculating the cutting line width and position information, and detecting whether the cutting line is completely cut and measuring the line width , offset and foreign objects.
Real-time detection of laser cutting short-circuit structures is realized, which reduces manual detection costs, improves detection efficiency, and is compatible with short-circuit structures in any cutting path direction.
Smart Images

Figure CN119290913A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for detecting laser cutting paths of display panels based on machine vision. Background Art
[0002] Laser welding and cutting machine (Trimmer) is an indispensable equipment in the display panel (TFT-LCD) industry. Its function is to use laser beam to cut the Shorting Bar structure on the display panel. The cutting effect of laser welding and cutting machine has a great influence on the yield of the subsequent process, so the detection of cutting effect is particularly critical.
[0003] At present, the inspection of LCD panel cutting lines is mainly done offline by personnel sampling and measuring whether the shorting bar area line is completely cut, whether the line width meets the requirements, whether the cutting is offset, and whether there is metal residue in the microscope of the secondary device. There are the following disadvantages: random inspection has caused false detection and missed detection; manual inspection is costly and inefficient.
[0004] Therefore, it is necessary to develop a method for real-time detection of cutting paths after laser cutting of a shorting bar structure. Summary of the invention
[0005] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for detecting laser cutting paths of display panels based on machine vision.
[0006] The purpose of the present invention is achieved through the following technical solutions:
[0007] The display panel laser cutting road detection method based on machine vision is characterized by: comprising the following steps:
[0008] 1) Obtain an image from the camera, locate the cutting line position from the image, and rotate the cutting line to be horizontal with the image X-axis; turn the cutting line image positive according to the two identification patterns, and correct the cutting line direction in the image to a horizontal angle; obtain the cutting line detection area according to the identification patterns;
[0009] 2) The obtained cutting lines are all arranged horizontally. The ROI containing the cutting lines is extracted according to the identification pattern, and the interference of other parts in the image is eliminated to extract the real cutting line area;
[0010] 3) If the number of contours is equal to the number of cutting lines, obtain the real cutting line mask template binary image, calculate the width and position information of the cutting line; extract the cutting line area for image processing;
[0011] 4) After detecting the cutting line width and offset as well as foreign matter in the cutting lead, foreign matter that may exist inside the cutting line is detected. The obtained binary image of the real cutting line mask template is used to detect foreign matter inside the cutting line; determine whether the cutting line is completely cut off, measure the line width, offset, and whether there are foreign matter.
[0012] Furthermore, in the above-mentioned display panel laser cutting road detection method based on machine vision, step 1) includes the following steps:
[0013] S11) setting a marker graphic near the cutting line in the image in advance, and the preset marker graphic is used for initially locating the detection area;
[0014] S12) finding two identification patterns in the image through grayscale matching, and the angle between the cutting line and the image X-axis may be any angle between -90° and 90°;
[0015] S13) Calculate the angle of the cutting line through the coordinates of the two identification graphics, and the calculation formula is as follows:
[0016]
[0017] Among them, the coordinates of the first logo graphic are (x 1 ,y 1 ), the second logo graphic coordinate is (x 2 ,y 2 ), θ is the cutting line angle;
[0018] S14) In the process of rotating the image according to the cutting line angle θ, since all the original image information is retained after the image is rotated, the size of the image after rotation will increase. The size of the rotated image is equivalent to the circumscribed rectangle of the original image after rotation. The size of the rotated image is calculated according to the size of the original image as follows:
[0019]
[0020] Among them, width is the original image width pixel value, height is the original image height pixel value, width_rotate is the rotated image width pixel value, height_rotate is the rotated image height pixel value;
[0021] S15) After the image size changes after rotation, the center point of the original image and the center point of the new image change. To ensure that the image center of the original image is still located at the center of the rotated image after rotation, it can be known that the horizontal translation distance is (width_rotate-width) / 2, and the vertical translation distance is (height_rotate-height) / 2; the rotation and translation affine matrix is obtained, and the image is subjected to rotation and translation correction. The transformation formula of the affine transformation is as follows: x and y represent the horizontal and vertical coordinates of each pixel point in the original image S (x, y), and x' and y' represent the horizontal and vertical coordinates of each pixel point in the rotated image D (x', y');
[0022]
[0023] Among them, θ is the required rotation angle, width is the original image width pixel value, height is the original image height pixel value, width_rotate is the rotated image width pixel value, height_rotate is the rotated image height pixel value, x is the horizontal coordinate of a point in the original image, y is the vertical coordinate of a point in the original image, x′ is the horizontal coordinate of the corresponding point in the rotated image, and y′ is the vertical coordinate of the corresponding point in the rotated image.
[0024] Furthermore, in the above-mentioned display panel laser cutting road detection method based on machine vision, step 2) includes the following steps:
[0025] S21) pre-segmenting the approximate ROI area including the cutting line according to the identification pattern for accurate ROI extraction;
[0026] S22) Gaussian linear filtering is performed on the ROI area, and weighted averaging is performed on the entire image to smooth the image and reduce noise; a 3×3 convolution kernel is predefined, and each pixel in the image is scanned with the convolution kernel, and a new pixel value is obtained by multiplication and addition operation for each central pixel point in the image that slides over the convolution kernel. The convolution kernel is defined as follows:
[0027]
[0028] S23) linearly amplifying all pixel values of the image to increase image brightness, widen the grayscale difference between the foreground and background, and improve image contrast;
[0029] S24) using a custom 1*k convolution kernel operator, where each element is 1, and k is determined by the actual pixel spacing of the cutting lead;
[0030] [1...1] The number is k
[0031] The image is eroded. The operation process is to extract the minimum gray value inside the convolution kernel structure as the erosion result of the pixel point where the convolution kernel slides over. The edge of the image shrinks toward the place with high gray value, and the dark area of the cut lead in the image is horizontally connected together, and the bright cutting line area and the lead area are clearly separated;
[0032] S25) Then calculate the average gray value m of the ROI area, and use m+n as the binarization threshold. The value greater than the threshold is the precise cutting line mask template. The binarization formula is as follows:
[0033]
[0034] Where m is the grayscale mean of the ROI area, n is a priori constant, src(x,y) is the grayscale value of any point in the original grayscale image, and dst(x,y) is the grayscale value of any point in the binarized image.
[0035] S26) Synchronously traverse the contours of the binary image. If the number of contours is greater than the number of cutting lines, it means that there are uncut lead defects in the image.
[0036] Furthermore, in the above-mentioned display panel laser cutting road detection method based on machine vision, step 3) includes the following steps:
[0037] S31) To speed up the traversal, for the binary image, a point is taken at every k pixels from left to right, and then each pixel is traversed row by row from top to bottom. p1 is taken as the vertical coordinate of the first pixel in each column that jumps from pixel 0 to 255, and p2 is taken as the vertical coordinate of the last pixel that jumps from pixel 255 to 0. The line width in the column is dist=p2-p1, and the vertical coordinate position of the center of the cutting line is loc=(p1+p2) / 2.
[0038] S32) judging by a single line width, if it is less than a preset value d, it is determined that there is a foreign object at the cutting line and the lead; adding all line widths and taking the average value to obtain the width value of the cutting line in the image, the formula is as follows:
[0039]
[0040] in, is the average width of the cutting line, dist is the width of each traversed column, and n is the total number of n columns taken from left to right;
[0041] S33) adding the vertical positions of the centers of each column of cutting lines and taking the average value to obtain the actual pixel position of the cutting line;
[0042] S34) The calculated pixel line width is converted into actual distance as a basis for judging whether the cutting line width tolerance is met, and the cutting line position and the marking pattern spacing are used as a basis for judging whether the offset tolerance is met.
[0043] Furthermore, in the above-mentioned display panel laser cutting road detection method based on machine vision, step 4) includes the following steps:
[0044] S41) performing pixel-by-pixel AND operation on the mask template image and the original image to deduct the real area of the cutting line in the original image;
[0045] S42) calculating the grayscale histogram of the image area to obtain the frequency of occurrence of all grayscale pixels in the image, and taking the grayscale value with the highest frequency of occurrence as the background image;
[0046] S43) The image region image A and the background image B are subjected to linear calculation to obtain an image S, and the difference between the images is enhanced. The formula is as follows:
[0047] S(x,y)=k*(A(x,y)-B(x,y))+b
[0048] S(x,y) is the grayscale value of any point in the result grayscale image, A(x,y) is the grayscale value of any point in the image, B(x,y) is the grayscale value of any point in the background image, k and b are prior constant parameters;
[0049] S44) The image S is binarized, and the pixels with small differences from the background in the image A can be highlighted, that is, they are judged as foreign objects.
[0050] Compared with the prior art, the present invention has significant advantages and beneficial effects, which are specifically embodied in the following aspects:
[0051] The present invention provides a method for detecting shorting bars based on machine vision instead of manual labor, and can detect the cutting path in real time after laser cutting of the shorting bar structure, and can detect the cutting line in any cutting direction; an automated solution for simultaneous inspection during cutting is realized, which saves labor costs, has high detection efficiency and low cost; and is compatible with shorting bar structures in any cutting path direction.
[0052] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or be understood by practicing the specific embodiments of the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 : Schematic diagram of the process of the present invention;
[0055] Figure 2 : Schematic diagram of the process of step 1);
[0056] Figure 3 : Schematic diagram of the process of step 2);
[0057] Figure 4 : Schematic diagram of the process of step 3);
[0058] Figure 5 : Schematic diagram of the process of step 4);
[0059] Figure 6 : Traverse the logical diagram in step 3). DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0061] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. At the same time, in the description of the present invention, directional terms and order terms are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0062] like Figure 1 As shown, the display panel laser cutting road detection method based on machine vision includes the following steps:
[0063] 1) Obtain an image from the camera, locate the cutting line from the image, and rotate the cutting line to be horizontal with the image X-axis; turn the cutting line image to the right according to the two identification patterns, and correct the cutting line direction in the image to a horizontal angle; obtain the cutting line detection area according to the identification patterns; Figure 2 , the specific steps are as follows:
[0064] S11) setting a marker graphic near the cutting line in the image in advance, and the preset marker graphic is used for initially locating the detection area;
[0065] S12) finding two identification patterns in the image through grayscale matching, and the angle between the cutting line and the image X-axis may be any angle between -90° and 90°;
[0066] S13) Calculate the angle of the cutting line through the coordinates of the two identification graphics, and the calculation formula is as follows:
[0067]
[0068] Among them, the coordinates of the first logo graphic are (x 1 ,y 1 ), the second logo graphic coordinate is (x 2 ,y 2 ), θ is the cutting line angle;
[0069] S14) In the process of rotating the image according to the cutting line angle θ, since all the original image information is retained after the image is rotated, the size of the image after rotation will increase. The size of the rotated image is equivalent to the circumscribed rectangle of the original image after rotation. The size of the rotated image is calculated according to the size of the original image as follows:
[0070]
[0071] Among them, width is the original image width pixel value, height is the original image height pixel value, width_rotate is the rotated image width pixel value, height_rotate is the rotated image height pixel value;
[0072] S15) After the image size changes after rotation, the center point of the original image and the center point of the new image change. To ensure that the image center of the original image is still located at the center of the rotated image after rotation, it can be known that the horizontal translation distance is (width_rotate-width) / 2, and the vertical translation distance is (height_rotate-height) / 2; the rotation and translation affine matrix is obtained, and the image is subjected to rotation and translation correction. The transformation formula of the affine transformation is as follows: x and y represent the horizontal and vertical coordinates of each pixel point in the original image S (x, y), and x' and y' represent the horizontal and vertical coordinates of each pixel point in the rotated image D (x', y');
[0073]
[0074] Where θ is the required rotation angle, width is the original image width in pixels, height is the original image height in pixels, width_rotate is the rotated image width in pixels, height_rotate is the rotated image height in pixels, x is the horizontal coordinate of a point in the original image, y is the vertical coordinate of a point in the original image, x′ is the horizontal coordinate of the corresponding point in the rotated image, and y′ is the vertical coordinate of the corresponding point in the rotated image;
[0075] 2) The obtained cutting lines are all arranged horizontally. The ROI containing the cutting lines is extracted according to the identification pattern, the interference of other parts in the image is eliminated, and the real cutting line area is extracted; the cutting line image is turned positive according to the two identification patterns; Figure 3 , the specific steps are as follows:
[0076] S21) pre-segmenting the approximate ROI area including the cutting line according to the identification pattern for accurate ROI extraction;
[0077] S22) Gaussian linear filtering is performed on the ROI area, and weighted averaging is performed on the entire image to smooth the image and reduce noise; a 3×3 convolution kernel is predefined, and each pixel in the image is scanned with the convolution kernel, and a new pixel value is obtained by multiplication and addition operation for each central pixel point in the image that slides over the convolution kernel. The convolution kernel is defined as follows:
[0078]
[0079] S23) Because the image is dark, linearly amplify all pixel values of the image to increase the image brightness, increase the grayscale difference between the foreground and the background, and improve the image contrast;
[0080] S24) using a custom 1*k convolution kernel operator, where each element is 1, and k is determined by the actual pixel spacing of the cutting lead;
[0081] [1...1] The number is k
[0082] The image is eroded. The operation process is to extract the minimum gray value inside the convolution kernel structure as the erosion result of the pixel point where the convolution kernel slides over. The edge of the image shrinks toward the place with high gray value, and the dark area of the cut lead in the image is horizontally connected together, and the bright cutting line area and the lead area are clearly separated;
[0083] S25) Then calculate the average gray value m of the ROI area, and use m+n as the binarization threshold. The value greater than the threshold is the precise cutting line mask template. The binarization formula is as follows:
[0084]
[0085] Where m is the grayscale mean of the ROI area, n is a priori constant, src(x,y) is the grayscale value of any point in the original grayscale image, and dst(x,y) is the grayscale value of any point in the binarized image.
[0086] S26) synchronously traversing the contours of the binary image, if the number of contours is greater than the number of cutting lines, it means that there are uncut lead defects in the image;
[0087] 3) If the number of contours is equal to the number of cutting lines, the real cutting line mask template binary image is obtained, and the width and position information of the cutting line are calculated; the cutting line area is extracted for image processing; Figure 4 , the specific steps are as follows:
[0088] S31) To speed up the traversal speed, for the binary image, a point is taken every k pixels from left to right, and then each pixel is traversed row by row from top to bottom. p1 is taken as the vertical coordinate of the first pixel in each column that jumps from pixel 0 to 255, that is, the vertical coordinate of the pixel when the pixel grayscale value changes from 0 to 255); p2 is the vertical coordinate of the last pixel that jumps from pixel 255 to 0. The line width in this column is dist=p2-p1, and the vertical coordinate position of the cutting line center is loc=(p1+p2) / 2. The traversal logic is as follows: Figure 6 As shown;
[0089] S32) judging by a single line width, if it is less than a preset value d, it is determined that there is a foreign object at the cutting line and the lead; adding all line widths and taking the average value to obtain the width value of the cutting line in the image, the formula is as follows:
[0090]
[0091] in, is the average width of the cutting line, dist is the width of each traversed column, and n is the total number of n columns taken from left to right;
[0092] S33) adding the vertical positions of the centers of each column of cutting lines and taking the average value to obtain the actual pixel position of the cutting line;
[0093] S34) converting the calculated pixel line width into actual distance as a basis for judging whether the cutting line width tolerance is met, and the cutting line position and the marking pattern spacing as a basis for judging whether the offset tolerance is met;
[0094] 4) After the detection of cutting line width and offset and foreign matter in the cutting lead, the foreign matter that may exist inside the cutting line is detected, and the real cutting line mask template binary image is used to detect foreign matter inside the cutting line; determine whether the cutting line is completely cut, measure the line width, offset, and whether there is foreign matter; such as Figure 5, the specific steps are as follows:
[0095] S41) performing pixel-by-pixel AND operation on the mask template image and the original image to deduct the real area of the cutting line in the original image;
[0096] S42) calculating the grayscale histogram of the image area to obtain the frequency of occurrence of all grayscale pixels in the image, and taking the grayscale value with the highest frequency of occurrence as the background image;
[0097] S43) The image region image A and the background image B are subjected to linear calculation to obtain an image S, and the difference between the images is enhanced. The formula is as follows:
[0098] S(x,y)=k*(A(x,y)-B(x,y))+b
[0099] S(x,y) is the grayscale value of any point in the result grayscale image, A(x,y) is the grayscale value of any point in the image, B(x,y) is the grayscale value of any point in the background image, k and b are prior constant parameters;
[0100] S44) The image S is binarized, and the pixels with small differences from the background in the image A can be highlighted, that is, they are judged as foreign objects.
[0101] In summary, the present invention provides a method for detecting shorting bars based on machine vision that can replace manual labor, detect the cutting path in real time after laser cutting the shorting bar structure, and can detect the cutting line in any cutting direction; realize an automated solution for inspection as the cutting progresses, save labor costs, have high detection efficiency, and low cost; and be compatible with shorting bar structures in any cutting path direction.
[0102] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention. It should be noted that similar numbers and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.
[0103] The above is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
[0104] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. A display panel laser cutting path detection method based on machine vision, characterized in that: The following steps are involved: 1) Obtain an image from the camera, locate the cutting line position from the image, and rotate the cutting line to be horizontal with the image X-axis; turn the cutting line image positive according to the two identification patterns, and correct the cutting line direction in the image to a horizontal angle; obtain the cutting line detection area according to the identification patterns; 2) The obtained cutting lines are all arranged horizontally. The ROI containing the cutting lines is extracted according to the identification pattern, and the interference of other parts in the image is eliminated to extract the real cutting line area; 3) If the number of contours is equal to the number of cutting lines, obtain the real cutting line mask template binary image, calculate the width and position information of the cutting line; extract the cutting line area for image processing; 4) After detecting the cutting line width and offset as well as foreign matter in the cutting lead, foreign matter that may exist inside the cutting line is detected. The obtained binary image of the real cutting line mask template is used to detect foreign matter inside the cutting line; determine whether the cutting line is completely cut off, measure the line width, offset, and whether there are foreign matter.
2. The display panel laser cutting road detection method based on machine vision according to claim 1, characterized in that: Step 1) comprises the following steps: S11) setting a marker graphic near the cutting line in the image in advance, and the preset marker graphic is used for initially locating the detection area; S12) finding two identification patterns in the image through grayscale matching, and the angle between the cutting line and the image X-axis may be any angle between -90° and 90°; S13) Calculate the angle of the cutting line through the coordinates of the two identification graphics, and the calculation formula is as follows: Among them, the coordinates of the first logo graphic are (x1, y1), the coordinates of the second logo graphic are (x2, y2), and θ is the cutting line angle; S14) In the process of rotating the image according to the cutting line angle θ, since all the original image information is retained after the image is rotated, the size of the image after rotation will increase. The size of the rotated image is equivalent to the circumscribed rectangle of the original image after rotation. The size of the rotated image is calculated according to the size of the original image as follows: Among them, width is the original image width pixel value, height is the original image height pixel value, width_rotate is the rotated image width pixel value, height_rotate is the rotated image height pixel value; S15) After the image size changes after rotation, the center point of the original image and the center point of the new image change. To ensure that the image center of the original image is still located at the center of the rotated image after rotation, it can be known that the horizontal translation distance is (width_rotate-width) / 2, and the vertical translation distance is (height_rotate-height) / 2; the rotation and translation affine matrix is obtained, and the image is subjected to rotation and translation correction. The transformation formula of the affine transformation is as follows: x, y represent the horizontal and vertical coordinates of each pixel point in the original image S (x, y), and x,, y, represent the horizontal and vertical coordinates of each pixel point in the rotated image D (x,, y,); Among them, θ is the required rotation angle, width is the original image width pixel value, height is the original image height pixel value, width_rotate is the rotated image width pixel value, height_rotate is the rotated image height pixel value, x is the horizontal coordinate of a point in the original image, y is the vertical coordinate of a point in the original image, x′ is the horizontal coordinate of the corresponding point in the rotated image, and y′ is the vertical coordinate of the corresponding point in the rotated image.
3. The display panel laser cutting path detection method based on machine vision according to claim 1, characterized in that: Step 2) comprises the following steps: S21) pre-segmenting the approximate ROI area including the cutting line according to the identification pattern for accurate ROI extraction; S22) Gaussian linear filtering is performed on the ROI area, and weighted averaging is performed on the entire image to smooth the image and reduce noise; a 3×3 convolution kernel is predefined, and each pixel in the image is scanned with the convolution kernel, and a new pixel value is obtained by multiplication and addition operation for each central pixel point in the image that slides over the convolution kernel. The convolution kernel is defined as follows: S23) linearly amplifying all pixel values of the image to increase image brightness, widen the grayscale difference between the foreground and background, and improve image contrast; S24) using a custom 1*k convolution kernel operator, where each element is 1, and k is determined by the actual pixel spacing of the cutting lead; [1...1] The number is k The image is eroded. The operation process is to extract the minimum gray value inside the convolution kernel structure as the erosion result of the pixel point where the convolution kernel slides over. The edge of the image shrinks toward the place with high gray value, and the dark area of the cut lead in the image is horizontally connected together, and the bright cutting line area and the lead area are clearly separated; S25) Then calculate the average gray value m of the ROI area, and use m+n as the binarization threshold. The value greater than the threshold is the precise cutting line mask template. The binarization formula is as follows: Where m is the grayscale mean of the ROI area, n is a priori constant, src(x,y) is the grayscale value of any point in the original grayscale image, and dst(x,y) is the grayscale value of any point in the binarized image. S26) Synchronously traverse the contours of the binary image. If the number of contours is greater than the number of cutting lines, it means that there are uncut lead defects in the image.
4. The display panel laser cutting road detection method based on machine vision according to claim 1, characterized in that: Step 3) comprises the following steps: S31) To speed up the traversal, for the binary image, a point is taken at every k pixels from left to right, and then each pixel is traversed row by row from top to bottom. p1 is taken as the vertical coordinate of the first pixel in each column that jumps from pixel 0 to 255, and p2 is taken as the vertical coordinate of the last pixel that jumps from pixel 255 to 0. The line width in the column is dist=p2-p1, and the vertical coordinate position of the center of the cutting line is loc=(p1+p2) / 2. S32) judging by a single line width, if it is less than a preset value d, it is determined that there is a foreign object at the cutting line and the lead; adding all line widths and taking the average value to obtain the width value of the cutting line in the image, the formula is as follows: in, is the average width of the cutting line, dist is the width of each traversed column, and n is the total number of n columns taken from left to right; S33) adding the vertical positions of the centers of each column of cutting lines and taking the average value to obtain the actual pixel position of the cutting line; S34) The calculated pixel line width is converted into actual distance as a basis for judging whether the cutting line width tolerance is met, and the cutting line position and the marking pattern spacing are used as a basis for judging whether the offset tolerance is met.
5. The display panel laser cutting road detection method based on machine vision according to claim 1, characterized in that: Step 4) comprises the following steps: S41) performing pixel-by-pixel AND operation on the mask template image and the original image to deduct the real area of the cutting line in the original image; S42) calculating the grayscale histogram of the image area to obtain the frequency of occurrence of all grayscale pixels in the image, and taking the grayscale value with the highest frequency of occurrence as the background image; S43) The image region image A and the background image B are subjected to linear calculation after difference to obtain image S, and the difference between the images is enhanced. The formula is as follows: S(x,y)=k*(A(x,y)-B(x,y))+b S(x,y) is the grayscale value of any point in the result grayscale image, A(x,y) is the grayscale value of any point in the image, B(x,y) is the grayscale value of any point in the background image, k and b are prior constant parameters; S44) The image S is binarized, and the pixels with small differences from the background in the image A can be highlighted, that is, they are judged as foreign objects.