PCB circuit board image recognition method, device and equipment

By filtering and binarizing the formed images of the PCB circuit board, identifying the through hole area and generating serial numbers, the problem of inaccurate identification of PCB circuit boards in the prior art is solved, and the recognition efficiency is improved.

CN116071735BActive Publication Date: 2024-11-22DONGGUAN BOMEITE AUTOMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310129250.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-17
Publication Date
2024-11-22
Estimated Expiration
2043-02-17

AI Technical Summary

Technical Problem

In the prior art, the QR code identification of PCB circuit boards is inaccurate or unrecognizable, resulting in low recognition efficiency, especially due to the poor quality of QR codes caused by the large number of circuit board types, materials and colors.

Method used

通过获取PCB电路板的成型图像,进行滤波和二值化处理,识别通孔区域,筛选和拟合序列通孔区域的圆心坐标,生成序列号,实现自动化识别。

Benefits of technology

It improves the recognition efficiency of PCB circuit boards, avoids the recognition difficulties caused by the type, material and color of the circuit board, and does not require manual sampling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116071735B_ABST
    Figure CN116071735B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and equipment for image recognition of a PCB circuit board, the method comprising: obtaining a formed image of the PCB circuit board; a first processed formed image formed after the formed image of the PCB circuit board is subjected to a first process; a second processed formed image formed after the first processed formed image is subjected to a second process; according to the second processed formed image and the position information of the identified through-hole area, obtaining a search area of ​​the second processed formed image; according to the screening rule of the identified through-hole area, obtaining a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area, and the center coordinates of a circle fitted by the plurality of the discrete sequence through-hole areas; according to the center coordinates of a circle fitted by the plurality of the discrete sequence through-hole areas, generating a serial number of the PCB circuit board, and completing image recognition of the PCB circuit board. The present application can improve the recognition efficiency of PCB circuit boards.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a method, device and equipment for image recognition of a PCB circuit board. Background Art

[0002] In the prior art, the method for identifying PCB circuit boards is to directly print a two-dimensional code on the surface of the PCB circuit board, and then use a barcode gun to identify the model of the PCB circuit board. Due to the various types, materials, and colors of PCB circuit boards, there are cases where the quality of the two-dimensional code is poor, or the recognition is not accurate enough, or the recognition method is complicated, resulting in the problem that the barcode gun cannot recognize the two-dimensional code. For PCB circuit boards that cannot be identified, manual sampling is usually used for inspection, resulting in low efficiency in model recognition of PCB circuit boards.

[0003] Therefore, a PCB circuit board image recognition method is needed, which can generate a serial number of the PCB circuit board according to the formed image of the PCB circuit board and complete the image recognition of the PCB circuit board. Summary of the invention

[0004] To this end, the present invention provides a PCB circuit board image recognition method, device and equipment to try to solve or at least alleviate at least one of the above problems.

[0005] According to one aspect of the present invention, a method for image recognition of a PCB circuit board is provided, comprising:

[0006] Acquire a formed image of the PCB circuit board, wherein the formed image of the PCB circuit board includes an identified through-hole area of ​​the PCB circuit board, wherein the identified through-hole area includes a positioning through-hole area and a sequence through-hole area;

[0007] According to the formed image of the PCB circuit board, a first processed formed image is obtained after the formed image of the PCB circuit board is subjected to a first processing, wherein the first processing includes a filtering algorithm;

[0008] According to the first processed image, a second processed image is obtained after the first processed image is subjected to a second process, wherein the second processed image includes an image binarization algorithm;

[0009] Acquire a search area of ​​the second processed image according to the second processed image and the position information of the identified through-hole area in the second processed image;

[0010] According to the search area of ​​the second processed image and the screening rule of the identified through-hole area, a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area and the center coordinates of a circle fitted with the plurality of discrete sequence through-hole areas are obtained;

[0011] The center coordinates of a circle are fitted according to the plurality of discrete sequence through-hole areas, and a serial number of the PCB circuit board is generated to complete image recognition of the PCB circuit board.

[0012] In another embodiment of the present application, the acquiring of the formed image of the PCB circuit board, wherein the formed image of the PCB circuit board includes an identified through-hole area of ​​the PCB circuit board, comprises:

[0013] The PCB circuit board is arranged above the mapping light source, and the identification through hole of the PCB circuit board is aligned with the mapping light source;

[0014] An industrial camera is arranged above the PCB circuit board, and the industrial camera collects the entire area where the identification through hole of the PCB circuit board is located;

[0015] When the mapping light source projects light onto the PCB circuit board, the industrial camera shoots the identified through-hole area of ​​the PCB circuit board to obtain a formed image of the PCB circuit board.

[0016] In another embodiment of the present application, the step of obtaining, based on the formed image of the PCB circuit board, a first processed formed image formed by first processing the formed image of the PCB circuit board includes:

[0017] Performing image noise detection on the formed image of the PCB circuit board to obtain image noise information in the formed image of the PCB circuit board;

[0018] According to the image noise information in the formed image of the PCB circuit board, the image noise in the formed image of the PCB circuit board is subjected to a first processing to obtain a first processed formed image, wherein the first processing includes a filtering process, and the first processed formed image is the formed image of the PCB circuit board after the image noise is eliminated.

[0019] In another embodiment of the present application, the step of obtaining, based on the first processed image, a second processed image formed by performing a second process on the first processed image includes:

[0020] Acquire image color information of the first processed image;

[0021] According to the image color information of the first processed image, grayscale processing is performed on the first processed image to obtain a grayscale image of the first processed image;

[0022] According to the grayscale image of the first processed image, obtaining a grayscale value of the grayscale image;

[0023] According to the grayscale value of the grayscale image, the grayscale image is subjected to a second processing to obtain a second processed image, wherein the second processing includes an image binarization algorithm.

[0024] In another embodiment of the present application, the grayscale value of the pixel of the second processed image is 0 or 255.

[0025] In another embodiment of the present application, the step of acquiring the search area of ​​the second processed image according to the second processed image and the position information of the identified through-hole area in the second processed image includes:

[0026] Acquire position information of the identified through-hole area in the second processed molding image, wherein the identified through-hole area includes a sequence through-hole area and a positioning through-hole area;

[0027] Matching the positioning through-hole region in the identified through-hole region with a plurality of positioning templates, and obtaining a plurality of the positioning through-hole regions matched and identified in the second processed molding image;

[0028] According to the plurality of positioning through hole regions matched and identified in the second processed molding image, obtaining a determined coordinate system and an offset angle of each positioning through hole region in the second processed molding image;

[0029] According to the determined coordinate system and offset angle of each of the positioning through-hole regions in the second processed image, a search region of the second processed image is acquired.

[0030] In another embodiment of the present application, the step of obtaining the plurality of discrete sequence through-hole regions dispersed from the screened identified through-hole region and the center coordinates of the circle fitted by the plurality of discrete sequence through-hole regions according to the search region of the second processed image and the screening rule of the identified through-hole region comprises:

[0031] Filtering the identified through-hole area having a brightness of 255 in the search area of ​​the second processed molding image;

[0032] According to the screening result, obtaining the sequence through-hole area of ​​the screened identified through-hole area;

[0033] According to the serial through-hole region, the serial through-hole region is discretized to obtain a plurality of discrete serial through-hole regions after the serial through-hole region is discretized;

[0034] According to the plurality of discrete sequence through-hole regions and the identified through-hole area, a plurality of the discrete sequence through-hole regions that are not smaller than the identified through-hole area are acquired;

[0035] According to the plurality of discrete sequence through-hole regions that are not smaller than the identified through-hole area, the discrete sequence through-hole regions are fitted into circles to obtain a plurality of the fitted circles and the coordinates of the centers of the fitted circles.

[0036] In another embodiment of the present application, the method of fitting the center coordinates of a circle into a plurality of discrete sequence through-hole areas to generate a serial number of the PCB circuit board and completing image recognition of the PCB circuit board includes:

[0037] Arrange the center coordinates of the circles fitted into a plurality of discrete sequence through-hole areas, and obtain a decoding number corresponding to each of the center coordinates after decoding;

[0038] According to the decoded numbers corresponding to each of the circle center coordinates after decoding, the decoded numbers are sorted according to the arrangement order of the circle center coordinates to obtain the serial number of the PCB circuit board generated according to the decoded numbers;

[0039] Image recognition of the PCB circuit board is completed based on the serial number of the PCB circuit board generated by the decoded digital.

[0040] According to another aspect of the present invention, a PCB circuit board image recognition device is disclosed, the device comprising:

[0041] An image acquisition module is used to acquire a formed image of the PCB circuit board, wherein the formed image of the PCB circuit board includes an identified through-hole area of ​​the PCB circuit board, wherein the identified through-hole area includes a positioning through-hole area and a sequence through-hole area;

[0042] An image processing module is used to obtain, based on the formed image of the PCB circuit board, a first processed formed image formed after the formed image of the PCB circuit board is subjected to a first processing, wherein the first processing includes a filtering algorithm; based on the first processed formed image, obtain a second processed formed image formed after the first processed formed image is subjected to a second processing, wherein the second processed formed image includes an image binarization algorithm; based on the second processed formed image and the position information of the identified through-hole area in the second processed formed image, obtain a search area of ​​the second processed formed image; based on the search area of ​​the second processed formed image and the screening rule of the identified through-hole area, obtain a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area, and the center coordinates of a circle fitted with the plurality of discrete sequence through-hole areas;

[0043] The image recognition module is used to fit the center coordinates of a circle according to the plurality of discrete sequence through-hole areas, generate the serial number of the PCB circuit board, and complete the image recognition of the PCB circuit board.

[0044] According to another aspect of the present invention, there is provided a device, comprising:

[0045] Industrial cameras, PCB circuit boards and mapping light sources;

[0046] The industrial camera is used to obtain a formed image of the PCB circuit board, and the formed image of the PCB circuit board includes an identification through-hole area of ​​the PCB circuit board, and the identification through-hole area includes a positioning through-hole area and a sequence through-hole area; by setting a plurality of identification through-holes on the PCB circuit board according to a rule, the PCB circuit board is placed between the industrial camera and the mapping light source, and the identification through-hole is aligned and placed directly above the mapping light source, so that the mapping light source, the identification through-hole and the industrial camera are located on the same straight line, the mapping light source projects the light source onto the bottom end surface of the PCB circuit board, and the industrial camera shoots the PCB circuit board through the opening of the identification through-hole to obtain a formed image;

[0047] One or more processors; and a memory; one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods for image recognition of a PCB circuit board as described above.

[0048] According to the image recognition scheme of the PCB circuit board of the present invention, by acquiring the molding image of the PCB circuit board; the first processing molding image formed by the molding image of the PCB circuit board after the first processing; the second processing molding image formed by the first processing molding image after the second processing; according to the second processing molding image and the position information of the identification through-hole area, the search area of ​​the second processing molding image is acquired; according to the screening rule of the identification through-hole area, the plurality of discrete sequence through-hole areas dispersed by the screening identification through-hole area are acquired, and the center coordinates of the circle fitted by the plurality of the discrete sequence through-hole areas; according to the center coordinates of the circle fitted by the plurality of the discrete sequence through-hole areas, the serial number of the PCB circuit board is generated, and the image recognition of the PCB circuit board is completed. The present application obtains the molding image containing the identification through-hole on the PCB circuit board, thereby avoiding the influence of the inability to recognize the two-dimensional code due to the type, material and color of the PCB circuit board; obtains the identification through-hole information and arrangement information through the molding image, and decodes the hole position information of the identification through-hole through the positioning template, arranges it into the corresponding serial number, and decodes the molding image containing the identification through-hole on the PCB circuit board, without manual sampling, thereby improving the recognition efficiency of the PCB circuit board. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.

[0050] Figure 1 A schematic diagram showing the structure of a device 100 according to an embodiment of the present invention; and

[0051] Figure 2 A flow chart showing a PCB circuit board image recognition method 200 according to an embodiment of the present invention; and

[0052] Figure 3 A schematic structural diagram of a PCB circuit board image recognition device 300 according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0053] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0054] Figure 1 is a block diagram of an exemplary device 100. In a basic configuration, the device 100 of the present application typically includes: an industrial camera, a PCB circuit board, and a mapping light source;

[0055] The industrial camera is used to obtain a formed image of the PCB circuit board, and the formed image of the PCB circuit board includes an identification through-hole area of ​​the PCB circuit board, and the identification through-hole area includes a positioning through-hole area and a sequence through-hole area; by setting one or more identification through-holes on the PCB circuit board according to a rule, the identification through-holes pass through the top end surface and the bottom end surface of the PCB circuit board, the mapping light source is set below the PCB circuit board, and the mapping light source projects the light source vertically to one side of the identification through-hole, the PCB circuit board is placed between the industrial camera and the mapping light source, and the identification through-hole is aligned and placed directly above the mapping light source, the industrial camera is set above the PCB circuit board, so that the mapping light source, the identification through-hole and the industrial camera are located on the same straight line, the mapping light source projects the light source to the bottom end surface of the PCB circuit board, and the industrial camera shoots the PCB circuit board through the opening of the identification through-hole to obtain a formed image.

[0056] Also included are: a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between the processor 104 and the system memory 106.

[0057] Depending on the desired configuration, the processor 104 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital information processor (DSP), or any combination thereof. The processor 104 can include one or more levels of cache such as a first-level cache 110 and a second-level cache 112, a processor core 114, and registers 116. An example processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 118 can be used with the processor 104, or in some implementations, the memory controller 118 can be an internal part of the processor 104.

[0058] Depending on the desired configuration, the system memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.) or any combination thereof. The system memory 106 may include an operating system 120, one or more applications 122, and program data 124. In some embodiments, the application 122 may be arranged to operate using the program data 124 on the operating system. In some embodiments, the device 100 is configured to execute the image recognition method 200 of the PCB circuit board. The method 200 can form a software product test case by slicing and dividing according to the functional modules of the software product by setting a software product test environment, marking the expected results, and performing result comparison and verification based on the software product test case when the PCB circuit board image is recognized later. The program data 124 includes instructions for executing the method 200.

[0059] The device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other devices 162 via a network communication link via one or more communication ports 164.

[0060] A network communication link can be an example of a communication medium. The communication medium can generally be embodied as a computer-readable instruction, a data structure, a program module in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be such a signal, one or more of which or its changes in a data set can be carried out in a manner that encodes information in a signal. As a non-limiting example, the communication medium can include a wired medium such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used here can include both storage media and communication media. In some embodiments, one or more programs are stored in a computer-readable medium, and the one or more programs include instructions for executing certain methods, such as according to an embodiment of the present invention, the device 100 executes the image recognition method 200 of the PCB circuit board through the instructions.

[0061] The device 100 may be implemented as a part of a small-sized portable (or mobile) electronic device, such as a cellular phone, a personal digital assistant (PDA), a personal media player device, a wireless network browsing device, a personal head-mounted device, an application-specific device, or a hybrid device that may include any of the above functions. The device 100 may also be implemented as a personal computer including desktop and notebook computer configurations.

[0062] Figure 2 FIG. 2 is a flow chart of a PCB circuit board image recognition method 200 according to an embodiment of the present invention. Figure 2 As shown, the method 200 starts at step S210, where a formed image of the PCB circuit board is acquired. The formed image of the PCB circuit board includes an identified through-hole area, and the identified through-hole area includes a positioning through-hole area and a sequence through-hole area.

[0063] Specifically, one or more identification through holes are arranged on the PCB circuit board according to a rule, the identification through holes penetrate the top surface and the bottom surface of the PCB circuit board, the mapping light source is arranged below the PCB circuit board, and the mapping light source projects the light source vertically toward one side of the identification through hole, the PCB circuit board is placed between the industrial camera and the mapping light source, and the identification through hole is aligned and placed directly above the mapping light source, the industrial camera is arranged above the PCB circuit board, so that the mapping light source, the identification through hole and the industrial camera are located on the same straight line, the mapping light source projects the light source toward the bottom surface of the PCB circuit board, and the industrial camera shoots the PCB circuit board through the opening of the identification through hole to obtain a formed image.

[0064] Specifically, in one embodiment of the present application, the forming image of the PCB circuit board is obtained, the forming image of the PCB circuit board includes an identification through-hole area of ​​the PCB circuit board, and the identification through-hole area includes a positioning through-hole area and a sequence through-hole area, including:

[0065] The PCB circuit board is arranged above the mapping light source, and the identification through holes of the PCB circuit board are aligned with the mapping light source; the identification through holes of the PCB circuit board are some through holes with special rules arranged on the PCB circuit board, which are through holes used to characterize the unique numbering information of the PCB circuit board. The coding information of a PCB circuit board can be uniquely determined by the identification through holes. In an embodiment of the present application, the identification through holes include a plurality of positioning through holes for determining the coordinate system and a plurality of sequence through holes for identifying the model. The positioning through holes are used to determine the position of the through holes to determine the coordinates and offset angles of the through holes. The sequence through holes are used to identify the coding information of the PCB circuit board. The mapping light source is arranged below the PCB circuit board, and the mapping light source projects the light source vertically to one side of the identification through hole. The PCB circuit board is placed between the industrial camera and the mapping light source, and the identification through holes are aligned and placed directly above the mapping light source. The industrial camera is arranged above the PCB circuit board so that the mapping light source, the identification through holes and the industrial camera are located on the same straight line.

[0066] An industrial camera is arranged above the PCB circuit board, and the industrial camera collects the entire area where the identification through hole of the PCB circuit board is located; specifically, the industrial camera is aimed at the identification through hole, and at the same time, a mapping light source is projected toward the bottom end surface of the PCB circuit board, and the mapping light passes through the identification through hole to project the positioning through hole and the sequence through hole to the industrial camera, so that the positioning through hole and the sequence through hole are white bright spots in the molding image, so that the position information of the positioning through hole and the sequence through hole is reflected in the molding image;

[0067] When the mapping light source projects light onto the PCB circuit board, the industrial camera shoots the identification through hole area of ​​the PCB circuit board to obtain a formed image of the PCB circuit board. Specifically, at this time, the formed image of the PCB circuit board will include the entire area of ​​the identification through hole of the PCB circuit board.

[0068] Through step S220, based on the formed image of the PCB circuit board, a first processed formed image formed after the formed image of the PCB circuit board is subjected to a first processing is obtained, wherein the first processing includes a filtering algorithm.

[0069] Specifically, after the formed image of the PCB circuit board is captured, due to the influence of the industrial camera itself and the uneven projection of light from the mapping light source, there will be more noise in the formed image, which will affect the quality of the formed image and the determination of the positions of the positioning through holes and the sequence through holes in the formed image. It is necessary to firstly perform a first processing on the formed image, that is, to eliminate the image noise in the formed image through a filtering algorithm.

[0070] Specifically, in one embodiment of the present application, the step of obtaining, based on the formed image of the PCB circuit board, a first processed formed image formed by first processing the formed image of the PCB circuit board includes:

[0071] Perform image noise detection on the formed image of the PCB circuit board to obtain image noise information in the formed image of the PCB circuit board; specifically, detect the noise information in the image through image noise detection software to obtain image noise parameters and image noise distribution in the formed image.

[0072] According to the image noise information in the formed image of the PCB circuit board, the image noise in the formed image of the PCB circuit board is first processed to obtain a first processed formed image, wherein the first processing includes filtering processing, and the first processed formed image is the formed image of the PCB circuit board after the image noise is eliminated. Specifically, by performing the first processing on the formed image, the noise information in the formed image is removed, thereby forming the first processed formed image, and the first processed formed image will not have image noise, and the image quality will be more reliable.

[0073] Through step S230, based on the first processed image, a second processed image formed by the first processed image after the first processed image is subjected to a second process is obtained, and the second processed image includes an image binarization algorithm.

[0074] Specifically, after the molding image of the PCB circuit board comes out through the first process, the first processed molding image obtained eliminates image noise and has higher image quality. After the second process, the first processed molding image is binarized, that is, the first processed molding image is turned into a black and white image. Since in the molding image of the PCB circuit board taken by the industrial camera, the position where the identification through hole is located has a mapped light source passing through and projected onto the camera of the industrial camera, the position where the identification through hole is located will be a white bright spot after being photographed into the molding image. Therefore, after the image binarization process, the image of the position where the identification through hole is located in the first processed molding image will become white, and the remaining positions will become black, which is more convenient for identifying the position of the identification through hole.

[0075] Specifically, in one embodiment of the present application, the step of obtaining, based on the first processed image, a second processed image formed by performing a second processing on the first processed image includes:

[0076] Acquire the image color information of the first processed image; specifically, by acquiring the image color information of the first processed image, the color value of each pixel in the image can be acquired, so as to set corresponding parameters to convert the color image into a grayscale image;

[0077] According to the image color information of the first processed image, grayscale processing is performed on the first processed image to obtain a grayscale image of the first processed image; specifically, the color image is converted into a grayscale image through grayscale processing, so as to facilitate parameter setting in the next step, and the grayscale image with set parameters is converted into a black and white image;

[0078] According to the grayscale image of the image formed by the first processing, the grayscale value of the grayscale image is obtained; specifically, after obtaining the grayscale image, by obtaining the image grayscale value of each pixel, the grayscale parameter can be set according to the grayscale value of the pixel, so that the pixel points exceeding the set grayscale parameter can be turned white, and the pixel points below the set grayscale parameter can be turned black.

[0079] According to the grayscale value of the grayscale image, the grayscale image is subjected to a second processing to obtain a second processed image, wherein the second processing includes an image binarization algorithm. Specifically, the first processing is to convert the grayscale image into a black-and-white image according to the set parameters, wherein the black-and-white image is to convert the grayscale image into an image containing only grayscale values ​​of 0 or 255. In an embodiment of the present application, the grayscale value of the pixel point of the second processed image is 0 or 255.

[0080] Through step S240, a search area of ​​the second processed image is obtained according to the second processed image and the position information of the identified through-hole area in the second processed image.

[0081] Specifically, after the first processing molding image is binarized, the molding image is changed from a color image to a black and white image. At this time, the only colors left on the image are black and white. White is the area where the identified through hole is located, and black is the remaining area after removing the identified through hole. Therefore, the position information of the identified through hole can be obtained through the position information of the white in the image. Since the identified through hole is used to determine the coordinate position and identify the model, determining the position of the identified through hole also determines the search area.

[0082] Specifically, in one embodiment of the present application, the step of acquiring the search area of ​​the second processed image according to the second processed image and the position information of the identified through-hole area in the second processed image includes:

[0083] The position information of the identified through-hole area in the second processed image is obtained, and the identified through-hole area includes a sequence through-hole area and a positioning through-hole area; specifically, obtaining the position information of the identified through-hole area in the second processed image is to use the area where the identified through-hole is located as the search area. Since the identified through-hole areas may be connected or have a larger area after the first and second processing, it is necessary to process the obtained identified through-hole areas. The identified through-hole area includes a sequence through-hole area and a positioning through-hole area, wherein the sequence through-hole area is used to identify the model of the PCB circuit board, and the positioning through-hole area is used to determine the position coordinates.

[0084] The positioning through-hole area in the identified through-hole area is matched with a plurality of positioning templates, and the plurality of positioning through-hole areas matched and identified in the second processed molding image are obtained; specifically, the positioning template is used to determine the position of each positioning through-hole in the positioning through-hole area, and the position parameters of the positioning through-holes in each positioning through-hole area are identified by the positioning template, and the center coordinates and the offset angle of the positioning through-hole are obtained based on the position parameters of the positioning through-holes, thereby obtaining the sequence parameters of the positioning through-holes in the positioning through-hole area.

[0085] According to the multiple positioning through-hole areas matched and identified in the second processed molding image, the determined coordinate system and offset angle of each positioning through-hole area in the second processed molding image are obtained; specifically, each positioning through-hole will form a positioning through-hole area in the second processed molding image, and the positioning through-hole area is the image area formed on the molding image after the positioning through-hole is photographed by an industrial camera and undergoes the first processing and the second processing. Since there are multiple positioning through-holes on the PCB circuit board, there are also multiple positioning through-hole areas on the second processed molding image. After the positioning through-hole areas are identified by matching the positioning templates, the coordinate systems determined by the multiple positioning through-hole areas and the offset angle of each positioning through-hole area can be obtained through the sequence of the positioning templates. By determining the coordinate system and calculating the offset angle, the coordinate position and offset angle of each sequence through-hole area can be accurately calculated, so that the sequence position of each sequence through-hole area can be calculated.

[0086] According to the determined coordinate system and offset angle of each of the positioning through-hole areas in the second processed molding image, the search area of ​​the second processed molding image is obtained. Specifically, the search area of ​​the second processed molding image is obtained by matching the positioning through-hole area, and then obtaining the corresponding positioning through-hole area and the serial through-hole area as the area on the second processed molding image for generating the serial number of the PCB circuit board. Since the coordinate system and the offset angle are determined by the positioning through-hole area, the coordinate system and the offset angle of the serial through-hole area can be searched by the determined coordinate system and the offset angle, thereby obtaining the positioning through-hole area and the corresponding serial through-hole area as the search area. The function of the search area is to include all the positioning through-hole areas and the serial through-hole areas, and obtain the correct order of the serial through-hole areas according to the coordinate system and the offset angle.

[0087] Through step S250, based on the search area of ​​the second processed molding image and the screening rule of the identified through-hole area, a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area and the center coordinates of the circle fitted into by the plurality of discrete sequence through-hole areas are obtained.

[0088] Specifically, due to the shooting parameters of the industrial camera, or the fact that the identification through holes themselves are arranged closely, or the processing effect of the formed image after the first processing and the second processing, multiple identification through holes may be connected as one. By screening the identification through holes, the images of the non-identification through hole areas can be removed. By discretely processing the identification through hole areas, the multiple identification through holes connected as one can be dispersed into independent identification through holes. Then, by positioning the coordinate system and offset angle generated by the through hole area, the center coordinates of the circle fitted into each identification through hole area can be accurately generated. In this way, especially for the serial through holes in the identification through holes, the PCB circuit board serial number can be accurately generated through the serial through holes.

[0089] Specifically, in one embodiment of the present application, the step of obtaining the plurality of discrete sequence through-hole regions dispersed from the screened identified through-hole region and the center coordinates of the circle fitted by the plurality of discrete sequence through-hole regions according to the search region of the second processed image and the screening rule of the identified through-hole region comprises:

[0090] Filter the identified through-hole areas with a brightness of 255 in the search area of ​​the second processed image; specifically, in an embodiment of the present application, all identified through-hole areas are converted into images with a grayscale value of 255 after binarization processing. Therefore, searching for areas with a brightness of 255 in the search area means searching for the locations of all identified through-hole areas.

[0091] According to the screening result, the serial through-hole area of ​​the screened identification through-hole area is obtained; specifically, since the positioning through-hole area is to complete the determination of the coordinate system and offset angle of all identification through-holes, and the serial through-hole area is to generate the serial number of the PCB circuit board, therefore, after completing the screening of all identification through-hole areas, the positioning through-hole area can be deleted, and only the serial through-hole area is retained for the next step of obtaining the serial number of the PCB circuit board.

[0092] According to the serial through-hole area, the serial through-hole area is discretized to obtain a plurality of discrete serial through-hole areas after the serial through-hole area is discretized; specifically, after the serial through-hole area is discretized, a plurality of serial through-hole areas that may be interconnected are discretized to obtain a plurality of independent discrete serial through-hole areas. It can be known that after the serial through-hole area is discretized, the center coordinates and the offset angle of each discrete serial through-hole area are consistent with the identification through-hole set on the PCB circuit board.

[0093] Based on the multiple discrete sequence through-hole areas and the identified through-hole area, multiple discrete sequence through-hole areas that are not smaller than the identified through-hole area are obtained; specifically, due to the consistency of the identification through-hole parameters of the PCB circuit board photographed by the industrial camera, and the industrial camera photographing the identified through-hole as a mapping light source projected from below the identified through-hole through the identified through-hole onto the camera head of the industrial camera, the projection area of ​​its image will be larger than the area of ​​the identified through-hole itself, that is, the area of ​​the identified through-hole area on the formed image will be larger than the area of ​​the identified through-hole itself. Therefore, if the area of ​​the screened identified through-hole area is smaller than the area of ​​the identified through-hole itself, then the identified through-hole area must be generated by some interference signals, and these identified through-hole areas that are smaller than the area of ​​the identified through-hole itself need to be deleted.

[0094] According to the plurality of discrete sequence through-hole regions that are not less than the identified through-hole area, the discrete sequence through-hole regions are fitted into circles to obtain the plurality of fitted circles and the coordinates of the centers of the fitted circles. Specifically, after each independent discrete sequence through-hole region is determined, each independent discrete sequence through-hole region is fitted into a circle by a fitting circle algorithm, and the coordinates of the center of the fitted circle must be consistent with the center position of the corresponding identified through-hole on the PCB circuit board.

[0095] Through step S260, the center coordinates of a circle are fitted according to the plurality of discrete sequence through-hole areas, and a serial number of the PCB circuit board is generated, thereby completing image recognition of the PCB circuit board.

[0096] Specifically, according to the setting rules for identifying through holes of the PCB circuit board, the center coordinates of the discrete sequence through hole areas are sorted, and then the center coordinates are decoded into corresponding numbers to generate corresponding serial numbers. Then, the identified serial number is compared with the originally set serial number to complete the image recognition of the PCB circuit board. In this way, there is no need for manual detection, and all detection is completed automatically, thereby improving the recognition efficiency of the PCB circuit board.

[0097] Specifically, in one embodiment of the present application, the center coordinates of the circles fitted into a plurality of discrete sequence through-hole regions are arranged, and a decoding number corresponding to each of the center coordinates is obtained after decoding;

[0098] According to the decoded numbers corresponding to each of the circle center coordinates after decoding, the decoded numbers are sorted according to the arrangement order of the circle center coordinates to obtain the serial number of the PCB circuit board generated according to the decoded numbers;

[0099] Image recognition of the PCB circuit board is completed based on the serial number of the PCB circuit board generated by the decoded digital.

[0100] According to the image recognition scheme of the PCB circuit board of the present invention, by acquiring the molding image of the PCB circuit board; the first processing molding image formed by the molding image of the PCB circuit board after the first processing; the second processing molding image formed by the first processing molding image after the second processing; according to the second processing molding image and the position information of the identification through-hole area, the search area of ​​the second processing molding image is acquired; according to the screening rule of the identification through-hole area, the plurality of discrete sequence through-hole areas dispersed by the screening identification through-hole area are acquired, and the center coordinates of the circle fitted by the plurality of the discrete sequence through-hole areas; according to the center coordinates of the circle fitted by the plurality of the discrete sequence through-hole areas, the serial number of the PCB circuit board is generated, and the image recognition of the PCB circuit board is completed. The present application obtains the molding image containing the identification through-hole on the PCB circuit board, thereby avoiding the influence of the inability to recognize the two-dimensional code due to the type, material and color of the PCB circuit board; obtains the identification through-hole information and arrangement information through the molding image, and decodes the hole position information of the identification through-hole through the positioning template, arranges it into the corresponding serial number, and decodes the molding image containing the identification through-hole on the PCB circuit board, without manual sampling, thereby improving the recognition efficiency of the PCB circuit board.

[0101] It should be understood that although Figure 2The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0102] In one embodiment, Figure 3 As shown, a PCB circuit board image recognition device 300 is provided, and the device 300 includes: an image acquisition module, an image processing module, and an image recognition module.

[0103] An image acquisition module is used to acquire a formed image of the PCB circuit board, wherein the formed image of the PCB circuit board includes an identified through-hole area of ​​the PCB circuit board, wherein the identified through-hole area includes a positioning through-hole area and a sequence through-hole area;

[0104] An image processing module is used to obtain, based on the formed image of the PCB circuit board, a first processed formed image formed after the formed image of the PCB circuit board is subjected to a first processing, wherein the first processing includes a filtering algorithm; based on the first processed formed image, obtain a second processed formed image formed after the first processed formed image is subjected to a second processing, wherein the second processed formed image includes an image binarization algorithm; based on the second processed formed image and the position information of the identified through-hole area in the second processed formed image, obtain a search area of ​​the second processed formed image; based on the search area of ​​the second processed formed image and the screening rule of the identified through-hole area, obtain a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area, and the center coordinates of a circle fitted with the plurality of discrete sequence through-hole areas;

[0105] The image recognition module is used to fit the center coordinates of a circle according to the plurality of discrete sequence through-hole areas, generate the serial number of the PCB circuit board, and complete the image recognition of the PCB circuit board.

[0106] Specifically, in another embodiment of the present application, the image acquisition module is used to set the PCB circuit board above the mapping light source, and the identification through holes of the PCB circuit board are aligned with the mapping light source; the industrial camera is set above the PCB circuit board, and the industrial camera captures the entire area where the identification through holes of the PCB circuit board are located; the industrial camera shoots the identification through hole area of ​​the PCB circuit board when the mapping light source projects light onto the PCB circuit board, and obtains a formed image of the PCB circuit board.

[0107] Specifically, in another embodiment of the present application, the image processing module is used to perform image noise detection on the formed image of the PCB circuit board to obtain image noise information in the formed image of the PCB circuit board; based on the image noise information in the formed image of the PCB circuit board, perform a first processing on the image noise in the formed image of the PCB circuit board to obtain a first processed formed image, the first processing includes filtering processing, and the first processed formed image is the formed image of the PCB circuit board after the image noise is eliminated.

[0108] Specifically, in another embodiment of the present application, the image processing module is used to obtain image color information of the first processed image; based on the image color information of the first processed image, grayscale processing is performed on the first processed image to obtain a grayscale image of the first processed image; based on the grayscale image of the first processed image, a grayscale value of the grayscale image is obtained; based on the grayscale value of the grayscale image, a second processing is performed on the grayscale image to obtain a second processed image, and the second processing includes an image binarization algorithm.

[0109] Specifically, in another embodiment of the present application, the image processing module is used to obtain the position information of the identified through-hole area in the second processed molding image, and the identified through-hole area includes a serial through-hole area and a positioning through-hole area; the positioning through-hole area in the identified through-hole area is matched with multiple positioning templates to obtain multiple positioning through-hole areas matched and identified in the second processed molding image; based on the multiple positioning through-hole areas matched and identified in the second processed molding image, a determined coordinate system and offset angle of each positioning through-hole area in the second processed molding image is obtained; based on the determined coordinate system and offset angle of each positioning through-hole area in the second processed molding image, a search area of ​​the second processed molding image is obtained.

[0110] Specifically, in another embodiment of the present application, the image processing module is used to filter the identified through-hole areas with a brightness of 255 in the search area of ​​the second processed molding image; based on the filtering result, obtain the sequence through-hole areas of the filtered identified through-hole areas; based on the sequence through-hole areas, discretize the sequence through-hole areas to obtain multiple discrete sequence through-hole areas after the sequence through-hole areas are discretely processed; based on the multiple discrete sequence through-hole areas and the identified through-hole area, obtain multiple discrete sequence through-hole areas that are not less than the identified through-hole area; based on the multiple discrete sequence through-hole areas that are not less than the identified through-hole area, fit the discrete sequence through-hole areas into circles to obtain multiple fitted circles and multiple coordinates of the center of the fitted circles.

[0111] Specifically, in another embodiment of the present application, the image recognition module is used to arrange the center coordinates of the circle that is fitted into a plurality of discrete sequence through-hole areas, and obtain a decoding number corresponding to each of the center coordinates after decoding; based on the decoding number corresponding to each of the center coordinates after decoding, the decoding numbers are sorted according to the arrangement order of the center coordinates, and a serial number of the PCB circuit board generated based on the decoding numbers is obtained; based on the serial number of the PCB circuit board generated by the decoding numbers, image recognition of the PCB circuit board is completed.

[0112] According to the image recognition scheme of the PCB circuit board of the present invention, the forming image of the PCB circuit board is obtained by the image acquisition module; the image processing module forms a first processed forming image after the forming image of the PCB circuit board is subjected to a first processing; the first processed forming image is subjected to a second processing to form a second processed forming image; according to the second processed forming image and the position information of the identified through-hole area, the search area of ​​the second processed forming image is obtained; according to the screening rule of the identified through-hole area, the plurality of discrete sequence through-hole areas dispersed by the screened identified through-hole area are obtained, and the center coordinates of the circle fitted by the plurality of the discrete sequence through-hole areas; the image recognition module generates the serial number of the PCB circuit board according to the center coordinates of the circle fitted by the plurality of the discrete sequence through-hole areas, and completes the image recognition of the PCB circuit board. The present application avoids the influence of the inability to recognize the QR code due to the type, material and color of the PCB circuit board by obtaining the forming image containing the identified through-hole in the PCB circuit board; the identification through-hole information and arrangement information are obtained through the forming image, and the hole position information of the identified through-hole is decoded through the positioning template, arranged into the corresponding serial number, and the forming image containing the identified through-hole in the PCB circuit board is decoded, without manual sampling, thereby improving the recognition efficiency of the PCB circuit board.

[0113] It should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0114] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.

[0115] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0116] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0117] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0118] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.

[0119] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative, not restrictive, with respect to the scope of the present invention, which is defined by the appended claims.

Claims

1. A PCB circuit board image recognition method, characterized in that: include: Acquire a formed image of the PCB circuit board, wherein the formed image of the PCB circuit board includes an identified through-hole area of ​​the PCB circuit board, wherein the identified through-hole area includes a positioning through-hole area and a sequence through-hole area; According to the formed image of the PCB circuit board, a first processed formed image is obtained after the formed image of the PCB circuit board is subjected to a first processing, wherein the first processing includes a filtering algorithm; According to the first processed image, a second processed image is obtained after the first processed image is subjected to a second process, wherein the second process includes an image binarization algorithm; Acquire a search area of ​​the second processed image according to the second processed image and the position information of the identified through-hole area in the second processed image; According to the search area of ​​the second processed image and the screening rule of the identified through-hole area, a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area and the center coordinates of a circle fitted by the plurality of discrete sequence through-hole areas are obtained; According to the coordinates of the center of a circle fitted into a plurality of discrete sequence through-hole areas, a serial number of the PCB circuit board is generated, and image recognition of the PCB circuit board is completed; The step of acquiring the search area of ​​the second processed image according to the second processed image and the position information of the identified through-hole area in the second processed image includes: Acquire position information of the identified through-hole area in the second processed molding image, wherein the identified through-hole area includes a sequence through-hole area and a positioning through-hole area; Matching the positioning through-hole region in the identified through-hole region with a plurality of positioning templates, and acquiring a plurality of the positioning through-hole regions matched and identified in the second processed molding image; According to the multiple positioning through hole areas matched and identified in the second processed molding image, obtaining a determined coordinate system and an offset angle of each positioning through hole area in the second processed molding image; Acquire a search area of ​​the second processed image according to the determined coordinate system and offset angle of each of the positioning through-hole areas in the second processed image; The step of obtaining, based on the search area of ​​the second processed image and the screening rule of the identified through-hole area, a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area and the center coordinates of a circle fitted with the plurality of discrete sequence through-hole areas comprises: Screening the identified through-hole area having a brightness of 255 in the search area of ​​the second processed molding image; According to the screening result, obtaining the sequence through-hole area of ​​the screened identified through-hole area; According to the serial through-hole region, the serial through-hole region is discretized to obtain a plurality of discrete serial through-hole regions after the serial through-hole region is discretized; According to the plurality of discrete sequence through-hole regions and the identified through-hole area, a plurality of the discrete sequence through-hole regions that are not smaller than the identified through-hole area are acquired; According to the plurality of discrete sequence through-hole regions that are not smaller than the identified through-hole area, the discrete sequence through-hole regions are subjected to circle fitting processing to obtain a plurality of the fitted circles and the coordinates of the centers of the plurality of fitted circles; The method of fitting the center coordinates of a circle into a plurality of discrete sequence through-hole areas to generate a serial number of the PCB circuit board and completing image recognition of the PCB circuit board includes: Arrange the center coordinates of the circles fitted into a plurality of discrete sequence through-hole areas, and obtain a decoding number corresponding to each of the center coordinates after decoding; According to the decoded numbers corresponding to each of the circle center coordinates after decoding, the decoded numbers are sorted according to the arrangement order of the circle center coordinates to obtain the serial number of the PCB circuit board generated according to the decoded numbers; Image recognition of the PCB circuit board is completed based on the serial number of the PCB circuit board generated by the decoded digital.

2. The method according to claim 1, characterized in that The step of acquiring a formed image of the PCB circuit board, wherein the formed image of the PCB circuit board includes an identified through-hole area of ​​the PCB circuit board, comprises: The PCB circuit board is arranged above the mapping light source, and the identification through hole of the PCB circuit board is aligned with the mapping light source; An industrial camera is arranged above the PCB circuit board, and the industrial camera collects the entire area where the identification through hole of the PCB circuit board is located; When the mapping light source projects light onto the PCB circuit board, the industrial camera shoots the identified through-hole area of ​​the PCB circuit board to obtain a formed image of the PCB circuit board.

3. The method according to claim 1, characterized in that The step of obtaining a first processed formed image formed by first processing the formed image of the PCB circuit board according to the formed image of the PCB circuit board comprises: Performing image noise detection on the formed image of the PCB circuit board to obtain image noise information in the formed image of the PCB circuit board; According to the image noise information in the formed image of the PCB circuit board, the image noise in the formed image of the PCB circuit board is subjected to a first processing to obtain a first processed formed image, wherein the first processing includes a filtering process, and the first processed formed image is the formed image of the PCB circuit board after the image noise is eliminated.

4. The method according to claim 1, characterized in that The step of obtaining, based on the first processed image, a second processed image formed by performing a second process on the first processed image comprises: Acquire image color information of the first processed image; According to the image color information of the first processed image, grayscale processing is performed on the first processed image to obtain a grayscale image of the first processed image; According to the grayscale image of the first processed image, obtaining a grayscale value of the grayscale image; According to the grayscale value of the grayscale image, the grayscale image is subjected to a second processing to obtain a second processed image, wherein the second processing includes an image binarization algorithm.

5. The method according to claim 4, characterized in that The grayscale value of the pixel of the second processed image is 0 or 255.

6. A PCB circuit board image recognition device, the device is used to execute the PCB circuit board image recognition method according to any one of claims 1 to 5, the device comprising: An image acquisition module is used to acquire a formed image of the PCB circuit board, wherein the formed image of the PCB circuit board includes an identified through-hole area of ​​the PCB circuit board, wherein the identified through-hole area includes a positioning through-hole area and a sequence through-hole area; An image processing module is used to obtain, based on the formed image of the PCB circuit board, a first processed formed image formed after the formed image of the PCB circuit board is subjected to a first processing, wherein the first processing includes a filtering algorithm; based on the first processed formed image, obtain a second processed formed image formed after the first processed formed image is subjected to a second processing, wherein the second processed formed image includes an image binarization algorithm; based on the second processed formed image and the position information of the identified through-hole area in the second processed formed image, obtain a search area of ​​the second processed formed image; based on the search area of ​​the second processed formed image and the screening rule of the identified through-hole area, obtain a plurality of discrete sequence through-hole areas dispersed from the screened identified through-hole area, and the center coordinates of a circle fitted with the plurality of discrete sequence through-hole areas; The image recognition module is used to fit the center coordinates of a circle according to the plurality of discrete sequence through-hole areas, generate the serial number of the PCB circuit board, and complete the image recognition of the PCB circuit board.

7. A device comprising: Industrial cameras, PCB circuit boards and mapping light sources; The industrial camera is used to obtain a formed image of the PCB circuit board, and the formed image of the PCB circuit board includes an identification through-hole area of ​​the PCB circuit board, and the identification through-hole area includes a positioning through-hole area and a sequence through-hole area; by setting a plurality of identification through-holes on the PCB circuit board according to a rule, the PCB circuit board is placed between the industrial camera and the mapping light source, and the identification through-hole is aligned and placed directly above the mapping light source, so that the mapping light source, the identification through-hole and the industrial camera are located on the same straight line, the mapping light source projects the light source onto the bottom end surface of the PCB circuit board, and the industrial camera shoots the PCB circuit board through the opening of the identification through-hole to obtain a formed image; one or more processors; and memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for executing any of the methods according to claims 1-5.