CN114862963A - Bonding positioning method, device, equipment and storage medium - Google Patents

Bonding positioning method, device, equipment and storage medium Download PDF

Info

Publication number
CN114862963A
CN114862963A CN202210450932.0A CN202210450932A CN114862963A CN 114862963 A CN114862963 A CN 114862963A CN 202210450932 A CN202210450932 A CN 202210450932A CN 114862963 A CN114862963 A CN 114862963A
Authority
CN
China
Prior art keywords
image
target
positioning
pcb
processed
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
Application number
CN202210450932.0A
Other languages
Chinese (zh)
Inventor
李林峰
汪杨刚
高强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Haiwei Technology Co ltd
Original Assignee
Wuhan Haiwei Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Haiwei Technology Co ltd filed Critical Wuhan Haiwei Technology Co ltd
Priority to CN202210450932.0A priority Critical patent/CN114862963A/en
Publication of CN114862963A publication Critical patent/CN114862963A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • G06T7/75Determining position or orientation of objects or cameras using feature-based methods involving models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • G06T2207/20032Median filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention relates to the technical field of electronic product production, in particular to a fitting positioning method, a fitting positioning device, fitting positioning equipment and a storage medium. According to the invention, the target compensation parameters of the PCB image and the laminating element image are obtained by respectively carrying out error compensation analysis on the PCB image and the laminating element image so as to realize accurate positioning between the PCB image and the laminating element image, and then the laminating element and the PCB are successfully laminated by controlling the target laminating equipment to move based on the target compensation parameters, so that the technical problem of quality defects caused by low positioning precision during the positioning, laminating and assembling of the PCB element in the prior art is avoided, and the positioning and laminating precision of the PCB element is improved.

Description

Bonding positioning method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of electronic product production, in particular to a fitting positioning method, a fitting positioning device, fitting positioning equipment and a storage medium.
Background
In on-vehicle screen PCB automated production in-process, need laminate PCB board and laminating component accuracy, wherein, traditional laminating means is through artifical, perhaps the machine is laminated, but artifical laminating cost is higher, and efficiency is very low, and the machine laminating in-process, because there are a large amount of pins between laminating component and the PCB board, lead to when the laminating, can't pinpoint the PCB board and laminate the position between the component to there is the quality flaw, influence user experience.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a laminating and positioning method, a laminating and positioning device, laminating and positioning equipment and a storage medium, and aims to solve the technical problem that in the prior art, when a PCB element is positioned, laminated and assembled, the positioning precision is not high, so that quality defects exist.
In order to achieve the purpose, the invention provides a fitting and positioning method, which comprises the following steps:
acquiring an image to be processed acquired by a target positioning camera, wherein the image to be processed comprises: PCB board image and laminating element image;
carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter;
and controlling the target laminating equipment to move according to the target compensation parameters so as to laminate the laminating element with the PCB.
Optionally, the performing error compensation analysis on the PCB image and the image of the attached component through a preset error positioning model to obtain a target compensation parameter includes:
carrying out visual positioning on the PCB image through a preset visual positioning model to obtain a first translation compensation quantity and a first angle compensation quantity;
carrying out pose calculation on the image of the attaching element through a preset pose determination model to obtain a second translation compensation quantity and a second angle compensation quantity;
generating a target translational compensation amount based on the first translational compensation amount and the second translational compensation amount, and generating a target angular compensation amount according to the first angular compensation amount and the second angular compensation amount;
and recording the target translation compensation amount and the target angle compensation amount as target compensation parameters.
Optionally, visually positioning the PCB image through a preset visual positioning model to obtain a first translation compensation amount and a first angle compensation amount, including:
extracting pixel coordinate information in the PCB image, and determining PCB central coordinate information according to the pixel coordinate information;
determining a PCB image included angle set according to the pixel coordinate information, and generating a first angle compensation quantity based on the PCB image included angle set;
and determining a first translation compensation amount according to the PCB center coordinate information and preset first reference point coordinate information.
Optionally, the performing pose calculation on the fitting element image through a preset pose determination model to obtain a second translational compensation amount and a second angular compensation amount includes:
extracting a pin coordinate point set in the attaching element image;
constructing a target fitting straight line through a rectangular decomposition strategy based on the pin coordinate point set;
determining the coordinate information of the straight line intersection point of the image of the attaching element according to a target straight line equation corresponding to the target fitting straight line;
determining the central coordinate information and the second angle compensation quantity of the attaching element according to the corner point coordinate information;
and determining a second translation compensation amount based on the central coordinate information of the attaching element and preset second reference point coordinate information.
Optionally, the constructing a target fitting straight line through a rectangular decomposition strategy based on the pin coordinate point set includes:
obtaining a first fitting matrix according to a preset fitting strategy and the target fitting straight line;
obtaining an orthogonal matrix and a triangular matrix corresponding to the first fitting matrix;
performing singular value decomposition on the first fitting matrix according to the orthogonal matrix and the triangular matrix to obtain a second fitting matrix;
performing singular value decomposition on the second fitting matrix to obtain a target constant threshold and a unit orthogonal vector;
and generating a target linear equation based on the target constant threshold and the unit orthogonal vector.
Optionally, after acquiring the to-be-processed image acquired by the target positioning camera, the method further includes:
performing image gray processing on the image to be processed, and performing image binarization processing on the image to be processed after the gray processing through an image preprocessing model to obtain a target image;
the step of carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter comprises the following steps:
and respectively carrying out error compensation analysis on the target PCB image and the target laminating element image in the target image through a preset error positioning model to obtain target compensation parameters.
Optionally, the performing image gray-scale processing on the image to be processed, and performing image binarization processing on the image to be processed after gray-scale processing through an image preprocessing model to obtain a target image includes:
performing image gray processing on the image to be processed to obtain a first gray value and a second gray value corresponding to a target gray image;
determining an image segmentation threshold according to the first gray value and the second gray value;
performing image segmentation on the image to be processed according to the image segmentation threshold value to obtain a first image to be processed and a second image to be processed corresponding to the image to be processed;
determining a first image to be processed gray average value and a second image to be processed gray average value according to the first image to be processed and the second image to be processed;
determining a segmentation threshold value of the image to be processed according to the first image to be processed gray average value and the second image to be processed gray average value;
and carrying out binarization processing on the image to be processed based on the segmentation threshold value of the image to be processed to obtain a target image.
In addition, in order to achieve the above object, the present invention further provides a fitting positioning device, including:
the image acquisition module is used for acquiring an image to be processed acquired by the target positioning camera, and the image to be processed comprises: PCB board image and laminating element image;
the error positioning module is used for carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter;
and the attaching and positioning module is used for controlling the target attaching equipment to move according to the target compensation parameters so as to attach the attaching element to the PCB.
In addition, in order to achieve the above object, the present invention further provides a fitting positioning apparatus, including: a memory, a processor and a fit positioning program stored on the memory and executable on the processor, the fit positioning program configured to implement the steps of the fit positioning method as described above.
In addition, in order to achieve the above object, the present invention further provides a storage medium, in which a bonding positioning program is stored, and the bonding positioning program implements the steps of the bonding positioning method described above when executed by a processor.
The invention discloses a fitting positioning method, which comprises the following steps: acquiring an image to be processed acquired by a target positioning camera, wherein the image to be processed comprises: PCB board image and laminating element image; carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter; according to the method and the device, the target attaching equipment is controlled to move according to the target compensation parameters so that the attaching element is attached to the PCB, compared with the prior art, the method and the device have the advantages that error compensation analysis is respectively carried out on the PCB image and the attaching element image, the target compensation parameters of the PCB image and the attaching element image are obtained, accurate positioning between the PCB image and the attaching element image is achieved, then the target attaching equipment is controlled to move based on the target compensation parameters so that the attaching element is successfully attached to the PCB, the technical problem that quality flaws exist due to low positioning accuracy when the PCB element is positioned, attached and assembled in the prior art is solved, and the positioning and attaching accuracy of the PCB element is improved.
Drawings
Fig. 1 is a schematic structural diagram of a fitting positioning device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a bonding positioning method according to the present invention;
FIG. 3 is a schematic diagram of PCB element attachment according to an embodiment of the attachment positioning method of the present invention;
FIG. 4 is a schematic flow chart illustrating a second embodiment of a bonding positioning method according to the present invention;
FIG. 5 is a schematic diagram of Mark point coordinates of a PCB in accordance with an embodiment of the bonding and positioning method;
FIG. 6 is a schematic diagram of a PCB structure according to an embodiment of the bonding and positioning method of the present invention;
FIG. 7 is a schematic flow chart illustrating a third embodiment of a bonding positioning method according to the present invention;
FIG. 8 is a block diagram of a first embodiment of a bonding positioning device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a fitting positioning device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the conformable positioning apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in FIG. 1 is not intended to be limiting of conformable positioning apparatus and may include more or less components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include an operating system, a network communication module, a user interface module, and a fit positioning program therein.
In the conformable positioning apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 of the bonding positioning device of the present invention may be disposed in the bonding positioning device, and the bonding positioning device calls the bonding positioning program stored in the memory 1005 through the processor 1001 and executes the bonding positioning method provided by the embodiment of the present invention.
An embodiment of the present invention provides a bonding positioning method, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a bonding positioning method according to the present invention.
In this embodiment, the attaching and positioning method includes the following steps:
step S10: acquiring an image to be processed acquired by a target positioning camera, wherein the image to be processed comprises: PCB board image and laminating component image.
It should be noted that the execution subject of the method of this embodiment may be a device having data processing or data transmission, for example: the present embodiment is not limited to any specific example, and in this embodiment and the following embodiments, a controller attached to a control element will be taken as an example for description.
It should be noted that, in this embodiment, when the PCB is attached, referring to fig. 3, the attaching component and the PCB can be controlled by a robot to attach, where 1 is the robot, 2 is the suction cup, 3 is the PCB, 4 is the upper positioning camera, 5 is the attaching component, and 6 is the lower positioning camera.
In addition, in this embodiment, the target positioning camera includes an upper positioning camera for collecting an image of the attached component and a lower positioning camera for collecting the PCB, which is not limited in this embodiment.
Step S20: and carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain target compensation parameters.
It can be understood that the preset error positioning model is used for performing visual positioning calculation on the PCB image and also used for performing pose state calculation on the attaching element image, wherein after the visual positioning calculation is performed on the PCB image and the pose state calculation is performed on the attaching element image, the compensation parameters between the PCB and the attaching element are obtained.
It is easy to understand that the target compensation parameters are used for controlling the movement of the robot arm so that the attaching component can be accurately attached to the PCB, and the target compensation parameters include: a target translational compensation amount and a target angular compensation amount, wherein the target translational compensation amount comprises: the amount of lateral translational compensation and the amount of longitudinal translational compensation.
It should be noted that the target compensation parameter refers to a positioning error of the PCB plus a positioning error of the attaching element, wherein the target translational compensation amount is a sum of a translational positioning error of the PCB and a translational positioning error of the attaching element; the target angle compensation quantity is the sum of the angle positioning error of the PCB and the angle positioning error of the attaching element, and the formula for obtaining the target translation compensation quantity and the target angle compensation quantity is as follows:
Figure BDA0003618587910000061
Δα=α bp
wherein, Δ x is a target horizontal translation compensation amount, Δ y is a vertical translation compensation amount, and Δ x p 、Δy p Respectively, transverse translational positioning error and longitudinal translational positioning error, Deltax b 、Δy b Respectively the transverse translation positioning error and the longitudinal translation positioning error of the PCB, wherein delta alpha refers to the target angle compensation quantity, alpha b 、α p Respectively, the angular positioning error of the PCB and the angular positioning error of the attaching element.
Step S30: and controlling the target laminating equipment to move according to the target compensation parameters so as to laminate the laminating element with the PCB.
It can be understood that camera parameter calibration may also be performed on the target positioning camera, so that the acquired image is updated in real time when the manipulator and the suction cup are controlled to move the attaching element, where the camera parameter calibration may adopt a Tsai two-step calibration method, and may also be other calibration methods with the same or similar functions, which is not limited in this embodiment.
In a specific implementation, when calibrating the camera parameters by the Tsai two-step calibration method, the rotation matrix R and the translation vector T may be solved x And T y And scale factor s of the image x (ii) a In calculating the focal length f, the distortion coefficient k of the lens and the translation component T z To complete camera parameter calibration.
The embodiment discloses a fitting positioning method, which comprises the following steps: acquiring an image to be processed acquired by a target positioning camera, wherein the image to be processed comprises: PCB board image and laminating element image; carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter; according to target compensation parameter control target laminating equipment moves to make laminating component and PCB board laminate, this embodiment carries out error compensation analysis through respectively carrying out PCB board image and laminating component image, acquires the target compensation parameter of PCB board image and laminating component image, in order to realize the accurate location between PCB board image and the laminating component image, rethread control target laminating equipment moves based on target compensation parameter, in order to make laminating component and PCB board laminate successfully, when having avoided PCB component location laminating equipment among the prior art, positioning accuracy is not high, lead to having the technical problem of quality flaw, the precision of PCB component location laminating has been improved.
Referring to fig. 4, fig. 4 is a schematic flow chart of a second embodiment of a bonding positioning method according to the present invention.
Based on the first embodiment, in this embodiment, the step S20 includes:
step S201: and carrying out visual positioning on the PCB image through a preset visual positioning model to obtain a first translation compensation quantity and a first angle compensation quantity.
It should be noted that the preset visual positioning model is used for visually positioning the PCB image, the first translational compensation amount refers to an error translational amount of the PCB obtained after the visual positioning of the PCB image, and the first angle compensation amount refers to an angle error translational amount of the PCB obtained after the visual positioning of the PCB image.
Further, in order to obtain a first translational compensation amount and a first angular compensation amount corresponding to the PCB, the step S201 includes:
extracting pixel coordinate information in the PCB image, and determining PCB central coordinate information according to the pixel coordinate information;
determining a PCB image included angle set according to the pixel coordinate information, and generating a first angle compensation quantity based on the PCB image included angle set;
and determining a first translation compensation amount according to the PCB center coordinate information and preset first reference point coordinate information.
It should be noted that the pixel coordinate information refers to a pixel coordinate of a Mark point on an acquired PCB image, and referring to fig. 5, in this embodiment, the Mark point may be four vertex coordinates of the PCB or a pixel coordinate defined by a user, which is not limited in this embodiment.
For example: the Mark point coordinates in the PCB image are respectively (x) 1 ,y 1 )、(x 2 ,y 2 )、(x 3 ,y 3 )、(x 4 ,y 4 ) Calculating the central coordinate position of the PCB by the coordinates of the four Mark points can be (x) c ,y c ) And the obtaining formula of the central coordinate is as follows:
Figure BDA0003618587910000081
wherein x is c Is the abscissa of the center point, y c Is the ordinate of the central point.
It can be understood that the PCB image clip angle set refers to an image included angle of a long side and a short side of the PCB along a horizontal direction and a vertical direction, wherein a formula for obtaining the PCB image clip angle set is as follows:
Figure BDA0003618587910000082
Figure BDA0003618587910000083
wherein x is 1 ,x 2 ,x 3 ,x 4 Respectively mean the abscissa, y, of the coordinates of the four Mark points 1 ,y 2 ,y 3 ,y 4 Respectively refer to the coordinates of four Mark pointsThe ordinate of (c).
In a specific implementation, the first angle compensation amount refers to a rotation angle of the PCB, wherein a formula for determining the first angle compensation amount corresponding to the PCB through the set of the image included angles of the four PCBs is as follows:
α b =(α 1 22 23 24 2 )
wherein alpha is b Indicates the first angle compensation amount, alpha, corresponding to the PCB 1 ,α 2 ,α 3 ,α 4 The included angles of the long edge and the short edge of the PCB along the horizontal direction and the vertical direction are respectively referred.
It should be noted that the preset first reference point coordinate information refers to an ideal center coordinate (x) of the attaching member b ,y b ) The formula for determining the first translation compensation amount through the central coordinate information of the PCB and the preset first reference point coordinate information is as follows:
Figure BDA0003618587910000091
wherein x is b ,y b Is an ideal center coordinate value, Δ x, of the bonded component b 、Δy b The transverse translation positioning error and the longitudinal translation positioning error of the PCB are respectively.
Step S202: and calculating the pose of the image of the attaching element through a preset pose determining model to obtain a second translation compensation quantity and a second angle compensation quantity.
It should be noted that the preset pose determination model is used for performing visual positioning on the image of the attachment element, the second translational compensation amount is an error translational amount of the attachment element obtained after performing pose calculation on the image of the attachment element, and the second angle compensation amount is an angle error translational amount of the attachment element obtained after performing pose calculation on the image of the attachment element.
Further, in order to obtain the second translational compensation amount and the second angular compensation amount, the step S202 includes:
extracting a pin coordinate point set in the attaching element image;
constructing a target fitting straight line through a rectangular decomposition strategy based on the pin coordinate point set;
determining the coordinate information of the straight line intersection point of the image of the attaching element according to a target straight line equation corresponding to the target fitting straight line;
determining the central coordinate information and the second angle compensation quantity of the attaching element according to the corner point coordinate information;
and determining a second translation compensation amount based on the central coordinate information of the attaching element and preset second reference point coordinate information.
It should be noted that, when component bonding is performed, each pin of a bonded component needs to be corresponded to a pin position on a PCB, so as to improve bonding quality, referring to fig. 6, where 3-1 is a PCB positioning hole, 3-2 is a PCB Mark point, and 3-3 is a bonded component pin, a pin coordinate in a bonded component image needs to be corresponded to a pin coordinate on the PCB.
In the specific implementation, central coordinate point sets of 4 groups of pins of the attaching element are respectively obtained, each group of point sets is fitted into a straight line by adopting a rectangular decomposition method, and a deviation and a target function are established:
Figure BDA0003618587910000092
by solving the square and minimum of the objective function, one straight line on the plane can be represented by the following formula:
Figure BDA0003618587910000101
wherein (n) 1 ,n 2 ) Is a unit orthogonal vector, the equation for r is as follows:
r=n 1 x+n 2 y+c
where | r | is the distance from the point to be fitted to the fitted line.
Further, in order to accurately obtain a target fitting straight line, the constructing a target fitting straight line through a rectangular decomposition strategy based on the pin coordinate point set includes:
obtaining a first fitting matrix according to a preset fitting strategy and the target fitting straight line;
obtaining an orthogonal matrix and a triangular matrix corresponding to the first fitting matrix;
performing singular value decomposition on the first fitting matrix according to the orthogonal matrix and the triangular matrix to obtain a second fitting matrix;
performing singular value decomposition on the second fitting matrix to obtain a target constant threshold and a unit orthogonal vector;
and generating a target linear equation based on the target constant threshold and the unit orthogonal vector.
In a specific implementation, the distance from the point to be fitted to the fitted straight line can be translated into a least squares problem, namely:
Figure BDA0003618587910000102
wherein the content of the first and second substances,
Figure BDA0003618587910000103
a is a first fitting matrix of the first image,
Figure BDA0003618587910000104
x is a singular vector and x is a singular vector,
Figure BDA0003618587910000105
a distance matrix from the fitted point to the fitted line.
By singular value decomposition of the first fitting matrix a, one can obtain:
Figure BDA0003618587910000106
wherein, Q is the orthogonal matrix, and R is the triangular matrix, according to the number of unknowns, can further turn into:
Figure BDA0003618587910000111
wherein the content of the first and second substances,
Figure BDA0003618587910000112
b is the first fitting matrix.
In a specific implementation, when | | | x | | non-woven phosphor 2 When 1, solve | Bx | | non-calculation 2 Performing QR decomposition on the matrix B, obtaining the minimum value which is the minimum singular value of the matrix B, obtaining n1 and n2 through Q singular value decomposition of a second fitting matrix B, obtaining a target constant threshold value c after solving n1 and n2, and obtaining a target constant threshold value c through the target constant threshold value c and a unit orthogonal vector (n) 1 ,n 2 ) And generating a target linear equation.
In a specific implementation, the vector (n) is orthogonal to the unit by a target constant threshold c 1 ,n 2 ) The formula of the target fitting straight line for generating the target straight line equation is as follows:
a:n 1 x+n 2 y+c 1 =0
b:-n 2 x+n 1 y+c 2 =0
c:n 1 x+n 2 y+c 3 =0
d:-n 2 x+n 1 y+c 4 =0
wherein, a, b, c and d respectively refer to four target fitting straight lines, the intersection points of the four target fitting straight lines are respectively obtained to determine the coordinate information of the straight line intersection point of the image of the bonding element, and the central coordinate information (x) of the bonding element is generated according to the coordinate information of the straight line intersection point pc ,y pc ) And angle of rotation alpha P The second translation compensation amount is:
Figure BDA0003618587910000113
wherein x p ,y p Is the theoretical central coordinate point of the fitting element.
Step S203: and generating a target translational compensation amount based on the first translational compensation amount and the second translational compensation amount, and generating a target angle compensation amount according to the first angle compensation amount and the second angle compensation amount.
It can be understood that the target translational compensation amount is the sum of the translational positioning error of the PCB board and the translational positioning error of the attaching element; the target angle compensation quantity is the sum of the angle positioning error of the PCB and the angle positioning error of the attaching element, and the formula for obtaining the target translation compensation quantity and the target angle compensation quantity is as follows:
Figure BDA0003618587910000114
Δα=α bp
wherein, Δ x is a target horizontal translation compensation amount, Δ y is a vertical translation compensation amount, and Δ x p 、Δy p Respectively, transverse translational positioning error and longitudinal translational positioning error, Deltax b 、Δy b Respectively the transverse translation positioning error and the longitudinal translation positioning error of the PCB, wherein delta alpha refers to the target angle compensation quantity, alpha b 、α p Respectively, the angular positioning error of the PCB and the angular positioning error of the attaching element.
Step S204: and recording the target translation compensation amount and the target angle compensation amount as target compensation parameters.
This embodiment is through respectively inciting somebody to action PCB board image carries out visual positioning through predetermineeing the visual positioning model and obtains first translation compensation volume and first angle compensation volume, and will laminating component image carries out the position appearance through predetermineeing the position appearance and confirms the model and carries out the position appearance and calculate, obtains second translation compensation volume and second angle compensation volume to translation compensation volume and angle compensation volume between PCB board and the laminating component that obtain to realize PCB board and laminating component's accurate location, so that follow-up control manipulator carries out the laminating of PCB board component, improved the precision of laminating location.
Referring to fig. 7, fig. 7 is a schematic flow chart of a third embodiment of a bonding positioning method according to the present invention.
Based on the first embodiment, in this embodiment, after step S10, the method further includes:
step S01: and carrying out image gray processing on the image to be processed, and carrying out image binarization processing on the image to be processed after the gray processing through an image preprocessing model to obtain a target image.
It should be noted that the preprocessing model is used for processing the PCB image and the attached component image by using median filtering after the PCB image and the attached component image are obtained, wherein each pixel of the image and the corresponding pixel value can be obtained in a cyclic manner in the processing process, and whether the pixel value is an extreme value of a field pixel in a filtering mask window is determined, if yes, the image is preprocessed by using a normal median filtering algorithm, and if not, the pixel point is ignored and not processed, so that the burst noise is effectively removed on the premise of not affecting the edge characteristics of the image.
Further, the step S01 includes:
performing image gray processing on the image to be processed to obtain a first gray value and a second gray value corresponding to a target gray image;
determining an image segmentation threshold according to the first gray value and the second gray value;
performing image segmentation on the image to be processed according to the image segmentation threshold value to obtain a first image to be processed and a second image to be processed corresponding to the image to be processed;
determining a first image to be processed gray average value and a second image to be processed gray average value according to the first image to be processed and the second image to be processed;
determining a segmentation threshold value of the image to be processed according to the first image to be processed gray average value and the second image to be processed gray average value;
and carrying out binarization processing on the image to be processed based on the segmentation threshold value of the image to be processed to obtain a target image.
It should be noted that the first gray scale value is a minimum gray scale value of the image after the gray scale processing, the second gray scale value is a maximum gray scale value of the image after the gray scale processing, and the image segmentation threshold is a segmentation threshold for performing image segmentation on the image after the gray scale processing, and the image segmentation threshold is different according to different iteration times.
For example: an initial segmentation threshold of
Figure BDA0003618587910000131
Wherein the minimum gray value is Y 1 Maximum gray value of Y k Firstly segmenting the image into two parts of a target and a background according to an initial segmentation threshold, wherein the gray mean value corresponding to the two parts is Z 0 And Z k Wherein Z is 0 And Z k The acquisition formula is as follows:
Figure BDA0003618587910000132
Figure BDA0003618587910000133
where z (i, j) is a gray value of the image pixel (i, j), N (i, j) is a weight coefficient of the image pixel (i, j), and N (i, j) is generally equal to 1.0, which is not limited in this embodiment.
In specific implementation, an image segmentation threshold of the next iteration can be obtained according to the obtained first to-be-processed image gray average value and the obtained second to-be-processed image gray average value, and if the currently obtained image segmentation threshold is equal to the image segmentation threshold of the last iteration, the image segmentation threshold is an image segmentation threshold to be processed, namely an optimal image segmentation threshold.
It is understood that the first image to be processed may be a target image of image segmentation, and the second image to be processed may be a background image obtained after image segmentation, for example: in the pasting element image segmentation, the first image to be processed may be a target image targeting the pasting element, and the second image to be processed may be a pasting element image from which the pasting element is removed, and may be used as a background image.
It should be noted that, the binarization processing on the image may be to control the gray value f (x, y) of the target portion to be greater than or equal to T and the gray value f (x, y) of the background portion to be less than or equal to T, so as to enhance the contrast between the target area and the background area and improve the subsequent positioning effect.
The embodiment discloses that the image to be processed is subjected to image gray processing, and iterative image segmentation is performed on a first image to be processed and a second image to be processed after the gray processing, so that an optimal image segmentation threshold value is obtained, the image identification degree is conveniently enhanced subsequently, and the accuracy of PCB positioning and laminating element positioning is improved.
In addition, an embodiment of the present invention further provides a storage medium, where the storage medium stores a bonding positioning program, and the bonding positioning program, when executed by a processor, implements the steps of the bonding positioning method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
Referring to fig. 8, fig. 8 is a block diagram of a first embodiment of the attaching and positioning device of the present invention.
As shown in fig. 8, the attaching and positioning device according to the embodiment of the present invention includes:
an image obtaining module 10, configured to obtain an image to be processed acquired by a target positioning camera, where the image to be processed includes: PCB board image and laminating component image.
And the error positioning module 20 is used for performing error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter.
And the attaching and positioning module 30 is used for controlling the target attaching equipment to move according to the target compensation parameters so as to attach the attaching element to the PCB.
The embodiment discloses a fitting positioning method, which comprises the following steps: acquiring an image to be processed acquired by a target positioning camera, wherein the image to be processed comprises: PCB board image and laminating element image; carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter; according to target compensation parameter control target laminating equipment moves to make laminating component and PCB board laminate, this embodiment carries out error compensation analysis through respectively carrying out PCB board image and laminating component image, acquires the target compensation parameter of PCB board image and laminating component image, in order to realize the accurate location between PCB board image and the laminating component image, rethread control target laminating equipment moves based on target compensation parameter, in order to make laminating component and PCB board laminate successfully, when having avoided PCB component location laminating equipment among the prior art, positioning accuracy is not high, lead to having the technical problem of quality flaw, the precision of PCB component location laminating has been improved.
In an embodiment, the error positioning module 20 is further configured to perform visual positioning on the PCB image through a preset visual positioning model to obtain a first translation compensation amount and a first angle compensation amount; carrying out pose calculation on the image of the attaching element through a preset pose determination model to obtain a second translation compensation quantity and a second angle compensation quantity; generating a target translational compensation amount based on the first translational compensation amount and the second translational compensation amount, and generating a target angular compensation amount according to the first angular compensation amount and the second angular compensation amount; and recording the target translation compensation amount and the target angle compensation amount as target compensation parameters.
In an embodiment, the error locating module 20 is further configured to extract pixel coordinate information in the PCB image, and determine PCB center coordinate information according to the pixel coordinate information; determining a PCB image included angle set according to the pixel coordinate information, and generating a first angle compensation quantity based on the PCB image included angle set; and determining a first translation compensation amount according to the PCB center coordinate information and preset first reference point coordinate information.
In an embodiment, the error locating module 20 is further configured to extract a pin coordinate point set in the attached component image; constructing a target fitting straight line through a rectangular decomposition strategy based on the pin coordinate point set; determining the coordinate information of the straight line intersection point of the image of the attaching element according to a target straight line equation corresponding to the target fitting straight line; determining the central coordinate information and the second angle compensation quantity of the attaching element according to the corner point coordinate information; and determining a second translation compensation amount based on the central coordinate information of the attaching element and preset second reference point coordinate information.
In an embodiment, the error localization module 20 is further configured to obtain a first fitting matrix according to a preset fitting strategy and the target fitting straight line; obtaining an orthogonal matrix and a triangular matrix corresponding to the first fitting matrix; performing singular value decomposition on the first fitting matrix according to the orthogonal matrix and the triangular matrix to obtain a second fitting matrix; performing singular value decomposition on the second fitting matrix to obtain a target constant threshold and a unit orthogonal vector; and generating a target linear equation based on the target constant threshold and the unit orthogonal vector.
In an embodiment, the image obtaining module 10 is further configured to perform image grayscale processing on the image to be processed, and perform image binarization processing on the image to be processed after the grayscale processing through an image preprocessing model to obtain a target image; the step of carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter comprises the following steps: and respectively carrying out error compensation analysis on the target PCB image and the target laminating element image in the target image through a preset error positioning model to obtain target compensation parameters.
In an embodiment, the image obtaining module 10 is further configured to perform image gray processing on the image to be processed to obtain a first gray value and a second gray value corresponding to a target gray image; determining an image segmentation threshold according to the first gray value and the second gray value; performing image segmentation on the image to be processed according to the image segmentation threshold value to obtain a first image to be processed and a second image to be processed corresponding to the image to be processed; determining a first image to be processed gray average value and a second image to be processed gray average value according to the first image to be processed and the second image to be processed; determining a segmentation threshold value of the image to be processed according to the first image to be processed gray average value and the second image to be processed gray average value; and carrying out binarization processing on the image to be processed based on the segmentation threshold value of the image to be processed to obtain a target image.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the attaching and positioning method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A fitting positioning method is characterized by comprising the following steps:
acquiring an image to be processed acquired by a target positioning camera, wherein the image to be processed comprises: PCB board image and laminating element image;
carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter;
and controlling the target laminating equipment to move according to the target compensation parameters so as to laminate the laminating element with the PCB.
2. The bonding positioning method according to claim 1, wherein the performing error compensation analysis on the PCB image and the bonding element image through a preset error positioning model to obtain target compensation parameters comprises:
carrying out visual positioning on the PCB image through a preset visual positioning model to obtain a first translation compensation quantity and a first angle compensation quantity;
calculating the pose of the image of the attaching element through a preset pose determining model to obtain a second translation compensation quantity and a second angle compensation quantity;
generating a target translational compensation amount based on the first translational compensation amount and the second translational compensation amount, and generating a target angular compensation amount according to the first angular compensation amount and the second angular compensation amount;
and recording the target translation compensation amount and the target angle compensation amount as target compensation parameters.
3. The bonding positioning method of claim 2, wherein visually positioning the PCB image through a preset visual positioning model to obtain a first translation compensation amount and a first angle compensation amount comprises:
extracting pixel coordinate information in the PCB image, and determining PCB central coordinate information according to the pixel coordinate information;
determining a PCB image included angle set according to the pixel coordinate information, and generating a first angle compensation quantity based on the PCB image included angle set;
and determining a first translation compensation amount according to the PCB center coordinate information and preset first reference point coordinate information.
4. The bonding positioning method according to claim 2, wherein the pose calculation of the bonding element image by a preset pose determination model to obtain a second translational compensation amount and a second angular compensation amount comprises:
extracting a pin coordinate point set in the attaching element image;
constructing a target fitting straight line through a rectangular decomposition strategy based on the pin coordinate point set;
determining the coordinate information of the straight line intersection point of the image of the attaching element according to a target straight line equation corresponding to the target fitting straight line;
determining the central coordinate information of the laminating element and a second angle compensation amount according to the intersection point coordinate information;
and determining a second translation compensation amount based on the central coordinate information of the attaching element and preset second reference point coordinate information.
5. The fit localization method of claim 4, wherein constructing a target fitted straight line based on the set of pin coordinate points by a rectangular decomposition strategy comprises:
obtaining a first fitting matrix according to a preset fitting strategy and the target fitting straight line;
obtaining an orthogonal matrix and a triangular matrix corresponding to the first fitting matrix;
performing singular value decomposition on the first fitting matrix according to the orthogonal matrix and the triangular matrix to obtain a second fitting matrix;
performing singular value decomposition on the second fitting matrix to obtain a target constant threshold and a unit orthogonal vector;
and generating a target linear equation based on the target constant threshold and the unit orthogonal vector.
6. The attaching and positioning method according to any one of claims 1 to 5, further comprising, after acquiring the image to be processed acquired by the target positioning camera:
performing image gray processing on the image to be processed, and performing image binarization processing on the image to be processed after the gray processing through an image preprocessing model to obtain a target image;
the step of carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter comprises the following steps:
and respectively carrying out error compensation analysis on the target PCB image and the target laminating element image in the target image through a preset error positioning model to obtain target compensation parameters.
7. The attaching and positioning method according to claim 6, wherein the performing image gray processing on the image to be processed and performing image binarization processing on the image to be processed after the gray processing by using an image preprocessing model to obtain a target image comprises:
performing image gray processing on the image to be processed to obtain a first gray value and a second gray value corresponding to a target gray image;
determining an image segmentation threshold according to the first gray value and the second gray value;
performing image segmentation on the image to be processed according to the image segmentation threshold value to obtain a first image to be processed and a second image to be processed corresponding to the image to be processed;
determining a first to-be-processed image gray mean value and a second to-be-processed image gray mean value according to the first to-be-processed image and the second to-be-processed image;
determining a segmentation threshold value of the image to be processed according to the first image to be processed gray average value and the second image to be processed gray average value;
and carrying out binarization processing on the image to be processed based on the segmentation threshold value of the image to be processed to obtain a target image.
8. The utility model provides a laminating positioner, its characterized in that, laminating positioner includes:
the image acquisition module is used for acquiring an image to be processed acquired by the target positioning camera, and the image to be processed comprises: PCB board image and laminating element image;
the error positioning module is used for carrying out error compensation analysis on the PCB image and the laminating element image through a preset error positioning model to obtain a target compensation parameter;
and the attaching and positioning module is used for controlling the target attaching equipment to move according to the target compensation parameters so as to attach the attaching element to the PCB.
9. The utility model provides a laminating positioning device which characterized in that, laminating positioning device includes: a memory, a processor, and a fit positioning program stored on the memory and executable on the processor, the fit positioning program configured to implement the fit positioning method of any of claims 1-7.
10. A storage medium having a fit positioning program stored thereon, the fit positioning program, when executed by a processor, implementing the fit positioning method according to any one of claims 1 to 7.
CN202210450932.0A 2022-04-24 2022-04-24 Bonding positioning method, device, equipment and storage medium Pending CN114862963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210450932.0A CN114862963A (en) 2022-04-24 2022-04-24 Bonding positioning method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210450932.0A CN114862963A (en) 2022-04-24 2022-04-24 Bonding positioning method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114862963A true CN114862963A (en) 2022-08-05

Family

ID=82633408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210450932.0A Pending CN114862963A (en) 2022-04-24 2022-04-24 Bonding positioning method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114862963A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115229804A (en) * 2022-09-21 2022-10-25 荣耀终端有限公司 Method and device for attaching component

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115229804A (en) * 2022-09-21 2022-10-25 荣耀终端有限公司 Method and device for attaching component
CN115229804B (en) * 2022-09-21 2023-02-17 荣耀终端有限公司 Method and device for attaching component

Similar Documents

Publication Publication Date Title
KR102276259B1 (en) Calibration and operation of vision-based manipulation systems
CN110163912B (en) Two-dimensional code pose calibration method, device and system
US8781254B2 (en) Method, an apparatus and a computer program for data processing
CN107038443B (en) Method and device for positioning region of interest on circuit board
CN112132523B (en) Method, system and device for determining quantity of goods
US20220230348A1 (en) Method and apparatus for determining a three-dimensional position and pose of a fiducial marker
CN115205286B (en) Method for identifying and positioning bolts of mechanical arm of tower-climbing robot, storage medium and terminal
CN111145271A (en) Method and device for determining accuracy of camera parameters, storage medium and terminal
CN114862963A (en) Bonding positioning method, device, equipment and storage medium
CN113664838B (en) Robot positioning placement control method and device, electronic equipment and storage medium
CN113172636A (en) Automatic hand-eye calibration method and device and storage medium
JP2672509B2 (en) Method and apparatus for automatically calibrating camera model
CN114037987A (en) Intelligent identification method, device, medium and equipment for scrap steel
JPH08110807A (en) Method and device for automatic calibration
CN116117800B (en) Machine vision processing method for compensating height difference, electronic device and storage medium
CN116309882A (en) Tray detection and positioning method and system for unmanned forklift application
CN113326819B (en) Robot sketch drawing method and device and robot workbench
CN113345023B (en) Box positioning method and device, medium and electronic equipment
CN108805121B (en) License plate detection and positioning method, device, equipment and computer readable medium
CN116021519A (en) TOF camera-based picking robot hand-eye calibration method and device
CN111854678B (en) Pose measurement method based on semantic segmentation and Kalman filtering under monocular vision
CN115100299A (en) Calibration method, device, equipment and storage medium
CN113421207A (en) Visual inspection method, apparatus, product and computer storage medium
CN112308740A (en) House area intelligent right adjusting method and system
CN111750849B (en) Target contour positioning and attitude-fixing adjustment method and system under multiple visual angles

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