[go: up one dir, main page]

CN107991665A - It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring - Google Patents

It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring Download PDF

Info

Publication number
CN107991665A
CN107991665A CN201711179983.XA CN201711179983A CN107991665A CN 107991665 A CN107991665 A CN 107991665A CN 201711179983 A CN201711179983 A CN 201711179983A CN 107991665 A CN107991665 A CN 107991665A
Authority
CN
China
Prior art keywords
fixed
target
focus camera
camera
mrow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711179983.XA
Other languages
Chinese (zh)
Inventor
范洪辉
邰阳
朱洪锦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu University of Technology
Original Assignee
Jiangsu University of Technology
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 Jiangsu University of Technology filed Critical Jiangsu University of Technology
Priority to CN201711179983.XA priority Critical patent/CN107991665A/en
Publication of CN107991665A publication Critical patent/CN107991665A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S11/00Systems for determining distance or velocity not using reflection or reradiation
    • G01S11/12Systems for determining distance or velocity not using reflection or reradiation using electromagnetic waves other than radio waves

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

本发明公开一种基于定焦相机的对标靶三维坐标连续测量方法,属于单目视觉技术领域。它包括:在目标位置预先布置圆点阵列标靶;通过定焦相机读入实时视频流,调节相机,将相机对准圆点标靶,使标靶中的圆点全部进入相机视野;对相机视野中的圆点进行计算,检测标圆点,计算圆心坐标;根据得到的圆心坐标计算相机外参矩阵。根据相机内外参矩阵计算三维坐标。本发明通过对成像原理的应用,在单目视觉中引入标靶作为坐标约束,通过设定便于识别的标识物并利用计算机对标识物图像的精确提取获得准确的所需数据,简单有效地实现了高精度的距离测定。

The invention discloses a method for continuously measuring three-dimensional coordinates of a target based on a fixed-focus camera, which belongs to the technical field of monocular vision. It includes: pre-arranging the dot array target at the target position; reading the real-time video stream through the fixed-focus camera, adjusting the camera, aiming the camera at the dot target, so that all the dots in the target enter the camera field of view; Calculate the dots in the field of view, detect the marked dots, and calculate the center coordinates; calculate the camera extrinsic parameter matrix based on the obtained circle center coordinates. Calculate the three-dimensional coordinates according to the internal and external parameter matrix of the camera. By applying the imaging principle, the present invention introduces a target as a coordinate constraint in monocular vision, and obtains accurate required data by setting markers that are easy to identify and using a computer to accurately extract the marker image, and realizes it simply and effectively. high-precision distance measurement.

Description

一种基于定焦相机的对标靶三维坐标连续测量方法A method for continuous measurement of three-dimensional coordinates of a target based on a fixed-focus camera

技术领域technical field

本发明属于单目视觉技术领域,尤其是一种基于定焦相机的对标靶三维坐标连续测量方法。The invention belongs to the technical field of monocular vision, in particular to a method for continuously measuring three-dimensional coordinates of a target based on a fixed-focus camera.

背景技术Background technique

单目三维坐标测量的过程中,通常利用图像序列中的某种约束,通过坐标系转换的方式将目标坐标系下的三维坐标转换为已知坐标系下的坐标序列。In the process of monocular 3D coordinate measurement, a certain constraint in the image sequence is usually used to transform the 3D coordinates in the target coordinate system into a coordinate sequence in a known coordinate system by means of coordinate system conversion.

在现有的非接触式测距技术方面,应用的最多的理论和方法主要有多目测距和激光测距。多目测距即使用多个结构和性能完全相同的相机设备对同一物体进行拍摄,通过多组图像中对目标的特征提取确定约束关系,再通过几何的方法计算该物体在相机坐标系中的坐标,确定其相对位置。多目测距受限于多个相机的相对位置,在计算中的参数均较小且对于高清图像计算量较大,难以实时运行,且特征提取难度大,误差不易消除,只能用于模糊测量。激光测距主要是采用激光测距仪进行,其在工作时向目标射出一束很细的激光,由光电元件接收目标反射的激光束,计时器测定激光束从发射到接收的时间,计算出从观测者到目标的距离。激光测距虽然精度高,但是它的方向性很强,发散度非常低,且成本相对较高。如何同时解决多目测距中存在的资源消耗大、精度不够高的问题,以及激光测距中目标性太强、发散度太低的问题,一直是本领域技术人员重点研究的问题,但目前也未见有突破性的研究进展公布。In the existing non-contact ranging technology, the most widely used theories and methods are mainly multi-eye ranging and laser ranging. Multi-eye ranging is to use multiple camera devices with the same structure and performance to shoot the same object, determine the constraint relationship through feature extraction of the target in multiple groups of images, and then calculate the object in the camera coordinate system by geometric methods coordinates to determine its relative position. Multi-eye ranging is limited by the relative positions of multiple cameras. The parameters in the calculation are small and the calculation amount for high-definition images is relatively large. It is difficult to run in real time, and the feature extraction is difficult, and the error is not easy to eliminate. It can only be used for blurring. Measurement. Laser ranging is mainly carried out by using a laser rangefinder, which emits a very thin beam of laser light to the target when it is working, and the photoelectric element receives the laser beam reflected by the target, and the timer measures the time from emission to reception of the laser beam, and calculates The distance from the observer to the target. Although laser ranging has high precision, it has strong directionality, very low divergence, and relatively high cost. How to simultaneously solve the problems of large resource consumption and insufficient precision in multi-eye ranging, as well as the problems of too strong targeting and too low divergence in laser ranging, has always been a key research issue for those skilled in the art, but at present No breakthrough research progress has been published.

发明内容Contents of the invention

为解决多目测距中存在的资源消耗大、精度不够高的问题,以及激光测距中存在的目标性太强、发散度太低的问题,本发明提供一种基于定焦相机的对标靶三维坐标连续测量方法。In order to solve the problems of large resource consumption and insufficient precision in multi-eye ranging, and the problems of too strong targeting and low divergence in laser ranging, the present invention provides a fixed-focus camera-based benchmarking A method for continuous measurement of three-dimensional coordinates of a target.

为实现上述目的,本发明采用下述技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种基于定焦相机的对标靶三维坐标连续测量方法,它包括以下步骤:A method for continuously measuring three-dimensional coordinates of a target based on a fixed-focus camera, comprising the following steps:

步骤一,在目标位置预先布置圆点阵列标靶;Step 1, prearranging the dot array target at the target position;

步骤二,通过定焦相机读入实时视频流,该视频流的来源均要求是配备定焦镜头的相机,即相机焦距为一固定值,不随其他参数的调节而变化,相机不特别要求获取图像是单通道图像;Step 2, read in the real-time video stream through the fixed-focus camera. The source of the video stream is required to be a camera equipped with a fixed-focus lens, that is, the focal length of the camera is a fixed value, which does not change with the adjustment of other parameters, and the camera does not specifically require image acquisition. is a single-channel image;

步骤三,将定焦相机对准圆点阵列标靶,适当调节定焦相机,使圆点阵列标靶中的圆点全部进入定焦相机视野;Step 3, aim the fixed-focus camera at the dot array target, and adjust the fixed-focus camera appropriately so that all the dots in the dot array target enter the field of view of the fixed-focus camera;

步骤四,对定焦相机视野中的圆点进行计算,检测标圆点,计算圆心坐标;Step 4, calculate the dots in the field of view of the fixed-focus camera, detect the marked dots, and calculate the coordinates of the center of the circle;

步骤五,根据得到的圆心坐标计算定焦相机外参矩阵;Step five, calculate the fixed-focus camera extrinsic parameter matrix according to the obtained circle center coordinates;

步骤六,根据定焦相机外参矩阵计算三维坐标。Step six, calculate the three-dimensional coordinates according to the fixed-focus camera extrinsic parameter matrix.

进一步地,步骤一的圆点阵列标靶形状为便于识别的规则形状,如矩形、方形等;Further, the shape of the dot array target in step 1 is a regular shape for easy identification, such as rectangle, square, etc.;

步骤一的圆点阵列标靶,应根据应用场景选择不同尺寸、材质的标靶,其中在尺寸上的要求为标靶中所有圆点均在步骤三对圆点阵列标靶进行图像采集输出的视频视野内,同时在视频视野内占据超过60%的大小;For the dot array target in step 1, targets of different sizes and materials should be selected according to the application scenario. The size requirement is that all the dots in the target should be image-acquired and output on the dot array target in step 3 In the video field of view, occupying more than 60% of the size of the video field of view at the same time;

步骤一的圆点阵列标靶,应根据应用场景选择不同尺寸、材质的标靶,其中在材质上的要求为保证标靶与周围环境产生高对比。For the dot array target in step 1, targets of different sizes and materials should be selected according to the application scenario, and the material requirements are to ensure a high contrast between the target and the surrounding environment.

进一步地,步骤一的圆点阵列标靶,在材质上的要求为在光照较弱的应用场景下进行包括打光操作,保证标靶与周围环境产生高对比,或者步骤一的圆点阵列标靶直接使用LED屏投影图像,保证标靶与周围环境产生高对比。Furthermore, the dot array target in step 1 requires material requirements including lighting operations in application scenarios with weak light to ensure high contrast between the target and the surrounding environment, or the dot array target in step 1 The target directly uses the LED screen to project images to ensure high contrast between the target and the surrounding environment.

进一步地,步骤一的圆点阵列标靶以其最左上角圆点为原点,以其所在平面为平面建立世界坐标系后,所有圆点的坐标均通过包括测量方式获知,或者步骤一的圆点阵列标靶直接使用规则分布的点阵型圆点排布,简化标靶制作。Further, after the circle point array target in step 1 takes its upper left corner circle point as the origin and the plane where it is located as the plane to establish the world coordinate system, the coordinates of all circle points are obtained by including the measurement method, or the circle in step 1 The dot array target is directly arranged with regularly distributed dot matrix dots, which simplifies the production of the target.

进一步地,步骤四对圆点进行检测,是指对含有标靶的图像进行一系列图像处理操作,通过几何知识求出图像在其坐标系下各圆点的坐标,其具体步骤如下:Further, the step four is to detect the dots, which refers to performing a series of image processing operations on the image containing the target, and calculating the coordinates of each dot in the image in its coordinate system through geometric knowledge. The specific steps are as follows:

步骤七,通过定焦相机镜头相关参数计算内参矩阵K;Step 7, calculate the internal parameter matrix K through the relevant parameters of the fixed-focus camera lens;

步骤八,对定焦相机获取的图像进行灰度化处理和二值化处理;Step 8, performing grayscale processing and binarization processing on the image acquired by the fixed-focus camera;

步骤九,对图像进行椭圆检测,检测图像中的圆点;Step 9, perform ellipse detection on the image, and detect dots in the image;

步骤十,若步骤九中未能检测出所有的圆点,调节定焦相机镜头相关参数包括相机光圈参数重新检测,直到检测出所有的圆点;Step ten, if all the dots cannot be detected in step nine, adjust the relevant parameters of the fixed-focus camera lens including the camera aperture parameter and re-detect until all the dots are detected;

步骤十一,根据检测出的圆点集计算每个圆点对应的圆心坐标集。Step 11: Calculate the circle center coordinate set corresponding to each circle point according to the detected circle point set.

进一步地,步骤七的内参矩阵K根据定焦相机镜头相关参数包括定焦相机焦距、传感器单位像素的尺寸大小和输出图像的分辨率进行直接计算。对不同的定焦相机及相机镜头,应具有不同的内参矩阵,但对于同一款定焦相机及相机镜头,其内参矩阵不随其他参数变化而变化。Further, the internal reference matrix K in step 7 is directly calculated according to the relevant parameters of the fixed-focus camera lens, including the focal length of the fixed-focus camera, the size of the unit pixel of the sensor, and the resolution of the output image. Different fixed-focus cameras and camera lenses should have different internal reference matrices, but for the same fixed-focus camera and camera lens, the internal reference matrix does not change with other parameters.

进一步地,步骤八的灰度化处理是由定焦相机采集彩色图像进行灰度化后得到灰度图像或者由定焦相机直接采集灰度图像。Further, the grayscale processing in step 8 is to obtain a grayscale image after collecting the color image by the fixed-focus camera for grayscale or directly collect the grayscale image by the fixed-focus camera.

进一步地,步骤九的椭圆检测的具体步骤如下:Further, the specific steps of the ellipse detection in step nine are as follows:

步骤十二,首先对图像进行边缘检测,得到二值化的边缘轮廓图,存储边缘图上的点坐标集;Step 12, firstly, edge detection is performed on the image to obtain a binarized edge contour map, and a set of point coordinates on the edge map is stored;

步骤十三,对图像上的每一点,计算与步骤十二所得点坐标集中点的距离,输出其距离的最大值和最小值,即为椭圆中心(p,q),该距离的最大值即为椭圆长轴长度a;Step 13, for each point on the image, calculate the distance from the point in the point coordinate set obtained in step 12, and output the maximum and minimum values of the distance, which is the center of the ellipse (p, q), and the maximum value of the distance is is the length of the major axis of the ellipse a;

步骤十四,将点坐标集中每一点的数值与步骤十三所得的三个椭圆参数p、q、a代入椭圆方程,其方程为:In step fourteen, the value of each point in the point coordinate set and the three elliptic parameters p, q, and a obtained in step thirteen are substituted into the ellipse equation, and the equation is:

步骤十五,在二维参数空间上对参数b、θ进行统计,得到峰值超过一定阈值的一组参数,即为椭圆。In step fifteen, the parameters b and θ are counted in the two-dimensional parameter space, and a set of parameters whose peak value exceeds a certain threshold is obtained, which is an ellipse.

进一步地,步骤五的定焦相机外参矩阵计算方法如下:Further, the calculation method of the fixed-focus camera extrinsic parameter matrix in step five is as follows:

步骤十六,根据图像坐标系下的坐标与世界坐标系下的坐标对应关系,通过求解线性方程组得到外参矩阵[R T]的初值;Step sixteen, according to the corresponding relationship between the coordinates in the image coordinate system and the coordinates in the world coordinate system, the initial value of the external parameter matrix [RT] is obtained by solving the linear equation system;

步骤十七,利用非线性最小二乘法迭代求得最优变换矩阵[R T]。Step seventeen, iteratively obtain the optimal transformation matrix [R T] by nonlinear least squares method.

进一步地,步骤六的三维坐标计算方法如下:Further, the calculation method of the three-dimensional coordinates in step six is as follows:

根据在步骤五所得的外参矩阵,通过矩阵变换求解世界坐标系下任意已知点在相机坐标系下的相对坐标,以此求得目标三维坐标点集。According to the external parameter matrix obtained in step five, the relative coordinates of any known point in the world coordinate system in the camera coordinate system are obtained through matrix transformation, so as to obtain the target three-dimensional coordinate point set.

有益效果:Beneficial effect:

本发明通过对成像原理的应用,在单目视觉中引入标靶作为坐标约束,通过设定便于识别的标识物并利用计算机对标识物图像的精确提取获得准确的所需数据,简单有效地实现了高精度的距离测定。By applying the imaging principle, the present invention introduces a target as a coordinate constraint in monocular vision, and obtains accurate required data by setting markers that are easy to identify and using a computer to accurately extract the marker image, and realizes it simply and effectively. high-precision distance measurement.

附图说明Description of drawings

图1为本发明一实施例的流程图;Fig. 1 is a flowchart of an embodiment of the present invention;

图2为本发明一实施例的外参矩阵计算模块流程图。Fig. 2 is a flow chart of an extrinsic parameter matrix calculation module according to an embodiment of the present invention.

具体实施方式Detailed ways

下面结合附图和实施例对本发明进一步说明。The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

本实施例提出了一种基于定焦相机的对标靶三维坐标连续测量方法,它包括以下步骤:This embodiment proposes a method for continuous measurement of three-dimensional coordinates of a target based on a fixed-focus camera, which includes the following steps:

步骤一,在目标位置预先布置圆点阵列标靶。Step 1, pre-arranging the dot array target at the target position.

具体地,该标靶的大小应根据所选择定焦相机的焦距、测量距离等实际应用场景进行具体选择,须保证在测量范围内该标靶中所有圆点均在视频视野内,同时也应保证在视频视野内占据超过60%的大小,即该标靶在视频视野内既不能过大也不能过小。若在应用场景中环境光较弱,可使用补光措施将该标靶照亮,以造成该标靶与环境的强烈对比,也可直接使用LED显示屏并在其上显示标靶内容,通过调节亮度制造强对比。该标靶采用白色背景黑色圆点阵列或黑色背景白色圆点阵列均可,以下以白色背景黑色圆点阵列为例并结合图1进行说明。Specifically, the size of the target should be selected according to the actual application scenarios such as the focal length and measurement distance of the selected fixed-focus camera. It must be ensured that all the dots in the target are within the video field of view within the measurement range. It is guaranteed to occupy more than 60% of the size of the video field of view, that is, the target cannot be too large or too small in the video field of view. If the ambient light in the application scene is weak, the target can be illuminated by supplementary light measures to cause a strong contrast between the target and the environment, or the LED display can be used directly to display the content of the target on it, through Adjust the brightness to create strong contrast. The target can be an array of black dots on a white background or an array of white dots on a black background. The following uses an array of black dots on a white background as an example and will be described in conjunction with FIG. 1 .

S101,在该标靶选择完成之后,根据该标靶中的圆点坐标初始化坐标系,坐标系建立要求如下:以该标靶最左上角的圆点中心为原点,水平方向为y轴,垂直方向为x轴建立世界坐标系,单位长度为mm,并将所有圆点坐标输入坐标系,得到世界坐标系下的圆点坐标集。S101, after the selection of the target is completed, initialize the coordinate system according to the coordinates of the dots in the target. The direction is the x-axis to establish a world coordinate system, the unit length is mm, and all the dot coordinates are input into the coordinate system to obtain the dot coordinate set in the world coordinate system.

步骤二,通过定焦相机读入实时视频流。Step 2, read in the real-time video stream through the fixed-focus camera.

具体地,将定焦相机与计算机连接之后,通过计算机访问定焦相机获取的图像内容,视频传输速率可达到24fps以上。Specifically, after the fixed-focus camera is connected to the computer, the image content obtained by the fixed-focus camera can be accessed through the computer, and the video transmission rate can reach more than 24fps.

步骤三,将定焦相机对准圆点阵列标靶,适当调节定焦相机,使该标靶及其中的圆点全部进入定焦相机视野。Step 3: Aim the fixed-focus camera at the dot array target, and adjust the fixed-focus camera appropriately so that the target and the dots therein all enter the field of view of the fixed-focus camera.

S102,具体地,移动定焦相机或移动该标靶,使该标靶及其中的圆点均在视频视野内,同时也应保证在视频视野内占据超过60%的大小,即该标靶在视频视野内既不能过大也不能过小。对定焦相机的调节包括对相机光圈大小等参数的调整,本发明对于图像的清晰程度并无过高要求,只要求圆点均在图像内且不过分模糊即可,以能够准确检测出所有圆心坐标为基准。S102, specifically, move the fixed-focus camera or move the target so that the target and the dots therein are within the video field of view, and at the same time ensure that they occupy more than 60% of the video field of view, that is, the target is within the video field of view. The video field of view can neither be too large nor too small. The adjustment of the fixed-focus camera includes the adjustment of parameters such as the aperture size of the camera. The present invention does not have high requirements for the clarity of the image. It only requires that the dots are all in the image and not too blurred, so that all The coordinates of the center of the circle are the datum.

S103,步骤四,对定焦相机视野中的圆点进行计算,检测标圆点,计算圆心坐标。S103, Step 4, calculate the circular point in the field of view of the fixed-focus camera, detect the marked circular point, and calculate the coordinates of the center of the circle.

S104,具体地,对所使用定焦相机,首先计算定焦相机内参矩阵K。S104. Specifically, for the fixed-focus camera used, first calculate the intrinsic parameter matrix K of the fixed-focus camera.

其中,分别称为u轴和v轴上的归一化焦距;f是定焦相机的焦距,dX和dY分别表示传感器u轴和v轴上的单位像素的尺寸大小。u0和v0表示光学中心,即定焦相机光轴与图像平面的交点,通常位于图像中心处,故其值常取分辨率的一半。in, They are called the normalized focal length on the u-axis and v-axis respectively; f is the focal length of the fixed-focus camera, and dX and dY represent the size of the unit pixel on the u-axis and v-axis of the sensor, respectively. u 0 and v 0 represent the optical center, that is, the intersection point of the optical axis of the fixed-focus camera and the image plane, usually located at the center of the image, so their values are usually half of the resolution.

对于上述所需要的数值,应均可从定焦相机或相机镜头说明书中直接查询得到,代入计算即可。For the above-mentioned required values, they should be obtained directly from the manual of the fixed-focus camera or camera lens, and can be substituted into the calculation.

将内参矩阵K计算完毕后,对定焦相机获取的图像进行处理。如图2所示,具体操作如下:After the internal reference matrix K is calculated, the image acquired by the fixed-focus camera is processed. As shown in Figure 2, the specific operations are as follows:

S201,对定焦相机获取的图像进行灰度化处理和二值化处理。此处额外说明,对于源图像若直接采集到的即为单通道灰度图像,可略去灰度化处理的步骤,若为三通道图像,则须进行灰度化操作。S201. Perform grayscale processing and binarization processing on an image acquired by a fixed-focus camera. It is additionally explained here that if the source image is directly collected as a single-channel grayscale image, the step of grayscale processing can be omitted; if it is a three-channel image, grayscale operation must be performed.

S202,将灰度图像进行二值化处理,根据如下公式:S202. Binarize the grayscale image according to the following formula:

其中所使用阈值可直接采用127作为参数传入。The threshold used can be directly passed in as a parameter by using 127.

S203,调节定焦相机参数,对图像进行椭圆检测,检测图像中的圆点,具体步骤如下:S203, adjusting the parameters of the fixed-focus camera, performing ellipse detection on the image, and detecting dots in the image, the specific steps are as follows:

设椭圆方程为 Let the elliptic equation be

首先对原图像进行边缘检测,得到二值化的边缘轮廓图,存储边缘图上的点坐标集。First, edge detection is performed on the original image to obtain a binarized edge contour map, and the point coordinates on the edge map are stored.

对图像上的每一点,计算与上一步所得点坐标集中点的距离,输出其距离的最大值和最小值,即为椭圆中心(p,q),该最大距离即为椭圆长轴长度a。For each point on the image, calculate the distance from the points in the point coordinate set obtained in the previous step, and output the maximum and minimum values of the distance, which is the center of the ellipse (p, q), and the maximum distance is the length a of the major axis of the ellipse.

将点坐标集中每一点的数值和上一步得到的三个椭圆参数p、q、a代入上述椭圆方程。Substitute the value of each point in the point coordinate set and the three ellipse parameters p, q, and a obtained in the previous step into the above ellipse equation.

在二维参数空间上对参数b、θ进行统计,得到峰值超过一定阈值的一组参数,即为椭圆集合。The parameters b and θ are counted in the two-dimensional parameter space, and a set of parameters whose peak value exceeds a certain threshold is obtained, which is the ellipse set.

S204,根据检测出的圆点集计算每个圆点对应的圆心坐标集。S204. Calculate a circle center coordinate set corresponding to each circle point according to the detected circle point set.

S105,步骤五,根据得到的圆心坐标计算相机外参矩阵,计算方法如下:S105, step five, calculate the camera extrinsic parameter matrix according to the obtained circle center coordinates, the calculation method is as follows:

根据图像坐标系下的坐标与世界坐标系下的坐标对应关系,通过求解线性方程组得到[RT]的初值。According to the corresponding relationship between the coordinates in the image coordinate system and the coordinates in the world coordinate system, the initial value of [RT] is obtained by solving the linear equations.

利用非线性最小二乘法迭代求得最优变换矩阵[RT]。The optimal transformation matrix [RT] is obtained iteratively by nonlinear least squares method.

S106,步骤六,根据定焦相机外参矩阵计算三维坐标。S106, Step 6, calculating three-dimensional coordinates according to the fixed-focus camera extrinsic parameter matrix.

根据在步骤五所求得的外参矩阵,可求解世界坐标系下任意已知点在相机坐标系下的相对坐标。对世界坐标下任意一点有相机坐标系下点满足According to the external parameter matrix obtained in step five, the relative coordinates of any known point in the world coordinate system in the camera coordinate system can be obtained. For any point in world coordinates There is a point in the camera coordinate system Satisfy

其中K为所求内参矩阵,[R T]为所求外参矩阵,根据上式即可完成计算。默认地,可直接输入坐标则输出的三维坐标值表示该标靶最左上角的圆点相对相机坐标系的三维坐标。Among them, K is the desired internal reference matrix, [RT] is the desired external parameter matrix, and the calculation can be completed according to the above formula. By default, the coordinates can be entered directly Then the output 3D coordinate value represents the 3D coordinate of the circle point in the upper left corner of the target relative to the camera coordinate system.

对本发明保护范围的限制,所属领域技术人员应该明白,在本发明的技术方案的基础上,本领域技术人员不需要付出创造性劳动即可做出的各种修改或变形仍在本发明的保护范围以内。For the limitation of the protection scope of the present invention, those skilled in the art should understand that on the basis of the technical solution of the present invention, various modifications or deformations that those skilled in the art can make without creative labor are still within the protection scope of the present invention within.

Claims (10)

1. A method for continuously measuring three-dimensional coordinates of a target based on a fixed-focus camera is characterized by comprising the following steps:
firstly, prearranging a dot array target at a target position;
reading in a real-time video stream through a fixed-focus camera;
step three, aligning the fixed focus camera to the dot array target, and properly adjusting the fixed focus camera to enable all dots in the dot array target to enter the view field of the fixed focus camera;
calculating dots in the field of view of the fixed-focus camera, detecting the target dots, and calculating the coordinates of the circle center;
calculating an external parameter matrix of the fixed focus camera according to the obtained circle center coordinates;
and step six, calculating three-dimensional coordinates according to the fixed-focus camera external parameter matrix.
2. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera according to claim 1, wherein the target shape of the dot array of the first step is a regular shape for easy identification;
all dots in the dot array target in the first step are in the video view field of image acquisition and output of the dot array target in the third step, and the dot array target occupies more than 60% of the video view field;
the dot array target of step one has a high contrast with the surrounding environment.
3. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera as claimed in claim 2, wherein the dot array target of the first step is subjected to a lighting operation under the application scene with weak light to generate high contrast with the surrounding environment, or the dot array target of the first step is directly projected by using an LED screen to generate high contrast with the surrounding environment.
4. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera as claimed in claim 2, wherein the dot array target of the first step is obtained by taking the leftmost dot as the origin and the plane where the dot array target is located as the plane to establish the world coordinate system, and then the coordinates of all the dots are obtained by a measurement method, or the dot array target of the first step is directly arranged by using regularly distributed dot array type dots.
5. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera according to claim 1, wherein the fourth step of detecting the dots comprises the following specific steps:
step seven, calculating an internal parameter matrix K according to the relevant parameters of the lens of the fixed-focus camera;
eighthly, carrying out gray processing and binarization processing on the image acquired by the fixed-focus camera;
step nine, carrying out ellipse detection on the image, and detecting dots in the image;
step ten, if all the round points cannot be detected in the step nine, adjusting relevant parameters of the fixed-focus camera lens, including camera aperture parameters, to detect again until all the round points are detected;
and step eleven, calculating a circle center coordinate set corresponding to each dot according to the detected dot set.
6. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera as claimed in claim 5, wherein the reference matrix K of the seventh step is directly calculated according to the relevant parameters of the fixed-focus camera lens, including the focal length of the fixed-focus camera, the size of the unit pixel of the sensor and the resolution of the output image.
7. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera as claimed in claim 5, wherein the graying processing of the step eight is to acquire the gray image after the color image is grayed by the fixed-focus camera or directly acquire the gray image by the fixed-focus camera.
8. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera according to claim 5, wherein the ellipse detection of the ninth step comprises the following specific steps:
step twelve, firstly, carrying out edge detection on the image to obtain a binary edge profile map, and storing a point coordinate set on the edge map;
step thirteen, calculating the distance between each point on the image and the point coordinate concentration point obtained in the step twelve, and outputting the maximum value and the minimum value of the distance, namely the center (p, q) of the ellipse, wherein the maximum value of the distance is the length a of the long axis of the ellipse;
step fourteen, substituting the numerical value of each point in the point coordinate set and the three ellipse parameters p, q and a obtained in the step thirteen into an ellipse equation, wherein the equation is as follows:
<mrow> <mfrac> <msup> <mrow> <mo>&amp;lsqb;</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>-</mo> <mi>P</mi> <mo>)</mo> </mrow> <mi>c</mi> <mi>o</mi> <mi>s</mi> <mi>&amp;theta;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mi>y</mi> <mo>-</mo> <mi>Q</mi> <mo>)</mo> </mrow> <mi>s</mi> <mi>i</mi> <mi>n</mi> <mi>&amp;theta;</mi> <mo>&amp;rsqb;</mo> </mrow> <mn>2</mn> </msup> <msup> <mi>a</mi> <mn>2</mn> </msup> </mfrac> <mo>+</mo> <mfrac> <msup> <mrow> <mo>&amp;lsqb;</mo> <mo>-</mo> <mrow> <mo>(</mo> <mi>x</mi> <mo>-</mo> <mi>P</mi> <mo>)</mo> </mrow> <mi>s</mi> <mi>i</mi> <mi>n</mi> <mi>&amp;theta;</mi> <mo>+</mo> <mrow> <mo>(</mo> <mi>y</mi> <mo>-</mo> <mi>Q</mi> <mo>)</mo> </mrow> <mi>c</mi> <mi>o</mi> <mi>s</mi> <mi>&amp;theta;</mi> <mo>&amp;rsqb;</mo> </mrow> <mn>2</mn> </msup> <msup> <mi>b</mi> <mn>2</mn> </msup> </mfrac> <mo>=</mo> <mn>1</mn> <mo>;</mo> </mrow>
and step fifteen, counting the parameters b and theta in a two-dimensional parameter space to obtain a group of parameters with peak values exceeding a certain threshold value, namely the ellipse.
9. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera according to claim 1, wherein the method for calculating the external reference matrix of the fixed-focus camera in the fifth step is as follows:
sixthly, according to the corresponding relation between the coordinates in the image coordinate system and the coordinates in the world coordinate system, solving a linear equation set to obtain an initial value of an external parameter matrix [ R T ];
seventhly, iteration is carried out by utilizing a nonlinear least square method to obtain an optimal transformation matrix [ R T ].
10. The method for continuously measuring the three-dimensional coordinates of the target based on the fixed-focus camera according to claim 1, wherein the three-dimensional coordinate calculation method in the sixth step is as follows:
and D, solving the relative coordinates of any known point in the world coordinate system in the camera coordinate system through matrix transformation according to the external reference matrix obtained in the step five, so as to obtain a target three-dimensional coordinate point set.
CN201711179983.XA 2017-11-23 2017-11-23 It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring Pending CN107991665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711179983.XA CN107991665A (en) 2017-11-23 2017-11-23 It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711179983.XA CN107991665A (en) 2017-11-23 2017-11-23 It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring

Publications (1)

Publication Number Publication Date
CN107991665A true CN107991665A (en) 2018-05-04

Family

ID=62032533

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711179983.XA Pending CN107991665A (en) 2017-11-23 2017-11-23 It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring

Country Status (1)

Country Link
CN (1) CN107991665A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109176305A (en) * 2018-09-29 2019-01-11 东莞市照亮智能装备科技有限公司 A kind of robot three-dimensional correction positioning device and method
CN110125662A (en) * 2019-03-19 2019-08-16 浙江大学山东工业技术研究院 Sound film top dome automatic setup system
CN110838147A (en) * 2019-10-25 2020-02-25 深圳信息职业技术学院 Camera module detection method and device
CN111562791A (en) * 2019-03-22 2020-08-21 沈阳上博智像科技有限公司 System and method for identifying visual auxiliary landing of unmanned aerial vehicle cooperative target
CN111641812A (en) * 2020-05-29 2020-09-08 西安应用光学研究所 Multi-camera array arrangement method suitable for airborne wide-area reconnaissance and monitoring
CN114087989A (en) * 2021-11-19 2022-02-25 江苏理工学院 Method and system for measuring three-dimensional coordinates of circle center of workpiece positioning hole of automobile cylinder
CN117190875A (en) * 2023-09-08 2023-12-08 重庆交通大学 A bridge tower displacement measurement device and method based on computer intelligent vision
CN118774831A (en) * 2024-06-14 2024-10-15 中南大学 Tunnel face blasthole morphology measurement method, readable storage medium and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102376089A (en) * 2010-12-09 2012-03-14 深圳大学 Target correction method and system
CN102654391A (en) * 2012-01-17 2012-09-05 深圳大学 Stripe projection three-dimensional measurement system based on bundle adjustment principle and calibration method thereof
CN102980542A (en) * 2012-10-31 2013-03-20 天津大学 Multiple-sensor united calibration method
CN103438900A (en) * 2013-07-25 2013-12-11 航天恒星科技有限公司 Three-line-array camera image collaborative absolute radiometric calibration and compensation method
CN104331875A (en) * 2014-09-01 2015-02-04 深圳市圳天元科技开发有限责任公司 Reflection target positioned by utilizing polar coordinate and image identification method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102376089A (en) * 2010-12-09 2012-03-14 深圳大学 Target correction method and system
CN102654391A (en) * 2012-01-17 2012-09-05 深圳大学 Stripe projection three-dimensional measurement system based on bundle adjustment principle and calibration method thereof
CN102980542A (en) * 2012-10-31 2013-03-20 天津大学 Multiple-sensor united calibration method
CN103438900A (en) * 2013-07-25 2013-12-11 航天恒星科技有限公司 Three-line-array camera image collaborative absolute radiometric calibration and compensation method
CN104331875A (en) * 2014-09-01 2015-02-04 深圳市圳天元科技开发有限责任公司 Reflection target positioned by utilizing polar coordinate and image identification method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
何国辉等: ""基于圆点阵列的多相机外部参数标定"", 《五邑大学学报(自然科学版)》 *
夏瑞雪等: ""基于圆点阵列靶标的特征点坐标自动提取方法"", 《中国机械工程》 *
边心田等: ""基于液晶标靶的坐标测量方法"", 《淮阴师范学院学报( 自然科学)》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109176305A (en) * 2018-09-29 2019-01-11 东莞市照亮智能装备科技有限公司 A kind of robot three-dimensional correction positioning device and method
CN109176305B (en) * 2018-09-29 2024-04-16 照亮智能装备(江门)有限公司 Robot three-dimensional deviation correcting and positioning equipment and method
CN110125662A (en) * 2019-03-19 2019-08-16 浙江大学山东工业技术研究院 Sound film top dome automatic setup system
CN111562791A (en) * 2019-03-22 2020-08-21 沈阳上博智像科技有限公司 System and method for identifying visual auxiliary landing of unmanned aerial vehicle cooperative target
CN110838147A (en) * 2019-10-25 2020-02-25 深圳信息职业技术学院 Camera module detection method and device
CN110838147B (en) * 2019-10-25 2022-07-05 深圳信息职业技术学院 Camera module detection method and device
CN111641812A (en) * 2020-05-29 2020-09-08 西安应用光学研究所 Multi-camera array arrangement method suitable for airborne wide-area reconnaissance and monitoring
CN111641812B (en) * 2020-05-29 2021-09-10 西安应用光学研究所 Multi-camera array arrangement method suitable for airborne wide-area reconnaissance and monitoring
CN114087989A (en) * 2021-11-19 2022-02-25 江苏理工学院 Method and system for measuring three-dimensional coordinates of circle center of workpiece positioning hole of automobile cylinder
CN114087989B (en) * 2021-11-19 2023-09-22 江苏理工学院 Method and system for measuring three-dimensional coordinates of circle center of positioning hole of automobile cylinder workpiece
CN117190875A (en) * 2023-09-08 2023-12-08 重庆交通大学 A bridge tower displacement measurement device and method based on computer intelligent vision
CN118774831A (en) * 2024-06-14 2024-10-15 中南大学 Tunnel face blasthole morphology measurement method, readable storage medium and device

Similar Documents

Publication Publication Date Title
CN107991665A (en) It is a kind of based on fixed-focus camera to target three-dimensional coordinate method for continuous measuring
CN111563923B (en) Method for obtaining dense depth map and related device
CN111311689B (en) Method and system for calibrating relative external parameters of laser radar and camera
CN110657785B (en) Efficient scene depth information acquisition method and system
CN110136182B (en) Registration method, device, equipment and medium for laser point cloud and 2D image
CN109186491B (en) Parallel multi-line laser measurement system and measurement method based on homography matrix
CN110889829B (en) A monocular distance measurement method based on fisheye lens
CN105203034B (en) A kind of survey height survey area method based on monocular cam three-dimensional ranging model
CN102496015B (en) High-precision method for quickly positioning centers of two-dimensional Gaussian distribution spot images
CN107270810B (en) The projector calibrating method and device of multi-faceted projection
CN108805934A (en) A kind of method for calibrating external parameters and device of vehicle-mounted vidicon
CN112132900B (en) Visual repositioning method and system
CN106600648A (en) Stereo coding target for calibrating internal parameter and distortion coefficient of camera and calibration method thereof
CN106548489A (en) The method for registering of a kind of depth image and coloured image, three-dimensional image acquisition apparatus
CN114413958A (en) Monocular vision distance and speed measurement method of unmanned logistics vehicle
CN105069789B (en) Structure light dynamic scene depth acquisition methods based on coding grid template
CN1801896A (en) Video camera rating data collecting method and its rating plate
CN105184857A (en) Scale factor determination method in monocular vision reconstruction based on dot structured optical ranging
CN106296811A (en) A kind of object three-dimensional reconstruction method based on single light-field camera
CN105513074B (en) A kind of scaling method of shuttlecock robot camera and vehicle body to world coordinate system
CN110148099A (en) Modification method and device, electronic equipment, the computer-readable medium of projection relation
US20220254065A1 (en) Camera calibration method and apparatus and electronic device
CN111738035A (en) Calculation method, device and equipment for vehicle yaw angle
CN112489141B (en) Production line calibration method and device for single-board single-image strip relay lens of vehicle-mounted camera
CN108596960B (en) Sub-aperture image alignment method of light field camera

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180504