Light guide plate quality monitoring method and system based on image processing

Through Hough linear detection and distribution similarity analysis based on image processing, the problem of insufficient localized analysis capabilities in light guide plate defect recognition is solved, and more accurate defect recognition is achieved and the quality monitoring of light guide plates is improved. accuracy.

CN118279301BActive Publication Date: 2024-11-22JIANGSU HANYANG NEW MATERIAL TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410695136.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-11-22
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

The existing frequency domain filter detection method has insufficient local analysis capabilities in the identification of light guide plate defects, which is susceptible to uneven local grayscale distribution of image, and defect information is easily lost, affecting the recognition accuracy.

Method used

Using an image processing-based method, through Hough linear detection and distribution similarity analysis, the correlation between grayscale values ​​is determined and the connectivity domain is merged, the defect possibility of the area to be confirmed is selected, background and noise interference are eliminated, and defects are improved. Accuracy of identification.

Benefits of technology

It effectively eliminates background and noise interference, improves the accuracy of identification of defect areas of the light guide plate, enhances the ability to distinguish light guide points and defect areas, and improves the accuracy of quality monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279301B_ABST
    Figure CN118279301B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method and system for monitoring the quality of a light guide plate based on image processing. The method comprises the steps of: performing Hough line detection on each grayscale value in a grayscale image of a light guide plate to obtain a plurality of highlight points corresponding to each grayscale value in the Hough space, determining the distribution similarity between the two grayscale values ​​according to the distribution of the highlight points corresponding to the two grayscale values ​​in the Hough space and the sizes of the two grayscales, determining the correlation between the connected domains corresponding to the two grayscale values ​​according to the distribution similarity and the positional relationship between the connected domains corresponding to the two grayscale values, and then merging the connected domains, screening a plurality of areas to be confirmed in the merged area, screening the defective area according to the defect possibility of the area to be confirmed, and realizing the quality monitoring of the light guide plate. The present invention improves the accuracy of the quality monitoring of the light guide plate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method and system for monitoring the quality of a light guide plate based on image processing. Background Art

[0002] Light guide plate is a high-tech product that transforms line light source into surface light source. It has the distinct characteristics of ultra-thin, ultra-bright, uniform light guide, energy saving, and environmental protection. It is widely used in various electronic products such as LCD TVs, liquid crystal displays, and tablet computers. In the production process of light guide plate, due to the influence of factors such as raw material composition and processing technology, processing defects such as line scratches, crushing, and shadows will inevitably appear on the surface of the light guide plate. Therefore, it is necessary to monitor the quality of light guide plates.

[0003] At present, a frequency domain filtering detection method is generally used to identify defects in light guide plates. For example, a patent document with publication number "CN110084768B" and titled "Defect Detection Method for LCD Light Guide Plate Based on Background Filtering" discloses a method for identifying defects in light guide plates using a frequency domain filtering detection method. Specifically, the method comprises the following steps: collecting an LCD light guide plate image, performing iterative guided filtering on the LCD light guide plate image, performing frequency domain filtering on the image after guided filtering of the LCD light guide plate using a fast Fourier transform method, and segmenting the defective area on the image after frequency domain filtering of the LCD light guide plate using a maximum between-class variance method to obtain a detection result.

[0004] Although the above scheme can identify defects by filtering the background texture, the Fourier transform in the frequency domain filtering detection method is a global change, lacks local analysis capabilities, and is easily disturbed by the uneven local distribution of image grayscale. In the process of reconstructing the image, defect information is easily lost and background removal is incomplete, thereby affecting the accuracy of identifying defective areas in the light guide plate. Summary of the invention

[0005] In order to solve the problem of low accuracy in identifying defective areas in a light guide plate, the present invention provides a light guide plate quality monitoring method and system based on image processing.

[0006] In a first aspect, the present invention provides a method for monitoring the quality of a light guide plate based on image processing, which adopts the following technical solution:

[0007] The method for monitoring the quality of a light guide plate based on image processing comprises the following steps:

[0008] Collect a grayscale image of a light guide plate; perform Hough line detection on each grayscale value in the grayscale image to obtain multiple highlight points corresponding to each grayscale value in the Hough space; for any two grayscale values, determine the distribution similarity between the two grayscale values ​​according to the distribution of the highlight points corresponding to the two grayscale values ​​in the Hough space and the sizes of the two grayscale values; determine the correlation between the connected domains corresponding to the two grayscale values ​​according to the distribution similarity and the positional relationship between the connected domains corresponding to the two grayscale values, wherein the correlation is positively correlated with the distribution similarity; merge the connected domains according to the size of the correlation to obtain multiple merged areas; select the remaining merged areas except the background area and the noise area in all the merged areas as areas to be confirmed; determine the defect possibility of the area to be confirmed according to the positional distribution relationship between the area to be confirmed and the remaining areas to be confirmed, wherein the defect possibility reflects the position of the area to be confirmed and the degree of irregularity of the shape; screen the defective areas according to the size of the defect possibility to achieve quality monitoring of the light guide plate.

[0009] The effect is that the distribution similarity reflects the possibility that two grayscale values ​​belong to the same image feature, and the correlation obtained according to the distribution similarity reflects the possibility that the connected domains corresponding to the two grayscale values ​​belong to the same area of ​​the same image feature, so that each merged area obtained by merging the connected domains according to the correlation corresponds to an area of ​​an image feature, and the interference of background and noise is excluded. The area to be confirmed is a light guide point or a defective area. Since the position distribution and shape of the light guide points are relatively regular, the present invention uses the defect possibility to reflect the position of the area to be confirmed and the degree of irregularity of the shape, thereby distinguishing between light guide points and defective areas, making the quality monitoring of light guide plates more accurate.

[0010] In one embodiment, a Hough line detection is performed on each grayscale value in the grayscale image to obtain multiple highlight points corresponding to each grayscale value in the Hough space, including: taking any grayscale value appearing in the grayscale image of the light guide plate as the target grayscale value, setting the target grayscale value to 1, and setting the remaining grayscale values ​​to 0, to obtain a binary image of the light guide plate corresponding to the target grayscale value; and performing a Hough line detection on the binary image of the light guide plate to obtain multiple highlight points corresponding to the target grayscale value in the Huffman space.

[0011] The effect is that a highlight point in the Hough space represents a straight line in the image space. The present invention uses the distribution of the grayscale value of the highlight point in the Hough space to reflect the linear distribution of each grayscale value, so that the distribution similarity between the grayscale values ​​subsequently obtained based on the distribution of the highlight point is more accurate.

[0012] In one embodiment, the distribution similarity between the two gray values ​​satisfies the expression: ; In the formula, Represents the distribution similarity between grayscale value i and grayscale value j, i j; represents the kth highlight point corresponding to the gray value i in the Hough space; k represents the sequence number of the highlight point corresponding to the gray value i in the Hough space; Indicates the gray value j in the Hough space corresponding to the highlight point, to The highlight point with the smallest distance; Represents the highlight point in Hough space and The Euclidean distance between Indicates the number of highlight points corresponding to the gray value i in the Hough space; Indicates the number of highlight points corresponding to the gray value j in the Hough space; represents the maximum value function; represents an exponential function with a natural constant as base; represents a hyperparameter.

[0013] The effect is that distribution similarity comprehensively considers the difference between grayscale values ​​and the similarity between the distribution patterns of grayscale values. The more similar the distribution patterns are and the smaller the difference in grayscale values ​​is, the more likely the two corresponding grayscale values ​​are to be the same image feature. Distribution similarity helps to subsequently divide different areas for defect area identification.

[0014] In one embodiment, determining the association between connected domains corresponding to the two grayscale values ​​includes: taking any connected domain corresponding to grayscale value i as a target connected domain; for each connected domain corresponding to grayscale value j, if the connected domain is adjacent to the target connected domain, taking 0 as the association between the target connected domain and the connected domain; otherwise, forming a first set with all pixels contained in the bounding rectangle of the connected domain, forming a second set with all pixels contained in the bounding rectangle of the target connected domain, obtaining the number of elements in the intersection between the first set and the second set and the number of elements in the union, obtaining the ratio of the number of elements in the intersection to the number of elements in the union, and taking the product of the ratio and the distribution similarity between the grayscale value i and the grayscale value j as the association between the target connected domain and the connected domain.

[0015] The effect is that the correlation comprehensively considers the distribution similarity between the two grayscale values ​​and the positional relationship between the connected domains corresponding to the two grayscale values, reflecting the possibility that the connected domains corresponding to the two grayscale values ​​belong to the same area of ​​the same image feature. The subsequent division of different areas based on the correlation can avoid the defect area being divided into the same area as the light guide point, background, etc., so that the defect area finally obtained is more accurate.

[0016] In one embodiment, connected domains are merged according to the correlation size to obtain multiple merged areas, including: in response to the correlation being greater than or equal to a preset merging threshold, two connected domains corresponding to the correlation are marked as the same category; when a connected domain belongs to multiple categories at the same time, the multiple categories are merged into one category; all connected domains contained in a category are merged into one area as the merged area.

[0017] The effect is that the connected domains are categorized by the correlation between connected domains of different grayscale values. When the correlation is greater, the corresponding two connected domains are more likely to belong to the same area of ​​the same image feature. Then each merged area finally obtained is an area of ​​the same image feature, which is helpful for the subsequent identification of defective areas.

[0018] In one embodiment, the defect probability satisfies the expression:

[0019] ; In the formula, represents the defect possibility of the u-th area to be confirmed; u represents the serial number of the area to be confirmed; represents the distance between the uth unconfirmed area and the unconfirmed area with the smallest distance to it; It represents the average value of the distances between all the areas to be confirmed and the area to be confirmed with the smallest distance to them; Represents the standard deviation of the distances between all pending areas and the pending area with the smallest distance to them; Indicates the number of areas to be confirmed that are covered by the minimum bounding rectangle of the u-th area to be confirmed; represents the hyperbolic tangent function; Represents the maximum value function.

[0020] The effect is that the defect possibility combines the abnormal position distribution and shape of the area to be confirmed. The distribution of light guide points in the light guide plate is relatively uniform. When the position distribution of the area to be confirmed is irregular compared with the position distribution of other areas to be confirmed, the area to be confirmed is more likely to be a defect. The light guide points are nearly circular, the shape of the defect is uncertain and the span is wide. When the shape of the area to be confirmed is irregular, the area to be confirmed is more likely to be a defect. The abnormal position distribution and shape of the area to be confirmed can be combined to distinguish the defect area from the light guide points, so that the defect area obtained later based on the defect possibility is more accurate.

[0021] In one embodiment, acquiring the defective area in the grayscale image of the light guide plate according to the defect possibility includes: in response to the defect possibility being greater than or equal to a preset possibility threshold, taking the area to be confirmed as the defective area.

[0022] The effect is that the possibility of defects is used as the judgment criterion, the interference of the light guide point is eliminated, and the defect area obtained is more accurate.

[0023] In a second aspect, the present invention provides a light guide plate quality monitoring system based on image processing, which adopts the following technical solution:

[0024] The light guide plate quality monitoring system based on image processing comprises: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned light guide plate quality monitoring method based on image processing is implemented.

[0025] By adopting the above technical solution, the above-mentioned light guide plate quality monitoring method based on image processing is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is manufactured according to the memory and the processor for easy use.

[0026] The present invention has the following technical effects:

[0027] (1) The present invention eliminates the interference of background, noise and light guide points, and the defective area screened is more accurate, thereby improving the accuracy of light guide plate quality monitoring;

[0028] (2) Distribution similarity comprehensively considers the differences between grayscale values ​​and the similarities between the distribution patterns of grayscale values, reflecting the possibility that grayscale values ​​belong to the same image feature, which helps to distinguish defect areas from background, noise, and light guide points.

[0029] (3) The correlation comprehensively considers the distribution similarity between the two grayscale values ​​and the positional relationship between the connected domains, reflecting the possibility that the connected domain belongs to the same area of ​​the same image feature, avoiding the defect area being divided into the same area as the light guide point, background, etc., making the defect area finally obtained more accurate.

[0030] (4) The defect possibility integrates the position distribution anomalies and shape anomalies of the area to be confirmed, and can distinguish the defect area from the light guide point, making the defect area obtained based on the defect possibility size more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.

[0032] Figure 1 is a flow chart of a method for monitoring quality of a light guide plate based on image processing in an embodiment of the present invention;

[0033] Figure 2 It is a grayscale image of the light guide plate in the light guide plate quality monitoring method based on image processing in an embodiment of the present invention. DETAILED DESCRIPTION

[0034] 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 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0035] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0036] The embodiment of the present invention discloses a method for monitoring the quality of a light guide plate based on image processing, referring to Figure 1 , comprising steps S1 to S5:

[0037] S1: Collect the grayscale image of the light guide plate.

[0038] The image of the light guide plate is collected by a line array camera. The collected image is an RGB image. In order to facilitate subsequent processing, the collected RGB image is converted into a grayscale image. It should be noted that the present invention does not limit the type of line array camera used, and the implementer can select a line array camera according to the actual implementation situation, such as a CCD camera, a CMOS camera, etc.

[0039] At this point, a grayscale image of the light guide plate is acquired.

[0040] S2: Performing Hough line detection on each grayscale value in the grayscale image of the light guide plate to obtain a plurality of highlight points corresponding to each grayscale value in the Hough space.

[0041] It should be noted that the light guide plate is densely covered with multiple light guide points, which are bright white as a whole. The area on the light guide plate that is not a light guide point is called the background, and the background is dark black as a whole. When there is a defect, the defect may be close to the color of the light guide point or the background. It is impossible to extract the defect using methods such as threshold segmentation and edge detection. The light guide points on the light guide plate that are densely covered with multiple light guide points can effectively suppress the generation of moiré fringes. The light guide points on the light guide plate are usually randomly distributed, but in order to ensure that the light guide plate emits light evenly, the light guide points are not completely randomly distributed. The distance between adjacent light guide points fluctuates within a certain range, making the distribution of light guide points on the light guide plate relatively uniform. For example, Figure 2 is the grayscale image of the light guide plate, Figure 2 The distances between adjacent light guide points are not completely consistent, but the overall distribution is relatively uniform. Under the interference of Gaussian noise, the grayscale value inside the same light guide point in the grayscale image of the light guide plate is not unique, that is, the same image feature in the grayscale value image of the light guide plate contains multiple grayscale values. Since the distribution of light guide points is relatively uniform, the pixels corresponding to all light guide points are linearly distributed in multiple directions as a whole, while the shape of the defect is uncertain, and the distribution law of the pixels corresponding to the defect is different from the distribution law of the pixels on the light guide points. For example, the pixels in the line scratch defect are linearly distributed in only one direction, and the pixels in the crush defect are not linearly distributed. The distribution of pixels corresponding to different grayscale values ​​in the same image feature is similar, so the linear distribution of pixels corresponding to different grayscale values ​​in the same image feature is similar to the overall linear distribution of all pixels in the image feature. Therefore, the present invention analyzes the linear distribution of pixels corresponding to each grayscale value, so that the connected domains corresponding to different grayscale values ​​are subsequently merged according to the linear distribution of pixels corresponding to different grayscale values, so that the merged area belongs to the same area of ​​the same image feature.

[0042] Specifically, any grayscale value appearing in the grayscale image of the light guide plate is taken as the target grayscale value, the target grayscale value is set to 1, and the other grayscale values ​​are set to 0, so as to obtain a binary image of the light guide plate corresponding to the target grayscale value.

[0043] The binary image of the light guide plate corresponding to the target gray value is subjected to Hough line detection, and the binary image of the light guide plate corresponding to the target gray value is converted into the Hough space to obtain multiple highlight points in the Hough space, which are called multiple highlight points corresponding to the target gray value in the Hough space.

[0044] Similarly, multiple highlight points corresponding to each grayscale value in the grayscale image of the light guide plate in the Hough space are obtained.

[0045] It should be noted that a highlight point in the Hough space represents a straight line in the image space, and the brightness of the highlight point represents the number of points contained in the corresponding straight line in the image space. Since the overall distribution of the light guide points on the light guide plate is relatively uniform, the pixel points corresponding to the same grayscale value on different light guide points roughly present a linear distribution in multiple directions, while the defect shape is uncertain, and the linear distribution of the pixel points corresponding to the grayscale values ​​on different defects is different. Therefore, the present invention uses multiple highlight points in the Hough space to reflect the linear distribution of each grayscale value.

[0046] S3: Determine the distribution similarity between the two grayscale values ​​according to the distribution of highlight points corresponding to any two grayscale values ​​in the Hough space and the sizes of the two grayscale values, and determine the correlation between the connected domains corresponding to the two grayscale values ​​according to the distribution similarity and the positional relationship between the connected domains corresponding to the two grayscale values.

[0047] It should be noted that under the interference of Gaussian noise, the same image feature in the grayscale image of the light guide plate corresponds to multiple grayscale values, the multiple grayscale values ​​corresponding to the same image feature are similar, and the distribution law of each grayscale value is similar. Since a highlight point in the Hough space is a straight line in the image space, the highlight point corresponding to each grayscale value in the Hough space can reflect the linear distribution law of the pixel points corresponding to the grayscale value in the grayscale image of the light guide plate. Therefore, the present invention obtains the distribution similarity between different grayscale values ​​through the distribution law of the highlight points corresponding to different grayscale values ​​in the Hough space.

[0048] Specifically, for any two gray values, the present invention uses gray value i and gray value j to represent them, and i j.

[0049] According to the distribution of highlight points corresponding to the gray value i in the Hough space, the distribution of highlight points corresponding to the gray value j in the Hough space, and the grayscale difference between the gray value i and the gray value j, the distribution similarity between the gray value i and the gray value j is obtained.

[0050] Optionally, as an example, the method for obtaining the distribution similarity between the gray value i and the gray value j is:

[0051] According to the order of the horizontal coordinates of the highlight points from small to large, the coordinates of all the highlight points of gray value i constitute the first coordinate sequence, and the coordinates of all the highlight points of gray value j constitute the second coordinate sequence. The distance between the first coordinate sequence and the second coordinate sequence is obtained, and the value after the distance is negatively correlated and normalized is used as the first influencing factor, and the value after the absolute value of the difference between the gray value i and the gray value j is negatively correlated and normalized is used as the second influencing factor. The product of the first influencing factor and the second influencing factor is used as the distribution similarity between the gray value i and the gray value j. Since the lengths of the first coordinate sequence and the second coordinate sequence may be different, the present invention uses a dynamic time warping algorithm (Dynamic Time Warping, DTW) to obtain the distance between the first coordinate sequence and the second coordinate sequence. The implementer can choose other methods to obtain the distance between the first coordinate sequence and the second coordinate sequence according to the actual implementation situation.

[0052] It should be noted that, when the distance between the first coordinate sequence and the second coordinate sequence is smaller, it means that the distribution of the highlight points corresponding to the grayscale value i and the grayscale value j in the Hough space is more similar, then the linear distribution law of the pixel points corresponding to the grayscale value i in the grayscale value image of the light guide plate is more similar to the linear distribution law of the pixel points corresponding to the grayscale value j in the grayscale value image of the light guide plate. At the same time, when the difference between the grayscale value i and the grayscale value j is smaller, the grayscale value i and the grayscale value j are more likely to belong to the same image feature, and the distribution similarity between the grayscale value i and the grayscale value j is greater.

[0053] Preferably, as an example, the method for obtaining the distribution similarity between the gray value i and the gray value j is:

[0054] ;

[0055] In the formula, Represents the distribution similarity between grayscale value i and grayscale value j; represents the kth highlight point corresponding to the gray value i in the Hough space; k represents the sequence number of the highlight point corresponding to the gray value i in the Hough space; Indicates the gray value j in the Hough space corresponding to the highlight point, to The highlight point with the smallest distance; Represents the highlight point in Hough space and The Euclidean distance between Indicates the number of highlight points corresponding to the gray value i in the Hough space; Indicates the number of highlight points corresponding to the gray value j in the Hough space; represents the maximum value function; represents an exponential function with a natural constant as base; Represents a hyperparameter to prevent Too large to cause Always close to 0, the experience value is =20, due to The range of is [0,255], so the hyperparameter It needs to be in the range of [0,255]. Implementers can set the hyperparameters in the range of [0,255] according to the actual implementation situation. The value of .

[0056] In the formula, It reflects the difference between the grayscale value i and the grayscale value j. When the difference is greater, the grayscale value i and the grayscale value j are more likely to correspond to different image features in the grayscale image of the light guide plate. Conversely, when the difference is smaller, the grayscale value i and the grayscale value j are more likely to correspond to the same image feature in the grayscale image of the light guide plate.

[0057] In the formula, It reflects the distribution similarity between the highlight point corresponding to the gray value i in the Hough space and the highlight point corresponding to the gray value j in the Hough space. Since a highlight point in the Hough space is a straight line in the image space, the highlight point corresponding to the gray value i in the Hough space can reflect the linear distribution law of the pixel points corresponding to the gray value i in the grayscale image of the light guide plate. Therefore, the distribution similarity between the highlight point corresponding to the gray value i in the Hough space and the highlight point corresponding to the gray value j in the Hough space can further reflect the similarity of the distribution law of the gray value i and the gray value j. Under the influence of Gaussian noise, the same image feature in the grayscale image of the light guide plate contains a variety of different grayscale values. When the distribution laws of the two grayscale values ​​are more similar, the two grayscale values ​​are more likely to be the same image feature, for example, both are grayscale values ​​in the light guide point, or both are grayscale values ​​in the background, or both are grayscale values ​​corresponding to the same defect.

[0058] Therefore, when the difference between gray value i and gray value j The smaller it is, the more similar the distribution of the highlight points corresponding to the gray value i in the Hough space is to the highlight points corresponding to the gray value j in the Hough space. The larger it is, the greater the distribution similarity between the grayscale value i and the grayscale value j.

[0059] It should be noted that, since the same image feature contains multiple regions, for example, there are multiple light guide points, there may also be multiple defects, and the grayscale value of the defect may be the same as some of the grayscale values ​​in the light guide points, or it may be the same as some of the grayscale values ​​in the background. If the classification is performed directly based on the distribution similarity between the grayscale values, the defect and the light guide point may be classified into the same category, or the defect and the background may be classified into the same category. Therefore, the present invention analyzes each connected domain of each grayscale value to obtain the correlation between connected domains of different grayscale values, so that the connected domains can be merged according to the correlation later, so that the connected domains belonging to the same area of ​​the same image feature are merged into one area, avoiding the defect and the light guide point being merged into the same area, and the defect and the background being merged into the same area.

[0060] Specifically, connectivity analysis is performed on each grayscale value in the grayscale image of the light guide plate to obtain multiple connected domains of each grayscale value.

[0061] Any connected domain corresponding to gray value i is taken as the target connected domain. For each connected domain corresponding to gray value j, if all the pixels corresponding to the connected domain are not located in the eight-neighborhood of any pixel corresponding to the target connected domain, then the connected domain is considered to be not adjacent to the target connected domain, otherwise, the connected domain is considered to be adjacent to the target connected domain.

[0062] For each connected domain corresponding to the gray value j, when the connected domain is not adjacent to the target connected domain, 0 is used as the correlation between the target connected domain and the connected domain; when the connected domain is adjacent to the target connected domain, the correlation between the target connected domain and the connected domain is obtained according to the distribution similarity between the gray value i and the gray value j, and the positional relationship between the target connected domain and the connected domain.

[0063] Optionally, as an example, a method for acquiring the correlation between the target connected domain and the connected domain is:

[0064] The number of pixels in the connected domain that are adjacent to the pixels in the target connected domain is obtained as the first number, where the adjacent here means that a pixel is located within the eight neighborhoods of another pixel. The number of pixels on the boundary of the connected domain is taken as the second number, the ratio of the first number to the second number is obtained, and the product of the ratio and the distribution similarity between the gray value i and the gray value j is taken as the correlation between the target connected domain and the connected domain.

[0065] It should be noted that, when the number of pixel points in the connected domain that are adjacent to the pixel points in the target connected domain is greater, it means that the connected domain borders more with the target connected domain. Due to the influence of Gaussian noise, an area of ​​an image feature in the grayscale image of the light guide plate contains multiple grayscale values, and the pixel points corresponding to each grayscale value are distributed more randomly in an area of ​​the image feature, so that the pixel points corresponding to different grayscale values ​​contained in an area of ​​the same image feature are interspersed. When the connected domain borders more with the target connected domain, the connected domain and the target connected domain are more likely to be interspersed. If the distribution similarity between the grayscale value i and the grayscale value j is greater at this time, the connected domain and the target connected domain are more likely to belong to the same area of ​​the same image feature, and the correlation between the target connected domain and the connected domain is greater.

[0066] Preferably, as an example, a method for obtaining the correlation between the target connected domain and the connected domain is:

[0067] ;

[0068] In the formula, represents the association between the target connected domain and the zth connected domain adjacent to the target connected domain among all connected domains with gray value j; z represents the sequence number of the connected domain adjacent to the target connected domain among all connected domains with gray value j; Represents the set of all pixels contained in the bounding rectangle of the target connected domain; Represents the set consisting of all pixel points contained in the circumscribed rectangle of the zth connected domain adjacent to the target connected domain among all connected domains with gray value j; Represents the union symbol; Indicates the intersection symbol; Representing a collection and collection The number of pixels contained in the union of ; Representing a collection and collection The number of pixels contained in the intersection of Represents the distribution similarity between grayscale value i and grayscale value j.

[0069] In the formula, It reflects the degree of overlap between the target connected domain and the circumscribed rectangle of the zth connected domain adjacent to the target connected domain in all connected domains of gray value j. Due to the influence of Gaussian noise, a region of an image feature in the gray image of the light guide plate contains multiple gray values, for example, a light guide point contains multiple gray values, a scratch defect contains multiple gray values, and the pixel points corresponding to each gray value are distributed randomly in a region of the image feature, so that the pixel points corresponding to different gray values ​​contained in a region of the same image feature are interspersed, and the circumscribed rectangle of the connected domain formed by the pixel points corresponding to different gray values ​​contained in a region of the same image feature has a high degree of overlap. When two different gray values ​​belong to two different image features, or to two different regions of the same image feature, since the two image features or the two regions of the same image feature are distributed independently, not interspersed, the pixel points corresponding to the two different gray values ​​are also distributed independently, and at this time, the circumscribed rectangle of the connected domain formed by the pixel points corresponding to the two different gray values ​​has a low degree of overlap. For example, two different grayscale values ​​belong to the light guide point and the scratch respectively, or two different grayscale values ​​belong to two light guide points, the light guide point and the scratch are distributed independently, and the two light guide points are also distributed independently. Then, the minimum circumscribed rectangle of the connected domain formed by a grayscale value belonging to one light guide point and the minimum circumscribed rectangle of the connected domain formed by another grayscale value belonging to the scratch have a low overlap, and the minimum circumscribed rectangle of the connected domain formed by a grayscale value belonging to one light guide point and the minimum circumscribed rectangle of the connected domain formed by another grayscale value belonging to another light guide point have a low overlap. Therefore, when the overlap is When the value is higher, the target connected domain and the zth connected domain adjacent to the target connected domain among all connected domains with gray value j are more likely to belong to the same area of ​​the same image feature.

[0070] The target connected domain belongs to gray value i. When the distribution similarity between gray value i and gray value j is greater, it means that gray value i and gray value j are more likely to belong to the same image feature in the gray image of the light guide plate. Therefore, the present invention uses the distribution similarity between gray values The degree of overlap with the bounding rectangle of the connected domain Combined, we obtain the correlation between connected domains with different gray values. The greater the distribution similarity, the greater the overlap between the bounding rectangles. When is larger, the correlation is greater, and the target connected domain and the zth connected domain adjacent to the target connected domain among all connected domains with gray value j are more likely to belong to the same area of ​​the same image feature.

[0071] Similarly, the correlation between each connected domain of each gray value and each connected domain of each other gray value is obtained.

[0072] S4: merging the connected domains according to the size of the correlation to obtain multiple merged regions, and screening multiple regions to be confirmed according to the number of pixels in the merged regions.

[0073] A merge threshold S is preset to judge the merge of connected domains with different grayscale values ​​according to the correlation between them. The empirical value is S=0.6. It should be noted that since the correlation is in the range of [0,1], the merge threshold should also be in the range of [0,1]. The implementer can set the merge threshold S in the range of [0,1] according to the actual implementation situation.

[0074] When the correlation between a connected domain of one gray value and a connected domain of another gray value is greater than or equal to the merge threshold S, the two connected domains are marked as the same category. Similarly, the correlation between each connected domain of each gray value and each connected domain of each other gray value is judged to achieve the category labeling of all connected domains. When a connected domain belongs to multiple categories at the same time, multiple categories are merged into one category.

[0075] All connected domains contained in each category are merged into one region as the merged region.

[0076] It should be noted that the present invention classifies connected domains by the correlation between connected domains of different grayscale values. When the correlation is greater, the corresponding two connected domains are more likely to belong to the same area of ​​the same image feature. Finally, each merged area is an area of ​​the same image feature, such as the background, a light guide point, a defective area, etc.

[0077] At this point, multiple merged regions are obtained.

[0078] The number of pixels contained in each merged area is obtained, and the merged area containing the largest number of pixels is used as the background area, the merged area containing only one pixel is used as the noise area, and each merged area except the background area and the noise area is used as a to-be-confirmed area.

[0079] It should be noted that, since the background area and the noise area are removed, each area to be confirmed is a light guide point or a defect. The present invention analyzes each area to be confirmed, thereby screening defective areas.

[0080] S5: Determine the defect possibility of the area to be confirmed according to the position distribution relationship between the area to be confirmed and the other areas to be confirmed, select the defect area according to the defect possibility, and realize the quality monitoring of the light guide plate.

[0081] For each area to be confirmed, the minimum bounding rectangle of the area to be confirmed is obtained. If the minimum bounding rectangle of the area to be confirmed contains pixels in another area to be confirmed, then the minimum bounding rectangle of the area to be confirmed covers the other area to be confirmed. It should be noted that the minimum bounding rectangle of the area to be confirmed covers the area to be confirmed itself.

[0082] The defect possibility of the area to be confirmed is obtained based on the distance between the area to be confirmed and its nearest neighboring area and the minimum enclosing rectangle of the area to be confirmed:

[0083] ;

[0084] In the formula, represents the defect possibility of the u-th area to be confirmed; u represents the serial number of the area to be confirmed; represents the distance between the uth unconfirmed area and the unconfirmed area with the smallest distance to it; It represents the average value of the distance between all the areas to be confirmed and the area to be confirmed with the smallest distance; Represents the standard deviation of the distances between all pending areas and the pending area with the smallest distance to them; Indicates the number of areas to be confirmed that are covered by the minimum bounding rectangle of the u-th area to be confirmed; represents the hyperbolic tangent function; Represents the maximum value function.

[0085] In the formula, This reflects that the position distribution of the area to be confirmed is abnormal. The distribution of light guide points in the light guide plate is relatively uniform, and the distance between each light guide point and the light guide point with the smallest distance to it fluctuates within a certain range. However, the position of the defect in the light guide plate is not fixed. For example, if it is a crush defect, the distance between the defect and the light guide point with the smallest distance to it will be smaller than the distance between adjacent light guide points. Since most of all the areas to be confirmed are light guide points, the present invention calculates the average value of the distance between all the areas to be confirmed and the areas to be confirmed with the smallest distance to them. It is approximately regarded as the average distance between each light guide point and the light guide point closest to it, and the standard deviation of the distance between all the to-be-confirmed areas and the to-be-confirmed area with the smallest distance to it. As the fluctuation range of the distance between each light guide point and the light guide point with the smallest distance to it, when the distance between the uth to-be-confirmed area and the to-be-confirmed area with the smallest distance to it is and average The difference between the two is less than or close to the fluctuation range When , the distance between the u-th to-be-confirmed area and the to-be-confirmed area with the smallest distance to it conforms to the distance fluctuation between each light guide point and the light guide point with the smallest distance to it, the u-th to-be-confirmed area is more likely to be a light guide point. is smaller, that is, the location distribution of the u-th area to be confirmed is abnormally small; when the distance between the u-th area to be confirmed and the area to be confirmed with the smallest distance is equal to the average value The difference between them is much larger than the fluctuation range When , the distance between the u-th to-be-confirmed area and the to-be-confirmed area with the smallest distance to it does not conform to the distance fluctuation between each light guide point and the light guide point with the smallest distance to it, the u-th to-be-confirmed area is more likely to be a defective area. is larger, that is, the location distribution of the u-th area to be confirmed is abnormally large.

[0086] In the formula, It reflects that the shape of the area to be confirmed is abnormal. The light guide point is nearly circular, and there is a distance between different light guide points. The minimum bounding rectangle of a light guide point usually only covers itself, not other light guide points. The defects in the light guide plate may have irregular shapes and a wide span. For example, a line scratch defect is a long line, so that the minimum bounding rectangle of the defect may not only include the defect itself, but also the surrounding light guide points. When the number of areas to be confirmed covered by the minimum bounding rectangle of the u-th area to be confirmed is When the number of , the shape of the u-th area to be confirmed is more abnormal and the span is wider, the u-th area to be confirmed is more likely to be a defective area.

[0087] In the formula, The position distribution anomaly and shape anomaly of the area to be confirmed are combined to obtain the defect possibility of the u-th area to be confirmed. Larger or abnormally shaped When the value is larger, the uth area to be confirmed is more likely to be a defective area; on the contrary, when the position distribution of the uth area to be confirmed is abnormal The smaller the size, the more abnormal the shape. The smaller it is, the more likely the u-th area to be confirmed is a light guide point, and the smaller the possibility of a defect in the u-th area to be confirmed is.

[0088] At this point, the defect possibility of each area to be confirmed is obtained.

[0089] It should be noted that the defect possibility reflects the location of the area to be confirmed and the degree of irregularity of the shape. The above formula is only a preferred method for obtaining the defect possibility. The implementer can use other methods to obtain the defect possibility, as long as the obtained defect possibility can characterize the location of the area to be confirmed and the degree of irregularity of the shape.

[0090] A possibility threshold H is preset, and the empirical value is 0.83. The implementer can set it according to the actual implementation situation. It should be noted that the possibility threshold is used to screen and judge the possibility of defects in the area to be confirmed. Since the range of the possibility of defects in the area to be confirmed is [0,1], the possibility threshold needs to be set within the range of [0,1].

[0091] The area to be confirmed whose defect possibility is greater than or equal to the possibility threshold H is regarded as the defect area.

[0092] The defective area in the grayscale image of the light guide plate is marked, and the staff is reminded to process the light guide plate according to the defective area marked in the grayscale image of the light guide plate.

[0093] At this point, the defects on the light guide plate are obtained and the quality monitoring of the light guide plate is achieved.

[0094] An embodiment of the present invention also discloses a light guide plate quality monitoring system based on image processing, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a light guide plate quality monitoring method based on image processing according to the present invention is implemented.

[0095] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0096] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device.

[0097] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0098] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A light guide plate quality monitoring method based on image processing, characterized in that: include: Collecting a grayscale image of the light guide plate; Performing Hough line detection on each grayscale value in the grayscale image to obtain a plurality of highlight points corresponding to each grayscale value in the Hough space; For any two grayscale values, the distribution similarity between the two grayscale values ​​is determined according to the distribution difference of the highlight points corresponding to the two grayscale values ​​in the Hough space and the difference of the two grayscale values, and the distribution similarity is negatively correlated with the distribution difference of the highlight points and the difference of the two grayscale values; the correlation between the connected domains corresponding to the two grayscale values ​​is determined according to the distribution similarity and the positional relationship between the connected domains corresponding to the two grayscale values, and the correlation is positively correlated with the distribution similarity; Merging connected domains according to the magnitude of the correlation to obtain multiple merged regions; taking the remaining merged regions except the background region and the noise region in all the merged regions as the region to be confirmed; determining the defect possibility of the region to be confirmed according to the position distribution relationship between the region to be confirmed and the remaining regions to be confirmed, wherein the defect possibility reflects the position of the region to be confirmed and the degree of irregularity of the shape; The defective areas are screened according to the possibility of defects to achieve quality monitoring of the light guide plate.

2. The method for monitoring the quality of a light guide plate based on image processing according to claim 1, characterized in that: Performing Hough line detection on each grayscale value in the grayscale image to obtain multiple highlight points corresponding to each grayscale value in the Hough space, including: Any grayscale value appearing in the grayscale image of the light guide plate is taken as a target grayscale value, the target grayscale value is set to 1, and the remaining grayscale values ​​are set to 0, so as to obtain a binary image of the light guide plate corresponding to the target grayscale value; Hough line detection is performed on the binary image of the light guide plate to obtain multiple highlight points corresponding to the target grayscale value in the Huffman space.

3. The method for monitoring the quality of a light guide plate based on image processing according to claim 1, characterized in that: The distribution similarity between the two gray values ​​satisfies the expression: ; In the formula, Represents the distribution similarity between grayscale value i and grayscale value j, i j; represents the kth highlight point corresponding to the gray value i in the Hough space; k represents the sequence number of the highlight point corresponding to the gray value i in the Hough space; Indicates the gray value j in the Hough space corresponding to the highlight point, to The highlight point with the smallest distance; Represents the highlight point in Hough space and The Euclidean distance between Indicates the number of highlight points corresponding to the gray value i in the Hough space; Indicates the number of highlight points corresponding to the gray value j in the Hough space; represents the maximum value function; represents an exponential function with a natural constant as base; Represents a hyperparameter.

4. The method for monitoring the quality of a light guide plate based on image processing according to claim 1, characterized in that: Determining the correlation between the connected domains corresponding to the two grayscale values ​​includes: Take any connected domain corresponding to the gray value i as the target connected domain; For each connected domain corresponding to the gray value j, if the connected domain is adjacent to the target connected domain, 0 is used as the association between the target connected domain and the connected domain; otherwise, all pixel points contained in the bounding rectangle of the connected domain constitute a first set, and all pixel points contained in the bounding rectangle of the target connected domain constitute a second set, and the number of elements in the intersection and the number of elements in the union between the first set and the second set are obtained, and the ratio of the number of elements in the intersection to the number of elements in the union is obtained, and the product of the ratio and the distribution similarity between the gray value i and the gray value j is used as the association between the target connected domain and the connected domain.

5. The method for monitoring the quality of a light guide plate based on image processing according to claim 4, characterized in that: Connected domains are merged according to the magnitude of the association to obtain multiple merged regions, including: In response to the relevance being greater than or equal to a preset merging threshold, marking two connected domains corresponding to the relevance as the same category; when a connected domain belongs to multiple categories at the same time, merging the multiple categories into one category; All connected domains contained in the category are merged into one region as the merged region.

6. The method for monitoring the quality of a light guide plate based on image processing according to claim 1, characterized in that: The defect probability satisfies the expression: ; In the formula, represents the defect possibility of the u-th area to be confirmed; u represents the serial number of the area to be confirmed; represents the distance between the uth unconfirmed area and the unconfirmed area with the smallest distance to it; It represents the average value of the distances between all the areas to be confirmed and the area to be confirmed with the smallest distance to them; Represents the standard deviation of the distances between all pending areas and the pending area with the smallest distance to them; Indicates the number of areas to be confirmed that are covered by the minimum bounding rectangle of the u-th area to be confirmed; represents the hyperbolic tangent function; Represents the maximum value function.

7. The method for monitoring the quality of a light guide plate based on image processing according to claim 6, characterized in that: The step of acquiring a defective area in a grayscale image of the light guide plate according to the defect possibility comprises: In response to the defect possibility being greater than or equal to a preset possibility threshold, the area to be confirmed is regarded as a defect area.

8. A light guide plate quality monitoring system based on image processing, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for monitoring the quality of a light guide plate based on image processing according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Defect Detection Method for LCD Light Guide Plates Based on Background Filtering

    CN110084768B

  • Method for visual detection of defects of light guide plate of two-side light-incoming type

    CN108416766A

  • Road construction quality detection method and system based on artificial intelligence

    CN117173184A

  • Cylinder cover quality detection method and system

    CN117252882A

  • Method and device for detecting display panel defect

    US20230005130A1