CN110276759B - Mobile phone screen bad line defect diagnosis method based on machine vision - Google Patents

Mobile phone screen bad line defect diagnosis method based on machine vision Download PDF

Info

Publication number
CN110276759B
CN110276759B CN201910578679.5A CN201910578679A CN110276759B CN 110276759 B CN110276759 B CN 110276759B CN 201910578679 A CN201910578679 A CN 201910578679A CN 110276759 B CN110276759 B CN 110276759B
Authority
CN
China
Prior art keywords
mobile phone
phone screen
image
screen image
detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910578679.5A
Other languages
Chinese (zh)
Other versions
CN110276759A (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.)
Northeastern University China
Original Assignee
Northeastern University China
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 Northeastern University China filed Critical Northeastern University China
Priority to CN201910578679.5A priority Critical patent/CN110276759B/en
Publication of CN110276759A publication Critical patent/CN110276759A/en
Application granted granted Critical
Publication of CN110276759B publication Critical patent/CN110276759B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G06T5/70
    • G06T5/77
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30121CRT, LCD or plasma display

Abstract

The invention provides a machine vision-based mobile phone screen bad line defect diagnosis method, which comprises the following steps: acquiring an image through a CCD industrial camera, extracting the area of a mobile phone screen in the image, and removing the image background to obtain a mobile phone screen image P; and eliminating interference information existing in the mobile phone screen image P. And performing Gamma transformation enhancement on the dark part details of the interference-removed mobile phone screen image P'. And performing defect detection on the mobile phone screen image P'. The traditional mobile phone screen defect detection is based on manual detection, the manual detection has subjectivity, low efficiency and high factory cost, and the mobile phone screen broken line defect detection method based on machine vision provided by the invention has the advantages of high automation degree, high detection accuracy and low cost, and is suitable for the strategic requirements of intelligent manufacturing in China.

Description

Mobile phone screen bad line defect diagnosis method based on machine vision
Technical Field
The invention relates to the technical field of defect diagnosis, in particular to a mobile phone screen bad line defect diagnosis method based on machine vision.
Background
Today, the high-speed development of industrial production is that mobile phones with various sizes and models are full of all places worldwide, and the rapid updating speed of products is also engendered by the bore. For mobile phone screen defect detection, manual detection is time-consuming and labor-consuming, and most of automatic detection algorithms based on machine vision can only detect several types of screens, so that the requirements of mobile phone screen manufacturers cannot be met. For mobile phone screen manufacturers, it is urgent to find a set of efficient, accurate, general-purpose automatic detection equipment to replace manual detection. Machine vision (also known as computer vision) technology has accumulated and settled for over 30 years. The method is a simulated biological vision technology which is combined by a computer and a camera, and relates to a plurality of professional fields such as mathematics, image acquisition, image recognition, computer science, optics, machine learning and the like. The computer calculates and analyzes various parameters of the screen sample image which is collected and sent back by the camera and compares the parameters with the given index to obtain a conclusion, the repeatability is high, the result is accurate, the efficiency is extremely high, the characteristic non-contact detection can carry out three-dimensional data cross analysis from the images which are collected at a plurality of angles, the accuracy is improved, and secondary injuries such as scratch and breakage can be avoided during detection.
The invention carries out intensive research on the defect of the broken wire which often occurs when the mobile phone screen is produced, and has extremely high detection accuracy under the condition that the screen with different models has interference including periodic texture, marking by a marker, unobvious broken wire and the like.
Disclosure of Invention
According to the technical problems, the method for diagnosing the bad line defects of the mobile phone screen based on machine vision is provided. The invention mainly utilizes a mobile phone screen bad line defect diagnosis method based on machine vision, which is characterized by comprising the following steps:
step S1: acquiring an image through a CCD industrial camera, extracting the area of a mobile phone screen in the image, and removing the image background to obtain a mobile phone screen image P;
step S2: removing interference information in the mobile phone screen image P to obtain an interference-removed mobile phone screen image P'; the interference information includes: periodic textures, markers, and black bars;
step S3: performing Gamma transformation enhancement on the dark part details of the interference-removed mobile phone screen image P ', and enhancing the contrast of the interference-removed mobile phone screen image P'; the Gamma transformation carries out nonlinear transformation on the gray value of the interference-removed mobile phone screen image P ', so that the gray value of the output image and the gray value of the interference-removed mobile phone screen image P' are in an exponential relationship, namely:
Figure BDA0002112674130000021
wherein V is in The gray value of the mobile phone screen image P' after the background is removed is represented, A represents the coefficient, gamma represents the Gamma value, V out Representing the gray value of the mobile phone screen image P' after the background is removed after Gamma conversion; the V is out And said V in The value ranges of the (E) are all 0,1];
Step S4: and performing defect detection on the mobile phone screen image P'.
Further, the step S1 further includes the following steps:
step S11: calculating the area of the CCD industrial camera for collecting images;
step S12: preprocessing an image acquired by the CCD industrial camera; the preprocessing firstly carries out gray level processing on an image, then converts the input image into a single-channel image and carries out binarization processing;
step S13: processing the CCD industrial camera acquired image by a global self-adaptive threshold segmentation method to obtain a binary image with obvious rectangular outline;
step S14: performing morphological processing including corrosion and expansion on the binary image obtained in the step S13 for removing interference factors of noise points of the image;
step S15: acquiring contour position information of the mobile phone screen based on a Findcounts contour retrieval algorithm, and storing the contour information in a position array; the outline information of the mobile phone screen comprises: coordinates (x, y) of the vertex of the upper left corner of the rectangular area of the mobile phone screen; the longitudinal length h of the rectangular area of the mobile phone screen and the transverse length w of the rectangular area of the mobile phone screen;
step S16: reading and storing the position information of the position array, and cutting the image acquired by the CCD industrial camera to obtain a mobile phone screen image P; the clipping obtaining of the mobile phone screen image P is as follows: (y+3: y+h-3, x+3: x+w-3).
Still further, the step S2 further includes the steps of:
step S21: performing multi-scale filtering in the directions of 0 degrees and 90 degrees on the mobile phone screen image P through Gabor filtering, and removing periodic textures of interference information;
step S22: and removing the marker and the black strip.
Further, the step S22 further includes the steps of:
step S221: the image graying treatment is converted into a single-channel image, so that the next threshold segmentation is facilitated.
Step S222: through statistics of data of a large number of samples, gray values of the black stripes and the marker areas are between 0 and 100; setting the gray value of the region with the gray value larger than 100 to be 0, namely pure black, and setting the gray values of other parts except the pure black to be 225, namely pure white, so as to obtain a mask image, namely a repair template;
step S223: expanding the area to be repaired, and setting a repair radius R=3;
step S224: and (3) repairing the image by using the mask obtained in the step S222 by using an inpaint algorithm.
Further, the step S4 further includes the following steps:
step S41: detecting bad line geometric characteristics in the mobile phone screen image P' based on bad line detection of Hough transformation, and if the defects exist, positioning and extracting the defects to obtain detection information alpha;
step S42: bad line detection based on BGR three-way mean value; based on the detection of the numerical value characteristics, if a defect exists, positioning and extracting the defect to obtain detection information beta;
step S43: after executing the step S41 and the step S42, a certain detection information is output, respectively, as α and β, by the following formula:
F=αβ
and if and only if F=1, outputting the mobile phone screen image P 'as a good screen, otherwise outputting the mobile phone screen image P' as a bad line and a bad screen.
Still further, the step S42 further includes the steps of:
step S421: taking the first two rows of the mobile phone screen image P' to obtain the average value of three channels (B, G, R), namely avgB0, avgG0 and avgR0, and initializing the average value of three channels of avgB0, avgG0 and avgR0 as the average value of the previous three channels;
step S422: the mobile phone screen image P' moves down by two rows of pixels, and the three-channel mean values are respectively avgB1, avgG1 and avgR1;
step S423: and (3) multiplying the obtained three-channel mean value with the three-channel mean value of the previous time:
T1=avgB1/avgB0;
T2=avgG1/avgG0;
T3=avgR1/avgR0;
if at least one of the defects exceeds a threshold T0, judging that a bad line defect occurs, and marking out the bad line; if the above formula is not met, moving down two rows again, and comparing the three-way mean values; if a defect occurs, β=0.
Still further, the step S41 further includes the steps of:
step S411: the obtained mobile phone screen image P' is subjected to size normalization processing to 500 x 500, so that subsequent image processing is facilitated;
step S412: carrying out graying and binarization treatment on the mobile phone screen image P';
step S413: based on a Canny edge detection algorithm;
step S414: the Hough transform algorithm can acquire the linear information in the contour information obtained in the step 1-3 and return the corresponding linear position information (x) 1 ,y 1 ),(x 1 ,y 2 );
Wherein x1 and x2 respectively represent the abscissa of the point of the detected straight line, and y1 and y2 respectively represent the ordinate of the point of the detected straight line;
step S415: judging whether the defect is contained according to the relation between the values of y1 and y2 in the returned position information; the judgment formula is:
y 1 +y 2 less than or equal to 10 or abs (y) 1 )+abs(y 2 )>1000;
Wherein y1 and y2 respectively represent the ordinate of the point on the corresponding straight line; if the position information meets the above requirement, no broken line defect exists; if a defect occurs, α=0.
Compared with the prior art, the invention has the following advantages:
the traditional mobile phone screen defect detection is based on manual detection, the manual detection has subjectivity, low efficiency and high factory cost, and the mobile phone screen broken line defect detection method based on machine vision provided by the invention has the advantages of high automation degree, high detection accuracy and low cost, and is suitable for the strategic requirements of intelligent manufacturing in China.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort to a person skilled in the art.
FIG. 1 is a schematic overall flow chart of the present invention.
Fig. 2 (a) is an image obtained by photographing with a CCD according to the present invention.
Fig. 2 (b) shows a mobile phone screen image P' obtained by extraction according to the present invention.
FIG. 3 (a) is a schematic diagram of the present invention which may contain black bars.
Fig. 3 (b) is a schematic diagram of the invention for removing interference.
FIG. 3 (c) is a schematic diagram of a marker that may be included in the present invention.
FIG. 3 (d) is a schematic view of the marker of the present invention.
Fig. 4 (a) is a schematic diagram of the invention containing broken wires.
FIG. 4 (b) is a schematic diagram of the Canny edge detection process of the present invention.
Fig. 4 (c) is a schematic diagram of bad line marked in the figure for the algorithm detection of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The invention discloses a machine vision-based mobile phone screen bad line defect diagnosis method, which comprises the following steps:
step S1: acquiring an image through a CCD industrial camera, extracting the area of a mobile phone screen in the image, and removing the image background to obtain a mobile phone screen image P;
step S2: removing interference information in the mobile phone screen image P to obtain an interference-removed mobile phone screen image P'; the interference information includes: periodic textures, markers, and black bars;
step S3: performing Gamma transformation enhancement on the dark part details of the interference-removed mobile phone screen image P ', and enhancing the contrast of the interference-removed mobile phone screen image P'; the Gamma transformation carries out nonlinear transformation on the gray value of the interference-removed mobile phone screen image P ', so that the gray value of the output image and the gray value of the interference-removed mobile phone screen image P' are in an exponential relationship, namely:
Figure BDA0002112674130000061
wherein V is in The gray value of the mobile phone screen image P' after the background is removed is represented, A represents the coefficient, gamma represents the Gamma value, V out Representing the gray value of the mobile phone screen image P' after the background is removed after Gamma conversion; the V is out And said V in The value ranges of the (E) are all 0,1];
Step S4: and performing defect detection on the mobile phone screen image P'.
As a preferred embodiment, step S1 further comprises the steps of:
step S11: calculating the area of the CCD industrial camera for collecting images;
step S12: preprocessing an image acquired by the CCD industrial camera; the preprocessing firstly carries out gray processing on the image, then converts the input image into a single-channel image and carries out binarization processing.
Step S13: and processing the CCD industrial camera acquired image by a global self-adaptive threshold segmentation method to obtain a binary image with obvious rectangular outline.
Step S14: and (3) performing morphological processing including corrosion and expansion on the binary image acquired in the step (S13) to remove interference factors of noise points of the image.
The corrosion calculation formula is:
Figure BDA0002112674130000062
the calculation formula of the expansion is:
Figure BDA0002112674130000071
it will be appreciated that in other embodiments, the manner of erosion and expansion may be selected as appropriate, provided that the binary image can be morphologically processed.
Step S15: acquiring contour position information of the mobile phone screen based on a Findcounts contour retrieval algorithm, and storing the contour information in a position array; the outline information of the mobile phone screen comprises: coordinates (x, y) of the vertex of the upper left corner of the rectangular area of the mobile phone screen; the longitudinal length h of the rectangular area of the mobile phone screen and the transverse length w of the rectangular area of the mobile phone screen.
Step S16: reading and storing the position information of the position array, and cutting the image acquired by the CCD industrial camera to obtain a mobile phone screen image P; the clipping obtaining of the mobile phone screen image P is as follows: (y+3: y+h-3, x+3: x+w-3).
In this embodiment, the step S2 further includes the steps of:
step S21: performing multi-scale filtering in the directions of 0 degrees and 90 degrees on the mobile phone screen image P through Gabor filtering, and removing periodic textures of interference information;
step S22: and removing the marker and the black strip.
Further, the step S22 further includes the steps of:
step S221: the image is converted into a single-channel image through graying treatment, so that the next threshold segmentation is facilitated;
step S222: through statistics of data of a large number of samples, gray values of the black stripes and the marker areas are between 0 and 100; setting the gray value of the region with the gray value larger than 100 to be 0, namely pure black, and setting the gray values of other parts except the pure black to be 225, namely pure white, so as to obtain a mask image, namely a repair template;
step S223: expanding the area to be repaired, and setting a repair radius R=3;
step S224: and (3) repairing the image by using the mask obtained in the step S222 by using an inpaint algorithm.
Further, the step S4 further includes the following steps:
step S41: detecting bad line geometric characteristics in the mobile phone screen image P' based on bad line detection of Hough transformation, and if the defects exist, positioning and extracting the defects to obtain detection information alpha;
step S42: bad line detection based on BGR three-way mean value; based on the detection of the numerical value characteristics, if a defect exists, positioning and extracting the defect to obtain detection information beta;
step S43: after executing the step S41 and the step S42, a certain detection information is output, respectively, as α and β, by the following formula:
F=αβ
and if and only if F=1, outputting the mobile phone screen image P 'as a good screen, otherwise outputting the mobile phone screen image P' as a bad line and a bad screen.
Still further, the step S42 further includes the steps of:
step S421: taking the first two rows of the mobile phone screen image P' to obtain the average value of three channels (B, G, R), namely avgB0, avgG0 and avgR0, and initializing the average value of three channels of avgB0, avgG0 and avgR0 as the average value of the previous three channels;
step S422: the mobile phone screen image P' moves down by two rows of pixels, and the three-channel mean values are respectively avgB1, avgG1 and avgR1;
step S423: and (3) multiplying the obtained three-channel mean value with the three-channel mean value of the previous time:
T1=avgB1/avgB0;
T2=avgG1/avgG0;
T3=avgR1/avgR0;
if at least one of the defects exceeds a threshold T0, judging that a bad line defect occurs, and marking out the bad line; if the above formula is not met, moving down two rows again, and comparing the three-way mean values; if a defect occurs, β=0.
Still further, the step S41 further includes the steps of:
step S411: the obtained mobile phone screen image P' is subjected to size normalization processing to 500 x 500, so that subsequent image processing is facilitated;
step S412: carrying out graying and binarization treatment on the mobile phone screen image P';
step S413: based on a Canny edge detection algorithm;
as a preferred embodiment, the first step of the Canny algorithm is to denoise the image by using Gaussian filtering, and for a two-dimensional image, the Gaussian blur is subjected to convolution processing, and the two-dimensional convolution is converted into two one-dimensional convolutions, namely, one-dimensional convolution is firstly performed on the rows and then one-dimensional convolution is performed on the columns. Gaussian blur convolves (gray scale) image I with a gaussian kernel:
I σ =I*G σ
wherein, represents convolution operation, G σ Is a two-dimensional gaussian kernel with standard deviation sigma, defined as:
Figure BDA0002112674130000091
calculating first derivatives (image gradients) in the horizontal and vertical directions using Sobel operator on the smoothed image (G x And G y ). From the two obtained gradient maps (G x And G y ) The gradient and direction of the boundary are found. The following is shown:
Figure BDA0002112674130000092
Figure BDA0002112674130000093
step S414: the Hough transform algorithm can acquire the linear information in the contour information obtained in the step 1-3 and return the corresponding linear position information (x) 1 ,y 1 ),(x 1 ,y 2 );
Wherein x1 and x2 respectively represent the abscissa of the point of the detected straight line, and y1 and y2 respectively represent the ordinate of the point of the detected straight line;
step S415: judging whether the defect is contained according to the relation between the values of y1 and y2 in the returned position information; the judgment formula is:
y 1 +y 2 less than or equal to 10 or abs (y) 1 )+abs(y 2 )>1000;
Wherein y1 and y2 respectively represent the ordinate of the point on the corresponding straight line; if the position information meets the above requirement, no broken line defect exists; if a defect occurs, α=0.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present invention, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (5)

1. The mobile phone screen bad line defect diagnosis method based on machine vision is characterized by comprising the following steps of:
s1: acquiring an image through a CCD industrial camera, extracting the area of a mobile phone screen in the image, and removing the image background to obtain a mobile phone screen image P;
s2: removing interference information in the mobile phone screen image P to obtain an interference-removed mobile phone screen image P'; the interference information includes: periodic textures, markers, and black bars;
s3: performing Gamma transformation enhancement on the dark part details of the interference-removed mobile phone screen image P ', and enhancing the contrast of the interference-removed mobile phone screen image P'; the Gamma transformation carries out nonlinear transformation on the gray value of the interference-removed mobile phone screen image P ', so that the gray value of the output image and the gray value of the interference-removed mobile phone screen image P' are in an exponential relationship, namely:
Figure QLYQS_1
wherein V is in The gray value of the mobile phone screen image P' after removing the background is represented, A represents the coefficient, gamma represents the Gamma value, V out Representing the gray value of the mobile phone screen image P' after the background is removed after Gamma conversion; the V is out And said V in The value ranges of the (E) are all 0,1];
S4: performing defect detection on the mobile phone screen image P'; the step S4 further includes the steps of:
s41: detecting bad line geometric characteristics in the mobile phone screen image P' based on bad line detection of Hough transformation, and if the defects exist, positioning and extracting the defects to obtain detection information alpha;
s42: bad line detection based on BGR three-way mean value; based on the detection of the numerical value characteristics, if a defect exists, positioning and extracting the defect to obtain detection information beta;
s43: after executing the step S41 and the step S42, a certain detection information is output, respectively, as α and β, by the following formula:
F=αβ
if and only if f=1, outputting the mobile phone screen image P 'as a good screen, otherwise outputting the mobile phone screen image P' as a bad line and a bad screen;
the step S42 further includes the steps of:
s421: taking the first two rows of the mobile phone screen image P' to obtain the average value of three channels (B, G, R), namely avgB0, avgG0 and avgR0, and initializing the average value of three channels of avgB0, avgG0 and avgR0 as the average value of the previous three channels;
s422: the mobile phone screen image P' moves down by two rows of pixels, and the three-channel mean values are respectively avgB1, avgG1 and avgR1;
s423: and (3) multiplying the obtained three-channel mean value with the three-channel mean value of the previous time:
T1=avgB1/avgB0;
T2=avgG1/avgG0;
T3=avgR1/avgR0;
if at least one of the defects exceeds a threshold T0, judging that a bad line defect occurs, and marking out the bad line; if the above formula is not met, moving down two rows again, and comparing the three-way mean values; if a defect occurs, β=0.
2. The machine vision-based mobile phone screen bad line defect diagnosis method according to claim 1, further characterized by:
the step S1 further includes the steps of:
s11: calculating the area of the CCD industrial camera for collecting images;
s12: preprocessing an image acquired by the CCD industrial camera; the preprocessing firstly carries out gray level processing on an image, then converts the input image into a single-channel image and carries out binarization processing;
s13: processing the CCD industrial camera acquired image by a global self-adaptive threshold segmentation method to obtain a binary image with obvious rectangular outline;
s14: performing morphological processing including corrosion and expansion on the binary image obtained in the step S13 for removing interference factors of noise points of the image;
s15: acquiring contour position information of the mobile phone screen based on a Findcounts contour retrieval algorithm, and storing the contour information in a position array; the outline information of the mobile phone screen comprises: coordinates (x, y) of the vertex of the upper left corner of the rectangular area of the mobile phone screen; the longitudinal length h of the rectangular area of the mobile phone screen and the transverse length w of the rectangular area of the mobile phone screen;
s16: reading and storing the position information of the position array, and cutting the image acquired by the CCD industrial camera to obtain a mobile phone screen image P; the clipping obtaining of the mobile phone screen image P is as follows: (y+3: y+h-3, x+3: x+w-3).
3. The machine vision-based mobile phone screen bad line defect diagnosis method according to claim 1, further characterized by: the step S2 further comprises the steps of:
s21: performing multi-scale filtering in the directions of 0 degrees and 90 degrees on the mobile phone screen image P through Gabor filtering, and removing periodic textures of interference information;
s22: and removing the disturbing factors of the marker and the black stripes.
4. The machine vision-based mobile phone screen bad line defect diagnosis method according to claim 3, further characterized by: the step S22 further includes the steps of:
s221: the image is converted into a single-channel image through graying treatment, so that the next threshold segmentation is facilitated;
s222: through statistics of data of a large number of samples, gray values of the black stripes and the marker areas are between 0 and 100; setting the gray value of the region with the gray value larger than 100 to be 0, namely pure black, and setting the gray values of other parts except the pure black to be 225, namely pure white, so as to obtain a mask image, namely a repair template;
s223: expanding the area to be repaired, and setting a repair radius R=3;
s224: and (3) repairing the image by using the mask obtained in the step S222 by using an inpaint algorithm.
5. The machine vision-based mobile phone screen bad line defect diagnosis method according to claim 1, further characterized by: the step S41 further includes the steps of:
s411: the obtained mobile phone screen image P' is subjected to size normalization processing to 500 x 500, so that subsequent image processing is facilitated;
s412: carrying out graying and binarization treatment on the mobile phone screen image P';
s413: based on a Canny edge detection algorithm;
s414: hough transform algorithm energy acquisition step1-3, and returns corresponding straight line position information (x 1 ,y 1 ),(x 1 ,y 2 );
Wherein x1 and x2 respectively represent the abscissa of the point of the detected straight line, and y1 and y2 respectively represent the ordinate of the point of the detected straight line;
s415: judging whether the defect is contained according to the relation between the values of y1 and y2 in the returned position information; the judgment formula is:
y 1 +y 2 less than or equal to 10 or abs (y) 1 )+abs(y 2 )>1000;
Wherein y1 and y2 respectively represent the ordinate of the point on the corresponding straight line; if the position information meets the above requirement, no broken line defect exists; if a defect occurs, α=0.
CN201910578679.5A 2019-06-28 2019-06-28 Mobile phone screen bad line defect diagnosis method based on machine vision Active CN110276759B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910578679.5A CN110276759B (en) 2019-06-28 2019-06-28 Mobile phone screen bad line defect diagnosis method based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910578679.5A CN110276759B (en) 2019-06-28 2019-06-28 Mobile phone screen bad line defect diagnosis method based on machine vision

Publications (2)

Publication Number Publication Date
CN110276759A CN110276759A (en) 2019-09-24
CN110276759B true CN110276759B (en) 2023-04-28

Family

ID=67962594

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910578679.5A Active CN110276759B (en) 2019-06-28 2019-06-28 Mobile phone screen bad line defect diagnosis method based on machine vision

Country Status (1)

Country Link
CN (1) CN110276759B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111724375B (en) * 2020-06-22 2023-05-09 中国科学院大学 Screen detection method and system
CN116468726B (en) * 2023-06-13 2023-10-03 厦门福信光电集成有限公司 Online foreign matter line detection method and system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100418356B1 (en) * 2003-03-31 2004-02-14 (주)에이치아이티에스 LCD Cell Edge Inspection System
US20090259891A1 (en) * 2008-04-09 2009-10-15 Mediatek Inc. Defect detection apparatus for optical disc and method thereof
US8098303B2 (en) * 2008-12-09 2012-01-17 Abbyy Software Ltd. Method and system for restoring a motion-blurred image
US8797429B2 (en) * 2012-03-05 2014-08-05 Apple Inc. Camera blemish defects detection
KR20160056721A (en) * 2014-11-12 2016-05-20 엘지디스플레이 주식회사 Liquid crystal display device having measuring mark for measuring seal line, apparatus and method of measuring seal line
CN106157310B (en) * 2016-07-06 2018-09-14 南京汇川图像视觉技术有限公司 The TFT LCD mura defect inspection methods combined with multichannel based on mixed self-adapting Level Set Models
CN107818556B (en) * 2016-08-31 2021-06-29 江苏邦融微电子有限公司 Bad line self-detection and self-repair method of capacitive fingerprint acquisition system
CN107194919B (en) * 2017-05-18 2021-07-30 南京大学 Mobile phone screen defect detection method based on regular texture background reconstruction
CN107845087B (en) * 2017-10-09 2020-07-03 深圳市华星光电半导体显示技术有限公司 Method and system for detecting uneven brightness defect of liquid crystal panel
CN107862692A (en) * 2017-11-30 2018-03-30 中山大学 A kind of ribbon mark of break defect inspection method based on convolutional neural networks
CN109167928B (en) * 2018-09-06 2020-11-03 武汉精测电子集团股份有限公司 Rapid automatic exposure method and system based on display panel defect detection
CN109685794B (en) * 2018-12-25 2021-01-29 凌云光技术股份有限公司 Camera self-adaptive step length DPC algorithm and device for mobile phone screen defect detection

Also Published As

Publication number Publication date
CN110276759A (en) 2019-09-24

Similar Documents

Publication Publication Date Title
CN107543828B (en) Workpiece surface defect detection method and system
CN111179225B (en) Test paper surface texture defect detection method based on gray gradient clustering
CN109978839B (en) Method for detecting wafer low-texture defects
CN109165538B (en) Bar code detection method and device based on deep neural network
CN116188462B (en) Noble metal quality detection method and system based on visual identification
CN114549981A (en) Intelligent inspection pointer type instrument recognition and reading method based on deep learning
GB2478593A (en) Segmentation of cell nuclei in histological sections
CN105447512A (en) Coarse-fine optical surface defect detection method and coarse-fine optical surface defect detection device
CN115205223B (en) Visual inspection method and device for transparent object, computer equipment and medium
CN111754538B (en) Threshold segmentation method for USB surface defect detection
CN111598856A (en) Chip surface defect automatic detection method and system based on defect-oriented multi-point positioning neural network
CN111489337A (en) Method and system for removing false defects through automatic optical detection
CN110276759B (en) Mobile phone screen bad line defect diagnosis method based on machine vision
CN113780110A (en) Method and device for detecting weak and small targets in image sequence in real time
CN111222507A (en) Automatic identification method of digital meter reading and computer readable storage medium
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN116342525A (en) SOP chip pin defect detection method and system based on Lenet-5 model
CN116433978A (en) Automatic generation and automatic labeling method and device for high-quality flaw image
CN113643290B (en) Straw counting method and device based on image processing and storage medium
CN115019306A (en) Embedding box label batch identification method and system based on deep learning and machine vision
Khan et al. Segmentation of single and overlapping leaves by extracting appropriate contours
CN110276260B (en) Commodity detection method based on depth camera
CN112926695A (en) Image recognition method and system based on template matching
CN112052859A (en) License plate accurate positioning method and device in free scene
CN112614062B (en) Colony counting method, colony counting device and computer storage 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
GR01 Patent grant
GR01 Patent grant