CN109064451B - Light guide plate defect detection method - Google Patents

Light guide plate defect detection method Download PDF

Info

Publication number
CN109064451B
CN109064451B CN201810745359.XA CN201810745359A CN109064451B CN 109064451 B CN109064451 B CN 109064451B CN 201810745359 A CN201810745359 A CN 201810745359A CN 109064451 B CN109064451 B CN 109064451B
Authority
CN
China
Prior art keywords
image
light guide
guide plate
graph
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810745359.XA
Other languages
Chinese (zh)
Other versions
CN109064451A (en
Inventor
李俊峰
卢彭飞
楼小栋
胡浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Shunhao Technology Co ltd
Original Assignee
Hangzhou Shunhao Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Shunhao Technology Co ltd filed Critical Hangzhou Shunhao Technology Co ltd
Priority to CN201810745359.XA priority Critical patent/CN109064451B/en
Publication of CN109064451A publication Critical patent/CN109064451A/en
Application granted granted Critical
Publication of CN109064451B publication Critical patent/CN109064451B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention provides a defect detection method of a light guide plate, which comprises the following steps; 1) collecting an image F of the light guide plate; 2) performing threshold segmentation on the light guide plate image F by adopting a direct division method; 3) solving a connected domain of the foreground image; 4) extracting the whole communication domain of the light guide plate to obtain the maximum area of the graph; 5) rotating the picture to enable the longest edge of the maximum area graph to be parallel to the horizontal axis and enable the dense area to be located on the right side of the maximum area graph; 6) partitioning the rotated image; 7) performing Gaussian partial derivation on the manual partition mode display graph; 8) masking the Gaussian partial derivative local display image, and 9) solving the minimum and maximum gray values of the masked local display image; 10) carrying out normalization processing, 12) and image subtraction; 13) performing threshold segmentation; 14) calculating a connected domain of the divided local display image, 15) and extracting characteristics; 16) and displaying the defects extracted in the step 15.

Description

Light guide plate defect detection method
Technical Field
The invention relates to a light guide plate defect detection method, in particular to detection of defects of bright spots, scratches, pressure damages and the like of a light guide plate.
Background
The Light Guide Plate (LGP) is made of optical acrylic/PC board and then high-tech material with high reflectivity and no Light absorption, and the bottom of the optical acrylic board is printed with Light Guide points by V-shaped cross grid engraving, laser engraving and UV screen printing technology. The light guide plate has been used widely in many fields with its advantages such as light in weight, thin, high luminance, do benefit to environmental protection and easy maintenance, however, inevitably can produce defects such as fish tail, crushing wound, black point, white point in the light guide plate production process. The reasons and conditions for generating each kind of defects are different, for example, the defect scratch generation condition is divided into two stages of a front manufacturing process and a rear manufacturing process, and the scratch generated in the front manufacturing process is mainly divided into three conditions: (1) the surface of the mold core is scratched carelessly when the mold core is installed; (2) when the mold is abnormal (such as disassembling a slide block and maintaining the mold), the surface of the mold core is scratched carelessly; (3) when the surface of the mold core is wiped, the surface of the mold core is scratched due to unclean cotton or fingernails, and the like. The scratch generated in the post-processing process is divided into three cases: (1) unreasonable debugging of the equipment: the surface of the product is scratched by a certain part of post-processing equipment when the product is processed by a certain post-processing action; (2) when the surface of the light guide plate contacts with a certain part of the post-processing equipment and generates moving friction, the surface of the product is scratched (such as a cutting platform, a polishing platform, a cleaning roller and the like) due to larger friction with the surface of the light guide plate caused by unclean (particles, foreign matters and the like) of the contact surface of the light guide plate; (3) the surface of the product is scratched due to the nonstandard operation method of the inspector or carelessness and carelessness of the inspector. (e.g., when removing hair, the hair-removing knife scratches the product, etc.). The reasons for the occurrence of defective cold material (one or a plurality of spots of marks on the surface near the product gate (stub bar)) are divided into two cases: (1) the temperature difference of the melt at the end of the screw or near the hot runner is larger until the melt is cooled and becomes solid, the cooled melt is brought into a mold cavity during high-speed mold filling, and the surface of a product cannot be completely fused to leave a dot-shaped or linear mark; (2) when the plastic raw material is plasticized, the plastic raw material is not completely melted, a solid exists in a melt, and the plastic raw material is filled into a mold cavity and can not be completely fused to form pits and the like on the surface of a product. The existence of light guide plate defect can influence the use of relevant equipment, leads to the availability factor of equipment, and luminous homogeneity and life-span etc. all can receive the influence, and in addition, the credit of enterprise can seriously be harmd in the sales of defect light guide plate, causes great negative effect to the long-term development of enterprise, consequently, carries out quality testing to the light guide plate of production, rejects the inferior product and is especially important.
At present, domestic enterprises mainly rely on manual operation for detecting defects of light guide plates, but the manual operation has the following problems: (1) the eyesight health of the staff can be seriously damaged when the staff are in poor working environment for a long time; (2) staff are difficult to master the light guide plate detection technology with high complexity and difficulty; (3) the manual detection is very susceptible to the external environment, and the detection precision is difficult to ensure; (4) staff mainly judge according to naked eyes, and a quantifiable quality standard is difficult to form.
Since the above-mentioned defects of the light guide plate are small, in order to improve the detection accuracy, a high-precision line camera is required to acquire images. The size of the light guide plate image is about 500MB generally, and enterprises require that the detection time is controlled within 8 seconds, so that the requirement on a detection algorithm is very high. At present, methods such as curvelet transformation, contourlet transformation, shear wave transformation and the like are applied to defect detection of the light guide plate, but the algorithms have a certain gap from the actual requirements of enterprises, so that the key point is to improve the prior art and meet the requirements of the enterprises.
Accordingly, there is a need for improvements in the art.
Disclosure of Invention
The invention aims to provide an efficient light guide plate defect detection method.
In order to solve the above technical problems, the present invention provides a method for detecting defects of a light guide plate, comprising the following steps;
1) collecting an image F of the light guide plate; performing step 2);
2) performing threshold segmentation on the light guide plate image F by adopting a direct division method to obtain a foreground image, and executing the step 3);
3) solving a connected domain of the foreground image to obtain an overall connected domain solving image of the light guide plate; performing step 4);
4) extracting the whole communication domain of the light guide plate to obtain the maximum area of the graph to obtain a maximum area graph; performing step 5);
5) carrying out picture rotation on the maximum area graph, so that the longest edge of the maximum area graph is parallel to the horizontal axis and the dense area is positioned on the right side of the maximum area graph; performing step 6);
6) partitioning the rotated image to obtain a manual partitioning mode display image; performing step 7);
7) carrying out Gaussian partial derivation on the manual partition mode display graph to obtain a Gaussian partial derivation local display graph; performing step 8);
8) carrying out mask processing on the Gaussian partial derivative local display graph to obtain a mask processing local display graph; performing step 9);
9) calculating the minimum and maximum gray value of the local display image processed by the mask to obtain the maximum gray value Gk_maxAnd minimum gray value Gk_min(ii) a Performing step 10);
10) root of Chinese scholar treeAccording to the maximum gray value Gk_maxAnd minimum gray value Gk_minNormalizing the local display graph of the Gaussian partial derivative obtained in the step 7 to obtain a normalized local display graph; performing step 11);
12) subtracting the first local display image of the mean filtering from the second local display image of the mean filtering to obtain a subtracted local display image of the result of the two times of the mean filtering; performing step 11);
13) carrying out threshold segmentation on the local display graph obtained by subtracting the two average filtering results to obtain a segmented local display graph; performing step 14);
the threshold segmentation is to process the result image in step 10, and the threshold processing method is the same as that in step 2;
14) solving the connected domain of the divided local display graph to obtain a second local display graph of the connected domain; performing step 15);
15) extracting the characteristics; performing step 16);
16) and displaying the defects extracted in the step 15.
As an improvement on the light guide plate defect detection method, the optimal threshold calculation method in the step 2) comprises the following steps:
firstly, assuming that the gray scale of the light guide plate image F is L, the gray mean level of the neighborhood pixels is also L, the gray of the pixel point in the image and the gray mean of the neighborhood pixels can form a binary set (x, y), and the image probability density function of the binary set can be expressed as follows:
pxy=fxy/N
in (x, y), x represents the gray value of any pixel point in the image, y represents the neighborhood gray average value of the pixel point, fxyRepresenting the number of pixel points which simultaneously meet the gray value and the neighborhood mean value and accord with the (x, y) standard in the image, N representing the total number of pixels contained in the image, and pxyIs a probability density function, wherein:
Figure BDA0001724198940000031
suppose that the foreground region and the background region of the light guide plate image are respectively C1And C2The probability density function is expressed as follows:
Figure BDA0001724198940000032
Figure BDA0001724198940000033
the mean vector formula for the foreground and background regions can be expressed as follows:
Figure BDA0001724198940000034
Figure BDA0001724198940000035
then the overall mean vector can be expressed as:
Figure BDA0001724198940000036
assuming (s, t) is a pair of point pair thresholds in the two-dimensional histogram, the so-called direct-division method is to divide (s, t) into 4 regions, let { x ≦ s, y ≦ t } denote foreground region, { x > s, y > t } denote background region, and the remaining region probability density function is set to 0, so that:
Figure BDA0001724198940000041
then the optimum threshold(s)*,t*) Can be expressed as: trSB(s*,t*)=max{trSB(s, t) }. In the formula
trSB=ω1[(μ1xTx)2+(μ1yTy)2]+ω2[(μ2xTx)2+(μ2yTy)2]
As a further improvement of the defect detection method of the light guide plate, the step 5) comprises the following steps:
5.1: judging whether the maximum area graph needs to be subjected to picture rotation, and if the included angle between the longest edge of the maximum area graph and the horizontal axis is not 90 degrees or the dense area is not on the right side, executing the step 5.2; otherwise, executing step 6;
5.2: the rotation is performed by the amount of deflection of the included angle between the longest side of the maximum area graph and the horizontal axis, so that the longest side is parallel to the horizontal axis;
then if the dense area is on the left at this time, the image is rotated by 180 degrees; if the dense area is on the right side at the moment, no operation is carried out;
step 6 is then performed.
As a further improvement of the method for detecting defects of a light guide plate of the present invention, step 7) includes:
the vertical Gaussian partial derivative is adopted for processing, and the formula is as follows:
Figure BDA0001724198940000042
in the formula gk(x, y) is a gray value of the light guide plate image at (x, y) of the k-th region,
Figure BDA0001724198940000043
is the y-direction partial derivative.
As a further improvement of the method for detecting defects of a light guide plate of the present invention, the step 10) includes:
adjusting the gray value of the image area to be between 0 and 255 according to the result in the step 7, wherein the specific adjustment formula is as follows:
Figure BDA0001724198940000044
wherein mult is 255/(G)k_max-Gk_min),add=-255×Gk_min/(Gk_max-Gk_min)
Figure BDA0001724198940000045
Is the adjusted gray value at the k-th region (x, y).
As a further improvement of the method for detecting defects of a light guide plate of the present invention, step 11) includes:
firstly, carrying out first filtering on the normalized local display image, and then carrying out second filtering on the result of the first filtering, wherein the filtering formula is as follows:
Figure BDA0001724198940000046
Figure BDA0001724198940000047
Figure BDA0001724198940000051
in the above formula, a and b are the size of the filter window, NmIs the total number of pixels in the filter window, MmnIs the median value of the grey in the filtering window, gk(r, s) is the gray value at (r, s), gk(x + r, y + s) is the gray value at (x + r, y + s) in the filter window centered at (x, y) in the image.
As a further improvement of the method for detecting defects of a light guide plate of the present invention, step 12) includes:
the formula is as follows:
gk-(x,y)=(gk1(x,y)-gk2(x,y))×Factor+Value
in the formula gk1(x, y) is the gray value of the first filtered image at (x, y), gk2(x, y) is the gray Value of the second filtered image at (x, y), Factor is the correction Factor for the subtraction, Value is the correction Value for the subtraction, gk- (x, y) is the grey value of the subtracted resulting image at (x, y).
As a further improvement of the method for detecting defects of a light guide plate of the present invention, step 15) includes:
1) area extraction: determining the area of a single pixel according to the size of the visual field and the resolution of the image-taking camera, then calculating the number of pixels occupied by the area, and multiplying the number of pixels by the area of the single pixel to obtain the area of the area;
2) extracting eccentricity: the shadow curve is equivalent to a section of arc length of an ellipse, and the long semi-axis length R of the ellipse is calculated by combining the property of the ellipseAAnd minor semi-axis length RBThen the formula for the eccentricity is as follows:
Figure BDA0001724198940000052
the light guide plate defect detection method has the technical advantages that:
compared with other detection methods, the detection algorithm has simple program and convenient operation, and in addition, the dense region and the sparse region of the light guide points in the light guide plate can be separated and processed through manual partition, so that false detection is avoided, and the detection precision is greatly improved. The experimental results show that: the invention designs a stable and efficient algorithm which meets the accuracy requirement of enterprises in the current society and can be used for production.
The method has the following specific advantages:
1) and according to the retrieval conditions of domestic and foreign patents and thesis, the visual detection result without defects such as bright spots, line scratches, pressure scars and the like of the light guide plate is obtained. The invention discloses a stable visual detection method for defects such as bright spots, line scratches and crush damages of a light guide plate for the first time.
2) Due to the influence of the manufacturing process of the single-side light-entering type light guide plate, the light spots of the light guide plate are not uniformly distributed, the light spots are more densely distributed at the positions farther away from the light source, and the defect identification standards of the areas with different light spot distribution densities are different. According to the invention, the light guide plate image is partitioned according to the light spot distribution condition, and the defect detection algorithm is respectively designed for different partitioned images, so that the precision, stability and robustness of the detection algorithm can be effectively improved;
3) mean value filters with different sizes are respectively designed for each image of the light guide plate, and suspected defect areas are extracted on the basis of difference of twice filtering, so that the influence of external interference such as illumination, noise and the like on defect detection can be effectively reduced or even avoided;
4) the defects are determined by calculating the area parameters and the eccentricity of the connected domain, so that external interference caused in the imaging process can be avoided, and the accuracy of defect detection is effectively improved; the defects of different partitions can be filtered by setting the defect area, the eccentricity and the like, the quality detection requirements of different manufacturers and different grades of products are met, and the adaptability of the algorithm is improved;
5) the algorithm of the invention can carry out full-automatic detection only by carrying out a small amount of parameter adjustment;
6) the algorithm of the invention is stable and efficient, and is convenient to maintain.
Drawings
The following describes embodiments of the present invention in further detail with reference to the accompanying drawings.
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is an original drawing F of the light guide plate in step 1 of the present invention;
FIG. 3 is a graph of the light guide plate image threshold segmentation at step 2 of the present invention;
FIG. 4 is a drawing of the entire connected domain of the light guide plate in step 3 of the present invention;
FIG. 5 is a maximum area diagram of step 4 of the present invention;
FIG. 6 is a partial view of the light guide plate dense area in step 4 of the present invention;
FIG. 7 is a partial view of the sparse area of the light guide plate in step 4 of the present invention;
FIG. 8 is a rotated image of step 5 of the present invention;
FIG. 9 is a diagram of the manual partition mode of step 6 of the present invention;
FIG. 10 is a partial representation of the Gaussian partial derivative of step 7 after image segmentation in accordance with the present invention in the first (leftmost) region;
FIG. 11 is a partial view of the masking process of step 8 for the first (leftmost) region after image segmentation in accordance with the present invention;
FIG. 12 is a partial representation of the normalization process of step 10 for the first (leftmost) region after image segmentation in accordance with the present invention;
FIG. 13 is a partial display of the first mean filtering of step 11 for the first region (leftmost region) after image partitioning according to the present invention;
FIG. 14 is a partial diagram of the second mean filtering of step 11 for the first region (leftmost region) after image segmentation according to the present invention;
FIG. 15 is a partial display of the subtraction of the two mean filtering results of step 12 for the first (leftmost) region after image segmentation according to the present invention;
FIG. 16 is a partial display of the image after segmentation of the first region (leftmost region) in step 13 after image segmentation in accordance with the present invention;
FIG. 17 is a view showing a defective portion of a light guide plate in a first area (leftmost area) after image segmentation according to the present invention;
FIG. 18 is a schematic view of a first (leftmost) light guide plate with a light spot defect after image segmentation according to the present invention;
FIG. 19 is a diagram illustrating a first (leftmost) light guide plate crush defect after image segmentation in accordance with the present invention;
FIG. 20 is a diagram illustrating a first (leftmost) region of a light guide plate line scratch defect after image segmentation in accordance with the present invention.
Detailed Description
The invention will be further described with reference to specific examples, but the scope of the invention is not limited thereto.
Embodiment 1, a method for detecting defects of a light guide plate, as shown in fig. 1 to 20, includes the steps of:
1. considering that the fine defects in the light guide plate image need to be detected, and the precision requirement is high, a line scanning camera is adopted to collect the light guide plate image F; executing the step 2;
through observation, the shot light guide plate image is dense, clear and uniform, and is very favorable for defect detection.
2. Performing threshold segmentation on the light guide plate image F by adopting a direct division method to obtain a foreground image, and executing the step 3;
firstly, assuming that the gray scale of an image is L and the gray mean level of its neighboring pixels is also L, the gray of a pixel point in the image and the neighboring gray mean value can form a binary set (x, y), and the image probability density function of the binary set can be expressed as follows:
pxy=fxy/N
in (x, y), x represents the gray value of any pixel point in the image, y represents the neighborhood gray average value of the pixel point, fxyRepresenting the number of pixel points which simultaneously meet the gray value and the neighborhood mean value and accord with the (x, y) standard in the image, N representing the total number of pixels contained in the image, and pxyIs a probability density function, wherein:
Figure BDA0001724198940000071
suppose that the foreground region and the background region of the light guide plate image are respectively C1And C2Then their probability density function is expressed as follows:
Figure BDA0001724198940000072
Figure BDA0001724198940000073
the mean vector formula for the foreground and background regions can be expressed as follows:
Figure BDA0001724198940000074
Figure BDA0001724198940000075
then the overall mean vector can be expressed as:
Figure BDA0001724198940000081
assuming (s, t) is a pair of point pair thresholds in the two-dimensional histogram, the so-called direct-division method is to divide (s, t) into 4 regions, let { x ≦ s, y ≦ t } denote foreground region, { x > s, y > t } denote background region, and the remaining region probability density function is set to 0, so that:
Figure BDA0001724198940000082
then the optimum threshold(s)*,t*) Can be expressed as: trSB(s*,t*)=max{trsB(s, t) }. In the formula
trSB=ω1[(μ1xTx)2+(μ1yTy)2]+ω2[(μ2xTx)2+(μ2yTy)2]
3. Solving a connected domain of the foreground image to obtain an overall connected domain solving image of the light guide plate; executing the step 4;
the connected domain is that the area blocks which are not connected together in the image area obtained in step 2 are used as individual small areas to prepare for feature extraction.
4. Extracting the whole communication domain of the light guide plate to obtain the maximum area of the graph to obtain a maximum area graph; executing the step 5;
here, the part with the largest area of the region in step 3 is mainly extracted; the maximum area extraction formula is as follows:
Smax=max{Ii,i=1,2,3,……}
in the formula IiThe area of the ith block area in the image;
since the captured image may contain extraneous portions, such as partitions during image capture, the presence of these portions is a big disturbance to the detection of image defects, and therefore, it is important to keep the main portion and eliminate the secondary regions.
5. Carrying out picture rotation on the maximum area graph; executing the step 6;
the collected images sometimes have the situations of incorrect images and different left and right sparse areas of different images (such as left sparse and right sparse of the image a and left sparse and right dense of the image B), so for the following processing, the images need to be adjusted to a uniform standard (here, the light guide plate image dense area is uniformly located on the right side of the image).
Picture rotation here mainly involves two problems:
(1) judging the image angle; the image rotation firstly needs to judge the original angle of the image, and the judgment of the image angle is mainly determined according to the included angle between the horizontal axis and the longest edge of the image. Because the light guide plate images are all rectangular, the included angle between the longest side of the rectangular light guide plate image and the horizontal axis is made to be theta,
Figure BDA0001724198940000083
and determining the angle to be rotated according to the included angle.
(2) Judging the sparseness and the tightness of the left and right areas of the image of the light guide plate; because the left and right areas of the image of the light guide plate are distributed from sparse to dense (the sparse and dense of the lower areas on the same column are consistent), the image is rotated to enable the dense area to be positioned on the right of the image, and the sparse area is positioned on the left of the image, so that the subsequent processing can be greatly facilitated. The judgment of the sparse and dense area of the light guide plate is mainly judged by the gray average value of the image of the light guide plate. Because the light guide plate is dense, the light guide points are large in quantity and density, and the brightness values of the light guide points are high, the gray level mean angle of the light guide points in the area with the same area is high. The gray level mean formula is as follows:
Figure BDA0001724198940000091
in the formula, g (x, y) is the gray value of the image at (x, y), R is the area obtained by the Mean value, Num is the total number of pixel points in the area R, and Mean is the obtained Mean value.
The method specifically comprises the following steps:
5.1: judging whether the maximum area graph needs to be subjected to picture rotation, and if the included angle between the longest edge of the maximum area graph and the horizontal axis is not 90 degrees or the dense area is not on the right side, executing the step 5.2; otherwise, executing step 6;
5.2: the rotation is performed by the amount of deflection of the included angle between the longest side of the maximum area graph and the horizontal axis, so that the longest side is parallel to the horizontal axis;
if the dense area is on the left at this time, the image is rotated by 180 degrees; if the dense area is on the right side at the moment, no operation is carried out;
then, step 6 is executed;
6. partitioning the rotated image to obtain a manual partitioning mode display image; executing the step 7;
because the density of the light guide plate images is not uniform, if the light guide plate images are processed in a unified mode, the defect detection precision can be greatly reduced, and therefore manual partition processing is adopted in the invention.
The manual partitioning process is to manually divide the image into three regions according to the density of the light guide point, and the processing method of the three regions is completely the same (the method after the start of step 7), but slightly different in the setting of the parameters, so for the convenience of distinction and explanation, k is used herein to denote one of the three regions, and k belongs to [1, 3], and the explanation of k is the same as that of this case.
7. Performing Gaussian partial derivation on the manual partition mode display graph to obtain a Gaussian partial derivation local display graph; executing the step 8;
because scratch defect lines in the light guide plate are long and mostly vertical, in order to improve the detection precision, the invention considers that the scratch defect lines are processed by adopting Gaussian partial derivatives in the vertical direction. The formula is as follows:
Figure BDA0001724198940000092
in the formula gk(x, y) is the image of the light guide plate in the k-th areaThe gray value at (x, y),
Figure BDA0001724198940000093
is the y-direction partial derivative;
8. carrying out mask processing on the Gaussian partial derivative local display graph to obtain a mask processing local display graph; executing the step 9;
after the result image processed in step 7 is subjected to gaussian partial derivation, the four sides of the result image are very easy to generate interference, and the interference has a large influence on the following detection, so that the edge part of the image area is subjected to mask processing in the invention for facilitating subsequent processing.
The masking process is to mask the secondary region and process the primary region. Since the edge portions affected by the gaussian filtering interfere with the subsequent processing, these interfering edges are masked here and the main non-interfering areas are processed.
9. Calculating the minimum and maximum gray value of the local display image of the mask processing to obtain the maximum gray value Gk_maxAnd minimum gray value Gk_min(ii) a Executing the step 10;
since the gray-scale value of the image may exceed the range of 0-255, the gray-scale value of the image needs to be adjusted to be between the range of 0-255, but firstly, the minimum gray-scale value and the maximum gray-scale value of the image area must be defined; the minimum gray value and the maximum gray value are obtained by the following method:
Gk_max=max{gkl(x,y),k∈[1,3],l=1,2,3…}
Gk_min=min{gkl(x,y),k∈[1,3],l=1,2,3…}
gkl(x, y) is the 1 st pixel of the k-th region, Gk_maxAnd Gk_minRespectively the maximum and minimum gray value of the k-th region.
10. According to the maximum gray value Gk_maxAnd minimum gray value Gk_minNormalizing the local display graph of the Gaussian partial derivative obtained in the step 7 to obtain a normalized local display graph; executing the step 11;
the normalization process here is to adjust the gray-level value of the image area to be between 0 and 255 according to the result in step 7, and the specific adjustment formula is as follows:
Figure BDA0001724198940000101
wherein mult is 255/(G)k_max-Gk_min),add=-255×Gk_min/(Gk_max-Gk_min)
Figure BDA0001724198940000102
Is the adjusted gray value at the k-th region (x, y).
11. Carrying out two times of mean value filtering on the normalized local display graph to obtain a first time of mean value filtering local display graph and a second time of mean value filtering local display graph; executing the step 10;
since there is little noise in the image area, the invention herein employs mean filtering to filter the noise in the image. Here, the two-pass average filtering means that the image is firstly filtered, and then the result of the first filtering is filtered for the second time. The invention adopts a self-adaptive mean filtering method to process the image, and the formula is as follows:
Figure BDA0001724198940000103
Figure BDA0001724198940000104
Figure BDA0001724198940000111
in the above formula, a and b are the size of the filter window, NmIs the total number of pixels in the filter window, MmnIs the median value of the grey in the filtering window, gk(r, s) is the gray value at (r, s), gk(x + r, y + s) is the gray value at (x + r, y + s) in the filter window centered at (x, y) in the image.
12. Subtracting the first local display image of the mean filtering from the second local display image of the mean filtering to obtain a subtracted local display image of the result of the two times of the mean filtering; executing the step 11;
the subtraction of the filtering results is to subtract the second filtering result from the first filtering result in step 9; the formula is as follows:
gk-(x,y)=(gk1(x,y)-gk2(x,y))×Factor+Value
in the formula gk1(x, y) is the gray value of the first filtered image at (x, y), gk2(x, y) is the gray Value of the second filtered image at (x, y), Factor is the correction Factor for the subtraction, Value is the correction Value for the subtraction, gk- (x, y) is the grey value of the subtracted resulting image at (x, y).
13. Performing threshold segmentation on the local display graph obtained by subtracting the two average filtering results to obtain a segmented local display graph; step 14 is executed;
the threshold segmentation is to process the result image in step 10, and the threshold processing method is the same as that in step 2;
14. solving the connected domain of the divided local display graph to obtain a second local display graph of the connected domain; step 15 is executed;
the operation method for solving the connected domain is the same as the step 3;
15. extracting characteristics; step 16 is executed;
through the operation processing, the defect extraction interference of the light guide plate image is reduced, and the operation is gradually simplified. The invention mainly sets characteristic parameters such as area, eccentricity and the like aiming at different defects (such as scratches, bright spots and the like) extraction.
(1) And area parameters: area extraction: determining the area of a single pixel according to the size of the visual field and the resolution of the image-taking camera, then calculating the number of pixels occupied by the area, and multiplying the number of pixels by the area of the single pixel to obtain the area of the area;
since the defects in the image occupy a certain range, the combination of area extraction is a good choice. The area extraction mainly comprises the following steps: the area of a single pixel is determined according to the resolution of the camera and the shooting visual field range (the maximum width of the shot after the camera is fixed), then the number of pixels contained in the defect is calculated, and the area of the defect is obtained by multiplying the number of pixels by the area of the single pixel. If the area parameter range is set differently, the extracted defects are different, for example, if the area range is smaller (such as [0-100]), only the defects such as smaller bright spots and the like can be extracted; if the area range is set to be too large (e.g. 10000-. Therefore, the defect extraction should be based on the actual requirement to select parameters.
(2) And eccentricity parameters: because some defects (such as scratch lines) in the light guide plate image have the convex smooth property of an elliptic curve, the outline of the defect can be equivalent to a section of arc length of the elliptic curve, and the ratio of the long semi-axis length to the short semi-axis length is calculated according to the relevant property of the ellipse, wherein the formula is as follows:
Figure BDA0001724198940000121
in the formula rAAnd rBRespectively the major and minor semi-axis length of the ellipse, AsIs the calculated eccentricity.
Like the area parameter, the eccentricity parameter also needs to be adjusted to adapt to different defect detections.
16. Displaying defects;
and displaying the defects extracted in the step 15.
Experiment one
(1) Collecting the light guide plate image by using a line scanning camera;
(2) performing threshold segmentation on the collected light guide plate image by adopting the following formula;
trSB(s*,t*)=max{trSB(s,t)}。
trSB=ω1[(μ1xTx)2+(μ1yTy)2]+ω2[(μ2xTx)2+(μ2yTy)2]
(3) solving a connected domain from the result in the step 2;
(4) extracting the maximum area;
Smax=max{Ii,i=1,2,3,……}
(5) turning the image and uniformly placing the light guide point dense area in the light guide plate at the right end of the image according to the deflection angle of the image and the density of the left end and the right end of the image of the light guide plate; the image density position is judged as follows:
Figure BDA0001724198940000122
(6) manually dividing the light guide plate into three regions according to the sparseness and the confidentiality of the light guide plate image, wherein a letter k represents one of the three regions, and k belongs to [1, 3 ];
(7) carrying out Gaussian partial derivative processing on the image in the y direction;
Figure BDA0001724198940000123
(8) mask processing;
since there is interference at the edge of the image area after the gaussian partial derivative processing, the edge portion is masked to reduce the interference. (9) Calculating the minimum gray value and the maximum gray value in the light guide plate image; the formula is as follows:
Gk_max=max{gkl(x,y),k∈[1,3],l=1,2,3…}
Gk_min=min{gkl(x,y),k∈[1,3],l=1,2,3…}
(10) adjusting the gray value of the image to be between 0 and 255;
Figure BDA0001724198940000131
(11) filtering the mean value twice;
firstly, filtering an image for the first time, and then filtering for the first time on the first filtering result;
Figure BDA0001724198940000132
Figure BDA0001724198940000133
Figure BDA0001724198940000134
(12) subtracting the filtering results;
subtracting the second filtering result from the first filtering result in the step 9;
gk-(x,y)=(gk1(x,y)-gk2(x,y))×Factor+yalue
(13) threshold processing;
the threshold segmentation is to process the result image in step 10, and the threshold processing method is the same as that in step 2; (14) solving a connected domain; the method is the same as the step 3;
(15) extracting characteristics;
the characteristic extraction is carried out by combining the area and the eccentricity, and the processing parameters are slightly different due to the difference of the density of the image areas of the light guide plate and the difference of the sizes and the shapes of different defects.
(16) Displaying defects;
finally, it is noted that the above-mentioned lists merely illustrate some specific embodiments of the invention. It is obvious that the invention is not limited to the above embodiments, but that many variations are possible. All modifications which can be derived or suggested by a person skilled in the art from the disclosure of the present invention are to be considered within the scope of the invention.

Claims (7)

1. The light guide plate defect detection method is characterized by comprising the following steps;
1) collecting an image F of the light guide plate; performing step 2);
2) performing threshold segmentation on the light guide plate image F by adopting a direct division method to obtain a foreground image, and executing the step 3);
3) solving a connected domain of the foreground image to obtain an overall connected domain solving image of the light guide plate; performing step 4);
4) extracting the whole communication domain of the light guide plate to obtain the maximum area of the graph to obtain a maximum area graph; performing step 5);
5) carrying out picture rotation on the maximum area graph, so that the longest edge of the maximum area graph is parallel to the horizontal axis and the dense area is positioned on the right side of the maximum area graph; performing step 6);
6) partitioning the rotated image to obtain a manual partitioning mode display image; performing step 7);
7) carrying out Gaussian partial derivation on the manual partition mode display graph to obtain a Gaussian partial derivation local display graph; performing step 8);
8) carrying out mask processing on the Gaussian partial derivative local display graph to obtain a mask processing local display graph; performing step 9);
9) calculating the minimum and maximum gray value of the local display image processed by the mask to obtain the maximum gray value Gk_maxAnd minimum gray value Gk_min(ii) a Performing step 10);
10) according to the maximum gray value Gk_maxAnd minimum gray value Gk_minNormalizing the local display graph of the Gaussian partial derivative obtained in the step 7) to obtain a normalized local display graph; performing step 11);
11) firstly, carrying out first filtering on the normalized local display image, and then carrying out second filtering on the result of the first filtering;
12) subtracting the first local display image of the mean filtering from the second local display image of the mean filtering to obtain a subtracted local display image of the result of the two times of the mean filtering; performing step 13);
13) carrying out threshold segmentation on the local display graph obtained by subtracting the two average filtering results to obtain a segmented local display graph; performing step 14);
14) solving the connected domain of the divided local display graph to obtain a second local display graph of the connected domain; performing step 15);
15) extracting the characteristics; performing step 16);
16) and displaying the defects extracted in the step 15).
2. The light guide plate defect detection method according to claim 1, wherein the optimal threshold calculation method of step 2) comprises the steps of:
firstly, assuming that the gray scale of the light guide plate image F is L, the gray mean level of the neighborhood pixels is also L, the gray of the pixel point in the image and the gray mean of the neighborhood pixels can form a binary set (x, y), and the image probability density function of the binary set can be expressed as follows:
pxy=fxy/N
in (x, y), x represents the gray value of any pixel point in the image, y represents the neighborhood gray average value of the pixel point, fxyRepresenting the number of pixel points which simultaneously meet the gray value and the neighborhood mean value and accord with the (x, y) standard in the image, N representing the total number of pixels contained in the image, and pxyIs a probability density function, wherein:
Figure FDA0002693616910000021
suppose that the foreground region and the background region of the light guide plate image are respectively C1And C2The probability density function is expressed as follows:
Figure FDA0002693616910000022
Figure FDA0002693616910000023
the mean vector formula for the foreground and background regions can be expressed as follows:
Figure FDA0002693616910000024
Figure FDA0002693616910000025
then the overall mean vector can be expressed as:
Figure FDA0002693616910000026
assuming (s, t) is a pair of point pair thresholds in the two-dimensional histogram, the so-called direct-division method is to divide (s, t) into 4 regions, let { x ≦ s, y ≦ t } represent foreground region, { x > s, y > t } represent background region, and the remaining region probability density function is set to 0, so that:
ω12=1,
Figure FDA0002693616910000027
then the optimum threshold(s)*,t*) Can be expressed as: trSB(s*,t*)=max{trSB(s, t) }; in the formula
trSB=ω1[(μ1xTx)2+(μ1yTy)2]+ω2[(μ2xTx)2+(μ2yTy)2]。
3. The light guide plate defect detecting method according to claim 2, wherein the step 5) comprises:
5.1: judging whether the maximum area graph needs to be subjected to picture rotation, and if the included angle between the longest edge of the maximum area graph and the horizontal axis is not 90 degrees or the dense area is not on the right side, executing the step 5.2; otherwise, executing step 6);
5.2: the rotation is performed by the amount of deflection of the included angle between the longest side of the maximum area graph and the horizontal axis, so that the longest side is parallel to the horizontal axis;
then if the dense area is on the left at this time, the image is rotated by 180 degrees; if the dense area is on the right side at the moment, no operation is carried out; step 6) is then performed.
4. The light guide plate defect detection method of claim 3, wherein step 7) comprises:
the vertical Gaussian partial derivative is adopted for processing, and the formula is as follows:
Figure FDA0002693616910000031
in the formula gk(x, y) is a gray value of the light guide plate image at (x, y) of the k-th region,
Figure FDA0002693616910000032
is the y-direction partial derivative.
5. The light guide plate defect detection method according to claim 4, wherein the step 10) comprises:
adjusting the gray value of the image area to be between 0 and 255 according to the result in the step 7), wherein the specific adjustment formula is as follows:
Figure FDA0002693616910000033
wherein mult is 255/(G)k_max-Gk_min),add=-255×Gk_min/(Gk_max-Gk_min)
Figure FDA0002693616910000034
Is the adjusted gray value at the k-th region (x, y).
6. The light guide plate defect detecting method according to claim 5, wherein the step 12) comprises:
the formula is as follows:
gk-(x,y)=(gk1(x,y)-gk2(x,y))×Factor+Value
in the formula gk1(x, y) is the gray value of the first filtered image at (x, y), gk2(x, y) is the gray Value of the second filtered image at (x, y), Factor is the correction Factor for the subtraction, Value is the correction Value for the subtraction, gk- (x, y) is the grey value of the subtracted resulting image at (x, y).
7. The light guide plate defect detecting method according to claim 6, wherein the step 15) comprises:
1) area extraction: determining the area of a single pixel according to the size of the visual field and the resolution of the image-taking camera, then calculating the number of pixels occupied by the area, and multiplying the number of pixels by the area of the single pixel to obtain the area of the area;
2) extracting eccentricity: the shadow curve is equivalent to a section of arc length of an ellipse, and the long semi-axis length R of the ellipse is calculated by combining the property of the ellipseAAnd minor semi-axis length RBThen the formula for the eccentricity is as follows:
Figure FDA0002693616910000035
CN201810745359.XA 2018-07-09 2018-07-09 Light guide plate defect detection method Active CN109064451B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810745359.XA CN109064451B (en) 2018-07-09 2018-07-09 Light guide plate defect detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810745359.XA CN109064451B (en) 2018-07-09 2018-07-09 Light guide plate defect detection method

Publications (2)

Publication Number Publication Date
CN109064451A CN109064451A (en) 2018-12-21
CN109064451B true CN109064451B (en) 2020-11-24

Family

ID=64819677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810745359.XA Active CN109064451B (en) 2018-07-09 2018-07-09 Light guide plate defect detection method

Country Status (1)

Country Link
CN (1) CN109064451B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3491749B2 (en) * 1999-06-10 2004-01-26 株式会社ダン Finish inspection tool for circular knitted fabric products
TW573428B (en) * 2001-03-15 2004-01-21 Canon Kk Image reading apparatus and illumination apparatus
KR20130051726A (en) * 2011-11-10 2013-05-21 엘지디스플레이 주식회사 System for judging defect of warpage in light guide plate and method for judging defect of warpage in light guide plate using the same
CN205229061U (en) * 2015-11-23 2016-05-11 苏州鼎纳自动化技术有限公司 LCD light guide plate defect detecting system based on line sweep camera
CN106546605B (en) * 2016-10-26 2019-07-16 湖南大学 A kind of beer bottle mouth defect detection method using 4 circumferential registrations and hysteresis threshold
JP6265253B1 (en) * 2016-12-15 2018-01-24 オムロン株式会社 Inspection apparatus and inspection method
CN107993225B (en) * 2017-11-28 2020-06-23 电子科技大学 Defect identification method for magneto-optical eddy current imaging detection

Also Published As

Publication number Publication date
CN109064451A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN108460757B (en) Mobile phone TFT-LCD screen Mura defect online automatic detection method
CN108876768B (en) Shadow defect detection method for light guide plate
CN109102497B (en) High-resolution light guide plate image defect detection method
Choi et al. Detection of pinholes in steel slabs using Gabor filter combination and morphological features
CN108230324B (en) Visual detection method for microdefect on surface of magnetic shoe
CN109916910B (en) Photovoltaic glass edge defect detection system and corresponding method
CN108346141B (en) Method for extracting defects of single-side light-entering type light guide plate
CN114881915A (en) Symmetry-based mobile phone glass cover plate window area defect detection method
CN109064439B (en) Partition-based single-side light-entering type light guide plate shadow defect extraction method
CN108830857B (en) Self-adaptive Chinese character copy label image binarization segmentation method
CN104458764B (en) Curved uneven surface defect identification method based on large-field-depth stripped image projection
CN111681213A (en) Light guide plate line scratch defect detection method based on deep learning
CN112132828A (en) Film flaw detection method based on deep learning
CN109272525B (en) Light guide plate white point defect detection method
CN108020554A (en) A kind of steel strip surface defect recognition detection method
CN113686869A (en) Micro-defect recognition device for insulating blanket
CN113628161A (en) Defect detection method, defect detection device and computer-readable storage medium
CN113706461A (en) Micro-defect identification system of insulating blanket based on image identification
Chen et al. An efficient detection algorithm based on anisotropic diffusion for low-contrast defect
CN109064451B (en) Light guide plate defect detection method
CN110530894B (en) Light guide plate bright spot defect detection method
CN111563869B (en) Stain test method for quality inspection of camera module
CN116596899A (en) Method, device, terminal and medium for identifying circulating tumor cells based on fluorescence image
KR101543896B1 (en) Apparatus and method of detecting scap defect
Chen et al. A novel method for surface defect inspection of optic cable with short-wave infrared illuminance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant