CN116329738A - Positioning method and device of circuit board target, electronic equipment and storage medium - Google Patents
Positioning method and device of circuit board target, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116329738A CN116329738A CN202310261253.3A CN202310261253A CN116329738A CN 116329738 A CN116329738 A CN 116329738A CN 202310261253 A CN202310261253 A CN 202310261253A CN 116329738 A CN116329738 A CN 116329738A
- Authority
- CN
- China
- Prior art keywords
- target
- theoretical
- circuit board
- size
- actual
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 71
- 238000003860 storage Methods 0.000 title claims abstract description 9
- 238000013461 design Methods 0.000 claims abstract description 25
- 238000012545 processing Methods 0.000 claims description 122
- 238000003384 imaging method Methods 0.000 claims description 24
- 230000015654 memory Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 7
- 230000003287 optical effect Effects 0.000 claims description 6
- 238000004519 manufacturing process Methods 0.000 abstract description 16
- 230000000875 corresponding effect Effects 0.000 description 50
- 238000006243 chemical reaction Methods 0.000 description 27
- 239000007787 solid Substances 0.000 description 10
- 238000010801 machine learning Methods 0.000 description 9
- 230000001276 controlling effect Effects 0.000 description 8
- 238000012937 correction Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000005520 cutting process Methods 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 150000003071 polychlorinated biphenyls Chemical class 0.000 description 3
- 238000007639 printing Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 238000013075 data extraction Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000003754 machining Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000004080 punching Methods 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/02—Positioning or observing the workpiece, e.g. with respect to the point of impact; Aligning, aiming or focusing the laser beam
- B23K26/03—Observing, e.g. monitoring, the workpiece
- B23K26/032—Observing, e.g. monitoring, the workpiece using optical means
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/36—Removing material
- B23K26/38—Removing material by boring or cutting
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B23—MACHINE TOOLS; METAL-WORKING NOT OTHERWISE PROVIDED FOR
- B23K—SOLDERING OR UNSOLDERING; WELDING; CLADDING OR PLATING BY SOLDERING OR WELDING; CUTTING BY APPLYING HEAT LOCALLY, e.g. FLAME CUTTING; WORKING BY LASER BEAM
- B23K26/00—Working by laser beam, e.g. welding, cutting or boring
- B23K26/70—Auxiliary operations or equipment
- B23K26/702—Auxiliary equipment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Optics & Photonics (AREA)
- Plasma & Fusion (AREA)
- Mechanical Engineering (AREA)
- Image Processing (AREA)
Abstract
The embodiment of the application provides a positioning method, a device, electronic equipment and a storage medium for a circuit board target, which can rapidly and accurately position the target position of a circuit board to be processed on the premise of not needing a target template, thereby improving the production efficiency of a printed circuit board. The positioning method of the circuit board target comprises the following steps: receiving a design drawing file of a circuit board to be processed, and analyzing the theoretical size and the theoretical centroid coordinates of a target from the design drawing file; acquiring a preset theoretical type and a preset theoretical shape of a target; based on the theoretical centroid coordinates, the theoretical type and the theoretical shape, a suspected target is identified in a scanning image corresponding to the circuit board to be processed; identifying the actual size of the suspected target; and if the difference value between the actual size and the theoretical size is not greater than the set threshold value, determining the suspected target as the target.
Description
[ field of technology ]
The embodiment of the application relates to the technical field of laser processing, in particular to a positioning method and device of a circuit board target, electronic equipment and a storage medium.
[ background Art ]
At present, with the function iteration of high and new electronic products, the requirements on the demand and the manufacturing precision of small integrated circuit chips are gradually increased. Accordingly, when mass-producing printed wiring boards (Printed Circuit Board, PCB) for processing integrated circuit chips, laser processing technology is also employed to accommodate high demand and high precision requirements. Specifically, after the punching of the PCB is completed, the laser processing equipment can scan and identify targets on the PCB by utilizing the self machine vision function, and then guide laser beams to complete the cutting of the PCB according to the design drawing.
In the prior art, the identification of the target position on the PCB mainly depends on the manual frame selection target range on the image generated by scanning, so that the laser processing equipment performs machine learning on the image in the frame selection range to generate a target template, thereby facilitating the rapid positioning of the target on the PCB in the subsequent production. However, due to the long time consumption of machine learning, the machine learning cannot be immediately put into production in a production line before an accurate target template is trained for the PCB of the model, and the production efficiency of the PCB to be processed is easily reduced.
[ invention ]
The embodiment of the application provides a positioning method, a device, electronic equipment and a storage medium for a circuit board target, which can rapidly and accurately position the target position of a circuit board to be processed on the premise of not needing a target template, thereby avoiding the time consumption of generating the target template through machine learning and improving the production efficiency of a printed circuit board.
In a first aspect, an embodiment of the present application provides a method for positioning a target of a circuit board, where the method includes:
receiving a design drawing file of a circuit board to be processed, and analyzing the theoretical size and the theoretical centroid coordinates of a target from the design drawing file;
acquiring a preset theoretical type and theoretical shape of the target;
based on the theoretical centroid coordinates, the theoretical type and the theoretical shape, a suspected target is identified in a scanning image corresponding to the circuit board to be processed;
identifying an actual size of the suspected target;
and if the difference value between the actual size and the theoretical size is not greater than a set threshold value, determining the suspected target as the target.
In the embodiment of the application, the theoretical size and the theoretical centroid coordinate of the target are obtained by analyzing the parameters about the target in the design drawing file, then the theoretical type and the theoretical shape of the target which are preset manually are obtained, then the scanning image of the circuit board to be processed is searched based on the parameters, the suspected targets with all the parameters conforming to the definition are identified and used as the target, so that the method is applied to actual laser processing, a large amount of time consumption for machine learning and generating a target template on all the parameters of the target is effectively avoided, the intermediate link from drawing to assembly line production of the circuit board to be processed is simplified, and the production efficiency is improved.
Optionally, identifying the suspected target in the scan image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type and the theoretical shape includes:
calculating the actual centroid coordinates corresponding to the theoretical centroid coordinates based on the corresponding relation between the preset theoretical centroid coordinates and the actual centroid coordinates;
and identifying the suspected target at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape.
In the embodiment of the application, through carrying out data association on the theoretical centroid coordinates of the target and the actual centroid coordinates on the circuit board to be processed, after the theoretical centroid coordinates are obtained from the design drawing file by the laser processing machine tool, the corresponding actual centroid coordinates can be obtained immediately based on the theoretical centroid coordinates in a conversion mode, so that the specific position for identification on the scanning image is determined; then, the image of the specific position is analyzed based on the theoretical type and the theoretical shape to identify the suspected target, so that the laser processing machine tool can realize automatic positioning of the target without depending on the target template.
Optionally, after calculating the actual centroid coordinate corresponding to the theoretical centroid coordinate based on the preset correspondence between the theoretical coordinate and the actual coordinate, the method further includes:
If the suspected target cannot be identified in the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape, outputting first alarm information, wherein the first alarm information is used for reminding a user that the suspected target is not identified.
In the embodiment of the application, if a suspected target matched with two preset conditions of the theoretical type and the theoretical shape cannot be found on the circuit board to be processed, the first alarm information is output to inform a user that the identification fails and the suspected target cannot be found, so that the user can timely recognize that problems exist in the circuit board to be processed or the design drawing file and screen the problems.
Optionally, the identifying the actual size of the suspected target includes:
identifying an imaging size of the suspected target on the scanned image;
and determining the actual size corresponding to the imaging size based on a preset corresponding relation between the imaging size and the actual size.
In the embodiment of the application, by associating the imaging size data of the suspected target on the scanning image with the actual size data on the circuit board to be processed, the laser processing machine tool can rapidly determine the actual size of the suspected target based on the imaging size after acquiring the scanning image and identifying the outline of the suspected target according to the scanning image, so that accurate comparison data is provided for a judging link of whether the suspected target corresponds to the target.
Optionally, after the identifying the actual size of the suspected target, the method further comprises:
and if the difference value between the actual size and the theoretical size is larger than a set threshold value, outputting second alarm information, wherein the second alarm information is used for prompting a user that the suspected target is not the target. In the embodiment of the application, when the difference between the actual size of the suspected target and the theoretical size of the target is greater than the set threshold, the second alarm information is sent to the user to prompt the user to identify the suspected target which accords with the image characteristics of the target, but the size of the suspected target does not accord with the target, so that the user can timely realize that the target size problem possibly exists in the circuit board to be processed or the design drawing file, and the targeted screening is performed.
Optionally, after determining the suspected target as the target of interest if the difference between the actual size and the theoretical size is not greater than a set threshold, the method further includes:
determining the machine tool centroid coordinates corresponding to the actual centroid coordinates according to the preset corresponding relation between the machine tool centroid coordinates and the actual centroid coordinates;
Positioning the target on the laser processing machine according to the machine centroid coordinates;
and processing the circuit board to be processed based on the located target.
According to the method and the device for positioning the laser processing machine tool at the corresponding position of the machine tool, according to the pre-established data relationship between the machine tool centroid coordinates and the actual centroid coordinates, when actual processing is required, the laser processing machine tool can be enabled to automatically position the target at the corresponding position of the machine tool according to the actual centroid coordinates, and therefore accidents such as workpiece cutting errors and the like are avoided in the actual processing process.
Optionally, the theoretical type includes an optical target and a through hole target, and the theoretical shape includes a circular target, a rectangular target and a cross target.
In this embodiment of the application, through dividing conventional type, the conventional shape of target, can make laser processing lathe discernment the target of most printed wiring board on the market under the prerequisite that avoids machine learning to generate the target template to make the lathe when facing the design drawing file of various printed wiring board, all can accomplish accurate target and processing of grabbing.
Optionally, before the suspected target is identified in the scanned image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type and the theoretical shape, the method further includes:
Placing the circuit board to be processed at a preset processing position of a laser processing machine tool, wherein a preset endpoint on the circuit board to be processed is coincident with an origin of a machine tool coordinate system;
and controlling a linear array camera to perform global scanning on the circuit board to be processed, and obtaining the scanning image of the circuit board to be processed.
In the embodiment of the application, before the related parameters of the design drawing file are acquired and the target is searched, the processing is placed at the preset processing position on the machine tool, namely, the preset end point is overlapped with the origin of the machine tool coordinate system, and then the linear array camera is controlled to perform scanning, so that the generated image cannot cause the problems that the scanning of the carrier plate image is incomplete or the scanned image cannot correspond to the theoretical centroid coordinate due to the placement deviation of the integration to be processed, and the processing precision of the circuit board is further improved. Meanwhile, a global scanning mode is adopted to collect scanning images of the circuit board to be processed, so that all targets can be unfolded and identified only by one scanning, multiple scanning can be avoided on the basis of ensuring processing precision, and the target positioning efficiency is improved.
Optionally, the circuit board to be processed is an integrated circuit carrier board.
In the embodiment of the application, since the integrated circuit carrier board is more commonly processed by adopting a high-precision small-size processing technology, by limiting the type of the processed circuit board, the method can ensure more specific adaptation to relevant parameters of the integrated circuit carrier board when being applied to actual processing occasions.
In a second aspect, an embodiment of the present application provides a positioning device for a circuit board target, where the device includes:
the processing unit is used for receiving a design drawing file of the circuit board to be processed and analyzing the theoretical size and the theoretical centroid coordinate of the target from the design drawing file;
the acquisition unit is used for acquiring a preset theoretical type and a preset theoretical shape of the target object;
the identification unit is used for identifying a suspected target in a scanning image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type and the theoretical shape;
the identification unit is also used for identifying the actual size of the suspected target;
and the determining unit is used for determining the suspected target as the target if the difference value between the actual size and the theoretical size is not larger than a set threshold value.
Optionally, the identification unit is specifically configured to:
calculating the actual centroid coordinates corresponding to the theoretical centroid coordinates based on the corresponding relation between the preset theoretical centroid coordinates and the actual centroid coordinates;
and identifying the suspected target at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape.
Optionally, the apparatus further includes:
the first output unit is used for outputting first alarm information for reminding a user that the suspected target is not identified if the suspected target is not identified at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape.
Optionally, the identification unit is specifically configured to:
identifying an imaging size of the suspected target on the scanned image;
and determining the actual size corresponding to the imaging size based on a preset corresponding relation between the imaging size and the actual size.
Optionally, the apparatus further includes:
and the second output unit is used for outputting second alarm information if the difference value between the actual size and the theoretical size is larger than a set threshold value, wherein the second alarm information is used for prompting a user that the suspected target is not the target.
Optionally, the apparatus further includes:
the processing unit is used for determining the machine tool centroid coordinates corresponding to the actual centroid coordinates according to the preset corresponding relation between the machine tool centroid coordinates and the actual centroid coordinates;
the processing unit is further used for positioning the target on the laser processing machine tool according to the machine tool centroid coordinates;
and the processing unit is also used for processing the circuit board to be processed based on the positioned target.
Optionally, the theoretical type includes an optical target and a through hole target, and the theoretical shape includes a circular target, a rectangular target and a cross target.
Optionally, the apparatus further includes:
the placing unit is used for placing the circuit board to be processed at a preset processing position of a laser processing machine tool, wherein a preset endpoint on the circuit board to be processed is coincident with an origin of a machine tool coordinate system;
and the scanning unit is used for controlling the linear array camera to perform global scanning on the circuit board to be processed and obtaining the scanning image of the circuit board to be processed.
Optionally, the circuit board to be processed is an integrated circuit carrier board.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes at least one processor and a memory connected to the at least one processor, where the at least one processor is configured to implement the steps of the positioning method of the circuit board target according to the first aspect when executing the computer program stored in the memory.
In a fourth aspect, embodiments of the present application also provide a computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to the first aspect.
It should be understood that the second to fourth aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects obtained by each aspect and the corresponding possible implementation manner are similar, and are not repeated.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present specification, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a positioning method of a circuit board target provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for identifying a suspected target from a scanned image of a circuit board to be processed according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of an alarm method when a suspected target is not identified in an embodiment of the present application;
FIG. 4 is a flow chart of a method for measuring the actual size of a suspected target according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a method for machining a circuit board based on a machine tool coordinate system according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of an alarm method when a suspected target is not a target of interest in an embodiment of the present application;
fig. 7 is a scanning method of an image of a circuit board to be processed in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a positioning device for a circuit board target according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
[ detailed description ] of the invention
For a better understanding of the technical solutions of the present specification, the following detailed description of the embodiments of the present application is given with reference to the accompanying drawings.
It should be understood that the described embodiments are only some, but not all, of the embodiments of the present description. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present disclosure.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
At present, with the function iteration of high and new electronic products, the requirements on the demand and the manufacturing precision of small integrated circuit chips are gradually increased. Accordingly, when mass-producing PCBs for processing integrated circuit chips, laser processing techniques are also employed to accommodate high demand and high precision requirements. Specifically, after the punching of the PCB is completed, the laser processing equipment scans and identifies targets on the PCB, and then guides the laser beam to complete the cutting of the PCB according to the design drawing.
According to research of the inventor, in the related technology, the identification of the target position on the PCB mainly depends on a machine vision system of a laser processing machine tool to scan an image, and the range of the target is manually selected on the scanned image, so that the laser processing equipment performs machine learning on the image characteristics in the frame selection range, and generates a target template aiming at the target based on the contrast, polarity, scaling ratio and other parameters of the target image, so that the target on the PCB can be rapidly positioned in subsequent production. However, in order to maintain the accuracy of target recognition, a long time is often required to be consumed by a mode of collecting target image features through machine learning, and the target template cannot be put into pipeline production immediately before being trained for the PCB of the model, so that the production efficiency of the PCB is easily reduced.
In view of this, the embodiment of the application provides a positioning method of a circuit board target, which can quickly and accurately identify and position the target position of a circuit board to be processed based on the relevant data definition of the target in a design drawing file on the premise of not needing a target template, thereby avoiding a great deal of time consumption generated by generating the target template through machine learning and improving the production efficiency of a PCB.
It should be noted that, in the embodiment of the present application, the "theoretical coordinate system" is a built-in coordinate system of the design drawing file, and the "actual coordinate system" is a coordinate system established based on physical parameters of the PCB to be processed and the target of interest (the establishment method thereof will be described in detail below). The terms such as "theoretical centroid coordinates", "theoretical dimensions", etc., which are used hereinafter, are all data obtained by taking a theoretical coordinate system as a reference system; similarly, the terms "actual centroid coordinates", "actual dimensions" and "actual positions" used hereinafter are coordinate positions or dimension parameters obtained by taking an actual coordinate system as a reference system.
The following describes the technical scheme provided by the embodiment of the application with reference to the accompanying drawings. Referring to fig. 1, an embodiment of the present application provides a method for positioning a circuit board target, which is applied to a laser processing machine tool, and the flow of the method is described as follows:
Step 101: and receiving a design drawing file of the circuit board to be processed, and analyzing the theoretical size and the theoretical centroid coordinates of the target from the design drawing file.
The design drawing file of the circuit board to be processed is a conventional CAD format drawing file (CAD file for short). After the CAD file is introduced into a system of a laser processing machine (hereinafter referred to as a laser processing system), the laser processing system automatically performs format conversion on the CAD file to read theoretical dimensions and theoretical centroid coordinate data related to the target in the CAD file. In the embodiment of the application, the data are uniformly stored in a laser processing system by taking micrometers (mum) as size units for subsequent links for identifying suspected targets, wherein the size units are proposed after researching the processing precision of the laser processing system and the identification precision of a matched linear array camera which are commonly used nowadays; however, for laser processing systems with different recognition and processing accuracy, the data may also be represented in other units (e.g., pixels or millimeters).
For example, after format conversion and data extraction of a CAD file, for a single target, the laser processing system will obtain a series of codes in the form of "FG-1X [ arbitrary value ] Y [ arbitrary value ] W [ arbitrary value ] H [ arbitrary value ] CO", where "[ arbitrary value ]" means that the value may vary according to the target; PG-1 is a defined statement for a target of interest in a parameter, representing the following parameter only for searching for the target; the numerical values attached to X and Y are mainly responsible for defining the theoretical centroid coordinates of the target; the values attached after W and H are mainly responsible for defining the theoretical dimensions (length and width) of the target of interest; the shape definition and type definition of C and O as target targets will be explained below, and will not be repeated here.
It should be understood that, since the processing method of the embodiment of the present application is mainly directed to precision processing of small-sized circuit boards, the following applies:
as a possible embodiment, the type of circuit board to be processed is an integrated circuit carrier.
In the embodiment of the application, in the process of extracting CAD file data and processing a circuit board, the view angle of a lens when a linear array camera scans the whole image is limited, and a scanning object is mainly an integrated circuit (Integrated Circuit, IC) carrier board with small size; the width of the circuit board is limited to 250mm (determined based on the maximum viewing width of a conventional linear camera), and the length is limited to 45-350 mm (determined based on the length limitation of the laser processing machine and the recognition accuracy of the machine vision system). But for laser processing machine tools of different models, the data can be properly adjusted, and the scanning action of the linear array camera can be more flexibly configured, so that the laser processing system can support target positioning and laser processing of more PCB models (such as high-frequency boards, communication interface boards and the like).
After format conversion of the CAD file and data extraction of the target are completed, the theoretical type and the theoretical shape of the target (i.e., the type and shape of the target in the CAD file) need to be obtained, so that the target features specified by the CAD file can be more quickly and accurately matched to the suspected target on the scanned image.
Step 102: and acquiring a preset theoretical type and theoretical shape of the target.
After accurate data such as theoretical size, theoretical centroid coordinates and the like of the target are acquired, fuzzy data such as target type and target shape are also required to be acquired. Since the laser processing system has difficulty in directly extracting the theoretical parameters of the target in the CAD file, the selection of the type and shape of the target on the interface of the laser processing machine tool based on manual operation is a better implementation mode. The selectable target types and target shapes are common target types and common target shapes in the industry so as to ensure that the selectable target types and target shapes can be matched with most CAD files; meanwhile, the image characteristic data (including image area, angle, line vector and the like) of each target type and target shape are preconfigured in the laser processing system, so that when a machine vision system identifies a target, the corresponding image characteristic data can be called according to the set target theoretical type and theoretical shape.
A typical classification of the embodiments of the present application is given below with respect to how different target types and target shapes are classified.
As one possible implementation, the theoretical types include optical targets and through-hole targets, and the theoretical shapes include circular targets, rectangular targets, and cross targets.
In this embodiment, when the machine vision system invokes the theoretical type and the theoretical shape of the target, the specific invoking method is to query the image feature data corresponding to the theoretical type and the theoretical shape corresponding to the identification code according to the identification code of the theoretical type and the identification code of the theoretical shape received in advance, and transmit the image feature data to the machine vision system for use.
Here again, taking the code of the form of FG-1X arbitrary value Y arbitrary value W arbitrary value H arbitrary value CO as an example, wherein C is an identification code of a theoretical shape, the shape representing the target is a round target (the identification codes of the rest shapes also include R-square targets and S-cross targets), O is an identification code of a theoretical type, and the type representing the target is an optical target (the identification codes of the rest types also include H-through hole targets). If a PCB with other types and shapes of target targets needs to be processed, after the type and shape feature data of the type of targets are extracted in advance, the data can be imported into a laser processing system to expand the identification type.
After the theoretical size, theoretical centroid coordinates, theoretical type and theoretical shape of the target of interest are acquired, the main characteristic parameters required to identify the target of interest can be considered acquired. These parameters then need to be entered into a laser processing machine for image recognition to find a suspected target in the scanned image that has similar characteristics as the target of interest.
Step 103: and identifying a suspected target in the scanning image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type and the theoretical shape.
In the embodiment of the application, when a machine vision system provided with a charge coupled device (Charge coupled Device, CCD) on a laser processing machine tool finds a coordinate point to be searched on a scanned image according to the theoretical centroid coordinates of a target, image features around the coordinate point are compared with parameters of the target acquired before so as to judge whether the target expected to be captured by the laser processing system exists near the selected coordinate point. Specifically, after generating a scan image for identification, the machine vision system identifies pixels around the theoretical centroid coordinates, counts pixels with the same or similar chromaticity values, and forms a graphic outline; after that, the machine vision system matches the obtained graphic profile with the theoretical type and the theoretical shape, labels the graphic profile similar to the target feature of the target, and stores the labeled graphic profile as a suspected target.
It should be understood that, after the scanned image is collected and spliced by the line camera, binarization processing is required to be performed first, that is, the set value of each pixel on the scanned image is determined according to the preset highest chroma threshold and the preset lowest chroma threshold, the pixel points with the chroma lower than the lowest chroma threshold or higher than the highest chroma threshold will be dyed black, and the pixel points with the chroma value between the lowest chroma threshold and the highest chroma threshold will be marked white, so as to obtain the gray level image of the scanned image (the lowest chroma threshold and the highest chroma threshold need to be adjusted according to the object expected to be extracted from the scanned image, such as the target needing to be identified and positioned in the embodiment of the application).
When the gray level image is generated, convolution processing is needed to be carried out on the gray level image, so that the image contrast is improved while the signal-to-noise ratio of the image is improved, and the accuracy of identifying the required pattern is improved. After the convolution processing is completed, the machine vision system can identify the chromaticity of the pixels around the coordinate point position and count the connected domain (i.e. the pixels with similar chromaticity and adjacent pixels are uniformly framed) according to the coordinate points (such as the reference points) to be identified, and extract the image feature data such as angles, line vectors, areas and the like of the counted connected domain. Based on the similarity between the feature data and the image feature data contained in the pre-stored theoretical shape and theoretical type, the machine vision system can determine whether the CCD image data of the identified object (such as the suspected target) and the data of the object to be searched (such as the target) are matched in a certain confidence interval; the confidence interval can be adjusted according to different requirements on the image recognition accuracy.
After the scanning image processing is completed, when the connected domain is counted on the gray level image to find the suspected target, the theoretical centroid coordinates of the target are extracted and converted into the actual centroid coordinates for identifying the suspected target, so that a specific position for carrying out local image identification by a machine vision system is informed, and the method is described in detail below.
Fig. 2 is a flowchart of a method for identifying a suspected target from a scanned image of a circuit board to be processed according to an embodiment of the present application; as a possible implementation, step 103 is implemented by performing sub-steps 1031 to 1032:
step 1031: and calculating the actual centroid coordinates corresponding to the theoretical centroid coordinates based on the preset corresponding relation between the theoretical centroid coordinates and the actual centroid coordinates.
Step 1032: and identifying a suspected target at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape.
Because the laser processing system selects the area where the target is located through the manual frame in a specific mode of positioning the target template, the laser processing system learns the position of the area and the image characteristics in the area; therefore, to identify the target without a target template, the laser processing system must be informed of the target location by other means to save search time and reduce identification errors. Therefore, in the embodiment of the application, the actual centroid coordinates of the suspected target are found by adopting a method of reading the theoretical centroid coordinates of the target in the CAD file, and the premise of implementing the method is to establish a data association between the theoretical coordinate system and the actual coordinate system.
It should be appreciated that scanning accuracy in common industrial cameras can support acquisition of images in micrometers (μm); in the embodiments of the present application, the coordinate units of the actual coordinate system are also expressed in μm. And because the coordinate units of the theoretical coordinate system and the actual coordinate system are all micrometers, based on the characteristics, the conversion relation between the theoretical centroid coordinate and the actual centroid coordinate can be directly established, and the theoretical centroid coordinate is converted into the actual centroid coordinate on the scanned image (namely, the position of the centroid of the suspected target in the scanned image) according to the data conversion relation.
However, when the corresponding relation between the theoretical coordinate system and the actual coordinate system is established in the laser processing system, the theoretical coordinate is often not accurately converted into the actual coordinate due to image distortion caused by the linear array camera, errors of parameters of the machine and the like; therefore, two existing methods are adopted in the embodiment of the application, and the coordinate conversion errors caused by image distortion, machine parameter errors and the like are compensated before a laser processing machine tool is put into the production of the circuit board:
1. the coordinate conversion error is compensated using a general cut pattern.
First, a general cutting drawing (i.e., a general CAD drawing for correction) is loaded in a laser processing system, and a black correction plate is placed on a laser processing machine. Subsequently, one-time printing is performed on the black correction plate using a laser beam, and the printed pattern includes: 40 hollow circles with the distance of 40mm and the diameter of 2mm are distributed in a 5*8 mode; and 4 solid circles of 2mm diameter at the four corners of the correction plate for assisting the machine vision system in positioning in a subsequent step. In addition, the printed graphic may further include: the data matrix code (DM code for short) is used for recording information such as the model of the circuit board, and is a small-size matrix two-dimensional code which is commonly used as an entity identifier of a small part, so that the relevant information of the current circuit board can be read after the machine vision system scans.
And then loading the CAD file of the current circuit board, scanning the black correction board by using a machine vision system, and identifying 2mm diameter solid circles (at least 3 circles are identified) for auxiliary positioning as targets for correction so as to establish a conversion relation between a theoretical coordinate system in the CAD file and an actual coordinate system in a scanned image. The CAD file is added with a plurality of solid small circles with the diameter of 1mm for judging coordinate conversion errors, and the solid small circles are used for judging error compensation values of coordinate conversion after finishing setting parameters such as target positions, code scanning positions, material sheet frames and the like of scanned images.
Finally, controlling laser beam secondary printing based on the scanned image of the machine vision system, wherein the printed image comprises: solid small circles of 1mm diameter in CAD files. When printing was completed, it was measured whether a solid small circle of 1mm diameter and a hollow circle of 2mm diameter were concentric circles. If the circle center distance of the two circles is larger under the naked eye observation, the coordinate conversion error is considered to be larger than 70 mu m; alternatively, a secondary measurement device may be used to confirm the center of circle to obtain an accurate coordinate transformation error value.
2. And compensating the coordinate conversion error by using nine-circle calibration and cross calibration.
Firstly, placing a black correction plate on a laser processing machine, controlling a laser beam on the black correction plate to print 9 solid circles with the same theoretical spacing and the diameter of 2mm, scanning and identifying the 9 solid circles by using a machine vision system, then calculating the actual spacing between the solid circle positioned at the center and the rest 8 solid circles, and 8 groups of ratio of the actual spacing to the theoretical spacing, and calculating an average value of the 8 groups of ratio to obtain a primary compensation value for compensating the coordinate conversion error.
And then, controlling the laser beam to print out cross patterns with the interval of 6mm and the size of 2mm on a black calibration plate, wherein the number of the cross patterns is 1035 (which is enough to cover the whole linear scanning range of 250mm x 315 mm), counting actual coordinates of the 1035 cross patterns through a machine vision system, taking coordinates adopted when the laser beam is printed as a theoretical value, and calculating a difference value between the actual value and the theoretical value to be used as a secondary compensation value for compensating the coordinate conversion error.
And finally, carrying out inverse integral compensation on the coordinate conversion error based on the primary compensation value and the secondary compensation value, namely adding a fixed numerical value to the coordinate values of the X axis and the Y axis of the theoretical coordinate (the numerical value is obtained after the weighted calculation of the primary compensation value and the secondary compensation value), so as to obtain an accurate actual coordinate value under the current equipment condition.
After the conversion error between the theoretical coordinate system and the actual coordinate system of the laser processing system is adjusted by the two methods, the scanning image gray level map near the suspected target centroid can be identified according to the image characteristic data corresponding to the theoretical type and the theoretical shape, so as to find out the image contour matched with the image characteristic data, namely the suspected target which the laser processing system hopes to find in the PCB. It should be understood that, for the coordinate conversion errors of the theoretical coordinate system and the actual coordinate system, only after a certain change of the equipment conditions of the laser processing machine tool or when there is a significant precision problem in the processing of the circuit board, compensation by the two methods is necessary.
In addition, when searching for a suspected target in the scanned image, there may be a case where a suspected target that meets the target feature of the target cannot be identified. Once this occurs, an additional set of alarm logic is required to alert the user that the suspected target cannot be identified.
FIG. 3 is a schematic flow chart of an alarm method when a suspected target is not identified in an embodiment of the present application; as a possible implementation, after step 1031, step 1033 may be further performed:
step 1033: if the suspected target cannot be identified in the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape, outputting first alarm information, wherein the first alarm information is used for reminding a user that the suspected target is not identified.
In the embodiment of the present application, three preconditions for identifying a suspected target are total: (1) the type of suspected target corresponds to a theoretical type; (2) the shape of the suspected target conforms to the theoretical shape; (3) The actual centroid coordinates of the suspected target coincide with the theoretical centroid coordinates. When any precondition cannot be met, alarm logic of the laser processing system is triggered, and the situation that a suspected target cannot be identified is timely prompted to a user, so that the user can timely screen problems in a PCB or CAD file to be processed. If the user needs to acquire more detailed alarm reasons, the embodiment of the application can also perform function expansion to output specific recognition failure reasons, and display image outlines which have partial similar characteristics and still cannot be matched with the target targets and pre-characteristic conditions which are not matched with the image outlines to the user.
In the same way as the method, when the suspected target is identified, and the machine vision system completes the size measurement of the suspected target, the possible situation that the actual size of the suspected target is too large with the theoretical target is considered, and alarm information is output to the user according to the situation.
Step 104: the actual size of the suspected target is identified.
In the embodiment of the application, since the actual coordinate system is already established in the machine vision system in advance, after the outline of the suspected target is identified on the scanned image, the actual size of the suspected target can be obtained by measuring the length and the width of the pattern outline.
Specifically, since the basic size unit of the scanned image is a pixel, if the machine vision system is required to directly recognize the actual size according to the pixel size, the corresponding relationship between the imaging size and the actual size of the machine vision system object must be informed in advance, and the corresponding relationship needs to be preset based on the physical parameter. Only after the correspondence is determined, the actual size of the suspected target can be measured by using the technical principle of "statistics connected domain of gray level map of scanned image" mentioned above. This method will be described in detail below.
FIG. 4 is a flow chart of a method for measuring the actual size of a suspected target according to an embodiment of the present application; as a possible implementation, step 104 is implemented by performing steps 1041-1042:
step 1041: the imaging size of the suspected target on the scanned image is identified.
Step 1042: and determining the actual size corresponding to the imaging size based on the preset corresponding relation between the imaging size and the actual size.
In this embodiment of the present application, after the connected domain of the gray scale image is identified by the machine vision system to form the image of the suspected target, the actual size of the image needs to be measured. However, since the length and width (i.e., the imaging size) of any pattern in the obtained scanned image are expressed in units of pixels, it is necessary to measure the imaging size of the suspected target first, and obtain the actual size of the suspected target according to the conversion relationship between the actual size and the imaging size established in advance.
Firstly, the specific mode of measuring the imaging size is that the machine vision system marks the edge of a pixel point occupied by an image of a suspected target on a scanning image, two directions (which are necessarily perpendicular to each other) which are preset in the machine vision system and are parallel to a transverse axis and a longitudinal axis in an actual coordinate system are called, and the maximum pixel length of the image of the suspected target in the two directions is counted, so that the imaging size of the suspected target on the scanning image can be obtained.
After the imaging size of the suspected target is measured, if the actual size of the suspected target is to be obtained according to the pixel size of the suspected target on the scanned image, the pixel position of the scanned image and the actual position of the target on the PCB can be correlated to obtain a specific data conversion relationship in a similar manner to the above-mentioned correlation of the actual coordinate system and the theoretical coordinate system. As one implementation of this association, after the laser processing system is installed, the machine vision system is controlled manually to obtain several images of the PCB with the target, and the relative physical distance between the centroid of the target and any point on the PCB, the relative pixel distance, and then the data conversion relationship between the centroid of the target and any point on the PCB are measured. After the relation is established, the machine vision system can directly read the image, and the actual size of the suspected target on the image is calculated through the data conversion relation.
After the actual size of the suspected target is measured indirectly, the difference between the actual size and the theoretical size needs to be determined to determine whether the suspected target completely meets the characteristics of the target.
Step 105: and if the difference value between the actual size and the theoretical size is not greater than the set threshold value, determining the suspected target as the target.
In the embodiment of the present application, when a target is added to a PCB, there may be a certain error between the size of the target and the size of the target specified in the CAD file due to processing deviation, etc., and this error is likely to be amplified in a subsequent processing flow to be abnormal in the overall processing positioning of the PCB, thereby causing rejection of the whole batch of products.
Thus, unlike the comparison process of characteristic parameters such as the type and shape of the suspected target, the target size does not need to be identified as precisely as the former, but rather a range capable of tolerating the processing deviation needs to be set separately, and the tolerance range is established by the set threshold. In the embodiment of the application, the set threshold is determined to be 0.2mm according to the empirical data, namely when the size error of the suspected target is within the range, the error is not ignored due to accidental errors, and the unexpected situation that the apparent error is large but the target is still identified is avoided, so that certain accuracy is ensured. But the set threshold can be flexibly adjusted (for example, the set threshold is increased to 0.25 mm) according to different types of PCBs and different laser processing systems (for example, a laser processing machine tool with higher precision machine vision) so as to adapt to more PCB processing occasions.
When the actual size of the suspected target is different from the theoretical size of the target, if the obtained difference is larger than a set threshold, the error between the suspected target and the target is considered to be too large, and then the suspected target is considered to be the target which the laser processing system hopes to search on the PCB image; and when the obtained difference value is smaller than or equal to the set threshold value, the dimension parameter of the suspected target is considered to be matched with the target, the suspected target can be determined to be the target, and the actual position of the suspected target on the PCB is taken as a positioning result for subsequent processing.
In addition, as a preferred embodiment, the present examples also summarize several target size classes that are more common in PCB processing: 1 mm, 1.5 mm, 2mm, 2.5 mm, 3mm, 3.5 mm and 4 mm. In order to reduce the difficulty of manufacturing targets of the PCB, the recognition ranges of targets with different size grades are respectively determined as [0.8mm,1.2mm ], [1.3mm,1.7mm ], [1.8 mm,2.2mm ], [2.3mm,2.7mm ], [2.8mm,3.2mm ], [3.3mm,3.7mm ], [3.8mm,4.2mm ] according to the sequence. When the size of the suspected target is close to the preset recognition range, classifying the suspected target according to the corresponding size grade, and judging whether the size grade of the suspected target is the same as the size grade of the target. By comparing the size of the suspected target with the size of the target in the mode, the comparison logic of the machine vision system can be simplified, and the running speed of the machine vision system can be improved.
It should be noted that, in order to meet the more diversified processing requirements, the method for identifying the suspected target may also be adjusted. For example, an additional 0.5mm target size scale is added, and the recognition range of the size scale is limited to [0,0.7mm ], so that the machine vision system captures targets with smaller sizes; or a range of recognition for a 4mm size scale is relaxed to [3.8mm, xmm ], where X is an arbitrary set point, so that the machine vision system recognizes targets that have greater error but still are desired to be captured by the user. In a similar manner, the size class of other targets may also be added, or the recognition range may be adjusted to the size class of the existing targets, to increase or decrease the tolerance of errors within a particular interval depending on the specific processing requirements and the true recognition accuracy of the machine vision system.
And after the comparison of the actual size and the theoretical size is completed, if the suspected target is still matched with the target on the characteristic, the target is considered to be positioned on the PCB, and the laser processing of the PCB can be started. However, only knowing the actual position of the target on the PCB obviously fails to meet all the conditions of laser processing, and it is also necessary to link the overall position of the PCB to be processed with the machine tool coordinate system so that the laser processing machine tool knows along which path the laser beam should be directed to process the PCB.
FIG. 5 is a schematic flow chart of a method for machining a circuit board based on a machine tool coordinate system according to an embodiment of the present application; as a possible implementation, after step 105, steps 106 to 108 may be further performed:
step 106: and determining the machine tool centroid coordinates corresponding to the actual centroid coordinates according to the preset corresponding relation between the machine tool centroid coordinates and the actual centroid coordinates.
Step 107: and positioning a target on the laser processing machine tool according to the centroid coordinates of the machine tool.
Step 108: and processing the circuit board to be processed based on the positioned target.
Before the laser processing machine spreads and processes the PCB, the corresponding relation between the actual coordinates and the machine coordinates is configured in the database of the laser processing system by a similar way of storing the corresponding relation between the theoretical coordinate system and the actual coordinate system. The corresponding relation is also referred to by physical data which can be measured by the target and the PCB, and the coordinate system of the machine tool is a known coordinate system which is set before the laser processing machine tool leaves the factory, so that the coordinate origin of the machine tool is not required to be additionally set, and only the data conversion relation between the coordinate system and the actual coordinate system is configured. And after the actual centroid coordinates of the target on the PCB to be processed are identified, the machine tool coordinates of the target can be rapidly obtained based on the corresponding relation between the actual coordinate system and the machine tool coordinate system, and the PCB is processed according to the obtained machine tool coordinates.
FIG. 6 is a schematic flow chart of an alarm method when a suspected target is not a target of interest in an embodiment of the present application; as a possible implementation, after step 104, step 109 may be further performed:
step 109: and if the difference value between the actual size and the theoretical size is larger than the set threshold value, outputting second alarm information, wherein the second alarm information is used for prompting a user that the suspected target is not the target.
In this embodiment of the present application, when the difference between the actual size and the theoretical size is too large (i.e. greater than the set threshold), whether the reason is that the suspected target is positioned incorrectly due to the input of the incorrect theoretical centroid coordinates or that other patterns near the coordinates are identified due to the fact that the theoretical type and the theoretical shape are incorrect in manual setting, the user needs to be immediately reminded of the situation, so that the user can screen the possible reasons for the situation.
Before the scanned image is identified and a suspected target is found, the PCB is required to be scanned through related hardware equipment matched with a machine vision system, and the scanned image is obtained for identification.
Fig. 7 is a scanning method of an image of a circuit board to be processed in an embodiment of the present application; as a possible implementation, steps 110 to 111 may be further performed before step 103:
Step 110: and placing the circuit board to be processed at a preset processing position of a laser processing machine tool, wherein a preset endpoint on the circuit board to be processed is coincident with an origin of a machine tool coordinate system.
Step 111: and controlling the linear array camera to perform global scanning on the circuit board to be processed to obtain a scanning image of the circuit board to be processed.
In this embodiment of the present application, a circuit board to be processed is placed at a predetermined processing position, that is, a preset circuit board endpoint is placed at a position coinciding with an origin of a machine tool coordinate system, and two sets of opposite sides of the circuit board to be processed are respectively parallel to a transverse axis and a longitudinal axis of the machine tool coordinate system, so that a scan image of the circuit board to be processed can satisfy a preset conversion relationship between a theoretical coordinate system and an actual coordinate system, and further, it is ensured that a laser processing system can accurately complete a subsequent processing step. The preset end point can be any end point of the circuit board to be processed, and the image of the whole circuit board to be processed can be scanned into the machine vision system after the end point is selected and placed according to the requirement, so that the image of the carrier board is not lost. The placing process of the circuit board can be carried out automatically through machinery, and can be adjusted manually through manpower, so that different processing requirements can be met.
After the step 110, in order to ensure that the position of the circuit board to be processed is accurately placed at the predetermined processing position without any offset before the scan image of the circuit board to be processed is acquired, the position of the carrier board to be processed needs to be checked. Specifically, in order to complete this verification step, it is necessary to extract endpoint data of the circuit board to be processed in the CAD file based on a theoretical coordinate system in the CAD file, and the extracting action should extract at least two theoretical coordinates of endpoints located on the same diagonal line at a time; and then, comparing the collected endpoint data with endpoint data identified by a machine vision system from a scanned image to check whether the conversion relation between a theoretical coordinate system and an actual coordinate system is strictly satisfied or not, and eliminating the interference of the placement offset of the circuit board to be processed due to unexpected situations.
For example, when the theoretical coordinates of two end points are extracted, the output parameter format may be "RP X [ arbitrary value ] Y [ arbitrary value ]", RP means Rectanguular Position (rectangular position), where the purpose of two end points is to assist the laser processing system in data conversion; and X and Y are followed by "[ arbitrary values ]" similar to the theoretical coordinate data of the target of interest mentioned earlier, for indicating the theoretical coordinates of the endpoint on the horizontal and vertical axes. And the gray level image of the scanned image is identified by a machine vision system, so that the edge of the circuit board to be processed in the image can be identified, and the corresponding actual coordinates of the two endpoints are extracted. By comparing the theoretical coordinates of the two endpoints with the actual coordinates, whether the placement of the circuit board to be processed is offset or not can be confirmed, and the conversion relation between the theoretical coordinates and the actual coordinates is calibrated.
It should be noted that the types of industrial cameras used in conventional machine vision systems include line cameras and area cameras and scan in such a way as to locally scan an identified object and generate a local image. The linear array camera is adopted in the embodiment of the application and is responsible for collecting the image data of the whole circuit board to be processed, so that the edge and all target targets of the circuit board to be processed can be rapidly identified based on the complete scanning image.
Referring to fig. 8, based on the same inventive concept, an embodiment of the present application further provides a positioning device for a circuit board target, where the device includes:
the processing unit 201 is configured to receive a design drawing file of a circuit board to be processed, and parse theoretical dimensions and theoretical centroid coordinates of a target from the design drawing file;
an obtaining unit 202, configured to obtain a theoretical type and a theoretical shape of a target set in advance;
the identifying unit 203 is configured to identify a suspected target in a scan image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type and the theoretical shape;
the identifying unit 203 is further configured to identify an actual size of the suspected target;
a determining unit 204, configured to determine the suspected target as the target if the difference between the actual size and the theoretical size is not greater than the set threshold.
Optionally, the identifying unit 203 is specifically configured to:
calculating an actual centroid coordinate corresponding to the theoretical centroid coordinate based on a preset corresponding relation between the theoretical centroid coordinate and the actual centroid coordinate;
and identifying a suspected target at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape.
Optionally, the apparatus further comprises:
the first output unit is used for outputting first alarm information if the suspected target cannot be identified at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape, and the first alarm information is used for reminding a user that the suspected target is not identified.
Optionally, the identifying unit 203 is specifically configured to:
identifying an imaging size of the suspected target on the scanned image;
and determining the actual size corresponding to the imaging size based on the preset corresponding relation between the imaging size and the actual size.
Optionally, the apparatus further comprises:
the second output unit is used for outputting second alarm information if the difference value between the actual size and the theoretical size is larger than a set threshold value, and the second alarm information is used for prompting a user that the suspected target is not the target.
Optionally, the apparatus further comprises:
the processing unit is used for determining the machine tool centroid coordinates corresponding to the actual centroid coordinates according to the preset corresponding relation between the machine tool centroid coordinates and the actual centroid coordinates;
The processing unit is also used for positioning a target on the laser processing machine tool according to the centroid coordinates of the machine tool;
and the processing unit is also used for processing the circuit board to be processed based on the positioned target.
Alternatively, theoretical types include optical targets and through-hole targets, and theoretical shapes include circular targets, rectangular targets, and cross targets.
Optionally, the apparatus further comprises:
the placing unit is used for placing the circuit board to be processed at a preset processing position of the laser processing machine tool, wherein a preset endpoint on the circuit board to be processed is coincident with an origin of a machine tool coordinate system;
the scanning unit is used for controlling the linear array camera to perform global scanning on the circuit board to be processed and obtaining a scanning image of the circuit board to be processed.
Optionally, the circuit board to be processed is an integrated circuit carrier.
Referring to fig. 9, based on the same inventive concept, the embodiment of the present application further provides an electronic device 300, where the electronic device 300 may include at least one processor, and the at least one processor is configured to execute a computer program stored in a memory, to implement the steps of the positioning method for a circuit board target as shown in fig. 1 to 7 provided in the embodiment of the present application.
In the alternative, the processor may be a central processing unit, a specific ASIC, or one or more integrated circuits for controlling the execution of the program.
Optionally, the electronic device may further comprise a memory 302 coupled to the at least one processor 301, the memory 302 may comprise ROM, RAM and disk memory. The memory 302 is used for storing data required for the operation of the processor 301, i.e. instructions executable by the at least one processor 301, the at least one processor 301 performing the method as shown in fig. 1-7 by executing the instructions stored by the memory 302. Wherein the number of memories 302 is one or more.
The physical devices corresponding to the processing unit 201, the identifying unit 203, and the determining unit 204 may be the aforementioned processor 301. The electronic device may be used to perform the methods provided by the embodiments shown in fig. 1-7. Therefore, for the functions that can be implemented by the functional units in the electronic device, reference may be made to corresponding descriptions in the embodiments shown in fig. 1 to fig. 7, which are not repeated.
Furthermore, embodiments of the present application provide a computer storage medium, where the computer storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the methods described in fig. 1-7.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.
Claims (12)
1. A method of locating a circuit board target, the method comprising:
receiving a design drawing file of a circuit board to be processed, and analyzing the theoretical size and the theoretical centroid coordinates of a target from the design drawing file;
acquiring a preset theoretical type and theoretical shape of the target;
based on the theoretical centroid coordinates, the theoretical type and the theoretical shape, a suspected target is identified in a scanning image corresponding to the circuit board to be processed;
identifying an actual size of the suspected target;
and if the difference value between the actual size and the theoretical size is not greater than a set threshold value, determining the suspected target as the target.
2. The method according to claim 1, wherein the identifying a suspected target in the scanned image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type and the theoretical shape specifically includes:
Calculating the actual centroid coordinates corresponding to the theoretical centroid coordinates based on the corresponding relation between the preset theoretical centroid coordinates and the actual centroid coordinates;
and identifying the suspected target at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape.
3. The method according to claim 2, after the calculating of the actual centroid coordinates corresponding to the theoretical centroid coordinates based on the preset correspondence between the theoretical coordinates and the actual coordinates, the method further comprising:
and if the suspected target cannot be identified at the actual centroid coordinate position of the scanned image according to the theoretical type and the theoretical shape, outputting first alarm information, wherein the first alarm information is used for reminding a user that the suspected target is not identified.
4. The method of claim 1, wherein the identifying the actual size of the suspected target comprises:
identifying an imaging size of the suspected target on the scanned image;
and determining the actual size corresponding to the imaging size based on a preset corresponding relation between the imaging size and the actual size.
5. The method of claim 1, wherein after the identifying the actual size of the suspected target, the method further comprises:
and if the difference value between the actual size and the theoretical size is larger than a set threshold value, outputting second alarm information, wherein the second alarm information is used for prompting a user that the suspected target is not the target.
6. The method of claim 2, wherein after determining the suspected target as the target of interest if the difference between the actual size and the theoretical size is not greater than a set threshold, the method further comprises:
determining the machine tool centroid coordinates corresponding to the actual centroid coordinates according to the preset corresponding relation between the machine tool centroid coordinates and the actual centroid coordinates;
positioning the target on a laser processing machine according to the machine centroid coordinates;
and processing the circuit board to be processed based on the located target.
7. The method of claim 1, wherein the theoretical types include optical targets and through-hole targets, and the theoretical shapes include circular targets, rectangular targets, and cross targets.
8. The method of claim 2, wherein before the identifying of the suspected target in the scanned image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type, and the theoretical shape, the method further comprises:
placing the circuit board to be processed at a preset processing position of a laser processing machine tool, wherein a preset endpoint on the circuit board to be processed is coincident with an origin of a machine tool coordinate system;
and controlling a linear array camera to perform global scanning on the circuit board to be processed, and obtaining the scanning image of the circuit board to be processed.
9. The method according to any one of claims 1-8, wherein the type of circuit board to be processed is an integrated circuit carrier board.
10. A positioning device for a circuit board target, the device comprising:
the processing unit is used for receiving a design drawing file of the circuit board to be processed and analyzing the theoretical size and the theoretical centroid coordinate of the target from the design drawing file;
the acquisition unit is used for acquiring a preset theoretical type and a preset theoretical shape of the target object;
the identification unit is used for identifying a suspected target in a scanning image corresponding to the circuit board to be processed based on the theoretical centroid coordinates, the theoretical type and the theoretical shape;
The identification unit is also used for identifying the actual size of the suspected target;
and the determining unit is used for determining the suspected target as the target if the difference value between the actual size and the theoretical size is not larger than a set threshold value.
11. An electronic device comprising at least one processor and a memory coupled to the at least one processor, the at least one processor being configured to implement the steps of the method of any of claims 1-8 when executing a computer program stored in the memory.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310261253.3A CN116329738A (en) | 2023-03-09 | 2023-03-09 | Positioning method and device of circuit board target, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310261253.3A CN116329738A (en) | 2023-03-09 | 2023-03-09 | Positioning method and device of circuit board target, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116329738A true CN116329738A (en) | 2023-06-27 |
Family
ID=86888859
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310261253.3A Pending CN116329738A (en) | 2023-03-09 | 2023-03-09 | Positioning method and device of circuit board target, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116329738A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117564488A (en) * | 2024-01-15 | 2024-02-20 | 苏州鑫业诚智能装备有限公司 | Object coordinate positioning method and system for laser marking |
CN118175737A (en) * | 2024-03-29 | 2024-06-11 | 江苏博敏电子有限公司 | Laser missing connection method in laser hole machining process of printed circuit board |
-
2023
- 2023-03-09 CN CN202310261253.3A patent/CN116329738A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117564488A (en) * | 2024-01-15 | 2024-02-20 | 苏州鑫业诚智能装备有限公司 | Object coordinate positioning method and system for laser marking |
CN117564488B (en) * | 2024-01-15 | 2024-03-26 | 苏州鑫业诚智能装备有限公司 | Object coordinate positioning method and system for laser marking |
CN118175737A (en) * | 2024-03-29 | 2024-06-11 | 江苏博敏电子有限公司 | Laser missing connection method in laser hole machining process of printed circuit board |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116329738A (en) | Positioning method and device of circuit board target, electronic equipment and storage medium | |
CN108961236B (en) | Circuit board defect detection method and device | |
CN106803244B (en) | Defect identification method and system | |
CN109752392B (en) | PCB defect type detection system and method | |
CN109142383B (en) | Character defect detection method based on morphology | |
US20020168097A1 (en) | System and method for recognizing markers on printed circuit boards | |
CN107945184A (en) | A kind of mount components detection method positioned based on color images and gradient projection | |
CN108710876A (en) | A kind of battery surface mark defect inspection method and system based on machine vision | |
EP3358526A1 (en) | System and method for scoring color candidate poses against a color image in a vision system | |
CN109919154B (en) | Intelligent character recognition method and device | |
CN109785294A (en) | A kind of pcb board defective locations detection system and method | |
CN111626995B (en) | Intelligent insert detection method and device for workpiece | |
CN115908420A (en) | Method, device and equipment for detecting defects of printed circuit board and storage medium | |
CN108709500B (en) | Circuit board element positioning and matching method | |
CN115512381A (en) | Text recognition method, text recognition device, text recognition equipment, storage medium and working machine | |
CN111738247A (en) | Identification method and identification device of polarity identification, electronic equipment and storage medium | |
CN117455917B (en) | Establishment of false alarm library of etched lead frame and false alarm on-line judging and screening method | |
CN116993725B (en) | Intelligent patch information processing system of flexible circuit board | |
CN116205835A (en) | Circuit board flaw detection method and device and electronic equipment | |
KR100557202B1 (en) | The device for detecting variation about a stop position of moving matter | |
CN117036231A (en) | Visual detection method for spot welding quality of automobile cabin assembly | |
JP4814116B2 (en) | Mounting board appearance inspection method | |
CN112329770B (en) | Instrument scale identification method and device | |
US20170336283A1 (en) | Method for checking the position of characteristic points in light distributions | |
CN114638792A (en) | Method for detecting polarity defect of electrolytic capacitor of plug-in circuit board |
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 |