CN114792310A - Mura defect detection method for edge blurring in LCD screen - Google Patents
Mura defect detection method for edge blurring in LCD screen Download PDFInfo
- Publication number
- CN114792310A CN114792310A CN202210467455.9A CN202210467455A CN114792310A CN 114792310 A CN114792310 A CN 114792310A CN 202210467455 A CN202210467455 A CN 202210467455A CN 114792310 A CN114792310 A CN 114792310A
- Authority
- CN
- China
- Prior art keywords
- image
- value
- gray
- defect
- pixel
- 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.)
- Pending
Links
- 230000007547 defect Effects 0.000 title claims abstract description 99
- 238000001514 detection method Methods 0.000 title claims abstract description 54
- 238000000034 method Methods 0.000 claims abstract description 49
- 238000012545 processing Methods 0.000 claims abstract description 33
- 238000005070 sampling Methods 0.000 claims abstract description 26
- 230000000740 bleeding effect Effects 0.000 claims abstract description 16
- 230000008569 process Effects 0.000 claims abstract description 15
- 230000000873 masking effect Effects 0.000 claims abstract description 8
- 238000001914 filtration Methods 0.000 claims description 24
- 238000010606 normalization Methods 0.000 claims description 20
- 238000013507 mapping Methods 0.000 claims description 12
- 238000005520 cutting process Methods 0.000 claims description 10
- 230000010339 dilation Effects 0.000 claims description 7
- 230000002708 enhancing effect Effects 0.000 claims description 7
- 238000012216 screening Methods 0.000 claims description 5
- 230000009466 transformation Effects 0.000 claims description 5
- 238000005429 filling process Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 abstract description 18
- 235000013399 edible fruits Nutrition 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 10
- 238000004364 calculation method Methods 0.000 description 5
- 238000000926 separation method Methods 0.000 description 5
- 238000009826 distribution Methods 0.000 description 3
- 238000003708 edge detection Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 230000002950 deficient Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 239000000356 contaminant Substances 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 230000003631 expected effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 238000011946 reduction process Methods 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
- 230000008961 swelling Effects 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
- G06T5/30—Erosion or dilatation, e.g. thinning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30121—CRT, LCD or plasma display
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Quality & Reliability (AREA)
- Image Processing (AREA)
Abstract
The invention provides a Mura defect detection method with fuzzy edges in an LCD screen, which realizes accurate detection of defects by adding noise and is suitable for screens with different shapes and sizes; for bleeding points in the edge area of the screen, filling is carried out before detection, and masking is carried out after detection, so that bleeding points are prevented from being located at detection nodes(iii) effect of fruit; aiming at the problem of larger image resolution, the size of the image is reduced to the original size by adopting a down-sampling modeNot only is the image processing time saved, but also effective data in the image is reserved; after the whole image processing process is finished, the result graph is restored to the original size in an up-sampling mode, and the site operation workers can conveniently check, analyze and judge the result graph.
Description
Technical Field
The invention relates to the field of machine vision detection, in particular to a Mura defect detection method for edge blurring in an LCD screen.
Background
LCD screens are typically composed of multiple materials and substrate layers that are bonded together, and often during the bonding process, various contaminants, bubbles, migrates, or other imperfections can enter the LCD screen causing Mura defects. The presence of Mura defects severely affects the yield of LCD screens. Currently, there are three main detection methods for Mura defect of blurred edge. First, traditional detection methods by the human eye are relied upon. The method has the defects of low detection speed, low efficiency, incapability of meeting the requirement of high-speed automatic production lines, low detection precision and the like. Secondly, in the edge detection scheme, because the edge of the defect is very fuzzy, and the gray value of the pixel point in the edge area is in a gradual change state, the edge cannot be effectively extracted, and the defect cannot be effectively detected. The edge detection scheme detection effect is shown in fig. 1. Finally, in the foreground and background separation scheme, in the existing foreground and background separation scheme, it is desirable to process an input image to obtain a foreground image containing defects and a background image without defects, and then perform comparison and differentiation. However, due to the characteristic of blurred defect edges, the foreground image and the background image obtained through the foreground and background separation operation both contain the defect or do not have the defect, so that the defect cannot be detected through the subsequent contrast difference operation. The detection effect of the foreground and background separation scheme is shown in fig. 2. In general, the three mainstream methods are insufficient for Mura defects with blurred edges in LCD screens, and it is difficult to achieve the desired effect. The expected effect is shown in figure 3.
The prior art discloses a patent of an online automatic detection method for Mura defects of a mobile phone TFT-LCD screen, which firstly acquires a mobile phone screen image to be detected through a CCD industrial camera; then, extracting an interested area, geometrically correcting and filtering the image to be detected to obtain a TFT-LCD screen area in the image; then, carrying out blocking operation on the screen area, and enhancing Mura defects in the image by using a self-adaptive local enhancement algorithm according to the gray distribution characteristics of each sub-image block; and finally, extracting the Mura defect in the image by adopting a threshold value method and morphological opening operation. The method can automatically identify the Mura defects with low contrast and fuzzy edges, has high accuracy and strong robustness, can effectively solve the problems of high manual detection cost, low efficiency and low accuracy in the production process, and has important significance for improving the production efficiency and quality of the TFT-LCD screen of the mobile phone. However, it is only reported that the defect edge blurring problem can be effectively solved by adding appropriate noise to the difference.
Disclosure of Invention
The invention provides a Mura defect detection method for edge blurring in an LCD screen, which can effectively solve the problem of defect edge blurring by adding proper noise to carry out difference, thereby realizing effective detection on the Mura defect with edge blurring and improving the detection accuracy.
In order to achieve the technical effects, the technical scheme of the invention is as follows:
a Mura defect detection method for edge blurring in an LCD screen comprises the following steps:
s1: extracting a region of interest in the image through image cropping;
s2: performing gaussian filtering on the image in the step S1 to filter gaussian noise;
s3: down-sampling the image processed in step S2 to reduce the resolution of the image;
s4: performing edge filling on the image subjected to the step S3, and filling a non-screen area of an edge area;
s5: selecting a certain position in the image obtained in the step S4 for noise addition;
s6: differentiating the image added with the noise after the step S5 and the image obtained in the step S4, and enhancing a differential result image;
s7: carrying out binarization and expansion processing on the image obtained in the step S6, and screening out defects;
s8: and (4) performing up-sampling and masking on the image obtained in the step (S7), recovering the resolution of the image, and shielding false detection of a non-screen area.
Further, in step S1, since the LCD screen has various shapes and sizes, in order to ensure that all areas of the product to be measured can be photographed in the detection process of the actual industrial field, the field of view of the camera must be larger than the area to be measured, so a certain bleeding position is left in the edge area of the screen, the area to be measured of the LCD screen needs to be cut out for subsequent processing, and the image cutting employs manual input of screen edge coordinates for cutting and automatic calculation of edge coordinates for cutting.
Further, in step S2, the specific operation of gaussian filtering is: scanning each pixel point in the image by using a template, replacing the gray value of the central pixel point of the template by using the weighted average gray value of the pixel points in the neighborhood determined by the template, and performing filtering processing by using the template with the kernel of 45 multiplied by 45 and the standard deviation of 0.
Further, in step S3, the height and width of the image are reduced to the original height and width, respectively, using a down-sampling mode of bilinear interpolationDetermining the gray values of corresponding pixel points in the target image by utilizing the gray values of four real pixel points around the virtual point in the original image, and calculating the gray values corresponding to the virtual point, specifically:
f(dx,0)=f(0,0)*(1-dx)+f(1,0)*dx (1)
f(dx,1)=f(0,1)*(1-dx)+f(1,1)*dx (2)
f(dx,dy)=f(dx,0)*(1-dy)+f(dx,1)*dy (3)
where f (0,0) represents a gradation value with coordinates (0,0), f (0,1) represents a gradation value with coordinates (0,1), f (1,0) represents a gradation value with coordinates (1,0), f (1,1) represents a gradation value with coordinates (1,1), f (dx,0) represents a gradation value with coordinates (dx,0), f (dx,1) represents a gradation value with coordinates (dx,1), and f (dx, dy) represents a gradation value with coordinates (dx, dy).
Further, in step S4, the filling process is column-by-column filling, and the gray-scale mean value of the 100 th pixel point to the 300 th pixel point in a certain column is first obtained, and then all the pixel points in the column are traversed to find out the pixel points in the column whose gray-scale values are lower than a certain threshold, so that the gray-scale values of the pixel points are equal to the obtained gray-scale mean value.
Further, in step S5, when noise is added, the noise needs to be added from left to right column by column, the pixel mean value of each column of pixels is calculated in sequence, the calculated pixel mean value is used as an added noise value, and the calculated pixel mean value is added to every two pixels in the column.
Further, in step S6, the determined noise value is smaller than the white cluster defect gray value and larger than the black cluster defect gray value, and the difference between the noise value and the normal gray value is not large; and (3) differentiating the graph without noise filling with the graph with noise filling to detect the white blob defects:
the black cluster defect is detected by the difference between a noise filling graph and a graph which is not subjected to noise filling, the place where the defect is located is the graph with a larger gray value, the place where the defect is located is the graph with a smaller gray value, the place where the defect is located is the graph without the defect, the graph with the smaller gray value is not subjected to defect, histogram equalization or normalization is adopted for enhancing in order to increase the gray value difference between the place with the defect and the place without the defect, and after enhancement is carried out through the histogram equalization or normalization, the gray value difference between a defect area and a non-defect area is pulled, so that the next processing is convenient;
when the gray level of pixels of the image changes randomly and the image histogram is uneven, the histogram equalization makes the image histogram approximately flat;
the normalization principle is to calculate that the gray value of each pixel point in the image is mapped into a range of 0-255, the minimum gray value before mapping is the lower limit of the range after mapping, and the maximum gray value before mapping is the upper limit of the range after mapping:
img (n, m) in equation (4) refers to the gray value of a pixel point with coordinates (n, m) in an image, min _ img is the minimum value of the gray values of all pixel points in the image, max _ img is the maximum value of the gray values of all pixel points in the image, normalization is linear transformation, the gray values are mapped into 0-255 after normalization, and the contrast can be increased.
Further, in step S7, after the difference between the image without noise and the image with noise is performed or the difference image is enhanced, the place with the highest gray value in the image is the place where the defect is located, the difference between the gray values of other places and the maximum value is at least 10, the gray value of the pixel point with the gray value greater than a certain threshold value is 255 by using a binarization method, the gray values of other areas are 0, each defect in the binarization result image is formed by a plurality of white short lines, and the white short lines are aggregated into a white blob by using a dilation operation;
the specific operation method of the expansion is to use a rectangle with width m and height n as a template, and perform the following processing on each pixel x in the image: and the pixel x is placed in the center of the template, all other pixels covered by the template are traversed according to the size of the template, the value of the pixel x is modified to be the maximum value of all the pixels, and the salient points on the periphery of the image are connected and extend outwards.
Further, in step S8, the width and height of the image are reduced to the original width and height by the downsampling operationTherefore, the original size of the image needs to be restored through the up-sampling operation; the upsampling selects a bicubic interpolation method in which the gray value of (x, y) can be obtained by a weighted average of the nearest 16 sample points in a rectangular grid.
Preferably, a gaussian filter kernel with a size of 45 × 45 and a standard deviation of 0 is selected for gaussian filtering, the resolution of a gaussian filtering result graph is 8797 × 3965, the image resolution greatly affects the speed of subsequent image processing, and the length and width of an image are both reduced to the original length and widthThe down-sampling reduces the resolution of the image to 1759 × 793.
Compared with the prior art, the technical scheme of the invention has the beneficial effects that:
the invention can effectively detect the fuzzy Mura defect of the edge at any position or size in the LCD screen with any shape and size by adding proper noise at a proper position, thereby improving the detection accuracy and reducing the detection omission ratio and the overdivision ratio; the method has the advantages that the method realizes accurate detection of defects by adding noise and is suitable for screens with different shapes and sizes; for bleeding points in the edge area of the screen, filling before detection and masking after detection, so that the influence of the bleeding points on the detection result is avoided; aiming at the problem of larger image resolution, the size of the image is reduced to the original size by adopting a downsampling modeNot only the time for image processing is saved, but also the effective data in the image is reserved; after the whole image processing process is finished, the result graph is restored to the original size in an up-sampling mode, and the site operation workers can conveniently check, analyze and judge the result graph.
Drawings
FIG. 1 is a diagram illustrating the detection effect of an edge detection scheme in the prior art;
FIG. 2 is a diagram of a foreground and background separation detection effect in the prior art;
FIG. 3 is a diagram of the detection effect expected in the prior art;
FIG. 4 is a flow chart of the method of the present invention;
FIG. 5 is an image taken by the camera;
FIG. 6 is a schematic diagram of a bilinear interpolation process;
FIG. 7 is a schematic diagram of a dilation operation;
FIG. 8 is a diagram of image cropping effects
FIG. 9 is a schematic view of a mask template;
FIG. 10 is a schematic view of downsampling effect;
FIG. 11 is a diagram illustrating the overall filling effect;
FIG. 12 is a graph of the effect of adding noise;
FIG. 13 is a binarized image of a blurred edge white blob defect;
FIG. 14 is a diagram of edge-blurred black blob binarization;
FIG. 15 is a swelling diagram of a white cluster defect with blurred edges;
FIG. 16 is a graph of the expansion of a black blob defect with blurred edges;
FIG. 17 is a graph showing the results of detection.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
for the purpose of better illustrating the present embodiments, certain elements of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product;
it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted.
The technical solution of the present invention is further described below with reference to the accompanying drawings and examples.
Example 1
As shown in fig. 4, a Mura defect detecting method for edge blurring in an LCD screen includes the following steps:
s1: extracting a region of interest in the image through image cropping;
s2: performing gaussian filtering on the image in the step S1 to filter gaussian noise;
s3: down-sampling the image processed in step S2 to reduce the resolution of the image;
s4: performing edge filling on the image subjected to the step S3, and filling a non-screen area of an edge area;
s5: selecting a certain position in the image obtained in the step S4 for noise addition;
s6: differentiating the image added with the noise after the step S5 and the image obtained in the step S4, and enhancing a differential result image;
s7: carrying out binarization and expansion processing on the image obtained in the step S6, and screening out defects;
s8: and (4) performing up-sampling and masking on the image obtained in the step (S7), recovering the resolution of the image, and shielding false detection of a non-screen area.
In step S1, since the LCD screen has various shapes and sizes, in order to ensure that all areas of the product to be measured can be photographed in the detection process of the actual industrial field, the field of view of the camera must be larger than the area to be measured, so a certain bleeding position is left in the edge area of the screen, the area to be measured of the LCD screen needs to be cut out for subsequent processing, and the image cutting adopts manual input of the edge coordinates of the screen to perform cutting or automatic calculation of the edge coordinates to perform cutting.
In step S2, for each pixel, the gray value of the center pixel in the template is replaced by the weighted average gray value of the pixels in the neighborhood determined by the template, and the template with a kernel of 45 × 45 and a standard deviation of 0 is selected for filtering.
In step S3, the height and width of the image are reduced to the original height and width, respectively, using a down-sampling mode of bilinear interpolationDetermining the gray values of corresponding pixel points in the target image by utilizing the gray values of four real pixel points around the virtual point in the original image, and calculating the gray values corresponding to the virtual point, specifically:
f(dx,0)=f(0,0)*(1-dx)+f(1,0)*dx (1)
f(dx,1)=f(0,1)*(1-dx)+f(1,1)*dx (2)
f(dx,dy)=f(dx,0)*(1-dy)+f(dx,1)*dy (3)
where f (0,0) represents a gradation value with coordinates (0,0), f (0,1) represents a gradation value with coordinates (0,1), f (1,0) represents a gradation value with coordinates (1,0), f (1,1) represents a gradation value with coordinates (1,1), f (dx,0) represents a gradation value with coordinates (dx,0), f (dx,1) represents a gradation value with coordinates (dx,1), and f (dx, dy) represents a gradation value with coordinates (dx, dy).
In step S4, the filling process is column-by-column filling, and the gray-scale mean value of the 100 th pixel point to the 300 th pixel point in a certain column is first obtained, and then all the pixel points in the column are traversed to find out all the pixel points in the column whose gray-scale values are lower than a certain threshold, so that the gray-scale values of the pixel points are equal to the obtained gray-scale mean value.
In step S5, when adding noise, it is necessary to perform row by row from left to right, sequentially calculate the pixel mean value of each row of pixels, use the calculated pixel mean value as an added noise value, and add the calculated pixel mean value to every two pixels in the row.
In step S6, the calculated noise value is smaller than the white cluster defect gray value and larger than the black cluster defect gray value, and the difference between the noise value and the normal gray value is not large; and (3) carrying out difference on the graph without noise filling and the graph with noise filling to detect the white blob defect:
the black cluster defect is detected by the difference between a noise filling graph and a black cluster defect which is not subjected to noise filling, the obtained graph has a larger gray value which is the place where the defect is located, and has no defect when the gray value is smaller, in order to increase the gray value difference between the place with the defect and the place without the defect, histogram equalization or normalization is adopted for enhancement, after enhancement is carried out through the histogram equalization or normalization, the gray value difference between a defect area and a non-defect area is pulled, and the next processing is convenient to carry out;
when the gray level of pixels of the image changes randomly and the image histogram is uneven, the histogram equalization makes the image histogram approximately flat;
the principle of normalization is to calculate that the gray value of each pixel point in the image is mapped into a certain range (such as 0-255), the place with the lowest gray value before mapping is mapped into the lower limit of the range, and the place with the highest gray value before mapping is mapped into the upper limit of the range:
img (n, m) in equation (4) refers to the gray value of a pixel point with coordinates (n, m) in an image, min _ img is the minimum value of the gray values of all pixel points in the image, max _ img is the maximum value of the gray values of all pixel points in the image, normalization is linear transformation, the gray values are mapped into 0-255 after normalization, and the contrast ratio can be increased.
In step S7, after the difference between the image without noise and the image with noise is performed or the difference image is enhanced, the place where the gray value in the image is the largest is the place where the defect is located, the difference between the gray value in other places and the maximum value is at least 10, the gray value of the pixel with the gray value larger than a certain threshold is 255 by using a binarization method, the gray value of the pixel in other areas is 0, each defect in the binarization result image is formed by a plurality of white short lines, and the white short lines are aggregated into a white cluster by using a dilation operation;
the specific operation method of the expansion is to use a rectangle with width m and height n as a template, and perform the following processing on each pixel x in the image: and the pixel x is placed in the center of the template, all other pixels covered by the template are traversed according to the size of the template, the value of the pixel x is modified to be the maximum value of all the pixels, and the salient points on the periphery of the image are connected and extend outwards.
In step S8, the width and height of the image are reduced to the original width and height by the downsampling operationTherefore, the image needs to be restored to the original size through the up-sampling operation; the up-sampling selects a bicubic interpolation method in which the gray value of (x, y) can be obtained by a weighted average of the nearest 16 sample points in the rectangular grid.
Example 2
As shown in fig. 4, a Mura defect detection method for edge blurring in an LCD screen is divided into eight steps to implement a detection process. And the first step of image cutting is used for extracting the interested area in the image. And a second step of Gaussian filtering, namely filtering Gaussian noise. And thirdly, down-sampling to reduce the resolution of the image. And fourthly, filling edges, namely filling non-screen areas of the edge areas. The fifth step adds the appropriate noise at the appropriate location. And sixthly, differentiating the image without noise and the image with noise, and enhancing a differential result graph. And carrying out binarization and expansion processing on the seventh step for screening out the defects. And step eight, performing up-sampling and masking, recovering the resolution of the image, and shielding the false detection of the non-screen area. Through the processing of the eight steps, the Mura defect with fuzzy edge at any position and in any size in the LCD screen with any shape and size can be accurately detected. The key technical points important in each step will be described in detail below.
1. Image cropping
LCD screens have various shapes and sizes, and in order to ensure that all areas of a product to be detected can be photographed during an actual industrial field detection process, a field of view of a camera must be larger than that of the product to be detected, so that a certain bleeding position is left in an edge area of the screen, and an image photographed by the camera is as shown in fig. 5. Due to the existence of the bleeding position, the detection speed and the detection effect are affected, and therefore before formal detection is started, the area to be detected of the LCD screen needs to be cut out for subsequent processing. The image clipping can be performed by manually inputting the edge coordinates of the screen or automatically solving the edge coordinates. The two methods can extract the region of interest and both meet the requirement of subsequent processing.
2. Gaussian filtering
The image taken by the camera always contains gaussian noise due to the influence of the lighting environment during imaging. Gaussian noise refers to a type of noise whose probability density function follows a gaussian distribution. The invention adopts a Gaussian filtering mode to eliminate the influence of Gaussian noise. Gaussian filtering is a linear smooth filtering and is widely applied to the noise reduction process of image processing. The gaussian filtering is a process of weighted average of the whole image, and the gray value of each pixel point is obtained by weighted average of the gray value of each pixel point and the gray values of other pixel points in the neighborhood. The specific operation of gaussian filtering is: each pixel in the image is scanned by a template (or convolution and mask), and the weighted average gray value of the pixels in the neighborhood determined by the template is used for replacing the gray value of the pixel in the center of the template. The invention selects the template with 45 multiplied by 45 kernel and 0 standard deviation to filter.
3. Down sampling
Because the defect edge fuzzy contrast is low, the gray value of the edge pixel point is in a gradual change state or a transition state, and the area needing to be detected is large. Therefore, the down-sampling mode of bilinear interpolation is adopted to respectively reduce the height and the width of the image to the original height and the widthReducing the height and width of the image also helps to increase the speed of subsequent algorithm operations. The bilinear interpolation is a good image scaling algorithm, and fully utilizes the gray values of four real pixels around a virtual point in an original image to jointly determine the gray value of the corresponding pixel in a target image, so that the gray value corresponding to the virtual point can be calculated, and the calculation principle is shown in fig. 6.
According to the calculation principle of bilinear interpolation, the following equation can be obtained from the coordinate relationship in fig. 6:
f(dx,0)=f(0,0)*(1-dx)+f(1,0)*dx (1)
f(dx,1)=f(0,1)*(1-dx)+f(1,1)*dx (2)
f(dx,dy)=f(dx,0)*(1-dy)+f(dx,1)*dy (3)
where f (0,0) represents a gradation value with coordinates (0,0), f (0,1) represents a gradation value with coordinates (0,1), f (1,0) represents a gradation value with coordinates (1,0), f (1,1) represents a gradation value with coordinates (1,1), f (dx,0) represents a gradation value with coordinates (dx,0), f (dx,1) represents a gradation value with coordinates (dx,1), and f (dx, dy) represents a gradation value with coordinates (dx, dy).
4. Edge filling
The LCD screen has various shapes and sizes such as a rectangular screen, a bang screen, a drip screen, etc., but since the shape of the down-sampled image can be only rectangular, some bleeding points still exist in the edge area of the LCD screen. In order to avoid that these bleeding points have an influence on the subsequent image processing, a filling operation is required to fill the edge area with appropriate gray values. The filling process is column-by-column filling, firstly, the gray mean value of the 100 th pixel point to the 300 th pixel point in a certain column is solved, then all the pixel points in the column are traversed to find out all the pixel points of which the gray values in the column are lower than a certain threshold value, and the gray values of the pixel points are equal to the solved gray mean value.
5. Adding noise
The noise is the most important part in the invention and is also a key step in the whole image processing process. Because the gray value of the defect has a certain difference with the gray values of other pixel points in the column, appropriate noise can be added to the result image of step 4 for detection. When noise is added, the noise is added from left to right row by row, the pixel mean value of each row of pixel points is calculated in sequence, the calculated pixel mean value is used as an added noise value, and the calculated pixel mean value is added to every two pixel points in the row.
6. Image differencing and enhancement
Experiments show that the calculated noise value is smaller than the gray value of the white cluster defect and larger than the gray value of the black cluster defect under the general condition, and the difference between the noise value and the normal gray value is not large. And (4) carrying out difference on the graph without noise filling and the graph with noise filling to detect the white blob defect. The black blob defects may be detected by differencing the noise-filled map with no noise filling. The larger gray scale value in the obtained graph is the place where the defect is located, and the smaller gray scale value is the defect-free one. To increase the difference in gray value between defective places and non-defective places, histogram equalization or normalization may be used for enhancement. After enhancement is carried out through histogram equalization or normalization, the difference between the gray values of the defect area and the non-defect area can be pulled, and the next processing is convenient to carry out.
Histogram equalization is an important application of gray scale transformation, is efficient and easy to implement, and is widely applied to image enhancement. When the gray scale of the pixels of the image changes randomly and the image histogram is uneven, the histogram equalization can adopt a certain algorithm to make the image histogram approximately flat. Briefly, histogram equalization is a method of enhancing image contrast by stretching the pixel intensity distribution range.
The principle of normalization is to calculate that the gray value of each pixel point in the image is mapped into a certain range (such as 0-255), the minimum gray value before mapping is the lower limit of the range after mapping, and the maximum gray value before mapping is the upper limit of the range after mapping.
Img (n, m) in equation (4) refers to the gray value of the pixel with the coordinate (n, m) in the image, min _ img is the minimum value of the gray values of all the pixels in the image, and max _ img is the maximum value of the gray values of all the pixels in the image. Normalization is a linear transformation, and the gray values are mapped into 0-255 after normalization, so that the contrast can be increased.
7. Binarization and dilation process
After the difference between the image without noise and the image with noise is added or the difference image is enhanced, the place with the largest gray value in the image is the place where the defect is located, and the gray value of the other places is different from the maximum value by at least 10, so that the gray value of the pixel point with the gray value larger than a certain threshold value can be set to be 255 by adopting a binarization method, and the gray value of the pixel point with the gray value larger than the certain threshold value is set to be 0 in the other areas. Each defect in the binarization result graph is composed of a plurality of white short lines, and the white short lines can be agglomerated into white clusters by using dilation operation.
The specific operation method of the expansion is to use a rectangle with width m and height n as a template, and perform the following processing on each pixel x in the image: and the pixel x is placed in the center of the template, all other pixels covered by the template are traversed according to the size of the template, and the value of the pixel x is modified to be the maximum value in all the pixels. The result of this operation is to connect and extend outwardly the salient points of the image periphery. Fig. 7 is a schematic diagram illustrating the dilation operation of the 3 × 3 template.
8. Upsampling and masking
The width and height of the image are reduced to the original ones by the down-sampling operationIt is necessary to restore the image to its original size through an up-sampling operation.The up-sampling may select bicubic interpolation, which is the most commonly used interpolation method in two-dimensional space. In this method, the gray value of (x, y) can be obtained by a weighted average of the nearest 16 sample points in the rectangular grid.
Since the screen is not a very regular rectangle and the bleeding point in the image does not belong to the place to be detected, a masking method can be used to avoid detecting the bleeding point in the final detection result. The mask uses the selected image, graphic or object to mask a portion or all of the area of the processed image to control the area or process of the image processing. The particular image or object used for overlay is referred to as a mask or template.
Example 3
After the detection is started, the product to be detected needs to be placed in the central area of the camera view field, then the screen is turned on, the gray value of the pixel points on the screen is adjusted to a certain threshold (for example, 128), then the camera is used for image acquisition, the acquired image is transmitted to the computer terminal, and the acquired image is shown in fig. 5. The black area on the periphery of the screen in fig. 5 is a bleeding point and does not belong to the range needing detection. The screen area may be clipped by manually inputting the coordinates of the screen edge or automatically calculating the coordinates of the screen edge, and the clipped effect graph is shown in fig. 8. According to the cut screen effect picture, the edge information of the screen can be obtained, so that the mask template picture shown in fig. 9 can be created for the use of the subsequent mask step.
As Gaussian noise in the image can cause interference to the subsequent image processing process, Gaussian filtering is carried out by using a Gaussian filtering kernel with the size of 45 multiplied by 45 and the standard deviation of 0, the resolution of a Gaussian filtering result image is 8797 multiplied by 3965, the image resolution greatly influences the speed of the subsequent image processing, and therefore, a downsampling mode is adopted to reduce the length and the width of the image to the original length and the widthThe down-sampling reduces the resolution of the image to 1759 × 793. the resolution contrast is shown in fig. 10.
Since the screen is not a standard rectangular screen, there are still some bleeding points in the edge area of the screen. These bleeding spots are prone to false detection and therefore need to be filled. The invention adopts a column-by-column filling mode for filling, firstly, the gray average value or the gray mode of the 100 th element to the 300 th element in the first column is calculated, and the area needing to be filled is assigned according to the calculation result. By analogy, filling is performed column by column from left to right. The overall filling effect is shown in fig. 11.
The noise addition is a key step of the method, and the specific implementation idea is that from left to right, the gray level mean value of each column of pixel points is firstly solved, and the solved gray level mean value is the added noise value. And adding the solved noise value in every 2 pixel points in each row of pixel points. The effect graph after the addition is shown in fig. 12.
The difference between the map with noise added and the map without noise added can be used to detect white blob defects, and the difference between the map without noise added and the map with noise added can be used to detect black blob defects. By setting a proper binarization threshold, Mura defects with blurred edges can be screened out, as shown in fig. 13 and 14.
The defect in the binarized image is composed of a plurality of short lines, and in order to more meet the actual detection requirement, the expansion processing is performed using an expansion kernel with a kernel of 3. The effect graphs after the treatment are shown in fig. 15 and 16. In order to avoid false detection caused by the non-screen region, the expanded result graphs shown in fig. 15 and 16 and the mask template graph shown in fig. 9 are used for difference, and the result graph shown in fig. 17 can be obtained by screening the outline with the outline area larger than 200 pixel points in the difference result graph.
The same or similar reference numerals correspond to the same or similar parts;
the positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the present patent;
it should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.
Claims (10)
1. A Mura defect detection method for edge blurring in an LCD screen is characterized by comprising the following steps:
s1: extracting a region of interest in the image through image cropping;
s2: performing gaussian filtering on the image in the step S1 to filter gaussian noise;
s3: down-sampling the image processed in step S2 to reduce the resolution of the image;
s4: performing edge filling on the image subjected to the step S3, and filling a non-screen area of an edge area;
s5: selecting a certain position in the image obtained in the step S4 for noise addition;
s6: differentiating the noise-added image obtained in the step S5 from the image obtained in the step S4, and enhancing a differential result image;
s7: carrying out binarization and expansion processing on the image obtained in the step S6, and screening out defects;
s8: and (4) performing up-sampling and masking on the image obtained in the step (S7), recovering the resolution of the image, and shielding false detection of a non-screen area.
2. The method for detecting a Mura defect of an LCD screen with blurred edges according to claim 1, wherein in step S1, since the LCD screen has various shapes and sizes, in order to ensure that all areas of the product to be detected can be photographed during the detection process of the actual industrial site, the field of view of the camera must be larger than the area to be detected, so a certain bleeding position is left in the edge area of the screen, the area to be detected of the LCD screen needs to be cut out for subsequent processing, and the image cutting adopts manual input of the edge coordinates of the screen to perform cutting or automatically obtains the edge coordinates to perform cutting.
3. The method for detecting Mura defect with blurred edge in LCD screen of claim 2, wherein in the step S2, the specific operations of Gaussian filtering are as follows: scanning each pixel point in the image by using a template, replacing the gray value of the central pixel point of the template by using the weighted average gray value of the pixel points in the neighborhood determined by the template, and performing filtering processing by using the template with the kernel of 45 multiplied by 45 and the standard deviation of 0.
4. The method as claimed in claim 3, wherein the step S3 of downsampling by bilinear interpolation is performed to reduce the height and width of the image to the original height and width respectivelyDetermining the gray values of corresponding pixel points in the target image by utilizing the gray values of four real pixel points around the virtual point in the original image, and calculating the gray values corresponding to the virtual point, specifically:
f(dx,0)=f(0,0)*(1-dx)+f(1,0)*dx (1)
f(dx,1)=f(0,1)*(1-dx)+f(1,1)*dx (2)
f(dx,dy)=f(dx,0)*(1-dy)+f(dx,1)*dy (3)
where f (0,0) represents a gradation value with coordinates (0,0), f (0,1) represents a gradation value with coordinates (0,1), f (1,0) represents a gradation value with coordinates (1,0), f (1,1) represents a gradation value with coordinates (1,1), f (dx,0) represents a gradation value with coordinates (dx,0), f (dx,1) represents a gradation value with coordinates (dx,1), and f (dx, dy) represents a gradation value with coordinates (dx, dy).
5. The method of claim 4, wherein in step S4, the filling process is column-by-column filling, and the gray scale mean of the 100 th pixel to the 300 th pixel in a certain column is first obtained, and then all pixels in the column are traversed to find out pixels in the column whose gray scale values are lower than a certain threshold, so that the gray scale values of the pixels are equal to the obtained gray scale mean.
6. The method as claimed in claim 5, wherein in step S5, the noise is added row by row from left to right, the pixel mean of each row of pixels is calculated sequentially, the calculated pixel mean is used as the added noise value, and the calculated pixel mean is added to every two pixels in the row.
7. The method as claimed in claim 6, wherein in step S6, the noise value is smaller than the gray value of white blob defect and larger than the gray value of black blob defect, and the difference between the noise value and the normal gray value is not large; and (3) carrying out difference on the graph without noise filling and the graph with noise filling to detect the white blob defect:
carrying out differential detection on the black cluster defect between the noise filling image and the image which is not subjected to noise filling, wherein the larger gray value in the obtained image is the position where the defect is located, the smaller gray value is the position where the defect is not located, in order to increase the gray value difference between the position where the defect is located and the position where the defect is not located, histogram equalization or normalization is adopted for enhancement, and after enhancement is carried out through the histogram equalization or normalization, the gray value difference between a defect area and a non-defect area is pulled away, so that the next processing is facilitated;
when the gray level of pixels of the image changes randomly and the image histogram is uneven, the histogram equalization makes the image histogram approximately flat;
the normalization principle is to calculate the range that each pixel gray value in the image is mapped to 0-255, the minimum gray value before mapping is the lower limit of the range, and the maximum gray value before mapping is the upper limit of the range:
img (n, m) in equation (4) refers to the gray value of a pixel point with coordinates (n, m) in an image, min _ img is the minimum value of the gray values of all pixel points in the image, max _ img is the maximum value of the gray values of all pixel points in the image, normalization is linear transformation, the gray values are mapped into 0-255 after normalization, and the contrast ratio can be increased.
8. The method as claimed in claim 7, wherein in step S7, after the difference between the image without noise and the image with noise is added or the difference image is enhanced, the place with the highest gray value in the image is the place where the defect is located, the gray value at other places has a difference of at least 10 from the maximum value, the gray value of the pixel with the gray value greater than a certain threshold is set to 255 by using a binarization method, the other areas are set to 0, each defect in the binarization result image is composed of a plurality of short white lines, and the short white lines are aggregated into a white cluster by using a dilation operation;
the specific operation method of the expansion is to use a rectangle with width m and height n as a template, and perform the following processing on each pixel x in the image: and the pixel x is placed in the center of the template, all other pixels covered by the template are traversed according to the size of the template, the value of the pixel x is modified to be the maximum value in all the pixels, and the protruded points on the periphery of the image are connected and extend outwards.
9. The method for detecting Mura defect with blurred edges in LCD screen of claim 8, wherein in the step S8, the width and height of the image are reduced to the original width and height due to the down-sampling operationTherefore, the original size of the image needs to be restored through the up-sampling operation; the upsampling selects a bicubic interpolation method in which the gray value of (x, y) can be obtained by a weighted average of the nearest 16 sample points in a rectangular grid.
10. The method as claimed in any of claims 1 to 9, wherein the Mura defect detection method of edge blur in LCD screen is characterized in that Gaussian filter kernel with 45 x 45 and 0 standard deviation is selected for Gaussian filtering, the resolution of the Gaussian filtering result graph is 8797 x 3965, the image resolution greatly affects the speed of subsequent image processing, and the length and width of the image are reduced to the original length and widthThe down-sampling reduces the resolution of the image to 1759 × 793.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210467455.9A CN114792310A (en) | 2022-04-29 | 2022-04-29 | Mura defect detection method for edge blurring in LCD screen |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210467455.9A CN114792310A (en) | 2022-04-29 | 2022-04-29 | Mura defect detection method for edge blurring in LCD screen |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114792310A true CN114792310A (en) | 2022-07-26 |
Family
ID=82461201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210467455.9A Pending CN114792310A (en) | 2022-04-29 | 2022-04-29 | Mura defect detection method for edge blurring in LCD screen |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114792310A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115797342A (en) * | 2023-02-06 | 2023-03-14 | 深圳市鑫旭飞科技有限公司 | Industrial control capacitance touch LCD display assembly defect detection method |
CN117557449A (en) * | 2024-01-12 | 2024-02-13 | 昇显微电子(苏州)股份有限公司 | Method for adaptively extracting pixel position and data from demura equipment |
-
2022
- 2022-04-29 CN CN202210467455.9A patent/CN114792310A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115797342A (en) * | 2023-02-06 | 2023-03-14 | 深圳市鑫旭飞科技有限公司 | Industrial control capacitance touch LCD display assembly defect detection method |
CN117557449A (en) * | 2024-01-12 | 2024-02-13 | 昇显微电子(苏州)股份有限公司 | Method for adaptively extracting pixel position and data from demura equipment |
CN117557449B (en) * | 2024-01-12 | 2024-03-22 | 昇显微电子(苏州)股份有限公司 | Method for adaptively extracting pixel position and data from demura equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109978839B (en) | Method for detecting wafer low-texture defects | |
CN111612781B (en) | Screen defect detection method and device and head-mounted display equipment | |
CN109242791B (en) | Batch repair method for damaged plant leaves | |
CN114792310A (en) | Mura defect detection method for edge blurring in LCD screen | |
CN111680690B (en) | Character recognition method and device | |
CN111968144A (en) | Image edge point acquisition method and device | |
CN115631117B (en) | Image enhancement method, device, detection system and storage medium for defect detection | |
CN113706464B (en) | Printed matter appearance quality detection method and system | |
CN115908269A (en) | Visual defect detection method and device, storage medium and computer equipment | |
CN110648330B (en) | Defect detection method for camera glass | |
CN113781406B (en) | Scratch detection method and device for electronic component and computer equipment | |
CN115880288B (en) | Detection method, system and computer equipment for electronic element welding | |
CN116152261B (en) | Visual inspection system for quality of printed product | |
CN114298985B (en) | Defect detection method, device, equipment and storage medium | |
CN114938410A (en) | Method and system for drawing and checking partitions on mobile phone screen | |
Peng et al. | Efficient image resolution enhancement using edge-directed unsharp masking sharpening for real-time ASIC applications | |
CN110930358A (en) | Solar panel image processing method based on self-adaptive algorithm | |
CN111611783A (en) | Positioning and dividing method and device for graphic table | |
CN116342519A (en) | Image processing method based on machine learning | |
CN115619796A (en) | Method and device for obtaining photovoltaic module template and nonvolatile storage medium | |
CN112150433B (en) | Method for detecting whisker substance of circuit board, computer equipment and storage medium | |
CN111882529B (en) | Mura defect detection method and device for display screen | |
CN114723728A (en) | Method and system for detecting CD line defects of silk screen of glass cover plate of mobile phone camera | |
US20150085327A1 (en) | Method and apparatus for using an enlargement operation to reduce visually detected defects in an image | |
CN111932469A (en) | Significance weight quick exposure image fusion method, device, equipment and medium |
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 |