CN115359043B - Intelligent detection method for foreign matters on PCB (printed circuit board) - Google Patents

Intelligent detection method for foreign matters on PCB (printed circuit board) Download PDF

Info

Publication number
CN115359043B
CN115359043B CN202211270025.4A CN202211270025A CN115359043B CN 115359043 B CN115359043 B CN 115359043B CN 202211270025 A CN202211270025 A CN 202211270025A CN 115359043 B CN115359043 B CN 115359043B
Authority
CN
China
Prior art keywords
shadow
degree
gray
edge
pcb
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
CN202211270025.4A
Other languages
Chinese (zh)
Other versions
CN115359043A (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.)
Zhejiang Jingyin Electronic Technology Co ltd
Original Assignee
Zhejiang Jingyin Electronic 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 Zhejiang Jingyin Electronic Technology Co ltd filed Critical Zhejiang Jingyin Electronic Technology Co ltd
Priority to CN202211270025.4A priority Critical patent/CN115359043B/en
Publication of CN115359043A publication Critical patent/CN115359043A/en
Application granted granted Critical
Publication of CN115359043B publication Critical patent/CN115359043B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • 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/30141Printed circuit board [PCB]
    • 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)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The application relates to the technical field of printed circuit board detection, in particular to an intelligent detection method for foreign matters on a PCB (printed circuit board), which comprises the steps of collecting PCB images and obtaining gray images; extracting a closed connected domain in the gray level image to obtain a foreign matter region; counting the number of shadow pixel points in the foreign object area, and obtaining the shadow size degree; acquiring shadow gray scale degree based on gray scale values of shadow pixel points; further obtaining the edge shadow degree of the foreign object area; acquiring a wrapping ink pixel point and an exposing pixel point based on the gray value of the pixel point in the foreign object area, and taking the quantity ratio of the quantity difference value of the wrapping ink pixel point and the exposing pixel point in the corresponding foreign object area as the ink wrapping degree; acquiring a shedding risk index according to the edge shadow degree and the ink wrapping degree; and screening out unqualified products based on the magnitude of the shedding risk index. The application can reserve the PCB with the foreign matters with smaller falling risk, and reduce the production cost on the premise of ensuring the use safety.

Description

Intelligent detection method for foreign matters on PCB (printed circuit board)
Technical Field
The application relates to the technical field of printed circuit board detection, in particular to an intelligent detection method for foreign matters on a PCB (printed circuit board).
Background
The application field of the PCB is very wide, if the PCB is an electronic device, the PCB is indispensable, however, various defects exist in the PCB production process, wherein different defects have different acceptance degrees, the defects of the foreign matters on the PCB surface have certain potential safety hazards, if the foreign matters on the surface fall off in the assembly process or the use process, certain safety influence is brought to the PCB, the PCB is burnt out, and the fire hazard is possibly brought about, so that the defect detection of the foreign matters on the surface is extremely important, and in the detection process, the defect can be accepted if the foreign matters do not fall off in the subsequent assembly process and the use process.
The prior art analyzes the image of the PCB, only can obtain whether the foreign matter exists or not, and the range of the existence of the foreign matter is divided, but the prior art cannot judge whether the foreign matter falls off in the assembly process, so that whether the foreign matter defect of the PCB is acceptable or not is not known.
Disclosure of Invention
In order to solve the technical problems, the application provides an intelligent detection method for foreign matters on a PCB (printed circuit board), which adopts the following technical scheme:
the embodiment of the application provides an intelligent detection method for foreign matters on a PCB surface, which comprises the following steps:
the PCB image on the conveyor belt is acquired in a overlooking mode, the image of the PCB area is segmented, and gray images are obtained;
extracting a closed connected domain in the gray level image, and obtaining a foreign matter region by calculating the gradient direction change rate of the edge of the connected domain; counting the number of shadow pixel points in the foreign object area, and taking the number ratio of the shadow pixel points in the foreign object area as the shadow size degree; acquiring shadow gray scale degree based on gray scale values of shadow pixel points; weighting and summing the shadow size degree and the shadow gray level to obtain the edge shadow degree of the foreign object region;
acquiring a wrapping ink pixel point and an exposing pixel point based on the gray value of the pixel point in the foreign object area, and taking the quantity ratio of the quantity difference value of the wrapping ink pixel point and the exposing pixel point in the corresponding foreign object area as the ink wrapping degree;
acquiring a shedding risk index according to the edge shadow degree and the ink wrapping degree; and screening out unqualified products based on the magnitude of the shedding risk index.
Preferably, the extraction method of the closed connected domain comprises the following steps:
and carrying out binarization processing on the gray level image by a self-adaptive threshold method to obtain a binary image, and carrying out connected domain analysis on the binary image to obtain a closed connected domain.
Preferably, the method for obtaining the gradient direction change rate comprises the following steps:
and taking the vertex of the connected domain as an edge starting point of the connected domain, acquiring the gradient direction of the pixel point, sliding the pixel point to the next edge pixel point clockwise along the white edge point according to the neighborhood gray value characteristic of the edge pixel point, and acquiring the gradient direction of the next edge pixel point until all gradient directions of the whole connected domain edge are obtained, and acquiring the gradient direction change rate of the connected domain edge based on the angle of the gradient direction change.
Preferably, the obtaining the gradient direction change rate of the edge of the connected domain based on the angle of the gradient direction change includes:
setting an included angle threshold, coding the gradient direction with the included angle degree of 0 as 0, coding the gradient direction with the included angle degree smaller than the included angle threshold as 1 for the included angle which is not 0, otherwise, coding as 2, and counting the number of codes as 2 as the gradient direction change rate.
Preferably, the method for acquiring the foreign object region includes:
and counting the total number of codes, taking two thirds of the total number as a foreign matter threshold value, comparing the gradient direction change rate with the foreign matter threshold value, and when the gradient direction change rate is larger than the foreign matter threshold value, taking the corresponding connected domain as a foreign matter region.
Preferably, the counting the number of shadow pixels in the foreign object region includes:
and acquiring a gray level histogram of the gray level image, counting the gray level value with the largest frequency in the gray level histogram, taking the gray level value as the gray level value characteristic of the surface of the PCB, taking the pixel points with the gray level value smaller than the gray level value characteristic as shadow pixel points, and acquiring the number of the shadow pixel points.
Preferably, the method for obtaining the shadow gray scale comprises the following steps:
and calculating the difference value between the gray value of each pixel point in the shadow region and the gray value characteristic, and calculating the average value of all the difference values as the shadow gray level.
Preferably, the acquiring the pixel points of the package ink and the exposed pixel points based on the gray value of the pixel points in the foreign object area includes:
characterizing gray values in foreign object regions to gray valuesAnd taking the pixel points in the range as the pixel points for wrapping the ink, and taking the pixel points with the gray values larger than the gray value characteristic +5 as the exposed pixel points with foreign matters not wrapped by the ink.
Preferably, the method for obtaining the shedding risk index comprises the following steps:
and respectively giving different weights to the edge shadow degree and the ink wrapping degree to obtain corresponding weighted results, and taking the ratio of the weighted results of the edge shadow degree to the weighted results of the ink wrapping degree as the shedding risk index.
Preferably, the screening of the unqualified products based on the magnitude of the shedding risk index includes:
normalizing the shedding risk index, setting a shedding threshold, and when the normalization result of the shedding risk index is larger than the shedding threshold, causing shedding risk, wherein the PCB is an unqualified product.
The embodiment of the application has at least the following beneficial effects:
firstly, obtaining a foreign object region based on the gradient direction change rate of the edge of the connected region, and extracting the foreign object region according to the irregular characteristics of the edge of the foreign object; then, the shadow size degree and the shadow gray level of the foreign matter region are obtained, the larger the shadow region formed by the foreign matter is, the more prominent the foreign matter is, the darker the gray level of the shadow part is, the edge shadow degree is obtained by utilizing the shadow size degree and the shadow gray level, and the shadow protruding degree is represented; the ink wrapping degree is obtained according to the quantity difference value of the pixel points wrapping the ink and the pixel points exposing, the foreign matters are not easy to fall off when being wrapped by the ink, the use of the PCB is not affected, and the ink wrapping degree reflects whether the foreign matters fall off easily or not to a certain extent; according to the edge shadow degree and the printing ink package degree, the shedding risk index is obtained, the screening of unqualified products is carried out, the shadow of the foreign matters is more prominent, the printing ink package is less, the foreign matters are easier to shed, when the shedding degree is larger, the foreign matters are easy to shed, potential safety hazards are caused in subsequent use, the normal use is not affected on the foreign matters with smaller shedding risk, and the foreign matters are not selected as unqualified products. According to the application, the risk of falling off of the identified foreign matters can be evaluated, so that the PCB with the foreign matters with smaller falling off risk is reserved, and the production cost is reduced on the premise of ensuring the use safety.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart illustrating steps of a method for intelligently detecting foreign matters on a PCB surface according to an embodiment of the present application;
fig. 2 is a gray scale image of a PCB board according to an embodiment of the present application.
Detailed Description
In order to further describe the technical means and effects adopted by the application to achieve the preset aim, the following is a detailed description of specific implementation, structure, characteristics and effects of the intelligent detection method for the foreign matters on the PCB surface according to the application with reference to the attached drawings and the preferred embodiment. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
The application provides a specific scheme of an intelligent detection method for foreign matters on a PCB surface, which is specifically described below with reference to the accompanying drawings.
Referring to fig. 1, a flowchart of steps of a method for intelligently detecting foreign matters on a PCB surface according to an embodiment of the present application is shown, and the method includes the following steps:
and S001, overlooking and collecting the PCB image on the conveyor belt, dividing the image of the PCB region, and graying to obtain a gray image.
The method comprises the following specific steps of:
the image of the PCB on the conveyor belt is obtained through overlooking shooting by a camera, in order to avoid the influence of the conveyor belt on detection, the image of the PCB area is extracted through semantic segmentation, and in order to facilitate subsequent detection, the image is subjected to graying by using a weighted average method, so that a gray image of the PCB is obtained, as shown in fig. 2.
Step S002, extracting a closed connected domain in the gray level image, and obtaining a foreign matter region by calculating the gradient direction change rate of the edge of the connected domain; counting the number of shadow pixel points in the foreign object area, and taking the number ratio of the shadow pixel points in the foreign object area as the shadow size degree; acquiring shadow gray scale degree based on gray scale values of shadow pixel points; and carrying out weighted summation on the shadow size degree and the shadow gray scale degree to obtain the edge shadow degree of the foreign object region.
The method comprises the following specific steps of:
and carrying out binarization processing on the gray level image by a self-adaptive threshold method to obtain a binary image, and carrying out connected domain analysis on the binary image to obtain a closed connected domain.
And taking the vertex of the connected domain as an edge starting point of the connected domain, acquiring the gradient direction of the pixel point, sliding the pixel point to the next edge pixel point clockwise along the white edge point according to the neighborhood gray value characteristic of the edge pixel point, and acquiring the gradient direction of the next edge pixel point until all gradient directions of the whole connected domain edge are obtained, and acquiring the gradient direction change rate of the connected domain edge based on the angle of the gradient direction change.
And setting an included angle threshold, coding the gradient direction with the included angle degree of 0 as 0, and for included angles which are not 0, coding the gradient direction with the included angle degree smaller than the included angle threshold as 1, otherwise, coding as 2, and taking the number with the statistical coding as 2 as the gradient direction change rate.
For each connected domain, taking the most point of the connected domain as the edge starting point of the connected domain, and obtaining the gradient direction of the pixel pointAccording to the neighborhood gray value characteristics of the edge pixel points, the white edge points are slid clockwise to the next edge pixel point, and the gradient direction of the pixel point is obtained>The included angle between the two gradient directions is the change rate of the edge gradient direction, and the like, so that the change condition of the edge gradient direction of the whole edge can be obtained, the edge gradient direction change is coded, in the embodiment of the application, the included angle threshold value is 20 degrees, namely, the included angle degree is zero, the code is 0, and the included angle isThe degree is atThe included angle is 1, and the included angle is 2 when the included angle is larger than 20 degrees. The number of 2 in the statistical coding is used as the edge gradient direction change rate.
And counting the total number of codes, taking two thirds of the total number as a foreign matter threshold value, comparing the gradient direction change rate with the foreign matter threshold value, and when the gradient direction change rate is larger than the foreign matter threshold value, taking the corresponding connected domain as a foreign matter region.
The more the number of codes 2 is, the larger the gradient direction included angle of two adjacent pixel points at the edge is, the more frequent the change of the edge direction is, namely the regularity of the edge is worse, and the probability of the existence of foreign matters is larger.
In the PCB, the existing structure shapes are regular, the edges of the communicating areas of each structure are relatively regular, but the foreign object existing areas are relatively irregular, so that the foreign object existing areas can be extracted through the regularity of the edges of the communicating areas.
And acquiring a gray level histogram of the gray level image, counting the gray level value with the largest frequency in the gray level histogram, taking the gray level value as the gray level value characteristic of the surface of the PCB, taking the pixel points with the gray level value smaller than the gray level value characteristic as shadow pixel points, and acquiring the number of the shadow pixel points.
The gray level image of the foreign matter existence area is obtained, the foreign matter can protrude the PCB surface, so that a shadow area can be formed at the edge of the foreign matter, the more the protruding PCB surface is, the darker the gray level of the shadow part is, namely the gray level value is closer to 0, and conversely, if the protruding PCB surface is less, the gray level of the shadow part at the edge is lighter and has little difference with the surrounding gray level.
Acquiring a gray level histogram of the whole PCB surface, counting the gray level value with the largest frequency in the gray level histogram, namely the highest peak value in the gray level histogram, and marking the gray level value characteristic of the PCB surface asAcquiring a gray level histogram of the foreign object region, wherein the gray level value in the statistical histogram is smaller thanGray value feature->The number of pixels +.>Gray value less than gray value featureIs a shadow area pixel. By shading the number of pixels +.>All pixel points of foreign object region->The extent of the size of the shadow area is assessed by the ratio of: />Bs represents the shadow size degree.
Calculating the gray value and gray value characteristic of each pixel point in the shadow regionDifference between them, calculate the average of all differences as the shadow gray scale +.>
In the image, shadow parts with different degrees exist at the edge of the protruding foreign matter, the protruding degree is higher, the color of the obtained shadow part is darker, the protruding degree is smaller, and the color of the shadow is lighter.
And carrying out weighted summation on the shadow size degree and the shadow gray scale degree to obtain the edge shadow degree of the foreign object region:wherein->And->For weight value, ++>And->The normalized values of Ge and Bs are larger in Ge value and smaller in Bs value, and the normalized values of Ge and Bs are ++A in order to eliminate the difference between the two values>And->. Because the importance of Bs and Ge are different, the two are selected with different weights +.>And->The weight value may be determined according to the actual situation, and the reference value is given in the embodiment of the present application +.>,/>
The shadow size Bs may measure the size of the shadow portion, the larger Bs indicates the larger area of the shadow portion, and the shadow gray scale Ge may measure the gray scale of the shadow portion, the larger Ge indicates the darker gray scale of the shadow portion, and the greater the edge shadow Es.
And step S003, acquiring the encapsulated ink pixel points and the exposed pixel points based on the gray values of the pixel points in the foreign object area, and taking the number ratio of the number difference value of the encapsulated ink pixel points and the exposed pixel points in the corresponding foreign object area as the encapsulation degree of the ink.
The method comprises the following specific steps of:
in the gray level image, part of foreign matters in the foreign matter area are completely wrapped by the ink, the whole gray level value is not greatly different from the gray level value of the PCB, some foreign matters are only partially wrapped by the ink, a part of foreign matters are exposed on the surface, and a bright area is displayed in the center part of the foreign matter area.
Therefore, the gray value in the foreign object region is characterized by the gray valueThe pixel points in the range are used as the pixel points for wrapping the printing ink, and the gray value is larger than the gray value characteristic +.>Is used as the exposed pixel point of the foreign matter which is not wrapped by the ink.
Taking the number ratio of the number difference value of the covered ink pixel points and the exposed pixel points in the corresponding foreign object area as the ink covering degree:wherein->Indicating the number of pixels surrounding the ink in the foreign area,/-, for example>Indicating the number of exposed pixels in the foreign object area, for example>The larger the value of (c) indicates that the ink is present in an area greater than the area of the foreign matter exposed, and thus the greater the degree of ink encapsulation, i.e., the greater the value of Iw.
Step S004, acquiring a shedding risk index according to the edge shadow degree and the ink wrapping degree; and screening out unqualified products based on the magnitude of the shedding risk index.
The method comprises the following specific steps of:
respectively giving different weights to the edge shadow degree and the ink wrapping degree to obtain corresponding weighted results, and taking the ratio of the weighted results of the edge shadow degree to the weighted results of the ink wrapping degree as an shedding risk index. Since the importance of the degree of edge shading is different from that of the ink coating, different weights are given +.>And->The weight value may be determined according to the actual situation, and the reference value is given in the embodiment of the present application>=0.7、/>=0.3。
For the PCB, the more the foreign matters existing on the surface are protruded, namely the greater the edge shadow degree is, the greater the probability of falling off of the foreign matters is, and the probability of falling off of the foreign matters is particularly small if the foreign matters are completely wrapped by the ink, so that the more the foreign matters existing on the surface of the PCB are protruded and the smaller the wrapping part of the ink is, the higher the falling risk is.
Normalizing the shedding risk index, setting a shedding threshold, and when the normalization result of the shedding risk index is larger than the shedding threshold, causing shedding risk, wherein the PCB is an unqualified product.
Normalizing the shedding risk index:wherein->Represents a base of natural constant e, by +.>As an exponential function of an index>Is the normalized result of the shedding risk index.
According to different PCB manufacturers and different PCB quality requirements, normalizing the falling risk indexesDifferent shedding thresholds are set, and in the embodiment of the application, the shedding threshold is 0.8. Normalized results of the shedding risk index ∈ ->When the falling risk of the foreign matters is greater than or equal to the falling threshold value, the falling risk is higher, the potential safety hazard exists, and conversely, the falling risk is smaller than the threshold value, so that the falling risk is smaller, and the method can be normally put into use within an acceptable range, therefore, the method can be used for better identifying whether the foreign matters on the surface of the PCB have the falling risk, filtering the PCB with the foreign matters on the surface, picking the PCB within the acceptable range, and further reducing the cost for manufacturers producing the PCB.
In summary, the embodiment of the application overlooks and collects the PCB image on the conveyor belt, cuts out the image of the PCB region and grays to obtain the gray image; extracting a closed connected domain in the gray level image, and obtaining a foreign matter region by calculating the gradient direction change rate of the edge of the connected domain; counting the number of shadow pixel points in the foreign object area, and taking the number ratio of the shadow pixel points in the foreign object area as the shadow size degree; acquiring shadow gray scale degree based on gray scale values of shadow pixel points; weighting and summing the shadow size degree and the shadow gray level to obtain the edge shadow degree of the foreign object region; acquiring a wrapping ink pixel point and an exposing pixel point based on the gray value of the pixel point in the foreign object area, and taking the quantity ratio of the quantity difference value of the wrapping ink pixel point and the exposing pixel point in the corresponding foreign object area as the ink wrapping degree; acquiring a shedding risk index according to the edge shadow degree and the ink wrapping degree; and screening out unqualified products based on the magnitude of the shedding risk index. According to the application, the risk of falling off of the identified foreign matters can be evaluated, so that the PCB with the foreign matters with smaller falling off risk is reserved, and the production cost is reduced on the premise of ensuring the use safety.
It should be noted that: the sequence of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and the same or similar parts of each embodiment are referred to each other, and each embodiment mainly describes differences from other embodiments.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; the technical solutions described in the foregoing embodiments are modified or some of the technical features are replaced equivalently, so that the essence of the corresponding technical solutions does not deviate from the scope of the technical solutions of the embodiments of the present application, and all the technical solutions are included in the protection scope of the present application.

Claims (4)

1. The intelligent detection method for the foreign matters on the PCB surface is characterized by comprising the following steps of:
the PCB image on the conveyor belt is acquired in a overlooking mode, the image of the PCB area is segmented, and gray images are obtained;
extracting a closed connected domain in the gray level image, and obtaining a foreign matter region by calculating the gradient direction change rate of the edge of the connected domain; counting the number of shadow pixel points in the foreign object area, and taking the number ratio of the shadow pixel points in the foreign object area as the shadow size degree; acquiring shadow gray scale degree based on gray scale values of shadow pixel points; weighting and summing the shadow size degree and the shadow gray level to obtain the edge shadow degree of the foreign object region;
acquiring a wrapping ink pixel point and an exposing pixel point based on the gray value of the pixel point in the foreign object area, and taking the quantity ratio of the quantity difference value of the wrapping ink pixel point and the exposing pixel point in the corresponding foreign object area as the ink wrapping degree;
acquiring a shedding risk index according to the edge shadow degree and the ink wrapping degree; screening out unqualified products based on the falling risk index;
the gradient direction change rate acquisition method comprises the following steps:
taking the vertex of the connected domain as the edge starting point of the connected domain, acquiring the gradient direction of the pixel point, clockwise sliding to the next edge pixel point along the white edge point according to the neighborhood gray value characteristic of the edge pixel point, and acquiring the gradient direction of the next edge pixel point until all gradient directions of the whole connected domain edge are obtained, and acquiring the gradient direction change rate of the connected domain edge based on the angle of the gradient direction change;
the gradient direction change rate of the edge of the connected domain is obtained based on the angle of the gradient direction change, and the method comprises the following steps:
setting an included angle threshold, coding the gradient direction with the included angle degree of 0 as 0, coding the gradient direction with the included angle degree smaller than the included angle threshold as 1 for the included angle which is not 0, otherwise, coding as 2, and counting the number of codes as 2 as the gradient direction change rate;
the foreign matter region acquisition method comprises the following steps:
counting the total number of codes, taking two thirds of the total number as a foreign matter threshold value, comparing the gradient direction change rate with the foreign matter threshold value, and when the gradient direction change rate is larger than the foreign matter threshold value, taking the corresponding connected domain as a foreign matter region;
the counting of the number of shadow pixel points in the foreign object area comprises the following steps:
acquiring a gray level histogram of the gray level image, counting the gray level value with the largest frequency in the gray level histogram, taking the gray level value as the gray level value characteristic of the surface of the PCB, taking the pixel points with the gray level value smaller than the gray level value characteristic as shadow pixel points, and acquiring the number of the shadow pixel points;
the shadow gray scale obtaining method comprises the following steps:
calculating the difference value between the gray value of each pixel point in the shadow area and the gray value characteristic, and calculating the average value of all the difference values as the shadow gray level;
the method for acquiring the encapsulated ink pixel points and the exposed pixel points based on the gray value of the pixel points in the foreign object area comprises the following steps:
characterizing gray values in foreign object regions to gray valuesAnd taking the pixel points in the range as the pixel points for wrapping the ink, and taking the pixel points with the gray values larger than the gray value characteristic +5 as the exposed pixel points with foreign matters not wrapped by the ink.
2. The intelligent detection method of foreign matters on the surface of a PCB according to claim 1, wherein the extraction method of the closed connected domain is as follows:
and carrying out binarization processing on the gray level image by a self-adaptive threshold method to obtain a binary image, and carrying out connected domain analysis on the binary image to obtain a closed connected domain.
3. The intelligent detection method of foreign matters on the surface of a PCB according to claim 1, wherein the method for acquiring the shedding risk index is as follows:
and respectively giving different weights to the edge shadow degree and the ink wrapping degree to obtain corresponding weighted results, and taking the ratio of the weighted results of the edge shadow degree to the weighted results of the ink wrapping degree as the shedding risk index.
4. The intelligent detection method for foreign matters on the surface of a PCB according to claim 1, wherein the step of screening out unqualified products based on the magnitude of the shedding risk index comprises the following steps:
normalizing the shedding risk index, setting a shedding threshold, and when the normalization result of the shedding risk index is larger than the shedding threshold, causing shedding risk, wherein the PCB is an unqualified product.
CN202211270025.4A 2022-10-18 2022-10-18 Intelligent detection method for foreign matters on PCB (printed circuit board) Active CN115359043B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211270025.4A CN115359043B (en) 2022-10-18 2022-10-18 Intelligent detection method for foreign matters on PCB (printed circuit board)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211270025.4A CN115359043B (en) 2022-10-18 2022-10-18 Intelligent detection method for foreign matters on PCB (printed circuit board)

Publications (2)

Publication Number Publication Date
CN115359043A CN115359043A (en) 2022-11-18
CN115359043B true CN115359043B (en) 2023-08-22

Family

ID=84007790

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211270025.4A Active CN115359043B (en) 2022-10-18 2022-10-18 Intelligent detection method for foreign matters on PCB (printed circuit board)

Country Status (1)

Country Link
CN (1) CN115359043B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115760884B (en) * 2023-01-06 2023-04-14 山东恩信特种车辆制造有限公司 Semitrailer surface welding slag optimization segmentation method based on image processing
CN116091503B (en) * 2023-04-10 2023-06-13 成都数之联科技股份有限公司 Method, device, equipment and medium for discriminating panel foreign matter defects
CN116385435B (en) * 2023-06-02 2023-09-26 济宁市健达医疗器械科技有限公司 Pharmaceutical capsule counting method based on image segmentation

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340752A (en) * 2019-12-04 2020-06-26 京东方科技集团股份有限公司 Screen detection method and device, electronic equipment and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114723701A (en) * 2022-03-31 2022-07-08 南通博莹机械铸造有限公司 Gear defect detection method and system based on computer vision

Also Published As

Publication number Publication date
CN115359043A (en) 2022-11-18

Similar Documents

Publication Publication Date Title
CN115359043B (en) Intelligent detection method for foreign matters on PCB (printed circuit board)
CN109934802B (en) Cloth defect detection method based on Fourier transform and image morphology
CN113538433B (en) Mechanical casting defect detection method and system based on artificial intelligence
CN110909690B (en) Method for detecting occluded face image based on region generation
CN112288010B (en) Finger vein image quality evaluation method based on network learning
CN114494256A (en) Electric wire production defect detection method based on image processing
CN116883408B (en) Integrating instrument shell defect detection method based on artificial intelligence
CN115775250A (en) Golden finger circuit board defect rapid detection system based on digital image analysis
CN115330795A (en) Cloth burr defect detection method
CN114792316A (en) Method for detecting spot welding defects of bottom plate of disc brake shaft
CN111008967B (en) Insulator RTV coating defect identification method
CN116229378A (en) Abnormal monitoring and early warning method for SMC cable tapping box
CN115330796A (en) Copper wire tinning defect identification method
CN114998356A (en) Axle defect detection method based on image processing
CN116703925B (en) Bearing defect detection method and device, electronic equipment and storage medium
CN108805144A (en) Shell hole recognition methods based on morphology correction and system, indication of shots equipment
CN112037137A (en) Method and device for eliminating fuzzy region of insulator disc surface edge in infrared image
CN115115622B (en) Punching press terminal visual detection device
CN115311288B (en) Method for detecting damage of automobile film
CN114550167B (en) Artificial intelligence based pear quality classification method and device
CN111047561A (en) Method for identifying cracks of shed tortoise of composite insulator
CN117853493B (en) Wallboard production quality detection method based on image processing
CN116630315B (en) Intelligent beverage packaging defect detection method based on computer vision
CN115731239B (en) Steel quality detection method
CN117392114B (en) Betel nut grade detection method based on image processing

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
TA01 Transfer of patent application right

Effective date of registration: 20230728

Address after: 323000 F11-496, Building 15, International Auto City, 309 Lvgu Avenue, Nanmingshan Street, Liandu District, Lishui City, Zhejiang Province

Applicant after: Zhejiang Jingyin Electronic Technology Co.,Ltd.

Address before: 226000 Huifengmiaojiao Industrial Park, Qidong City, Nantong City, Jiangsu Province

Applicant before: QIDONG HANGXIN PRACTICAL TECHNOLOGY Research Institute

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant