Method, system and equipment for detecting defects in optical protective film
By analyzing the contour edge matching and motion anomaly of adjacent frame images on the surface of the optical protective film, combined with the degree of film bending, and calculating the defect judgment coefficient, the problem of low accuracy in defect detection on the surface of the optical protective film is solved, and more accurate defect detection is achieved.
Patent Information
- Application Number
- CN202510961711.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-14
AI Technical Summary
In the prior art, the detection accuracy of defects on the surface of optical protective films is low and is seriously interfered by light spots, resulting in inaccurate detection results.
By analyzing the contour edge matching and motion anomaly of two adjacent frames of film grayscale images, combined with the degree of film bending, the defect judgment coefficient is calculated to achieve defect detection on the surface of the optical protective film.
The accuracy of surface defect detection of optical protective films is improved, defects are accurately identified, and the influence of light spot interference is reduced.
Smart Images

Figure CN120451174B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, system and equipment for detecting defects in an optical protective film. Background Art
[0002] Optical protective film is a fundamental material widely used in applications such as displays, consumer electronics, and optical instruments. It features a composite film material composed of one or more layers of coatings with specific physical properties uniformly applied to functional films such as PET, COP, and TPU. Optical protective film is also a specialized optical film, typically composed of thin, layered dielectrics with thicknesses typically in the micrometer or nanometer range. This film is widely used in optics and optoelectronics by propagating light beams through interfaces. Its core function is to provide physical protection (anti-scratch, dust, anti-static, high transmittance, low haze, physical support, etc.) and chemical protection (anti-corrosion, solvent resistance, etc.) for delicate and fragile optical surfaces, while maintaining excellent optical performance. Optical protective film directly determines the quality and reliability of the products to which it is applied.
[0003] In order to ensure the performance of the optical protective film after production, it is necessary to perform defect detection on the surface image of the optical protective film after production. However, under normal circumstances, there are many reflections on the surface of the optical protective film, that is, the defects themselves have complex reflection / transmission characteristics of light, which can easily produce shadows, reflections and other interferences in the image, thereby forming light spots. The light spots will affect the accuracy of the detection of defective parts, resulting in low detection accuracy of defects on the surface of the optical protective film, which in turn affects the detection effect. Summary of the Invention
[0004] In order to solve the above technical problems, a method, system and equipment for defect detection of an optical protective film are provided to solve the existing problems.
[0005] The solution to the technical problem of this application is to provide a method, system and equipment for detecting defects in an optical protective film, comprising the following steps:
[0006] In a first aspect, an embodiment of the present application provides a method for detecting defects in an optical protective film, the method comprising the following steps:
[0007] Continuously capture the surface of the optical protective film on the conveyor belt to obtain a grayscale image of each film frame, and extract the film area and all its contour edges within each film grayscale image frame;
[0008] Determining the matching contour edge corresponding to each contour edge in the film region of each film grayscale image frame based on the distance relationship between the contour edges in the film region of two adjacent film grayscale images; determining the relative displacement difference of each contour edge in the film region of each film grayscale image frame based on the change in the direction vector of the movement between each contour edge in the film region of each film grayscale image frame and its corresponding matching contour edge; analyzing the contour similarity between each contour edge and its corresponding matching contour edge, and determining the degree of motion abnormality of each contour edge in the film region of each film grayscale image frame based on the relative displacement difference;
[0009] Determining the degree of distortion of each contour edge within the film region of each frame of the film grayscale image based on the gradient distribution of different pixels in a local neighborhood of each pixel within each contour edge of the film region of each frame of the film grayscale image, and the difference in gradients of different pixels within the local neighborhood; determining the degree of film curvature of each contour edge within the film region of each frame of the film grayscale image based on the degree of distortion of each contour edge and its corresponding matching contour edge;
[0010] Based on the motion abnormality and the film bending degree, a defect judgment coefficient of each contour edge in the film area of each frame of the film grayscale image is determined to perform defect detection on the surface of the optical protective film.
[0011] Preferably, extracting the film area and all its contour edges in each film grayscale image frame includes:
[0012] Perform edge detection on each frame of the film grayscale image and extract all contour edges within each frame of the film grayscale image;
[0013] The area of the minimum circumscribed rectangle of each contour edge in each frame of the film grayscale image is calculated, and the contour edge corresponding to the minimum circumscribed rectangle with the largest area is recorded as the film area of each frame of the film grayscale image.
[0014] Preferably, determining the matching contour edge corresponding to each contour edge in the film area of each frame of the film grayscale image includes:
[0015] The centroid of each contour edge in the film area of each film grayscale image frame is the pixel point at the same position in the film grayscale image of the adjacent frame, which is recorded as the centroid corresponding point;
[0016] The contour edge with the shortest distance to the point corresponding to the centroid in the adjacent film grayscale images is used as the matching contour edge corresponding to each contour edge in the film region of each film grayscale image.
[0017] Preferably, determining the relative displacement difference of each contour edge in the film region of each frame of the film grayscale image includes:
[0018] For each contour edge within the film region of each film grayscale image frame, the direction vector between the centroid of each contour edge and the centroid of the corresponding matching contour edge is used as the relative motion vector of each contour edge;
[0019] The direction vector between the center point of the film region between each film grayscale image frame and its adjacent film grayscale image frame is used as the motion vector of the film region in each film grayscale image frame; the opposite direction vector of the motion vector of the film region in each film grayscale image frame is recorded as the normal motion vector;
[0020] The vector modulus of the difference between the relative motion vector of each contour edge and the normal motion vector is used as the relative displacement difference of each contour edge in the film area of each frame of the film grayscale image.
[0021] Preferably, determining the motion abnormality of each contour edge in the film region of each frame of the film grayscale image includes:
[0022] Recording the distance between the position coordinates of all edge pixel points of each contour edge and the position coordinates of all edge pixel points of its corresponding matching contour edge as a first distance;
[0023] The product of the first distance and the relative displacement difference is used as the motion abnormality of each contour edge in the film area of each frame of the film grayscale image.
[0024] Preferably, determining the possible degree of distortion of each contour edge in the film region of each frame of the film grayscale image includes:
[0025] If the gradient of any pixel point within each contour edge of the film area in each frame of the film grayscale image is the largest in its neighborhood, the pixel point is recorded as a gradient pixel point;
[0026] Set a local window of preset size with each pixel point within each contour edge as the center;
[0027] Calculate the mean of the gradients of any gradient pixel point in the local window and the gradient pixel point closest to it in metric distance, record it as the first mean of any gradient pixel point, and record the metric distance as the second distance;
[0028] Connecting any gradient pixel point and its nearest gradient pixel point within the local window of each pixel point within each contour edge as the endpoints of a line segment, and recording the average of the gradients of all pixels on the connected line segment except the endpoints as the second average of the any gradient pixel point;
[0029] Using the ratio of the first mean value to the second mean value as the gradient coefficient of any gradient pixel point;
[0030] Calculate the average value of the product of the reciprocal of the second distance and the gradient coefficient of all gradient pixel points in the local window, and record it as the local gradient value;
[0031] The average of the local gradient values of all pixels within each contour edge in the film region of each film grayscale image frame is used as the distortion possibility of each contour edge in the film region of each film grayscale image frame.
[0032] Preferably, the film bending degree of each contour edge in the film region of each film grayscale image frame is the average of the distortion possibilities between each contour edge in the film region of each film grayscale image frame and its matching contour edge.
[0033] Preferably, the defect judgment coefficient of each contour edge in the film area of each frame of the film grayscale image is a normalized result of the ratio of the motion abnormality to the film bending degree.
[0034] In a second aspect, an embodiment of the present application also provides a defect detection system for an optical protective film, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of any one of the above-mentioned methods for detecting defects in an optical protective film are implemented.
[0035] In a third aspect, an embodiment of the present application also provides a defect detection device for an optical protective film, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of any one of the above-mentioned methods for detecting defects in an optical protective film are implemented.
[0036] This application has at least the following beneficial effects:
[0037] The present application determines the matching contour edge corresponding to each contour edge in the film area of each frame of the film grayscale image based on the distance relationship between the contour edges in the film area of two adjacent frames of the film grayscale image. The beneficial effect is that the corresponding matching of the contour edges in the two adjacent frames of the film grayscale image is taken into account, which facilitates the subsequent analysis of the displacement of the contour edges, so as to more accurately detect defects; according to the change of the direction vector between each contour edge in the film area of each frame of the film grayscale image and its corresponding matching contour edge, the relative displacement difference of each contour edge in the film area of each frame of the film grayscale image is determined; the similarity of the contours between each contour edge and its corresponding matching contour edge is analyzed, and the motion abnormality of each contour edge in the film area of each frame of the film grayscale image is determined in combination with the relative displacement difference. The beneficial effect is that the displacement change of the contour edge is taken into account, so as to judge the possibility that the corresponding contour edge is a defect or a light spot; according to the gradient distribution of different pixel points in the local neighborhood of each pixel point in each contour edge of the film area of each frame of the film grayscale image, and the gradient distribution of different pixel points in the local neighborhood, the gradient distribution of different pixel points in the local neighborhood is determined. The difference in degree is used to determine the possible distortion of each contour edge in the film area of each frame of the film grayscale image. The beneficial effect is that the gradient change difference of different pixel points in the local neighborhood corresponding to the contour edge is taken into account, thereby reflecting the complexity of the characteristic change of the surface of the optical protective film; according to the possible distortion of each contour edge and its corresponding matching contour edge, the film bending degree of each contour edge in the film area of each frame of the film grayscale image is determined. The beneficial effect is that the bending degree of the film grayscale image in two adjacent frames of film grayscale images is taken into account, which is reflected in the degree of deviation in the analysis of the movement of the contour edge; based on the motion abnormality and the film bending degree, the defect judgment coefficient of each contour edge in the film area of each frame of the film grayscale image is determined, and the surface of the optical protective film is detected for defects. The beneficial effect is that the possibility that the contour edge in multiple consecutive frames of film grayscale images is a defect is taken into account, and the defects and light spots on the surface of the optical protective film can be more accurately distinguished, so that the detection of defects on the surface of the optical protective film is more accurate, and the detection accuracy of defects on the surface of the optical protective film is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The following is a detailed description of a defect detection method for an optical protective film of the present application with reference to the accompanying drawings.
[0039] Figure 1 A flowchart of a defect detection method for an optical protective film provided in an embodiment of the present application;
[0040] Figure 2 A schematic diagram of the motion of two adjacent frames of film grayscale images provided in an embodiment of the present application;
[0041] Figure 3A flowchart of the steps of a method for obtaining the motion abnormality of each contour edge within the film area of each frame of the film grayscale image provided by an embodiment of the present application;
[0042] Figure 4 This is a flowchart of the steps of a method for obtaining the film curvature degree of each contour edge in the film area of each frame of the film grayscale image provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] To make the objectives, technical solutions, and advantages of this application more clearly understood, the following, in conjunction with the accompanying drawings and implementation examples, further describes in detail the optical protective film defect detection method, system, and apparatus proposed in this application. It should be understood that the specific embodiments described herein are merely intended to explain this application and are not intended to limit this application.
[0044] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
[0045] See also Figure 1 , which shows a flowchart of a defect detection method for an optical protective film provided by one embodiment of the present application, the method comprising the following steps:
[0046] Step 1: Continuously capture the surface of the optical protective film on the conveyor belt to obtain a grayscale image of each film frame.
[0047] The finished optical protective film is transported on a conveyor belt. A high-resolution industrial camera is mounted above the conveyor belt. As the conveyor belt moves, it continuously captures images of the optical protective film surface, producing N consecutive frames of images. These images are then grayscaled to produce a grayscale image of the film. Optical protective films exhibit typical film characteristics, such as a smooth surface and extremely thin thickness. Therefore, the captured images of the optical protective film are referred to as film grayscale images in this invention for ease of understanding.
[0048] Preferably, in this embodiment, 10 consecutive frames of images are obtained. As other implementation methods, the implementer can set it according to actual conditions.
[0049] At this point, each frame of the film grayscale image is obtained.
[0050] Step 2: Determine the matching contour edge corresponding to each contour edge in the film region of each film grayscale image frame based on the distance relationship between the contour edges in the film region of two adjacent film grayscale images; determine the relative displacement difference of each contour edge in the film region of each film grayscale image frame based on the change of the direction vector between each contour edge in the film region of each film grayscale image frame and its corresponding matching contour edge; analyze the contour similarity between each contour edge and its corresponding matching contour edge, and determine the motion abnormality of each contour edge in the film region of each film grayscale image frame based on the relative displacement difference.
[0051] Since the surface of the optical protective film is relatively smooth, the light source in the factory will be reflected on the optical protective film, resulting in a light spot in the film surface image. The position of the light spot in the film surface image does not change, but the light spot on the film moves in the film with the movement of the conveyor belt. Secondly, the position of the scratches and damaged parts on the film remains unchanged, but moves in the film surface image; therefore, in two adjacent frames of film grayscale images, the position of the light spot in the film surface image does not change, while the position of the scratch defect area in the film grayscale image moves.
[0052] Furthermore, the motion diagram of two adjacent frames of film grayscale images provided in this embodiment is as follows: Figure 2 As shown, two adjacent frames of film grayscale images are A1 and A2. In the film grayscale images A1 and A2, 1 represents the optical protective film area, 2 represents the scratch defect, and 3 represents the light spot. When the optical protective film moves, in the film grayscale images A1 and A2, the position of the light spot 3 does not move relatively, and the scratch defect area 2 moves. On the optical protective film 1, the position of the scratch defect remains relatively unchanged, but the position of the light spot moves.
[0053] Based on the above analysis, the connected domain in the grayscale image of the thin film is extracted to extract the edge contour in the grayscale image, specifically:
[0054] Using edge detection algorithm, perform edge detection on each frame of film grayscale image and extract all contour edges in each frame of film grayscale image;
[0055] Calculating the area of the minimum circumscribed rectangle of each contour edge in each frame of the film grayscale image, and recording the contour edge corresponding to the minimum circumscribed rectangle with the largest area as the film area of each frame of the film grayscale image;
[0056] Preferably, in this embodiment, the Canny edge detection algorithm is used for edge detection, wherein the Canny edge detection algorithm is a well-known technology and will not be described in detail here. As other implementation methods, the implementer may adopt other methods of the existing technology, such as the Sobel operator, etc. This embodiment does not impose any special restrictions on this.
[0057] Furthermore, each contour edge in the film grayscale image is caused by the light spot texture generated by the reflection on the surface of the optical protective film and the defects and damage on the film surface. Therefore, there are contour edges that move and contour edges that remain unchanged. Therefore, in two adjacent frames of film grayscale images, the position of the light spot in the film surface image will not change, while the position of the scratch defect area in the film grayscale image moves.
[0058] Based on the above analysis, by analyzing the positional relationship of the contour edges in the film area of two adjacent frames of images, the contour edges corresponding to the contour edges in each frame of the film grayscale image are found in the adjacent film grayscale images to determine the matching contour edges. Specifically,
[0059] The direction vector between the center point of the film area between each film grayscale image frame and the next film grayscale image frame is used as the motion vector of the film area in each film grayscale image frame;
[0060] Calculate the centroid of each contour edge within the film area of each frame of the film grayscale image;
[0061] With respect to the position of the centroid in each frame of the film grayscale image, the pixel point at the same position in the next frame of the film grayscale image is recorded as the centroid corresponding point;
[0062] The contour edge closest to the point corresponding to the centroid in the next film grayscale image is used as the matching contour edge of each contour edge in the film area of each film grayscale image.
[0063] Furthermore, the positional motion between each contour edge in each film grayscale image and its matching contour edges in the two adjacent film grayscale images, as well as the degree of difference between the motion displacement of the contour edge and the motion displacement of the film, are analyzed to determine the degree of motion abnormality, specifically:
[0064] Taking the direction vector between the centroid of each contour edge in the film region of each frame of the film grayscale image and the centroid of the matching contour edge as the relative motion vector of each contour edge in the film region of each frame of the film grayscale image;
[0065] The opposite direction vector of the motion vector of the film area in each frame of the film grayscale image is recorded as the normal motion vector;
[0066] Recording the distance between the position coordinates of all edge pixel points of each contour edge in the film area of each frame of the film grayscale image and the position coordinates of all edge pixel points of the matching contour edge as a first distance;
[0067] Preferably, in this embodiment, the Hausdorff distance between the position coordinates of all edge pixel points of each contour edge in the film area of each frame of the film grayscale image and the position coordinates of all edge pixel points of its matching contour edge is recorded as the first distance. As other implementation methods, the implementer may adopt other methods of the prior art, such as Euclidean distance, etc., and this embodiment does not impose any special restrictions on this.
[0068] The vector modulus of the difference between the relative motion vector of each contour edge in the film region of each frame of the film grayscale image and the normal motion vector is used as the relative displacement difference of each contour edge in the film region of each frame of the film grayscale image;
[0069] The product of the first distance and the relative displacement difference is used as the motion abnormality of each contour edge in the film area of each frame of the film grayscale image.
[0070] Preferably, in this embodiment, the calculation formula for the motion abnormality of each contour edge in the film area of each frame of the film grayscale image is: ,in, For the The first The degree of motion abnormality of the edge of the contour, For the The first The coordinates of all edge pixels of the edge of the contour, For the The first The coordinates of all edge pixels of the edge of the contour, For the The first The relative motion vector of the edge of the contour, For the The first Normal motion vector of the edge of the contour, To calculate the Hausdorff distance, To calculate the modulus length; secondly, is the first distance, is the relative displacement difference.
[0071] It should be noted that the larger the first distance is, the more likely the corresponding contour edge is moving, and the more likely it is that the film grayscale image is a defect area. Secondly, if the corresponding contour edge is a defect area, then The greater the relative displacement difference is, the more consistent it is with the motion vector of the film area. If the corresponding contour edge is a light spot, and the position of the corresponding contour edge in the film grayscale image does not change, then The smaller the relative displacement difference is, the greater the obtained motion anomaly is. The greater the possibility that the corresponding contour edge is a defect.
[0072] Furthermore, the flowchart of the method for obtaining the motion abnormality of each contour edge in the film area of each frame of the film grayscale image provided by the embodiment of the present application is as follows: Figure 3 shown.
[0073] Thus, the motion abnormality degree of each contour edge in the film area of each frame of the film grayscale image is obtained.
[0074] Step 3: Determine the possible distortion of each contour edge in the film area of each frame of the film grayscale image based on the distribution of gradients of different pixel points in the local neighborhood of each pixel point within each contour edge of the film area of each frame of the film grayscale image, and the difference in gradients of different pixel points in the local neighborhood; determine the degree of film curvature of each contour edge in the film area of each frame of the film grayscale image based on the possible distortion of each contour edge and its corresponding matching contour edge.
[0075] Furthermore, under normal circumstances, the direction of motion of the light spot on the film is opposite to that of the film itself, and the distance the light spot moves on a flat optical protective film should be consistent with the distance the film moves. However, because the film may be subjected to forces on the conveyor belt during transportation, causing varying degrees of surface distortion, the light spot on the film's uneven surface can cause the changes in the light spot between two adjacent frames to differ from the film's movement, resulting in a high degree of motion anomaly. Therefore, it is necessary to analyze the curvature of each area on the film to reflect the film's curvature and accurately identify defects.
[0076] First, analyze the gradient changes of the remaining pixels in the neighborhood of each pixel within each contour edge to determine the degree of distortion, specifically:
[0077] Calculate the gradient of each pixel point within each contour edge in the film area of each frame of the film grayscale image;
[0078] If the gradient of any pixel point within each contour edge of the film area in each frame of the film grayscale image is the largest in its neighborhood, the pixel point is recorded as a gradient pixel point;
[0079] Preferably, in this embodiment, if the gradient of any pixel point within each contour edge in the film area of each frame of the film grayscale image is the largest within its 8-neighborhood, the any pixel point is recorded as a gradient pixel point. As other implementation methods, the implementer can set it according to actual conditions.
[0080] A local window of a preset size is set with each pixel point within each contour edge in the film area of each frame of the film grayscale image as the center;
[0081] Preferably, in this embodiment, a local window with a preset size of 5×5 is set. As other implementation methods, the implementer can set it according to actual conditions.
[0082] Calculate the mean of the gradients of any gradient pixel point in the local window of each pixel point in each contour edge and the gradient pixel point closest to it in metric distance, record it as the first mean of any gradient pixel point, and record the metric distance as the second distance;
[0083] Connecting any gradient pixel point and its nearest gradient pixel point within the local window of each pixel point within each contour edge as the endpoints of a line segment, and recording the average of the gradients of all pixels on the connected line segment except the endpoints as the second average of the any gradient pixel point;
[0084] Using the ratio of the first mean value to the second mean value as the gradient coefficient of any gradient pixel point;
[0085] Calculating the average of the product of the reciprocal of the second distance and the gradient coefficient for all gradient pixel points in the local window, and recording the average as the local gradient value of each pixel point in each contour edge in the film area of each frame of the film grayscale image;
[0086] taking the average of the local gradient values of all pixels within each contour edge in the film region of each frame of the film grayscale image as the distortion possibility of each contour edge in the film region of each frame of the film grayscale image;
[0087] Preferably, in this embodiment, the local gradient value of each pixel point within each contour edge in the film area of each frame of the film grayscale image is calculated as follows: ,in, For the The first The edge of the contour The local gradient value of each pixel, For the The first The edge of the contour The local window of pixels The gradient of the gradient pixel, For the The first The edge of the contour The local window of pixels and The gradient pixel point closest to the gradient pixel point The gradient, For the The first The edge of the contour The local window of pixels A gradient pixel and its nearest gradient pixel The mean value of the gradient of all pixels contained between For the The first The edge of the contour The local window of pixels The position coordinates of the gradient pixel points, For the The first The edge of the contour The local window of pixels and The gradient pixel point closest to the gradient pixel point The location coordinates of Indicates the calculated distance, For the The first The edge of the contour The number of all gradient pixels in the local window of pixels; secondly, is the first mean, is the second mean, is the second distance, is the gradient coefficient.
[0088] It should be noted that the larger the gradient coefficient, the greater the gradient difference between the pixels in the local area, reflecting that the more complex the characteristic changes on the film surface, and the greater the surface curvature of the optical protective film in this area; the smaller the second distance, the closer the distance between the two pixels with larger gradients, the more likely the film is to bend, and the greater the resulting distortion probability, indicating that the corresponding contour edge is more likely to bend.
[0089] Furthermore, the distortion of the pixels between the matching contour edges of two adjacent film grayscale images is analyzed to determine the degree of film bending, specifically:
[0090] The average of the possible distortions of each contour edge in the film region of each film grayscale image frame and the corresponding matching contour edge in the film region of the subsequent film grayscale image frame is used as the film bending degree of each contour edge in the film region of each film grayscale image frame;
[0091] It should be noted that the greater the film curvature, the higher the curvature of the corresponding contour edge, resulting in a larger position change of the corresponding contour edge between two adjacent film grayscale images and a higher calculated motion anomaly.
[0092] Furthermore, the flowchart of the method for obtaining the film bending degree of each contour edge in the film area of each frame of the film grayscale image provided by the embodiment of the present application is as follows: Figure 4 shown.
[0093] Thus, the film bending degree of each contour edge in the film area of each frame of the film grayscale image is obtained.
[0094] Step 4: Based on the motion abnormality and the film bending degree, determine the defect judgment coefficient of each contour edge in the film area of each frame of the film grayscale image, and perform defect detection on the surface of the optical protective film.
[0095] Furthermore, based on the motion abnormality and the film bending degree, a defect judgment coefficient is determined, specifically:
[0096] Normalizing the ratio of the motion abnormality to the film bending degree as a defect judgment coefficient of each contour edge in the film region of each frame of the film grayscale image;
[0097] Preferably, in this embodiment, the tanh function is used for normalization. As other implementation methods, the implementer may adopt other methods in the prior art, such as the sigmoid function, etc. This embodiment does not impose any special restrictions on this.
[0098] It should be noted that the greater the motion abnormality, the greater the possibility that the corresponding contour edge is a spot defect, and the smaller the curvature of the film, the smaller the curvature of the corresponding contour edge. Therefore, the more accurate the motion abnormality is calculated based on the position change of the corresponding contour edge between two adjacent frames of film grayscale images. Therefore, the larger the defect judgment coefficient obtained, the greater the degree to which the corresponding contour edge is a spot defect.
[0099] Furthermore, based on the defect judgment coefficient, the surface of the optical protective film is inspected for defects, specifically:
[0100] If the defect judgment coefficient is greater than a preset threshold, each contour edge in the film area of each frame of the film grayscale image is recorded as an abnormal edge;
[0101] Preferably, in this embodiment, the preset threshold value is 0.6. As for other implementation methods, the implementer can set it according to actual conditions.
[0102] If abnormal edges exist in the film area of multiple frames of film grayscale images, the optical protective film has a defect; otherwise, the optical protective film does not have a defect.
[0103] Preferably, in this embodiment, if abnormal edges exist in the film area of 5 consecutive frames of film grayscale images, the optical protective film has a defect. As other implementation methods, the implementer can set it according to actual conditions.
[0104] Thus, the optical protective film with defects is recovered and remade or repaired according to the defects on the surface of the optical protective film.
[0105] Based on the same inventive concept as the above-mentioned method, an embodiment of the present application also provides a defect detection system for an optical protective film, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned methods for defect detection of an optical protective film are implemented.
[0106] Based on the same inventive concept as the above method, an embodiment of the present application also provides a defect detection device for an optical protective film, comprising a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned methods for defect detection of an optical protective film are implemented.
[0107] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. In addition, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0108] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0109] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the present application. It should be noted that a person skilled in the art can make various modifications and improvements without departing from the spirit of the present application. Therefore, any simple modifications, equivalent variations, and modifications to the above embodiments made in accordance with the technical essence of the present application without departing from the content of the present application's technical solution fall within the scope of protection of the present application's technical solution.
Claims
1. A method for detecting defects in an optical protective film, characterized in that: The method comprises the following steps: Continuously capture the surface of the optical protective film on the conveyor belt to obtain a grayscale image of each film frame, and extract the film area and all its contour edges within each film grayscale image frame; Determining the matching contour edge corresponding to each contour edge in the film region of each film grayscale image frame based on the distance relationship between the contour edges in the film region of two adjacent film grayscale images; determining the relative displacement difference of each contour edge in the film region of each film grayscale image frame based on the change in the direction vector of the movement between each contour edge in the film region of each film grayscale image frame and its corresponding matching contour edge; analyzing the contour similarity between each contour edge and its corresponding matching contour edge, and determining the degree of motion abnormality of each contour edge in the film region of each film grayscale image frame based on the relative displacement difference; Determining the degree of distortion of each contour edge within the film region of each frame of the film grayscale image based on the gradient distribution of different pixels in a local neighborhood of each pixel within each contour edge of the film region of each frame of the film grayscale image, and the difference in gradients of different pixels within the local neighborhood; determining the degree of film curvature of each contour edge within the film region of each frame of the film grayscale image based on the degree of distortion of each contour edge and its corresponding matching contour edge; Determining a defect judgment coefficient of each contour edge in the film region of each frame of the film grayscale image based on the motion abnormality and the film bending degree, and performing defect detection on the surface of the optical protective film; Determining the possible degree of distortion of each contour edge within the film region of each frame of the film grayscale image includes: If the gradient of any pixel point within each contour edge of the film area in each frame of the film grayscale image is the largest in its neighborhood, the pixel point is recorded as a gradient pixel point; Set a local window of preset size with each pixel point within each contour edge as the center; Calculate the mean of the gradients of any gradient pixel point in the local window and the gradient pixel point closest to it in metric distance, record it as the first mean of any gradient pixel point, and record the metric distance as the second distance; Connecting any gradient pixel point and its nearest gradient pixel point within the local window of each pixel point within each contour edge as the endpoints of a line segment, and recording the average of the gradients of all pixels on the connected line segment except the endpoints as the second average of the any gradient pixel point; Using the ratio of the first mean value to the second mean value as the gradient coefficient of any gradient pixel point; Calculate the average value of the product of the reciprocal of the second distance and the gradient coefficient of all gradient pixel points in the local window, and record it as the local gradient value; The average of the local gradient values of all pixels within each contour edge in the film region of each film grayscale image frame is used as the distortion possibility of each contour edge in the film region of each film grayscale image frame.
2. The method for detecting defects in an optical protective film according to claim 1, wherein: The step of extracting the film region and all its contour edges in each frame of the film grayscale image includes: Perform edge detection on each frame of the film grayscale image and extract all contour edges within each frame of the film grayscale image; The area of the minimum circumscribed rectangle of each contour edge in each frame of the film grayscale image is calculated, and the contour edge corresponding to the minimum circumscribed rectangle with the largest area is recorded as the film area of each frame of the film grayscale image.
3. The method for detecting defects in an optical protective film according to claim 1, wherein: The step of determining the matching contour edge corresponding to each contour edge in the film area of each frame of the film grayscale image comprises: The centroid of each contour edge in the film area of each film grayscale image frame is the pixel point at the same position in the film grayscale image of the adjacent frame, which is recorded as the centroid corresponding point; The contour edge with the shortest distance to the point corresponding to the centroid in the adjacent film grayscale images is used as the matching contour edge corresponding to each contour edge in the film region of each film grayscale image.
4. The method for detecting defects in an optical protective film according to claim 1, wherein: Determining the relative displacement difference of each contour edge within the film region of each frame of the film grayscale image includes: For each contour edge within the film region of each film grayscale image frame, the direction vector between the centroid of each contour edge and the centroid of the corresponding matching contour edge is used as the relative motion vector of each contour edge; The direction vector between the center point of the film region between each film grayscale image frame and its adjacent film grayscale image frame is used as the motion vector of the film region in each film grayscale image frame; the opposite direction vector of the motion vector of the film region in each film grayscale image frame is recorded as the normal motion vector; The vector modulus of the difference between the relative motion vector of each contour edge and the normal motion vector is used as the relative displacement difference of each contour edge in the film area of each frame of the film grayscale image.
5. The method for detecting defects in an optical protective film according to claim 1, wherein: Determining the motion abnormality of each contour edge within the film region of each frame of the film grayscale image includes: Recording the distance between the position coordinates of all edge pixel points of each contour edge and the position coordinates of all edge pixel points of its corresponding matching contour edge as a first distance; The product of the first distance and the relative displacement difference is used as the motion abnormality of each contour edge in the film area of each frame of the film grayscale image.
6. The method for detecting defects in an optical protective film according to claim 1, wherein: The film bending degree of each contour edge in the film region of each film grayscale image frame is an average value of the distortion possibility between each contour edge and its matching contour edge in the film region of each film grayscale image frame.
7. The method for detecting defects in an optical protective film according to claim 1, wherein: The defect judgment coefficient of each contour edge in the film area of each frame of the film grayscale image is a normalized result of the ratio of the motion abnormality to the film bending degree.
8. A defect detection system for an optical protective film, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the defect detection method for an optical protective film as described in any one of claims 1 to 7 are implemented.
9. A defect detection device for an optical protective film, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the defect detection method for an optical protective film as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Evaluation method of LDPE (Low-Density Polyethylene) optical protective film resin
CN116973376A
Evaluation method of polyethylene raw material for optical protective film
CN116973381A