



技术领域technical field
本发明属于计算机视觉与计算机控制领域,具体涉及机器视觉跟踪技术、双目视觉定位技术、高精度伺服控制等技术领域,是一种基于双目视频传感器的高精度定位方法。The invention belongs to the field of computer vision and computer control, and specifically relates to the technical fields of machine vision tracking technology, binocular vision positioning technology, high-precision servo control and the like, and is a high-precision positioning method based on binocular video sensors.
背景技术Background technique
近年来,随着计算机硬件水平的提高,计算机视觉技术飞速发展。其中计算机视觉中的目标跟踪技术也随之受益。不过遗憾的是现有的目标跟踪技术和云台跟踪系统的结合多用于安防监控领域而鲜有其他。近些年,随着冬奥会的即将到来,体育事业的发展也逐渐被重视。传统的冰上运动员,滑雪运动员一般通过记录整段滑行时间、滑行距离以及回放录像等来数据分析滑行质量。但由于无法分析运动员每一时刻的运动状态以及整个滑行轨迹,使得运动员不能达到理想的训练效果。基于诸如类似的辅助训练系统缺陷,急需引入双目视觉技术对运动员进行精确定位。但由于早期的计算机算力限制等原因导致无法使用实时的高精度跟踪算法、并且加上用于安防领域的云台伺服角输出精度不够。因此无法将这类设备应用于高精度定位事业。In recent years, with the improvement of computer hardware level, computer vision technology has developed rapidly. Among them, the target tracking technology in computer vision also benefits. Unfortunately, the combination of existing target tracking technology and PTZ tracking system is mostly used in the field of security monitoring and few others. In recent years, with the approaching of the Winter Olympics, the development of sports has gradually been paid attention to. Traditional ice athletes and skiers generally analyze the gliding quality by recording the entire gliding time, gliding distance, and replaying the video. However, due to the inability to analyze the movement state of the athlete at every moment and the entire gliding trajectory, the athlete cannot achieve the ideal training effect. Based on similar defects in auxiliary training systems, it is urgent to introduce binocular vision technology to accurately locate athletes. However, due to the limitation of early computer computing power and other reasons, the real-time high-precision tracking algorithm cannot be used, and the output accuracy of the PTZ servo angle used in the security field is not enough. Therefore, such equipment cannot be applied to the high-precision positioning business.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明提出了一种基于双目视频传感器的高精度定位方法,将高精度目标跟踪技术作为视觉传感器,应用于基于高精度转台的反馈控制系统中的测量元件,在提高伺服跟踪技术的基础上,利用双目视觉技术对目标进行定位。因此该发明可广泛应用于类似于冰上、雪上的高速运动并记录高精度数据的场合。In view of this, the present invention proposes a high-precision positioning method based on a binocular video sensor, which uses the high-precision target tracking technology as a visual sensor and is applied to the measuring element in the feedback control system based on the high-precision turntable. On the basis of technology, use binocular vision technology to locate the target. Therefore, the invention can be widely used in high-speed motion similar to ice and snow and high-precision data recording.
本发明是一种基于双目视频传感器的高精度定位方法,包括如下步骤:The present invention is a high-precision positioning method based on a binocular video sensor, comprising the following steps:
第一步,设计三台高精度二维转台,并通过控制器,驱动器,运算器组成高精度伺服控制系统。The first step is to design three high-precision two-dimensional turntables, and form a high-precision servo control system through the controller, driver and arithmetic unit.
第二步,设计两个电控伺服调焦镜头,分别将两台相机与镜头固定至第一步所述转台上方,两转台可放置最远距离为80米。The second step is to design two electronically controlled servo focusing lenses, respectively, to fix the two cameras and lenses above the turntable described in the first step, and the two turntables can be placed at a maximum distance of 80 meters.
第三步,将激光手电筒置于第三台转台上,此转台置于步骤二所述两转台中间。The third step is to place the laser flashlight on the third turntable, which is placed in the middle of the two turntables described in the second step.
第四步,利用视频目标跟踪算法对每台相机传入的每帧图片中目标进行跟踪,并利用自适应PID控制算法,将跟踪得到的目标中心点与图像中心点做比较,使转台能够稳定跟踪目标转动。利用步骤二的变焦镜头,基于图像跟踪框与整幅图像作比较,使镜头稳定变焦。最终让运动目标稳定的呈现在两幅画面中心。The fourth step is to use the video target tracking algorithm to track the target in each frame of pictures passed in by each camera, and use the adaptive PID control algorithm to compare the center point of the tracked target with the center point of the image, so that the turntable can be stabilized. Track the target rotation. Using the zoom lens in
第五步,通过相机标定,获取相机的内外参数并得到世界坐标系与图像坐标系关系的对应矩阵,通过双目立体视觉技术将每一帧运动目标的像素坐标转换成世界坐标。In the fifth step, through camera calibration, the internal and external parameters of the camera are obtained and the corresponding matrix of the relationship between the world coordinate system and the image coordinate system is obtained, and the pixel coordinates of each frame of moving objects are converted into world coordinates through binocular stereo vision technology.
第六步,通过世界坐标系与步骤三转台的转角关系,利用插值计算可让激光器复现运动目标的运动状态和轨迹。In the sixth step, through the angle relationship between the world coordinate system and the turntable in step 3, the laser can reproduce the motion state and trajectory of the moving target by using interpolation calculation.
3、如权利要求1所述一种基于双目视频传感器的高精度定位方法,其特征在于,利用先进的KCF相关滤波跟踪技术,使图像传感器具有回传速度快,运算量小,跟踪精度高等特点。3. A high-precision positioning method based on a binocular video sensor as claimed in claim 1, characterized in that, using advanced KCF correlation filtering and tracking technology, the image sensor has the advantages of fast return speed, small calculation amount and high tracking accuracy. Features.
4、如权利要求1所述一种基于双目视频传感器的高精度定位方法,其特征在于,应用自适应PID控制算法对于非线性时变系统具有良好的控制效果,针对于不同运动目标可使云台自动跟踪控制更稳定,捕捉目标位置更精确。4. A high-precision positioning method based on a binocular video sensor according to claim 1, characterized in that the application of the adaptive PID control algorithm has a good control effect on nonlinear time-varying systems, and can be used for different moving targets. The automatic tracking control of the gimbal is more stable, and the target position is captured more accurately.
5、如权利要求1所述一种基于双目视频传感器的高精度定位方法,其特征在于,利用双目视觉定位技术和云台控制系统能够记录运动目标每个时刻运动速度、加速度大小,并能通过激光手电筒复现运动目标轨迹。5. A high-precision positioning method based on a binocular video sensor as claimed in claim 1, wherein the binocular vision positioning technology and the PTZ control system can be used to record the movement speed and acceleration of the moving target at each moment, and The trajectory of the moving target can be reproduced through the laser flashlight.
附图说明Description of drawings
图1是本发明系统整体结构框图;Fig. 1 is the overall structure block diagram of the system of the present invention;
图2是高精度云台设计图与实物图;Figure 2 is the high-precision gimbal design drawing and physical drawing;
图3是系统闭环控制原理图;Figure 3 is a schematic diagram of the system closed-loop control;
图4是双目视觉技术原理图。Figure 4 is a schematic diagram of binocular vision technology.
具体实施方式Detailed ways
下面结合附图和具体实施例对本发明进行详细说明。应指出的是,所描述的实例仅旨在便于对本发明的理解,而对其不起任何限定作用。The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that the described examples are only intended to facilitate the understanding of the present invention without any limitation thereto.
该发明的总体硬件设计结构框图如图1所示,系统由三台高精度伺服转台、两台高帧率工业相机、一台激光器、一台运动控制器、一台目标跟踪器、与一台 PC上位机组成,其中目标跟踪器负责对相机传输的图片做跟踪处理计算,上位机则只负责显示视频与向控制器发送指令。总体过程如下,架在云台上的相机向目标跟踪器同步传输图像数据,跟踪器对每一帧图像进行目标跟踪处理,将跟踪结果数据传送给PC机,PC机会根据得到的结果自动向控制器发送控制指令,进而使云台跟踪转动。待目标运动过程结束后,PC机会记录目标轨迹并向继续控制器发送指令,使激光器云台复现整个运动轨迹。The overall hardware design structure block diagram of the invention is shown in Figure 1. The system consists of three high-precision servo turntables, two high-frame rate industrial cameras, one laser, one motion controller, one target tracker, and one It consists of a PC host computer, in which the target tracker is responsible for tracking and processing the pictures transmitted by the camera, and the host computer is only responsible for displaying the video and sending instructions to the controller. The overall process is as follows: the camera mounted on the PTZ transmits image data synchronously to the target tracker, the tracker performs target tracking processing on each frame of image, and transmits the tracking result data to the PC. The controller sends control commands to make the gimbal track and rotate. After the target movement process is over, the PC will record the target trajectory and send instructions to the continuous controller, so that the laser head can reproduce the entire movement trajectory.
第一,设计三台高精度二维转台,转台设计图与实物图如图2所示。本系统搭建的伺服旋转平台为高精度直驱伺服平台,它是一种采用直线电机直接驱动的运动控制平台,它改变过去依赖于机械转换装置才能将旋转电机的旋转运动转化为直线运动的约束,克服了传统机械转换机构的传动链长、体积大、效率低、精度差等缺陷。系统中所用的电机配有编码器,因此可以利用采集编码器的信号作为系统反馈,构建一个闭环控制系统,来实现伺服控制。本系统的总体方案如下:即使用两个直驱伺服电机,直接带动负载实现角度跟踪和定位,通过直驱电机的内置编码器实时检测伺服电机转动的角度,以实现位置、速度及加速度的精确闭环控制。First, three high-precision two-dimensional turntables are designed, and the design drawing and physical drawing of the turntable are shown in Figure 2. The servo rotating platform built by this system is a high-precision direct-drive servo platform, which is a motion control platform directly driven by a linear motor. , Overcome the defects of the traditional mechanical conversion mechanism such as long transmission chain, large volume, low efficiency and poor precision. The motor used in the system is equipped with an encoder, so the signal collected from the encoder can be used as system feedback to construct a closed-loop control system to realize servo control. The overall scheme of this system is as follows: even if two direct-drive servo motors are used to directly drive the load to achieve angle tracking and positioning, and the built-in encoder of the direct-drive motor is used to detect the rotation angle of the servo motor in real time to achieve accurate position, speed and acceleration. Closed-loop control.
第二,设计两个电控伺服调焦镜头结构,分别将两台相机与镜头固定至第一步所述转台上方,两转台可放置最远距离为80米。然后将激光手电筒安装至第三台转台上,并将此转台置于上述两转台中间。Second, two electronically controlled servo focusing lens structures are designed, and the two cameras and lenses are respectively fixed to the top of the turntable described in the first step, and the two turntables can be placed at a maximum distance of 80 meters. Then install the laser flashlight on the third turntable, and place this turntable in the middle of the above two turntables.
第三,利用跟踪运算器将两台相机所传入的视频流分别进行基于KCF算法的目标跟踪处理,跟踪器对每台相机处理每一帧图像,都会向控制器传入一个像素点坐标。如图3所示的闭环控制回路的原理图,每一帧图像产生的像素点坐标作为反馈变量,都会使系统产生新的误差。再通过设计好的自适应PID回路,使得每一帧图像都能对应伺服电机的每一次的速度输出,将离散的速度输出过程连续化就能够得到稳定的输出结果,实现转台对目标的稳定跟踪。Third, the tracking operator is used to perform target tracking processing based on the KCF algorithm on the video streams input from the two cameras. The tracker processes each frame of image for each camera and transmits a pixel coordinate to the controller. As shown in the schematic diagram of the closed-loop control loop shown in Figure 3, the pixel coordinates generated by each frame of image are used as feedback variables, which will cause the system to generate new errors. Through the designed adaptive PID loop, each frame of image can correspond to each speed output of the servo motor, and the discrete speed output process can be continuous to obtain stable output results and realize the stable tracking of the target by the turntable. .
第四,利用张氏标定法得到相机参数,标定和建立图像坐标系与世界坐标系的关系矩阵,利用如图4的双目立体视觉技术将每一帧运动目标的像素坐标转换成世界坐标。双目机器视觉是利用仿真生物视觉系统的原理,使用双摄像机从不同的角度获取同一三维场景的两幅数字图像,通过立体匹配计算两幅图像像素间的位置偏差(即视差)来获取该三维场景的几何信息与深度信息,并重建该场景的三维形状与位置。它的原理如图4所示,Ol,Or分别为左右相机的光心位置,该位置可通过转台转动角度根据几何关系精确求得,T为左右相机光心之间的距离即基线距离,f为相机焦距,左右相同,P为待测目标点,Z为待测目标点到基线的距离,即待测目标点的深度值。(xl,yl),(xr,yr)分别为P点在左右相机的像点坐标,由以下三角形相似关系可得出待测目标点的精确坐标。Fourth, use Zhang's calibration method to obtain camera parameters, calibrate and establish the relationship matrix between the image coordinate system and the world coordinate system, and use the binocular stereo vision technology as shown in Figure 4 to convert the pixel coordinates of each frame of moving objects into world coordinates. Binocular machine vision is to use the principle of simulated biological vision system, use dual cameras to obtain two digital images of the same three-dimensional scene from different angles, and calculate the positional deviation (ie parallax) between the two image pixels through stereo matching to obtain the three-dimensional image. Geometry and depth information of the scene, and reconstruct the 3D shape and position of the scene. Its principle is shown in Figure 4, where Ol andOr are the positions of the optical centers of the left and right cameras, respectively, which can be accurately obtained according to the geometric relationship through the rotation angle of the turntable, and T is the distance between the optical centers of the left and right cameras, that is, the baseline distance , f is the focal length of the camera, the left and right are the same, P is the target point to be measured, Z is the distance from the target point to be measured to the baseline, that is, the depth value of the target point to be measured. (xl , yl ), (xr , yr ) are the image coordinates of point P on the left and right cameras respectively. The exact coordinates of the target point to be measured can be obtained from the following triangular similarity relationship.
最后可以利用世界坐标系与步骤三转台的转角关系,经过投影计算可让转台投影系统复现运动目标的运动状态和轨迹。Finally, the relationship between the world coordinate system and the turntable in step 3 can be used to make the projection system of the turntable reproduce the motion state and trajectory of the moving target through projection calculation.
综上所述,以上仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。To sum up, the above are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911284285.5ACN111612826A (en) | 2019-12-13 | 2019-12-13 | A high-precision three-dimensional motion trajectory acquisition, positioning and motion process reproduction method based on binocular video sensor |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911284285.5ACN111612826A (en) | 2019-12-13 | 2019-12-13 | A high-precision three-dimensional motion trajectory acquisition, positioning and motion process reproduction method based on binocular video sensor |
| Publication Number | Publication Date |
|---|---|
| CN111612826Atrue CN111612826A (en) | 2020-09-01 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201911284285.5APendingCN111612826A (en) | 2019-12-13 | 2019-12-13 | A high-precision three-dimensional motion trajectory acquisition, positioning and motion process reproduction method based on binocular video sensor |
| Country | Link |
|---|---|
| CN (1) | CN111612826A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112183355A (en)* | 2020-09-28 | 2021-01-05 | 北京理工大学 | Water outlet height detection system and method based on binocular vision and deep learning |
| CN112200838A (en)* | 2020-10-10 | 2021-01-08 | 中国科学院长春光学精密机械与物理研究所 | Projectile trajectory tracking method, device, equipment and storage medium |
| CN112435302A (en)* | 2020-12-09 | 2021-03-02 | 北京理工大学 | Long-distance large-view-field fisheye camera calibration method based on high-precision rotary table and collimator |
| CN113507565A (en)* | 2021-07-30 | 2021-10-15 | 北京理工大学 | A fully automatic servo tracking shooting method |
| CN115511915A (en)* | 2022-09-30 | 2022-12-23 | 北京凌壹时代通信技术有限公司 | Pull-up trajectory detection method, device, electronic equipment and storage medium |
| CN118397518A (en)* | 2024-06-26 | 2024-07-26 | 陕西福坤顺科技有限公司 | Visual detection method for stability of operation state of three-axis turntable |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112183355A (en)* | 2020-09-28 | 2021-01-05 | 北京理工大学 | Water outlet height detection system and method based on binocular vision and deep learning |
| CN112183355B (en)* | 2020-09-28 | 2022-12-27 | 北京理工大学 | Effluent height detection system and method based on binocular vision and deep learning |
| CN112200838A (en)* | 2020-10-10 | 2021-01-08 | 中国科学院长春光学精密机械与物理研究所 | Projectile trajectory tracking method, device, equipment and storage medium |
| CN112435302A (en)* | 2020-12-09 | 2021-03-02 | 北京理工大学 | Long-distance large-view-field fisheye camera calibration method based on high-precision rotary table and collimator |
| CN112435302B (en)* | 2020-12-09 | 2024-05-31 | 北京理工大学 | Remote large-view-field fisheye camera calibration method based on high-precision turntable and parallel light pipes |
| CN113507565A (en)* | 2021-07-30 | 2021-10-15 | 北京理工大学 | A fully automatic servo tracking shooting method |
| CN113507565B (en)* | 2021-07-30 | 2024-06-04 | 北京理工大学 | Full-automatic servo tracking shooting method |
| CN115511915A (en)* | 2022-09-30 | 2022-12-23 | 北京凌壹时代通信技术有限公司 | Pull-up trajectory detection method, device, electronic equipment and storage medium |
| CN118397518A (en)* | 2024-06-26 | 2024-07-26 | 陕西福坤顺科技有限公司 | Visual detection method for stability of operation state of three-axis turntable |
| Publication | Publication Date | Title |
|---|---|---|
| CN111612826A (en) | A high-precision three-dimensional motion trajectory acquisition, positioning and motion process reproduction method based on binocular video sensor | |
| Zhu et al. | The multivehicle stereo event camera dataset: An event camera dataset for 3D perception | |
| CN105043259B (en) | Digit Control Machine Tool rotary shaft error detection method based on binocular vision | |
| TWI530909B (en) | System and method for image composition | |
| CN102646275B (en) | The method of virtual three-dimensional superposition is realized by tracking and location algorithm | |
| CN206724901U (en) | A kind of monocular three-dimensional real-time online tracking and positioning system | |
| CN111899276A (en) | SLAM method and system based on binocular event camera | |
| KR20170069171A (en) | Modular device for high-speed video vibration analysis | |
| CN109360243B (en) | Calibration method of multi-degree-of-freedom movable vision system | |
| CN206850908U (en) | The measuring system that a kind of spliced panorama camera merges with tracking head | |
| CN106896343B (en) | Servo follow-up machine vision device and dynamic tracking ranging method | |
| CN109101935A (en) | Figure action based on thermal imaging camera captures system and method | |
| CN1932841A (en) | Moving target detection device and method based on bionic compound eyes | |
| CN104330075B (en) | Rasterizing polar coordinate system object localization method | |
| CN107509055A (en) | A kind of rotary panorama focus identification optronic tracker and its implementation | |
| CN102230758A (en) | Method and device for testing tracking stability precision during travel of self-propelled gun | |
| CN106403900A (en) | Flyer tracking and locating system and method | |
| CN110487199A (en) | A kind of Tunnel week DEFORMATION MONITORING SYSTEM and method | |
| CN110986770A (en) | Camera used in 3D acquisition system and camera selection method | |
| CN117372516A (en) | Ultra-wide river channel surface flow velocity acquisition method, device, equipment and storage medium | |
| Gao et al. | Single-event-camera-based 3D trajectory measurement method for high-speed moving targets | |
| CN104732560B (en) | Virtual video camera image pickup method based on motion capture system | |
| CN109636856B (en) | Joint measurement method of object six-dimensional pose information based on HOG feature fusion operator | |
| CN119779640A (en) | A device and method for detecting the response time of a curved screen of an automobile | |
| CN118870209A (en) | Optical motion capture method and system for movable camera |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| WD01 | Invention patent application deemed withdrawn after publication | Application publication date:20200901 | |
| WD01 | Invention patent application deemed withdrawn after publication |