A method and system for visual detection of surface defects of OCA optical films

By performing threshold segmentation and texture analysis on the grayscale image on the surface of the OCA optical film, the regional texture existence index and curvature mean value are calculated, which solves the problem of difficulty in distinguishing defects and impurities in traditional detection methods and improves the accuracy and precision of defect detection.

CN116993719BActive Publication Date: 2024-10-29HUIZHOU YIDU YUZHENG DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311235671.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-25
Publication Date
2024-10-29
Estimated Expiration
2043-09-25

AI Technical Summary

Technical Problem

Traditional machine vision inspection methods have the problem of missed and incorrect detection of defects when distinguishing surface defects and bulk impurities in OCA optical films. This is mainly because defects and impurities are difficult to distinguish in images, and defect detection relies on image pixel information and ignores areas. Texture information.

Method used

By obtaining the grayscale image of the OCA optical film surface, perform threshold segmentation and regional adhesion rate analysis, obtain the regional texture dispersion and Bezier curve staggeredness, calculate the regional texture existence index, and obtain defect classification indicators by combining straight line detection and curvature mean. , and then distinguish scratches and bubble defect areas to improve detection accuracy.

Benefits of technology

By analyzing the regional texture information in the image, we can accurately distinguish defects and impurity areas, improve the accuracy of defect detection, reduce missed detections and false detections, and improve the detection effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116993719B_ABST
    Figure CN116993719B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and proposes a method and system for visual detection of surface defects of an OCA optical film, including: segmenting an optical film grayscale image to obtain an area of ​​interest; obtaining the regional adhesion rate of the area of ​​interest, obtaining a first area of ​​interest and a second area of ​​interest; obtaining a fitting curve of the second area of ​​interest, thereby obtaining regional texture discreteness; obtaining the curvature of the pixel points on the fitting curve, thereby obtaining the Bezier curve asperity of the second area of ​​interest; obtaining a regional texture existence index according to the regional texture discreteness and the Bezier curve asperity, thereby obtaining a defect area; obtaining a fitting curve curvature mean according to the fitting curve curvature, obtaining texture straightness through straight line detection, obtaining a defect classification index according to the texture straightness and the fitting curve curvature mean, and obtaining a scratch defect area and a bubble defect area. The present invention aims to solve the problem of missed detection and false detection of surface defect detection of OCA optical films.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to an OCA optical film surface defect visual detection method and system. Background Art

[0002] OCA optical film is an optical adhesive film widely used in screen production. Its thickness is usually arrive It has the advantages of good light transmittance and strong anti-reflection ability. In the actual production process, there are two ways to detect this kind of optical film: manual detection and machine detection.

[0003] Since OCA optical film has the characteristics of good light transmittance, strong anti-reflection and small thickness, in the commonly used thin film detection method based on machine vision, the image preprocessing process is simple, and the feature extraction is only a simple calculation based on the defect shape. Although it can complete general thin film detection, when distinguishing the surface defects of OCA optical film, due to the physical properties of OCA optical film, when the defects on the surface of OCA optical film are obtained through traditional machine vision detection, the defects in the obtained defect image are not obvious compared with block impurities, such as dust clumps, which may cause defects to be missed or misdetected. Summary of the invention

[0004] In order to solve the above technical problems, the purpose of the present invention is to provide a method and system for visual inspection of surface defects of OCA optical films, so as to solve the problem that defects are not obvious when compared with blocky impurities in the existing traditional defect visual inspection methods, resulting in missed and false detection of defects. The technical solutions adopted are as follows:

[0005] A method for visually detecting surface defects of an OCA optical film, the method comprising the following steps:

[0006] Obtain a grayscale image of the surface of the OCA optical film, perform threshold segmentation on the grayscale image to obtain a region of interest; obtain a regional adhesion rate of the region of interest; and obtain a first region of interest and a second region of interest according to the regional adhesion rate;

[0007] Obtaining a fitting curve of the second region of interest, and obtaining regional texture discreteness of the second region of interest according to the fitting curve;

[0008] Obtaining the curvature of each pixel point on the fitting curve, and obtaining the Bezier curve variance of the second region of interest according to the curvature;

[0009] Obtain the regional texture existence index according to the regional texture discreteness and Bezier curve jitter;

[0010] Obtain defective areas according to regional texture existence index;

[0011] Obtaining a mean value of the curvature of the fitting curve according to the curvature of the fitting curve, performing straight line detection on the defect area to obtain grain straightness, and obtaining a defect classification index according to the grain straightness and the mean value of the curvature of the fitting curve;

[0012] Obtain the scratch defect area and the bubble defect area according to the defect classification index;

[0013] The obtaining of the fitting curve of the second region of interest, and obtaining the regional texture discreteness of the second region of interest according to the fitting curve, include: obtaining the fitting curve of the second region of interest, recording the pixel points on the fitting curve as the first curve pixel points, and recording the normal of the first curve pixel points on the curve as the first normal line; recording the pixel points in the second region of interest as the second region pixel points; taking the minimum Euclidean distance between the first curve pixel points and the second region pixel points on the first normal line as the curve offset, wherein if there are no pixels in the second region of interest on the first normal line, the curve offset is the second preset threshold; and recording the average value of the curve offset as the value of the regional texture discreteness;

[0014] The step of obtaining the curvature of each pixel point on the fitting curve and obtaining the Bezier curve variance of the second region of interest according to the curvature includes: recording the mean square error of the curvatures of all the pixel points on the fitting curve as the Bezier curve variance;

[0015] The method of obtaining the regional texture existence index according to the regional texture discreteness and the Bezier curve variability includes: normalizing the Bezier curve variability to obtain the normalized Bezier curve variability; recording the difference between the regional texture discreteness and the first constant as the first difference, recording the power with the natural constant as the base and the first difference as the exponent as the first index; recording the product of the first index and the normalized Bezier curve variability as the regional texture existence index;

[0016] The step of obtaining a mean curvature of the fitting curve according to the curvature of the fitting curve, performing straight line detection on the defective area to obtain grain straightness, and obtaining a defect classification index according to the grain straightness and the mean curvature of the fitting curve comprises: obtaining a mean curvature of pixel points on the fitting curve;

[0017] Using straight line detection on the defect area to obtain the number of straight lines whose angle difference is less than a fourth preset threshold;

[0018] The number of straight lines whose angle difference is less than the fourth preset threshold is recorded as the grain straightness of the defective area in the second region of interest; the difference between the number 1 and the mean curvature of the curve is recorded as the second difference, and the product of the grain straightness and the second difference is recorded as the defect classification index.

[0019] Further, performing threshold segmentation on the grayscale image to obtain the region of interest includes:

[0020] Processing the grayscale image by filtering to obtain a filtered grayscale image;

[0021] The filtered grayscale image is processed by the threshold segmentation algorithm to obtain the region of interest.

[0022] Further, obtaining the regional adhesion rate of the region of interest includes:

[0023] Mark the pixels in the region of interest as a type of pixel, and count the number of pixels of the type in the eight neighborhoods of each type of pixel;

[0024] The pixel points of the first category whose number of pixel points of the first category in the eight neighborhoods is greater than the first preset threshold are recorded as the pixel points of the second category;

[0025] The ratio of the number of second-category pixels to the number of first-category pixels in the region of interest is recorded as the regional adhesion rate.

[0026] Further, acquiring the first region of interest and the second region of interest according to the regional adhesion rate includes:

[0027] The region of interest whose regional adhesion rate is greater than a second preset threshold is recorded as a first region of interest, and the region of interest whose regional adhesion rate is less than or equal to the second preset threshold is recorded as a second region of interest.

[0028] Furthermore, the step of obtaining the defective area according to the regional texture existence index includes:

[0029] Recording a second region of interest where the regional texture existence index is less than a third preset threshold as a defective region;

[0030] The second region of interest whose regional texture existence index is greater than or equal to the third preset threshold is recorded as an impurity region.

[0031] In a second aspect, an embodiment of the present invention further provides an OCA optical film surface defect visual detection system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned methods when executing the computer program.

[0032] The beneficial effects of the present invention are:

[0033] Since the optical film is relatively thin, the traditional defect visual detection method has a strong anti-reflection ability when detecting defects on the OCA optical film. The defects and impurities are difficult to distinguish in the image due to scattering inside the film. At the same time, since the traditional visual detection method only considers the information of the pixel points in the image, and does not consider the texture information between different regions in combination with the scene, it is impossible to distinguish the area where a large number of large-particle impurities gather on the surface (such as dust balls) from defects. The present invention obtains the regional texture existence index by analyzing the contour shape of the area of ​​interest in the image. The regional texture existence index can reflect the texture direction of the area in the image, which is different from ordinary geometric features, and more accurately obtains defective areas with textures from impurity areas without texture features, avoiding the problem of missed detection and false detection in the defect detection process due to the acquired image features being too single, improving the defect detection accuracy and defect detection effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0035] Figure 1 A schematic flow chart of a method for visually detecting surface defects of an OCA optical film provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0037] See also Figure 1 , which shows a flow chart of a method for visually detecting surface defects of an OCA optical film provided by an embodiment of the present invention, the method comprising the following steps:

[0038] Step S001: Obtain image information and pre-process the image.

[0039] The present invention obtains an image of the surface of the OCA film by a linear array camera, performs continuous scanning at the speed of a product line to obtain an image in an RGB space, performs grayscale processing on the obtained image in the RGB space, and obtains a grayscale image F.

[0040] Furthermore, the image F is processed by mean filtering to eliminate the interference of noise in the environment. The filtered image F is processed by the Otsu threshold method to obtain the optimal segmentation threshold. The area composed of pixels in the image F whose gray value is less than the optimal segmentation threshold is recorded as the region of interest.

[0041] At this point, the region of interest is obtained.

[0042] Step S002: obtaining a regional adhesion rate of the region of interest, and obtaining a first region of interest and a second region of interest according to the regional adhesion rate.

[0043] Specifically, the regional adhesion rate within the region of interest The specific calculation method is:

[0044] ;

[0045] In the formula, is the regional adhesion rate; is the number of second-class pixels; is the number of pixels of a type.

[0046] Specifically, the first type of pixel points are the pixel points in the area of ​​interest; the second type of pixel points are the pixel points of the first type whose number of pixel points of the first type in the eight-neighborhood is greater than the first preset threshold; wherein the empirical value of the first preset threshold is 5.

[0047] Set the second preset threshold , the empirical value is 0.8, the regional adhesion rate Greater than the second preset threshold The region of interest is recorded as the first region of interest; the regional adhesion rate Less than or equal to the second preset threshold The region of interest is recorded as the second region of interest. The first region of interest is a larger foreign body or black spot on the OCA film, and the second region of interest is a smaller foreign body or black spot and defect region on the OCA film.

[0048] Specifically, if the region of interest is a larger foreign body or black spot on the OCA film, the region of interest is a black block that is smaller than the original image. The value of is larger; if the region of interest is a smaller foreign body or black spot and defect on the OCA film, the region of interest is a line with width, and the obtained regional adhesion rate The value of is smaller.

[0049] At this point, the first region of interest and the second region of interest are obtained.

[0050] Step S003, obtaining the regional texture discreteness and Bezier curve asperity of the second region of interest, obtaining the regional texture existence index according to the regional texture discreteness and Bezier curve asperity, and obtaining the defective region according to the regional texture existence index.

[0051] The pixel points of the second region of interest are fitted by the Bezier curve. The parameter of the fitting accuracy is 10. The regional texture discreteness is obtained according to the Bezier fitting curve. .

[0052] Specifically, the regional texture discreteness of the second region of interest The specific calculation method is:

[0053] ;

[0054] In the formula, is the regional texture discreteness; is the offset of the nth pixel point on the Bezier fitting curve, is the number of pixels on the Bezier fitting curve.

[0055] Specifically, obtain the normal of each pixel point on the Bezier fitting curve, obtain the minimum value of the Euclidean distance of the normal of the nth pixel point on the Bezier fitting curve intersecting with the pixel point of the second area of ​​interest, and record the minimum value of the Euclidean distance as the pixel point offset ; If there is no pixel point of the second region of interest on the normal line of the nth pixel point on the Bezier fitting curve, then The value of is a second preset threshold value; wherein the empirical value of the second preset threshold value is 10;

[0056] Calculate the average of the pixel offsets of the pixels on the Bezier fitting curve to obtain the texture discreteness corresponding to the second area of ​​interest .

[0057] Furthermore, the regional texture discreteness The larger the value, the more the pixels in the second area of ​​interest deviate from the Bezier fitting curve, and the worse the fitting effect. The smaller the value of , the closer the pixel points of the second region of interest are to the Bezier fitting curve, the greater the possibility that there are textures in the second region of interest, and the better the fitting effect.

[0058] Furthermore, the bubble and scratch defect areas are discrete pixel points with texture trends, and the Bezier curve fitting effect of the corresponding area is good. The smaller the area where the smaller foreign matter or black spot is located, the less texture trend there is, the poorer the fitting effect is, and the corresponding regional texture discreteness is The bigger.

[0059] Get the Bezier curve variance based on the Bezier fitting curve .

[0060] Specifically, the Bezier curve has a certain degree of variance. The specific calculation method is as follows: obtain the curvature of each pixel on the Bezier curve, obtain the mean square error of the curvature of all pixels on the Bezier curve, and use the mean square error of the curvature of the fitting curve as the Bezier curve variance. .

[0061] Furthermore, the bubble and scratch defect areas are defects formed by the regular force acting on the film. The pixels in the area tend to aggregate into lines. The curvature of the corresponding Bezier fitting curve is relatively fixed, and the obtained Bezier curve has a high degree of unevenness. Small; the pixels in the area where the small foreign matter or black spot is located are evenly distributed, and there is no tendency to gather to form lines. The curvature of the corresponding Bezier fitting curve changes greatly, and the obtained Bezier curve has a high degree of unevenness. Larger.

[0062] Furthermore, for the Bezier curve Perform normalization to obtain the normalized Bezier curve variance .

[0063] Further, according to the regional texture discreteness of the second region of interest and normalized Bezier curve variance Get the regional texture existence index .

[0064] Specifically, the regional texture existence index of the second region of interest is The specific calculation method is:

[0065] ;

[0066] In the formula, is the texture area existence index; is the first constant, and its empirical value is 3; is a natural constant; is the regional texture discreteness of the second region of interest; is the normalized Bezier curve jitter.

[0067] Specifically, when the second region of interest is a small foreign body or black spot, the pixels in the region are randomly distributed, there is no texture trend, the Bezier curve fitting effect is poor, and the normalized Bezier curve has a high degree of variance. Larger, The value of is greater than 1; when the second region of interest is the bubble and scratch defect area, the pixel points in the area are distributed regularly and have a texture trend, and the Bezier curve fitting effect is good. The value of is less than or equal to 1.

[0068] Furthermore, according to the regional texture dispersion Acquire the second region of interest for smaller foreign matter or black spot areas and bubble and scratch defect areas.

[0069] Specifically, the empirical value of the third preset threshold is 1.5.

[0070] When the regional texture dispersion When the discreteness of the regional texture is greater than the third preset threshold, the corresponding second region of interest is a smaller foreign body or black spot region. When it is less than or equal to the third preset threshold, the corresponding second region of interest is a bubble and scratch defect region.

[0071] At this point, the bubble and scratch defect areas are obtained.

[0072] Step S004: Divide the bubble and scratch defect regions of the second region of interest into bubble defect regions and scratch defect regions according to the defect classification index.

[0073] Perform Hough straight line detection on the bubble and scratch defect area of ​​the second area of ​​interest to obtain the straight lines in the area, and record the number of straight lines whose absolute value of the angle difference between the straight lines in the area is less than the fourth preset threshold as the texture straightness , where the empirical value of the fourth preset threshold is .

[0074] Furthermore, according to the straightness of the grain The defect classification index is obtained by taking the mean curvature of all pixels on the Bezier curve , the specific calculation method is:

[0075] ;

[0076] Specifically, in the formula, It is a defect classification indicator; is the mean curvature of all pixels on the Bezier curve; Straightness of the texture in the bubble and scratch defect area .

[0077] If the bubble and scratch area is the scratch defect area, then The value is close to 0, the grain straightness The value of is larger; if the bubble and scratch defect area is the bubble defect area, then The value is close to 1, the grain straightness The value of is smaller.

[0078] Furthermore, the empirical value of the fifth preset threshold is 15.

[0079] When the defect classification index When the value of is greater than the fifth preset threshold, the bubble and scratch defect areas corresponding to the second area of ​​interest are scratch defect areas; when the defect classification index When the value of is less than or equal to the fifth preset threshold, the bubble and scratch defect area corresponding to the second region of interest is a bubble defect area.

[0080] At this point, the larger foreign matter or black spot area, the smaller foreign matter and black spot area, the scratch defect area and the bubble defect area in the image F are obtained, and the detection of the surface defects of the OCA optical film is completed.

[0081] It should be noted that the above-mentioned sequence of the embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned specific embodiments of this specification are described. In some cases, the actions or steps recorded in the embodiments of the present invention can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0082] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for visually detecting surface defects of an OCA optical film, characterized in that: The method comprises the following steps: Obtain a grayscale image of the surface of the OCA optical film, perform threshold segmentation on the grayscale image to obtain a region of interest; obtain a regional adhesion rate of the region of interest; and obtain a first region of interest and a second region of interest according to the regional adhesion rate; Obtaining a fitting curve of the second region of interest, and obtaining regional texture discreteness of the second region of interest according to the fitting curve; Obtaining the curvature of each pixel point on the fitting curve, and obtaining the Bezier curve variance of the second region of interest according to the curvature; Obtain the regional texture existence index according to the regional texture discreteness and Bezier curve jaggedness; Obtain defective areas according to regional texture existence index; Obtaining a mean value of the curvature of the fitting curve according to the curvature of the fitting curve, performing straight line detection on the defect area to obtain grain straightness, and obtaining a defect classification index according to the grain straightness and the mean value of the curvature of the fitting curve; Obtain the scratch defect area and the bubble defect area according to the defect classification index; The obtaining of the fitting curve of the second region of interest, and obtaining the regional texture discreteness of the second region of interest according to the fitting curve, include: obtaining the fitting curve of the second region of interest, recording the pixel points on the fitting curve as the first curve pixel points, and recording the normal of the first curve pixel points on the curve as the first normal line; recording the pixel points in the second region of interest as the second region pixel points; taking the minimum Euclidean distance between the first curve pixel points and the second region pixel points on the first normal line as the curve offset, wherein if there are no pixels in the second region of interest on the first normal line, the curve offset is the second preset threshold; and recording the average value of the curve offset as the value of the regional texture discreteness; The step of obtaining the curvature of each pixel point on the fitting curve and obtaining the Bezier curve variance of the second region of interest according to the curvature includes: recording the mean square error of the curvatures of all the pixel points on the fitting curve as the Bezier curve variance; The step of obtaining the regional texture existence index according to the regional texture discreteness and the Bezier curve variability includes: normalizing the Bezier curve variability to obtain the normalized Bezier curve variability; recording the difference between the regional texture discreteness and the first constant as the first difference, recording the power with the natural constant as the base and the first difference as the exponent as the first exponent; recording the product of the first exponent and the normalized Bezier curve variability as the regional texture existence index; The step of obtaining a mean curvature of the fitting curve according to the curvature of the fitting curve, performing straight line detection on the defective area to obtain grain straightness, and obtaining a defect classification index according to the grain straightness and the mean curvature of the fitting curve includes: obtaining a mean curvature of pixel points on the fitting curve; Using straight line detection on the defect area to obtain the number of straight lines whose angle difference is less than a fourth preset threshold; The number of straight lines whose angle difference is less than the fourth preset threshold is recorded as the grain straightness of the defective area in the second region of interest; the difference between the number 1 and the mean curvature of the curve is recorded as the second difference, and the product of the grain straightness and the second difference is recorded as the defect classification index.

2. The method for visually detecting surface defects of an OCA optical film according to claim 1, characterized in that: The step of performing threshold segmentation on the grayscale image to obtain the region of interest comprises: Processing the grayscale image by filtering to obtain a filtered grayscale image; The filtered grayscale image is processed by the threshold segmentation algorithm to obtain the region of interest.

3. The method for visually detecting surface defects of an OCA optical film according to claim 1, characterized in that: The obtaining of the regional adhesion rate of the region of interest comprises: Mark the pixels in the region of interest as a type of pixel, and count the number of pixels of the type in the eight neighborhoods of each type of pixel; The pixel points of the first category whose number of pixel points of the first category in the eight neighborhoods is greater than the first preset threshold are recorded as the pixel points of the second category; The ratio of the number of second-category pixels to the number of first-category pixels in the region of interest is recorded as the regional adhesion rate.

4. The method for visually detecting surface defects of an OCA optical film according to claim 1, characterized in that: The acquiring of the first region of interest and the second region of interest according to the regional adhesion rate includes: The region of interest whose regional adhesion rate is greater than a second preset threshold is recorded as a first region of interest, and the region of interest whose regional adhesion rate is less than or equal to the second preset threshold is recorded as a second region of interest.

5. The method for visually detecting surface defects of an OCA optical film according to claim 1, characterized in that: The method of obtaining the defective area according to the regional texture existence index includes: Recording a second region of interest where the regional texture existence index is less than a third preset threshold as a defective region; The second region of interest whose regional texture existence index is greater than or equal to the third preset threshold is recorded as an impurity region.

6. An OCA optical film surface defect visual inspection system, 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 method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Differential curvature-based liver surface smoothness measuring method

    CN113487568A

  • Plastic particle quality detection method

    CN116030060A