[go: up one dir, main page]

CN113808067B - Circuit board detection method, visual detection equipment and device with storage function - Google Patents

Circuit board detection method, visual detection equipment and device with storage function Download PDF

Info

Publication number
CN113808067B
CN113808067B CN202010531315.4A CN202010531315A CN113808067B CN 113808067 B CN113808067 B CN 113808067B CN 202010531315 A CN202010531315 A CN 202010531315A CN 113808067 B CN113808067 B CN 113808067B
Authority
CN
China
Prior art keywords
image
sub
sample
detected
tested
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
CN202010531315.4A
Other languages
Chinese (zh)
Other versions
CN113808067A (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.)
Midea Group Co Ltd
Guangdong Midea White Goods Technology Innovation Center Co Ltd
Original Assignee
Midea Group Co Ltd
Guangdong Midea White Goods Technology Innovation Center 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 Midea Group Co Ltd, Guangdong Midea White Goods Technology Innovation Center Co Ltd filed Critical Midea Group Co Ltd
Priority to CN202010531315.4A priority Critical patent/CN113808067B/en
Publication of CN113808067A publication Critical patent/CN113808067A/en
Application granted granted Critical
Publication of CN113808067B publication Critical patent/CN113808067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Abstract

The application discloses a circuit board detection method, visual detection equipment and a device with a storage function, wherein the circuit board detection method comprises the following steps: acquiring an image to be measured, wherein the image to be measured comprises a circuit board to be measured, and at least one mounting area for mounting components to be measured is arranged on the circuit board to be measured; extracting a characteristic image of the installation area from the image to be detected; and predicting whether the mounting area is provided with the component to be tested or not based on the characteristic image by using a pre-trained recognition model. The circuit board detection method provided by the application can judge whether components are installed in the installation area on the circuit board.

Description

Circuit board detection method, visual detection equipment and device with storage function
Technical Field
The present application relates to the field of circuit boards, and in particular, to a circuit board detection method, a visual detection device, and a device with a storage function.
Background
In recent years, with the continuous development of electronic technology, a circuit board has been rapidly developed as an important component of the electronic technology, wherein the correctness of the mounting of components on the circuit board is one of the important factors for determining the quality of the circuit board.
The inventor of the application discovers that in the process of installing components on a circuit board, due to the diversity of circuit board formats, the difference of supplied materials of different components and errors of operators, the phenomenon of missing the components on the circuit board can occur, thereby leading to the rise of the defective rate of the circuit board and bringing serious influence to enterprises and factories.
Disclosure of Invention
The application mainly solves the technical problem of providing a circuit board detection method, visual detection equipment and a device with a storage function, and can judge whether components are installed in an installation area on a circuit board.
In order to solve the technical problems, the application adopts a technical scheme that: there is provided a circuit board inspection method, the method including: acquiring an image to be tested, wherein the image to be tested comprises a circuit board to be tested, and at least one mounting area for mounting components to be tested is arranged on the circuit board to be tested; extracting a characteristic image of the installation area from the image to be detected; and predicting whether the mounting area is provided with the component to be tested or not based on the characteristic image by a pre-trained recognition model.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided a visual inspection apparatus comprising a processor, a memory and communication circuitry, the processor being coupled to the memory and to the communication circuitry respectively, the processor implementing the steps of the above method by executing program data within the memory.
In order to solve the technical problems, the application adopts another technical scheme that: there is provided an apparatus having a storage function, storing program data executable by a processor to implement the steps in the above method.
The beneficial effects of the application are as follows: the circuit board detection method of the application predicts whether the to-be-detected component is installed in the installation area on the circuit board to be detected based on the obvious difference between the characteristic image of the installation area with the to-be-detected component and the characteristic image of the installation area without the to-be-detected component by utilizing the pre-trained identification model, and can detect whether the to-be-detected component is neglected to be installed in the circuit board to be detected.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. Wherein:
FIG. 1 is a schematic flow chart of an embodiment of a circuit board inspection method according to the present application;
FIG. 2 is a schematic flow chart of another embodiment of the method for inspecting a circuit board according to the present application;
FIG. 3 is a schematic diagram of a configuration file;
FIG. 4 is a schematic flow chart of another embodiment of the method for inspecting a circuit board according to the present application;
FIG. 5 is a schematic diagram of a variation flow of an image to be measured in an embodiment;
FIG. 6 is a schematic flow chart of a circuit board inspection method according to another embodiment of the present application;
FIG. 7 is a flow diagram of recognition model training in one embodiment;
FIG. 8 is a schematic view of the subsequent flow of FIG. 7;
FIG. 9 is a schematic diagram of a visual inspection apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an embodiment of a device with memory function according to the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Referring to fig. 1, fig. 1 is a flow chart of an embodiment of a circuit board detection method according to the present application, the detection method includes:
s110: and obtaining an image to be tested, wherein the image to be tested comprises a circuit board to be tested, and at least one mounting area for mounting components to be tested is arranged on the circuit board to be tested.
In an application scenario, the visual inspection apparatus obtains an image to be inspected by photographing a circuit board to be inspected, for example, a camera is mounted on the visual inspection apparatus, the circuit board to be inspected is photographed by the camera, or in order to improve the definition of the image to be inspected, a visual inspection system composed of hardware including an industrial camera, a lens, a coaxial light source, a photoelectric sensor, etc. is mounted on the visual inspection apparatus, and the image to be inspected is obtained by photographing the circuit board to be inspected by the visual inspection system. In another application scenario, the visual detection device does not shoot the circuit board to be detected, but directly receives the image to be detected sent by other devices.
The circuit board to be tested in the image to be tested can be either the whole circuit board to be tested or part of the circuit board to be tested, for example, when only detecting whether the mounting area of the local area on the circuit board to be tested is provided with the component to be tested, the acquired image to be tested can only comprise the local area corresponding to the circuit board to be tested.
At least one mounting area on the circuit board to be tested can be a mounting area for mounting the same component to be tested, and can also be a mounting area for mounting different components to be tested.
S120: and extracting the characteristic image of the installation area from the image to be detected.
A feature image is extracted from the image to be measured, using, for example, an image extraction technique, the feature image including features of the mounting region.
The extracted feature image may include features of a plurality of installation regions at the same time, or may include features of only a single installation region.
S130: and predicting whether the mounting area is provided with the component to be tested or not based on the characteristic image by using a pre-trained recognition model.
The feature images of the installation area where the components to be tested are installed are obviously different from the feature images of the installation area where the components to be tested are not installed, so that whether the components to be tested are installed in the installation area is predicted by using the recognition model based on the difference between the feature images of the installation area and the feature images of the installation area where the components to be tested are not installed.
When the extracted feature image only comprises the features of a single installation area, the extracted at least one feature image can be sequentially input into the recognition model, and the recognition model can sequentially predict whether all installation areas are provided with the components to be tested.
As can be seen from the above, the present embodiment predicts whether the component to be tested is mounted in the mounting area on the circuit board to be tested based on the obvious difference between the feature image of the mounting area where the component to be tested is mounted and the feature image of the mounting area where the component to be tested is not mounted by using the pre-trained recognition model, and can detect whether the component to be tested is neglected to be mounted on the circuit board to be tested.
Referring to fig. 2, fig. 2 is a flow chart of another embodiment of the circuit board detection method of the present application. The circuit board detection method comprises the following steps:
S210: and obtaining an image to be tested, wherein the image to be tested comprises a circuit board to be tested, and at least one mounting area for mounting components to be tested is arranged on the circuit board to be tested, and is used for mounting single components to be tested.
Unlike the above embodiment, at most one component to be tested can be mounted in the mounting area.
In other embodiments, the mounting area may simultaneously mount a plurality of components to be tested, which is not limited herein.
S220: and carrying out segmentation processing on the image to be detected to obtain a sub-image to be detected containing a single installation area.
S230: and extracting the image in the appointed area in the sub-image to be detected to obtain a characteristic image corresponding to the installation area in the sub-image to be detected.
Specifically, the designated area in the sub-image to be measured is a partial area designated in advance in the sub-image to be measured, and the features in the partial area can reflect the overall features of the sub-image to be measured.
S240: and predicting whether the mounting area is provided with the component to be tested or not based on the characteristic image by using a pre-trained recognition model.
According to the method, the characteristic image of the installation area is not directly extracted from the image to be detected, the image to be detected is firstly subjected to segmentation processing to obtain the sub-image to be detected which only comprises a single installation area, then the image in the appointed area is extracted from the sub-image to be detected to obtain the characteristic image corresponding to the installation area, namely the sub-image to be detected is directly processed to obtain the characteristic image corresponding to the installation area in the sub-image to be detected, and compared with the characteristic image obtained by directly processing the image to be detected, the method can avoid the defect that extraction errors occur due to excessive and complicated processing object data.
In an application scenario, when an image to be detected is segmented, a high-precision positioning vision technology is used for segmentation.
Specifically, during the segmentation, each installation area in the image to be detected is positioned with high precision, then the image is segmented, for example, a configuration file corresponding to the circuit board to be detected is generated in advance, the position (for example, the coordinate range of each installation area) of each installation area on the circuit board to be detected is stored in the configuration file, then each installation area is positioned with high precision according to the configuration file, and then the image is segmented.
In an application scenario, extracting an image in a designated area in the sub-image to be detected in step S230 specifically includes: and extracting the image at the appointed jack in the sub-images to be detected.
Specifically, in order to mount the component to be tested, the mounting area is provided with a plurality of jacks, which may be one, two or more, wherein a plurality of jacks on the mounting area are preset as designated jacks, and the designated jacks may be all jacks in the mounting area or some jacks in the mounting area.
When the to-be-detected components are not installed in the installation area, obvious jacks exist in the sub-to-be-detected images, and when the to-be-detected components are installed in the installation area, the jacks cannot exist in the sub-to-be-detected images due to the coverage of the to-be-detected components, so that in order to ensure accurate prediction of a subsequent recognition model, images at the designated jacks in the sub-to-be-detected images are extracted to obtain feature images corresponding to the installation area in the sub-to-be-detected images, namely, the subsequent recognition model predicts by using the general features of the jacks.
In the application scene, the step of extracting the image at the designated jack in the sub-image to be detected to obtain the characteristic image corresponding to the installation area in the sub-image to be detected comprises the following steps:
A: and obtaining the pre-stored center coordinates and the radius of the designated jack.
B: and setting an external rectangular frame capable of framing the appointed jack on the sub-image to be detected according to the circle center coordinates and the radius of the appointed jack.
C: and extracting the image in the circumscribed rectangular frame.
D: and splicing the images in the circumscribed rectangular frames to obtain the characteristic images.
Specifically, the circle center coordinates and the radius of a designated jack in the designated sub-images to be detected are acquired, then the circumscribed rectangular frame of the designated jack is determined, then the images in the circumscribed rectangular frame are extracted, wherein one designated jack corresponds to one circumscribed rectangular frame, and when the number of the designated jacks is more than two, the number of the circumscribed rectangular frames is also more than two, so that the images in the circumscribed rectangular frames are spliced, and further the characteristic images corresponding to the installation areas in the sub-images to be detected are obtained.
In other application scenarios, the extracted image may also be an image within an circumscribed circular frame covering the designated jack, which is not limited herein.
In this embodiment, the center coordinates and the radius of the designated jack are stored in a preset configuration file. That is, the center coordinates and the radius of the designated jack corresponding to each installation area are set and stored in the visual inspection apparatus.
Meanwhile, the step A specifically comprises the following steps: searching corresponding circle center coordinates and radius from the configuration file according to the names of components to be installed of the components to be installed in the installation area in advance.
Referring to fig. 3, the configuration file stores the names of the components to be mounted in each mounting area and the center coordinates and the radius of the designated jack in the mounting area, and after the feature image is obtained, the corresponding center coordinates and radius are searched from the configuration file according to the component names of the components to be mounted corresponding to each mounting area.
For example, in the application scenario of fig. 3, "RY3" is the name of the component to be tested, "Hole1" is the first designated jack in the mounting area corresponding to the component to be tested, and "Hole2" is the second designated jack in the mounting area corresponding to the component to be tested. That is, in the application scenario of fig. 3, images at two designated jacks in the sub-images to be detected are extracted respectively to obtain corresponding feature images.
In other application scenes, the corresponding center coordinates and the corresponding radius can be searched in the configuration file according to the positions of the installation areas.
Specifically, in addition to the center coordinates and the radius of the designated jack, the configuration file stores the positions of each installation area on the circuit board to be tested (for example, the coordinate positions of the centers of the installation areas), then in the obtained feature image, the positions of the installation areas corresponding to the feature image on the circuit board to be tested are obtained by using a high-precision positioning technology, and then the corresponding center coordinates and the radius are searched in the configuration file according to the positions.
Referring to fig. 4, fig. 4 is a flow chart of another embodiment of the circuit board detection method of the present application. The circuit board detection method comprises the following steps:
S310: and obtaining an image to be tested, wherein the image to be tested comprises a circuit board to be tested, and at least one mounting area for mounting components to be tested is arranged on the circuit board to be tested, and is used for mounting single components to be tested.
S320: and carrying out segmentation processing on the image to be detected to obtain a sub-image to be detected containing a single installation area.
S330: and extracting images at the positions of the two jacks farthest from the sub-images to be detected.
S340: and splicing the images at the two jacks which are farthest apart to obtain a characteristic image.
S350: and predicting whether the mounting area is provided with the component to be tested or not based on the characteristic image by using a pre-trained recognition model.
Referring to fig. 5, at least one mounting area 101 where a component 111 to be tested is required to be mounted is disposed on a circuit board to be tested in the image to be tested 100, each mounting area 101 can only mount one component 111 to be tested, in the application scenario of fig. 5, a part of the mounting areas 101 are mounted with components 111 to be tested, and a part of the mounting areas 101 are not mounted with components 111 to be tested, wherein the mounting areas 101 where the components 111 to be tested are mounted are represented by dotted lines, and the mounting areas 101 where the components 111 to be tested are not mounted are represented by solid lines.
After the image to be measured 100 is obtained, the image to be measured 100 is segmented to obtain a plurality of sub-images to be measured 110, then the image at the first jack 102 and the image at the second jack 103 in the sub-images to be measured 110 are respectively extracted, then the two images are spliced to obtain a characteristic image 120, and finally whether the mounting area 101 is provided with the component to be measured 111 is predicted based on the characteristic image 120.
Of course, in other embodiments, the images at other jacks in the sub-images to be measured may be extracted to obtain the feature image, for example, the images of the jacks located at the center of the installation area in the sub-images to be measured may be extracted to obtain the feature image, and in summary, the application is not limited to extracting the images at the specific jacks in the sub-images to be measured to obtain the feature image.
Referring to fig. 6, fig. 6 is a schematic view of a part of a flow chart of another embodiment of the circuit board detection method of the present application. In this embodiment, before the step of predicting whether the mounting area has the component to be tested mounted based on the feature image by the pre-trained recognition model, the method further includes:
s410: a first sample image is acquired, wherein the first sample image includes a sample circuit board, and a sample component is mounted within a mounting area of the sample circuit board.
S420: a second sample image is acquired, wherein the second sample image includes a sample circuit board, and no sample component is mounted within a mounting area of the sample circuit board.
S430: and training the recognition model by taking one of the first sample image and the second sample image as a positive sample and the other of the first sample image and the second sample image as a negative sample, wherein at least one mounting area is arranged on the sample circuit board.
The method for acquiring the first sample image and the second sample image is the same as the method for acquiring the sample image to be measured in the above embodiment, and will not be described herein.
The types of the sample circuit board and the circuit board to be tested can be the same or different, and the types of the sample components and the components to be tested can be the same or different.
And one or more than two mounting areas are arranged on the sample circuit board.
In an application scene, when training the recognition model, after a first sample image is acquired, the first sample image is used as a positive sample and marked as '1', after a second sample image is acquired, the second sample image is used as a negative sample and marked as '0', then the positive and negative samples are subjected to classification training by using an algorithm to obtain the recognition model, and in an application scene, the positive and negative samples are subjected to classification training by using an algorithm of resnet basic network to obtain the recognition model.
Specifically, in the training process, the recognition model is obtained based on the difference between the first sample image and the second sample image.
In an application scenario, each mounting area is used for mounting a single sample component, and before step S430, the first sample image is subjected to segmentation processing to obtain a first sub-to-be-tested image including the single mounting area, and the second sample image is subjected to segmentation processing to obtain a second sub-to-be-tested image including the single mounting area, where step S430 specifically includes: one of the first sub-test image and the second sub-test image is used as a positive sample, and the other of the first sub-test image and the second sub-test images is used as a negative sample to train the recognition model.
In the application scene, the first sample image and the second sample image are respectively segmented, the segmented first sub-image to be detected is used as a positive sample, and the second sub-image to be detected is used as a negative sample to be trained to obtain the identification model, so that the complexity of data processing can be reduced, the difficulty of generating the identification model is further reduced, and the accuracy of trained classification can be ensured.
In the application scene, before training of the identification model, images in a designated area in a first sub-image to be detected are extracted to obtain a first characteristic image, images in a designated area in a second sub-image to be detected are extracted to obtain a second characteristic image, and then training is carried out by taking the first characteristic image as a positive sample and the second characteristic image as a negative sample to obtain the identification model.
Specifically, the designated area in the first sub-image to be measured is a pre-designated partial area in the first sub-image to be measured, the features in the partial area can reflect the overall features of the first sub-image to be measured, the designated area in the second sub-image to be measured is a pre-designated partial area in the second sub-image to be measured, and the features in the partial area can reflect the overall features of the second sub-image to be measured.
The method comprises the steps of extracting images at appointed jacks in a first sub-image to be detected when extracting a first characteristic image corresponding to the first sub-image to be detected, for example, images at two jacks which are farthest from each other in the first sub-image to be detected, and extracting images at appointed jacks in a second sub-image to be detected when extracting a second characteristic image corresponding to the second sub-image to be detected, for example, images at two jacks which are farthest from each other in the second sub-image to be detected.
Specifically, the process of extracting the image at the designated jack in the first sub-image to be measured and the process of extracting the image at the designated jack in the second sub-image to be measured are the same as the process of extracting the image at the designated jack in the sub-image to be measured in the above step S230, and specific reference may be made to the above embodiment, and details are not repeated here.
When the jack images are extracted, the circumscribed rectangular images of the jacks are extracted, and the circumscribed rectangular images are spliced.
Specifically, the step of extracting an image at a designated jack in the first sub-image to be detected to obtain a first feature image includes: acquiring center coordinates and radii of designated jacks in a first sub-image to be detected, which is stored in advance; setting an external rectangular frame capable of framing the appointed jack on the first sub-image to be tested according to the circle center coordinates and the radius of the appointed jack; extracting images in the external rectangular frame; splicing the images in the external rectangular frame to obtain a first characteristic image; the step of extracting the image at the designated jack in the second sub-image to be detected to obtain the second characteristic image includes: acquiring center coordinates and radii of designated jacks in a pre-stored second sub-image to be detected; setting an external rectangular frame capable of framing the appointed jack on the second sub-image to be tested according to the circle center coordinates and the radius of the appointed jack; extracting images in the external rectangular frame; and splicing the images in the circumscribed rectangular frame to obtain a second characteristic image.
How to extract the external rectangular image of the jack can be referred to the relevant parts, and will not be described herein.
For a better understanding of the training process of the recognition model, a specific description is given below with reference to fig. 8 and 9.
After the first sample image 200 is acquired, the first sample image 200 is divided into a plurality of first sub-images to be measured 210, then images at the two jacks 202 and 203 farthest from each other in the first sub-images to be measured 210 are extracted, and the images at the two jacks 202 and 203 are spliced to obtain a first characteristic image 220 corresponding to the installation area in the first sub-images to be measured 210; after the second sample image 300 is acquired, the second sample image 300 is divided into a plurality of second sub-images to be measured 310, then images at the two jacks 302 and 303 which are farthest apart in the second sub-images to be measured 310 are extracted, and the images at the two jacks 302 and 303 are spliced to obtain a second characteristic image 320 corresponding to the installation area in the second sub-images to be measured 310.
And then labeling the first feature image 220 as '1', labeling the second feature image 320 as '0', and training by taking the first feature image 220 as a positive sample and the second feature image 320 as a negative sample to obtain the identification model.
When the identification model predicts the feature image extracted from the image to be detected, outputting 0 or 1, when the output is 0, the identification model indicates that no component to be detected is installed in the installation area, when the output is 1, the identification model indicates that the component to be detected is installed in the installation area, and in an application scene, the identification model outputs 0 or 1 and also outputs corresponding probabilities, for example, the output result of the identification model is 0 and 98%, and the probability that the component to be detected is not installed in the installation area is 98%.
It can be understood that when training the recognition model, if the positive sample is marked as yes and the negative sample is marked as no, the recognition model outputs the result of yes or no during prediction.
In other application scenarios, the first sample image is used as a negative sample and the second sample image is used as a positive sample to train to obtain the recognition model, correspondingly, the first sub-image to be detected is used as a negative sample and the second sub-image to be detected is used as a positive sample to train to obtain the recognition model, and the first characteristic image is used as a negative sample and the second characteristic image is used as a positive sample to train to obtain the recognition model.
In the embodiment, the training process of the whole recognition model is irrelevant to the types of the installation area and the sample components, so that the trained recognition model can predict whether the components are installed in the installation areas of various types, the universality of the recognition model is realized, the recognition model is not required to be retrained no matter how the components to be tested on the circuit board to be tested are updated later, the development workload is reduced, the difficulty of the whole detection method is reduced, an independent model is not required to be established for each type of components to be tested, and the calculation amount and the cost of a processor are reduced.
In any of the above embodiments, in order to prompt an operator when it is determined that no component to be tested is mounted in the mounting area, the circuit board detection method further includes: when the fact that the to-be-tested components are not mounted in the mounting area of the to-be-tested circuit board is predicted, prompt information is sent out, wherein the prompt information can be sound prompt information, light prompt information or a combination of the sound prompt information and the light prompt information, and the method is not limited.
Meanwhile, when the fact that the to-be-tested components are not mounted in the mounting area of the to-be-tested circuit board is predicted, in order to enable operators to determine which mounting area is specifically not mounted with the to-be-tested components, the sent information also carries identification information of the mounting area where the to-be-tested components are not mounted, and the identification information can be the component names of the corresponding to-be-tested components or the positions of the corresponding to-be-tested components on the to-be-tested circuit board.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a visual inspection apparatus according to the present application. The visual inspection apparatus 800 includes a processor 810, a memory 820 and a communication circuit 830, wherein the processor 810 is coupled to the memory 820 and the communication circuit 830, respectively, and the processor 810 implements the steps of any of the above methods by executing program data in the memory 820, wherein the detailed method can be referred to the above embodiments, and will not be repeated herein.
The visual inspection device 800 may perform inspection on each circuit board to be inspected in the actual operation process, or perform spot inspection on the circuit boards to be inspected at a certain time interval, or perform inspection on a specific circuit board to be inspected after receiving an instruction sent by a user.
Referring to fig. 10, fig. 10 is a device with a storage function of the present application, where the device 900 with a storage function stores program data 910, and the program data 910 can be executed by a processor to implement steps in any of the above methods, and detailed methods can be referred to the above embodiments and are not repeated herein.
The device 900 with a storage function may be a server, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk.
In summary, the circuit board detection method provided by the application can automatically judge whether the to-be-detected components are installed in the installation area of the to-be-detected circuit board, is simple, and can achieve the purposes of reducing the cost and improving the pushability.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the application, and all equivalent structures or equivalent processes using the descriptions and the drawings of the present application or directly or indirectly applied to other related technical fields are included in the scope of the present application.

Claims (10)

1. A method for inspecting a circuit board, the method comprising:
Acquiring an image to be tested, wherein the image to be tested comprises a circuit board to be tested, and at least one mounting area for mounting components to be tested is arranged on the circuit board to be tested, and the mounting area is used for mounting a single component to be tested;
Extracting a characteristic image of the installation area from the image to be detected;
Predicting whether the mounting area is provided with the component to be tested or not based on the characteristic image by a pre-trained recognition model;
The step of extracting the characteristic image of the installation area from the image to be detected comprises the following steps: dividing the image to be detected to obtain a sub-image to be detected containing a single installation area; extracting an image in a designated area in the sub-image to be detected to obtain the characteristic image corresponding to an installation area in the sub-image to be detected; acquiring a pre-stored circle center coordinate and a pre-stored radius of a designated jack; setting an external rectangular frame capable of framing the appointed jack on the sub-image to be detected according to the circle center coordinates and the radius of the appointed jack; extracting an image in the circumscribed rectangular frame; and splicing the images in the circumscribed rectangular frame to obtain the characteristic image.
2. The method of claim 1, wherein the center coordinates and radius of the designated jack are stored in a preset configuration file;
the step of obtaining the pre-stored circle center coordinates and radius of the designated jack comprises the following steps:
searching the corresponding center coordinates and radius from the configuration file according to the component names of the components to be tested, which are pre-allocated to the components to be tested in the installation area.
3. The method according to claim 1, wherein before the step of predicting whether the mounting area is mounted with the component under test based on the feature image by the pre-trained recognition model, further comprising:
Acquiring a first sample image, wherein the first sample image comprises a sample circuit board, and a sample component is arranged in a mounting area of the sample circuit board;
Acquiring a second sample image, wherein the second sample image comprises the sample circuit board, and the sample components are not mounted in a mounting area of the sample circuit board;
Training the recognition model with one of the first sample image and the second sample image as a positive sample and the other of the first sample image and the second sample image as a negative sample;
Wherein, be provided with at least one on the sample circuit board the installation district.
4. The method of claim 3, wherein said mounting area is for mounting a single said sample component,
Before the step of training the recognition model with one of the first sample image and the second sample image as a positive sample and the other of the first sample image and the second sample image as a negative sample, the method further comprises:
Dividing the first sample image to obtain a first sub-image to be detected containing a single installation area;
Dividing the second sample image to obtain a second sub-image to be detected containing a single installation area;
The step of training the recognition model with one of the first sample image and the second sample image as a positive sample and the other of the first sample image and the second sample image as a negative sample includes:
and training the identification model by taking one of the first sub-image to be tested and the second sub-image to be tested as a positive sample and the other of the plurality of first sub-images to be tested and the plurality of second sub-images to be tested as a negative sample.
5. The method of claim 4, wherein the training the recognition model with one of the first sub-test image and the second sub-test image as positive samples and the other of the plurality of first sub-test images and the plurality of second sub-test images as negative samples comprises:
extracting an image in a designated area in the first sub-image to be detected to obtain a first characteristic image;
Extracting an image in a designated area in the second sub-image to be detected to obtain a second characteristic image;
And training the identification model by taking the first characteristic image as a positive sample and the second characteristic image as a negative sample.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
The step of extracting the image in the designated area in the first sub-image to be detected to obtain a first characteristic image includes:
extracting an image at a designated jack in the first sub-image to be detected to obtain the first characteristic image;
The step of extracting the image in the appointed area in the second sub-image to be detected to obtain a second characteristic image comprises the following steps:
And extracting an image at a designated jack in the second sub-image to be detected to obtain the second characteristic image.
7. The method of claim 6, wherein the step of providing the first layer comprises,
The step of extracting the image at the designated jack in the first sub-image to be detected to obtain the first characteristic image includes:
extracting images at the positions of the two jacks farthest from each other in the first sub-image to be detected;
splicing images at the positions of the two jacks farthest from each other in the first sub-image to be detected to obtain the first characteristic image;
the step of extracting the image at the designated jack in the second sub-image to be detected to obtain the second characteristic image includes:
extracting images at the positions of the two jacks farthest from each other in the second sub-image to be detected;
And splicing images at the positions of the two jacks which are farthest from each other in the second sub-image to be detected to obtain the second characteristic image.
8. The method of claim 6, wherein the step of providing the first layer comprises,
The step of extracting the image at the designated jack in the first sub-image to be detected to obtain the first characteristic image includes:
acquiring the circle center coordinates and the radius of the appointed jack in the pre-stored first sub-image to be detected;
Setting an external rectangular frame capable of framing the appointed jack on the first sub-image to be detected according to the circle center coordinates and the radius of the appointed jack;
extracting an image in the circumscribed rectangular frame;
Splicing the images in the circumscribed rectangular frame to obtain the first characteristic image;
the step of extracting the image at the designated jack in the second sub-image to be detected to obtain the second characteristic image includes:
acquiring the circle center coordinates and the radius of the appointed jack in the pre-stored second sub-image to be detected;
setting an external rectangular frame capable of framing the appointed jack on the second sub-image to be detected according to the circle center coordinates and the radius of the appointed jack;
extracting an image in the circumscribed rectangular frame;
and splicing the images in the circumscribed rectangular frame to obtain the second characteristic image.
9. A visual inspection apparatus comprising a processor, a memory and communication circuitry, the processor being coupled to the memory and the communication circuitry, respectively, the processor implementing the steps of the method of any of claims 1-8 by executing program data within the memory.
10. An apparatus having a storage function, characterized in that program data are stored, which program data are executable by a processor to carry out the steps of the method according to any one of claims 1-8.
CN202010531315.4A 2020-06-11 2020-06-11 Circuit board detection method, visual detection equipment and device with storage function Active CN113808067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010531315.4A CN113808067B (en) 2020-06-11 2020-06-11 Circuit board detection method, visual detection equipment and device with storage function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010531315.4A CN113808067B (en) 2020-06-11 2020-06-11 Circuit board detection method, visual detection equipment and device with storage function

Publications (2)

Publication Number Publication Date
CN113808067A CN113808067A (en) 2021-12-17
CN113808067B true CN113808067B (en) 2024-07-05

Family

ID=78943734

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010531315.4A Active CN113808067B (en) 2020-06-11 2020-06-11 Circuit board detection method, visual detection equipment and device with storage function

Country Status (1)

Country Link
CN (1) CN113808067B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120339255A (en) * 2025-04-21 2025-07-18 安庆师范大学 A filter detection method and system for aluminum alloy die-casting production line

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239102A (en) * 2018-08-21 2019-01-18 南京理工大学 A kind of flexible circuit board open defect detection method based on CNN

Family Cites Families (57)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01140136A (en) * 1987-11-27 1989-06-01 Canon Inc lens barrel
JP2001138182A (en) * 1999-11-11 2001-05-22 Uht Corp Method for detecting center of target hole in flexible wiring board, and upper lighting system used in same method
JP3973439B2 (en) * 2002-02-07 2007-09-12 松下電器産業株式会社 Electronic component mounting apparatus and method
CN1318839C (en) * 2002-11-28 2007-05-30 威光机械工程股份有限公司 Automated Optical Inspection Method for Defective Components on Printed Circuit Boards
JP2005086034A (en) * 2003-09-09 2005-03-31 Yamagata Casio Co Ltd Component mounter, method and program for automatically switching carrying speed of printed circuit board
JP4996268B2 (en) * 2007-01-30 2012-08-08 勉 高橋 Printed circuit board inspection equipment
JP4203116B2 (en) * 2008-04-17 2008-12-24 Juki株式会社 Component mounting equipment
CN101807289B (en) * 2010-03-15 2012-10-10 深圳市中钞科信金融科技有限公司 Modeling method for distributed image processing system
CN101915769B (en) * 2010-06-29 2012-03-28 华南理工大学 Automatic optical inspection method for printed circuit board comprising resistance element
CN102074031B (en) * 2011-01-13 2013-08-07 广东正业科技股份有限公司 Mark establishing method for printed circuit board appearance inspection machine
JP5684057B2 (en) * 2011-06-22 2015-03-11 富士機械製造株式会社 Electronic component mounting device
CN102937595B (en) * 2012-11-13 2015-05-20 浙江省电力公司电力科学研究院 Method, device and system for detecting printed circuit board (PCB)
CN103712555B (en) * 2013-07-10 2016-06-29 湖北工业大学 Automotive frame pilot hole vision on-line measurement system and method thereof
CN103925911B (en) * 2014-04-23 2016-01-06 杭州师范大学 The reference object detection method of flexible circuit board correction station
CN105466951B (en) * 2014-09-12 2018-11-16 江苏明富自动化科技股份有限公司 A kind of automatic optical detection device and its detection method
CN104655641A (en) * 2015-01-31 2015-05-27 华南理工大学 High-precision full-automatic FPC (Flexible Printed Circuit) defect detecting device and detecting process
JP6496159B2 (en) * 2015-02-23 2019-04-03 株式会社Screenホールディングス Pattern inspection apparatus and pattern inspection method
CN104777176B (en) * 2015-03-25 2018-08-24 广州视源电子科技股份有限公司 PCB detection method and device
CN104764712B (en) * 2015-04-29 2017-08-25 浙江工业大学 A kind of detection method of PCB vias inwall quality
KR102018070B1 (en) * 2015-06-19 2019-09-04 야마하하쓰도키 가부시키가이샤 Component mounting device and component mounting method
CN105184793B (en) * 2015-09-02 2018-01-16 广东电网有限责任公司汕尾供电局 A kind of electric energy meter sample appearance and pcb board element testing method
CN105223208B (en) * 2015-09-23 2018-04-06 深圳市繁维科技有限公司 A kind of circuit board detecting template and preparation method thereof, circuit board detecting method
CN105451461B (en) * 2015-11-25 2018-08-14 四川长虹电器股份有限公司 Pcb board localization method based on SCARA robots
CN105631893A (en) * 2016-03-09 2016-06-01 中国矿业大学 Method and device for detecting whether capacitor is correctly mounted through photographing
CN105930848B (en) * 2016-04-08 2019-02-15 西安电子科技大学 SAR Image Target Recognition Method Based on SAR-SIFT Features
CN105957059B (en) * 2016-04-20 2019-03-01 广州视源电子科技股份有限公司 Electronic component missing detection method and system
CN106127746A (en) * 2016-06-16 2016-11-16 广州视源电子科技股份有限公司 Circuit board element missing part detection method and system
CN106127780B (en) * 2016-06-28 2019-01-18 华南理工大学 A kind of curved surface defect automatic testing method and its device
CN106327496B (en) * 2016-08-26 2019-04-23 西安电子科技大学 Detection system and method for blind hole defect of PCB bare board based on AOI
CN106447020B (en) * 2016-09-13 2018-11-23 上海海事大学 A kind of intelligence method for counting colonies
CN106501706B (en) * 2016-11-03 2019-06-04 昆山万像光电有限公司 A kind of blind hole detection method of printed circuit board
CN107470170B (en) * 2017-07-13 2019-03-19 上海第二工业大学 PCB detection sorting system and method based on machine vision
CN107422859B (en) * 2017-07-26 2020-04-03 广东美的制冷设备有限公司 Gesture-based regulation and control method and device, computer-readable storage medium and air conditioner
CN109429473A (en) * 2017-08-28 2019-03-05 株洲中车时代电气股份有限公司 Automatic check method and device with polarity electronic component in circuit board
CN108010011B (en) * 2017-10-23 2020-04-10 鲁班嫡系机器人(深圳)有限公司 Device for assisting in identifying target area on target object and equipment comprising device
CN108601220B (en) * 2017-12-28 2021-01-08 四川深北电路科技有限公司 A method of punching a printed circuit board
CN108362220A (en) * 2018-01-19 2018-08-03 中国科学技术大学 The method of measuring three-dimensional morphology and defects detection for printed wiring board
CN110348268A (en) * 2018-04-02 2019-10-18 鲁班嫡系机器人(深圳)有限公司 A kind of characteristic recognition method, device and the equipment of the part of electronic component
CN108830838A (en) * 2018-05-28 2018-11-16 江苏大学 A kind of pcb board incompleteness Trigger jitter detection method of sub-pixel
CN108802046B (en) * 2018-06-01 2021-01-29 中国电子科技集团公司第三十八研究所 Optical detection device and detection method for defects of hybrid integrated circuit assembly
CN108765416B (en) * 2018-06-15 2023-10-03 福建工程学院 PCB surface defect detection method and device based on rapid geometric alignment
CN108871454A (en) * 2018-07-24 2018-11-23 北京航天控制仪器研究所 A kind of detection device and method for circuit board comprehensive parameters
CN109342456B (en) * 2018-09-14 2021-05-11 广东工业大学 Welding spot defect detection method, device and equipment and readable storage medium
CN109287077B (en) * 2018-10-17 2024-04-05 华南理工大学 Electronic component inserting method and device
CN109859164B (en) * 2018-12-21 2023-08-01 苏州绿控传动科技股份有限公司 Method for visual inspection of PCBA (printed circuit board assembly) through rapid convolutional neural network
CN109785324B (en) * 2019-02-01 2020-11-27 佛山市南海区广工大数控装备协同创新研究院 A large-format PCB board positioning method
CN109886950A (en) * 2019-02-22 2019-06-14 北京百度网讯科技有限公司 Circuit board defect detection method and device
CN109902806B (en) * 2019-02-26 2021-03-16 清华大学 Determination method of target bounding box of noisy image based on convolutional neural network
CN109934808B (en) * 2019-03-04 2020-11-27 佛山市南海区广工大数控装备协同创新研究院 A method for classifying PCB board defects based on image multi-shape normal gradient difference
CN109839385B (en) * 2019-03-04 2021-11-16 佛山市南海区广工大数控装备协同创新研究院 Self-adaptive PCB defect visual positioning detection and classification system
CN110619622B (en) * 2019-04-08 2023-07-14 天津职业技术师范大学(中国职业培训指导教师进修中心) Automatic detection method of breadboard structure image based on computer vision
CN110334433B (en) * 2019-07-03 2022-03-15 电子科技大学 A method for automatic generation of PCB package files
CN110415240A (en) * 2019-08-01 2019-11-05 国信优易数据有限公司 Sample image generation method and device, circuit board defect detection method and device
CN110502832A (en) * 2019-08-20 2019-11-26 苏州浪潮智能科技有限公司 A kind of method and device of board design
CN110636715B (en) * 2019-08-27 2021-07-13 杭州电子科技大学 An automatic welding and defect detection method based on self-learning
CN110567369B (en) * 2019-08-30 2021-01-08 苏州康代智能科技股份有限公司 Hole site detection method and detection equipment based on up-down drilling circuit board
CN111107717A (en) * 2019-12-02 2020-05-05 欣强电子(清远)有限公司 Processing method of PCB capable of preventing finger from scratching

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109239102A (en) * 2018-08-21 2019-01-18 南京理工大学 A kind of flexible circuit board open defect detection method based on CNN

Also Published As

Publication number Publication date
CN113808067A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
CN112053318A (en) Two-dimensional PCB defect real-time automatic detection and classification device based on deep learning
CN111766253A (en) Solder paste printing quality detection method, data processing device and computer storage medium
CN106127746A (en) Circuit board element missing part detection method and system
CN113804704A (en) Circuit board detection method, visual detection equipment and device with storage function
CN115511821B (en) Pipeline defect identification method and device, electronic equipment and storage medium
CN113269769A (en) Defect detection method, system and equipment based on image registration
CN113538427B (en) Product defect identification method, device, equipment and readable storage medium
CN117274245B (en) AOI optical detection method and system based on image processing technology
CN118521586A (en) Product vision detection device and method based on machine vision
CN114266737A (en) Defect detection method, apparatus, equipment and storage medium
CN113808067B (en) Circuit board detection method, visual detection equipment and device with storage function
CN117589770A (en) PCB patch board detection method, device, equipment and medium
CN115115596B (en) Electronic component detection method and device and automatic quality inspection equipment
CN113554645B (en) Industrial anomaly detection method and device based on WGAN
CN111275682A (en) Container detection method, device and computer readable storage medium
CN119180820B (en) Detection method and terminal for printing defects of surfaces and trademarks of automobile glass
CN115439852A (en) Method and system for extracting box numbers of multiple types of nameplates, storage medium and computer equipment
CN110817674B (en) A method, device, equipment and storage medium for missing step detection of escalator
CN117455917B (en) Establishment of false alarm library of etched lead frame and false alarm on-line judging and screening method
CN116993654B (en) Camera module defect detection method, device, equipment, storage medium and product
CN115184378B (en) Concrete structure disease detection system and method based on mobile equipment
CN118464903A (en) PCB defect analysis method
CN118941499A (en) A visual detection method for circuit board defects, electronic equipment and storage medium
CN118261875A (en) Universal defect detection method, device and equipment based on visual language big model
CN117576044A (en) Vehicle surface scratch detection method and system for vehicle damage assessment

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