CN102842117B - Method for correcting kinematic errors in microscopic vision system - Google Patents

Method for correcting kinematic errors in microscopic vision system Download PDF

Info

Publication number
CN102842117B
CN102842117B CN201210243071.5A CN201210243071A CN102842117B CN 102842117 B CN102842117 B CN 102842117B CN 201210243071 A CN201210243071 A CN 201210243071A CN 102842117 B CN102842117 B CN 102842117B
Authority
CN
China
Prior art keywords
corner
camera
point
theta
points
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.)
Active
Application number
CN201210243071.5A
Other languages
Chinese (zh)
Other versions
CN102842117A (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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201210243071.5A priority Critical patent/CN102842117B/en
Publication of CN102842117A publication Critical patent/CN102842117A/en
Application granted granted Critical
Publication of CN102842117B publication Critical patent/CN102842117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method for correcting kinematic errors in a microscopic vision system, which is applied to the microscopic vision system. The method comprises the following steps of: calibrating a camera through a calibration board, establishing a camera model, tracking angular points of the calibration board, generating a tracking trajectory and an ideal revolving trajectory of the angular points through a least square method, then performing error evaluation, establishing an error correcting model, and correcting the microscopic image by virtue of the error correct model. The method provided by the invention can be used for establishing the error correct model for the microscopic vision system only through one-time error evaluation; and the model can be used for any microscopic movement video collected by the system, reducing the movement errors of the system and improving the three-dimensional reconstruction precision, thus being high in practicability.

Description

显微视觉系统中运动误差矫正方法Motion Error Correction Method in Microscopic Vision System

技术领域 technical field

本发明涉及计算机显微成像技术领域,尤其涉及显微视觉系统中运动误差矫正方法。The invention relates to the technical field of computer microscopic imaging, in particular to a motion error correction method in a microscopic vision system.

背景技术 Background technique

随着信号处理科学和计算机技术的发展,计算机视觉作为人工智能的一个新领域也逐渐形成并得到了极大的发展,计算机视觉技术用摄像机代替人眼获取景物图像并转换为数字信号,利用计算机代替人的大脑对客观世界进行视觉感知和解释。虽然目前还不能够使计算机、机器人或其他智能机器也具有像人类等生物那样高效、灵活和通用的视觉,但自20世纪50年代以来视觉理论和技术得到了迅速发展,从阿帕奇上的头盔瞄准到军用车辆上的电子稳像,从导弹上的图像制导到军事目标识别,计算机视觉已被广泛的应用于军事、制造业、检验、文档分析、医疗诊断等各种领域。而随着个人计算机的发展,硬件成本的降低促进了计算机视觉这一新兴技术逐步走入人们的生活,为人们所熟悉。With the development of signal processing science and computer technology, computer vision as a new field of artificial intelligence has gradually formed and has been greatly developed. Computer vision technology uses cameras instead of human eyes to obtain scene images and convert them into digital signals. Visually perceive and interpret the objective world instead of the human brain. Although it is not yet possible for computers, robots or other intelligent machines to have vision as efficient, flexible and general as humans and other creatures, vision theory and technology have developed rapidly since the 1950s. Helmets are aimed at electronic image stabilization on military vehicles, from image guidance on missiles to military target recognition, computer vision has been widely used in various fields such as military, manufacturing, inspection, document analysis, and medical diagnosis. With the development of personal computers, the reduction of hardware costs has promoted the emerging technology of computer vision to gradually enter people's lives and become familiar to people.

通常一个完整的立体视觉系统的工作过程包括摄像机标定、特征提取、立体匹配、三维重建等部分,而三维重建是计算机视觉研究的最终目的之一。其中旋转三维重建技术,将观测物体做旋转运动作为限制条件,从而获取物体的运动信息,提高三维重建效率与精度。然而,由于显微视觉系统中显微运动视频由高倍显微镜与CCD图像传感器采集到,微小对象的旋转运动存在明显的运动位置偏移,极大地影响了后期的三维重建。Usually, the working process of a complete stereo vision system includes camera calibration, feature extraction, stereo matching, 3D reconstruction, etc., and 3D reconstruction is one of the ultimate goals of computer vision research. Among them, the rotating 3D reconstruction technology takes the rotational motion of the observed object as a constraint condition, so as to obtain the motion information of the object and improve the efficiency and accuracy of 3D reconstruction. However, since the microscopic motion video in the microscopic vision system is collected by a high-power microscope and a CCD image sensor, there is an obvious movement position offset in the rotational motion of the tiny object, which greatly affects the later 3D reconstruction.

同时目前计算机视觉中的误差矫正方法都是基于光学畸变误差,一般通过建立相应的光学畸变模型进行图像校正,这类矫正方法主要侧重于图像成像过程中产生的光学畸变,却没有考虑到显微序列图像间的运动变换关系,忽视了运动偏移导致的图像误差。At the same time, the current error correction methods in computer vision are all based on optical distortion errors. Generally, image correction is performed by establishing a corresponding optical distortion model. This type of correction method mainly focuses on the optical distortion generated during the image imaging process, but does not take microscopic The motion transformation relationship between sequence images ignores the image error caused by motion offset.

发明内容 Contents of the invention

本发明提出一种显微视觉系统中运动误差矫正方法,其目的是为了克服显微视觉系统下旋转三维重建过程中存在明显的运动位置偏移,能够准确评估显微视觉系统的运动误差,建立误差矫正模型,对采集到的显微图像进行预处理,显著减小运动误差。The present invention proposes a motion error correction method in a microscopic vision system, the purpose of which is to overcome the obvious movement position offset in the process of rotating three-dimensional reconstruction under the microscopic vision system, to accurately evaluate the motion error of the microscopic vision system, and to establish The error correction model preprocesses the collected microscopic images to significantly reduce motion errors.

一种显微视觉系统中运动误差矫正方法,应用于显微视觉系统,所述显微视觉系统包括用于获取被观测物体的显微图像的单目光学显微镜和摄像机,载物台以及控制所述载物台作一定倾斜角度的旋转运动的运动控制设备,以及用来进行视觉处理的计算机系统,所述矫正方法包括步骤:A motion error correction method in a microscopic vision system, applied to the microscopic vision system, the microscopic vision system includes a monocular optical microscope and a video camera for obtaining a microscopic image of an observed object, a stage and a control unit A motion control device for the object stage to rotate at a certain angle of inclination, and a computer system for visual processing, the correction method includes the steps of:

(1)建立误差矫正模型;(1) Establish an error correction model;

(2)调整载物台位置以适应被观测物体,采用标定板对摄像机进行标定,计算出摄像机的内外参数;(2) Adjust the position of the stage to adapt to the observed object, use the calibration plate to calibrate the camera, and calculate the internal and external parameters of the camera;

(3)根据所述摄像机录制的被观测物体的显微图像对应的旋转角度,将步骤(2)得到的摄像机的内外参数代入误差矫正模型,计算所述旋转角度对应的偏移矫正向量,对所述显微图像进行矫正。(3) According to the rotation angle corresponding to the microscopic image of the observed object recorded by the camera, the internal and external parameters of the camera obtained in step (2) are substituted into the error correction model, and the offset correction vector corresponding to the rotation angle is calculated. The microscopic images were rectified.

进一步地,所述步骤(1)建立误差矫正模型包括步骤:Further, said step (1) establishing an error correction model includes the steps of:

(1.1)采用标定板对所述摄像机进行标定,确定所述摄像机的内外参数,建立显微视觉系统的摄像机模型;(1.1) Using a calibration board to calibrate the camera, determine the internal and external parameters of the camera, and set up a camera model of the microscopic vision system;

(1.2)对标定板进行角点跟踪;(1.2) Carry out corner tracking on the calibration board;

(1.3)确定显微视觉系统载物台旋转轴;(1.3) Determine the rotation axis of the stage of the microscopic vision system;

(1.4)建立理想的旋转运动轨迹;(1.4) Establish an ideal rotation trajectory;

(1.5)构建误差矫正模型。(1.5) Build an error correction model.

进一步地,所述摄像机模型通过空间点P=[x,y,z]与其在摄像机中显示的二维图像上的投影点p=[u,v]的关系表示为: Further, the camera model is represented by the relationship between the spatial point P=[x, y, z] and its projection point p=[u, v] on the two-dimensional image displayed in the camera as:

其中分别是p和P加1的增向量,s是尺度因子,A为摄像机内参矩阵,[RT]为摄像机外参矩阵。in and are the increment vectors of p and P plus 1, s is the scale factor, A is the camera internal reference matrix, and [RT] is the camera external reference matrix.

进一步地,所述标定板是微棋盘格,所述步骤(1.2)包括步骤:Further, the calibration plate is a micro checkerboard, and the step (1.2) includes the steps of:

(1.2.1)、输入所述摄像机采集的微棋盘格显微运动视频,截帧获取K张显微序列图像;(1.2.1), input the micro-checkerboard micro-movement video collected by the camera, and capture K micro-sequence images by frame interception;

(1.2.2)、取其中一张图像,转换为灰度图,建立角点的集合U,和空的链表L;(1.2.2), take one of the images, convert it into a grayscale image, establish a set U of corner points, and an empty linked list L;

(1.2.3)、从集合U中搜索找到棋盘格顶点,将该点移到链表L中并设为基点;(1.2.3), search and find the checkerboard vertex from the set U, move this point to the linked list L and set it as the base point;

(1.2.4)、根据集合U中任意两点间最短距离,建立基点的搜索域;(1.2.4), according to the shortest distance between any two points in the set U, establish the search domain of the base point;

(1.2.5)、如果在搜索域中找到两个角点,并且当前基点是边界角点,则根据两角点与基点的关系,调整它们的顺序,并移动到链表L中;如果找到一个角点,并且当前基点非边界角点,则直接移动到链表L中;否则调整搜索域,重复步骤(1.2.5);(1.2.5), if two corner points are found in the search field, and the current base point is a boundary corner point, adjust their order according to the relationship between the two corner points and the base point, and move them to the linked list L; if one is found corner point, and the current base point is not a boundary corner point, then move directly to the linked list L; otherwise, adjust the search domain and repeat step (1.2.5);

(1.2.6)如果链表L长度达到N,则保存链表L,取下一张图像,回到(1.2.2);否则,取链表L中基点的下一个点为当前基点,回到步骤(1.2.4);(1.2.6) If the length of the linked list L reaches N, save the linked list L, take the next image, and return to (1.2.2); otherwise, take the next point of the base point in the linked list L as the current base point, and return to step ( 1.2.4);

(1.2.7)当K张显微序列图像都经过角点检测并编号,则得到K个链表L,根据角点序号建立对应关系,得到N个角点跟踪轨迹。(1.2.7) When K microsequence images are all corner detected and numbered, K linked lists L are obtained, and corresponding relationships are established according to the corner numbers to obtain N corner tracking trajectories.

根据本发明的角点跟踪策略,可以避开复杂的角点匹配过程,却能够准确地跟踪角点完整的运动轨迹。According to the corner point tracking strategy of the present invention, the complicated corner point matching process can be avoided, but the complete motion track of the corner point can be accurately tracked.

进一步地,所述步骤(1.2)还包括步骤:对于每一个角点,获取K个旋转的跟踪点,对这些跟踪点经过最小二乘法拟合出角点运动的二次曲线,为该角点的真实的跟踪轨迹,其中n为角点的序号;重复上述步骤得到N个角点的跟踪轨迹。Further, the step (1.2) also includes the step: for each corner point, obtain K rotating tracking points, and fit the quadratic curve of the corner point motion through the least square method to these tracking points , is the real tracking trajectory of the corner point, where n is the serial number of the corner point; repeat the above steps to obtain the tracking trajectory of N corner points.

进一步地,所述确定显微视觉系统的旋转轴是指通过角点跟踪得到的N个角点跟踪轨迹,由轨迹上的离散点的二维图像坐标求平均,近似得到旋转轴与载物台的交点的二维图像坐标,利用摄像机模型反投影得到该交点的世界坐标,从而确定旋转轴。Further, the determination of the rotation axis of the microscopic vision system refers to the N corner point tracking trajectories obtained by corner point tracking, and the two-dimensional image coordinates of the discrete points on the trajectory are averaged to approximate the rotation axis and the stage. The two-dimensional image coordinates of the intersection point of , and the world coordinates of the intersection point are obtained by using the back projection of the camera model, so as to determine the rotation axis.

进一步地,所述建立理想的旋转运动轨迹是指对于空间中一点,绕所述旋转轴连续旋转不同角度,经过坐标变换得到一组新的空间点,再分别通过所述摄像机模型投影变换,产生一组二维投影点,这些点经过最小二乘法拟合得到的二次曲线就是该点的理想的旋转运动轨迹,针对所述的N个角点,建立所述N个角点的理想运动轨迹Cn,其中n为角点的序号。Further, the establishment of an ideal rotation trajectory refers to continuously rotating different angles around the rotation axis for a point in space, and obtaining a group of new space points through coordinate transformation, and then respectively transforming through the projection of the camera model to generate A set of two-dimensional projection points, the quadratic curve obtained by fitting these points through the least squares method is the ideal rotation trajectory of the point, and for the N corner points, the ideal trajectory of the N corner points is established C n , where n is the serial number of the corner point.

进一步地,所述步骤(1.5)构建误差矫正模型包括步骤:Further, said step (1.5) constructing an error correction model includes steps:

空间点P绕所述旋转轴旋转角度θ得到理想点坐标P’(x’,y’,z’)和实际点坐标p’(u’,v’)和分别为P’、的二维图像点,那么满足下面两个公式:The space point P rotates the angle θ around the rotation axis to obtain the ideal point coordinates P'(x', y', z') and the actual point coordinates p'(u', v') and Respectively P', The two-dimensional image points of , then satisfy the following two formulas:

sthe s uu ′′ vv ′′ 11 == AA RR TT xx ′′ ythe y ′′ zz ′′ 11

sthe s uu ^^ vv ^^ 11 == AA RR TT xx ^^ ythe y ^^ zz ^^ 11

将上述公式相减可得:Subtracting the above formulas yields:

sthe s dd ~~ θθ TT == ARAR DD. θθ TT

其中为世界坐标系上的位置偏移量,为二维图像坐标系上的位置偏移量,而为dθ的增0向量;in is the position offset on the world coordinate system, is the position offset on the two-dimensional image coordinate system, and is the 0-increasing vector of d θ ;

通过所述N个角点的跟踪轨迹与理想运动轨迹得到:Obtained by the tracking trajectories and ideal motion trajectories of the N corner points:

dd ~~ θθ == (( 11 NN ΣΣ nno == 11 NN (( CC nno (( θθ )) coscos θθ -- CC ^^ nno (( θθ )) coscos θθ )) ,, 11 NN ΣΣ nno == 11 NN (( CC nno (( θθ )) sinsin θθ -- CC ^^ nno (( θθ )) sinsin θθ )) ,, 00 ))

其中Cn为第n个角点的理想运动轨迹的两次曲线,为第n个角点的跟踪轨迹的两次曲线;Where C n is the quadratic curve of the ideal trajectory of the nth corner point, is the quadratic curve of the tracking trajectory of the nth corner point;

经过变换得到误差矫正模型Eθ为:After transformation, the error correction model E θ is obtained as:

EE. θθ == DD. θθ TT == sthe s RR -- 11 AA -- 11 dd ~~ θθ TT

其中s是尺度因子,A为摄像机内参矩阵,[R T]为摄像机外参矩阵。Among them, s is the scale factor, A is the internal parameter matrix of the camera, and [RT] is the external parameter matrix of the camera.

其中,所述摄像机的内外参数包括尺度因子,内参矩阵和外参矩阵。Wherein, the internal and external parameters of the camera include a scale factor, an internal parameter matrix and an external parameter matrix.

本发明的有益效果主要表现在:只要通过一次误差评估就能够建立起显微视觉系统的误差矫正模型,利用该模型能够矫正系统采集的任意显微运动视频,减小系统的运动误差,提高三维重建精度,具有较好的实用性。The beneficial effects of the present invention are mainly manifested in that the error correction model of the microscopic vision system can be established as long as the error evaluation is performed once, and any microscopic motion video collected by the system can be corrected by using the model, the motion error of the system can be reduced, and the three-dimensional Reconstruction accuracy and good practicability.

附图说明 Description of drawings

图1是显微视觉系统结构示意图;Fig. 1 is a schematic diagram of the structure of the microscopic vision system;

图2是本发明显微视觉系统中运动误差矫正方法的流程图;Fig. 2 is a flow chart of the motion error correction method in the micro vision system of the present invention;

图3是本发明显微视觉系统中建立误差矫正模型的流程图;Fig. 3 is the flow chart of establishing error correction model in the micro vision system of the present invention;

图4是显微视觉系统的几何模型示意图;Fig. 4 is a schematic diagram of a geometric model of a microscopic vision system;

图5是显微图像经过角点检测及编号算法后的结果示意图;Fig. 5 is a schematic diagram of the results of the microscopic image after corner detection and numbering algorithm;

图6是显微运动视频内15个角点经过角点跟踪策略后得到的跟踪结果示意图;Fig. 6 is a schematic diagram of the tracking results obtained after 15 corner points in the microscopic motion video go through the corner point tracking strategy;

图7是误差评估结果的示意图;Fig. 7 is a schematic diagram of error evaluation results;

图8是误差矫正模型的示意图;Fig. 8 is a schematic diagram of an error correction model;

图9是显微运动视频经过误差矫正后其中四帧的结果示意图;Fig. 9 is a schematic diagram of the results of four frames of the microscopic motion video after error correction;

图10a是本发明实施例载物台倾斜0°矫正前后误差评估结果对比示意图;Fig. 10a is a schematic diagram of the comparison of error evaluation results before and after correction of the stage inclination of 0° according to the embodiment of the present invention;

图10b是本发明实施例载物台倾斜5°矫正前后误差评估结果对比示意图;Fig. 10b is a schematic diagram of the comparison of error evaluation results before and after correction of the stage inclination of 5° according to the embodiment of the present invention;

图10c是本发明实施例载物台倾斜15°矫正前后误差评估结果对比示意图;Fig. 10c is a schematic diagram of the comparison of error evaluation results before and after correction of the stage tilted by 15° according to the embodiment of the present invention;

图11是矫正前后误差评估结果的表格表示形式。Figure 11 is a tabular representation of the error evaluation results before and after correction.

具体实施方式 Detailed ways

下面结合附图和实施例对本发明技术方案做进一步详细说明,以下实施例不构成对本发明的限定。The technical solution of the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments, and the following embodiments do not constitute a limitation of the present invention.

本发明采用的显微视觉系统,如图1所示,包括单目光学显微镜1与摄像机2,负责获取被观测物体的显微图像(或者显微视频);还包括载物台3和运动控制设备4,摄像机2与运动控制设备4均连接到计算机系统5,计算机系统5一方面通过运动控制设备4控制载物台3作一定倾斜角度的旋转运动,另一方面作为视觉信息处理系统将获取的显微运动视频作为输入数据,利用旋转三维重建方法,精确计算出微小对象的三维结构。The microscopic vision system that the present invention adopts, as shown in Figure 1, comprises monocular optical microscope 1 and video camera 2, is responsible for obtaining the microscopic image (or microscopic video) of observed object; Also comprises stage 3 and motion control The device 4, the camera 2 and the motion control device 4 are all connected to the computer system 5. On the one hand, the computer system 5 controls the stage 3 to rotate at a certain inclination angle through the motion control device 4, and on the other hand, as a visual information processing system, it will acquire The microscopic motion video is used as the input data, and the three-dimensional structure of the tiny object is accurately calculated by using the rotating three-dimensional reconstruction method.

下面以图1为例,详细描述本发明显微视觉系统中运动误差矫正方法,具体方法流程如图2所示,包括如下步骤:Taking Fig. 1 as an example below, the motion error correction method in the micro vision system of the present invention is described in detail. The specific method flow is shown in Fig. 2, including the following steps:

步骤201、建立误差矫正模型。Step 201, establishing an error correction model.

具体地,建立误差矫正模型的方法流程如图3所示,包括步骤:Specifically, the flow of the method for establishing the error correction model is shown in Figure 3, including steps:

步骤301、采用标定板微棋盘格对摄像机进行标定,精确得到摄像机内外参数,建立显微视觉系统的摄像机模型。Step 301: Calibrate the camera by using the micro-checkerboard of the calibration board, accurately obtain the internal and external parameters of the camera, and establish a camera model of the microscopic vision system.

具体地,本发明采用张正友的平面标定方法(Z.Zhang.A Flexible NewTechnique for Camera Calibration[J].IEEE Transactions on Pattern Analysisand Machine Intelligence,2000,22(11):1330-1334(2000)),标定板为精密加工过的微棋盘格,利用运动控制设备4调整载物台3,用单目光学显微镜1和摄像机2采集微棋盘格在不同角度下的十张显微图像(其中包含显微视频的初始帧)作为摄像机标定的输入数据。通过摄像机标定精确得到摄像机内外参数,从而建立系统的摄像机模型,建立的摄像机模型如图4所示,其中,坐标系Oc-XcYcZc为摄像机坐标系{C},Oc为显微摄像机的光心,Zc轴为显微摄像机的光轴。坐标系O-UV为二维图像坐标系,摄像机光轴与之垂直相交点O’(uo,vo)。坐标系Ow-XwYwZw为世界坐标系{W},为基准坐标系,用来描述在物理环境中显微摄像机的位置和微小对象的位置。空间点P=[x,y,z]与其在摄像机中显示的二维图像上的投影点p=[u,v]的关系表示如下:Specifically, the present invention adopts Zhang Zhengyou's planar calibration method (Z. Zhang. A Flexible New Technique for Camera Calibration [J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2000, 22 (11): 1330-1334 (2000)), calibration The board is a micro-checkerboard that has been precisely processed. The motion control device 4 is used to adjust the stage 3, and the monocular optical microscope 1 and camera 2 are used to collect ten microscopic images of the micro-checkerboard at different angles (including the initial microscopic video. frame) as the input data for camera calibration. The internal and external parameters of the camera are accurately obtained through camera calibration, so as to establish the camera model of the system. The established camera model is shown in Figure 4, where the coordinate system O c -X c Y c Z c is the camera coordinate system {C}, and O c is The optical center of the microscopic camera, and the Zc axis is the optical axis of the microscopic camera. The coordinate system O-UV is a two-dimensional image coordinate system, and the optical axis of the camera is perpendicular to it at the intersection point O'(u o , v o ). The coordinate system O w -X w Y w Z w is the world coordinate system {W}, which is the reference coordinate system and is used to describe the position of the microscopic camera and the position of the tiny object in the physical environment. The relationship between the spatial point P = [x, y, z] and its projection point p = [u, v] on the two-dimensional image displayed in the camera is expressed as follows:

sthe s pp ~~ == AA RR TT PP ~~ -- -- -- (( 11 ))

其中分别是p和P加1的增向量,s是尺度因子,A为摄像机内参矩阵,[R T]为摄像机外参矩阵。in and are the increment vectors of p and P plus 1, s is the scale factor, A is the camera internal reference matrix, and [R T] is the camera external reference matrix.

步骤302、对标定板微棋盘格进行角点跟踪。Step 302: Carry out corner tracking on the micro-checkerboard of the calibration board.

具体地,摄像机采集微棋盘格显微运动视频,针对微棋盘格显微序列图像的特性,先从显微视频截帧获取K张显微序列图像,然后检测每张图像中的所有角点并对其中N个角点进行编号得到角点序列,如图5所示,根据角点序号便可以对K张显微序列图像中K*N个角点建立对应关系,得到N个角点跟踪轨迹,如图6所示。Specifically, the camera collects the micro-movement video of the micro-checkerboard grid. According to the characteristics of the micro-checkerboard micro-sequence images, K micro-sequence images are obtained from the micro-video frame capture, and then all corner points in each image are detected and analyzed. N corner points are numbered to obtain a corner point sequence, as shown in Figure 5, according to the corner point serial number, the corresponding relationship can be established for K*N corner points in K microscopic sequence images, and N corner point tracking trajectories are obtained, as shown in Figure 6 shown.

角点跟踪的具体步骤如下:The specific steps of corner tracking are as follows:

第一步:输入显微运动视频,截帧获取K张显微序列图像,即得到K张棋盘格一角的视图;Step 1: Input the microscopic motion video, cut the frame to obtain K microscopic sequence images, that is, get the view of the corner of K checkerboard;

第二步:取其中一张图像,转换为灰度图,利用Harris角点检测(C.Harris,M.Stephens,“A combined comer and edge detector”,Proc.AlveyVision Conference,1988,pp.189-192一种角点和边界点的检查子),建立角点的集合U,和空的链表L;Step 2: Take one of the images, convert it to a grayscale image, and use Harris corner detection (C.Harris, M.Stephens, "A combined comer and edge detector", Proc.AlveyVision Conference, 1988, pp.189- 192 A checker for corner points and boundary points), set up a set U of corner points, and an empty linked list L;

第三步:从集合U中搜索找到微棋盘格顶点,将该点移到链表L中并设为基点;Step 3: Search and find the vertex of the micro-checkerboard from the set U, move this point to the linked list L and set it as the base point;

第四步:根据集合U中任意两点间最短距离,建立基点的搜索域;Step 4: According to the shortest distance between any two points in the set U, establish the search domain of the base point;

第五步:如果在搜索域中找到两个角点,并且当前基点是边界角点,则根据两角点与基点的关系,调整它们的顺序,并移动到链表L中;如果找到一个角点,并且当前基点非边界角点,则直接移动到链表L中;否则调整搜索域,重复步骤五Step 5: If two corner points are found in the search field, and the current base point is a boundary corner point, adjust their order according to the relationship between the two corner points and the base point, and move them to the linked list L; if a corner point is found , and the current base point is not a boundary corner point, move it directly to the linked list L; otherwise, adjust the search domain and repeat step 5

第六步:如果链表L长度达到N,则保存链表L,取下一张图像,回到步骤二;否则,取链表L中基点的下一个点为当前基点,回到步骤四;Step 6: If the length of the linked list L reaches N, save the linked list L, take the next image, and return to step 2; otherwise, take the next point of the base point in the linked list L as the current base point, and return to step 4;

第七步:当K张显微序列图像都经过角点检测并编号,则得到K个链表L,根据角点序号建立对应关系,得到N个角点的跟踪轨迹。Step 7: When the K microsequence images are all corner detected and numbered, K linked lists L are obtained, and corresponding relationships are established according to the corner numbers to obtain tracking trajectories of N corners.

对每个角点的跟踪点经过最小二乘法拟合出角点运动的二次曲线为该角点的真实的跟踪轨迹,其中n为角点的序号;重复上述步骤得到N个角点的跟踪轨迹。根据本发明的角点跟踪策略,可以避开复杂的角点匹配过程,却能够准确地跟踪角点完整的运动轨迹。The tracking point of each corner point is fitted with the quadratic curve of the corner point motion through the least square method is the real tracking trajectory of the corner point, where n is the serial number of the corner point; repeat the above steps to obtain the tracking trajectory of N corner points. According to the corner point tracking strategy of the present invention, the complicated corner point matching process can be avoided, but the complete motion track of the corner point can be accurately tracked.

步骤303、载物台旋转轴的确定。Step 303, determining the rotation axis of the stage.

由于显微视觉系统下载物台的旋转运动为同一平面内的运动,如图4所示,将世界坐标系建立在载物台上,即载物台的旋转平面为世界坐标系中O-XY平面,则旋转轴Lg的方向向量为v=[0,0,1],并垂直交与O-XY平面点G,那么只需求出旋转轴垂直交与载物台的交点G的世界坐标,就可以确定旋转轴的空间位置。Since the rotation motion of the object stage downloaded by the microscopic vision system is the movement in the same plane, as shown in Figure 4, the world coordinate system is established on the stage, that is, the rotation plane of the stage is O-XY in the world coordinate system plane, then the direction vector of the rotation axis L g is v=[0, 0, 1], and perpendicularly intersects with the O-XY plane point G, then only the world coordinates of the intersection point G where the rotation axis perpendicularly intersects with the stage is required , the spatial position of the axis of rotation can be determined.

通过某个角点的跟踪轨迹,由轨迹上的离散点的二维图像坐标求平均,近似得到交点G的二维图像坐标,利用公式(1)得到交点G的世界坐标,交点G与旋转轴的方向向量v=[0,0,1]共同确定了载物台的旋转轴LgThrough the tracking trajectory of a certain corner point, the two-dimensional image coordinates of the discrete points on the trajectory are averaged to approximate the two-dimensional image coordinates of the intersection point G, and the world coordinates of the intersection point G are obtained by using the formula (1), and the intersection point G and the rotation axis The direction vector v=[0, 0, 1] jointly determines the rotation axis L g of the stage.

步骤304、建立理想的旋转运动轨迹。Step 304, establishing an ideal rotation trajectory.

理论上,空间中某点绕固定旋转轴连续旋转不同角度,经过坐标变换得到一组新的空间点,再分别通过摄像机模型投影变换,产生一组二维投影点,这些点经过最小二乘法拟合得到的二次曲线就是该点的理想的旋转运动轨迹。Theoretically, a point in space is continuously rotated at different angles around a fixed rotation axis, and a set of new space points are obtained through coordinate transformation, and then a set of two-dimensional projection points are generated through the projection transformation of the camera model, and these points are approximated by the least squares method. The resulting quadratic curve is the ideal rotational trajectory of the point.

下面详细说明理想旋转运动轨迹中离散的二维投影点的求解原理:The following describes the solution principle of the discrete two-dimensional projection points in the ideal rotation trajectory in detail:

假设空间点P绕旋转轴Lg旋转不同角度θi(逆时针旋转,旋转角度可以被运动控制系统精确测量),得到新的空间点P’i,经过摄像机投影变换得到二维图像点p’i,那么,P=[x,y,z]与p’i=[ui,vi]的关系通过表达如下:Assuming that the spatial point P is rotated around the rotation axis L g by different angles θ i (counterclockwise rotation, the rotation angle can be accurately measured by the motion control system), a new spatial point P' i is obtained, and the two-dimensional image point p' is obtained through the camera projection transformation i , then, the relationship between P=[x, y, z] and p' i =[u i , v i ] is passed and The expression is as follows:

sthe s pp ~~ ′′ ii == AA RR TT II tt 00 TT 11 RR vv (( θθ ii )) 00 00 TT 11 II tt -- 11 00 TT 11 PP ~~ RR vv (( θθ ii )) == (( 11 -- coscos θθ ii )) ** vv ** vv TT ++ coscos θθ ii ** II ++ sinsin θθ ii ** [[ vv ]] ×× -- -- -- (( 22 ))

其中,是P和p’i的加1增向量,Rvi)为空间上绕单轴旋转角度θi的旋转矩阵,v为旋转轴的方向向量,[v]×为v的反对称向量,I为3×3的单位向量,t为将世界坐标系原点偏移到旋转轴上的偏移向量。in, and is the increment vector of P and p' i , R vi ) is the rotation matrix of rotation angle θ i around the single axis in space, v is the direction vector of the rotation axis, [v] × is the antisymmetric vector of v , I is a 3×3 unit vector, and t is an offset vector that offsets the origin of the world coordinate system to the rotation axis.

通过公式(2)可以确定任意空间点的理想的旋转运动轨迹。针对微棋盘格的N个角点,建立每个角点的理想运动轨迹Cn,其中n为角点的序号。The ideal rotation trajectory of any spatial point can be determined by formula (2). For the N corner points of the micro checkerboard, establish an ideal motion trajectory C n for each corner point, where n is the serial number of the corner point.

步骤305、进行运动误差评估,建立误差矫正模型。Step 305, perform motion error evaluation, and establish an error correction model.

利用本发明中提出的角点跟踪策略,可以拟合出N个角点的运动的二次曲线为真实的跟踪轨迹,同时对每个角点,建立理想的运动轨迹Cn,通过下面公式可以评估旋转到任意角度θ时存在的误差值:Using the corner point tracking strategy proposed in the present invention, the quadratic curve of the motion of N corner points can be fitted For the real tracking trajectory, at the same time, for each corner point, an ideal trajectory C n is established, and the error value when rotating to any angle θ can be evaluated by the following formula:

ηη θθ == 11 NN ΣΣ nno == 11 NN (( CC ^^ nno (( θθ )) coscos θθ -- CC nno (( θθ )) coscos θθ )) 22 ++ (( CC ^^ nno (( θθ )) sinsin θθ -- CC nno (( θθ )) sinsin θθ )) 22 -- -- -- (( 33 ))

显微视觉系统下,载物台的旋转运动产生的运动误差具有一定规律,通过误差评估建立一个通用的误差矫正模型。为了不失一般性,将世界坐标系建立在载物台上固定位置。因而,载物台在旋转过程中产生的位置偏移能够由空间点在世界坐标系的位置偏移表示,即为通用的误差矫正模型。假设在同一旋转运动视频中,载物台旋转平面位置不变,则摄像机内外参数不变。假设,空间点P绕旋转轴旋转角度θ得到理想点坐标P’(x’,y’,z’),而实际点坐标为p’(u’,v’)和分别为P’、的二维图像点,那么满足下面两个公式:Under the microscopic vision system, the motion error generated by the rotating motion of the stage has certain rules, and a general error correction model is established through error evaluation. In order not to lose generality, the world coordinate system is established at a fixed position on the stage. Therefore, the position offset generated by the stage during rotation can be represented by the position offset of the space point in the world coordinate system, which is a general error correction model. Assuming that in the same rotation motion video, the position of the stage rotation plane remains unchanged, the internal and external parameters of the camera remain unchanged. Assume that the space point P rotates the angle θ around the rotation axis to obtain the ideal point coordinates P'(x', y', z'), while the actual point coordinates are p'(u', v') and Respectively P', The two-dimensional image points of , then satisfy the following two formulas:

sthe s uu ′′ vv ′′ 11 == AA RR TT xx ′′ ythe y ′′ zz ′′ 11

sthe s uu ^^ vv ^^ 11 == AA RR TT xx ^^ ythe y ^^ zz ^^ 11

两者相减,可以化简为Subtracting the two, it can be simplified as

sthe s dd ~~ θθ TT == ARAR DD. θθ TT

其中为世界坐标系上的位置偏移量,为二维图像坐标系上的位置偏移量,为dθ的增0向量,可以通过实际跟踪轨迹与理想运动轨迹得到:in is the position offset on the world coordinate system, is the position offset on the two-dimensional image coordinate system, is the zero-increasing vector of d θ , which can be obtained through the actual tracking trajectory and the ideal trajectory:

dd ~~ θθ == (( 11 NN ΣΣ nno == 11 NN (( CC nno (( θθ )) coscos θθ -- CC ^^ nno (( θθ )) coscos θθ )) ,, 11 NN ΣΣ nno == 11 NN (( CC nno (( θθ )) sinsin θθ -- CC ^^ nno (( θθ )) sinsin θθ )) ,, 00 )) ..

那么,误差矫正模型可以由以下公式得到:Then, the error correction model can be obtained by the following formula:

EE. θθ == DD. θθ TT == sthe s RR -- 11 AA -- 11 dd ~~ θθ TT -- -- -- (( 44 ))

其中,A和R为可逆矩阵。Among them, A and R are reversible matrices.

至此建立了显微视觉系统的误差矫正模型,可见通过以上步骤计算得到的误差矫正模型只依赖于载物台运动状态,独立于载物台与摄像机的相对位置。因而,无论载物台处于什么物理位置,只要在载物台作平面旋转运动的情况下,显微视觉系统获取的显微运动视频都可以利用该误差矫正模型进行运动误差矫正。So far, the error correction model of the microscopic vision system has been established. It can be seen that the error correction model calculated by the above steps only depends on the motion state of the stage, and is independent of the relative position of the stage and the camera. Therefore, regardless of the physical position of the stage, as long as the stage rotates in a plane, the microscopic motion video captured by the microscopic vision system can use the error correction model for motion error correction.

步骤202、调整载物台位置以适应被观测物体,采用标定板对摄像机进行标定,计算出摄像机的内外参数。Step 202, adjust the position of the stage to suit the observed object, use the calibration plate to calibrate the camera, and calculate the internal and external parameters of the camera.

需要说明的是,当对不同的物体进行观测,往往需要根据实际情况调整载物台的位置,当载物台调整到新的位置后,需要对摄像机的内外参数进行重新标定,采集微棋盘格在不同角度下的十张显微图像(其中包含显微视频的初始帧)作为摄像机标定的输入数据,计算出载物台在新位置下摄像机的内参矩阵A’和外参矩阵[R’T’]以及尺度因子S’,其标定方法同步骤301,这里不再赘述。It should be noted that when observing different objects, it is often necessary to adjust the position of the stage according to the actual situation. When the stage is adjusted to a new position, it is necessary to recalibrate the internal and external parameters of the camera and collect the Ten microscopic images at different angles (including the initial frame of the microscopic video) are used as input data for camera calibration, and the internal reference matrix A' and external reference matrix [R'T'] of the camera at the new position of the stage are calculated As well as the scale factor S', its calibration method is the same as step 301, and will not be repeated here.

步骤203、根据摄像机录制的被观测物体的显微图像对应的旋转角度,利用误差矫正模型,计算旋转角度对应的偏移矫正向量,对显微图像进行矫正。Step 203 , according to the rotation angle corresponding to the microscopic image of the observed object recorded by the camera, using the error correction model, calculating an offset correction vector corresponding to the rotation angle, and correcting the microscopic image.

具体地,在调整好载物台位置后,将被观测物体放置在载物台上,录制被观测物体的旋转运动显微视频,将显微运动视频截帧得到Z帧,载物台的旋转角度与帧序z之间的关系可以表示为:θ=360*(z-1)/(Z-1)。根据每一帧对应的旋转角度θ以及初始帧的摄像机内外矩阵,计算出该帧显微图像的偏移矫正向量:Specifically, after adjusting the position of the stage, the object to be observed is placed on the stage, the microscopic video of the object’s rotation motion is recorded, and the microscopic motion video is intercepted to obtain the Z frame. The rotation of the stage The relationship between the angle and the frame sequence z can be expressed as: θ=360*(z-1)/(Z-1). According to the rotation angle θ corresponding to each frame and the camera internal and external matrix of the initial frame, the offset correction vector of the microscopic image of the frame is calculated:

dd ~~ ′′ θθ TT == 11 sthe s ′′ AA ′′ RR ′′ EE. θθ -- -- -- (( 55 ))

计算出的d’θ=(a,b),a和b分别是二维图像坐标系中U轴、V轴方向上的偏移补偿量,用来对对应的显微图像进行位置矫正。The calculated d' θ = (a, b), where a and b are offset compensation amounts in the U-axis and V-axis directions of the two-dimensional image coordinate system, respectively, and are used to correct the position of the corresponding microscopic image.

在本发明中,建立误差矫正模型尤其重要,在实际显微视觉系统应用中,首先调整载物台位置,将其位于显微镜视差中央,然后倾斜载物台到一定角度,获取微小对象的深度信息,接着匀速旋转载物台,采集到一段显微运动视频,从而获取微小对象360°全方位结构视图。利用微棋盘格作为观测对象,通过本发明提出的角点跟踪策略,角点跟踪结果如附图6所示,跟踪轨迹存在明显的运动误差。为了获取理想的运动轨迹,首先利用张正友的平面标定法对显微视觉系统进行摄像机标定,调整载物台使其平面处于不同角度(其中包括显微运动视频中载物台初始位置),同时分别采集微棋盘格的显微图像作为摄像机标定的输入数据,从而求出系统的摄像机模型和显微运动视频中载物台初始位置与摄像机坐标系的空间变换关系(即摄像机外参矩阵)。其次利用角点跟踪计算出旋转运动的旋转轴,进而得到载物台在空间中旋转运动模型;最后通过公式(2)得到理想运动轨迹上的离散点,经过最小二乘法进行曲线拟合得到理想运动轨迹的二次曲线。另一方面,我们利用角点跟踪策略能够获取显微运动视频中角点跟踪轨迹,通过公式(3)进行精确的运动误差评估,再通过公式(4)建立系统的误差矫正模型。In the present invention, it is particularly important to establish an error correction model. In the actual application of the microscopic vision system, firstly adjust the position of the stage to be located in the center of the parallax of the microscope, and then tilt the stage to a certain angle to obtain the depth information of the tiny object , and then rotate the stage at a constant speed to collect a microscopic motion video, so as to obtain a 360° all-round structural view of the tiny object. Using the micro checkerboard as the observation object, through the corner point tracking strategy proposed by the present invention, the corner point tracking result is shown in Figure 6, and there is an obvious motion error in the tracking track. In order to obtain the ideal motion trajectory, first use Zhang Zhengyou’s plane calibration method to calibrate the camera of the micro vision system, adjust the stage so that its plane is at different angles (including the initial position of the stage in the micro motion video), and simultaneously The microscopic image of the micro-checkerboard is collected as the input data for camera calibration, so as to obtain the system camera model and the spatial transformation relationship between the initial position of the stage and the camera coordinate system in the microscopic motion video (ie, the camera extrinsic parameter matrix). Secondly, the rotation axis of the rotation motion is calculated by corner point tracking, and then the rotation motion model of the stage in space is obtained; finally, the discrete points on the ideal motion trajectory are obtained by formula (2), and the ideal The quadratic curve of the motion trajectory. On the other hand, we can use the corner tracking strategy to obtain the corner tracking trajectory in the microscopic motion video, perform accurate motion error evaluation through formula (3), and then establish a systematic error correction model through formula (4).

本发明的一个具体实施例,将建立的误差矫正模型应用到显微视觉系统中矫正误差。利用运动控制设备调整载物台位置,分别在倾斜10°、0°、5°、15°角度四种情况下,绕固定轴匀速旋转360°(角速度为1000脉冲/秒,旋转一周需要54000脉冲),同时利用显微图像获取设备采集到四个分辨率为640×480像素的显微运动视频作为实验数据。首先利用张正友平面标定法(以四个显微视频初始帧以及其他任意角度的6张摆拍图像为标定图片)得到系统的摄像机内参矩阵以及四个显微视频初始帧的摄像机外参矩阵;然后对其中第一个倾斜10°旋转的显微视频进行角点跟踪,结果如图6所示;然后获取旋转轴位置,得到理想运动轨迹;然后进行误差评估,如图7所示,描述了微棋盘格上15个角点旋转360°产生的运动误差值,其中,每条曲线对应每个角点,X轴表示运动误差值(像素),Y轴表示载物台旋转角度;并建立误差矫正模型,如图8所示,X轴表示二维图像中U轴上的偏移量,Y轴二维图像中V轴上的偏移量,Z轴表示载物台旋转角度;然后利用这个矫正模型对其余三个显微视频进行误差矫正,其中倾斜5°的显微视频进行矫正后其中四帧如图9所示,从左到右分别是第1帧,第51帧,第101帧,第151帧;最后对三组矫正前后的显微视频进行误差评估,得到三组评估结果,结果如图10所示,图10a、图10b、图10c的误差评估对象分别是载物台倾斜0°、5°、15°时旋转360°的显微运动视频,其中带方块的曲线为矫正前的误差评估,带三角形的曲线为矫正后的误差评估;同时可以通过数据分析,如图11所示,表明本实施例能够有效的减小系统的运动误差,达到76%。In a specific embodiment of the present invention, the established error correction model is applied to a microscopic vision system to correct errors. Use the motion control equipment to adjust the position of the stage, and rotate 360° around the fixed axis at a constant speed under the four conditions of tilting 10°, 0°, 5°, and 15° respectively (the angular velocity is 1000 pulses per second, and 54000 pulses are required for one rotation) ), and four microscopic motion videos with a resolution of 640×480 pixels were collected by the microscopic image acquisition equipment as the experimental data. First, use Zhang Zhengyou’s planar calibration method (using four initial frames of microscopic video and 6 posed images from other arbitrary angles as calibration pictures) to obtain the system’s internal camera reference matrix and the camera’s external parameter matrix of four initial frames of microscopic video; then Corner tracking is performed on the first microscopic video tilted and rotated by 10°, the result is shown in Figure 6; then the position of the rotation axis is obtained to obtain the ideal trajectory; then the error evaluation is performed, as shown in Figure 7, which describes the microscopic The motion error value generated by 360° rotation of 15 corner points on the checkerboard, where each curve corresponds to each corner point, the X-axis represents the motion error value (pixel), and the Y-axis represents the rotation angle of the stage; and establishes error correction Model, as shown in Figure 8, the X-axis represents the offset on the U-axis in the two-dimensional image, the Y-axis represents the offset on the V-axis in the two-dimensional image, and the Z-axis represents the rotation angle of the stage; then use this correction The model performs error correction on the remaining three microscopic videos, and four frames of the microscopic video tilted at 5° are corrected as shown in Figure 9. From left to right, they are the first frame, the 51st frame, and the 101st frame. Frame 151; Finally, the error evaluation of the three groups of microscopic videos before and after correction is carried out, and three groups of evaluation results are obtained. The results are shown in Figure 10. The error evaluation objects in Figure 10a, Figure 10b, and Figure 10c are stage tilt 0 °, 5°, and 15°, the microscopic movement video rotated 360°, the curve with squares is the error evaluation before correction, and the curve with triangles is the error evaluation after correction; at the same time, it can be analyzed through data, as shown in Figure 11 It shows that this embodiment can effectively reduce the motion error of the system, reaching 76%.

以上实施例仅用以说明本发明的技术方案而非对其进行限制,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。The above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Without departing from the spirit and essence of the present invention, those skilled in the art can make various corresponding changes and changes according to the present invention. deformation, but these corresponding changes and deformations should belong to the scope of protection of the appended claims of the present invention.

Claims (7)

1.一种显微视觉系统中运动误差矫正方法,应用于显微视觉系统,所述显微视觉系统包括用于获取被观测物体的显微图像的单目光学显微镜和摄像机,载物台以及控制所述载物台作一定倾斜角度的旋转运动的运动控制设备,以及用来进行视觉处理的计算机系统,其特征在于,所述矫正方法包括步骤:1. A motion error correction method in a microscopic vision system is applied to a microscopic vision system, and the microscopic vision system includes a monocular optical microscope and a video camera for obtaining a microscopic image of an observed object, an object stage and A motion control device for controlling the rotational movement of the stage at a certain inclination angle, and a computer system for visual processing, wherein the correction method includes the steps of: (1)建立误差矫正模型,包括步骤:(1) Establish an error correction model, including steps: (1.1)采用标定板对所述摄像机进行标定,确定所述摄像机的内外参数,建立显微视觉系统的摄像机模型;(1.1) Using a calibration board to calibrate the camera, determine the internal and external parameters of the camera, and set up a camera model of the microscopic vision system; (1.2)对标定板进行角点跟踪,得到N个角点的跟踪轨迹;(1.2) Carry out corner tracking to calibration plate, obtain the tracking trajectory of N corner points; (1.3)确定显微视觉系统载物台旋转轴;(1.3) Determine the rotation axis of the stage of the microscopic vision system; (1.4)建立理想的旋转运动轨迹;(1.4) Establish an ideal rotation trajectory; (1.5)构建误差矫正模型;(1.5) Build an error correction model; 其中,步骤(1.5)包括步骤:Wherein, step (1.5) comprises steps: 空间点P绕所述旋转轴旋转角度θ得到理想点坐标P’(x’,y’,z’)和实际点坐标p’(u’,v’)和分别为P’、的二维图像点,那么满足下面两个公式:The space point P rotates the angle θ around the rotation axis to obtain the ideal point coordinates P'(x',y',z') and the actual point coordinates p'(u',v') and Respectively P', The two-dimensional image points of , then satisfy the following two formulas: sthe s uu ′′ vv ′′ 11 == AA RR TT xx ′′ ythe y ′′ zz ′′ 11 sthe s uu ^^ vv ^^ 11 == AA RR TT xx ^^ ythe y ^^ zz ^^ 11 其中s是尺度因子,A为摄像机内参矩阵,[R T]为摄像机外参矩阵;Among them, s is the scale factor, A is the internal parameter matrix of the camera, and [RT] is the external parameter matrix of the camera; 将上述公式相减可得:Subtract the above formulas to get: sthe s dd ~~ θθ TT == ARDARD θθ TT ,, 其中为世界坐标系上的位置偏移量,为二维图像坐标系上的位置偏移量,而为dθ的增0向量;其中通过所述N个角点的跟踪轨迹与理想的旋转运动轨迹得到:in is the position offset on the world coordinate system, is the position offset on the two-dimensional image coordinate system, and is the 0-increasing vector of d θ ; where Obtained by the tracking trajectory of the N corner points and the ideal rotation trajectory: dd ~~ θθ == (( 11 NN ΣΣ nno == 11 NN (( CC nno (( θθ )) coscos θθ -- CC ^^ nno (( θθ )) coscos θθ )) ,, 11 NN ΣΣ nno == 11 NN (( CC nno (( θθ )) sinsin θθ -- CC ^^ nno (( θθ )) sinsin θθ )) ,, 00 )) ;; 其中Cn为第n个角点的理想运动轨迹的两次曲线,为第n个角点的跟踪轨迹的两次曲线;Where C n is the quadratic curve of the ideal trajectory of the nth corner point, is the quadratic curve of the tracking trajectory of the nth corner point; 经过变换得到误差矫正模型Eθ为:After transformation, the error correction model E θ is obtained as: EE. θθ == DD. θθ TT == sRR -- 11 AA -- 11 dd ~~ θθ TT 其中s是尺度因子,A为摄像机内参矩阵,[R T]为摄像机外参矩阵;Among them, s is the scale factor, A is the internal parameter matrix of the camera, and [RT] is the external parameter matrix of the camera; (2)调整载物台位置以适应被观测物体,采用标定板对摄像机进行标定,计算出摄像机的内外参数;(2) Adjust the position of the stage to adapt to the observed object, use the calibration plate to calibrate the camera, and calculate the internal and external parameters of the camera; (3)根据所述摄像机录制的被观测物体的显微图像对应的旋转角度,将步骤(2)得到的摄像机的内外参数代入所述误差矫正模型,计算所述旋转角度对应的偏移矫正向量,对所述显微图像进行矫正。(3) According to the rotation angle corresponding to the microscopic image of the observed object recorded by the camera, the internal and external parameters of the camera obtained in step (2) are substituted into the error correction model, and the offset correction vector corresponding to the rotation angle is calculated , correcting the microscopic image. 2.如权利要求1所述的运动误差矫正方法,其特征在于,所述摄像机模型的空间点P=[x,y,z]与其在摄像机中显示的二维图像上的投影点p=[u,v]的关系表示为: 2. The motion error correction method as claimed in claim 1, wherein the spatial point P=[x, y, z] of the camera model and its projection point p=[ The relationship between u, v] is expressed as: 其中分别是p和P加1的增向量,s是尺度因子,A为摄像机内参矩阵,[R T]为摄像机外参矩阵。in and are the increment vectors of p and P plus 1, s is the scale factor, A is the camera internal reference matrix, and [R T] is the camera external reference matrix. 3.如权利要求1所述的运动误差矫正方法,其特征在于,所述标定板是微棋盘格,所述步骤(1.2)包括步骤:3. motion error correcting method as claimed in claim 1, is characterized in that, described calibration plate is a micro checkerboard, and described step (1.2) comprises the step: (1.2.1)、输入所述摄像机采集的微棋盘格显微运动视频,截帧获取K张显微序列图像;(1.2.1), input the micro-checkerboard micro-movement video collected by the camera, and capture K micro-sequence images by frame interception; (1.2.2)、取其中一张图像,转换为灰度图,建立角点的集合U,和空的链表L;(1.2.2), take one of the images, convert it into a grayscale image, establish a set U of corner points, and an empty linked list L; (1.2.3)、从集合U中搜索找到棋盘格顶点,将该点移到链表L中并设为基点;(1.2.3), search and find the checkerboard vertex from the set U, move this point to the linked list L and set it as the base point; (1.2.4)、根据集合U中任意两点间最短距离,建立基点的搜索域;(1.2.4), according to the shortest distance between any two points in the set U, establish the search domain of the base point; (1.2.5)、如果在搜索域中找到两个角点,并且当前基点是边界角点,则根据两角点与基点的关系,调整它们的顺序,并移动到链表L中;如果找到一个角点,并且当前基点非边界角点,则直接移动到链表L中;否则调整搜索域,重复步骤(1.2.5);(1.2.5), if two corner points are found in the search field, and the current base point is a boundary corner point, adjust their order according to the relationship between the two corner points and the base point, and move them to the linked list L; if one is found corner point, and the current base point is not a boundary corner point, then move directly to the linked list L; otherwise, adjust the search domain and repeat step (1.2.5); (1.2.6)如果链表L长度达到N,N为图像中编号的角点个数,则保存链表L,取下一张图像,回到(1.2.2);否则,取链表L中基点的下一个点为当前基点,回到步骤(1.2.4);(1.2.6) If the length of the linked list L reaches N, and N is the number of corner points numbered in the image, save the linked list L, take the next image, and return to (1.2.2); otherwise, take the number of the base point in the linked list L The next point is the current base point, return to step (1.2.4); (1.2.7)当K张显微序列图像都经过角点检测并编号,则得到K个链表L,根据角点序号建立对应关系,得到N个角点跟踪轨迹。(1.2.7) When K microscopic sequence images are all corner detected and numbered, K linked lists L are obtained, and corresponding relationships are established according to the corner numbers to obtain N corner tracking trajectories. 4.如权利要求3所述的运动误差矫正方法,其特征在于:所述步骤(1.2)还包括步骤:4. motion error correction method as claimed in claim 3, is characterized in that: described step (1.2) also comprises the step: 对于每一个角点,获取K个旋转的跟踪点,对这些跟踪点经过最小二乘法拟合出角点运动的二次曲线为该角点的真实的跟踪轨迹,其中n为角点的序号;For each corner point, K rotating tracking points are obtained, and the quadratic curve of the corner point motion is fitted by the least square method for these tracking points is the real tracking track of the corner, where n is the serial number of the corner; 重复上述步骤得到N个角点的跟踪轨迹。Repeat the above steps to obtain the tracking trajectories of N corner points. 5.如权利要求4所述的运动误差矫正方法,其特征在于,所述确定显微视觉系统载物台旋转轴是指通过角点跟踪得到的N个角点跟踪轨迹,由轨迹上的离散点的二维图像坐标求平均,近似得到旋转轴与载物台的交点的二维图像坐标,利用摄像机模型反投影得到该交点的世界坐标,从而确定旋转轴。5. the motion error correction method as claimed in claim 4, is characterized in that, said determining the rotation axis of the object stage of the microscopic vision system refers to the N corner tracking tracks obtained by corner tracking, by the discretization on the track The two-dimensional image coordinates of the points are averaged to approximate the two-dimensional image coordinates of the intersection point of the rotation axis and the stage, and the world coordinates of the intersection point are obtained by back-projection of the camera model, thereby determining the rotation axis. 6.如权利要求5所述的运动误差矫正方法,其特征在于,所述建立理想的旋转运动轨迹是指对于空间中一点,绕所述旋转轴连续旋转不同角度,经过坐标变换得到一组新的空间点,再分别通过所述摄像机模型投影变换,产生一组二维投影点,所述的新的空间点和二维投影点经过最小二乘法拟合得到的二次曲线就是该点的理想的旋转运动轨迹,针对所述的N个角点,建立所述N个角点的理想运动轨迹Cn,其中n为角点的序号。6. The motion error correction method as claimed in claim 5, wherein said establishment of an ideal rotation trajectory refers to a point in space, which is continuously rotated at different angles around the rotation axis, and a set of new rotations is obtained through coordinate transformation. The spatial points, and then through the projection transformation of the camera model, a group of two-dimensional projection points are generated, and the quadratic curve obtained by fitting the new spatial points and two-dimensional projection points through the least square method is the ideal point of this point. For the N corner points, an ideal motion track C n of the N corner points is established, where n is the number of the corner points. 7.如权利要求1所述的运动误差矫正方法,其特征在于,所述摄像机的内外参数包括尺度因子,内参矩阵和外参矩阵。7. The motion error correction method according to claim 1, wherein the internal and external parameters of the camera include a scale factor, an internal parameter matrix and an external parameter matrix.
CN201210243071.5A 2012-07-13 2012-07-13 Method for correcting kinematic errors in microscopic vision system Active CN102842117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210243071.5A CN102842117B (en) 2012-07-13 2012-07-13 Method for correcting kinematic errors in microscopic vision system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210243071.5A CN102842117B (en) 2012-07-13 2012-07-13 Method for correcting kinematic errors in microscopic vision system

Publications (2)

Publication Number Publication Date
CN102842117A CN102842117A (en) 2012-12-26
CN102842117B true CN102842117B (en) 2015-02-25

Family

ID=47369443

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210243071.5A Active CN102842117B (en) 2012-07-13 2012-07-13 Method for correcting kinematic errors in microscopic vision system

Country Status (1)

Country Link
CN (1) CN102842117B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103273310B (en) * 2013-05-24 2015-11-04 中国科学院自动化研究所 An automatic alignment method of micro parts based on multi-channel micro vision
CN103386598B (en) * 2013-07-12 2016-06-15 中国科学院自动化研究所 A kind of micro-part is automatically directed at and assembles apparatus and method
CN104865893B (en) * 2014-02-24 2018-01-09 大族激光科技产业集团股份有限公司 Motion platform control system and motion platform error calculation method
US9986150B2 (en) * 2015-09-30 2018-05-29 Ricoh Co., Ltd. Algorithm to estimate yaw errors in camera pose
CN106782031A (en) * 2016-12-27 2017-05-31 中国船舶重工集团公司第七0七研究所 Towards the method for the calibration laser galvanometer index error of paper chart operation
CN109035331B (en) * 2017-06-12 2020-11-17 浙江宇视科技有限公司 Position correction method and device for signal lamp group
CN108548824B (en) * 2018-03-30 2021-03-26 湖北工程学院 PVC mask detection method and device
FR3083766B1 (en) * 2018-07-13 2020-06-26 Renault S.A.S. METHOD FOR PREPARING A PREDICTIVE ORDER INSTRUCTIONS WHICH CAN BE IMPLANTED IN A TRAJECTORY CONTROL UNIT OF A MOTOR VEHICLE
CN111147741B (en) * 2019-12-27 2021-08-13 Oppo广东移动通信有限公司 Anti-shake method and device based on focus processing, electronic device, storage medium
CN111768445A (en) * 2020-05-09 2020-10-13 江苏集萃微纳自动化系统与装备技术研究所有限公司 Micro-operation platform error self-correction algorithm based on machine vision
CN113074766B (en) * 2021-03-19 2023-01-10 广东工业大学 A micro-nano visual motion tracking system
CN113569843B (en) * 2021-06-21 2024-08-23 影石创新科技股份有限公司 Corner detection method, corner detection device, computer equipment and storage medium
CN114283141A (en) * 2021-12-29 2022-04-05 上海肇观电子科技有限公司 Method, apparatus, electronic device and medium for assessing depth image quality
CN114935309B (en) * 2022-04-02 2024-09-20 杭州汇萃智能科技有限公司 Method, system and readable storage medium for correcting installation error in machine vision measurement

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1860612A2 (en) * 2006-05-22 2007-11-28 Canon Kabushiki Kaisha Image distortion correction
CN101673399A (en) * 2009-09-29 2010-03-17 浙江工业大学 Calibration method of coded structured light three-dimensional vision system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1860612A2 (en) * 2006-05-22 2007-11-28 Canon Kabushiki Kaisha Image distortion correction
CN101673399A (en) * 2009-09-29 2010-03-17 浙江工业大学 Calibration method of coded structured light three-dimensional vision system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A Flexible New Technique for Camera Calibration;Zhengyou Zhang;《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》;20001130;第22卷(第11期);第1330-1334页 *
一种新的SLM显微立体视觉畸变矫正模型;王跃宗等;《光电工程》;20050630;第32卷(第6期);第72-75页 *
摄像机畸变矫正的一种简单有效的方法;李鑫等;《医疗设备信息》;20070228;第22卷(第2期);第7-9页 *
显微视觉主轴回转误差测量;袁德亮等;《机械与电子》;20100124(第1期);第36-39页 *

Also Published As

Publication number Publication date
CN102842117A (en) 2012-12-26

Similar Documents

Publication Publication Date Title
CN102842117B (en) Method for correcting kinematic errors in microscopic vision system
CN112396664B (en) Monocular camera and three-dimensional laser radar combined calibration and online optimization method
US20200096317A1 (en) Three-dimensional measurement apparatus, processing method, and non-transitory computer-readable storage medium
CN109872372B (en) Global visual positioning method and system for small quadruped robot
CN103761737B (en) Robot motion's method of estimation based on dense optical flow
CN104075688B (en) A kind of binocular solid stares the distance-finding method of monitoring system
CN110146099B (en) Synchronous positioning and map construction method based on deep learning
CN110728715A (en) Camera angle self-adaptive adjusting method of intelligent inspection robot
JP7185821B2 (en) Stereocalibration method for movable vision system
WO2021004416A1 (en) Method and apparatus for establishing beacon map on basis of visual beacons
CN108734744A (en) A kind of remote big field-of-view binocular scaling method based on total powerstation
CN111801198A (en) Hand-eye calibration method, system and computer storage medium
WO2020063058A1 (en) Calibration method for multi-degree-of-freedom movable vision system
CN102693543B (en) Method for automatically calibrating Pan-Tilt-Zoom in outdoor environments
CN111127613A (en) 3D reconstruction method and system of image sequence based on scanning electron microscope
CN111060006A (en) A Viewpoint Planning Method Based on 3D Model
CN113706635B (en) Long-focus camera calibration method based on point feature and line feature fusion
Wang et al. LF-VIO: A visual-inertial-odometry framework for large field-of-view cameras with negative plane
CN113724337B (en) Camera dynamic external parameter calibration method and device without depending on tripod head angle
CN112229323A (en) Six degrees of freedom measurement method of checkerboard cooperation target based on monocular vision of mobile phone and its application
CN113658266A (en) Moving axis rotation angle visual measurement method based on fixed camera and single target
CN110514114A (en) A method for calibrating the spatial position of tiny targets based on binocular vision
WO2023040095A1 (en) Camera calibration method and apparatus, electronic device, and storage medium
JP2019032660A (en) Imaging system and imaging method
CN114862969A (en) A method and device for self-adaptive adjustment of the angle of an airborne pan-tilt camera of an intelligent inspection robot

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant