Background
A mounter, also known as a "mounter" or a "surface mount system", is an apparatus that is disposed behind a dispenser or a screen printer and accurately places surface mount components on PCB pads by moving a mounting head in a production line. The method is divided into manual operation and full-automatic operation. The device is used for realizing high-speed and high-precision component placement, and is the most critical and complex device in the whole SMT and production. The chip mounter is a chip mounting device to be used in SMT production, and the chip mounter is developed from an early low-speed mechanical chip mounter to a high-speed optical centering chip mounter and is developed towards multifunctional and flexible connection modularization.
The chip mounter is in the first step of mounting chip component for the PCB and will position the true position of PCB, because there is slight deviation in the position of advancing the board each time, the chip mounter on the market basically all uses the way of MARK point identification, fixes the actual position and the angle deviation of PCB through two MARK points, two kinds of existing MARK point identification algorithms are specifically:
the first is an algorithm based on a template picture matching mode, a small template picture is directly stored when a picture is collected, and the template picture is used for directly matching the picture currently taken when the picture is actually matched. The disadvantage of this algorithm is that the matching accuracy is low, resulting in random overall shift of the mounted component position.
The second is based on finding dots of a specified size, since Mark points are mostly small dots. The disadvantage of this method is that the matching rate is low, and often no MARK point can be found, which results in reduced efficiency of production.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides an accurate MARK point acquisition and identification algorithm based on multi-level algorithm fusion, and solves the problems that the position of a mounted component is randomly and integrally deviated due to low identification rate and identification precision of MARK points in the prior art, and the production efficiency is reduced.
In order to achieve the purpose, the invention is realized by the following technical scheme: a multi-level algorithm fusion-based accurate MARK point acquisition and identification algorithm specifically comprises the following steps:
s1, MARK point acquisition: selecting a camera and setting light source parameters, acquiring a MARK picture through the camera, adjusting a MARK contour searching algorithm until the contour of a MARK point is clearly found out, automatically adjusting preset parameters of the camera light source and adjusting contour searching visual algorithm parameters when all set parameters of the MARK contour searching algorithm are traversed and the clear contour of the MARK is not searched, and searching the contour of the MARK point again until the clear contour of the MARK point is found, at the moment, saving the current light source and camera parameters, saving a template picture of the MARK point and contour searching parameters of the MARK point;
s2, matching and identifying MARK points: a1, in actual work, firstly moving a paster head of a chip mounter to be close to a MARK point, acquiring an image through a camera, judging whether the MARK point is close to a central point, performing rough matching by adopting a template image matching algorithm when the MARK point is not close to the central point, and obtaining XY deviation and moving if the matching is successful; a2, when the MARK point is close to the central point, adopting a MARK point contour matching recognition algorithm to perform accurate matching to obtain XY offset, and acquiring the image again to perform the next round of matching after moving the head.
Preferably, in step S2, if the XY offset finally converges to the tolerance range of the central point, the MARK point is considered to be recognized and the algorithm is ended.
Preferably, the template image matching algorithm in step S2 is a second matching error algorithm, where matching is performed twice in the second matching error algorithm, and the first matching is a rough matching. Taking interlaced array data of the template, namely quarter of the template data, carrying out interlaced array scanning matching on the searched image, namely matching in a quarter of the range of the original image, wherein the matching speed is obviously improved and the error threshold value E is greatly reduced due to the fact that the data volume is greatly reduced
0:
Wherein e
0The average maximum error of each point is generally 40-50, m and n are respectively the length and width of the template, and the second matching is precise matching. At the 1 st error minimum point (i)
min,j
min) In the field of (i), i.e. at a diagonal point of (i)
min-1,j
min-1),(i
min+1,j
min+1) And searching and matching are carried out in the rectangle to obtain the final result. Preferably, in step S2, a MARK point template image matching algorithm and a MARK point contour matching algorithm are hierarchically fused, and dynamic matching and convergence are performed to the MARK center point.
Preferably, the algorithm needs to be integrated into the software of a control system of an upper computer of the chip mounter for use.
Preferably, before the system is used, a MARK point setting page needs to be opened through a software man-machine interaction interface of a chip mounter control system, an initial light source camera parameter is adjusted, and therefore a button for starting customizing a corresponding function of a MARK point is clicked.
Advantageous effects
The invention provides an accurate MARK point acquisition and identification algorithm based on multi-level algorithm fusion. Compared with the prior art, the method has the following beneficial effects:
(1) the accurate MARK point acquisition and recognition algorithm based on multi-level algorithm fusion is characterized in that various parameters including a camera light source and a contour search parameter during the identification of the MAKR are prepared from the beginning of MARK point acquisition, so that the influence of external environment changes such as the light source on the traditional MARK point recognition is resisted.
(2) The accurate MARK point acquisition and identification algorithm based on multi-level algorithm fusion improves the quality of MARK point identification, improves the production efficiency and also improves the mounting precision by combining the advantages of high matching rate of image templates and high matching precision of MARK point profiles.
(3) According to the accurate MARK point acquisition and identification algorithm based on multi-level algorithm fusion, the corresponding algorithm is used for searching and matching when identification is carried out in the MARK point acquisition stage, so that a user can quickly know whether the set MARK point is effective or not in the acquisition stage, and the existing method usually knows whether the initially set MARK point is effective or not at all in the real production time, so that the algorithm can more efficiently and quickly find out the reasonable MARK point compared with the existing method.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-4, the present invention provides a technical solution: a multi-level algorithm fusion-based accurate MARK point acquisition and identification algorithm specifically comprises the following steps:
s1, MARK point acquisition: selecting a camera and setting light source parameters, acquiring a MARK picture through the camera, adjusting a MARK contour searching algorithm until the contour of a MARK point is clearly found out, automatically adjusting preset parameters of the camera light source and adjusting contour searching visual algorithm parameters when all set parameters of the MARK contour searching algorithm are traversed and the clear contour of the MARK is not searched, and searching the contour of the MARK point again until the clear contour of the MARK point is found, at the moment, saving the current light source and camera parameters, saving a template picture of the MARK point and contour searching parameters of the MARK point;
s2, matching and identifying MARK points: a1, in actual work, firstly moving a paster head of a chip mounter to be close to a MARK point, acquiring an image through a camera, judging whether the MARK point is close to a central point, performing rough matching by adopting a template image matching algorithm when the MARK point is not close to the central point, and obtaining XY deviation and moving if the matching is successful; a2, when the MARK point is close to the central point, using the MARK point contour matching recognition algorithm to perform accurate matching to obtain XY offset, moving the head, and then collecting the image again to perform the next round of matching. Meanwhile, when one algorithm cannot be identified under certain conditions, the other algorithm is automatically switched to, and the robustness of the identification algorithm is guaranteed.
In the present invention, if the XY deviation finally converges within the tolerance range of the central point in step S2, it is determined that the MARK point has been identified, and the algorithm ends.
In the invention, the template image matching algorithm in the step S2 is a secondary matching error algorithm, the matching in the secondary matching error algorithm is carried out twice, and the first matching is rough matching. Taking interlaced array data of the template, namely quarter of the template data, carrying out interlaced array scanning matching on the searched image, namely matching in a quarter of the range of the original image, wherein the matching speed is obviously improved and the error threshold value E is greatly reduced due to the fact that the data volume is greatly reduced
0:
Wherein e
0The average maximum error of each point is generally 40-50, m and n are respectively the length and width of the template, and the second matching is precise matching. At the 1 st error minimum point (i)
min,j
min) In the field of (i), i.e. at a diagonal point of (i)
min-1,j
min-1),(i
min+1,j
min+1) to obtain the final result.
In the invention, a MARK point template picture matching algorithm and a MARK point contour matching algorithm are hierarchically fused in step S2, and dynamic matching and convergence are carried out to the MARK center point.
In the invention, the algorithm needs to be integrated in the upper computer control system software of the chip mounter for use.
In the invention, before the system is used, a MARK point setting page is opened through a software man-machine interaction interface of a chip mounter control system, and an initial light source camera parameter is adjusted, so that a button for starting customizing a corresponding function of the MARK point is clicked.
And those not described in detail in this specification are well within the skill of those in the art.
When the system is used, a MARK point setting page is opened through a man-machine interaction interface of a chip mounter control system software, an initial light source camera parameter is adjusted, a button corresponding to the MARK point is clicked to start customizing, the system can search the MARK profile, the clear MARK profile is known to stop, corresponding algorithm parameters, camera light source parameters, coordinate information and template pictures are stored, when the system is in actual production work, the head is attached to the position close to the MARK point coordinate, algorithm matching is carried out, the algorithm comprises multi-stage fusion of a template picture matching algorithm and a profile matching algorithm, and finally the position of the current MARK point is accurately located.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.