[go: up one dir, main page]

CN106341956A - Fixed camera calibration method - Google Patents

Fixed camera calibration method Download PDF

Info

Publication number
CN106341956A
CN106341956A CN201610873046.3A CN201610873046A CN106341956A CN 106341956 A CN106341956 A CN 106341956A CN 201610873046 A CN201610873046 A CN 201610873046A CN 106341956 A CN106341956 A CN 106341956A
Authority
CN
China
Prior art keywords
fixed camera
head
center
coordinate system
move
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
CN201610873046.3A
Other languages
Chinese (zh)
Other versions
CN106341956B (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.)
Harbin Institute of Technology Shenzhen
Original Assignee
Harbin Institute of Technology Shenzhen
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 Harbin Institute of Technology Shenzhen filed Critical Harbin Institute of Technology Shenzhen
Priority to CN201610873046.3A priority Critical patent/CN106341956B/en
Publication of CN106341956A publication Critical patent/CN106341956A/en
Application granted granted Critical
Publication of CN106341956B publication Critical patent/CN106341956B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05KPRINTED CIRCUITS; CASINGS OR CONSTRUCTIONAL DETAILS OF ELECTRIC APPARATUS; MANUFACTURE OF ASSEMBLAGES OF ELECTRICAL COMPONENTS
    • H05K3/00Apparatus or processes for manufacturing printed circuits
    • H05K3/30Assembling printed circuits with electric components, e.g. with resistor
    • H05K3/303Surface mounted components, e.g. affixing before soldering, aligning means, spacing means
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05KPRINTED CIRCUITS; CASINGS OR CONSTRUCTIONAL DETAILS OF ELECTRIC APPARATUS; MANUFACTURE OF ASSEMBLAGES OF ELECTRICAL COMPONENTS
    • H05K13/00Apparatus or processes specially adapted for manufacturing or adjusting assemblages of electric components
    • H05K13/08Monitoring manufacture of assemblages
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05KPRINTED CIRCUITS; CASINGS OR CONSTRUCTIONAL DETAILS OF ELECTRIC APPARATUS; MANUFACTURE OF ASSEMBLAGES OF ELECTRICAL COMPONENTS
    • H05K2203/00Indexing scheme relating to apparatus or processes for manufacturing printed circuits covered by H05K3/00
    • H05K2203/16Inspection; Monitoring; Aligning
    • H05K2203/166Alignment or registration; Control of registration

Landscapes

  • Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Operations Research (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Supply And Installment Of Electrical Components (AREA)

Abstract

本发明公开了一种固定相机校正方法,涉及机器视觉定位检测领域,属于贴片机高精度校正的过程。本发明主要解决现有贴片机固定相机在机械安装时,相机位置、刻度以及旋转角度在设备坐标系中无法准确测量的问题。本发明利用标定吸嘴头确定贴片头在固定相机中的位置关系,计算推导出两个坐标系之间的转换关系;通过圆心的位置坐标来计算固定相机的刻度;通过贴片头的位置坐标和贴片头的值坐标来计算固定相机在设备坐标系中的旋转角度。通过校正固定相机的坐标、旋转角度和刻度,补偿人工安装给检测过程带来的偏差,提高贴片机对标定点检测定位时的精度,改善贴片机的贴装效果。本发明适用于机器视觉的精度校正领域。

The invention discloses a fixed camera correction method, relates to the field of machine vision positioning detection, and belongs to the high-precision correction process of a placement machine. The invention mainly solves the problem that the position, scale and rotation angle of the camera cannot be accurately measured in the equipment coordinate system when the fixed camera of the existing placement machine is mechanically installed. The present invention uses the calibration nozzle head to determine the positional relationship of the patch head in the fixed camera, calculates and deduces the conversion relationship between the two coordinate systems; calculates the scale of the fixed camera through the position coordinates of the center of the circle; The value coordinate of the film title is used to calculate the rotation angle of the fixed camera in the device coordinate system. By correcting the coordinates, rotation angle and scale of the fixed camera, the deviation caused by manual installation to the detection process is compensated, the accuracy of the placement machine for the detection and positioning of the calibration point is improved, and the placement effect of the placement machine is improved. The invention is applicable to the precision correction field of machine vision.

Description

一种固定相机校正方法A Fixed Camera Correction Method

技术领域technical field

本发明涉及一种固定相机校正方法,属于机器视觉定位检测技术领域。The invention relates to a fixed camera calibration method, which belongs to the technical field of machine vision positioning detection.

技术背景technical background

在SMT贴片机中,固定相机固定安装在不可移动的固定框架上。在进行贴片生产过程时,首先要精确的获得固定相机的位置,刻度以及旋转角度等参数的值,以便后续可以准确找到系统的零点、基准相机的原点坐标系等相关信息。固定相机位置、刻度和旋转角度等参数的准确测量决定整个贴片机系统的坐标系能否准确构建,影响贴片式芯片在贴装生产过程中定位的准确性。现有贴片机的固定相机在手动机械安装时,无法避免人工安装带来的偏差,误差较大。In the SMT placement machine, the fixed camera is fixedly installed on the immovable fixed frame. When carrying out the patch production process, it is first necessary to accurately obtain the values of parameters such as the position, scale, and rotation angle of the fixed camera, so that the zero point of the system, the origin coordinate system of the reference camera, and other related information can be accurately found later. Accurate measurement of parameters such as fixed camera position, scale, and rotation angle determines whether the coordinate system of the entire placement machine system can be accurately constructed, which affects the positioning accuracy of the placement chip during the placement production process. When the fixed camera of the existing placement machine is installed manually, the deviation caused by manual installation cannot be avoided, and the error is relatively large.

发明内容Contents of the invention

为了克服现有贴片机的固定相机在手动机械安装时,无法避免人工安装带来的偏差,误差较大的技术不足,本发明提供了一种基于机器学习定位检测技术的固定相机的校正方法,包括:In order to overcome the technical deficiencies of the manual mechanical installation of the fixed camera of the existing placement machine, which cannot avoid the deviation caused by manual installation and the large error, the present invention provides a method for correcting the fixed camera based on machine learning positioning detection technology ,include:

步骤一:初始化贴片机相机设置,设置固定相机校正时贴片头的移动长度A,单位为mm,1号贴片头从ANC吸嘴头槽吸取标定吸嘴头以后,移动到固定相机视野正上方,校正的目标物是标定吸嘴头;Step 1: Initialize the camera settings of the placement machine, set the moving length A of the placement head when the fixed camera is corrected, the unit is mm, after the No. 1 placement head absorbs the calibration nozzle from the ANC nozzle slot, move to the top of the fixed camera field of view, and calibrate The target object is to calibrate the nozzle head;

步骤二:将此刻1号贴片头在设备坐标系中的位置设为初始位置,先将1号贴片头沿着设备坐标系的x轴负方向移动A/2长度,再调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D1(x1,y1);接着将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的x轴正方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D2(x2,y2);将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的y轴负方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D3(x3,y3);接着将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的y轴正方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D4(x4,y4),所述位置坐标的单位是mm;Step 2: Set the position of the No. 1 placement head in the equipment coordinate system as the initial position at this moment, first move the No. 1 placement head along the negative direction of the x-axis of the equipment coordinate system for a length of A/2, and then call the image detection program to obtain Calibrate the position coordinates of the center of the nozzle head in the fixed camera, which is recorded as D1(x 1 , y 1 ); then move the No. 1 placement head back to the initial position, and then move the No. 1 placement head along the positive direction of the x-axis of the equipment coordinate system Move the length of A/2, call the image detection program, and get the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D2 (x2, y2); move the No. 1 placement head back to the initial position, and then move the No. Move the length of A/2 in the negative direction of the y-axis of the equipment coordinate system, call the image detection program, and obtain the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D3 (x3, y3); then move the No. 1 patch head back to The initial position, and then move the No. 1 patch head along the positive direction of the y-axis of the equipment coordinate system for a length of A/2, call the image detection program, and obtain the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D4(x 4 , y 4 ), the unit of the position coordinates is mm;

步骤三:将1号贴片头移回步骤二中定义的初始位置,将1号贴片头分别旋转至所述设备坐标系中的0°、90°、180°和270°位置,调用图像检测程序,根据所述的旋转4个角度,得到标定吸嘴头中心圆点在固定相机中的位置坐标,分别记为(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270),单位均为像素;并记录下此时1号贴片头在设备坐标系中的位置坐标(x设备,y设备),单位为mm,所述1号贴片头为贴片头坐标系的原点;Step 3: Move No. 1 placement head back to the initial position defined in step 2, rotate No. 1 placement head to the positions of 0°, 90°, 180° and 270° in the equipment coordinate system, and call the image detection program , according to the four angles of rotation, the position coordinates of the center point of the calibration nozzle head in the fixed camera are obtained, which are respectively recorded as (x 0 , y 0 ), (x 90 , y 90 ), (x 180 , y 180 ) and (x 270 , y 270 ), the units are pixels; and record the position coordinates (x equipment , y equipment ) of No. is the origin of the patch head coordinate system;

步骤四:将1号贴片头旋转至所述设备坐标系中的360°位置,即步骤二中定义的初始位置,重复步骤二,得到4组位置坐标D′1(x′1,y′1)、D′2(x′2,y′2)、D′3(x′3,y′3)、D′4(x′4,y′4),单位为像素;Step 4: Rotate the No. 1 patch head to the 360° position in the equipment coordinate system, which is the initial position defined in Step 2, and repeat Step 2 to obtain 4 sets of position coordinates D′ 1 (x′ 1 ,y′ 1 ), D′ 2 (x′ 2 ,y′ 2 ), D′ 3 (x′ 3 ,y′ 3 ), D′ 4 (x′ 4 ,y′ 4 ), the unit is pixel;

步骤五:根据步骤二和步骤四获得的贴片头的8个移动位置坐标,计算得到4个旋转角度θ1、θ2、θ′1和θ′2,最终固定相机坐标系在设备坐标系下的旋转角度为具体过程为:Step 5: Calculate and obtain 4 rotation angles θ 1 , θ 2 , θ′ 1 and θ′ 2 according to the 8 moving position coordinates of the patch head obtained in steps 2 and 4, and finally fix the camera coordinate system in the device coordinate system The rotation angle is The specific process is:

步骤五一:计算1、2点和3、4点组成直线在图像坐标系中的角度:Step 51: Calculate the angle of the straight line formed by points 1 and 2 and points 3 and 4 in the image coordinate system:

θθ 11 == tanthe tan -- 11 ythe y 11 -- ythe y 22 xx 22 -- xx 11 θθ 22 == tanthe tan -- 11 xx 33 -- xx 44 ythe y 33 -- ythe y 44

步骤五二:计算1’、2’点和3’、4’点组成直线在设备坐标系中的角度:Step 52: Calculate the angle of the straight line formed by points 1', 2' and points 3' and 4' in the device coordinate system:

θθ 11 ′′ == tanthe tan -- 11 ythe y 11 ′′ -- ythe y 22 ′′ xx 22 ′′ -- xx 11 ′′ θθ 22 ′′ == tanthe tan -- 11 xx 33 ′′ -- xx 44 ′′ ythe y 33 ′′ -- ythe y 44 ′′

步骤五三:θ1,θ2,θ′1,θ′2应大致相等,计算固定相机在设备坐标系中的旋转角度:Step five and three: θ 1 , θ 2 , θ′ 1 , θ′ 2 should be approximately equal, and calculate the rotation angle of the fixed camera in the device coordinate system:

步骤六:根据步骤二和步骤四中获得1号贴片头的8个移动位置坐标计算得出固定相机x和y方向上像素的宽度,即固定相机在x和y方向上刻度,分别记为w固定相机x和w固定相机y,单位是mm/pix;Step 6: Calculate the width of pixels in the x and y directions of the fixed camera according to the 8 moving position coordinates of the No. 1 patch head obtained in steps 2 and 4, that is, the scales of the fixed camera in the x and y directions are respectively recorded as w Fixed camera x and w fixed camera y , the unit is mm/pix;

步骤七:在步骤三中,旋转4个角度后,标定吸嘴头中心圆点在固定相机中的位置坐标,分别记为(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270),根据这4组值计算出标定吸嘴头中心在固定相机坐标系中的平均位置坐标 Step 7: In step 3, after rotating 4 angles, calibrate the position coordinates of the center point of the nozzle head in the fixed camera, which are recorded as (x 0 ,y 0 ), (x 90 ,y 90 ), (x 180 ,y 180 ) and (x 270 ,y 270 ), according to these 4 sets of values, calculate the average position coordinates of the center of the calibrated nozzle head in the fixed camera coordinate system

步骤八:将步骤三中记录的1号贴片头在设备坐标系中的位置坐标(x设备,y设备),步骤五和步骤六以及步骤七得到的参数以及坐标值带入下面的公式:Step 8: Put the position coordinates (x device , y device ) of the No. 1 patch head recorded in step 3 in the device coordinate system, the parameters and coordinate values obtained in steps 5, 6 and 7 into the following formula:

计算得到固定相机的光心在设备坐标系中的坐标(x固定相机,y固定相机)。Calculate the coordinates of the optical center of the fixed camera in the device coordinate system (x fixed camera , y fixed camera ).

本发明的技术效果是,通过校正固定相机的坐标、旋转角度和刻度,补偿人工安装给检测过程带来的偏差,提高贴片机对标定点检测定位时的精度,改善贴片机的贴装效果。The technical effect of the present invention is that by correcting the coordinates, rotation angle and scale of the fixed camera, the deviation caused by manual installation to the detection process is compensated, the accuracy of the placement machine for the detection and positioning of the calibration point is improved, and the placement of the placement machine is improved. Effect.

附图说明:Description of drawings:

图1为本发明的流程图;Fig. 1 is a flowchart of the present invention;

图2为标定吸嘴头的下表面示意图;Figure 2 is a schematic diagram of the lower surface of the calibration nozzle head;

图3为固定相机坐标系与设备坐标系中的相对位置关系;Figure 3 shows the relative positional relationship between the fixed camera coordinate system and the device coordinate system;

图4为1号贴片头未安装标定吸嘴头时,1号飞行相机检测是否有吸嘴时拍到的图像;Figure 4 is the image captured by the No. 1 flight camera when the No. 1 patch head is not equipped with a calibration nozzle head to detect whether there is a nozzle;

图5为1号贴片头安装标定吸嘴头后,1号飞行相机检测是否有吸嘴时拍到的图像;Figure 5 is the image captured by the No. 1 flying camera when the No. 1 patch head is installed with a calibrated nozzle head to detect whether there is a nozzle;

图6为标定吸嘴头移动到固定相机视野正上方,固定相机拍到的图片;Figure 6 is the picture taken by the fixed camera when the nozzle head is calibrated and moved directly above the field of view of the fixed camera;

图7为标定吸嘴头在设备坐标系中,相对于初始位置沿x轴负方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 7 is an image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved for a length of A/2 along the negative direction of the x-axis relative to the initial position;

图8为标定吸嘴头在设备坐标系中,相对于初始位置沿x轴正方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 8 is an image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved for a length of A/2 along the positive direction of the x-axis relative to the initial position;

图9为标定吸嘴头在设备坐标系中,相对于初始位置沿y轴负方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 9 is an image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved for a length of A/2 along the negative direction of the y-axis relative to the initial position;

图10为标定吸嘴头在设备坐标系中,相对于初始位置沿y轴正方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 10 is the image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved for a length of A/2 along the positive direction of the y-axis relative to the initial position;

图11为标定吸嘴头旋转到0°位置时在固定相机视野中的图像,也是第二部分中的初始位置;Figure 11 is the image in the field of view of the fixed camera when the calibration nozzle head is rotated to the 0° position, which is also the initial position in the second part;

图12为标定吸嘴头旋转到90°位置时在固定相机视野中的图像;Figure 12 is the image in the field of view of the fixed camera when the calibration nozzle head is rotated to the 90° position;

图13为标定吸嘴头旋转到180°位置时在固定相机视野中的图像;Figure 13 is the image in the field of view of the fixed camera when the calibration nozzle head is rotated to the 180° position;

图14为标定吸嘴头旋转到270°位置时在固定相机视野中的图像;Figure 14 is the image in the field of view of the fixed camera when the calibration nozzle head is rotated to the 270° position;

图15为标定吸嘴头在设备坐标系中,相对于初始位置沿x轴负方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 15 is the image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved A/2 in the negative direction of the x-axis relative to the initial position;

图16为标定吸嘴头在设备坐标系中,相对于初始位置沿x轴正方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 16 is the image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved for a length of A/2 along the positive direction of the x-axis relative to the initial position;

图17为标定吸嘴头在设备坐标系中,相对于初始位置沿y轴负方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 17 is the image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved for a length of A/2 along the negative direction of the y-axis relative to the initial position;

图18为标定吸嘴头在设备坐标系中,相对于初始位置沿y轴正方向移动A/2长度后标定吸嘴头中心在固定相机视野中的图像;Figure 18 is the image of the center of the calibrated nozzle head in the field of view of the fixed camera after the nozzle head is calibrated in the equipment coordinate system and moved for a length of A/2 along the positive direction of the y-axis relative to the initial position;

图19为固定相机校正前后坐标与旋转角度的结果对比。Figure 19 is a comparison of the coordinates and rotation angles before and after the correction of the fixed camera.

具体实施方式detailed description

具体实施方式一:Specific implementation mode one:

本实施方式的一种固定相机的校正方法,通过以下步骤实现:A calibration method for a fixed camera in this embodiment is implemented through the following steps:

步骤一:初始化贴片机相机设置,设置固定相机校正时贴片头的移动长度A,单位为mm,1号贴片头从ANC吸嘴头槽吸取标定吸嘴头以后,移动到固定相机视野正上方,校正的目标物是标定吸嘴头;ANC表示的是吸嘴头槽。Step 1: Initialize the camera settings of the placement machine, set the moving length A of the placement head when the fixed camera is corrected, the unit is mm, after the No. 1 placement head absorbs the calibration nozzle from the ANC nozzle slot, move to the top of the fixed camera field of view, and calibrate The target object is to calibrate the nozzle tip; ANC means the nozzle tip slot.

步骤二:将此刻1号贴片头在设备坐标系中的位置设为初始位置,先将1号贴片头沿着设备坐标系的x轴负方向移动A/2长度,再调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D1(x1,y1);接着将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的x轴正方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D2(x2,y2);将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的y轴负方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D3(x3,y3);接着将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的y轴正方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D4(x4,y4),所述位置坐标的单位是mm。Step 2: Set the position of the No. 1 placement head in the equipment coordinate system as the initial position at this moment, first move the No. 1 placement head along the negative direction of the x-axis of the equipment coordinate system for a length of A/2, and then call the image detection program to obtain Calibrate the position coordinates of the center of the nozzle head in the fixed camera, which is recorded as D1(x 1 , y 1 ); then move the No. 1 placement head back to the initial position, and then move the No. 1 placement head along the positive direction of the x-axis of the equipment coordinate system Move the length of A/2, call the image detection program, and get the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D2 (x2, y2); move the No. 1 placement head back to the initial position, and then move the No. Move the length of A/2 in the negative direction of the y-axis of the equipment coordinate system, call the image detection program, and obtain the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D3 (x3, y3); then move the No. 1 patch head back to The initial position, and then move the No. 1 patch head along the positive direction of the y-axis of the equipment coordinate system for a length of A/2, call the image detection program, and obtain the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D4(x 4 , y 4 ), the unit of the position coordinate is mm.

本发明所述的的图像检测程序是采用机器学习算法,并且用于通过输入的图像识别出其中出现的吸嘴头中心对应的位置坐标的程序,由于这类图像检测程序是现有技术中的常用手段,例如通过图片组成的训练集加入参数特征进行训练,得到一个分类器,该分类器的输入是图片,输出是位置坐标。由于这是机器学习领域的常规手段,故本发明不对该图像检测程序做详尽描述。The image detection program described in the present invention is a program that uses a machine learning algorithm and is used to recognize the position coordinates corresponding to the center of the nozzle head that appears therein through the input image, because this type of image detection program is commonly used in the prior art Means, such as adding parameter features to a training set composed of pictures for training, to obtain a classifier whose input is a picture and the output is a position coordinate. Since this is a conventional approach in the field of machine learning, the present invention does not describe the image detection procedure in detail.

本发明所述的“调用图像检测程序”应当理解为,将当前状态下的固定相机所拍摄到的图像输入至图像检测程序,得出当前状态下所识别出的位置坐标。“当前状态”主要指的是当前位置。"Invoking the image detection program" in the present invention should be understood as inputting the image captured by the fixed camera in the current state into the image detection program to obtain the identified position coordinates in the current state. "Current state" mainly refers to the current location.

步骤三:将1号贴片头移回步骤二中定义的初始位置,将1号贴片头分别旋转至所述设备坐标系中的0°、90°、180°和270°位置,调用图像检测程序,根据所述的旋转4个角度,得到标定吸嘴头中心圆点在固定相机中的位置坐标,分别记为(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270),单位均为像素;并记录下此时1号贴片头在设备坐标系中的位置坐标(x设备,y设备),单位为mm,所述1号贴片头为贴片头坐标系的原点;本发明中所述的旋转均为逆时针旋转。Step 3: Move No. 1 placement head back to the initial position defined in step 2, rotate No. 1 placement head to the positions of 0°, 90°, 180° and 270° in the equipment coordinate system, and call the image detection program , according to the four angles of rotation, the position coordinates of the center point of the calibration nozzle head in the fixed camera are obtained, which are respectively recorded as (x 0 , y 0 ), (x 90 , y 90 ), (x 180 , y 180 ) and (x 270 , y 270 ), the units are pixels; and record the position coordinates (x equipment , y equipment ) of No. is the origin of the patch head coordinate system; the rotations described in the present invention are all counterclockwise rotations.

步骤四:将1号贴片头旋转至所述设备坐标系中的360°位置,即步骤二中定义的初始位置,重复步骤二,得到4组位置坐标D′1(x′1,y′1)、D′2(x′2,y′2)、D′3(x′3,y′3)、D′4(x′4,y′4),单位为像素;Step 4: Rotate the No. 1 patch head to the 360° position in the equipment coordinate system, which is the initial position defined in Step 2, and repeat Step 2 to obtain 4 sets of position coordinates D′ 1 (x′ 1 ,y′ 1 ), D′ 2 (x′ 2 ,y′ 2 ), D′ 3 (x′ 3 ,y′ 3 ), D′ 4 (x′ 4 ,y′ 4 ), the unit is pixel;

步骤五:根据步骤二和步骤四获得的贴片头的8个移动位置坐标,计算得到4个旋转角度θ1、θ2、θ′1和θ′2,最终固定相机坐标系在设备坐标系下的旋转角度为具体过程为:Step 5: Calculate and obtain 4 rotation angles θ 1 , θ 2 , θ′ 1 and θ′ 2 according to the 8 moving position coordinates of the patch head obtained in steps 2 and 4, and finally fix the camera coordinate system in the device coordinate system The rotation angle is The specific process is:

步骤五一:计算D1、D2点和D3、D4点组成直线在图像坐标系中的角度:Step 51: Calculate the angle of the straight line formed by D 1 , D 2 and D 3 , D 4 in the image coordinate system:

θθ 11 == tt aa nno -- 11 ythe y 11 -- ythe y 22 xx 22 -- xx 11 θθ 22 == tanthe tan -- 11 xx 33 -- xx 44 ythe y 33 -- ythe y 44

步骤五二:计算D′1、D′2点和D′3、D′4点组成直线在设备坐标系中的角度:Step 52: Calculate the angle in the device coordinate system of the straight line formed by D′ 1 , D′ 2 and D′ 3 , D′ 4 :

θθ 11 ′′ == tanthe tan -- 11 ythe y 11 ′′ -- ythe y 22 ′′ xx 22 ′′ -- xx 11 ′′ θθ 22 ′′ == tanthe tan -- 11 xx 33 ′′ -- xx 44 ′′ ythe y 33 ′′ -- ythe y 44 ′′

步骤五三:θ1,θ2,θ′1,θ′2应大致相等,计算固定相机在设备坐标系中的旋转角度:Step five and three: θ 1 , θ 2 , θ′ 1 , θ′ 2 should be approximately equal, and calculate the rotation angle of the fixed camera in the device coordinate system:

步骤六:根据步骤二和步骤四中获得1号贴片头的8个移动位置坐标计算得出固定相机x和y方向上像素的宽度,即固定相机在x和y方向上刻度,分别记为w固定相机x和w固定相机y,单位是mm/pix;Step 6: Calculate the width of pixels in the x and y directions of the fixed camera according to the 8 moving position coordinates of the No. 1 patch head obtained in steps 2 and 4, that is, the scales of the fixed camera in the x and y directions are respectively recorded as w Fixed camera x and w fixed camera y , the unit is mm/pix;

步骤七:在步骤三中,旋转4个角度后,标定吸嘴头中心圆点在固定相机中的位置坐标,分别记为(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270),根据这4组值计算出标定吸嘴头中心在固定相机坐标系中的平均位置坐标 Step 7: In step 3, after rotating 4 angles, calibrate the position coordinates of the center point of the nozzle head in the fixed camera, which are recorded as (x 0 ,y 0 ), (x 90 ,y 90 ), (x 180 ,y 180 ) and (x 270 ,y 270 ), according to these 4 sets of values, calculate the average position coordinates of the center of the calibrated nozzle head in the fixed camera coordinate system

步骤八:将步骤三中记录的1号贴片头在设备坐标系中的位置坐标(x设备,y设备),步骤五和步骤六以及步骤七得到的参数以及坐标值带入下面的公式:Step 8: Put the position coordinates (x device , y device ) of the No. 1 patch head recorded in step 3 in the device coordinate system, the parameters and coordinate values obtained in steps 5, 6 and 7 into the following formula:

计算得到固定相机的光心在设备坐标系中的坐标(x固定相机,y固定相机)。Calculate the coordinates of the optical center of the fixed camera in the device coordinate system (x fixed camera , y fixed camera ).

具体实施方式二:Specific implementation mode two:

与具体实施方式一不同的是,步骤一具体为:Different from the specific implementation mode 1, step 1 is specifically:

步骤一一:点击用于贴片固定相机的功能按钮,根据图像界面的提示读取固定相机的移动长度A;Step 11: Click the function button for patching the fixed camera, and read the moving length A of the fixed camera according to the prompt on the image interface;

步骤一二:根据图形界面的提示放置所有吸嘴;Step 1 and 2: Place all suction nozzles according to the prompts of the graphical interface;

步骤一三:控制硬件从吸嘴头放置处中获取标定吸嘴头,根据贴片机的图形界面提示将1号贴片头移动到固定相机中心视野位置正上方;Step 13: Control the hardware to obtain the calibrated nozzle head from the place where the nozzle head is placed, and move the No. 1 mounter head directly above the center field of view of the fixed camera according to the prompt of the graphical interface of the placement machine;

步骤一四:控制1号贴片头移动到固定相机中心位置上方。Step 14: Control the No. 1 patch head to move above the center position of the fixed camera.

本实施方式在具体操作中可以为:In the specific operation of this embodiment, it can be:

1)点击贴片机中的<5.固定相机1>按钮,提示放置吸嘴。从“移动长度”组合框中的“固定相机”控件中读取固定相机的移动长度,设为A(A>0),单位mm。1) Click the <5. Fix Camera 1> button in the placement machine to prompt to place the nozzle. Read the moving length of the fixed camera from the "fixed camera" control in the "moving length" combo box, set it as A (A>0), and the unit is mm.

2)点击下一步按钮,放置所有吸嘴。提示1号贴片头从ANC吸取标定吸嘴。2) Click the Next button to place all nozzles. Prompt that the No. 1 patch head draws the calibration nozzle from the ANC.

3)控制硬件从ANC中获取标定工具,软件界面显示等待“获取标定工具”,控制图像部分显示飞行相机1的图像。提示移动1号贴片头到固定相机中心视野位置正上方。3) Control the hardware to obtain the calibration tool from the ANC, the software interface displays and waits for "acquire the calibration tool", and the image part of the control image displays the image of the flying camera 1. Prompt to move the No. 1 patch head directly above the central field of view of the fixed camera.

4)控制1号贴片头移动到固定相机中心位置上方,图像显示窗口显示固定相机的图像,软件界面显示等待移动过程。4) Control the No. 1 placement head to move above the center position of the fixed camera, the image display window displays the image of the fixed camera, and the software interface displays the waiting movement process.

其它结构及参数与具体实施方式一相同。Other structures and parameters are the same as those in Embodiment 1.

具体实施方式三:Specific implementation mode three:

与具体实施方式一或二不同的是,步骤二具体为:Different from the specific implementation mode 1 or 2, step 2 is specifically:

步骤二一:将1号贴片头沿x轴移动-A/2,设此时1号贴片头相对固定相机光心的坐标为D(x,y)=(-A/2,0),单位mm;Step 21: Move the No. 1 placement head along the x-axis by -A/2, and set the coordinates of the No. 1 placement head relative to the optical center of the fixed camera at this time as D(x,y)=(-A/2,0), the unit mm;

步骤二二:将此时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心圆点在固定相机中的位置D1(x1,y1),单位为像素;Step 22: Input the image captured by the fixed camera at this time into the image detection program, and obtain the position D 1 (x 1 , y 1 ) of the center point of the calibrated nozzle head in the fixed camera, and the unit is pixel;

步骤二三:将1号贴片头沿x轴移动A,此时1号贴片头相对固定相机光心的坐标为(A/2,0),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置D2(x2,y2),单位像素;Step 2 and 3: Move the No. 1 chip head along the x-axis by A. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (A/2,0), and input the image captured by the fixed camera at this time into the image detection Program to get the position D 2 (x 2 ,y 2 ) of the center of the circle in the fixed camera, unit pixel;

步骤二四:将1号贴片头沿x轴移动-A/2,并且沿y轴移动-A/2,此时1号贴片头相对固定相机光心的坐标为(0,A/2),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D3(x3,y3),单位像素;Step 24: Move the No. 1 chip head along the x-axis by -A/2, and move it along the y-axis by -A/2. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (0, A/2), Input the image captured by the fixed camera at this time into the image detection program to obtain the position of the center of the circle in the fixed camera, which is recorded as D 3 (x 3 ,y 3 ), and the unit is pixel;

步骤二五:将1号贴片头沿y轴移动A,此时1号贴片头相对固定相机光心的坐标为(0,A/2),重复步骤二二,得到圆心在固定相机中的位置,记为D4(x4,y4),单位像素。Step 25: Move the No. 1 chip head along the y-axis by A. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (0, A/2). Repeat steps 2 and 2 to obtain the position of the center of the circle in the fixed camera , denoted as D 4 (x 4 ,y 4 ), unit pixel.

其它结构及参数与具体实施方式一或二相同。Other structures and parameters are the same as those in Embodiment 1 or Embodiment 2.

具体实施方式四:Specific implementation mode four:

与具体实施方式一至三之一不同的是,本实施方式的步骤三具体为:The difference from one of the specific implementation modes 1 to 3 is that step 3 of this implementation mode is specifically:

步骤三一:将1号贴片头移回步骤二中定义的初始位置,将此时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心在固定相机中的位置,记为D0(x0,y0),单位像素;Step 31: Move the No. 1 patch head back to the initial position defined in step 2, input the image captured by the fixed camera at this time into the image detection program, and obtain the position of the center of the calibrated nozzle head in the fixed camera, which is recorded as D 0 (x 0 ,y 0 ), unit pixel;

步骤三二:将1号贴片头分别旋转至90°、180°和270°位置时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心在固定相机中的对应位置,记为(x90,y90)、(x180,y180)、(x270,y270),单位为像素,并记录1号贴片头在设备坐标系中的位置坐标为(x设备,y设备),单位为mm。Step 3 and 2: Input the images captured by the fixed camera when the No. 1 patch head is rotated to 90°, 180° and 270° respectively into the image detection program, and obtain the corresponding position of the center of the calibrated nozzle head in the fixed camera, which is recorded as ( x 90 , y 90 ), (x 180 , y 180 ), (x 270 , y 270 ), the unit is pixel, and record the position coordinates of No. 1 patch head in the device coordinate system as (x device , y device ), The unit is mm.

其它结构及参数与具体实施方式一至三之一相同。Other structures and parameters are the same as those in the first to third specific embodiments.

具体实施方式五:Specific implementation mode five:

与具体实施方式一至四之一不同的是,本实施方式的步骤四具体为:The difference from one of the specific implementation modes 1 to 4 is that step 4 of this implementation mode is specifically:

步骤四一:将1号贴片头旋转至360°位置,即步骤二中定义的初始位置;Step 41: Rotate the No. 1 patch head to the 360° position, which is the initial position defined in step 2;

步骤四二:将1号贴片头沿x负向轴移动A/2,设此时1号贴片头相对固定相机光心的坐标为D′(x′,y′)=(-A/2,0),单位为mm;Step 4 and 2: Move the No. 1 chip head along the negative x axis by A/2, and set the coordinates of the No. 1 chip head relative to the optical center of the fixed camera at this time as D′(x′,y′)=(-A/2, 0), the unit is mm;

步骤四三:将此时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心圆点在固定相机中的位置D′1(x′1,y′1),单位为像素;Step 43: Input the image captured by the fixed camera at this time into the image detection program to obtain the position D′ 1 (x′ 1 , y′ 1 ) of the center point of the calibrated nozzle head in the fixed camera, and the unit is pixel;

步骤四四:将1号贴片头沿x轴正向移动A,此时1号贴片头相对固定相机光心的坐标为(A/2,0),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D′2(x′2,y′2),单位像素;Step 44: Move the No. 1 chip head along the x-axis in the positive direction A. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (A/2,0), and input the image captured by the fixed camera at this time to The image detection program obtains the position of the center of the circle in the fixed camera, which is recorded as D′ 2 (x′ 2 , y′ 2 ), unit pixel;

步骤四五:将1号贴片头沿x轴负向移动A/2,并且沿y轴负向移动A/2,此时1号贴片头相对固定相机光心的坐标为D′(x′,y′)=(0,A/2),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D′3(x′3,y′3),单位像素;Step 4 and 5: Move the No. 1 chip head by A/2 along the negative direction of the x-axis, and move A/2 along the negative direction of the y-axis. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are D′(x′, y′)=(0,A/2), input the image captured by the fixed camera at this time into the image detection program, and obtain the position of the center of the circle in the fixed camera, denoted as D′ 3 (x′ 3 ,y′ 3 ) , unit pixel;

步骤四六:贴片头沿y轴正向移动A,此时1号贴片头相对固定相机光心的坐标为D′(x′,y′)=(0,A/2),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D′4(x′4,y′4),单位像素。Step 4 and 6: The patch head moves A in the positive direction along the y-axis. At this time, the coordinates of the No. 1 patch head relative to the optical center of the fixed camera are D′(x′,y′)=(0,A/2), and fix The image captured by the camera is input to the image detection program to obtain the position of the center of the circle in the fixed camera, which is denoted as D′ 4 (x′ 4 ,y′ 4 ), and the unit is pixel.

此时,四个位置如附图3所示。其中,位置1’、2’与y轴平行,位置3’、4’与x轴平行。设各个位置上基准点在图像坐标系中的坐标为(x′i,y′i),i=1,2,3,4。At this time, the four positions are shown in Figure 3. Wherein, positions 1' and 2' are parallel to the y-axis, and positions 3' and 4' are parallel to the x-axis. Let the coordinates of the reference point in the image coordinate system at each position be (x′ i , y′ i ), i=1, 2, 3, 4.

其它结构及参数与具体实施方式一至四之一相同。Other structures and parameters are the same as those in the first to fourth specific embodiments.

具体实施方式六:Specific implementation method six:

与具体实施方式一至五之一不同的是,本实施方式的步骤六具体为:The difference from one of the specific implementation modes 1 to 5 is that step 6 of this implementation mode is specifically:

将步骤二和步骤四中获得的1号贴片头的8个不同的移动位置坐标带入如下的公式中进行计算。Bring the 8 different moving position coordinates of No. 1 patch head obtained in Step 2 and Step 4 into the following formula for calculation.

步骤六一:固定相机x方向上像素的宽度为:Step 61: Fix the width of the pixel in the x direction of the camera as:

步骤六二:固定相机y方向上像素的宽度为:Step 62: Fix the width of the pixel in the y direction of the camera as:

其它结构及参数与具体实施方式一至六之一相同。Other structures and parameters are the same as those in the first to sixth specific embodiments.

其它结构及参数与具体实施方式一至五之一相同。Other structures and parameters are the same as one of the specific embodiments 1 to 5.

具体实施方式七:Specific implementation mode seven:

与具体实施方式一至六之一不同的是,本实施方式的步骤七具体为:The difference from one of the specific implementation modes 1 to 6 is that step 7 of this implementation mode is specifically:

将步骤三中标定贴片头中心在固定相机中的4组旋转位置坐标(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270)带入到公式中进行计算得到标定贴片头中心在固定相机坐标系中的平均位置坐标具体计算公式如下:The 4 sets of rotation position coordinates (x 0 , y 0 ), (x 90 , y 90 ), (x 180 , y 180 ) and (x 270 , y 270 ) of the calibrated patch head center in the fixed camera in step 3 are taken with Enter the formula to calculate the average position coordinates of the center of the calibration patch head in the fixed camera coordinate system The specific calculation formula is as follows:

xx &OverBar;&OverBar; == &Sigma;&Sigma; ii == 00 ,, 9090 ,, 180180 ,, 270270 xx ii // 44

ythe y &OverBar;&OverBar; == &Sigma;&Sigma; ii == 00 ,, 9090 ,, 180180 ,, 270270 ythe y ii // 44

其它结构及参数与具体实施方式一至六之一相同。Other structures and parameters are the same as those in the first to sixth specific embodiments.

具体实施方式八:Specific implementation mode eight:

与具体实施方式一至七之一不同的是,本实施方式的步骤八具体为:Different from one of the specific implementation modes 1 to 7, step 8 of this implementation mode is specifically:

将步骤三中记录的1号贴片头在设备坐标系中的位置坐标(x设备,y设备),步骤五和步骤六以及步骤七中计算出的旋转角度值、刻度值以及坐标值代入下面的公式:Substitute the position coordinates (x device , y device ) of the No. 1 patch head recorded in step 3 in the device coordinate system, the rotation angle value, scale value and coordinate value calculated in step 5, step 6 and step 7 into the following formula:

计算得到固定相机的光心在设备坐标系中的坐标(x固定相机,y固定相机)。Calculate the coordinates of the optical center of the fixed camera in the device coordinate system (x fixed camera , y fixed camera ).

其它结构及参数与具体实施方式一至七之一相同。Other structures and parameters are the same as one of the specific embodiments 1 to 7.

具体实施方式九:Specific implementation mode nine:

与具体实施方式一至八之一不同的是,步骤一中固定相机校正时贴片头的移动长度A为5mm。The difference from one of the specific embodiments 1 to 8 is that the moving length A of the patch head is 5 mm when the camera is fixed for correction in step 1.

Claims (9)

1.一种固定相机校正方法,其特征在于按以下步骤实现:1. A fixed camera correction method is characterized in that it is realized in the following steps: 步骤一:初始化贴片机相机设置,设置固定相机校正时贴片头的移动长度A,单位为mm,1号贴片头从ANC吸嘴头槽吸取标定吸嘴头以后,移动到固定相机视野正上方,所述标定吸嘴头是校正的目标物;Step 1: Initialize the camera settings of the placement machine, and set the moving length A of the placement head when the fixed camera is corrected. The unit is mm. The calibration nozzle tip mentioned above is the target object for calibration; 步骤二:将此刻1号贴片头在设备坐标系中的位置设为初始位置,先将1号贴片头沿着设备坐标系的x轴负方向移动A/2长度,再调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D1(x1,y1);接着将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的x轴正方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D2(x2,y2);将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的y轴负方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D3(x3,y3);接着将1号贴片头移回初始位置,再将1号贴片头沿着设备坐标系的y轴正方向移动A/2长度,调用图像检测程序,得到标定吸嘴头中心在固定相机中的位置坐标,记为D4(x4,y4),所述位置坐标的单位是mm;Step 2: Set the position of the No. 1 placement head in the equipment coordinate system as the initial position at this moment, first move the No. 1 placement head along the negative direction of the x-axis of the equipment coordinate system for a length of A/2, and then call the image detection program to obtain Calibrate the position coordinates of the center of the nozzle head in the fixed camera, which is recorded as D1(x 1 , y 1 ); then move the No. 1 placement head back to the initial position, and then move the No. 1 placement head along the positive direction of the x-axis of the equipment coordinate system Move the length of A/2, call the image detection program, and get the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D2 (x2, y2); move the No. 1 placement head back to the initial position, and then move the No. Move the length of A/2 in the negative direction of the y-axis of the equipment coordinate system, call the image detection program, and obtain the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D3 (x3, y3); then move the No. 1 patch head back to The initial position, and then move the No. 1 patch head along the positive direction of the y-axis of the equipment coordinate system for a length of A/2, call the image detection program, and obtain the position coordinates of the center of the calibrated nozzle head in the fixed camera, which is recorded as D4(x 4 , y 4 ), the unit of the position coordinates is mm; 步骤三:将1号贴片头移回步骤二中定义的初始位置,将1号贴片头分别旋转至所述设备坐标系中的0°、90°、180°和270°位置,调用图像检测程序,根据所述的旋转4个角度,得到标定吸嘴头中心圆点在固定相机中的位置坐标,分别记为(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270),单位均为像素;并记录下此时1号贴片头在设备坐标系中的位置坐标(x设备,y设备),单位为mm,所述1号贴片头为贴片头坐标系的原点;Step 3: Move No. 1 placement head back to the initial position defined in step 2, rotate No. 1 placement head to the positions of 0°, 90°, 180° and 270° in the equipment coordinate system, and call the image detection program , according to the four angles of rotation, the position coordinates of the center point of the calibration nozzle head in the fixed camera are obtained, which are respectively recorded as (x 0 , y 0 ), (x 90 , y 90 ), (x 180 , y 180 ) and (x 270 , y 270 ), the units are pixels; and record the position coordinates (x equipment , y equipment ) of No. is the origin of the patch head coordinate system; 步骤四:将1号贴片头旋转至所述设备坐标系中的360°位置,即步骤二中定义的初始位置,重复步骤二,得到4组位置坐标D′1(x′1,y′1)、D′2(x′2,y′2)、D′3(x′3,y′3)、D′4(x′4,y′4),单位为像素;Step 4: Rotate the No. 1 patch head to the 360° position in the equipment coordinate system, which is the initial position defined in Step 2, and repeat Step 2 to obtain 4 sets of position coordinates D′ 1 (x′ 1 ,y′ 1 ), D′ 2 (x′ 2 ,y′ 2 ), D′ 3 (x′ 3 ,y′ 3 ), D′ 4 (x′ 4 ,y′ 4 ), the unit is pixel; 步骤五:根据步骤二和步骤四获得的贴片头的8个移动位置坐标,计算得到4个旋转角度θ1、θ2、θ′1和θ′2,最终固定相机坐标系在设备坐标系下的旋转角度为 具体过程为:Step 5: Calculate and obtain 4 rotation angles θ 1 , θ 2 , θ′ 1 and θ′ 2 according to the 8 moving position coordinates of the patch head obtained in steps 2 and 4, and finally fix the camera coordinate system in the device coordinate system The rotation angle is The specific process is: 步骤五一:计算D1、D2点和D3、D4点组成直线在图像坐标系中的角度:Step 51: Calculate the angle of the straight line formed by D 1 , D 2 and D 3 , D 4 in the image coordinate system: &theta;&theta; 11 == tanthe tan -- 11 ythe y 11 -- ythe y 22 xx 22 -- xx 11 &theta;&theta; 22 == tanthe tan -- 11 xx 33 -- xx 44 ythe y 33 -- ythe y 44 步骤五二:计算D′1、D′2点和D′3、D′4点组成直线在设备坐标系中的角度:Step 52: Calculate the angle in the device coordinate system of the straight line formed by D′ 1 , D′ 2 and D′ 3 , D′ 4 : &theta;&theta; 11 &prime;&prime; == tanthe tan -- 11 ythe y 11 &prime;&prime; -- ythe y 22 &prime;&prime; xx 22 &prime;&prime; -- xx 11 &prime;&prime; &theta;&theta; 22 &prime;&prime; == tanthe tan -- 11 xx 33 &prime;&prime; -- xx 44 &prime;&prime; ythe y 33 &prime;&prime; -- ythe y 44 &prime;&prime; 步骤五三:θ1,θ2,θ′1,θ′2应大致相等,计算固定相机在设备坐标系中的旋转角度:Step five and three: θ 1 , θ 2 , θ′ 1 , θ′ 2 should be approximately equal, and calculate the rotation angle of the fixed camera in the device coordinate system: 步骤六:根据步骤二和步骤四中获得1号贴片头的8个移动位置坐标计算得出固定相机x和y方向上像素的宽度,即固定相机在x和y方向上刻度,分别记为w固定相机x和w固定相机y,单位是mm/pix;Step 6: Calculate the width of pixels in the x and y directions of the fixed camera according to the 8 moving position coordinates of the No. 1 patch head obtained in steps 2 and 4, that is, the scales of the fixed camera in the x and y directions are respectively recorded as w Fixed camera x and w fixed camera y , the unit is mm/pix; 步骤七:在步骤三中,旋转4个角度后,标定吸嘴头中心圆点在固定相机中的位置坐标,分别记为(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270),根据这4组值计算出标定吸嘴头中心在固定相机坐标系中的平均位置坐标 Step 7: In step 3, after rotating 4 angles, calibrate the position coordinates of the center point of the nozzle head in the fixed camera, which are recorded as (x 0 ,y 0 ), (x 90 ,y 90 ), (x 180 ,y 180 ) and (x 270 ,y 270 ), according to these 4 sets of values, calculate the average position coordinates of the center of the calibrated nozzle head in the fixed camera coordinate system 步骤八:将步骤三中记录的1号贴片头在设备坐标系中的位置坐标(x设备,y设备),步骤五和步骤六以及步骤七得到的参数以及坐标值带入下面的公式:Step 8: Put the position coordinates (x device , y device ) of the No. 1 patch head recorded in step 3 in the device coordinate system, the parameters and coordinate values obtained in steps 5, 6 and 7 into the following formula: 计算得到固定相机的光心在设备坐标系中的坐标(x固定相机,y固定相机)。Calculate the coordinates of the optical center of the fixed camera in the device coordinate system (x fixed camera , y fixed camera ). 2.根据权利要求1所述的固定相机校正方法,其特征在于步骤一具体为:2. The fixed camera calibration method according to claim 1, characterized in that step 1 is specifically: 步骤一一:点击用于贴片固定相机的功能按钮,根据图像界面的提示读取固定相机的移动长度A;Step 11: Click the function button for patching the fixed camera, and read the moving length A of the fixed camera according to the prompt on the image interface; 步骤一二:根据图形界面的提示放置所有吸嘴;Step 1 and 2: Place all suction nozzles according to the prompts of the graphical interface; 步骤一三:控制硬件从吸嘴头放置处中获取标定吸嘴头,根据贴片机的图形界面提示将1号贴片头移动到固定相机中心视野位置正上方;Step 13: Control the hardware to obtain the calibrated nozzle head from the place where the nozzle head is placed, and move the No. 1 mounter head directly above the center field of view of the fixed camera according to the prompt of the graphical interface of the placement machine; 步骤一四:控制1号贴片头移动到固定相机中心位置上方。Step 14: Control the No. 1 patch head to move above the center position of the fixed camera. 3.根据权利要求1所述的固定相机校正方法,其特征在于步骤二具体为:3. The fixed camera correction method according to claim 1, characterized in that step 2 is specifically: 步骤二一:将1号贴片头沿x轴移动-A/2,设此时1号贴片头相对固定相机光心的坐标为D(x,y)=(-A/2,0),单位mm;Step 21: Move the No. 1 placement head along the x-axis by -A/2, and set the coordinates of the No. 1 placement head relative to the optical center of the fixed camera at this time as D(x,y)=(-A/2,0), the unit mm; 步骤二二:将此时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心圆点在固定相机中的位置D1(x1,y1),单位为像素;Step 22: Input the image captured by the fixed camera at this time into the image detection program, and obtain the position D 1 (x 1 , y 1 ) of the center point of the calibrated nozzle head in the fixed camera, and the unit is pixel; 步骤二三:将1号贴片头沿x轴移动A,此时1号贴片头相对固定相机光心的坐标为(A/2,0),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置D2(x2,y2),单位为像素;Step 2 and 3: Move the No. 1 chip head along the x-axis by A. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (A/2,0), and input the image captured by the fixed camera at this time into the image detection The program obtains the position D 2 (x 2 ,y 2 ) of the center of the circle in the fixed camera, and the unit is pixel; 步骤二四:将1号贴片头沿x轴移动-A/2,并且沿y轴移动-A/2,此时1号贴片头相对固定相机光心的坐标为(0,A/2),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D3(x3,y3),单位为像素;Step 24: Move the No. 1 chip head along the x-axis by -A/2, and move it along the y-axis by -A/2. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (0, A/2), Input the image captured by the fixed camera at this time into the image detection program to obtain the position of the center of the circle in the fixed camera, which is recorded as D 3 (x 3 ,y 3 ), and the unit is pixel; 步骤二五:将1号贴片头沿y轴移动A,此时1号贴片头相对固定相机光心的坐标为(0,A/2),重复步骤二二,得到圆心在固定相机中的位置,记为D4(x4,y4),单位为像素。Step 25: Move the No. 1 chip head along the y-axis by A. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (0, A/2). Repeat steps 2 and 2 to obtain the position of the center of the circle in the fixed camera , denoted as D 4 (x 4 ,y 4 ), the unit is pixel. 4.根据权利要求1所述的固定相机校正方法,其特征在于步骤三具体为:4. The fixed camera correction method according to claim 1, characterized in that step three is specifically: 步骤三一:将1号贴片头移回步骤二中定义的初始位置,将此时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心在固定相机中的位置,记为D0(x0,y0),单位为像素;Step 31: Move the No. 1 patch head back to the initial position defined in step 2, input the image captured by the fixed camera at this time into the image detection program, and obtain the position of the center of the calibrated nozzle head in the fixed camera, which is recorded as D 0 (x 0 ,y 0 ), the unit is pixel; 步骤三二:将1号贴片头分别旋转至90°、180°和270°位置时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心在固定相机中的对应位置,记为(x90,y90)、(x180,y180)、(x270,y270),单位为像素,并记录1号贴片头在设备坐标系中的位置坐标为(x设备,y设备),单位为mm。Step 3 and 2: Input the images captured by the fixed camera when the No. 1 patch head is rotated to 90°, 180° and 270° respectively into the image detection program, and obtain the corresponding position of the center of the calibrated nozzle head in the fixed camera, which is recorded as ( x 90 , y 90 ), (x 180 , y 180 ), (x 270 , y 270 ), the unit is pixel, and record the position coordinates of No. 1 patch head in the device coordinate system as (x device , y device ), The unit is mm. 5.根据权利要求1所述的固定相机校正方法,其特征在于步骤四具体为:5. The fixed camera correction method according to claim 1, characterized in that step 4 is specifically: 步骤四一:将1号贴片头旋转至360°位置,即步骤二中定义的初始位置;Step 41: Rotate the No. 1 patch head to the 360° position, which is the initial position defined in step 2; 步骤四二:将1号贴片头沿x负向轴移动A/2,设此时1号贴片头相对固定相机光心的坐标为D′(x′,y′)=(-A/2,0),单位为mm;Step 4 and 2: Move the No. 1 chip head along the negative x axis by A/2, and set the coordinates of the No. 1 chip head relative to the optical center of the fixed camera at this time as D′(x′,y′)=(-A/2, 0), the unit is mm; 步骤四三:将此时固定相机拍摄到的图像输入至图像检测程序,得到标定吸嘴头中心圆点在固定相机中的位置D′1(x′1,y′1),单位为像素;Step 43: Input the image captured by the fixed camera at this time into the image detection program to obtain the position D′ 1 (x′ 1 , y′ 1 ) of the center point of the calibrated nozzle head in the fixed camera, and the unit is pixel; 步骤四四:将1号贴片头沿x轴正向移动A,此时1号贴片头相对固定相机光心的坐标为(A/2,0),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D′2(x′2,y′2),单位为像素;Step 44: Move the No. 1 chip head along the x-axis in the positive direction A. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are (A/2,0), and input the image captured by the fixed camera at this time to The image detection program obtains the position of the center of the circle in the fixed camera, which is recorded as D′ 2 (x′ 2 , y′ 2 ), and the unit is pixel; 步骤四五:将1号贴片头沿x轴负向移动A/2,并且沿y轴负向移动A/2,此时1号贴片头相对固定相机光心的坐标为D′(x′,y′)=(0,A/2),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D′3(x′3,y′3),单位为像素;Step 4 and 5: Move the No. 1 chip head by A/2 along the negative direction of the x-axis, and move A/2 along the negative direction of the y-axis. At this time, the coordinates of the No. 1 chip head relative to the optical center of the fixed camera are D′(x′, y′)=(0,A/2), input the image captured by the fixed camera at this time into the image detection program, and obtain the position of the center of the circle in the fixed camera, denoted as D′ 3 (x′ 3 ,y′ 3 ) , the unit is pixel; 步骤四六:贴片头沿y轴正向移动A,此时1号贴片头相对固定相机光心的坐标为D′(x′,y′)=(0,A/2),将此时固定相机拍摄到的图像输入至图像检测程序,得到圆心在固定相机中的位置,记为D′4(x′4,y′4),单位为像素。Step 4 and 6: The patch head moves A in the positive direction along the y-axis. At this time, the coordinates of the No. 1 patch head relative to the optical center of the fixed camera are D′(x′,y′)=(0,A/2), and fix The image captured by the camera is input to the image detection program to obtain the position of the center of the circle in the fixed camera, which is recorded as D′ 4 (x′ 4 ,y′ 4 ), and the unit is pixel. 6.根据权利要求1所述的固定相机校正方法,其特征在于步骤六具体为:6. The fixed camera correction method according to claim 1, characterized in that step six is specifically: 将步骤二和步骤四中获得的1号贴片头的8个不同的移动位置坐标带入如下的公式中进行计算;Bring the 8 different moving position coordinates of No. 1 patch head obtained in step 2 and step 4 into the following formula for calculation; 步骤六一:固定相机x方向上像素的宽度为:Step 61: Fix the width of the pixel in the x direction of the camera as: 步骤六二:固定相机y方向上像素的宽度为:Step 62: Fix the width of the pixel in the y direction of the camera as: 7.根据权利要求1所述的固定相机校正方法,其特征在于步骤七具体为:7. The fixed camera correction method according to claim 1, characterized in that step seven is specifically: 将步骤三中标定贴片头中心在固定相机中的4组旋转位置坐标(x0,y0)、(x90,y90)、(x180,y180)和(x270,y270)带入到公式中进行计算得到标定贴片头中心在固定相机坐标系中的平均位置坐标具体计算公式如下:The 4 sets of rotation position coordinates (x 0 , y 0 ), (x 90 , y 90 ), (x 180 , y 180 ) and (x 270 , y 270 ) of the calibrated patch head center in the fixed camera in step 3 are taken with Enter the formula to calculate the average position coordinates of the center of the calibration patch head in the fixed camera coordinate system The specific calculation formula is as follows: xx &OverBar;&OverBar; == &Sigma;&Sigma; ii == 00 ,, 9090 ,, 180180 ,, 270270 xx ii // 44 ythe y &OverBar;&OverBar; == &Sigma;&Sigma; ii == 00 ,, 9090 ,, 180180 ,, 270270 ythe y ii // 4.4. 8.根据权利要求1所述的固定相机校正方法,其特征在于步骤八具体为:8. The fixed camera correction method according to claim 1, characterized in that step eight is specifically: 将步骤三中记录的1号贴片头在设备坐标系中的位置坐标(x设备,y设备),步骤五和步骤六以及步骤七中计算出的旋转角度值、刻度值以及坐标值代入下面的公式:Substitute the position coordinates (x device , y device ) of the No. 1 patch head recorded in step 3 in the device coordinate system, the rotation angle value, scale value and coordinate value calculated in step 5, step 6 and step 7 into the following formula: 计算得到固定相机的光心在设备坐标系中的坐标(x固定相机,y固定相机)。Calculate the coordinates of the optical center of the fixed camera in the device coordinate system (x fixed camera , y fixed camera ). 9.根据权利要求1所述的固定相机校正方法,其特征在于,所述固定相机校正时贴片头的移动长度A为5mm。9. The fixed camera calibration method according to claim 1, characterized in that the moving length A of the patch head during the fixed camera calibration is 5 mm.
CN201610873046.3A 2016-09-30 2016-09-30 A Fixed Camera Correction Method Active CN106341956B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610873046.3A CN106341956B (en) 2016-09-30 2016-09-30 A Fixed Camera Correction Method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610873046.3A CN106341956B (en) 2016-09-30 2016-09-30 A Fixed Camera Correction Method

Publications (2)

Publication Number Publication Date
CN106341956A true CN106341956A (en) 2017-01-18
CN106341956B CN106341956B (en) 2019-04-30

Family

ID=57839764

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610873046.3A Active CN106341956B (en) 2016-09-30 2016-09-30 A Fixed Camera Correction Method

Country Status (1)

Country Link
CN (1) CN106341956B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018209633A1 (en) * 2017-05-18 2018-11-22 深圳配天智能技术研究院有限公司 Automatic correction method and device based on and vibration displacement of vision system, and vision system
CN109862244A (en) * 2019-02-14 2019-06-07 浙江中控太阳能技术有限公司 A kind of thermal shield and camera calibration device of correcting camera
CN110996644A (en) * 2019-11-14 2020-04-10 深圳市旗众智能科技有限公司 Height adjusting method for multiple suction rods of chip mounter
CN112697112A (en) * 2020-12-29 2021-04-23 东南大学 Method and device for measuring horizontal plane inclination angle of camera
CN112862903A (en) * 2021-03-03 2021-05-28 深圳市旗众智能科技有限公司 Offset calibration method for chip mounter camera and suction rod

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH081591A (en) * 1994-06-15 1996-01-09 Japan Steel Works Ltd:The Substrate boring method and substrate boring machine
CN1422113A (en) * 2001-11-28 2003-06-04 华为技术有限公司 Surface mount machine correcting instrument
US20030192178A1 (en) * 2000-06-21 2003-10-16 Wataru Hidese Component mounter and mounting method
CN101107899A (en) * 2005-03-10 2008-01-16 松下电器产业株式会社 Component mounting method and mounter
CN102073191A (en) * 2009-11-06 2011-05-25 三星泰科威株式会社 Shake correction module, camera module comprising the same, and method of manufacturing the camera module

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH081591A (en) * 1994-06-15 1996-01-09 Japan Steel Works Ltd:The Substrate boring method and substrate boring machine
US20030192178A1 (en) * 2000-06-21 2003-10-16 Wataru Hidese Component mounter and mounting method
CN1422113A (en) * 2001-11-28 2003-06-04 华为技术有限公司 Surface mount machine correcting instrument
CN101107899A (en) * 2005-03-10 2008-01-16 松下电器产业株式会社 Component mounting method and mounter
CN102073191A (en) * 2009-11-06 2011-05-25 三星泰科威株式会社 Shake correction module, camera module comprising the same, and method of manufacturing the camera module

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018209633A1 (en) * 2017-05-18 2018-11-22 深圳配天智能技术研究院有限公司 Automatic correction method and device based on and vibration displacement of vision system, and vision system
CN109862244A (en) * 2019-02-14 2019-06-07 浙江中控太阳能技术有限公司 A kind of thermal shield and camera calibration device of correcting camera
CN110996644A (en) * 2019-11-14 2020-04-10 深圳市旗众智能科技有限公司 Height adjusting method for multiple suction rods of chip mounter
CN112697112A (en) * 2020-12-29 2021-04-23 东南大学 Method and device for measuring horizontal plane inclination angle of camera
CN112862903A (en) * 2021-03-03 2021-05-28 深圳市旗众智能科技有限公司 Offset calibration method for chip mounter camera and suction rod
CN112862903B (en) * 2021-03-03 2022-10-18 深圳市旗众智能科技有限公司 Offset calibration method between chip mounter camera and suction rod

Also Published As

Publication number Publication date
CN106341956B (en) 2019-04-30

Similar Documents

Publication Publication Date Title
CN106341956A (en) Fixed camera calibration method
WO2021212978A1 (en) Calibration method, calibration apparatus, and non-volatile computer-readable storage medium
CN106289062B (en) A Correction Method for Offset of Reference Camera
CN111390901B (en) Automatic calibration method and calibration device for mechanical arm
CN104853180B (en) Correction method for image acquisition system
CN105216437B (en) Alignment light source image deviation adjustment self-calibration method
CN111263142B (en) Method, device, equipment and medium for testing optical anti-shake of camera module
CN106815866B (en) Calibration method for fisheye camera, calibration system and target board
CN106780388A (en) A kind of line-scan digital camera optical distortion antidote
CN103322984B (en) Based on the range finding of video image, speed-measuring method and device
CN105345254A (en) Calibration method for positional relation between paraxial type visual system and laser vibrating mirror machining system
CN107883874B (en) Calibration method of circular structured light
CN107767420A (en) A kind of scaling method of underwater stereoscopic vision system
CN106197292A (en) A kind of building displacement monitoring method
CN106570907B (en) Camera calibration method and device
WO2020073816A1 (en) Method and device used for measuring distortion parameters of display device, measuring device, and computer-readable medium
CN116630444B (en) An optimization method for camera and lidar fusion calibration
TWI423101B (en) Method for positioning compensation of a touch object on a touch surface of a screen and optical touch module thereof
CN117974806B (en) Video flow measurement section calibration method considering water level change factors
TWI716032B (en) Substrate inspection device, substrate processing apparatus, substrate inspection method and substrate processing method
CN109682312B (en) Method and device for measuring length based on camera
CN112665517A (en) Multi-camera large-view-field surface shape measurement calibration method
CN106485648A (en) Image acquisition device with correction function and correction method of image acquisition device
Chen et al. Robust homography for real-time image un-distortion
JP2013170829A (en) Strain measuring device and strain measuring method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant