CN112184744A - Display screen edge defect detection method and device - Google Patents

Display screen edge defect detection method and device Download PDF

Info

Publication number
CN112184744A
CN112184744A CN202011367622.XA CN202011367622A CN112184744A CN 112184744 A CN112184744 A CN 112184744A CN 202011367622 A CN202011367622 A CN 202011367622A CN 112184744 A CN112184744 A CN 112184744A
Authority
CN
China
Prior art keywords
image
edge
pixel point
value
defect
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.)
Granted
Application number
CN202011367622.XA
Other languages
Chinese (zh)
Other versions
CN112184744B (en
Inventor
张驰
阮治未
姜涌
杜亚玲
吴垠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoshi Technology Suzhou Co ltd
Original Assignee
Huizhou Govion Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou Govion Technology Co ltd filed Critical Huizhou Govion Technology Co ltd
Priority to CN202011367622.XA priority Critical patent/CN112184744B/en
Publication of CN112184744A publication Critical patent/CN112184744A/en
Application granted granted Critical
Publication of CN112184744B publication Critical patent/CN112184744B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

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)
  • Image Analysis (AREA)

Abstract

The invention discloses an algorithm and a device for detecting edge defects of a display screen, which relate to the image detection technology, the method determines edge images through a first image and a second image obtained by dislocation subtraction, can quickly extract the edge defects in a picture, filtering in multiple directions through a rectangular filtering kernel, performing classification marking on pixel points according to multiple filtering results, performing expansion processing on edge images of the pixel points based on the classification marking, then comparing with original image, extracting single edge pixel defect image with maximum value by using the characteristic that only maximum value point is identical to original image in expansion treatment, making expansion and corrosion treatment on the single edge pixel defect image, subtracting the single edge pixel defect image from the edge image, the response of the defect, namely the third image can be obtained, the position of the defect can be obtained by analyzing the third image, and the scheme can accurately extract the tiny defect at the edge of the display screen.

Description

Display screen edge defect detection method and device
Technical Field
The invention relates to an image detection technology, in particular to a method and a device for detecting edge defects of a display screen.
Background
In the prior art, a plurality of defect detection methods for a display screen exist, most of the defects in the display screen are mainly detected, and the edge defects of the display screen are less concerned, but the edge defects also can actually affect the quality of a product. In addition, edge defects have many small defects which are not obvious, and the defects have two characteristics, namely the defects are positioned at the edge of the screen, and the difference between the defects and the background is smaller. The defects are not easy to detect by adopting the traditional image enhancement algorithm and the threshold value division algorithm to position the defects.
Disclosure of Invention
To solve at least one of the above-mentioned technical problems, the present invention is directed to: a method and a device for detecting edge defects of a display screen are provided to improve the accuracy of detection.
In a first aspect, an embodiment of the present invention provides:
a display screen edge defect detection algorithm comprises the following steps:
acquiring an image to be detected;
performing line-direction dislocation subtraction on the image to be detected and the image to be detected to obtain a first image;
performing column-wise dislocation subtraction on the image to be detected and the image to be detected to obtain a second image;
obtaining an edge image of a display screen in the image to be detected according to the first image and the second image;
filtering the edge image by adopting a plurality of rectangular filtering cores with different angles to obtain a plurality of filtering images;
performing classification marking on each target pixel point according to the maximum value of the target pixel point in the edge image in each filtering image;
selecting one of rectangular expansion structural elements with different directions to perform expansion processing on the target pixel points according to the mark of each target pixel point to obtain an expanded image;
comparing all pixel points in the expansion image and the edge image, and taking out pixel points with the same gray value and the same position in the expansion image and the edge image to form a single-edge pixel defect map;
sequentially performing element expansion and element corrosion treatment on the single-edge pixel defect image, and performing difference on the single-edge pixel defect image and the edge image to obtain a third image;
and obtaining the defect position from the third image.
In some embodiments, the obtaining of the defect position from the third image specifically includes:
performing binary segmentation on the third image according to a segmentation threshold value to obtain a binary image;
and obtaining the defect position according to the position of the pixel point with the numerical value of 255 in the binary image.
In some embodiments, obtaining an edge image of a display screen in the image to be detected according to the first image and the second image specifically includes:
and calculating each pixel point value in the edge image according to the first image and the second image, wherein each pixel point value in the edge image is equal to the square root of the sum of the squares of the gray value of the pixel point in the first image and the gray value in the second image.
In some embodiments, the subtraction of the line-wise misalignment between the image to be measured and the image to be measured is performed to obtain a first image, specifically:
subtracting the gray value of the pixel point in the nth row in the image to be detected from the gray value of the pixel point in the same row in the (n + r) th row to be used as the gray value of the pixel point in the nth row in the first image;
and the image to be detected are subjected to longitudinal dislocation subtraction to obtain a second image, which specifically comprises the following steps:
subtracting the gray value of the nth row of pixel points in the image to be detected from the gray value of the n + r row of pixel points in the same row to be used as the gray value of the nth row of pixel points in the second image;
wherein n and r are positive integers.
In some embodiments, the filtering the edge image by using a plurality of rectangular filtering kernels with different angles to obtain a plurality of filtered images includes:
the edge images are filtered by 12 rectangular filter kernels with directions of 0 °,15 °, 30 °, 45 °,60 °, 75 °,90 °,105 °,120 °, 135 °,150 °,165 °, to obtain 12 filtered images.
In some embodiments, the classifying and marking each target pixel point according to a maximum value of the target pixel point in the edge image in each filtered image specifically includes:
establishing a mark bitmap with the same size as the image to be detected;
searching the maximum value of each pixel point in 12 filtered images;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 0 degrees, 15 degrees or 165 degrees, marking the pixel point as a first value in the mark bitmap;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 30 degrees, 45 degrees or 60 degrees, marking the pixel point as a second value in the mark bitmap;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 75 degrees, 90 degrees or 105 degrees, marking the pixel point as a third value in the mark bitmap;
and when the maximum value of the pixel point appears in the filtering picture with the filtering direction of 120 degrees, 135 degrees or 150 degrees, marking the pixel point as a fourth value in the mark bitmap.
In some embodiments, the target pixel point is a pixel point forming an edge in the edge image;
the selecting one of rectangular expansion structural elements with different directions to perform expansion processing on the target pixel points according to the mark of each target pixel point to obtain an expanded image includes:
performing expansion processing on all the target pixel points to obtain an expanded image, wherein:
when the mark of the target pixel is a first value, selecting a rectangular expansion structural element with the direction of 90 degrees to perform expansion processing on the target pixel point;
when the mark of the target pixel is a second value, selecting a rectangular expansion structural element with the direction of 45 degrees to perform expansion processing on the target pixel point;
when the mark of the target pixel is a third value, selecting a rectangular expansion structural element with the direction of 0 degree to perform expansion processing on the target pixel point;
and when the mark of the target pixel is a fourth value, selecting a rectangular expansion structural element with the direction of 135 degrees to perform expansion processing on the target pixel.
In some embodiments, the sequentially performing the element expansion and the element corrosion on the single-edge pixel defect map includes:
and performing element expansion on the single-edge pixel defect map by using the structural elements with the size of 3 x 3, and then performing corrosion treatment on the single-edge pixel defect map subjected to element expansion treatment by using the structural elements with the size of 9 x 9.
In some embodiments, after the single-edge pixel defect map is sequentially subjected to element expansion and element corrosion, performing a difference between the single-edge pixel defect map and the edge image to obtain a third image, including:
sequentially carrying out element expansion and element corrosion treatment on the single-edge pixel defect map to obtain a fourth image;
carrying out gray value replacement on pixel points in the fourth image according to the mark bitmap to obtain a fifth image;
obtaining a third image by subtracting the fifth image from the edge image;
wherein the gray value replacement specifically comprises:
when the mark of the pixel point (x, y) in the mark bitmap is a first value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y), grey (x-a, y));
when the mark of the pixel point (x, y) in the mark bitmap is a second value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y + a), grey (x-a, y-a));
when the mark of the pixel point (x, y) in the mark bitmap is a third value, the gray level of the grey (x, y) is equal to MAX (grey (x, y + a), grey (x, y-a));
when the mark of the pixel point (x, y) in the mark bitmap is a fourth value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y-a), grey (x-a, y + a)).
Wherein, the grey () represents the gray value of the pixel point.
In a second aspect, an embodiment of the present invention provides:
a display screen edge defect detection, comprising:
carrying out a procedure;
a memory for storing the program;
and the processor is used for loading the program to execute the display screen edge defect detection method.
The embodiment of the invention has the beneficial effects that: the method comprises the steps of determining an edge image through a first image and a second image obtained by staggered subtraction, rapidly extracting edge defects in the image, carrying out multidirectional filtering through a rectangular filtering kernel, carrying out classification marking on pixel points according to a plurality of filtering results, carrying out expansion processing on the edge image through the pixel points based on the classification marking, comparing the edge image with an original image, extracting a single-edge pixel defect image with the maximum value by utilizing the characteristic that only the maximum value point can be the same as the original image during expansion processing, carrying out expansion and corrosion processing on the single-edge pixel defect image, then subtracting the single-edge pixel defect image from the edge image, and obtaining the response of the defect, namely a third image.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart of an edge defect detection algorithm for a display screen according to an embodiment of the present invention;
fig. 2 is a to-be-detected image of a mobile phone screen according to an embodiment of the present invention;
FIG. 3 is an edge image of FIG. 2;
FIG. 4 is the flag bitmap of FIG. 2;
FIG. 5 is a defect diagram of the single edge pixel of FIG. 2;
fig. 6 is a defect response diagram (i.e., a third image) of fig. 2.
Detailed Description
In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below through embodiments with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, the embodiment discloses a display screen edge defect detection algorithm, which includes the following steps:
step 101, obtaining an image to be detected.
The image to be detected is an image of a display screen, and is generally obtained by photographing a mobile phone screen placed in a predetermined direction, wherein the image to be detected may be a gray scale image. As shown in fig. 2, in the present embodiment, the image to be measured includes a background 100 and a mobile phone screen 200, wherein a defect 201 exists at an edge of the mobile phone screen 200. This type of defect is characterized by a small degree of difference from background.
And 102, performing line-direction dislocation subtraction on the image to be detected and the image to be detected to obtain a first image.
And 103, performing column-wise dislocation subtraction on the image to be detected and the image to be detected to obtain a second image.
And 104, obtaining an edge image of the display screen in the image to be detected according to the first image and the second image.
In the region of interest detected in this embodiment, it is observed that the periphery of the screen is a black background and has a large difference from the edge gray level of the screen, so that the column pixels of the picture are subjected to offset subtraction, for example, the nth column of the picture is subtracted from the nth + r column of the picture to obtain a difference picture diffX, so that the vertical edge of the screen exists in a positive value or a negative value with a large absolute value on the obtained difference picture diffX. r can take a value according to practical conditions, such as an integer between 4 and 10.
Similarly, the same offset subtraction method as that for the columns is also adopted for the processing of the rows, and the edges of the rows are obtained. Thus, the horizontal edge of the screen exists as a positive or negative value having a large absolute value on the obtained difference picture diffY.
Considering that when the subtraction is performed in steps 102 and 103, one side of each row is a negative value, diffX and diffY are superimposed in the form of square and root, and finally the edge map of interest 0 of the product to be detected is obtained. The specific calculation formula is as follows:
Figure DEST_PATH_IMAGE002
;
where edge0 (U, V) is the value at the edge map of interest location (U, V) after the overlay. diffX (U, V) is the value at the location (U, V) of the diffX map after the column is differenced. diffY (U, V) is the value at the location (U, V) of the diffY plot after the column is differed. In the present embodiment, the edge image is as shown in fig. 3.
And 105, filtering the edge image by adopting a plurality of rectangular filtering cores with different angles to obtain a plurality of filtering images.
The rectangular filter kernel size selected in this embodiment is width =17 and height = 2. The filtering angle starts from 0 degrees to the end of 165 degrees, and the angle of filtering is 12 filtering angles of 0 degrees, 15 degrees, 30 degrees, 45 degrees, 60 degrees, 75 degrees, 90 degrees, 105 degrees, 120 degrees, 135 degrees, 150 degrees and 165 degrees at intervals of 15 degrees.
And 106, performing classification marking on each target pixel point according to the maximum value of the target pixel point in the edge image in each filtering image.
Referring to fig. 4, in order to simplify the mark positions on the picture, it is determined that the filtering angles are separated by angular distances of 0 ° (180 °), 45 °,90 °, and 135 °, respectively, and if the filtering angles are closest to 0 ° (180 °), the picture is marked with 1 °, if the filtering angles are closest to 45 °, the picture is marked with 2, and if the filtering angles are closest to 90 °, the picture is marked with 3. If it is closest to 135 deg., then 4 is subsequently marked on the picture. Therefore, the rule of the angle of the rotary filtering corresponding to the zone bit is 0 degrees, 15 degrees and the rule of the angle of the rotary filtering corresponding to the zone bit are 1; the flag digit numbers corresponding to 30 degrees, 45 degrees and 60 degrees are 2; the flag digit numbers corresponding to 75 degrees, 90 degrees and 105 degrees are 3; the flag digit numbers corresponding to 120 °, 135 °,150 ° are 4. The final tag matrix consists of 1, 2, 3, 4.
The rectangular filter kernels are rotated clockwise from 0 deg. to 165 deg. at 15 deg. intervals, and coexist in 12 directions. And comparing the sizes of the corresponding pixel positions of the 12 pictures after filtering at different angles in sequence. The marking step is specifically that firstly, a flag bit picture with the pixel position of 0 is established, wherein the pixel position of the flag bit picture has the same size as that of the filtering picture. Secondly, if the maximum value of the pixel position appears in three filtering pictures with angles of 0 degree/15 degrees/165 degrees in the comparison of 12 pictures, the pixel position is marked as 1, and the pixel point is filtered in the horizontal direction to obtain the maximum value; if the maximum value of the pixel position appears in the filtering pictures with three angles of 30 degrees/45 degrees/60 degrees, the pixel position is marked as 2, and the pixel point is shown to obtain the maximum value in the filtering in the 45-degree direction; if the maximum value of the pixel position appears in the filtering pictures with three angles of 75 degrees/90 degrees/105 degrees, the pixel position is marked as 3, and the maximum value of the pixel point in the filtering in the vertical direction is shown; if the maximum value of the pixel position appears in the three angle filtering pictures of 120 °/135 °/150 °, the pixel position is marked as 4, which indicates that the pixel point obtains the maximum value in the 135 ° direction filtering.
The resulting plot is plotted in the picture, see fig. 4, with the horizontal edge labeled 1, the vertical edge labeled 3, the upper left-right-bottom corner labeled 4, and the upper left-bottom-right-top corner labeled 2.
And 107, selecting one of the rectangular expansion structural elements with different directions to perform expansion processing on the target pixel points according to the mark of each target pixel point to obtain an expanded image.
What is obtained from step 104 is a multi-pixel edge containing a bright point defect, but the bright point defect should exist at the maximum value in the edge, so it is necessary to extract the single pixel edge where the bright point defect exists and remove other interference.
In this step, a single row or column of rectangular expansion structure elements in the horizontal direction, the vertical direction, the 45-degree direction, and the 135-degree direction are first constructed, respectively.
And (4) combining the multi-pixel image edge obtained in the step one with the marked image obtained in the step 106 to self-adaptively select structural elements of morphological expansion operation vertical to the edge. For example, if an edge marked as 1 is encountered, a vertical expansion structural element with a width of 1 and a height of 2 (2 × r + 1) +1 is selected; if an edge labeled 3 is encountered, then the horizontal expanded structural element is selected, with a width of 2 (2 x r + 1) +1 and a height of 1. r is selected from the previous steps.
And 108, comparing all pixel points in the expansion image and the edge image, and taking out pixel points with the same gray value and the same position in the expansion image and the edge image to form a single-edge pixel defect image.
Specifically, after the edges are dilated with the selected structuring element and compared to the original, the equal portions are extracted. Because only the maximum value in the pixel edge is equal to the original image after expansion, a single-edge pixel image is obtained at the moment, and the remaining pixel points are the maximum values in the edge, namely the edge of the pixel with the bright point defect exists.
Because some single miscellaneous points exist in the screen, the edge with the defect is extracted by using a method of finding the maximum outline, and the miscellaneous points in the screen are removed, so that a single-edge pixel defect map is finally obtained, as shown in fig. 5.
And step 109, performing element expansion and element corrosion treatment on the single-edge pixel defect map in sequence, and performing difference processing on the single-edge pixel defect map and the edge image to obtain a third image.
And expanding the single-edge pixel defect map obtained in the step 108 by 3 x 3 structural elements, removing noise points, and then etching by 9 x 9 structural elements.
And replacing the pixel gray value of each position with a larger value in two adjacent pixel positions in a given step length in the direction by combining the flag bit matrix, wherein the step length of the adjacent pixel positions can be half of the size of the corrosion structure element in the step, so as to remove noise possibly existing in the picture after corrosion.
For example, the replacement step in the horizontal direction is to replace the following formula when the value of the pixel (x, y) in the flag bit matrix is 1: grey (x, y) = Max (grey (x-4, y), grey (x +4, y)); grey (x +4, y) represents the pixel position value in the same row as but 4 columns after the grey (x, y), and Max () represents the larger of the two. When the mark of the pixel point (x, y) in the mark bitmap is 2, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y + a), grey (x-a, y-a)); when the mark of the pixel point (x, y) in the mark bitmap is 3, the gray level of the grey (x, y) is equal to MAX (grey (x, y + a), grey (x, y-a)); when the mark of the pixel point (x, y) in the mark bitmap is 3, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y-a), grey (x-a, y + a)). The noise point can be removed through the step, and the defect false detection caused by the noise point is avoided.
And (4) subtracting the graph obtained in the step (108) from the graph obtained in the step (so as to obtain a defect response graph, namely a third image. The defect response is shown in fig. 6, and the brightest point in fig. 6 is the defect.
And step 110, obtaining the defect position from the third image.
Only the white point needs to be identified in this step to locate the defect. After the location of the defect is determined, a mark may be made on the artwork.
It can be known from the above embodiments that the edge image is determined by the first image and the second image obtained by the offset subtraction, the edge defect in the image can be rapidly extracted, multi-directional filtering is performed by the rectangular filtering kernel, the pixel points are classified and labeled according to the filtering results, the edge image is expanded based on the classification labels, and then compared with the original image, the unilateral edge pixel defect image with the maximum value is extracted by utilizing the characteristic that only the maximum value point is the same as the original image during the expansion processing, the unilateral edge pixel defect image is expanded and corroded and then subtracted from the edge image, and the response of the defect, that is, the third image, can be obtained, the position of the defect can be obtained by analyzing the third image, and the scheme can accurately extract the tiny defect at the edge of the display screen.
In some embodiments, the obtaining of the defect position from the third image specifically includes:
performing binary segmentation on the third image according to a segmentation threshold value to obtain a binary image;
and obtaining the defect position according to the position of the pixel point with the numerical value of 255 in the binary image.
In the step, binary segmentation is performed through a certain threshold, most of noise can be eliminated, the position of the defect can be accurately positioned, and the detection precision is improved.
In some embodiments, obtaining an edge image of a display screen in the image to be detected according to the first image and the second image specifically includes:
and calculating each pixel point value in the edge image according to the first image and the second image, wherein each pixel point value in the edge image is equal to the square root of the sum of the squares of the gray value of the pixel point in the first image and the gray value in the second image.
It is understood that, in this embodiment, the corresponding points of the images obtained by subtracting the two misalignment values are squared and added to form root signs, so that negative numbers can be converted into positive numbers, and in other embodiments, absolute value operations can be performed and then the addition is performed. The embodiment utilizes the characteristic of dislocation subtraction, and can well extract the edge image.
In some embodiments, the subtraction of the line-wise misalignment between the image to be measured and the image to be measured is performed to obtain a first image, specifically:
subtracting the gray value of the pixel point in the nth row in the image to be detected from the gray value of the pixel point in the same row in the (n + r) th row to be used as the gray value of the pixel point in the nth row in the first image;
and the image to be detected are subjected to longitudinal dislocation subtraction to obtain a second image, which specifically comprises the following steps:
subtracting the gray value of the nth row of pixel points in the image to be detected from the gray value of the n + r row of pixel points in the same row to be used as the gray value of the nth row of pixel points in the second image;
wherein n and r are positive integers. Wherein r can be 4-10.
The embodiment utilizes the characteristic of similar pixel point approximation, so that for the pixel points close to the edge, the dislocation addition of the pixel points can obtain a larger value. Therefore, by such a misalignment subtraction method, an edge image in which an edge can be emphasized can be simply obtained.
In some embodiments, the filtering the edge image by using a plurality of rectangular filtering kernels with different angles to obtain a plurality of filtered images includes:
the edge images are filtered by 12 rectangular filter kernels with directions of 0 °,15 °, 30 °, 45 °,60 °, 75 °,90 °,105 °,120 °, 135 °,150 °,165 °, to obtain 12 filtered images.
The filter of limited a plurality of angles is adopted to carry out filtering to this embodiment, has catered for the shape characteristics of display screen in fact, and the main part of display screen is the rectangle, and the periphery is the fillet generally, therefore, above-mentioned angle just in time can filter out the edge betterly.
In some embodiments, the classifying and marking each target pixel point according to a maximum value of the target pixel point in the edge image in each filtered image specifically includes:
establishing a mark bitmap with the same size as the image to be detected;
searching the maximum value of each pixel point in 12 filtered images;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 0 degrees, 15 degrees or 165 degrees, marking the pixel point as a first value in the mark bitmap;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 30 degrees, 45 degrees or 60 degrees, marking the pixel point as a second value in the mark bitmap;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 75 degrees, 90 degrees or 105 degrees, marking the pixel point as a third value in the mark bitmap;
and when the maximum value of the pixel point appears in the filtering picture with the filtering direction of 120 degrees, 135 degrees or 150 degrees, marking the pixel point as a fourth value in the mark bitmap.
In the step, the positions are marked based on the maximum values of the pixel points in the plurality of filtered images, so that the identification of the image edge can be greatly simplified, as shown in fig. 4, and a basis can be provided for the selection of a filter in the subsequent step. The marking method of the step is simple and easy to realize.
In some embodiments, the target pixel point is a pixel point forming an edge in the edge image;
the selecting one of rectangular expansion structural elements with different directions to perform expansion processing on the target pixel points according to the mark of each target pixel point to obtain an expanded image includes:
performing expansion processing on all the target pixel points to obtain an expanded image, wherein:
when the mark of the target pixel is a first value, selecting a rectangular expansion structural element with the direction of 90 degrees to perform expansion processing on the target pixel point;
when the mark of the target pixel is a second value, selecting a rectangular expansion structural element with the direction of 45 degrees to perform expansion processing on the target pixel point;
when the mark of the target pixel is a third value, selecting a rectangular expansion structural element with the direction of 0 degree to perform expansion processing on the target pixel point;
and when the mark of the target pixel is a fourth value, selecting a rectangular expansion structural element with the direction of 135 degrees to perform expansion processing on the target pixel.
In some embodiments, the sequentially performing the element expansion and the element corrosion on the single-edge pixel defect map includes:
and performing element expansion on the single-edge pixel defect map by using the structural elements with the size of 3 x 3, and then performing corrosion treatment on the single-edge pixel defect map subjected to element expansion treatment by using the structural elements with the size of 9 x 9.
In some embodiments, after the single-edge pixel defect map is sequentially subjected to element expansion and element corrosion, performing a difference between the single-edge pixel defect map and the edge image to obtain a third image, including:
sequentially carrying out element expansion and element corrosion treatment on the single-edge pixel defect map to obtain a fourth image;
carrying out gray value replacement on pixel points in the fourth image according to the mark bitmap to obtain a fifth image;
obtaining a third image by subtracting the fifth image from the edge image;
wherein the gray value replacement specifically comprises:
when the mark of the pixel point (x, y) in the mark bitmap is a first value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y), grey (x-a, y));
when the mark of the pixel point (x, y) in the mark bitmap is a second value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y + a), grey (x-a, y-a));
when the mark of the pixel point (x, y) in the mark bitmap is a third value, the gray level of the grey (x, y) is equal to MAX (grey (x, y + a), grey (x, y-a));
when the mark of the pixel point (x, y) in the mark bitmap is a fourth value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y-a), grey (x-a, y + a)).
Wherein, the grey () represents the gray value of the pixel point.
By the method, noise generated by expansion corrosion can be effectively removed, and defect false detection caused by the noise is avoided.
The embodiment discloses a display screen edge defect detection, include:
carrying out a procedure;
a memory for storing the program;
and the processor is used for loading the program to execute the display screen edge defect detection method.
It is understood that the embodiment and the method embodiment can achieve the same technical effects.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. A method for detecting edge defects of a display screen is characterized by comprising the following steps:
acquiring an image to be detected;
performing line-direction dislocation subtraction on the image to be detected and the image to be detected to obtain a first image;
performing column-wise dislocation subtraction on the image to be detected and the image to be detected to obtain a second image;
obtaining an edge image of a display screen in the image to be detected according to the first image and the second image;
filtering the edge image by adopting a plurality of rectangular filtering cores with different angles to obtain a plurality of filtering images;
performing classification marking on each target pixel point according to the maximum value of the target pixel point in the edge image in each filtering image, wherein the target pixel point is a pixel point forming an edge in the edge image;
selecting one of rectangular expansion structural elements with different directions to perform expansion processing on the target pixel points according to the mark of each target pixel point to obtain an expanded image;
comparing all pixel points in the expansion image and the edge image, and taking out pixel points with the same gray value and the same position in the expansion image and the edge image to form a single-edge pixel defect map;
sequentially performing element expansion and element corrosion treatment on the single-edge pixel defect image, and performing difference on the single-edge pixel defect image and the edge image to obtain a third image;
and obtaining the defect position from the third image.
2. The method for detecting the edge defect of the display screen according to claim 1, wherein the obtaining of the defect position from the third image specifically comprises:
performing binary segmentation on the third image according to a segmentation threshold value to obtain a binary image;
and obtaining the defect position according to the position of the pixel point with the numerical value of 255 in the binary image.
3. The method for detecting the edge defect of the display screen according to claim 1, wherein the edge image of the display screen in the image to be detected is obtained according to the first image and the second image, and specifically comprises:
and calculating each pixel point value in the edge image according to the first image and the second image, wherein each pixel point value in the edge image is equal to the square root of the sum of the squares of the gray value of the pixel point in the first image and the gray value in the second image.
4. The method for detecting the edge defect of the display screen according to claim 1, wherein the subtraction of the to-be-detected image and the self line-direction dislocation is performed to obtain a first image, specifically:
subtracting the gray value of the pixel point in the nth row in the image to be detected from the gray value of the pixel point in the same row in the (n + r) th row to be used as the gray value of the pixel point in the nth row in the first image;
and the image to be detected are subjected to longitudinal dislocation subtraction to obtain a second image, which specifically comprises the following steps:
subtracting the gray value of the nth row of pixel points in the image to be detected from the gray value of the n + r row of pixel points in the same row to be used as the gray value of the nth row of pixel points in the second image;
wherein n and r are positive integers.
5. The method for detecting the edge defect of the display screen according to claim 4, wherein the filtering the edge image by using a plurality of rectangular filtering cores with different angles to obtain a plurality of filtered images comprises:
the edge images are filtered by 12 rectangular filter kernels with directions of 0 °,15 °, 30 °, 45 °,60 °, 75 °,90 °,105 °,120 °, 135 °,150 °,165 °, to obtain 12 filtered images.
6. The method for detecting the edge defect of the display screen according to claim 5, wherein the classifying and marking of each target pixel point is performed according to a maximum value of the target pixel point in the edge image in each filtered image, and specifically comprises:
establishing a mark bitmap with the same size as the image to be detected;
searching the maximum value of each pixel point in 12 filtered images;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 0 degrees, 15 degrees or 165 degrees, marking the pixel point as a first value in the mark bitmap;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 30 degrees, 45 degrees or 60 degrees, marking the pixel point as a second value in the mark bitmap;
when the maximum value of the pixel point appears in a filtering picture with the filtering direction of 75 degrees, 90 degrees or 105 degrees, marking the pixel point as a third value in the mark bitmap;
and when the maximum value of the pixel point appears in the filtering picture with the filtering direction of 120 degrees, 135 degrees or 150 degrees, marking the pixel point as a fourth value in the mark bitmap.
7. The method for detecting the edge defect of the display screen according to claim 6, wherein the step of selecting one of the rectangular expansion structural elements with different directions according to the mark of each target pixel point to perform expansion processing on the target pixel point to obtain an expanded image comprises:
performing expansion processing on all the target pixel points to obtain an expanded image, wherein:
when the mark of the target pixel is a first value, selecting a rectangular expansion structural element with the direction of 90 degrees to perform expansion processing on the target pixel point;
when the mark of the target pixel is a second value, selecting a rectangular expansion structural element with the direction of 45 degrees to perform expansion processing on the target pixel point;
when the mark of the target pixel is a third value, selecting a rectangular expansion structural element with the direction of 0 degree to perform expansion processing on the target pixel point;
and when the mark of the target pixel is a fourth value, selecting a rectangular expansion structural element with the direction of 135 degrees to perform expansion processing on the target pixel.
8. The method for detecting the edge defect of the display screen according to claim 1, wherein the sequentially performing element expansion and element corrosion treatment on the single-edge pixel defect map comprises:
and performing element expansion on the single-edge pixel defect map by using the structural elements with the size of 3 x 3, and then performing corrosion treatment on the single-edge pixel defect map subjected to element expansion treatment by using the structural elements with the size of 9 x 9.
9. The method for detecting the edge defect of the display screen according to claim 4, wherein after the single-edge pixel defect map is sequentially subjected to element expansion and element corrosion, the single-edge pixel defect map is subtracted from the edge image to obtain a third image, and the method comprises the following steps:
sequentially carrying out element expansion and element corrosion treatment on the single-edge pixel defect map to obtain a fourth image;
carrying out gray value replacement on pixel points in the fourth image according to the mark bitmap to obtain a fifth image;
obtaining a third image by subtracting the fifth image from the edge image;
wherein the gray value replacement specifically comprises:
when the mark of the pixel point (x, y) in the mark bitmap is a first value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y), grey (x-a, y));
when the mark of the pixel point (x, y) in the mark bitmap is a second value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y + a), grey (x-a, y-a));
when the mark of the pixel point (x, y) in the mark bitmap is a third value, the gray level of the grey (x, y) is equal to MAX (grey (x, y + a), grey (x, y-a));
when the mark of the pixel point (x, y) in the mark bitmap is a fourth value, the gray level of the grey (x, y) is equal to MAX (grey (x + a, y-a), grey (x-a, y + a));
wherein, the grey () represents the gray value of the pixel point.
10. A display screen edge defect detection device, comprising:
carrying out a procedure;
a memory for storing the program;
a processor for loading the program to perform the display screen edge defect detection method of any one of claims 1-9.
CN202011367622.XA 2020-11-29 2020-11-29 Display screen edge defect detection method and device Active CN112184744B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011367622.XA CN112184744B (en) 2020-11-29 2020-11-29 Display screen edge defect detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011367622.XA CN112184744B (en) 2020-11-29 2020-11-29 Display screen edge defect detection method and device

Publications (2)

Publication Number Publication Date
CN112184744A true CN112184744A (en) 2021-01-05
CN112184744B CN112184744B (en) 2021-03-30

Family

ID=73918159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011367622.XA Active CN112184744B (en) 2020-11-29 2020-11-29 Display screen edge defect detection method and device

Country Status (1)

Country Link
CN (1) CN112184744B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112666733A (en) * 2021-03-15 2021-04-16 惠州高视科技有限公司 LCD gray scale picture offline defect detection method, electronic equipment and storage medium
CN112802022A (en) * 2021-04-14 2021-05-14 惠州高视科技有限公司 Method for intelligently detecting defective glass image, electronic device and storage medium
CN112950618A (en) * 2021-03-25 2021-06-11 深圳市华汉伟业科技有限公司 Appearance defect detection method and system
CN113221881A (en) * 2021-04-30 2021-08-06 浙大城市学院 Multi-level smart phone screen defect detection method
CN113378790A (en) * 2021-07-08 2021-09-10 中国电信股份有限公司 Viewpoint positioning method, apparatus, electronic device and computer-readable storage medium
CN113538603A (en) * 2021-09-16 2021-10-22 深圳市光明顶照明科技有限公司 Optical detection method and system based on array product and readable storage medium
CN115330789A (en) * 2022-10-13 2022-11-11 潍坊歌尔电子有限公司 Screen defect detection method, device, equipment and readable storage medium
CN115641332A (en) * 2022-12-01 2023-01-24 中科慧远视觉技术(北京)有限公司 Method, device, medium and equipment for detecting product edge appearance defects
CN117445734A (en) * 2023-12-11 2024-01-26 广东美华智充科技有限公司 Ordered charging management platform for electric automobile and operation and maintenance method thereof

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106408583A (en) * 2016-08-25 2017-02-15 凌云光技术集团有限责任公司 Multi-edge defect detecting method and device
CN106611424A (en) * 2016-03-23 2017-05-03 四川用联信息技术有限公司 Image edge extraction method
CN106780525A (en) * 2016-11-18 2017-05-31 北方工业大学 Optical remote sensing image ship direction feature extraction method based on coordinate rotation minimum circumscribed rectangle
CN110415263A (en) * 2019-07-29 2019-11-05 马婷 Image partition method and image segmentation device
CN110490839A (en) * 2019-07-11 2019-11-22 平安科技(深圳)有限公司 The method, apparatus and computer equipment of failure area in a kind of detection highway
CN110567965A (en) * 2019-07-31 2019-12-13 华南理工大学 Smartphone glass cover plate edge visual defect detection method
US20200058115A1 (en) * 2018-08-20 2020-02-20 Konica Minolta, Inc. Inspection device, image forming apparatus, and inspection method
CN111008987A (en) * 2019-12-06 2020-04-14 深圳市碧海扬帆科技有限公司 Method and device for extracting edge image based on gray background and readable storage medium
US20200219229A1 (en) * 2020-03-18 2020-07-09 Intel Corporation Edge-Aware Upscaling for Improved Screen Content Quality
CN111968143A (en) * 2020-07-22 2020-11-20 中国人民解放军国防科技大学 Edge image extraction method and system based on correlated imaging

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106611424A (en) * 2016-03-23 2017-05-03 四川用联信息技术有限公司 Image edge extraction method
CN106408583A (en) * 2016-08-25 2017-02-15 凌云光技术集团有限责任公司 Multi-edge defect detecting method and device
CN106780525A (en) * 2016-11-18 2017-05-31 北方工业大学 Optical remote sensing image ship direction feature extraction method based on coordinate rotation minimum circumscribed rectangle
US20200058115A1 (en) * 2018-08-20 2020-02-20 Konica Minolta, Inc. Inspection device, image forming apparatus, and inspection method
CN110490839A (en) * 2019-07-11 2019-11-22 平安科技(深圳)有限公司 The method, apparatus and computer equipment of failure area in a kind of detection highway
CN110415263A (en) * 2019-07-29 2019-11-05 马婷 Image partition method and image segmentation device
CN110567965A (en) * 2019-07-31 2019-12-13 华南理工大学 Smartphone glass cover plate edge visual defect detection method
CN111008987A (en) * 2019-12-06 2020-04-14 深圳市碧海扬帆科技有限公司 Method and device for extracting edge image based on gray background and readable storage medium
US20200219229A1 (en) * 2020-03-18 2020-07-09 Intel Corporation Edge-Aware Upscaling for Improved Screen Content Quality
CN111968143A (en) * 2020-07-22 2020-11-20 中国人民解放军国防科技大学 Edge image extraction method and system based on correlated imaging

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张春雪: "图像的边缘检测方法研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112666733B (en) * 2021-03-15 2021-06-04 惠州高视科技有限公司 LCD gray scale picture offline defect detection method, electronic equipment and storage medium
CN112666733A (en) * 2021-03-15 2021-04-16 惠州高视科技有限公司 LCD gray scale picture offline defect detection method, electronic equipment and storage medium
CN112950618A (en) * 2021-03-25 2021-06-11 深圳市华汉伟业科技有限公司 Appearance defect detection method and system
CN112802022B (en) * 2021-04-14 2021-10-29 高视科技(苏州)有限公司 Method for intelligently detecting defective glass image, electronic device and storage medium
CN112802022A (en) * 2021-04-14 2021-05-14 惠州高视科技有限公司 Method for intelligently detecting defective glass image, electronic device and storage medium
CN113221881B (en) * 2021-04-30 2022-03-22 浙大城市学院 Multi-level smart phone screen defect detection method
CN113221881A (en) * 2021-04-30 2021-08-06 浙大城市学院 Multi-level smart phone screen defect detection method
CN113378790A (en) * 2021-07-08 2021-09-10 中国电信股份有限公司 Viewpoint positioning method, apparatus, electronic device and computer-readable storage medium
CN113378790B (en) * 2021-07-08 2024-06-11 天翼云科技有限公司 Viewpoint positioning method, apparatus, electronic device, and computer-readable storage medium
CN113538603A (en) * 2021-09-16 2021-10-22 深圳市光明顶照明科技有限公司 Optical detection method and system based on array product and readable storage medium
CN113538603B (en) * 2021-09-16 2021-12-24 深圳市光明顶照明科技有限公司 Optical detection method and system based on array product and readable storage medium
CN115330789A (en) * 2022-10-13 2022-11-11 潍坊歌尔电子有限公司 Screen defect detection method, device, equipment and readable storage medium
CN115641332A (en) * 2022-12-01 2023-01-24 中科慧远视觉技术(北京)有限公司 Method, device, medium and equipment for detecting product edge appearance defects
CN117445734A (en) * 2023-12-11 2024-01-26 广东美华智充科技有限公司 Ordered charging management platform for electric automobile and operation and maintenance method thereof
CN117445734B (en) * 2023-12-11 2024-05-14 广东美华智充科技有限公司 Ordered charging management platform for electric automobile and operation and maintenance method thereof

Also Published As

Publication number Publication date
CN112184744B (en) 2021-03-30

Similar Documents

Publication Publication Date Title
CN112184744B (en) Display screen edge defect detection method and device
CN111612781B (en) Screen defect detection method and device and head-mounted display equipment
CN110414507B (en) License plate recognition method and device, computer equipment and storage medium
CN113109368B (en) Glass crack detection method, device, equipment and medium
CN114418957A (en) Global and local binary pattern image crack segmentation method based on robot vision
CN109509200B (en) Checkerboard corner detection method based on contour extraction and computer readable storage medium
CN108986152B (en) Foreign matter detection method and device based on difference image
CN113344910B (en) Defect labeling image generation method and device, computer equipment and storage medium
CN107749071B (en) Large-distortion checkerboard image corner detection method and device
CN109948521B (en) Image deviation rectifying method and device, equipment and storage medium
CN111680690A (en) Character recognition method and device
CN112101386B (en) Text detection method, device, computer equipment and storage medium
CN111489337A (en) Method and system for removing false defects through automatic optical detection
CN115205223A (en) Visual detection method and device for transparent object, computer equipment and medium
CN114723677A (en) Image defect detection method, image defect detection device, image defect detection equipment and storage medium
CN114419045A (en) Method, device and equipment for detecting defects of photoetching mask plate and readable storage medium
CN108960247B (en) Image significance detection method and device and electronic equipment
US9378405B2 (en) Determining barcode locations in documents
CN106663317B (en) Morphological processing method and digital image processing device for digital image
CN114155285B (en) Image registration method based on gray histogram
CN110751623A (en) Joint feature-based defect detection method, device, equipment and storage medium
CN111047614A (en) Feature extraction-based method for extracting target corner of complex scene image
CN113643290B (en) Straw counting method and device based on image processing and storage medium
CN115311237A (en) Image detection method and device and electronic equipment
CN111882572B (en) One-dimensional code detection method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 215163 rooms 101, 102, 901 and 902, floor 1, building 11, 198 Jialingjiang Road, high tech Zone, Suzhou City, Jiangsu Province

Patentee after: Gaoshi Technology (Suzhou) Co.,Ltd.

Address before: 516000 West Side of the 4th Floor of CD Building, No. 2 South Road, Huatai Road, Huiao Avenue, Huizhou City, Guangdong Province

Patentee before: HUIZHOU GOVION TECHNOLOGY Co.,Ltd.

EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20210105

Assignee: Suzhou Gaoshi Semiconductor Technology Co.,Ltd.

Assignor: Gaoshi Technology (Suzhou) Co.,Ltd.

Contract record no.: X2021990000430

Denomination of invention: Display screen edge defect detection method and device

Granted publication date: 20210330

License type: Common License

Record date: 20210722

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 215129 Rooms 101, 102, 901, 902, Floor 9, Building 11, No. 198, Jialing River Road, High tech Zone, Suzhou City, Jiangsu Province

Patentee after: Gaoshi Technology (Suzhou) Co.,Ltd.

Address before: 215163 rooms 101, 102, 901 and 902, floor 1, building 11, 198 Jialingjiang Road, high tech Zone, Suzhou City, Jiangsu Province

Patentee before: Gaoshi Technology (Suzhou) Co.,Ltd.