CN-121981135-A - Method for monitoring circuit board two-dimensional code repetition code
Abstract
The invention discloses a monitoring method of a two-dimensional code re-code of a circuit board, which relates to the technical field of industrial image recognition and comprises the steps of obtaining a global image of a large circuit board and processing the global image to obtain a binarized image, carrying out parallel scanning on the binarized image, recognizing a locator of the two-dimensional code, determining a boundary and an angle, carrying out geometric correction on a two-dimensional code area based on the determined boundary and the angle, outputting a corrected standardized two-dimensional code image area, carrying out parallel decoding on a plurality of corrected standardized two-dimensional code image areas, reading a module sequence, restoring a corresponding data character string, outputting a data record of physical position coordinates, establishing a temporary data buffer area on the large circuit board, and carrying out re-code judgment on the data record of the physical position coordinates and the record existing in the temporary data buffer area. The invention solves the quality control failure problem caused by the repeated code pollution tracing system, and ensures the reliability and the integrity of the product tracing system in the intelligent manufacturing process.
Inventors
- Lu Xiangchui
- WANG HAILANG
- LIU BING
- Peng enliang
- Xiao Shungou
Assignees
- 江西旭昇电子股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260122
Claims (8)
- 1. The monitoring method of the two-dimensional code repetition code of the circuit board is characterized by comprising the steps of obtaining and processing a global image of a large circuit board to obtain a binarized image; carrying out parallel scanning on the binarized image, identifying a locator of the two-dimensional code, determining a boundary and an angle, carrying out geometric correction on the two-dimensional code area based on the determined boundary and the angle, and outputting a corrected standardized two-dimensional code image area; Parallel decoding is carried out on the plurality of corrected standardized two-dimensional code image areas, a module sequence is read, corresponding data character strings are restored, and data records of physical position coordinates are output; Establishing a temporary data buffer area for the current circuit board large board, performing repeated code judgment on the data record of the physical position coordinates and the record existing in the temporary data buffer area, and performing corresponding processing on repeated codes to obtain a unique two-dimensional code data list; And outputting the duplicate code intelligent judgment and unique two-dimensional code data list to a manufacturing execution unit, controlling the circuit board large board to move out of the station, and emptying the temporary data buffer area.
- 2. The method for monitoring the two-dimensional code repetition code of the circuit board according to claim 1, wherein the method for monitoring the two-dimensional code repetition code of the circuit board is characterized by comprising the following steps of: shooting the positioned large circuit board by an industrial camera to obtain a global image of the large circuit board; and carrying out gray level processing on the global image of the large circuit board to obtain a gray level image, and carrying out binarization processing on the gray level image based on a brightness threshold value to obtain a binarized image.
- 3. The method for monitoring the two-dimensional code repetition code of the circuit board according to claim 2, wherein the method is characterized in that the binarized image is scanned in parallel, the locator of the two-dimensional code is identified, and the boundary and the angle are determined, and the method comprises the following steps: and carrying out parallel scanning on the binarized image, identifying the locator of the two-dimensional code, and determining the boundary and angle of the two-dimensional code according to the identified locator of the two-dimensional code.
- 4. The method for monitoring the two-dimensional code repetition code of the circuit board according to claim 3, wherein the method for monitoring the two-dimensional code repetition code of the circuit board is characterized by geometrically correcting the two-dimensional code region based on the determined boundary and angle and outputting a corrected standardized two-dimensional code image region, and comprises the following steps: Deducing geometrical deformation parameters required for correcting the deformed two-dimensional code region into a regular shape through a geometrical transformation relation based on the boundary and the angle; And carrying out affine transformation or perspective transformation on the two-dimensional code region according to the geometric deformation parameters, outputting the transformed two-dimensional code region and a corrected standardized two-dimensional code image region.
- 5. The method for monitoring the two-dimensional code repetition code of the circuit board according to claim 4, wherein the method is characterized by decoding a plurality of corrected standardized two-dimensional code image areas in parallel, reading a module sequence, restoring a corresponding data character string, and outputting a data record of physical position coordinates, and comprises the following steps: scanning the corrected standardized two-dimensional code image areas in parallel according to a Z-shaped path to read a black-and-white module sequence; Decoding and restoring the read black-and-white module sequence into a corresponding data character string, and recording the physical position coordinates of the data character string in the global image of the large circuit board; Binding the data character string with the physical position coordinates to form a data record of the physical position coordinates.
- 6. The method for monitoring the two-dimensional code repetition code of the circuit board according to claim 5, wherein the step of establishing a temporary data buffer area for a large circuit board comprises the following steps: And establishing a temporary data buffer area for the current large circuit board based on the data record of the physical position coordinates output after decoding all the two-dimensional codes on the large circuit board.
- 7. The method for monitoring the two-dimensional code repetition code of the circuit board according to claim 6, wherein the method for monitoring the two-dimensional code repetition code of the circuit board is characterized by comprising the following steps of: comparing the data character strings in the data records of the physical position coordinates with the recorded data character strings existing in the temporary data cache area; If the data character string does not exist in the temporary data cache area, the data record of the physical position coordinates is stored in the temporary data cache area; if the data character string exists in the temporary data cache area, comparing the physical position coordinate in the data record of the physical position coordinate with the physical position coordinate recorded by the same code in the temporary data cache area; When the physical position coordinates are different, judging as a true heavy code, alarming and not recording the data of the current physical position coordinates into a temporary data buffer area; When the physical position coordinates are the same, ignoring the data records of the current physical position coordinates, and generating a unique two-dimensional code data list through the records stored in the temporary data buffer area based on the processed data records of all the physical position coordinates.
- 8. The method for monitoring the two-dimensional code repetition code of the circuit board according to claim 7, wherein the steps of outputting the repeated code intelligent judgment and the unique two-dimensional code data list to the manufacturing execution unit, controlling the large circuit board to move out of the station, and emptying the temporary data buffer area comprise the following steps: Outputting the unique two-dimensional code data list obtained after the intelligent judgment processing of the repeated codes to a manufacturing execution unit, and controlling the large circuit board to move out of the photographing station after the output of the unique two-dimensional code data list is finished; And after the large circuit board moves out of the photographing station, a temporary data buffer area established for the current large circuit board is emptied.
Description
Method for monitoring circuit board two-dimensional code repetition code Technical Field The invention relates to the technical field of industrial image recognition, in particular to a method for monitoring a circuit board two-dimensional code repetition code. Background In intelligent manufacturing of a Printed Circuit Board (PCB), in order to achieve accurate tracing, an industry commonly adopts a scheme of spraying and printing unique two-dimensional codes (such as QR codes or DataMatrix codes) on a PCB large board for each finished board (PCS), the traditional technology relies on an industrial code scanner or a visual sensor, and data are read through steps of image acquisition, locator identification (such as a return-font block of the QR codes or an L-shaped frame of the DataMatrix codes), geometric correction, decoding and the like, and in order to improve efficiency, the advanced scheme adopts a parallel processing architecture, so that a plurality of two-dimensional codes in an image can be positioned and decoded at the same time. The prior art focuses on improving the recognition speed and accuracy, but lacks the verification of the uniqueness of the data logic level, when the same two-dimensional code is repeatedly sprayed at different positions due to suspension or interference of a production line, the existing system can upload the weight codes as effective data to a Manufacturing Execution System (MES), and the repeated data cannot be distinguished as recognition errors or real spraying errors due to successful decoding of the judgment logic stop, so that the uniqueness of the two-dimensional code is damaged, and the quality tracing flow is invalid. Disclosure of Invention The present invention has been made in view of the above-described problems occurring in the prior art. Therefore, the invention provides a method for monitoring the two-dimensional code repetition code of the circuit board, which solves the problem of data pollution of a traceability system caused by lack of unique verification of a data logic level in the prior art. In order to solve the technical problems, the invention provides the following technical scheme: the invention provides a monitoring method of a two-dimensional code of a circuit board, which comprises the steps of obtaining a global image of a large circuit board and processing the global image to obtain a binarized image; carrying out parallel scanning on the binarized image, identifying a locator of the two-dimensional code, determining a boundary and an angle, carrying out geometric correction on the two-dimensional code area based on the determined boundary and the angle, and outputting a corrected standardized two-dimensional code image area; Parallel decoding is carried out on the plurality of corrected standardized two-dimensional code image areas, a module sequence is read, corresponding data character strings are restored, and data records of physical position coordinates are output; Establishing a temporary data buffer area for the current circuit board large board, performing repeated code judgment on the data record of the physical position coordinates and the record existing in the temporary data buffer area, and performing corresponding processing on repeated codes to obtain a unique two-dimensional code data list; And outputting the duplicate code intelligent judgment and unique two-dimensional code data list to a manufacturing execution unit, controlling the circuit board large board to move out of the station, and emptying the temporary data buffer area. The invention relates to a preferable scheme of a monitoring method for a two-dimensional code repetition code of a circuit board, which comprises the following steps of: shooting the positioned large circuit board by an industrial camera to obtain a global image of the large circuit board; and carrying out gray level processing on the global image of the large circuit board to obtain a gray level image, and carrying out binarization processing on the gray level image based on a brightness threshold value to obtain a binarized image. The invention relates to a preferable scheme of a circuit board two-dimensional code repeated code monitoring method, which comprises the following steps of carrying out parallel scanning on a binarized image, identifying a locator of a two-dimensional code and determining a boundary and an angle, wherein the method comprises the following steps of: and carrying out parallel scanning on the binarized image, identifying the locator of the two-dimensional code, and determining the boundary and angle of the two-dimensional code according to the identified locator of the two-dimensional code. The invention relates to a circuit board two-dimensional code repeated code monitoring method, which comprises the following steps of geometrically correcting a two-dimensional code area based on a determined boundary and an angle, and outputting a corrected standardized two-d