CN112950722A - Offset calibration method for camera and dispensing head of dispenser - Google Patents

Offset calibration method for camera and dispensing head of dispenser Download PDF

Info

Publication number
CN112950722A
CN112950722A CN202110232574.1A CN202110232574A CN112950722A CN 112950722 A CN112950722 A CN 112950722A CN 202110232574 A CN202110232574 A CN 202110232574A CN 112950722 A CN112950722 A CN 112950722A
Authority
CN
China
Prior art keywords
calibration plate
coordinate
coordinates
camera
calibration
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.)
Granted
Application number
CN202110232574.1A
Other languages
Chinese (zh)
Other versions
CN112950722B (en
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.)
Shenzhen City Flag Public Intelligence Technology Co ltd
Original Assignee
Shenzhen City Flag Public Intelligence 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 Shenzhen City Flag Public Intelligence Technology Co ltd filed Critical Shenzhen City Flag Public Intelligence Technology Co ltd
Priority to CN202110232574.1A priority Critical patent/CN112950722B/en
Publication of CN112950722A publication Critical patent/CN112950722A/en
Application granted granted Critical
Publication of CN112950722B publication Critical patent/CN112950722B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B05SPRAYING OR ATOMISING IN GENERAL; APPLYING FLUENT MATERIALS TO SURFACES, IN GENERAL
    • B05CAPPARATUS FOR APPLYING FLUENT MATERIALS TO SURFACES, IN GENERAL
    • B05C5/00Apparatus in which liquid or other fluent material is projected, poured or allowed to flow on to the surface of the work
    • B05C5/02Apparatus in which liquid or other fluent material is projected, poured or allowed to flow on to the surface of the work the liquid or other fluent material being discharged through an outlet orifice by pressure, e.g. from an outlet device in contact or almost in contact, with the work

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a calibration method for offset of a camera and a dispensing head of a dispenser, which comprises the following steps: arranging an external camera on the dispensing head frame; recording a first mechanical coordinate of the dispensing head when the calibration mark is dispensed; calculating a transformation relation between a second mechanical coordinate of the original camera and the first image coordinate and a transformation relation between a third mechanical coordinate of the add-on camera and the second image coordinate; setting a calibration plate; calculating to obtain a first reference mechanical coordinate and a second reference mechanical coordinate; calculating the offset of the original camera, the external camera and the dispensing head; calculating the offset of the external camera, the original camera and the dispensing head on the whole dispensing platform; and calculating to obtain the offset of the original camera of the dispensing machine, the external camera and all dispensing heads on the whole dispensing platform. Compared with the prior art, the influence of the guide rail precision on the dispensing precision is reduced, and the dispensing precision and the dispensing stability of the dispenser are effectively improved.

Description

Offset calibration method for camera and dispensing head of dispenser
Technical Field
The invention relates to a dispenser, in particular to a calibration method for offset of a camera and a dispensing head of the dispenser.
Background
When the multi-dispensing head dispenser performs high-precision dispensing production, in order to ensure sufficiently high dispensing precision, each dispensing area needs to be photographed one by one and then dispensed. The accuracy of the offset between the photographing camera and each dispensing head is an important factor influencing the dispensing accuracy.
At present, in a commonly used method for calibrating the offset of a camera and a dispensing head, the offset is assumed to be a constant value and is irrelevant to the dispensing position. In the calibration process, the calibration dispensing head is moved to dispense a calibration mark on the working plane, then the camera is moved to photograph the position of the calibration mark, and the offset between the camera and the dispensing head can be calculated. However, in the actual dispenser equipment, due to certain errors in the machining precision and the installation precision of the guide rail parts, the assumption that the offset between the camera and the dispensing head is a constant value cannot be strictly met. This results in the actual accuracy of gluing to be less than the design requirement, can't obtain stable machining precision when batch production equipment.
Disclosure of Invention
The invention aims to provide a method for calibrating the offset of a camera and a dispensing head of a dispenser, which aims to solve the technical problems that the offset change values of the camera and the dispensing head at different dispensing positions can be accurately obtained, the problem that the offset of the camera and the dispensing head is influenced by the precision of a guide rail is solved, and the precision and the stability of dispensing production of the dispenser are effectively improved.
In order to solve the problems, the invention adopts the following technical scheme: a calibration method for offset of a camera and a dispensing head of a dispenser comprises the following steps:
step S1, arranging an external camera moving together with the dispensing head on a dispensing head frame of the dispensing machine;
s2, driving a dispensing head to be calibrated to move to the center of a dispensing platform and move downwards, dispensing colored glue at the center of the dispensing platform to serve as a calibration mark, and recording a first mechanical coordinate (Xmnr, Ymnr) of the dispensing head when the dispensing head dispenses the calibration mark;
step S3, moving the external camera and the original camera on a 3 x 3 array position point respectively, photographing the calibration mark in the step S2, recording second mechanical coordinates (Xmb, Ymb) of the original camera, first image coordinates (Xib, Yib) corresponding to the second mechanical coordinates (Xmb, Ymb) of the original camera, third mechanical coordinates (Xma, Yma) of the external camera and second image coordinates (Xia, Yia) corresponding to the third mechanical coordinates respectively, and calculating a transformation relation between the second mechanical coordinates of the original camera and the first image coordinates and a transformation relation between the third mechanical coordinates of the external camera and the second image coordinates;
step S4, arranging a calibration board on the dispensing platform;
step S5, respectively photographing all the dots on the calibration plate through the original camera and the external camera, and recording the sixth mechanical coordinate (Xmact) of the original camera during each photographingij,Ymactij) And corresponding third image coordinates (Xiact)ij,Yiactij) And a seventh mechanical coordinate (Xmbct) of the add-on cameraij,Ymbctij) And corresponding fourth image coordinates (Xidct)ij,Yibctij) Wherein, subscript i represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate; and calculating a first reference mechanical coordinate (Xmac) when the original camera is aligned with the dot by the following formula (3)ij,Ymacij) Second reference mechanical coordinates (Xmbc) when aligning with the dots of the add-on cameraij,Ymbcij);
Figure BDA0002959086340000021
In step S6, the first reference machine coordinate (Xmac) is obtainedij,Ymacij) And a second reference mechanical coordinate (Xmbc)ij,Ymbcij) Then, the first reference mechanical coordinate (Xmac) is usedij,Ymacij) And a second reference mechanical coordinate (Xmbc)ij,Ymbcij) Calculating eighth mechanical coordinates (Xmac, Ymac) and ninth mechanical coordinates (Xmbc, Ymbc) when the original camera and the add-on camera are aligned with any calibration plate coordinates (Xc, Yc) except for the dots in the calibration plate as a reference, wherein subscript i in the first and second reference mechanical coordinates represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate; when the original camera and the external camera are positioned at any mechanical coordinate (Xm, Ym) except the first reference mechanical coordinate and the second reference mechanical coordinate, the coordinate (Xcam, Ycam) of a first calibration plate aligned with the original camera and the coordinate (Xcbm, Ycbm) of a second calibration plate aligned with the external camera are calculated to obtain the transformation relation between the any mechanical coordinate of the original camera and the coordinate of the first calibration plate aligned with the calibration plate, and the external camera is positioned at the transformation relation between the any mechanical coordinate and the coordinate of the second calibration plate aligned with the calibration plate;
step S7, calculating the offset of the original camera, the external camera and the dispensing head according to the transformation relation between the original camera and the external camera in any mechanical coordinate and the first and second calibration plate coordinates of the alignment calibration plate;
step S8, calculating the offset of the external camera, the original camera and the dispensing head on the whole dispensing platform according to the offset of the original camera, the external camera and the dispensing head obtained in the step S7 and the conversion relation calculated in the step S6;
and S9, repeating the step S2, the step S3 and the step S5 to the step S8 to calculate the offset of the original camera and the external camera of the glue dispenser and all the glue dispensing heads on the whole glue dispensing platform.
Further, step S3 includes:
step S31, the original camera and the external camera move to each array position point respectively, take pictures and record of the calibration marks, traverse 9 array position points, obtain a second mechanical coordinate of the original camera and a corresponding first image coordinate, a third mechanical coordinate of the external camera and a corresponding second image coordinate, and the transformation relation of the two is expressed by the following formula (1);
Figure BDA0002959086340000031
substituting the second mechanical coordinates (Xma, Yma), the first image coordinates (Xia, Yia), the third mechanical coordinates (Xmb, Ymb), and the second image coordinates (Xib, Yib) into equation (1) can calculate values of parameters m00, m01, m02, m10, m11, m12, m20, m21, m22, m30, m31, and m32 to obtain transformation parameters in a transformation relation;
step S32, substituting the image center coordinates (Xiar, Yiar) of the original camera and the image center coordinates (Xibr, Yibr) of the external camera into the following formula (2), calculating to obtain the fourth mechanical coordinates (Xmar, Ymar) of the original camera when aligning the calibration mark and the fifth mechanical coordinates (Xmbr, Ymbr) of the external camera when aligning the calibration mark,
Figure BDA0002959086340000032
further, the eighth mechanical coordinates (Xmac, Ymac) and the ninth mechanical coordinates (Xmbc, Ymbc) when the original camera and the add-on camera are aligned with the coordinates (Xc, Yc) of any calibration plate other than the dots in the calibration plate in step S6 are specifically: obtaining the calibration plate coordinates (Xc) of four dots near the arbitrary calibration plate coordinates (Xc, Yc)ij,Ycij)、(Xcij+1,Ycij+1)、(Xci+1j,Yci+1j)、(Xci+1j+1,Yci+1j+1) (ii) a The original camera is aligned to the calibration plate coordinates (Xc) of the first dotij,Ycij) The first reference machine coordinate of time is (Xmac)ij,Ymacij) Alignment of calibration plate coordinates (Xc) of the second dotij+1,Ycij+1) The first reference machine coordinate of time is (Xmac)ij+1,Ymacij+1) Alignment of calibration plate coordinates (Xc) of third doti+1j,Yci+1j) The first reference machine coordinate of time is (Xmac)i+1j,Ymaci+1j) Alignment of calibration plate coordinates (Xc) of the fourth doti+1j+1,Yci+1j+1) The first reference machine coordinate of time is (Xmac)i+1j+1,Ymaci+1j+1) Calculating and obtaining eighth mechanical coordinates (Xmac, Ymac) of the original camera when the coordinates (Xc, Yc) of any calibration plate except the circular points in the calibration plate are aligned through the following formula (4);
Figure BDA0002959086340000041
wherein, subscript i represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate;
obtaining calibration plate coordinates (Xc) of the external camera aiming at the first round pointij,Ycij) The second reference mechanical coordinate of time is (Xmbc)ij,Ymbcij) Alignment of calibration plate coordinates (Xc) of the second dotij+1,Ycij+1) The second reference mechanical coordinate of time is (Xmbc)ij+1,Ymbcij+1) Alignment of calibration plate coordinates (Xc) of third doti+1j,Yci+1j) The second reference mechanical coordinate of time is (Xmbc)i+1j,Ymbci+1j) Alignment of calibration plate coordinates (Xc) of the fourth doti+1j+1,Yci+1j+1) The second reference mechanical coordinate of time is (Xmbc)i+1j+1,Ymbci+1j+1) Calculating a ninth mechanical coordinate (Xmbc, Ymbc) of the external camera when aiming at any calibration plate coordinate (Xc, Yc) except the dot in the calibration plate through the following formula (5);
Figure BDA0002959086340000042
Figure BDA0002959086340000051
where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Further, when the original camera and the add-on camera are calculated to be located at any mechanical coordinate (Xm, Ym) other than the first and second reference mechanical coordinates in step S6, the first calibration plate coordinate (Xcam, Ycam) aligned by the original camera and the second calibration plate coordinate (Xcbm, Ycbm) aligned by the add-on camera are specifically:
when the original camera is positioned at any mechanical coordinate (Xm, Ym), a first reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the aligned calibration plate is obtained, and the original camera is aligned with the calibration plate coordinate (Xc) of the first dot of the ith row and the jth columnij,Ycij) The first mechanical coordinate of time is (Xmac)ij,Ymacij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The first mechanical coordinate of time is (Xmac)ij+1,Ymacij+1) Alignment of the calibration plate coordinates (Xc) of the third dot in row (i + 1) and column (j)i+1j,Yci+1j) The first mechanical coordinate of time is (Xmac)i+1j,Ymaci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The first mechanical coordinate is (Xmac)i+1j+1,Ymaci+1j+1) When the original camera is located at any mechanical coordinate (Xm, Ym) except the first reference mechanical coordinate point, the first calibration plate coordinate (Xcam, Ym) of the calibration plate aimed at by the original camera is obtained through calculation according to the following formula (6);
Figure BDA0002959086340000052
wherein, subscript i represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate;
acquiring a second reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the calibration plate aligned with the external camera when the external camera is positioned at the any mechanical coordinate (Xm, Ym), and aligning the external camera to the calibration plate coordinate (Xc) of the first dot of the ith row and the jth columnij,Ycij) The second mechanical coordinate of time is (Xmbc)ij,Ymbcij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The second mechanical coordinate of time is (Xmbc)ij+1,Ymbcij+1) Align the third of the (i + 1) th row and the (j) th columnCalibration plate coordinates (Xc) of dotsi+1j,Yci+1j) The second mechanical coordinate of time is (Xmbc)i+1j,Ymbci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The second mechanical coordinate of time is (Xmbc)i+1j+1,Ymbci+1j+1) Second calibration plate coordinates (Xcbm, Ycbm) of a calibration plate at which the external camera is aligned when the external camera is at any mechanical coordinates (Xm, Ym) other than the second reference mechanical coordinates are calculated by the following formula (7);
Figure BDA0002959086340000061
where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Further, step S7 specifically includes:
step S71, according to the first mechanical coordinate (Xmnr, Ymnr) when the point rubber head points out the calibration mark in step S2, the calibration plate coordinate of four dots near the calibration plate coordinate of the calibration plate respectively aligned by the original camera and the external camera when the first mechanical coordinate is positioned, and the first reference mechanical coordinate (Xmac) corresponding to the dotsij,Ymacij)、(Xmacij+1,Ymacij+1)、(Xmaci+1j,Ymaci+1j)、(Xmaci+1j+1,Ymaci+1j+1) Second reference mechanical coordinate (Xmbc)pq,Ymbcpq)、(Xmbcpq+1,Ymbcpq+1)、(Xmbcp+1q,Ymbcp+1q)、(Xmbcp+1q+1,Ymbcp+1q+1) Wherein, subscript i represents the row number of the dots near the calibration plate coordinate of the calibration plate aligned by the original camera, subscript j represents the column number of the dots near the calibration plate coordinate of the calibration plate aligned by the original camera, subscript p represents the row number of the dots near the calibration plate coordinate of the external camera aligned to the calibration plate, subscript q represents the column number of the dots near the calibration plate coordinate of the external camera aligned to the calibration plate, and the calibration plate coordinate (Xcar, Ycar) aligned by the original camera and the calibration plate coordinate (Xcar) aligned by the external camera when the calibration mark is clicked are calculated by the following formula (8)Plate coordinates (Xcbr, Ycbr);
Figure BDA0002959086340000062
Figure BDA0002959086340000071
step S72, according to the fourth mechanical coordinate (Xmar, Ymar) when the original camera aligns the calibration mark and the first reference mechanical coordinate (Xmac) corresponding to the four dots near the calibration mark in the calibration boarduv,Ymacuv)、(Xmacuv+1,Ymacuv+1)、(Xmacu+1v,Ymacu+1v)、(Xmacu+1v+1,Ymacu+1v+1) Calculating calibration plate coordinates (Xcnr, Ycnr) of the calibration marks in the calibration plate by the following formula (9), wherein a subscript u denotes a row number of a dot near the calibration mark in the calibration plate, and a subscript v denotes a column number of a dot near the calibration mark in the calibration plate;
Figure BDA0002959086340000072
step S73, calculating the offset of the original camera, the external camera and the point gluing head through the following formula (10) according to the coordinate (Xcar, Ycar) of the calibration board aligned by the original camera when the calibration mark is clicked, the coordinate (Xcbr, Ycbr) of the calibration board aligned by the external camera and the coordinate (Xcnnr, Ycnr) of the calibration mark in the calibration board;
Figure BDA0002959086340000073
Figure BDA0002959086340000081
further, step S8 includes:
step S81, the original camera is aligned with the dots of the ith row and the jth columnWith the mechanical coordinate being (Xmac)ij,Ymacij) The calibration plate coordinate of the dot is (Xc)ij,Ycij) The second reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the external camera alignment calibration plate is (Xmbc)pq,Ymbcpq)、(Xmbcpq+1,Ymbcpq+1)、(Xmbcp+1q,Ymbcp+1q)、(Xmbcp+1q+1,Ymbcp+1q+1) The coordinates of the dot calibration plate are (Xc)pq,Ycpq)、(Xcpq+1,Ycpq+1)、(Xcp+1q,Ycp+1q)、(Xcp+1q+1,Ycp+1q+1) Wherein, subscript i represents the row number of the dots of the calibration plate, and subscript j represents the column number of the dots of the calibration plate; subscript p represents the row number of dots near the calibration plate coordinates of the external camera alignment calibration plate, and subscript q represents the column number of dots near the calibration plate coordinates of the external camera alignment calibration plate; substituting the first reference mechanical coordinate, the second reference mechanical coordinate and the corresponding calibration plate coordinate which are obtained by calculation in the step S5 into the following formula (11) to calculate to obtain the calibration plate coordinate (Xcba) of the external camera aligning calibration plateij,Ycbaij) Calibration plate coordinates (Xcna) of dispensing head alignment calibration plateij,Ycnbij);
Figure BDA0002959086340000082
Step S82, aligning the coordinate of calibration board (Xcna) with the dispensing headij,Ycnbij) As the dispensing head reference coordinates, four dispensing head reference coordinates near the arbitrary calibration plate coordinates are acquired, which are (Xcna)ij,Ycnaij),(Xcnaij+1,Ycnaij+1),(Xcnai+1j,Ycnai+1j),(Xcnai+1j+1,Ycnai+1j+1) The corresponding machine coordinate is (Xmac)ij,Ymacij),(Xmacij+1,Ymacij+1),(Xmaci+1j,Ymaci+1j),(Xmaci+1j+1,Ymaci+1j+1) The dispensing head is aligned with any calibration plate except the reference coordinates of the dispensing headThe mechanical coordinates (Xmnc, Ymnc) at the time of coordinate are calculated by the following formula (12):
Figure BDA0002959086340000083
Figure BDA0002959086340000091
further, in step S4, the effective area of the calibration board covers the working range of the dispensing platform, the diameter of the dots in the calibration board is 5mm, and the interval between the centers of two adjacent dots is 10 mm.
Further, in step S31, the original camera and the external camera move along the "hex" shaped path.
Compared with the prior art, the invention takes photos of the calibration mark and takes pictures of the dots on the calibration plate by arranging the external camera and the original camera of the dispenser together, and calculates the relationship between the offset and the dispensing position of the original camera, the external camera and the dispensing head on the whole dispensing platform through the coordinate conversion relationship among the mechanical coordinate, the image coordinate and the calibration plate coordinate, thereby reducing the influence of the guide rail precision on the dispensing precision and effectively improving the dispensing precision and the dispensing stability of the dispenser under the condition of not increasing the hardware cost.
Drawings
FIG. 1 is a flow chart of the present invention.
Fig. 2 is a schematic view of a calibration plate of the present invention.
Fig. 3 is a schematic view of the position of a dual camera of the present invention.
Fig. 4 is a detailed flowchart of step S7 according to the present invention.
Fig. 5 is a detailed flowchart of step S8 according to the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
As shown in fig. 1, the invention discloses a calibration method for offset of a camera and a dispensing head of a dispenser, comprising the following steps:
step S1, arranging an external camera moving together with the dispensing head on the dispensing head frame of the dispensing machine, wherein the lens of the external camera faces to the dispensing platform of the dispensing machine and shoots together with the original camera on the dispensing head frame; as shown in fig. 3, the external cameras are symmetrically arranged at two opposite ends of the dispensing head frame;
s2, driving a dispensing head to be calibrated to move to the center of a dispensing platform and move downwards, dispensing colored glue at the center of the dispensing platform to serve as a calibration mark, and recording a first mechanical coordinate (Xmnr, Ymnr) of the dispensing head when the dispensing head dispenses the calibration mark;
step S3, moving the external camera and the original camera on a 3 x 3 array position point respectively, photographing the calibration mark in the step S2, recording second mechanical coordinates (Xmb, Ymb) of the original camera, first image coordinates (Xib, Yib) corresponding to the second mechanical coordinates (Xmb, Ymb) of the original camera, third mechanical coordinates (Xma, Yma) of the external camera and second image coordinates (Xia, Yia) corresponding to the third mechanical coordinates respectively, and calculating to obtain a transformation relation between the second mechanical coordinates of the original camera and the first image coordinates and a transformation relation between the third mechanical coordinates of the external camera and the second image coordinates;
specifically, the method comprises the following steps:
step S31, the original camera and the external camera move to each array position point respectively, take pictures and record the calibration marks, move along a 'Chinese' character-shaped path, so that 9 array position points are traversed, a second mechanical coordinate of the original camera and a corresponding first image coordinate, a third mechanical coordinate of the external camera and a corresponding second image coordinate are obtained, and the transformation relation of the first mechanical coordinate and the second mechanical coordinate is expressed by the following formula (1);
Figure BDA0002959086340000101
the values of the parameters m00, m01, m02, m10, m11, m12, m20, m21, m22, m30, m31, m32 can be calculated by substituting the second machine coordinates (Xma, Yma), the first image coordinates (Xia, Yia), the third machine coordinates (Xmb, Ymb), and the second image coordinates (Xib, Yib) into equation (1), so as to obtain the transformation parameters in the transformation relationship.
Step S32, the image center coordinates (Xiar, Yiar) of the original camera and the image center coordinates (Xibr, Yibr) of the external camera are substituted into the following formula (2), so that the fourth mechanical coordinates (Xmar, Ymar) of the original camera when the external camera is aligned with the calibration mark and the fifth mechanical coordinates (Xmbr, Ymbr) of the external camera when the external camera is aligned with the calibration mark can be calculated,
Figure BDA0002959086340000102
Figure BDA0002959086340000111
the image center coordinates are obtained by dividing the length and width of the external camera and the original camera by 2.
In the present invention, the spacing between the array position points may be equal or unequal.
Step S4, arranging a calibration plate on the dispensing platform, enabling each edge of the calibration plate to be parallel to an X axis and a Y axis of the dispensing platform respectively, enabling the effective area of the calibration plate to cover the working range of the dispensing platform, enabling the diameter of each dot in the calibration plate to be 5mm, enabling the interval between the centers of two adjacent dots to be 10mm, and enabling the dot arrays to be distributed on the whole calibration plate; the distance between the dots is larger than the diameter of the dots, so that the two dots are not overlapped, and the number of reference points is too small when the distance is too large, which is not beneficial to improving the calibration precision. And establishing a coordinate system by using a calibration plate, and recording the coordinates of the calibration plate as (Xc, Yc).
Step S5, respectively photographing all the dots on the calibration plate through the original camera and the external camera, and recording the sixth mechanical coordinate (Xmact) of the original camera during each photographingij,Ymactij) And corresponding third image coordinates (Xiact)ij,Yiactij) And a seventh mechanical coordinate (Xmbct) of the add-on cameraij,Ymbctij) And corresponding fourth image coordinates (Xidct)ij,Yibctij) Where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Due to the fact thatWhen the camera is not completely aligned with the dots during photographing, a first reference mechanical coordinate (Xmac) of the original camera when the dots are aligned with the dots is obtained through calculation according to the following formula (3)ij,Ymacij) Second reference mechanical coordinates (Xmbc) when aligning with the dots of the add-on cameraij,Ymbcij);
Figure BDA0002959086340000112
Where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Step S6, obtaining the first reference mechanical coordinate (Xmac) of the original camera and the external camera alignment dot in step S5ij,Ymacij) And a second reference mechanical coordinate (Xmbc)ij,Ymbcij) Then, the first reference mechanical coordinate (Xmac) corresponding to the dots is usedij,Ymacij) And a second reference mechanical coordinate (Xmbc)ij,Ymbcij) Calculating eighth mechanical coordinates (Xmac, Ymac) and ninth mechanical coordinates (Xmbc, Ymbc) when the original camera and the add-on camera are aligned with any calibration plate coordinates (Xc, Yc) except for the dots in the calibration plate as a reference, wherein subscript i in the first and second reference mechanical coordinates represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate; the method comprises the steps of respectively aligning an original camera and an external camera to coordinates (Xc, Yc) of an arbitrary calibration plate except for dots in the calibration plate, and first reference mechanical coordinates and second reference mechanical coordinates corresponding to four dots near the coordinates of the arbitrary calibration plate, and calculating to obtain eighth mechanical coordinates (Xmac, Ymac) and ninth mechanical coordinates (Xmbc, Ymbc), specifically:
setting the coordinate (Xc, Yc) of the arbitrary calibration plate among the dots of the ith row, the ith +1 th row, the jth column and the jth +1 th column, then the calibration plate coordinates of four dots near the calibration plate coordinate are respectively expressed as (Xc) of the calibration plate coordinate of the dot of the ith row and the jth columnij,Ycij) The calibration plate coordinate of the ith row and the j +1 th column of dots is (Xc)ij+1,Ycij+1) The coordinate of the calibration plate of the (i + 1) th row and the (j) th column of dots is (Xc)i+1j,Yci+1j) The coordinate of the calibration board for the dots of the (i + 1) th row and the (j + 1) th column is (Xc)i+1j+1,Yci+1j+1). The original camera is aligned with the calibration plate coordinate (Xc) of the first dot of the ith row and jth columnij,Ycij) The first reference machine coordinate of time is (Xmac)ij,Ymacij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The first reference machine coordinate of time is (Xmac)ij+1,Ymacij+1) Alignment of the calibration plate coordinates (Xc) of the third dot in row (i + 1) and column (j)i+1j,Yci+1j) The first reference machine coordinate of time is (Xmac)i+1j,Ymaci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The first reference machine coordinate of time is (Xmac)i+1j+1,Ymaci+1j+1) (ii) a And (4) calculating an eighth mechanical coordinate (Xmac, Ymac) of the original camera when the coordinate (Xc, Yc) of any calibration plate except the circular point in the calibration plate is aligned with the original camera.
Figure BDA0002959086340000121
Where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Setting an external hanging camera to align with the coordinates (Xc) of the calibration plate of the first dots of the ith row and the jth columnij,Ycij) The second reference mechanical coordinate of time is (Xmbc)ij,Ymbcij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The second reference mechanical coordinate of time is (Xmbc)ij+1,Ymbcij+1) Alignment of the calibration plate coordinates (Xc) of the third dot in row (i + 1) and column (j)i+1j,Yci+1j) The second reference mechanical coordinate of time is (Xmbc)i+1j,Ymbci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The second reference mechanical coordinate of time is (Xmbc)i+1j+1,Ymbci+1j+1) Calculating to obtain the external camera alignment mark according to the following formula (5)A ninth mechanical coordinate (Xmbc, Ymbc) at which the arbitrary calibration plate coordinate (Xc, Yc) except the dot in the calibration plate is located;
Figure BDA0002959086340000131
where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Assuming that the arbitrary calibration plate coordinates (Xc, Yc) are between the dots on the 1 st, 2 nd, 1 st and 2 nd rows, columns of the calibration plate, the calibration plate coordinates of the four dots near the calibration plate coordinates are expressed as (Xc) for the dots on the 1 st, 1 st and 1 st rows11,Yc11) The dots in row 1 and column 2 are (Xc)12,Yc12) The dots in row 2 and column 1 are (Xc)21,Yc21) The dots in row 2 and column 2 are (Xc)22,Yc22). The original camera is aligned with the dots (Xc) of the 1 st row and the 1 st column11,Yc11) The first reference machine coordinate of time is (Xmac)11,Ymac11) Aligned with the dots of row 1 and column 2 (Xc)12,Yc12) The first reference machine coordinate of time is (Xmac)12,Ymac12) Aligned with the dots (Xc) of row 2 and column 121,Yc21) The first reference machine coordinate of time is (Xmac)21,Ymac21) Aligned with the 2 nd row and column dots (Xc)22,Yc22) The first reference machine coordinate of time is (Xmac)22,Ymac22). Then the eighth mechanical coordinate (Xmac, Ymac) when the original camera is aligned with the calibration plate coordinate (Xc, Yc) other than the dots in the calibration plate can be calculated by substituting equation (4):
Figure BDA0002959086340000132
assume that the add-on camera is aimed at the row 1, column 1 dots (Xc)11,Yc11) The second reference mechanical coordinate of time is (Xmbc)11,Ymbc11) Aligned with the dots of row 1 and column 2 (Xc)12,Yc12) The second reference mechanical coordinate of time is (Xmbc)12,Ymbc12) Aligned with the dots (Xc) of row 2 and column 121,Yc21) The second reference mechanical coordinate of time is (Xmbc)21,Ymbc21) Aligned with the 2 nd row and column dots (Xc)22,Yc22) The second reference mechanical coordinate of time is (Xmbc)22,Ymbc22). The ninth mechanical coordinate (Xmbc, Ymbc) at which the external camera is directed to the arbitrary calibration plate coordinate (Xc, Yc) in addition to the dots in the calibration plate can be calculated by the following formula:
Figure BDA0002959086340000141
step S6 further includes calculating the first reference machine coordinate (Xmac)ij,Ymacij) And a second reference mechanical coordinate (Xmbc)ij,Ymbcij) When the original camera and the external camera are positioned at any mechanical coordinate (Xm, Ym) except the first and second reference mechanical coordinates, calculating a first calibration plate coordinate (Xcam, Ycam) aligned by the original camera and a second calibration plate coordinate (Xcbm, Ycbm) aligned by the external camera to obtain a transformation relation between the any mechanical coordinate of the original camera and the first calibration plate coordinate of the alignment calibration plate, and the external camera is positioned at the transformation relation between the any mechanical coordinate and the second calibration plate coordinate of the alignment calibration plate;
specifically, when the original camera is at the arbitrary mechanical coordinate (Xm, Ym), the first reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the aligned calibration plate is obtained, and when the original camera is at the arbitrary mechanical coordinate (Xm, Ym), the calibration plate coordinate (Xcam, Ycam) of the aligned calibration plate is between the ith row, the ith +1 th row, the jth column and the jth +1 th column, the calibration plate coordinates of the four dots are respectively represented as (Xc) in the ith row and the jth columnij,Ycij) The ith row and the j +1 th column have dots of (Xc)ij+1,Ycij+1) The dots in the (i + 1) th row and the (j) th column are (Xc)i+1j,Yci+1j) The dots in the (i + 1) th row and the (j + 1) th column are (Xc)i+1j+1,Yci+1j+1). The original camera is aligned with the calibration plate coordinate (Xc) of the first dot of the ith row and jth columnij,Ycij) The first mechanical coordinate of time is (Xmac)ij,Ymacij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The first mechanical coordinate of time is (Xmac)ij+1,Ymacij+1) Alignment of the calibration plate coordinates (Xc) of the third dot in row (i + 1) and column (j)i+1j,Yci+1j) The first mechanical coordinate of time is (Xmac)i+1j,Ymaci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The first mechanical coordinate is (Xmac)i+1j+1,Ymaci+1j+1) When the original camera is located at any mechanical coordinate (Xm, Ym) except the first reference mechanical coordinate point, the first calibration plate coordinate (Xcam, Ym) of the calibration plate aimed at by the original camera is obtained through calculation according to the following formula (6);
Figure BDA0002959086340000151
where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Acquiring a second reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the calibration plate aligned with the external camera when the external camera is positioned at the any mechanical coordinate (Xm, Ym), and setting the calibration plate coordinate (Xc) of the first dot aligned with the ith row and the jth column of the external cameraij,Ycij) The second mechanical coordinate of time is (Xmbc)ij,Ymbcij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The second mechanical coordinate of time is (Xmbc)ij+1,Ymbcij+1) Alignment of the calibration plate coordinates (Xc) of the third dot in row (i + 1) and column (j)i+1j,Yci+1j) The second mechanical coordinate of time is (Xmbc)i+1j,Ymbci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The second mechanical coordinate of time is (Xmbc)i+1j+1,Ymbci+1j+1) And calculating the second mechanical coordinate (Xm, Ym) of the calibration board aligned with the external camera when the external camera is at any mechanical coordinate (Xm, Ym) except the second reference mechanical coordinate by the following formula (7)Two calibration plate coordinates (Xcbm, Ycbm);
Figure BDA0002959086340000152
where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
Assuming that the original camera is at the arbitrary mechanical coordinates (Xm, Ym), the calibration plate coordinates (Xcam, Ycam) of the original camera alignment calibration plate are between the dots of the 3 rd row, the 4 th row, the 3 rd column and the 4 th column, the calibration plate coordinates of the four dots are respectively expressed as (Xc) for the dots of the 3 rd row and the 3 rd column in the 3 rd row33,Yc33) The dots in row 3 and column 4 are (Xc)34,Yc34) The dots in row 4 and column 3 are (Xc)43,Yc43) The dots in row 4 and column 4 are (Xc)44,Yc44). The original camera is aligned with the 3 rd row and 3 rd column dots (Xc)33,Yc33) The first mechanical coordinate of time is (Xmac)33,Ymac33) Aligned with the dots (Xc) in row 3 and column 434,Yc34) The first mechanical coordinate of time is (Xmac)34,Ymac34) Aligned with the 4 th row and 3 rd column dots (Xc)43,Yc43) The first mechanical coordinate of time is (Xmac)43,Ymac43) Align with the 4 th row and 4 th column dots (Xc)44,Yc44) The first mechanical coordinate of time is (Xmac)44,Ymac44). Then the first calibration plate coordinates (Xcam, Ycam) of the original camera aligned to the calibration plate when the original camera is at the arbitrary mechanical coordinates (Xm, Ym) can be calculated by the following formula;
Figure BDA0002959086340000161
similarly, assuming that the external camera is at any mechanical coordinate (Xm, Ym), the second calibration board coordinate (Xcbm, Ycbm) of the external camera aligned with the calibration board is between the dots in the 3 rd row, the 4 th row, the 8 th column and the 9 th column, the calibration board coordinates of the four nearby dots are respectively expressed as (Xc) of the dot in the 3 rd row and the 8 th column38,Yc38) Of 1 atThe calibration plate coordinates of the dots in row 3 and column 9 are (Xc)39,Yc39) The calibration plate coordinates of the dots of row 4 and column 8 are (Xc)48,Yc48) The calibration plate coordinates of the dots of row 4 and column 9 are (Xc)49,Yc49). The coordinate of the calibration plate of the external camera aiming at the dots of the 3 rd row and the 8 th column is (Xc)38,Yc38) The second reference mechanical coordinate of time is (Xmbc)38,Ymbc38) Alignment of calibration plate coordinates (Xc) for row 3 and column 9 dots39,Yc39) Second reference mechanical coordinates (Xmbc)39,Ymbc39) Alignment of calibration plate coordinates (Xc) for the dots of row 4 and column 848,Yc48) The second reference mechanical coordinate of time is (Xmbc)48,Ymbc48) Alignment of calibration plate coordinates (Xc) for the dots of row 4 and column 949,Yc49) The second reference mechanical coordinate of time is (Xmbc)49,Ymbc49). Then the second calibration plate coordinates (Xcbm, Ycbm) of the external camera directed to the calibration plate when the external camera is at the mechanical coordinates (Xm, Ym) can be calculated by the following formula;
Figure BDA0002959086340000162
Figure BDA0002959086340000171
and respectively obtaining the transformation relation between the original camera at any mechanical coordinate and the first calibration plate coordinate of the alignment calibration plate through the calculation, and the transformation relation between the external camera at any mechanical coordinate and the second calibration plate coordinate of the alignment calibration plate.
S7, calculating the offset of the original camera, the plug-in camera and the dispensing head according to the transformation relation between the original camera and the plug-in camera in any mechanical coordinate and the first and second calibration plate coordinates of the alignment calibration plate obtained in the step S6;
in particular, as shown in figure 4,
step S71, according to the point of the glue head in the step S2, the second point of the mark is markedA mechanical coordinate (Xmnr, Ymnr), calibration board coordinates of four dots near the calibration board coordinates of the calibration board respectively aligned by the original camera and the external camera when the original camera and the external camera are at the first mechanical coordinate, and a first reference mechanical coordinate (Xmac) corresponding to the dotsij,Ymacij)、(Xmacij+1,Ymacij+1)、(Xmaci+1j,Ymaci+1j)、(Xmaci+1j+1,Ymaci+1j+1) Second reference mechanical coordinate (Xmbc)pq,Ymbcpq)、(Xmbcpq+1,Ymbcpq+1)、(Xmbcp+1q,Ymbcp+1q)、(Xmbcp+1q+1,Ymbcp+1q+1) The subscript i represents the row number of dots near the coordinate of the calibration plate aligned by the original camera, the subscript j represents the column number of dots near the coordinate of the calibration plate aligned by the original camera, the subscript p represents the row number of dots near the coordinate of the calibration plate aligned by the external camera, the subscript q represents the column number of dots near the coordinate of the calibration plate aligned by the external camera, and the calibration plate coordinates (Xcar, Ycar) aligned by the original camera and the calibration plate coordinates (Xcbr, Ycbr) aligned by the external camera when the calibration mark is clicked are obtained through calculation according to the following formula (8);
Figure BDA0002959086340000172
Figure BDA0002959086340000181
the subscript i represents the row number of dots near the calibration plate coordinate of the calibration plate aligned with the original camera, the subscript j represents the column number of dots near the calibration plate coordinate of the calibration plate aligned with the original camera, the subscript p represents the row number of dots near the calibration plate coordinate of the external camera aligned with the calibration plate, and the subscript q represents the column number of dots near the calibration plate coordinate of the external camera aligned with the calibration plate.
Assuming that the calibration plate coordinates of the original camera alignment calibration plate are among the dots in the 3 rd row, the 4 th row, the 3 rd column and the 4 th column, and the calibration plate coordinates of the external camera alignment calibration plate are among the dots in the 3 rd row, the 4 th row, the 8 th column and the 9 th column, the first mechanical coordinate (Xmnr, Ymnr) is substituted into the following formula:
Figure BDA0002959086340000182
step S72, according to the fourth mechanical coordinate (Xmar, Ymar) when the original camera aligns the calibration mark and the first reference mechanical coordinate (Xmac) corresponding to the four dots near the calibration mark in the calibration boarduv,Ymacuv)、(Xmacuv+1,Ymacuv+1)、(Xmacu+1v,Ymacu+1v)、(Xmacu+1v+1,Ymacu+1v+1) Calculating calibration plate coordinates (Xcnr, Ycnr) of the calibration marks in the calibration plate by the following formula (9), wherein a subscript u denotes a row number of a dot near the calibration mark in the calibration plate, and a subscript v denotes a column number of a dot near the calibration mark in the calibration plate;
Figure BDA0002959086340000191
where subscript u represents the row number of the nearby dots of the calibration mark in the calibration plate and subscript v represents the column number of the nearby dots of the calibration mark in the calibration plate.
Assuming that the calibration mark is located between the dots in the calibration board in the 3 rd row, the 4 th row, the 5 th column and the 6 th column, the first reference mechanical coordinates corresponding to the four dots are respectively expressed as (Xmac)35,Ymac35)、(Xmac36,Ymac36)、(Xmac45,Ymac45)、(Xmac46,Ymac46) The calculation is performed according to the above equation (9):
Figure BDA0002959086340000192
step S73, calculating the offset of the original camera, the external camera and the point gluing head through the following formula (10) according to the coordinate (Xcar, Ycar) of the calibration board aligned by the original camera when the calibration mark is clicked, the coordinate (Xcbr, Ycbr) of the calibration board aligned by the external camera and the coordinate (Xcnnr, Ycnr) of the calibration mark in the calibration board;
Figure BDA0002959086340000193
Figure BDA0002959086340000201
the coordinates (Xcar, Ycar) of a calibration board aligned with the original camera, the coordinates (Xcbr, Ycbr) of a calibration board aligned with the add-on camera and the coordinates (Xcnr, Ycnr) of the calibration board marked in the calibration board are substituted into a formula (10) to calculate parameters Dn and An, Dn is a distance, and An is An angle.
Step S8, calculating the offset of the external camera, the original camera and the dispensing head on the whole dispensing platform according to the offset of the original camera, the external camera and the dispensing head obtained in the step S7 and the conversion relation calculated in the step S6; comprising (as shown in figure 5):
step S81, let the original camera align with the ith row and jth column of dots with the mechanical coordinate (Xmac)ij,Ymacij) The calibration plate coordinate of the dot is (Xc)ij,Ycij) At this time, the coordinate of the calibration board aligned by the external camera is between the p-th, p + 1-th row, the q-th and q + 1-th columns of dots, and the second reference mechanical coordinate corresponding to four dots near the coordinate of the calibration board aligned by the external camera is (Xmbc)pq,Ymbcpq)、(Xmbcpq+1,Ymbcpq+1)、(Xmbcp+1q,Ymbcp+1q)、(Xmbcp+1q+1,Ymbcp+1q+1) The coordinates of the dot calibration plate are (Xc)pq,Ycpq)、(Xcpq+1,Ycpq+1)、(Xcp+1q,Ycp+1q)、(Xcp+1q+1,Ycp+1q+1) Wherein, subscript i represents the row number of the dots of the calibration plate, and subscript j represents the column number of the dots of the calibration plate; subscript p denotes a row number of dots near the calibration plate coordinates of the exterior camera alignment calibration plate, and subscript q denotes a column number of dots near the calibration plate coordinates of the exterior camera alignment calibration plate(ii) a Substituting the first reference mechanical coordinate, the second reference mechanical coordinate and the corresponding calibration plate coordinate obtained in the step S5 into the following formula (11) to obtain the calibration plate coordinate (Xcba) of the external camera aligned to the calibration plate at the momentij,Ycbaij) Calibration plate coordinates (Xcna) of dispensing head alignment calibration plateij,Ycnbij);
Figure BDA0002959086340000202
Figure BDA0002959086340000211
Wherein, subscript i represents the row number of the dots of the calibration plate, and subscript j represents the column number of the dots of the calibration plate; subscript p denotes a row number of dots near the calibration plate coordinates of the exterior camera alignment calibration plate, and subscript q denotes a column number of dots near the calibration plate coordinates of the exterior camera alignment calibration plate.
Step S82, calibrating the coordinates of the panel for dispensing head alignment (Xcna)ij,Ycnbij) Any calibration plate coordinate (Xc, Yc) of other calibration plates, and calibration plate coordinate (Xcna) of calibration plate aligned with dispensing headij,Ycnbij) As the dispensing head reference coordinates, four dispensing head reference coordinates near the arbitrary calibration plate coordinates are set between the ith row, the (i + 1) th row, the jth column and the (j + 1) th column, and the four dispensing head reference coordinates are respectively recorded as (Xcna)ij,Ycnaij),(Xcnaij+1,Ycnaij+1),(Xcnai+1j,Ycnai+1j),(Xcnai+1j+1,Ycnai+1j+1) The corresponding machine coordinate is (Xmac)ij,Ymacij),(Xmacij+1,Ymacij+1),(Xmaci+1j,Ymaci+1j),(Xmaci+1j+1,Ymaci+1j+1) Then, the mechanical coordinates (Xmnc, Ymnc) at which the dispensing head aligns with the coordinates of any calibration plate other than the dispensing head reference coordinates in the calibration plate are calculated by the following formula (12):
Figure BDA0002959086340000212
and S9, repeating the step S2, the step S3 and the step S5 to the step S8 to calculate the offset of the original camera and the external camera of the glue dispenser and all the glue dispensing heads on the whole glue dispensing platform.
After the offset between the dispensing head and the original camera on the whole dispensing platform is obtained, during dispensing, the original camera is used for photographing the workpiece, and the current dispensing head is moved to the position of the workpiece for dispensing according to the offset between the current dispensing head and the original camera.
During dispensing, the original camera shoots the position of the workpiece to obtain the mechanical coordinates (Xmaw, Ymaw) of the workpiece when the original camera is aligned with the workpiece, the calibration plate coordinates (Xcwm, Ycwm) of the workpiece under the calibration plate coordinate system are calculated according to the formula (6) (Xm, Ym in the replacement formula (6)), and the mechanical coordinates (Xmnw, Ymnw) (namely Xmnc, Ymnc) of the dispensing head during dispensing are calculated from the calibration plate coordinates (Xcwm, Ycwm) of the dispensing head under the calibration plate coordinate system according to the formula (12) in the step S8 (XC, YC in the replacement formula (12)).
Compared with the prior art, the invention reduces the influence of the guide rail precision on the dispensing precision and effectively improves the dispensing precision and the dispensing stability of the dispenser by the technology of calibrating the offset between the camera and the dispensing head by the double cameras under the condition of not increasing the hardware cost. The processing precision is improved, the general method assumes that the position relation of the camera and the dispensing head is a fixed value, which is not consistent with the working condition of an actual machine, the method of the invention is a calculation method for refining the position relation of the camera and the dispensing head, and different camera dispensing head position relations are used for calculation at different dispensing positions, thus avoiding the influence of the precision error and the installation error of a mechanical device on the dispensing precision.

Claims (8)

1. A calibration method for offset of a camera and a dispensing head of a dispenser is characterized by comprising the following steps:
step S1, arranging an external camera moving together with the dispensing head on a dispensing head frame of the dispensing machine;
s2, driving a dispensing head to be calibrated to move to the center of a dispensing platform and move downwards, dispensing colored glue at the center of the dispensing platform to serve as a calibration mark, and recording a first mechanical coordinate (Xmnr, Ymnr) of the dispensing head when the dispensing head dispenses the calibration mark;
step S3, moving the external camera and the original camera on a 3 x 3 array position point respectively, photographing the calibration mark in the step S2, recording second mechanical coordinates (Xmb, Ymb) of the original camera, first image coordinates (Xib, Yib) corresponding to the second mechanical coordinates (Xmb, Ymb) of the original camera, third mechanical coordinates (Xma, Yma) of the external camera and second image coordinates (Xia, Yia) corresponding to the third mechanical coordinates respectively, and calculating a transformation relation between the second mechanical coordinates of the original camera and the first image coordinates and a transformation relation between the third mechanical coordinates of the external camera and the second image coordinates;
step S4, arranging a calibration board on the dispensing platform;
step S5, respectively photographing all the dots on the calibration plate through the original camera and the external camera, and recording the sixth mechanical coordinate (Xmact) of the original camera during each photographingij,Ymactij) And corresponding third image coordinates (Xiact)ij,Yiactij) And a seventh mechanical coordinate (Xmbct) of the add-on cameraij,Ymbctij) And corresponding fourth image coordinates (Xidct)ij,Yibctij) Wherein, subscript i represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate; and calculating a first reference mechanical coordinate (Xmac) when the original camera is aligned with the dot by the following formula (3)ij,Ymacij) Second reference mechanical coordinates (Xmbc) when aligning with the dots of the add-on cameraij,Ymbcij);
Figure FDA0002959086330000011
In step S6, the first reference machine coordinate (Xmac) is obtainedij,Ymacij) And a second reference mechanical coordinate (Xmbc)ij,Ymbcij) Then, the first reference mechanical coordinate (Xmac) is usedij,Ymacij) Andsecond reference mechanical coordinate (Xmbc)ij,Ymbcij) Calculating eighth mechanical coordinates (Xmac, Ymac) and ninth mechanical coordinates (Xmbc, Ymbc) when the original camera and the add-on camera are aligned with any calibration plate coordinates (Xc, Yc) except for the dots in the calibration plate as a reference, wherein subscript i in the first and second reference mechanical coordinates represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate; when the original camera and the external camera are positioned at any mechanical coordinate (Xm, Ym) except the first reference mechanical coordinate and the second reference mechanical coordinate, the coordinate (Xcam, Ycam) of a first calibration plate aligned with the original camera and the coordinate (Xcbm, Ycbm) of a second calibration plate aligned with the external camera are calculated to obtain the transformation relation between the any mechanical coordinate of the original camera and the coordinate of the first calibration plate aligned with the calibration plate, and the external camera is positioned at the transformation relation between the any mechanical coordinate and the coordinate of the second calibration plate aligned with the calibration plate;
step S7, calculating the offset of the original camera, the external camera and the dispensing head according to the transformation relation between the original camera and the external camera in any mechanical coordinate and the first and second calibration plate coordinates of the alignment calibration plate;
step S8, calculating the offset of the external camera, the original camera and the dispensing head on the whole dispensing platform according to the offset of the original camera, the external camera and the dispensing head obtained in the step S7 and the conversion relation calculated in the step S6;
and S9, repeating the step S2, the step S3 and the step S5 to the step S8 to calculate the offset of the original camera and the external camera of the glue dispenser and all the glue dispensing heads on the whole glue dispensing platform.
2. The method for calibrating offset of a camera and a dispensing head of a dispenser according to claim 1, characterized in that: step S3 includes:
step S31, the original camera and the external camera move to each array position point respectively, take pictures and record of the calibration marks, traverse 9 array position points, obtain a second mechanical coordinate of the original camera and a corresponding first image coordinate, a third mechanical coordinate of the external camera and a corresponding second image coordinate, and the transformation relation of the two is expressed by the following formula (1);
Figure FDA0002959086330000021
substituting the second mechanical coordinates (Xma, Yma), the first image coordinates (Xia, Yia), the third mechanical coordinates (Xmb, Ymb), and the second image coordinates (Xib, Yib) into equation (1) can calculate values of parameters m00, m01, m02, m10, m11, m12, m20, m21, m22, m30, m31, and m32 to obtain transformation parameters in a transformation relation;
step S32, substituting the image center coordinates (Xiar, Yiar) of the original camera and the image center coordinates (Xibr, Yibr) of the external camera into the following formula (2), calculating to obtain the fourth mechanical coordinates (Xmar, Ymar) of the original camera when aligning the calibration mark and the fifth mechanical coordinates (Xmbr, Ymbr) of the external camera when aligning the calibration mark,
Figure FDA0002959086330000031
3. the method for calibrating offset of a camera and a dispensing head of a dispenser according to claim 1, characterized in that: in step S6, the eighth mechanical coordinate (Xmac, Ymac) and the ninth mechanical coordinate (Xmbc, Ymbc) when the original camera and the add-on camera are aligned with any calibration plate coordinate (Xc, Yc) other than the circular dots in the calibration plate are specifically calculated as follows: obtaining the calibration plate coordinates (Xc) of four dots near the arbitrary calibration plate coordinates (Xc, Yc)ij,Ycij)、(Xcij+1,Ycij+1)、(Xci+1j,Yci+1j)、(Xci+1j+1,Yci+1j+1) (ii) a The original camera is aligned to the calibration plate coordinates (Xc) of the first dotij,Ycij) The first reference machine coordinate of time is (Xmac)ij,Ymacij) Alignment of calibration plate coordinates (Xc) of the second dotij+1,Ycij+1) The first reference machine coordinate of time is (Xmac)ij+1,Ymacij+1) Alignment of calibration plate coordinates (Xc) of third doti+1j,Yci+1j) First reference machine of timeThe mechanical coordinate is (Xmac)i+1j,Ymaci+1j) Alignment of calibration plate coordinates (Xc) of the fourth doti+1j+1,Yci+1j+1) The first reference machine coordinate of time is (Xmac)i+1j+1,Ymaci+1j+1) Calculating and obtaining eighth mechanical coordinates (Xmac, Ymac) of the original camera when the coordinates (Xc, Yc) of any calibration plate except the circular points in the calibration plate are aligned through the following formula (4);
Figure FDA0002959086330000032
wherein, subscript i represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate;
obtaining calibration plate coordinates (Xc) of the external camera aiming at the first round pointij,Ycij) The second reference mechanical coordinate of time is (Xmbc)ij,Ymbcij) Alignment of calibration plate coordinates (Xc) of the second dotij+1,Ycij+1) The second reference mechanical coordinate of time is (Xmbc)ij+1,Ymbcij+1) Alignment of calibration plate coordinates (Xc) of third doti+1j,Yci+1j) The second reference mechanical coordinate of time is (Xmbc)i+1j,Ymbci+1j) Alignment of calibration plate coordinates (Xc) of the fourth doti+1j+1,Yci+1j+1) The second reference mechanical coordinate of time is (Xmbc)i+1j+1,Ymbci+1j+1) Calculating a ninth mechanical coordinate (Xmbc, Ymbc) of the external camera when aiming at any calibration plate coordinate (Xc, Yc) except the dot in the calibration plate through the following formula (5);
Figure FDA0002959086330000041
where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
4. The method for calibrating offset of a camera and a dispensing head of a dispenser according to claim 1, characterized in that: when the original camera and the add-on camera are in any mechanical coordinates (Xm, Ym) except the first and second reference mechanical coordinates in step S6, the first calibration plate coordinates (Xcam, Ycam) aligned by the original camera and the second calibration plate coordinates (Xcbm, Ycbm) aligned by the add-on camera are specifically:
when the original camera is positioned at any mechanical coordinate (Xm, Ym), a first reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the aligned calibration plate is obtained, and the original camera is aligned with the calibration plate coordinate (Xc) of the first dot of the ith row and the jth columnij,Ycij) The first mechanical coordinate of time is (Xmac)ij,Ymacij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The first mechanical coordinate of time is (Xmac)ij+1,Ymacij+1) Alignment of the calibration plate coordinates (Xc) of the third dot in row (i + 1) and column (j)i+1j,Yci+1j) The first mechanical coordinate of time is (Xmac)i+1j,Ymaci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The first mechanical coordinate is (Xmac)i+1j+1,Ymaci+1j+1) When the original camera is located at any mechanical coordinate (Xm, Ym) except the first reference mechanical coordinate point, the first calibration plate coordinate (Xcam, Ym) of the calibration plate aimed at by the original camera is obtained through calculation according to the following formula (6);
Figure FDA0002959086330000042
Figure FDA0002959086330000051
wherein, subscript i represents the row number of the dots in the calibration plate, and subscript j represents the column number of the dots in the calibration plate;
acquiring a second reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the calibration plate aligned when the external camera is positioned at the any mechanical coordinate (Xm, Ym), wherein the external camera is aligned to the first dot of the ith row and the jth columnCalibration plate coordinates (Xc)ij,Ycij) The second mechanical coordinate of time is (Xmbc)ij,Ymbcij) Alignment of the calibration coordinates (Xc) of the second dot in the ith row and the j +1 th columnij+1,Ycij+1) The second mechanical coordinate of time is (Xmbc)ij+1,Ymbcij+1) Alignment of the calibration plate coordinates (Xc) of the third dot in row (i + 1) and column (j)i+1j,Yci+1j) The second mechanical coordinate of time is (Xmbc)i+1j,Ymbci+1j) Alignment of calibration plate coordinates (Xc) of the fourth dot of row (i + 1) and column (j + 1)i+1j+1,Yci+1j+1) The second mechanical coordinate of time is (Xmbc)i+1j+1,Ymbci+1j+1) Second calibration plate coordinates (Xcbm, Ycbm) of a calibration plate at which the external camera is aligned when the external camera is at any mechanical coordinates (Xm, Ym) other than the second reference mechanical coordinates are calculated by the following formula (7);
Figure FDA0002959086330000052
where subscript i represents the row number of the dots in the calibration plate and subscript j represents the column number of the dots in the calibration plate.
5. The method for calibrating offset of a camera and a dispensing head of a dispenser according to claim 1, characterized in that: step S7 specifically includes:
step S71, according to the first mechanical coordinate (Xmnr, Ymnr) when the point rubber head points out the calibration mark in step S2, the calibration plate coordinate of four dots near the calibration plate coordinate of the calibration plate respectively aligned by the original camera and the external camera when the first mechanical coordinate is positioned, and the first reference mechanical coordinate (Xmac) corresponding to the dotsij,Ymacij)、(Xmacij+1,Ymacij+1)、(Xmaci+1j,Ymaci+1j)、(Xmaci+1j+1,Ymaci+1j+1) Second reference mechanical coordinate (Xmbc)pq,Ymbcpq)、(Xmbcpq+1,Ymbcpq+1)、(Xmbcp+1q,Ymbcp+1q)、(Xmbcp+1q+1,Ymbcp+1q+1) Wherein, in the step (A),subscript i represents the row number of dots near the calibration plate coordinate of the calibration plate aligned by the original camera, subscript j represents the column number of dots near the calibration plate coordinate of the calibration plate aligned by the original camera, subscript p represents the row number of dots near the calibration plate coordinate of the external camera aligned by the calibration plate, subscript q represents the column number of dots near the calibration plate coordinate of the external camera aligned by the calibration plate, and the calibration plate coordinate (Xcar, Ycar) aligned by the original camera and the calibration plate coordinate (Xcbr, Ycbr) aligned by the external camera when the calibration mark is clicked are obtained through calculation according to the following formula (8);
Figure FDA0002959086330000061
step S72, according to the fourth mechanical coordinate (Xmar, Ymar) when the original camera aligns the calibration mark and the first reference mechanical coordinate (Xmac) corresponding to the four dots near the calibration mark in the calibration boarduv,Ymacuv)、(Xmacuv+1,Ymacuv+1)、(Xmacu+1v,Ymacu+1v)、(Xmacu+1v+1,Ymacu+1v+1) Calculating calibration plate coordinates (Xcnr, Ycnr) of the calibration marks in the calibration plate by the following formula (9), wherein a subscript u denotes a row number of a dot near the calibration mark in the calibration plate, and a subscript v denotes a column number of a dot near the calibration mark in the calibration plate;
Figure FDA0002959086330000062
step S73, calculating the offset of the original camera, the external camera and the point gluing head through the following formula (10) according to the coordinate (Xcar, Ycar) of the calibration board aligned by the original camera when the calibration mark is clicked, the coordinate (Xcbr, Ycbr) of the calibration board aligned by the external camera and the coordinate (Xcnnr, Ycnr) of the calibration mark in the calibration board;
Figure FDA0002959086330000071
6. the method for calibrating offset of a camera and a dispensing head of a dispenser according to claim 1, characterized in that: step S8 includes:
step S81, the mechanical coordinate when the original camera is aligned with the dot on the ith row and the jth column is (Xmac)ij,Ymacij) The calibration plate coordinate of the dot is (Xc)ij,Ycij) The second reference mechanical coordinate corresponding to four dots near the calibration plate coordinate of the external camera alignment calibration plate is (Xmbc)pq,Ymbcpq)、(Xmbcpq+1,Ymbcpq+1)、(Xmbcp+1q,Ymbcp+1q)、(Xmbcp+1q+1,Ymbcp+1q+1) The coordinates of the dot calibration plate are (Xc)pq,Ycpq)、(Xcpq+1,Ycpq+1)、(Xcp+1q,Ycp+1q)、(Xcp+1q+1,Ycp+1q+1) Wherein, subscript i represents the row number of the dots of the calibration plate, and subscript j represents the column number of the dots of the calibration plate; subscript p represents the row number of dots near the calibration plate coordinates of the external camera alignment calibration plate, and subscript q represents the column number of dots near the calibration plate coordinates of the external camera alignment calibration plate; substituting the first reference mechanical coordinate, the second reference mechanical coordinate and the corresponding calibration plate coordinate which are obtained by calculation in the step S5 into the following formula (11) to calculate to obtain the calibration plate coordinate (Xcba) of the external camera aligning calibration plateij,Ycbaij) Calibration plate coordinates (Xcna) of dispensing head alignment calibration plateij,Ycnbij);
Figure FDA0002959086330000072
Figure FDA0002959086330000081
Step S82, aligning the coordinate of calibration board (Xcna) with the dispensing headij,Ycnbij) As the reference coordinate of the dispensing head, four coordinates near the coordinate of the arbitrary calibration plate are obtainedThe reference coordinates of the dispensing head are respectively (Xcna)ij,Ycnaij),(Xcnaij+1,Ycnaij+1),(Xcnai+1j,Ycnai+1j),(Xcnai+1j+1,Ycnai+1j+1) The corresponding machine coordinate is (Xmac)ij,Ymacij),(Xmacij+1,Ymacij+1),(Xmaci+1j,Ymaci+1j),(Xmaci+1j+1,Ymaci+1j+1) The mechanical coordinates (Xmnc, Ymnc) when the dispensing head is aligned with the coordinates of any calibration plate other than the dispensing head reference coordinates in the calibration plate are calculated by the following formula (12):
Figure FDA0002959086330000082
7. the method for calibrating offset of a camera and a dispensing head of a dispenser according to claim 1, characterized in that: in step S4, the effective area of the calibration board covers the working range of the dispensing platform, the diameter of the dots in the calibration board is 5mm, and the interval between the centers of two adjacent dots is 10 mm.
8. The method for calibrating offset of a camera and a dispensing head of a dispenser according to claim 2, characterized in that: in step S31, the original camera and the add-on camera move along the ziji path.
CN202110232574.1A 2021-03-03 2021-03-03 Offset calibration method between camera and dispensing head of dispensing machine Active CN112950722B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110232574.1A CN112950722B (en) 2021-03-03 2021-03-03 Offset calibration method between camera and dispensing head of dispensing machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110232574.1A CN112950722B (en) 2021-03-03 2021-03-03 Offset calibration method between camera and dispensing head of dispensing machine

Publications (2)

Publication Number Publication Date
CN112950722A true CN112950722A (en) 2021-06-11
CN112950722B CN112950722B (en) 2022-10-04

Family

ID=76247282

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110232574.1A Active CN112950722B (en) 2021-03-03 2021-03-03 Offset calibration method between camera and dispensing head of dispensing machine

Country Status (1)

Country Link
CN (1) CN112950722B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115930784A (en) * 2023-01-09 2023-04-07 广州市易鸿智能装备有限公司 Point inspection method of visual inspection system
CN116001438A (en) * 2023-02-20 2023-04-25 常州铭赛机器人科技股份有限公司 Visual calibration device based on movable seal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005065844A1 (en) * 2003-12-23 2005-07-21 Quiss Gmbh Method for automatically applying and controlling a structure applicable on a substrate and device for carrying out said method
US20190096080A1 (en) * 2017-08-25 2019-03-28 Maker Trading Pte Ltd Machine vision system and method for identifying locations of target elements
CN109550649A (en) * 2017-09-25 2019-04-02 深圳市腾盛工业设备有限公司 A kind of dispensing localization method and device based on machine vision
CN111687002A (en) * 2020-06-29 2020-09-22 常熟品智自动化科技有限公司 Point gum machine needle alignment calibration control method based on machine vision

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005065844A1 (en) * 2003-12-23 2005-07-21 Quiss Gmbh Method for automatically applying and controlling a structure applicable on a substrate and device for carrying out said method
US20190096080A1 (en) * 2017-08-25 2019-03-28 Maker Trading Pte Ltd Machine vision system and method for identifying locations of target elements
CN109550649A (en) * 2017-09-25 2019-04-02 深圳市腾盛工业设备有限公司 A kind of dispensing localization method and device based on machine vision
CN111687002A (en) * 2020-06-29 2020-09-22 常熟品智自动化科技有限公司 Point gum machine needle alignment calibration control method based on machine vision

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
NIANFENG WANG等: "A Vision Location System Design of Glue Dispensing Robot", 《8TH INTERNATIONAL CONFERENCE ON INTELLIGENT ROBOTICS AND APPLICATIONS(ICIRA)》 *
ZHIJIE DONG等: "A scheme of transmission system in micro robotics based on combined information data", 《2016 INTERNATIONAL SYMPOSIUM ON ADVANCES IN ELECTRICAL, ELECTRONICS AND COMPUTER ENGINEERING (ISAEECE 2016)》 *
刘币币: "基于机器视觉定位的自动点胶控制系统的研究与开发", 《中国优秀硕士学位论文全文数据库(信息科技辑)》 *
邸伟峰等: "基于机器视觉的PCB板自动贴装系统设计", 《自动化与仪表》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115930784A (en) * 2023-01-09 2023-04-07 广州市易鸿智能装备有限公司 Point inspection method of visual inspection system
CN115930784B (en) * 2023-01-09 2023-08-25 广州市易鸿智能装备有限公司 Point inspection method of visual inspection system
CN116001438A (en) * 2023-02-20 2023-04-25 常州铭赛机器人科技股份有限公司 Visual calibration device based on movable seal
CN116001438B (en) * 2023-02-20 2023-06-16 常州铭赛机器人科技股份有限公司 Visual calibration device based on movable seal

Also Published As

Publication number Publication date
CN112950722B (en) 2022-10-04

Similar Documents

Publication Publication Date Title
CN112950722B (en) Offset calibration method between camera and dispensing head of dispensing machine
CN112223285B (en) Robot hand-eye calibration method based on combined measurement
EP2126645B1 (en) Method for calibrating the x-y positioning of a positioning tool, and apparatus with such a positioning tool
US5198054A (en) Method of making compensated collinear reading or writing bar arrays assembled from subunits
US5643699A (en) Method and device for the mutual alignment of a film and a printed circuit board
EP3405972B1 (en) Inkjet printing system and method for processing substrates
CN110341328B (en) Multi-PCB character splicing printing method and device, medium and flat printing equipment
CN112894823B (en) Robot high-precision assembling method based on visual servo
CN113467203B (en) Method for aligning platform by camera, aligning device and direct imaging lithography equipment
US20170210148A1 (en) Inkjet printing system and method for processing wafers
CN109283804B (en) Method for improving exposure precision and expansion and contraction measurement precision of direct-writing exposure machine
CN115365088A (en) Dispensing method and device based on visual guidance
CN108955535B (en) Calibration and alignment method for solder paste printer
CN116099725A (en) Positioning error correction method and system of dispensing machine and MARK point identification method
CN111376254A (en) Plane distance measuring method and system and method and system for adjusting plane by mechanical arm
CN112802123A (en) Binocular linear array camera static calibration method based on stripe virtual target
CN113421309A (en) Single-camera cross-visual-field distance measurement platform calibration method, distance measurement method and system
CN112388265A (en) Flexible clamping, measuring and positioning device and method for radiation unit
US7290489B2 (en) Substrate inspecting apparatus and control method thereof
CN112862903B (en) Offset calibration method between chip mounter camera and suction rod
CN113306292B (en) Inkjet printing method and inkjet printing apparatus
DE19711476A1 (en) Method and device for measuring a device for producing electrical assemblies
CN110751692B (en) Camera imaging error calibration method and correction method
CN116373470A (en) Device and printing method for realizing ink-jet printing based on visual guidance
KR102569247B1 (en) Apparatus for correcting impact point of ink and system for treating substrate with the apparatus

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
GR01 Patent grant
GR01 Patent grant