CN111709937A - Method for detecting pin of circuit board based on machine vision - Google Patents

Method for detecting pin of circuit board based on machine vision Download PDF

Info

Publication number
CN111709937A
CN111709937A CN202010560194.6A CN202010560194A CN111709937A CN 111709937 A CN111709937 A CN 111709937A CN 202010560194 A CN202010560194 A CN 202010560194A CN 111709937 A CN111709937 A CN 111709937A
Authority
CN
China
Prior art keywords
image
area
pin
row
column
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010560194.6A
Other languages
Chinese (zh)
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.)
Shanghai Wangju Information Technology Co ltd
Original Assignee
Shanghai Wangju Information 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 Shanghai Wangju Information Technology Co ltd filed Critical Shanghai Wangju Information Technology Co ltd
Priority to CN202010560194.6A priority Critical patent/CN111709937A/en
Publication of CN111709937A publication Critical patent/CN111709937A/en
Pending legal-status Critical Current

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
    • G06T5/70
    • 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/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • 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

Abstract

The invention discloses a method for detecting a pin of a circuit board based on machine vision, which comprises the following steps: A. adjusting a camera to shoot above a vertical chip to obtain a two-dimensional gray image: acquiring a two-dimensional gray Image by using an Image operator gram-Image-async (Image, AcqHandle-1) above a vertical chip of a camera by using a halcon; B. denoising and thresholding the image: according to the two-dimensional Image, denoising and threshold processing in the row direction are respectively carried out; C. and calculating connected domains of the processed image, and calculating the number of the connected domains, the area of each connected domain and coordinates. The invention can achieve the aim of automatically detecting the pin of the chip without the help of people, not only saves the labor cost, but also improves the detection precision, reduces the rejection rate, improves the overall quality of the product, enlarges the market competitiveness of the product and accords with the benefits of enterprises.

Description

Method for detecting pin of circuit board based on machine vision
Technical Field
The invention relates to the technical field of electronic device detection, in particular to a method for detecting a pin of a circuit board based on machine vision.
Background
In recent years, with the development of science and technology and the improvement of living standard, the production of electronic chips is qualitatively changed from quality to variety, and the volume of electronic products is smaller, but the requirements on functions and quality are higher and higher, so the requirements on the electronic chips are higher and higher.
Pin needles are a common type of cemented carbide on chips: the hard alloy has very high hardness, intensity, wearability and corrosion resistance, and the Pin needle is used on the chip, can be fine plays the effect of linking circuit components and parts, and in most advanced science and technology field, the quality requirement to the chip is high especially, therefore the quality of Pin needle directly concerns the quality problem of product, and the chip is done more and less more, but the logical requirement increases at double, therefore the Pin needle on the chip is usually very little, and the quantity is very much.
In the normal production process, the pin detection method is used for identifying the pin in the circuit board by an artificial method, the artificial method is influenced by subjective factors, misjudgment is easily caused on a matching result, particularly, the problem that the pin is found on a very small chip is almost a requirement which can not be met by naked eyes, and therefore, the pin detection method based on the machine vision for the circuit board is provided.
Disclosure of Invention
The invention aims to provide a method for detecting a pin of a circuit board based on machine vision, which aims to solve the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme: a method for detecting pin of circuit board based on machine vision includes following steps:
A. adjusting a camera to shoot above a vertical chip to obtain a two-dimensional gray image: acquiring a two-dimensional gray Image by using an Image operator gram-Image-async (Image, AcqHandle-1) above a vertical chip of a camera by using a halcon;
B. denoising and thresholding the image: according to the two-dimensional Image, denoising and threshold processing in the row direction are respectively carried out;
C. calculating connected domains for the processed image, and calculating the number of the connected domains, the area and the coordinate of each connected domain: dividing the pin needle into small regions by performing four connected domain operator processing on the denoised and smoothed image, and calculating the number of the connected domains, the area of each connected domain and the coordinate position of the row and the column of each connected domain;
D. judging whether the pin is a normal pin according to the number and the area: and comparing with the real pin area, firstly comparing whether the number is equal, including whether the number of each column in each row is equal, and finally comparing the area of each pin.
Preferably, the AcqHandle in the step a is the equipment number of the camera, the camera is arranged on the mounting mechanism, the mounting mechanism comprises a support, a movable joint, a cross rod and a chuck, the chuck is fixedly mounted on one side of the cross rod, and the other side of the cross rod is connected with the top of the support through the movable joint.
Preferably, the step B specifically includes the following steps:
b1, according to the two-dimensional gray Image, adopting a Median-Image (Image: media, "circle", "R", continuous) to remove salt and pepper noise from the Image, wherein the media is the processed Image, and the parameters "circle" and "R" represent that each pixel point of the Image is traversed by a circular area with the radius R = R;
and B2, according to the two-dimensional image Median, performing threshold segmentation on the image by using a threshold operator threshold (Median, Segment, Min, Max), wherein Segment is the image obtained after segmentation, and Min and Max are respectively the lower limit and the upper limit of the gray value of the selected pixel point.
Preferably, the step C specifically includes the following steps:
c1, according to the segmented image Segment, adopting a four Connected domain processing operator Connect (Segment, Connected Regions) to obtain each Connected domain, wherein the Connected Regions store the information of all Connected domains;
c2, according to the Connected domains function, firstly, screening the interference Regions by using an operator Select-shape (selected Regions: Select Regions, Features, Operation, Min, Max), wherein the Select Regions are the screened Regions, the Features are screening conditions, such as screening according to rows or columns, the Operation is Operation type "and" or ", Min and Max are respectively the selected lower limit and upper limit;
c3, calculating the Area and Row-Column coordinates of each connected domain by using an operator Area-center (Select areas: Area, Row, Column) for calculating the Area and Row-Column coordinates according to the selected Area Regions, wherein Area represents the Area, Row represents the Row, and Column represents the Column.
Preferably, the step D specifically includes the following steps:
d1, traversing each column of the current Row according to the Row of the Row, reading the area size of the corresponding pin of the Row and the column, comparing the area size with the real numerical value, if the difference between the area size and the real numerical value is larger than a preset value R, considering that the matching of the current section is unsuccessful, directly finishing the comparison, and considering that the current pin has problems;
d2, if the difference between the current segment and the current segment is less than the preset value R, then considering that the current segment is successfully matched, immediately reading each column element of the next row, and from the operation in D1, considering that the pin has no problem until the area of each row pin is less than R.
Compared with the prior art, the invention has the following beneficial effects:
the invention can achieve the aim of automatically detecting the pin of the chip without the help of people, not only saves the labor cost, but also improves the detection precision, reduces the rejection rate, improves the overall quality of the product, enlarges the market competitiveness of the product and accords with the benefits of enterprises.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A method for detecting pin of circuit board based on machine vision includes following steps:
A. adjusting a camera to shoot above a vertical chip to obtain a two-dimensional gray image: acquiring a two-dimensional gray Image by using an Image operator gram-Image-async (Image, AcqHandle-1) above a vertical chip of a camera by using a halcon;
B. denoising and thresholding the image: according to the two-dimensional Image, denoising and threshold processing in the row direction are respectively carried out;
C. calculating connected domains for the processed image, and calculating the number of the connected domains, the area and the coordinate of each connected domain: dividing the pin needle into small regions by performing four connected domain operator processing on the denoised and smoothed image, and calculating the number of the connected domains, the area of each connected domain and the coordinate position of the row and the column of each connected domain;
D. judging whether the pin is a normal pin according to the number and the area: and comparing with the real pin area, firstly comparing whether the number is equal, including whether the number of each column in each row is equal, and finally comparing the area of each pin.
The pin needle detection device can achieve the aim of automatically detecting the pin needle of the chip without the help of people, not only saves labor cost, but also improves detection precision, reduces rejection rate, improves the overall quality of products, enlarges market competitiveness of the products, and accords with interests of enterprises.
The AcqHandle in the step A is the equipment number of the camera, the camera is arranged on the mounting mechanism, meanwhile, the mounting mechanism comprises a support, a movable joint, a cross rod and a chuck, the chuck is fixedly mounted on one side of the cross rod, the other side of the cross rod is connected with the top of the support through the movable joint, the AcqHandle =140721069145216, and the length and the width of Image are 1280.
The step B specifically comprises the following steps:
b1, according to the two-dimensional gray Image, adopting a Median filter operator medium-Image (Image: media, "circle", "R", continuous) to remove salt and pepper noise from the Image, wherein the media is the processed Image, the parameters "circle" and "R" represent that each pixel point of the Image is traversed by a circular area with radius R = R, and R selects 3 as the radius;
and B2, performing threshold segmentation on the image by using a threshold operator threshold (Median, Segment, Min, Max) according to a two-dimensional image Median, wherein Segment is the segmented image, Min and Max are respectively a lower limit and an upper limit of the gray value of the selected pixel point, Min is set to 80, and Max is set to 200.
The step C specifically comprises the following steps:
c1, according to the segmented image Segment, adopting a four Connected domain processing operator Connect (Segment, Connected Regions) to obtain each Connected domain, wherein the Connected Regions store the information of all Connected domains;
c2, according to a Connected domain function Connected Regions, firstly, screening the Connected Regions by using an operator Select-shape (selected Regions: Select Regions, Features, Operation, Min, Max), and screening out those interference Regions, wherein Select Regions are screened out, Features are screening conditions, such as screening according to rows or columns, etc., Operation is Operation type "and" or ", Min and Max are respectively selected lower limit and upper limit, Min is set to 500, Max is set to 9999, that is, a region with an area between 500 and 999999 is selected as a pin, wherein the reason that 500 is selected as the lower limit is to make the algorithm more robust and avoid external interference;
c3, calculating the Area and Row and Column coordinates of each connected domain by using an operator Area-center (Select areas: Area, Row, Column) for calculating the Area and Column coordinates according to the screened Area Select areas, wherein Area represents the Area and has the value of [590, 560, 555, 785, 541, 567], Row represents the Row and has the value of [200, 201, 198, 420, 412, 419], Column represents the Column and has the value of [654, 721, 864, 652, 719, 870], and the number of pins obtained from the data is two rows and three columns.
The step D specifically comprises the following steps:
d1, traversing each column of the current Row according to Row, reading the area of the corresponding pin of the Row and column, comparing the area with the real numerical value, if the difference between the area and the area is greater than a preset value R, considering that the current section matching is unsuccessful, directly finishing the comparison, considering that the current pin has a problem, and considering that R is 10;
d2, if the difference between the current segment and the current segment is less than the preset value R, then considering that the current segment is successfully matched, immediately reading each column element of the next row, and from the operation in D1, considering that the pin has no problem until the area of each row pin is less than R.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (5)

1. A method for detecting a pin of a circuit board based on machine vision is characterized by comprising the following steps: the method comprises the following steps:
A. adjusting a camera to shoot above a vertical chip to obtain a two-dimensional gray image: acquiring a two-dimensional gray Image by using an Image operator gram-Image-async (Image, AcqHandle-1) above a vertical chip of a camera by using a halcon;
B. denoising and thresholding the image: according to the two-dimensional Image, denoising and threshold processing in the row direction are respectively carried out;
C. calculating connected domains for the processed image, and calculating the number of the connected domains, the area and the coordinate of each connected domain: dividing the pin needle into small regions by performing four connected domain operator processing on the denoised and smoothed image, and calculating the number of the connected domains, the area of each connected domain and the coordinate position of the row and the column of each connected domain;
D. judging whether the pin is a normal pin according to the number and the area: and comparing with the real pin area, firstly comparing whether the number is equal, including whether the number of each column in each row is equal, and finally comparing the area of each pin.
2. The method for detecting pin of circuit board based on machine vision according to claim 1, characterized in that: and the AcqHandle in the step A is the equipment number of the camera, the camera is arranged on the mounting mechanism, the mounting mechanism comprises a support, a movable joint, a cross rod and a chuck, the chuck is fixedly mounted on one side of the cross rod, and the other side of the cross rod is connected with the top of the support through the movable joint.
3. The method for detecting pin of circuit board based on machine vision according to claim 1, characterized in that: the step B specifically comprises the following steps:
b1, according to the two-dimensional gray Image, adopting a Median-Image (Image: media, "circle", "R", continuous) to remove salt and pepper noise from the Image, wherein the media is the processed Image, and the parameters "circle" and "R" represent that each pixel point of the Image is traversed by a circular area with the radius R = R;
and B2, according to the two-dimensional image Median, performing threshold segmentation on the image by using a threshold operator threshold (Median, Segment, Min, Max), wherein Segment is the image obtained after segmentation, and Min and Max are respectively the lower limit and the upper limit of the gray value of the selected pixel point.
4. The method for detecting pin of circuit board based on machine vision according to claim 1, characterized in that: the step C specifically comprises the following steps:
c1, according to the segmented image Segment, adopting a four Connected domain processing operator Connect (Segment, Connected Regions) to obtain each Connected domain, wherein the Connected Regions store the information of all Connected domains;
c2, according to the Connected domains function, firstly, screening the interference Regions by using an operator Select-shape (selected Regions: Select Regions, Features, Operation, Min, Max), wherein the Select Regions are the screened Regions, the Features are screening conditions, such as screening according to rows or columns, the Operation is Operation type "and" or ", Min and Max are respectively the selected lower limit and upper limit;
c3, calculating the Area and Row-Column coordinates of each connected domain by using an operator Area-center (Select areas: Area, Row, Column) for calculating the Area and Row-Column coordinates according to the selected Area Regions, wherein Area represents the Area, Row represents the Row, and Column represents the Column.
5. The method for detecting pin of circuit board based on machine vision according to claim 1, characterized in that: the step D specifically comprises the following steps:
d1, traversing each column of the current Row according to the Row of the Row, reading the area size of the corresponding pin of the Row and the column, comparing the area size with the real numerical value, if the difference between the area size and the real numerical value is larger than a preset value R, considering that the matching of the current section is unsuccessful, directly finishing the comparison, and considering that the current pin has problems;
d2, if the difference between the current segment and the current segment is less than the preset value R, then considering that the current segment is successfully matched, immediately reading each column element of the next row, and from the operation in D1, considering that the pin has no problem until the area of each row pin is less than R.
CN202010560194.6A 2020-06-18 2020-06-18 Method for detecting pin of circuit board based on machine vision Pending CN111709937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010560194.6A CN111709937A (en) 2020-06-18 2020-06-18 Method for detecting pin of circuit board based on machine vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010560194.6A CN111709937A (en) 2020-06-18 2020-06-18 Method for detecting pin of circuit board based on machine vision

Publications (1)

Publication Number Publication Date
CN111709937A true CN111709937A (en) 2020-09-25

Family

ID=72541987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010560194.6A Pending CN111709937A (en) 2020-06-18 2020-06-18 Method for detecting pin of circuit board based on machine vision

Country Status (1)

Country Link
CN (1) CN111709937A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024007871A1 (en) * 2022-07-06 2024-01-11 深圳青澜生物技术有限公司 Microneedle patch inspection method and apparatus, computer device, and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761534A (en) * 2014-01-22 2014-04-30 哈尔滨工业大学 Method for detecting vision localization of QFP element
CN108961275A (en) * 2018-07-23 2018-12-07 南京师范大学 Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection
CN109100370A (en) * 2018-06-26 2018-12-28 武汉科技大学 A kind of pcb board defect inspection method based on sciagraphy and connected domain analysis
CN109859186A (en) * 2019-01-31 2019-06-07 江苏理工学院 A kind of lithium battery mould group positive and negative anodes detection method based on halcon
CN110473165A (en) * 2019-07-02 2019-11-19 深圳市格灵人工智能与机器人研究院有限公司 A kind of welding quality of circuit board detection method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761534A (en) * 2014-01-22 2014-04-30 哈尔滨工业大学 Method for detecting vision localization of QFP element
CN109100370A (en) * 2018-06-26 2018-12-28 武汉科技大学 A kind of pcb board defect inspection method based on sciagraphy and connected domain analysis
CN108961275A (en) * 2018-07-23 2018-12-07 南京师范大学 Deviate the positioning of PCB core piece and character segmentation method of feature vector based on projection
CN109859186A (en) * 2019-01-31 2019-06-07 江苏理工学院 A kind of lithium battery mould group positive and negative anodes detection method based on halcon
CN110473165A (en) * 2019-07-02 2019-11-19 深圳市格灵人工智能与机器人研究院有限公司 A kind of welding quality of circuit board detection method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024007871A1 (en) * 2022-07-06 2024-01-11 深圳青澜生物技术有限公司 Microneedle patch inspection method and apparatus, computer device, and storage medium

Similar Documents

Publication Publication Date Title
CN109242853B (en) PCB defect intelligent detection method based on image processing
US8520892B2 (en) Method and apparatus for detecting objects
CN108132017A (en) A kind of plane welded seam Feature Points Extraction based on laser vision system
CN108665458B (en) Method for extracting and identifying surface defects of transparent body
CN102005051B (en) Edge detection method and related device
CN115063421B (en) Pole piece region detection method, system and device, medium and defect detection method
CN114219794B (en) Method and system for evaluating surface quality of shaving board based on machine vision
CN110648330B (en) Defect detection method for camera glass
CN112669295A (en) Lithium battery pole piece defect detection method based on secondary threshold segmentation theory
CN114399522A (en) High-low threshold-based Canny operator edge detection method
CN110111350A (en) A kind of welding pool edge detection method, device and storage medium
CN116363126B (en) Welding quality detection method for data line USB plug
CN115100191A (en) Metal casting defect identification method based on industrial detection
CN111709937A (en) Method for detecting pin of circuit board based on machine vision
CN111353992B (en) Agricultural product defect detection method and system based on textural features
CN116735612A (en) Welding defect detection method for precise electronic components
CN106600615B (en) A kind of Edge-Detection Algorithm evaluation system and method
CN117152165B (en) Photosensitive chip defect detection method and device, storage medium and electronic equipment
CN109211919B (en) Method and device for identifying magnetic tile defect area
CN112767491B (en) Method and device for determining weld bead inflection point and computer readable storage medium
CN115496984A (en) Ceramic tile finished product defect automatic identification method and device, intelligent terminal and storage medium
CN113902699A (en) Method and device for determining inflection point of weld joint, processor and welding robot
CN114693686A (en) Method for detecting stains on bed sheet cloth
CN109949245B (en) Cross laser detection positioning method and device, storage medium and computer equipment
CN110779877B (en) Medical literature state timing detection platform

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200925

RJ01 Rejection of invention patent application after publication