Nothing Special   »   [go: up one dir, main page]

CN114202515A - Method for detecting defect of printed carbon line of humidity sensor - Google Patents

Method for detecting defect of printed carbon line of humidity sensor Download PDF

Info

Publication number
CN114202515A
CN114202515A CN202111433558.5A CN202111433558A CN114202515A CN 114202515 A CN114202515 A CN 114202515A CN 202111433558 A CN202111433558 A CN 202111433558A CN 114202515 A CN114202515 A CN 114202515A
Authority
CN
China
Prior art keywords
image
humidity sensor
transformation
defects
threshold
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
CN202111433558.5A
Other languages
Chinese (zh)
Other versions
CN114202515B (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.)
GUANGZHOU HAIGU ELECTRONIC TECHNOLOGY CO LTD
South China University of Technology SCUT
Original Assignee
GUANGZHOU HAIGU ELECTRONIC TECHNOLOGY CO LTD
South China University of Technology SCUT
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 GUANGZHOU HAIGU ELECTRONIC TECHNOLOGY CO LTD, South China University of Technology SCUT filed Critical GUANGZHOU HAIGU ELECTRONIC TECHNOLOGY CO LTD
Priority to CN202111433558.5A priority Critical patent/CN114202515B/en
Publication of CN114202515A publication Critical patent/CN114202515A/en
Application granted granted Critical
Publication of CN114202515B publication Critical patent/CN114202515B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • 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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • 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/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows
    • 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/20081Training; Learning
    • 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/20084Artificial neural networks [ANN]
    • 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/30148Semiconductor; IC; Wafer
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to the field of humidity sensor defect detection, in particular to a method for detecting a humidity sensor printing carbon line defect. The invention can quickly detect and classify the defects of the printed carbon lines of the ceramic substrate of the humidity sensor with high detection precision and stability.

Description

Method for detecting defect of printed carbon line of humidity sensor
Technical Field
The invention relates to the field of humidity sensor defect detection, in particular to a method for detecting a printed carbon line defect of a humidity sensor.
Background
The humidity sensor is a common tool for testing the moisture content in air, and is widely applied to various industries in life, wherein the high-molecular resistance type humidity sensor is one of the most widely applied humidity sensors at present. In the production and manufacture of the humidity sensor, the carbon wire circuit is used for uniformly printing a plurality of humidity sensor substrates on a whole ceramic substrate, so that the ceramic substrate printed with the carbon wire needs to be cut, then the ceramic substrate is cleaned, pins are welded on a bonding pad, and then the humidity sensor ceramic wafer is dip-coated by using a high molecular solution and dried to form the high molecular humidity sensing film.
In the production process of the resistance type polymer humidity sensor, due to the fact that raw materials are not uniform, and the product has flaws or even defects due to the fact that the temperature and humidity of a production workshop are different, the product needs to be detected. At present, printed circuit detection in the production of polymer humidity sensors mainly has two aspects, one is performance detection, the electrical characteristics of the sensors need to be checked, the method is time-consuming, and the other is appearance detection, and whether defects exist in products produced by a production line is judged by means of appearance inspection of the products by workers. The manual detection has great limitation, and not only is the efficiency low, but also the detection precision and the yield are not high.
Disclosure of Invention
The invention aims to disclose a method for detecting the defects of printed carbon lines of a humidity sensor, which realizes the rapid detection of the printed circuit of a polymer humidity sensor. The system is high in detection precision and capable of improving production efficiency and yield.
In order to solve the problems, the invention adopts the following technical scheme:
a method for detecting defects of printed carbon lines of a humidity sensor is characterized by comprising the following steps: the method comprises the following steps:
s1, obtaining a ceramic substrate printing carbon line image: acquiring a clear image of the humidity sensor through a camera;
s2, ceramic substrate printing carbon line image processing: performing threshold segmentation on the image in the S1, and then sequentially performing morphological processing, edge detection, inclination correction and ROI region extraction;
s3, ceramic substrate printing carbon line feature extraction: extracting the geometric shape characteristics of the image processed by S2 to train a BP neural network, and establishing a classifier;
s4, classifying the defects of the ceramic substrate printing carbon lines: the classifier classifies the defects of the printing carbon lines according to the geometric shape characteristics of the image;
the step S1 adopts a forward illumination mode.
The threshold segmentation in the step S2 adopts Otsu algorithm to segment the image in S1 into the humidity sensor image and the background by the threshold T, which determines the threshold T as follows:
1) calculating a normalized histogram of the input image, and setting the gray scale range of the MxN image as {0,1,2, …, L-1}, then the probability of the pixel corresponding to the gray scale value i appears
Figure BDA0003380851600000021
Wherein L is the number of integral gray levels, niTotal number of pixels for gray level i;
2) setting an initial threshold T as a minimum gray value g, dividing the image, and calculating the ratio W of the pixel points of the two types to the image1And W2And average gray level U of front background1And U2
3) Calculating the average gray level U of the whole image:
Figure BDA0003380851600000022
4) computingVariance between out classes σ(k)
σ(k)=W1*(U1-U)2+W2*(U2-U)2
5) Traversing all gray values k in the image, repeating the steps 2) to 4), comparing all inter-class variances when sigma is(k)And when the maximum value is obtained, k is the optimal threshold value of the segmentation, and the humidity sensor image obtained after the Otsu algorithm threshold value segmentation is a binary image.
In the step S2, an opening operation is performed on the binary image after the threshold segmentation by using a square structural element with a side length of 12, a matlab function E ═ bwearopen (E, n) is used to remove a carbon line region in the humidity sensor image, the edge detection is performed by using a Canny algorithm to extract the contour of the humidity sensor in the image after the morphological processing, and the inclination correction is performed by using an algorithm based on Radon transform and affine transform to correct the angle and distortion of the humidity sensor image.
The Canny edge detection operator extracts the contour of the humidity sensor and comprises the following basic steps:
(1) the filtering is performed by a gaussian filter, which,
(2) a gradient image and an angle image are calculated,
(3) the suppression of the non-maximum value is performed,
(4) the edge connection is performed by double thresholds.
The Radon transformation finds a straight line close to the horizontal direction through the extracted contour of the humidity sensor to obtain an inclination angle, and then horizontally corrects the humidity sensor image; then, correcting the humidity sensor graph in the vertical direction through the horizontal direction offset transformation of affine transformation;
and performing offset transformation in the horizontal direction of the affine transformation, wherein a transformation matrix is as follows:
Figure BDA0003380851600000031
where Sh represents the tangent of the angle between the line near the vertical and the line near the horizontal, which can be obtained by Radon transform.
The ROI area extraction comprises the following specific steps:
s231, longitudinally intercepting, namely calculating the accumulated value of each row of pixels in the corrected humidity sensor image to obtain a statistical histogram, and then automatically selecting a boundary value through an algorithm to intercept the humidity sensor image;
s232, performing transverse interception, performing 90-degree rotation transformation on the image obtained by longitudinal interception, calculating the accumulated value of pixels in each row in the image to obtain a statistical histogram, automatically selecting a boundary value through an algorithm to intercept the humidity sensor image, and performing-90-degree rotation transformation to obtain a complete humidity sensor image.
And in the ceramic substrate printing carbon line defect detection, the unfilled corner defects are classified by a classifier established by training a BP neural network by extracting the shape complexity of an image.
The invention adopts a forward lighting mode to highlight the printed carbon lines on the surface of the humidity sensor for detecting and classifying the printed carbon lines so as to obtain an image, the image is sequentially subjected to threshold segmentation, morphological processing, edge detection, inclination correction and ROI area extraction processing so as to effectively highlight the geometric shape characteristics of the image of the humidity sensor, the detection precision of the printed carbon lines is improved, and the BP neural network has better fault-tolerant rate and adaptive capacity, so that the defects of the printed carbon lines can be accurately classified in the face of complex images.
In addition, the unfilled corner detection does not participate in establishing a classifier together with other defects, but realizes classification by extracting the shape complexity of an image obtained after threshold segmentation binarization and morphological processing, and does not need to perform subsequent processing such as inclination correction on the unfilled corner image, so that the algorithm is simplified, the detection running time is reduced, and the detection efficiency is improved. Meanwhile, the detection process is stable, manual participation is not needed, the production efficiency and the yield of the humidity sensor are improved, and the production cost of an enterprise is reduced.
Drawings
FIG. 1 is a flow chart of a humidity sensor ceramic substrate printed circuit defect detection system.
FIG. 2 is a block diagram of a system for detecting defects in a polymer humidity-sensitive film formed by a humidity sensor.
FIG. 3 is a defect diagram of a printed circuit of a ceramic substrate of the humidity sensor, which is sequentially normal, open circuit, short circuit and large-area short circuit from left to right.
Fig. 4 is a schematic diagram before and after morphological treatment, with the left being before treatment and the right being after treatment.
Fig. 5 shows images before and after the carbon line is removed, the left image shows an image before the carbon line is removed, and the right image shows an image after the carbon line is removed.
FIG. 6 is a schematic diagram of a humidity sensor profile extracted by the Canny operator.
Fig. 7 is a processing flow of a tilt correction algorithm based on Radon transform and affine transform.
FIG. 8 is a schematic diagram of humidity sensor image level correction.
Fig. 9 is a schematic diagram of vertical rectification of an image of a humidity sensor.
Fig. 10 is a schematic diagram of before and after extracting the humidity sensor from the ROI region, where the left is before extraction and the right is after extraction.
Fig. 11 is a diagram illustrating the final processing effect of the humidity sensor image.
FIG. 12 is a flowchart of a BP neural network classification recognition algorithm.
Fig. 13 is a schematic diagram of a BP neural network structure.
Fig. 14 is a schematic diagram of a unfilled corner image and a non-unfilled corner image.
Fig. 15 is a schematic diagram of a process of classifying unfilled corner images and unfilled corner images.
FIG. 16 shows the BP neural network test results.
Detailed Description
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein the accompanying drawings are provided for the purpose of visually supplementing the description with figures and detailed description, and wherein the purpose of illustrating the various features and aspects of the present invention is to provide an intuitive and visual understanding of the various aspects and aspects of the present invention, and the scope of the invention is not to be considered as being limited to the aspects and aspects.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
As shown in FIG. 1, a system and a method for detecting defects of printed carbon lines and moisture-sensitive films of a humidity sensor comprise a ceramic substrate printed carbon line defect detection and a polymer moisture-sensitive film formation defect detection, wherein the ceramic substrate printed carbon line defect detection comprises the following steps:
s1, obtaining a ceramic substrate printing carbon line image: the black background, the LED light source with long service life and high response speed are used, and the LED light source and the camera are positioned on the same side of the shot object in a forward lighting mode, so that a clear image on the surface of the humidity sensor is obtained through the camera.
The forward illumination mode can effectively highlight the carbon line profile printed on the surface of the humidity sensor.
S2, ceramic substrate printing carbon line image processing: an Otsu (ohtsu) threshold segmentation algorithm is firstly adopted for the image in S1, a threshold T is obtained through the algorithm, the image is segmented into a humidity sensor image and a background image, and the algorithm step for determining the threshold T is specifically as follows:
1) calculating a normalized histogram of the input image, and assuming that the gray scale range of the MxN image is {0,1,2, …, L-1}, then the probability Pi of the occurrence of the pixel corresponding to the gray scale value i is:
Figure BDA0003380851600000051
wherein L is the number of integral gray levels, niThe total number of pixels at gray level i.
2) Setting an initial threshold T as a minimum gray value g, dividing the image, and calculating the ratio W of the pixel points of the two types to the image1And W2And average gray level U of front background1And U2
3) Calculating the average gray level U of the whole image:
Figure BDA0003380851600000052
wherein U is1And U2Average gray of front background, W1And W2The number of pixels is the proportion of the image.
4) Calculate the between-class variance σ(k)
σ(k)=W1*(U1-U)2+W2*(U2-U)2
5) Traversing all gray values k in the image, repeating the steps 2) to 4), comparing all inter-class variances when sigma is(k)When the maximum value is obtained, k is the optimal threshold for segmentation.
After the specific threshold segmentation, the obtained humidity sensor image is a binary image.
As shown in fig. 4, morphological treatment: the morphological processing of the opening operation by the square structural element with the side length of 12 weakens the jaggy of the boundary edge of the image of the humidity sensor and becomes smoother.
The square structural element with the length of 12 is subjected to the opening operation, and the influence on the area is small while the boundary is smoothed.
When the contour is extracted in the next step of edge detection, a printed carbon line image is not needed, so that the printed carbon line image is removed in advance, only an outermost humidity sensor image frame is left, and a function E of matlab self-carrying is used, namely bwearopen (E, n); this can be achieved and the processing results are shown in fig. 5.
Edge detection: extracting the contour of the humidity sensor by a Canny edge detection operator, and basically comprises the following steps:
(1) the filtering is performed by a gaussian filter, which,
(2) a gradient image and an angle image are calculated,
(3) the suppression of the non-maximum value is performed,
(4) the edge connection is performed by double thresholds.
The Canny edge extraction operator works well to extract the contours of the humidity sensor as shown in fig. 6.
As shown in fig. 7-9, tilt correction: the extracted contour image of the humidity sensor finds a straight line close to the horizontal direction by utilizing Radon transformation to obtain an inclination angle, then the image is rotated to correct the horizontal direction, the rotated image is a parallelogram,
and then, correcting the graph of the humidity sensor in the vertical direction through affine transformation to obtain a rectangular image.
The horizontal offset transformation in the affine transformation, the transformation matrix is:
Figure BDA0003380851600000071
where Sh is the tangent of the angle between the line near the vertical and the line near the horizontal.
The inclination correction algorithm adopting Radon transformation and affine transformation can reduce the program running time, and further accelerate the running speed of the defect detection system.
As shown in fig. 10, ROI region extraction: the humidity sensor image has a small occupation ratio in the rectangular image, the rectangular image after the inclination correction processing is longitudinally intercepted, the accumulated value of pixels in each column in the image is calculated to achieve a statistical histogram, and the image is intercepted by automatically selecting a boundary value through an algorithm.
And performing 90-degree rotation transformation on the image obtained by longitudinal interception through transverse interception, executing the same algorithm as the longitudinal interception, and finally performing-90-degree rotation transformation to extract the humidity sensor image in the rectangular image.
The extracted humidity sensor image can eliminate the black area around by simply filling the image around, and a final processing effect image of the carbon line defect detection image shown in fig. 11 is obtained.
The method comprises the specific steps of obtaining the size of an image, transversely stopping the first pixel point from the upper left corner to the 15 th pixel point of the image, scanning the value of each row of 15 pixel points from top to bottom, if the value is 0, giving a new value 1, removing a left black area, and so on, namely removing the black area around the image. And removing the peripheral black area, and performing non-processing on the image to obtain a final processing effect image of the carbon line defect detection image.
As shown in fig. 12, S3, ceramic substrate printing carbon line feature extraction: and extracting the quantity, the area, the average area, the perimeter and the shape complexity of the image connected domain of the humidity sensor, inputting the extracted geometric characteristics into a training BP neural network, and establishing a classifier.
Number of connected components N of defect image
Among the defect images of the extracted features, the number of connected domains of the open-circuit defect image is 3, and the number of connected domains of the short-circuit defect image is 1.
Area S of defective image
Figure BDA0003380851600000072
Wherein, D represents the defect area, I (x, y) represents the defect image after segmentation, because the image is binarized, the value of the pixel point of the defect area is 1, the value of the pixel point of the background area is 0, and the area of the defect image can be obtained by summation.
Mean area of defect image MS:
MS=S/N
wherein S is the area and N is the number of connected domains.
Contour perimeter L of defect image:
Figure BDA0003380851600000081
m, N represent the number of pixel points of the side-by-side or slant-connected outline.
Shape complexity F of defect image:
F=L2/S L
l-profile perimeter, S-defect area.
S4, classifying the defects of the ceramic substrate printing carbon lines: the classifier classifies the normal, open, short and large-area short of the printed carbon line of the humidity sensor image according to the image geometric shape characteristic data.
As shown in fig. 13, in the specific setting of the parameters of the BP neural network, the number of nodes in the output layer is 4, the number of nodes in the hidden layer is 1, and the number of nodes in the hidden layer is 4.
As shown in fig. 14-15, the defect of the unfilled corner of the humidity sensor does not establish a classifier together with the normal, open, short and large-area short circuit of the printed carbon line, and the classifier is established by extracting the shape complexity characteristics of the normal and unfilled corner images of the normal humidity sensor and inputting the shape complexity characteristics into the trained BP neural network, so that the classification of the humidity sensor with the normal, open, short, large-area short and unfilled corner is realized, the algorithm is simplified, the program running time is shortened, and the system identification speed is accelerated.
The following are statistics of the two image shape complexities F, normal and unfilled corner:
unfilled corner image shape complexity
Figure BDA0003380851600000082
Non-unfilled corner image shape complexity
Figure BDA0003380851600000083
Figure BDA0003380851600000091
Specifically, the defect is a corner defect when the shape complexity F is greater than 60, and the defect is one of normal, short circuit, open circuit and large-area short circuit.
The specific embodiment is as follows:
detecting and classifying defects of printed carbon wires of the humidity sensor: in this embodiment, 720 ceramic substrate printed carbon line images are selected for training and testing, one part of the images is obtained by a camera, the other part of the images is generated by simulation according to an acquired sample and a specific environment, classification of ceramic substrate printed carbon line defect images is realized through a BP neural network, 480 sample images are used as training samples for feature extraction training of the BP neural network, wherein 180 samples are short-circuited, open-circuited and short-circuited in a large area in the 480 sample images, and the remaining 240 samples are test samples for testing the classifier, so that a test result as shown in fig. 16 can be obtained.
Detecting and classifying corner defect of the humidity sensor: the present embodiment uses 60 images for unfilled corner detection, and divides the images into two groups, wherein 20 unfilled corner images and 20 non-unfilled corner images are used for training a classifier, a classification threshold is found, and the remaining 10 unfilled corner images and 10 non-unfilled corner images are used for testing, and the test results are as follows:
corner defect detection test result
Figure BDA0003380851600000092
It can be seen that the classifier can accurately identify whether the humidity sensor image is a humidity sensor unfilled corner image.
Finally, the precision of accurate identification of the defects of the classified printed carbon lines and the defects of the unfilled corners by the BP neural network classifier is 100%, and meanwhile, the BP neural network has good fault tolerance and self-adaptive capacity, so that the system can still accurately classify the defects when dealing with the images of the complex humidity sensor.
The invention adopts a forward lighting mode to highlight the printed carbon lines on the surface of the humidity sensor for detecting and classifying the printed carbon lines so as to obtain an image, the image is sequentially subjected to threshold segmentation, morphological processing, edge detection, inclination correction and ROI area extraction processing so as to effectively highlight the geometric shape characteristics of the image of the humidity sensor, the detection precision of the printed carbon lines is improved, and the BP neural network has better fault-tolerant rate and adaptive capacity, so that the defects of the printed carbon lines can be accurately classified in the face of complex images.
The unfilled corner detection does not participate in establishing a classifier together with other defects, but realizes classification by extracting the shape complexity of an image obtained after threshold segmentation binarization and morphological processing, and does not need to perform subsequent processing such as inclination correction on the unfilled corner image, so that the algorithm is simplified, the detection operation time is reduced, and the detection efficiency is improved. Meanwhile, the detection process is stable, manual participation is not needed, the production efficiency and the yield of the humidity sensor are improved, and the production cost of an enterprise is reduced.
The above description is only a preferred and non-limiting invention, and it is apparent that those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and variations of this invention provided they come within the scope of the appended claims and their equivalents.

Claims (8)

1. A method for detecting defects of printed carbon lines of a humidity sensor is characterized by comprising the following steps: the method comprises the following steps:
s1, obtaining a ceramic substrate printing carbon line image: acquiring a clear image of the humidity sensor through a camera;
s2, ceramic substrate printing carbon line image processing: performing threshold segmentation on the image in the S1, and then sequentially performing morphological processing, edge detection, inclination correction and ROI region extraction;
s3, ceramic substrate printing carbon line feature extraction: extracting the geometric shape characteristics of the image processed by S2 to train a BP neural network, and establishing a classifier;
s4, classifying the defects of the ceramic substrate printing carbon lines: the classifier classifies the printing carbon line defects according to the image geometric shape characteristics.
2. The method of detecting defects in printed carbon lines of a humidity sensor according to claim 1, wherein: the step S1 adopts a forward illumination mode.
3. The method of detecting defects in printed carbon lines of a humidity sensor according to claim 1, wherein: the threshold segmentation in the step S2 adopts Otsu algorithm to segment the image in S1 into the humidity sensor image and the background by the threshold T, which determines the threshold T as follows:
1) calculating a normalized histogram of the input image, and setting the gray scale range of the MxN image as {0,1,2, …, L-1}, then the probability of the occurrence of the pixel corresponding to the gray scale value i
Figure FDA0003380851590000011
Wherein L is the number of integral gray levels, niTotal number of pixels for gray level i;
2) setting an initial threshold T as a minimum gray value g, dividing the image, and calculating the ratio W of the pixel points of the two types to the image1And W2And average gray level U of front background1And U2
3) Calculating the average gray level U of the whole image:
Figure FDA0003380851590000012
4) calculate the between-class variance σ(k)
σ(k)=W1*(U1-U)2+W2*(U2-U)2
5) Traversing all gray values k in the image, repeating the steps 2) to 4), comparing all inter-class variances when sigma is(k)And when the maximum value is obtained, k is the optimal threshold value of the segmentation, and the humidity sensor image obtained after the Otsu algorithm threshold value segmentation is a binary image.
4. The method of detecting defects in printed carbon lines of a humidity sensor according to claim 1, wherein: in the step S2, an opening operation is performed on the binary image after the threshold segmentation by using a square structural element with a side length of 12, a matlab function E ═ bwearopen (E, n) is used to remove a carbon line region in the humidity sensor image, the edge detection is performed by using a Canny algorithm to extract the contour of the humidity sensor in the image after the morphological processing, and the inclination correction is performed by using an algorithm based on Radon transform and affine transform to correct the angle and distortion of the humidity sensor image.
5. The method of detecting defects in printed carbon lines of a humidity sensor according to claim 4, wherein: the Canny edge detection operator extracts the contour of the humidity sensor and comprises the following basic steps:
(1) the filtering is performed by a gaussian filter, which,
(2) a gradient image and an angle image are calculated,
(3) the suppression of the non-maximum value is performed,
(4) the edge connection is performed by double thresholds.
6. The method of detecting defects in printed carbon lines of a humidity sensor according to claim 4, wherein: the Radon transformation finds a straight line close to the horizontal direction through the extracted contour of the humidity sensor to obtain an inclination angle, and then horizontally corrects the humidity sensor image; then, correcting the humidity sensor graph in the vertical direction through the horizontal direction offset transformation of affine transformation;
and performing offset transformation in the horizontal direction of the affine transformation, wherein a transformation matrix is as follows:
Figure FDA0003380851590000021
where Sh represents the tangent of the angle between the line near the vertical and the line near the horizontal, which can be obtained by Radon transform.
7. The method of detecting defects in printed carbon lines of a humidity sensor according to claim 1, wherein: the ROI area extraction comprises the following specific steps:
s231, longitudinally intercepting, namely calculating the accumulated value of each row of pixels in the corrected humidity sensor image to obtain a statistical histogram, and then automatically selecting a boundary value through an algorithm to intercept the humidity sensor image;
s232, performing transverse interception, performing 90-degree rotation transformation on the image obtained by longitudinal interception, calculating the pixel accumulated value of each row in the image to obtain a statistical histogram, automatically selecting a boundary value through an algorithm to intercept the humidity sensor image, and performing-90-degree rotation transformation to obtain a complete humidity sensor image.
8. The method of detecting defects in printed carbon lines of a humidity sensor according to claim 1, wherein: and in the ceramic substrate printing carbon line defect detection, the unfilled corner defects are classified by a classifier established by training a BP neural network by extracting the shape complexity of an image.
CN202111433558.5A 2021-11-29 2021-11-29 Method for detecting defect of printed carbon line of humidity sensor Active CN114202515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111433558.5A CN114202515B (en) 2021-11-29 2021-11-29 Method for detecting defect of printed carbon line of humidity sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111433558.5A CN114202515B (en) 2021-11-29 2021-11-29 Method for detecting defect of printed carbon line of humidity sensor

Publications (2)

Publication Number Publication Date
CN114202515A true CN114202515A (en) 2022-03-18
CN114202515B CN114202515B (en) 2023-04-07

Family

ID=80649494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111433558.5A Active CN114202515B (en) 2021-11-29 2021-11-29 Method for detecting defect of printed carbon line of humidity sensor

Country Status (1)

Country Link
CN (1) CN114202515B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477065A (en) * 2009-01-08 2009-07-08 西安电子科技大学 IC defect classification method based on defect boundary value change frequency
CN101482927A (en) * 2009-02-06 2009-07-15 中国农业大学 Foreign fiber fuzzy classification system and method based on automatic vision detection
CN102937595A (en) * 2012-11-13 2013-02-20 浙江省电力公司电力科学研究院 Method, device and system for detecting printed circuit board (PCB)
CN105844621A (en) * 2016-03-17 2016-08-10 阜阳市飞扬印务有限公司 Method for detecting quality of printed matter
CN106127746A (en) * 2016-06-16 2016-11-16 广州视源电子科技股份有限公司 Circuit board element missing part detection method and system
CN107389701A (en) * 2017-08-22 2017-11-24 西北工业大学 A kind of PCB visual defects automatic checkout system and method based on image
CN107886131A (en) * 2017-11-24 2018-04-06 佛山科学技术学院 One kind is based on convolutional neural networks detection circuit board element polarity method and apparatus
CN109242848A (en) * 2018-09-21 2019-01-18 西华大学 Based on OTSU and GA-BP neural network wallpaper defects detection and recognition methods
CN109859181A (en) * 2019-01-29 2019-06-07 桂林电子科技大学 A kind of PCB welding point defect detection method
CN109886931A (en) * 2019-01-25 2019-06-14 中国计量大学 Gear ring of wheel speed sensor detection method of surface flaw based on BP neural network
CN111882547A (en) * 2020-07-30 2020-11-03 佛山市南海区广工大数控装备协同创新研究院 PCB missing part detection method based on neural network
CN112801947A (en) * 2021-01-14 2021-05-14 唐山学院 Visual detection method for dead pixel of LED display terminal

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477065A (en) * 2009-01-08 2009-07-08 西安电子科技大学 IC defect classification method based on defect boundary value change frequency
CN101482927A (en) * 2009-02-06 2009-07-15 中国农业大学 Foreign fiber fuzzy classification system and method based on automatic vision detection
CN102937595A (en) * 2012-11-13 2013-02-20 浙江省电力公司电力科学研究院 Method, device and system for detecting printed circuit board (PCB)
CN105844621A (en) * 2016-03-17 2016-08-10 阜阳市飞扬印务有限公司 Method for detecting quality of printed matter
CN106127746A (en) * 2016-06-16 2016-11-16 广州视源电子科技股份有限公司 Circuit board element missing part detection method and system
CN107389701A (en) * 2017-08-22 2017-11-24 西北工业大学 A kind of PCB visual defects automatic checkout system and method based on image
CN107886131A (en) * 2017-11-24 2018-04-06 佛山科学技术学院 One kind is based on convolutional neural networks detection circuit board element polarity method and apparatus
CN109242848A (en) * 2018-09-21 2019-01-18 西华大学 Based on OTSU and GA-BP neural network wallpaper defects detection and recognition methods
CN109886931A (en) * 2019-01-25 2019-06-14 中国计量大学 Gear ring of wheel speed sensor detection method of surface flaw based on BP neural network
CN109859181A (en) * 2019-01-29 2019-06-07 桂林电子科技大学 A kind of PCB welding point defect detection method
CN111882547A (en) * 2020-07-30 2020-11-03 佛山市南海区广工大数控装备协同创新研究院 PCB missing part detection method based on neural network
CN112801947A (en) * 2021-01-14 2021-05-14 唐山学院 Visual detection method for dead pixel of LED display terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
熊振姣: ""基于图像的线路板缺陷检测方法研究"", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
郭联金 等: ""基于亚像素的 PCB 表面质量检测"", 《电子质量》 *

Also Published As

Publication number Publication date
CN114202515B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN111179225B (en) Test paper surface texture defect detection method based on gray gradient clustering
CN109242853B (en) PCB defect intelligent detection method based on image processing
CN106780486B (en) Steel plate surface defect image extraction method
CN115239704B (en) Accurate detection and repair method for wood surface defects
WO2021168733A1 (en) Defect detection method and apparatus for defect image, and computer-readable storage medium
CN105158258A (en) Computer vision-based bamboo strip surface defect detection method
CN107490582B (en) Assembly line workpiece detection system
CN115100206B (en) Printing defect identification method for textile with periodic pattern
CN109389566B (en) Method for detecting bad state of fastening nut of subway height adjusting valve based on boundary characteristics
CN113506246B (en) Concrete 3D printing component fine detection method based on machine vision
CN114820625B (en) Automobile top block defect detection method
CN111753794B (en) Fruit quality classification method, device, electronic equipment and readable storage medium
CN116152242B (en) Visual detection system of natural leather defect for basketball
CN110807763A (en) Method and system for detecting ceramic tile surface bulge
CN113628161A (en) Defect detection method, defect detection device and computer-readable storage medium
CN115953373A (en) Glass defect detection method and device, electronic equipment and storage medium
KR102242996B1 (en) Method for atypical defects detect in automobile injection products
CN116091495A (en) Accurate detection method for road diseases
CN114166849B (en) Method for detecting defects of printed carbon lines and moisture-sensitive film of humidity sensor
CN114140426B (en) Inclination correction algorithm for printing carbon line image of humidity sensor ceramic substrate
CN109141829B (en) Target line definition calculation and industrial camera rear intercept detection method
CN114202515B (en) Method for detecting defect of printed carbon line of humidity sensor
CN110516725B (en) Machine vision-based wood board stripe spacing and color detection method
CN113192061A (en) LED package appearance detection image extraction method and device, electronic equipment and storage medium
CN108898584B (en) Image analysis-based full-automatic veneered capacitor welding polarity discrimination method

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