[go: up one dir, main page]

CN105333818A - 3D space measurement method based on monocular camera - Google Patents

3D space measurement method based on monocular camera Download PDF

Info

Publication number
CN105333818A
CN105333818A CN201410339869.9A CN201410339869A CN105333818A CN 105333818 A CN105333818 A CN 105333818A CN 201410339869 A CN201410339869 A CN 201410339869A CN 105333818 A CN105333818 A CN 105333818A
Authority
CN
China
Prior art keywords
point
measured
camera
axis
distance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410339869.9A
Other languages
Chinese (zh)
Other versions
CN105333818B (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 Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN201410339869.9A priority Critical patent/CN105333818B/en
Publication of CN105333818A publication Critical patent/CN105333818A/en
Application granted granted Critical
Publication of CN105333818B publication Critical patent/CN105333818B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Other Investigation Or Analysis Of Materials By Electrical Means (AREA)

Abstract

本发明提供一种基于单目摄像机的3D空间测量方法,包括:分别对地面上的待测点和辅助测试点对焦,获取对应成像参数,其中,辅助测试点位于摄像机光轴在地面的投影线上,待测点与辅助测试点物距不同,且两次成像的摄像机安装参数不变;根据待测点和辅助测试点的成像参数,对两次成像进行关联计算,获得待测点的相对坐标,相对坐标的参考坐标系为,以摄像机安装支点在地面的投影为原点,以该支点与地面的垂线为Y轴,以摄像机光轴沿地面的投影为X轴,以与X轴和Y轴垂直的方向为Z轴。本发明利用单目摄像机的内部参数计算待测点的空间坐标,无需测量摄像机的安装参数以及对标定物进行标定,节省了成本,简化了操作。

The present invention provides a 3D space measurement method based on a monocular camera, comprising: respectively focusing on the points to be measured and auxiliary test points on the ground to obtain corresponding imaging parameters, wherein the auxiliary test points are located on the projection line of the optical axis of the camera on the ground In the above, the object distance between the point to be measured and the auxiliary test point is different, and the camera installation parameters of the two imaging remain unchanged; according to the imaging parameters of the point to be measured and the auxiliary test point, the correlation calculation is performed on the two imaging to obtain the relative distance of the point to be measured Coordinates, the reference coordinate system of the relative coordinates is, the projection of the fulcrum of the camera on the ground is the origin, the vertical line between the fulcrum and the ground is the Y axis, the projection of the optical axis of the camera along the ground is the X axis, and the X axis and the The direction perpendicular to the Y axis is the Z axis. The invention uses the internal parameters of the monocular camera to calculate the spatial coordinates of the point to be measured, without measuring the installation parameters of the camera and calibrating the calibration object, which saves the cost and simplifies the operation.

Description

基于单目摄像机的3D空间测量方法3D space measurement method based on monocular camera

技术领域technical field

本发明涉及视频监控领域,尤其涉及一种基于单目摄像机的3D空间测量方法。The invention relates to the field of video monitoring, in particular to a 3D space measurement method based on a monocular camera.

背景技术Background technique

单目摄像机通过单次拍摄无法形成3D视觉。在没有预知尺寸的参考物体进行辅助测量,也不知道摄像机架设高度和镜头中轴线与地面的夹角时,无法测量被拍摄物体与摄像机安装点之间的相对坐标。Monocular cameras cannot form 3D vision through a single shot. When there is no reference object of predicted size for auxiliary measurement, and the height of the camera erection and the angle between the central axis of the lens and the ground are not known, the relative coordinates between the object to be photographed and the installation point of the camera cannot be measured.

现有技术中,单目摄像机单次拍摄时,通过拍摄预知尺寸的参考物体,根据图像中被拍摄的参考物体所占的像素、实际物体尺寸、摄像机与地面的夹角,计算出物体尺寸与摄像机拍摄图像的像素之间的比例关系。然后,在后续的拍摄中,不改变摄像机的安装参数,只需要按照被拍摄物所占的像素个数计算出物体的实际尺寸。通过摄像机与地面的夹角和架设杆的高度,可以计算出被拍摄物体与摄像机之间的相对坐标。In the prior art, when a monocular camera takes a single shot, by shooting a reference object with a predetermined size, the object size and The proportional relationship between the pixels of the image captured by the camera. Then, in the subsequent shooting, without changing the installation parameters of the camera, it is only necessary to calculate the actual size of the object according to the number of pixels occupied by the object to be photographed. Through the angle between the camera and the ground and the height of the erection pole, the relative coordinates between the object to be photographed and the camera can be calculated.

通过上述过程可以看出,单目摄像机单次拍摄需要具备很多外在条件,需要摄像机安装数据,如架设杆高度、摄像机与地面的夹角;需要使用标定物,人工进行辅助标定计算得到换算参数;后续使用中不能改变摄像机安装参数,否则必须重新标定,适应性不好。Through the above process, it can be seen that a single shot of a monocular camera requires many external conditions, and requires camera installation data, such as the height of the erection pole, the angle between the camera and the ground; calibration objects are required, and manual auxiliary calibration calculations are required to obtain conversion parameters ;The installation parameters of the camera cannot be changed in the subsequent use, otherwise it must be re-calibrated, and the adaptability is not good.

或者现有技术通过双眼摄像机拍摄同一物体,或单目摄像机在两个不同的位置与角度拍摄同一物体,通过在图像中的不同位置,实现3D视觉感知。但是必须使用两个摄像机,或是为单个摄像机提供移动的导轨及驱动装置,成本较高。Or in the prior art, binocular cameras shoot the same object, or a monocular camera shoots the same object at two different positions and angles, and realize 3D visual perception through different positions in the image. However, two cameras must be used, or a moving guide rail and a driving device must be provided for a single camera, and the cost is relatively high.

发明内容Contents of the invention

有鉴于此,本发明提供了一种基于单目摄像机的3D空间测量方法,该方法包括:In view of this, the present invention provides a method for measuring 3D space based on a monocular camera, the method comprising:

分别对地面上的待测点和辅助测试点对焦,获取对应成像参数,其中,所述辅助测试点位于摄像机光轴在地面的投影线上,所述待测点与所述辅助测试点物距不同,且两次成像的摄像机安装参数不变;Focus on the point to be measured and the auxiliary test point on the ground respectively, and obtain corresponding imaging parameters, wherein the auxiliary test point is located on the projection line of the optical axis of the camera on the ground, and the object distance between the point to be measured and the auxiliary test point is different, and the camera installation parameters of the two imaging remain unchanged;

根据所述待测点和所述辅助测试点的成像参数,对两次成像进行关联计算,获得所述待测点的相对坐标,所述相对坐标的参考坐标系为,以摄像机安装支点在地面的投影为原点,以该支点与地面的垂线为Y轴,以摄像机光轴沿地面的投影为X轴,以与X轴和Y轴垂直的方向为Z轴。According to the imaging parameters of the point to be measured and the auxiliary test point, the two images are correlated and calculated to obtain the relative coordinates of the point to be measured. The reference coordinate system of the relative coordinates is that the fulcrum of the camera is installed on the ground The projection of the fulcrum is the origin, the vertical line between the fulcrum and the ground is the Y axis, the projection of the optical axis of the camera along the ground is the X axis, and the direction perpendicular to the X and Y axes is the Z axis.

本发明还提供了一种基于单目摄像机的3D空间测量装置,该装置包括:The present invention also provides a 3D space measuring device based on a monocular camera, the device comprising:

成像参数获取单元,用于分别对地面上的待测点和辅助测试点对焦,获取对应成像参数,其中,所述辅助测试点位于摄像机光轴在地面的投影线上,所述待测点与所述辅助测试点物距不同,且两次成像的摄像机安装参数不变;The imaging parameter acquisition unit is used to respectively focus on the point to be measured and the auxiliary test point on the ground to obtain corresponding imaging parameters, wherein the auxiliary test point is located on the projection line of the optical axis of the camera on the ground, and the point to be measured is connected to the projection line of the ground. The object distance of the auxiliary test points is different, and the camera installation parameters of the two imaging are unchanged;

相对坐标计算单元,用于根据所述待测点和所述辅助测试点的成像参数,对两次成像进行关联计算,获得所述待测点的相对坐标,所述相对坐标的参考坐标系为,以摄像机安装支点在地面的投影为原点,以该支点与地面的垂线为Y轴,以摄像机光轴沿地面的投影为X轴,以与X轴和Y轴垂直的方向为Z轴。The relative coordinate calculation unit is used to perform correlation calculation on the two imaging according to the imaging parameters of the point to be measured and the auxiliary test point to obtain the relative coordinates of the point to be measured, and the reference coordinate system of the relative coordinates is , taking the projection of the camera installation fulcrum on the ground as the origin, taking the vertical line between the fulcrum and the ground as the Y axis, taking the projection of the camera optical axis along the ground as the X axis, and taking the direction perpendicular to the X and Y axes as the Z axis.

本发明利用单目摄像机的内部参数计算待测点的空间相对坐标,而无需测量摄像机的安装参数以及对标定物进行标定,节省了人力、物力以及时间成本,简化的操作过程。The present invention uses the internal parameters of the monocular camera to calculate the spatial relative coordinates of the points to be measured without measuring the installation parameters of the camera and calibrating the calibration object, saving manpower, material resources and time costs, and simplifying the operation process.

附图说明Description of drawings

图1是本发明一种实施方式中基于单目摄像机的3D空间测量的逻辑结构及其基础硬件环境的示意图。Fig. 1 is a schematic diagram of the logical structure and basic hardware environment of 3D space measurement based on a monocular camera in an embodiment of the present invention.

图2是本发明一种实施方式中基于单目摄像机的3D空间测量方法的流程图。Fig. 2 is a flowchart of a 3D space measurement method based on a monocular camera in an embodiment of the present invention.

图3是单目摄像机安装示意图。Figure 3 is a schematic diagram of the installation of a monocular camera.

图4是本发明一种实施方式中光学成像示意图。Fig. 4 is a schematic diagram of optical imaging in an embodiment of the present invention.

图5是本发明一种实施方式中成像点在图像采集传感器的Y轴方向的像高示意图。Fig. 5 is a schematic diagram of the image height of the imaging point in the Y-axis direction of the image acquisition sensor in an embodiment of the present invention.

图6是透镜成像原理示意图。Fig. 6 is a schematic diagram of the principle of lens imaging.

图7是本发明一种实施方式中成像点在图像采集传感器的Z轴方向的像高示意图。Fig. 7 is a schematic diagram of the image height of the imaging point in the Z-axis direction of the image acquisition sensor in an embodiment of the present invention.

具体实施方式detailed description

以下结合附图对本发明进行详细说明。The present invention will be described in detail below in conjunction with the accompanying drawings.

本发明提供一种基于单目摄像机的3D空间测量装置,以下以软件实现为例进行说明,但是本发明并不排除诸如硬件或者逻辑器件等其他实现方式。如图1所示,该装置运行的硬件环境包括CPU、内存、非易失性存储器以及其他硬件。该装置作为一个逻辑层面的虚拟装置,其通过CPU来运行。该装置包括成像参数获取单元和相对坐标计算单元。请参考图2,该装置的使用和运行过程包括以下步骤:The present invention provides a 3D space measurement device based on a monocular camera. The software implementation is taken as an example for description below, but the present invention does not exclude other implementations such as hardware or logic devices. As shown in FIG. 1 , the hardware environment in which the device operates includes CPU, memory, non-volatile memory and other hardware. The device acts as a virtual device on a logical level, which runs through the CPU. The device includes an imaging parameter acquisition unit and a relative coordinate calculation unit. Please refer to Fig. 2, the use and operation process of this device comprises the following steps:

步骤101,成像参数获取单元分别对地面上的待测点和辅助测试点对焦,获取对应成像参数,其中,所述辅助测试点位于摄像机光轴在地面的投影线上,所述待测点与所述辅助测试点物距不同,且两次成像的摄像机安装参数不变;Step 101, the imaging parameter acquisition unit focuses on the point to be measured and the auxiliary test point on the ground respectively, and obtains corresponding imaging parameters, wherein the auxiliary test point is located on the projection line of the optical axis of the camera on the ground, and the point to be measured and the auxiliary test point are located on the projection line of the ground. The object distance of the auxiliary test points is different, and the camera installation parameters of the two imaging are unchanged;

步骤102,相对坐标计算单元根据所述待测点和所述辅助测试点的成像参数,对两次成像进行关联计算,获得所述待测点的相对坐标,所述相对坐标的参考坐标系为,以摄像机安装支点在地面的投影为原点,以该支点与地面的垂线为Y轴,以摄像机光轴沿地面的投影为X轴,以与X轴和Y轴垂直的方向为Z轴。Step 102, the relative coordinate calculation unit performs correlation calculation on the two imaging according to the imaging parameters of the point to be measured and the auxiliary test point, and obtains the relative coordinates of the point to be measured, and the reference coordinate system of the relative coordinates is , taking the projection of the camera installation fulcrum on the ground as the origin, taking the vertical line between the fulcrum and the ground as the Y axis, taking the projection of the camera optical axis along the ground as the X axis, and taking the direction perpendicular to the X and Y axes as the Z axis.

本发明在不改变单目摄像机安装参数(位置、高度、云台角度等)的情况下,对待测点及辅助测试点进行成像,并根据成像参数对两次成像进行关联计算,获得待测点的空间坐标。具体处理过程如下。The present invention performs imaging on the points to be measured and auxiliary test points without changing the installation parameters (position, height, pan-tilt angle, etc.) of the monocular camera, and performs correlation calculation on the two imaging according to the imaging parameters to obtain the points to be measured space coordinates. The specific process is as follows.

如图3所示,单目摄像机通过立杆垂直安装于E点。以E点为原点建立参考坐标系,计算待测点相对于该坐标系的位置坐标。该坐标系的X轴为摄像机光轴方向在地面的投影,Y轴为立杆方向,Z轴垂直于XY平面。图中物体AD与地面的交点A为待测点,地面上的B点为辅助测试点,在摄像机光轴沿地面的投影上。As shown in Figure 3, the monocular camera is vertically installed at point E through a pole. Establish a reference coordinate system with point E as the origin, and calculate the position coordinates of the points to be measured relative to the coordinate system. The X-axis of the coordinate system is the projection of the optical axis direction of the camera on the ground, the Y-axis is the direction of the pole, and the Z-axis is perpendicular to the XY plane. The intersection A of the object AD and the ground in the figure is the point to be tested, and the point B on the ground is the auxiliary test point, which is on the projection of the optical axis of the camera along the ground.

如图4所示,图中给出了摄像机的简易结构,其中,镜头光学中心为摄像机镜头多镜片所形成的虚拟光学中心,镜头光学中心与摄像机安装支点的距离(沿摄像机光轴方向)为r,前后两次成像可能有所变动。为摄像机光轴与地面的夹角。As shown in Figure 4, the simple structure of the camera is shown in the figure, where the optical center of the lens is the virtual optical center formed by the multiple lenses of the camera lens, and the distance between the optical center of the lens and the fulcrum of the camera (along the direction of the optical axis of the camera) is r, there may be some changes in the two imaging before and after. is the angle between the optical axis of the camera and the ground.

在不改变摄像机安装参数(高度、光轴角度、方向)的情况下,利用单目摄像机分别对A点和B点对焦,获取对应成像参数。A点在图像传感器上的成像点为a点,B点在图像传感器上的成像点为b点,像与物均投射到与光轴垂直的平面上,以便于计算推导。P1为一次成像物平面,即A点所在物平面;P2为二次成像物平面,即B点所在物平面。由此得到,一次成像的像距V1、焦距F1以及镜头光学中心与安装支点的距离r1;二次成像的像距V2、焦距F2以及镜头光学中心与安装支点的距离r2Without changing the camera installation parameters (height, optical axis angle, direction), use the monocular camera to focus on point A and point B respectively, and obtain the corresponding imaging parameters. The imaging point of point A on the image sensor is point a, and the imaging point of point B on the image sensor is point b. Both the image and the object are projected on a plane perpendicular to the optical axis for easy calculation and derivation. P 1 is the primary imaging object plane, that is, the object plane where point A is located; P 2 is the secondary imaging object plane, that is, the object plane where point B is located. Thus, the primary imaging image distance V 1 , focal length F 1 and the distance r 1 between the lens optical center and the mounting fulcrum; the secondary imaging image distance V 2 , focal length F 2 and the distance r 2 between the lens optical center and the mounting fulcrum .

根据成像点在图像传感器中的位置计算像高,如图5所示。图中上方的成像点为b点,下方成像点为a点。根据物理尺寸与沿物理尺寸方向对应像素点数量成正比关系,计算成像点沿XY平面的物理尺寸(像高)。图中S为图像传感器沿XY平面有效像素范围的物理尺寸;S1为a点距离图像传感器中心水平线的垂直距离,即A点的成像高度;S2为b点距离图像传感器中心水平线的垂直距离,即B点的成像高度。The image height is calculated according to the position of the imaging point in the image sensor, as shown in Figure 5. The upper imaging point in the figure is point b, and the lower imaging point is point a. According to the proportional relationship between the physical size and the number of corresponding pixel points along the physical size direction, the physical size (image height) of the imaging point along the XY plane is calculated. In the figure, S is the physical size of the effective pixel range of the image sensor along the XY plane; S 1 is the vertical distance from point a to the horizontal line of the center of the image sensor, that is, the imaging height of point A; S 2 is the vertical distance from point b to the horizontal line of the center of the image sensor , that is, the imaging height of point B.

通过上述过程,获得A点对应的像距V1、焦距F1、像高S1以及镜头光学中心与安装支点的距离r1;获得B点对应的像距V2、焦距F2、像高S2以及镜头光学中心与安装支点的距离r2。根据上述成像参数对两次成像进行关联计算,获得待测点A的相对坐标。以下结合图4具体介绍计算过程。Through the above process, obtain the image distance V 1 , focal length F 1 , image height S 1 corresponding to point A, and the distance r 1 between the optical center of the lens and the mounting fulcrum; obtain the image distance V 2 , focal length F 2 , and image height corresponding to point B S 2 and the distance r 2 between the optical center of the lens and the mounting fulcrum. The relative coordinates of the point A to be measured are obtained by performing correlation calculation on the two imaging parameters according to the above imaging parameters. The calculation process will be described in detail below in conjunction with FIG. 4 .

根据高斯成像公式According to the Gaussian imaging formula

11 Ff == 11 Uu ++ 11 VV -- -- -- (( 11 ))

分别计算A点的物距U1和B点的物距U2 Calculate the object distance U 1 of point A and the object distance U 2 of point B respectively

Uu 11 == VV 11 Ff 11 VV 11 -- Ff 11 -- -- -- (( 22 ))

Uu 22 == VV 22 Ff 22 VV 22 -- Ff 22 -- -- -- (( 33 ))

从而得到两次成像的物平面之间的距离(沿光轴方向)为:Thus, the distance (along the direction of the optical axis) between the two imaging object planes is:

jj ++ mm == (( Uu 11 ++ rr 11 )) -- (( Uu 22 ++ rr 22 )) == VV 11 Ff 11 VV 11 -- Ff 11 -- VV 22 Ff 22 VV 22 -- Ff 22 ++ (( rr 11 -- rr 22 )) -- -- -- (( 44 ))

根据图6所示透镜成像原理According to the lens imaging principle shown in Figure 6

分别求A点和B点相对于摄像机光轴的物高,即图4中的n和k的值Find the object heights of point A and point B relative to the optical axis of the camera, that is, the values of n and k in Figure 4

nno == Uu 11 VV 11 ** SS 11 == Ff 11 SS 11 VV 11 -- Ff 11 -- -- -- (( 66 ))

kk == Uu 22 VV 22 ** SS 22 == Ff 22 SS 22 VV 22 -- Ff 22 -- -- -- (( 77 ))

根据图4中的几何关系,可以得出According to the geometric relationship in Figure 4, it can be concluded that

Uu 11 ++ rr 11 LL 11 == (( jj ++ mm )) 22 ++ (( kk ++ nno )) 22 jj ++ mm -- -- -- (( 88 ))

将公式(4)、公式(6)以及公式(7)代入公式(8),得出Substituting formula (4), formula (6) and formula (7) into formula (8), we get

LL 11 == (( VV 11 Ff 11 VV 11 -- Ff 11 ++ rr 11 )) (( VV 11 Ff 11 VV 11 -- Ff 11 -- VV 22 Ff 22 VV 22 -- Ff 22 ++ rr 11 -- rr 22 )) (( VV 11 Ff 11 VV 11 -- Ff 11 -- VV 22 Ff 22 VV 22 -- Ff 22 ++ rr 11 -- rr 22 )) 22 ++ (( Ff 11 SS 11 VV 11 -- Ff 11 ++ Ff 22 SS 22 VV 22 -- Ff 22 )) 22 -- -- -- (( 99 ))

同理,可根据几何关系得出Similarly, it can be obtained from the geometric relationship

nno LL 22 == (( jj ++ mm )) 22 ++ (( kk ++ nno )) 22 nno ++ kk -- -- -- (( 1010 ))

将公式(4)、公式(6)以及公式(7)代入公式(10),得出Substituting formula (4), formula (6) and formula (7) into formula (10), we get

LL 22 == (( Ff 11 SS 11 VV 11 -- Ff 11 )) (( SS 11 Ff 11 VV 11 -- Ff 11 ++ SS 22 Ff 22 VV 22 -- Ff 22 )) (( VV 11 Ff 11 VV 11 -- Ff 11 -- VV 22 Ff 22 VV 22 -- Ff 22 ++ rr 11 -- rr 22 )) 22 ++ (( Ff 11 SS 11 VV 11 -- Ff 11 ++ Ff 22 SS 22 VV 22 -- Ff 22 )) 22 -- -- -- (( 1111 ))

因此,therefore,

LL == LL 11 ++ LL 22 == (( VV 11 Ff 11 VV 11 -- Ff 11 ++ rr 11 )) (( VV 11 Ff 11 VV 11 -- Ff 11 -- VV 22 Ff 22 VV 22 -- Ff 22 ++ rr 11 -- rr 22 )) ++ (( Ff 11 SS 11 VV 11 -- Ff 11 )) (( SS 11 Ff 11 VV 11 -- Ff 11 ++ SS 22 Ff 22 VV 22 -- Ff 22 )) (( VV 11 Ff 11 VV 11 -- Ff 11 -- VV 22 Ff 22 VV 22 -- Ff 22 ++ rr 11 -- rr 22 )) 22 ++ (( Ff 11 SS 11 VV 11 -- Ff 11 ++ Ff 22 SS 22 VV 22 -- Ff 22 )) 22 -- -- -- (( 1212 ))

L为待测点A的X轴坐标,记为AxL is the X-axis coordinate of the point A to be measured, denoted as A x .

A点在物平面P1上距离光轴垂直地面的平面的距离为Az,A点的像a点距离光轴垂直地面的平面的距离为az,则The distance between point A on the object plane P 1 and the plane perpendicular to the ground with the optical axis is A z , and the distance between the image point a of point A and the plane perpendicular to the ground with the optical axis is a z , then

Uu 11 VV 11 == AA zz aa zz -- -- -- (( 1313 ))

同理,根据物理尺寸与沿物理尺寸方向对应像素点数量成正比关系,计算成像点a沿Z轴方向的物理尺寸(像高az)。图7中Q为图像传感器沿Z轴方向有效像素范围的物理尺寸。Similarly, according to the proportional relationship between the physical size and the number of corresponding pixels along the physical size direction, the physical size (image height a z ) of the imaging point a along the Z-axis direction is calculated. Q in FIG. 7 is the physical size of the effective pixel range of the image sensor along the Z-axis direction.

将公式(2)代入公式(13)得出Substituting formula (2) into formula (13) gives

AA ZZ == Ff 11 aa zz VV 11 -- Ff 11 -- -- -- (( 1414 ))

Az为待测点A的Z轴坐标;A点的Y轴坐标Ay为0。A点的坐标(Ax,Ay,Az)为相对于E点预设坐标系的坐标,若E点的物理坐标已知,则A点的实际地理位置坐标可通过E点坐标加上计算得到的A点的相对坐标计算得到。A z is the Z-axis coordinate of point A to be measured; the Y-axis coordinate A y of point A is 0. The coordinates of point A (A x , A y , A z ) are the coordinates relative to the preset coordinate system of point E. If the physical coordinates of point E are known, the actual geographic coordinates of point A can be added to the coordinates of point E The calculated relative coordinates of point A are calculated.

由此可见,通过单目摄像机的两次或多次成像,并利用单目摄像机的内部数据,如像距、焦距以及图像传感器尺寸等信息,对成像参数进行关联计算即可实现对待测点的位置测量。在此过程中,无需测量摄像机的安装参数以及对标定物进行标定,节省了人力、物力以及时间成本,简化的操作过程。It can be seen that through two or more imaging of the monocular camera, and using the internal data of the monocular camera, such as image distance, focal length, and image sensor size, the associated calculation of the imaging parameters can realize the accuracy of the point to be measured. position measurement. In this process, there is no need to measure the installation parameters of the camera and calibrate the calibration object, which saves manpower, material resources and time costs, and simplifies the operation process.

以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明保护的范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the present invention. within the scope of protection.

Claims (8)

1. A3D space measurement method based on a monocular camera is characterized by comprising the following steps:
focusing a point to be tested and an auxiliary test point on the ground respectively to obtain corresponding imaging parameters, wherein the auxiliary test point is positioned on a projection line of an optical axis of a camera on the ground, the object distance between the point to be tested and the auxiliary test point is different, and the camera installation parameters of two times of imaging are unchanged;
and performing correlation calculation on the two imaging according to the imaging parameters of the point to be measured and the auxiliary test point to obtain a relative coordinate of the point to be measured, wherein a reference coordinate system of the relative coordinate is that the projection of a camera mounting fulcrum on the ground is taken as an origin, the perpendicular line of the fulcrum and the ground is taken as a Y axis, the projection of the camera optical axis along the ground is taken as an X axis, and the direction perpendicular to the X axis and the Y axis is taken as a Z axis.
2. The method of claim 1, wherein:
x-axis coordinate A in the relative coordinate of the point to be measuredxComprises the following steps:
A x = ( V 1 F 1 V 1 - F 1 + r 1 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) + ( F 1 S 1 V 1 - F 1 ) ( S 1 F 1 V 1 - F 1 + S 2 F 2 V 2 - F 2 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) 2 + ( F 1 S 1 V 1 - F 1 + F 2 S 2 V 2 - F 2 ) 2
wherein,
V1the image distance of the point to be measured is taken as the image distance of the point to be measured;
F1the focal length of the point to be measured is taken as the focal length of the point to be measured;
S1the image height of the point to be measured along the XY plane is taken as the image height;
r1the distance (along the optical axis of the camera) between the optical center of the lens of the point to be measured and the mounting pivot of the camera;
V2the image distance of the auxiliary test point is used as the image distance of the auxiliary test point;
F2the focal distance of the auxiliary test point is;
S2the image height of the auxiliary test point along the XY plane is taken as the image height;
r2as lens light of the auxiliary test pointThe distance (along the optical axis of the camera) between the optical center and the mounting pivot of the camera.
3. The method of claim 1, wherein:
z-axis coordinate A in the relative coordinate of the point to be measuredzComprises the following steps:
A z = F 1 a z V 1 - F 1
wherein,
V1the image distance of the point to be measured is taken as the image distance of the point to be measured;
F1the focal length of the point to be measured is taken as the focal length of the point to be measured;
azand the image height of the point to be measured along the Z-axis direction is obtained.
4. The method of claim 2, wherein:
a is describedxThe specific calculation process is as follows:
the object distance U of the point to be measured1And the object distance U of the auxiliary test point2Respectively as follows:
U 1 = V 1 F 1 V 1 - F 1
U 2 = V 2 F 2 V 2 - F 2
thereby obtaining object planes P imaged twice1And P2The distance (in the optical axis direction) j + m therebetween is:
j + m = ( U 1 + r 1 ) - ( U 2 + r 2 ) = V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + ( r 1 - r 2 )
respectively solving the object height n of the point to be tested, which is vertical to the optical axis of the camera, and the object height k of the auxiliary test point, which is vertical to the optical axis of the camera:
n = U 1 V 1 * S 1 = F 1 S 1 V 1 - F 1
k = U 2 V 2 * S 2 = F 2 S 2 V 2 - F 2
respectively substituting the above parameters into a geometric formulaAnd n L 2 = ( j + m ) 2 + ( k + n ) 2 n + k , can obtain the product
L 1 = ( V 1 F 1 V 1 - F 1 + r 1 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) 2 + ( F 1 S 1 V 1 - F 1 + F 2 S 2 V 2 - F 2 ) 2
L 2 = ( F 1 S 1 V 1 - F 1 ) ( S 1 F 1 V 1 - F 1 + S 2 F 2 V 2 - F 2 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) 2 + ( F 1 S 1 V 1 - F 1 + F 2 S 2 V 2 - F 2 ) 2
Ax=L1+L2
5. A monocular camera-based 3D spatial measuring device, comprising:
the imaging parameter acquisition unit is used for respectively focusing a point to be measured and an auxiliary test point on the ground to acquire corresponding imaging parameters, wherein the auxiliary test point is positioned on a projection line of a camera optical axis on the ground, the object distance between the point to be measured and the auxiliary test point is different, and the camera installation parameters of the two times of imaging are unchanged;
and the relative coordinate calculation unit is used for performing correlation calculation on the two imaging according to the imaging parameters of the point to be measured and the auxiliary test point to obtain the relative coordinate of the point to be measured, wherein the reference coordinate system of the relative coordinate is that the projection of the camera installation fulcrum on the ground is taken as an origin, the perpendicular line of the fulcrum and the ground is taken as a Y axis, the projection of the camera optical axis along the ground is taken as an X axis, and the direction perpendicular to the X axis and the Y axis is taken as a Z axis.
6. The apparatus of claim 5, wherein:
the relative coordinate calculation unit calculates the relative coordinateX-axis coordinate A of measuring pointxComprises the following steps:
A x = ( V 1 F 1 V 1 - F 1 + r 1 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) + ( F 1 S 1 V 1 - F 1 ) ( S 1 F 1 V 1 - F 1 + S 2 F 2 V 2 - F 2 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) 2 + ( F 1 S 1 V 1 - F 1 + F 2 S 2 V 2 - F 2 ) 2
wherein,
V1the image distance of the point to be measured is taken as the image distance of the point to be measured;
F1the focal length of the point to be measured is taken as the focal length of the point to be measured;
S1the image height of the point to be measured along the XY plane is taken as the image height;
r1the distance (along the optical axis of the camera) between the optical center of the lens of the point to be measured and the mounting pivot of the camera;
V2the image distance of the auxiliary test point is used as the image distance of the auxiliary test point;
F2the focal distance of the auxiliary test point is;
S2the image height of the auxiliary test point along the XY plane is taken as the image height;
r2the distance (along the optical axis of the camera) between the optical center of the lens of the auxiliary test point and the mounting pivot of the camera.
7. The apparatus of claim 5, wherein:
the relative coordinate calculation unit calculates the Z-axis coordinate A of the point to be measuredzComprises the following steps:
A z = F 1 a z V 1 - F 1
wherein,
V1the image distance of the point to be measured is taken as the image distance of the point to be measured;
F1the focal length of the point to be measured is taken as the focal length of the point to be measured;
azand the image height of the point to be measured along the Z-axis direction is obtained.
8. The apparatus of claim 6, wherein:
the relative coordinate calculation unit calculates the AxThe specific process comprises the following steps:
the object distance U of the point to be measured1And the object distance U of the auxiliary test point2Respectively as follows:
U 1 = V 1 F 1 V 1 - F 1
U 2 = V 2 F 2 V 2 - F 2
thereby obtaining object planes P imaged twice1And P2The distance (in the optical axis direction) j + m therebetween is:
j + m = ( U 1 + r 1 ) - ( U 2 + r 2 ) = V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + ( r 1 - r 2 )
respectively solving the object height n of the point to be tested, which is vertical to the optical axis of the camera, and the object height k of the auxiliary test point, which is vertical to the optical axis of the camera:
n = U 1 V 1 * S 1 = F 1 S 1 V 1 - F 1
k = U 2 V 2 * S 2 = F 2 S 2 V 2 - F 2
respectively substituting the above parameters into a geometric formulaAnd n L 2 = ( j + m ) 2 + ( k + n ) 2 n + k , can obtain the product
L 1 = ( V 1 F 1 V 1 - F 1 + r 1 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) 2 + ( F 1 S 1 V 1 - F 1 + F 2 S 2 V 2 - F 2 ) 2
L 2 = ( F 1 S 1 V 1 - F 1 ) ( S 1 F 1 V 1 - F 1 + S 2 F 2 V 2 - F 2 ) ( V 1 F 1 V 1 - F 1 - V 2 F 2 V 2 - F 2 + r 1 - r 2 ) 2 + ( F 1 S 1 V 1 - F 1 + F 2 S 2 V 2 - F 2 ) 2
Ax=L1+L2
CN201410339869.9A 2014-07-16 2014-07-16 3d space measuring method based on monocular-camera Active CN105333818B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410339869.9A CN105333818B (en) 2014-07-16 2014-07-16 3d space measuring method based on monocular-camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410339869.9A CN105333818B (en) 2014-07-16 2014-07-16 3d space measuring method based on monocular-camera

Publications (2)

Publication Number Publication Date
CN105333818A true CN105333818A (en) 2016-02-17
CN105333818B CN105333818B (en) 2018-03-23

Family

ID=55284479

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410339869.9A Active CN105333818B (en) 2014-07-16 2014-07-16 3d space measuring method based on monocular-camera

Country Status (1)

Country Link
CN (1) CN105333818B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109931906A (en) * 2019-03-28 2019-06-25 杭州华雁云态信息技术有限公司 Video camera distance measuring method, device and electronic equipment
CN110225400A (en) * 2019-07-08 2019-09-10 北京字节跳动网络技术有限公司 A kind of motion capture method, device, mobile terminal and storage medium
CN113115017A (en) * 2021-03-05 2021-07-13 上海炬佑智能科技有限公司 3D imaging module parameter inspection method and 3D imaging device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183206A (en) * 2006-11-13 2008-05-21 华晶科技股份有限公司 Method for calculating distance and actuate size of shot object
CN101344376A (en) * 2008-08-28 2009-01-14 上海交通大学 Measurement method of spatial circle geometric parameters based on monocular vision technology
KR20110025724A (en) * 2009-09-05 2011-03-11 백상주 How to measure the height of the subject using the camera module
CN102168954A (en) * 2011-01-14 2011-08-31 浙江大学 Monocular-camera-based method for measuring depth, depth field and sizes of objects
CN102661717A (en) * 2012-05-09 2012-09-12 河北省电力建设调整试验所 Monocular vision measuring method for iron tower
CN103033132A (en) * 2012-12-20 2013-04-10 中国科学院自动化研究所 Plane measuring method and plane measuring device based on monocular vision
CN103049918A (en) * 2011-10-17 2013-04-17 天津市亚安科技股份有限公司 Method for accurately calculating size of actual target in video frequency monitoring
CN103206919A (en) * 2012-07-31 2013-07-17 广州三星通信技术研究有限公司 Device and method used for measuring object size in portable terminal
CN103292695A (en) * 2013-05-10 2013-09-11 河北科技大学 Monocular stereoscopic vision measuring method
CN103471500A (en) * 2013-06-05 2013-12-25 江南大学 Conversion method of plane coordinate and space three-dimensional coordinate point in vision of monocular machine

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101183206A (en) * 2006-11-13 2008-05-21 华晶科技股份有限公司 Method for calculating distance and actuate size of shot object
CN101344376A (en) * 2008-08-28 2009-01-14 上海交通大学 Measurement method of spatial circle geometric parameters based on monocular vision technology
KR20110025724A (en) * 2009-09-05 2011-03-11 백상주 How to measure the height of the subject using the camera module
CN102168954A (en) * 2011-01-14 2011-08-31 浙江大学 Monocular-camera-based method for measuring depth, depth field and sizes of objects
CN103049918A (en) * 2011-10-17 2013-04-17 天津市亚安科技股份有限公司 Method for accurately calculating size of actual target in video frequency monitoring
CN102661717A (en) * 2012-05-09 2012-09-12 河北省电力建设调整试验所 Monocular vision measuring method for iron tower
CN103206919A (en) * 2012-07-31 2013-07-17 广州三星通信技术研究有限公司 Device and method used for measuring object size in portable terminal
CN103033132A (en) * 2012-12-20 2013-04-10 中国科学院自动化研究所 Plane measuring method and plane measuring device based on monocular vision
CN103292695A (en) * 2013-05-10 2013-09-11 河北科技大学 Monocular stereoscopic vision measuring method
CN103471500A (en) * 2013-06-05 2013-12-25 江南大学 Conversion method of plane coordinate and space three-dimensional coordinate point in vision of monocular machine

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李荣明 等: "单目视觉定位方法研究综述", 《现代计算机(专业版)》 *
武德臣 等: "单目视觉定位模型及其参数辨识", 《中国人工智能学会第12届全国学术年会论文集(上) 中国人工智能进展(2007)》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109931906A (en) * 2019-03-28 2019-06-25 杭州华雁云态信息技术有限公司 Video camera distance measuring method, device and electronic equipment
CN109931906B (en) * 2019-03-28 2021-02-23 华雁智科(杭州)信息技术有限公司 Camera ranging method and device and electronic equipment
CN110225400A (en) * 2019-07-08 2019-09-10 北京字节跳动网络技术有限公司 A kind of motion capture method, device, mobile terminal and storage medium
CN110225400B (en) * 2019-07-08 2022-03-04 北京字节跳动网络技术有限公司 Motion capture method and device, mobile terminal and storage medium
CN113115017A (en) * 2021-03-05 2021-07-13 上海炬佑智能科技有限公司 3D imaging module parameter inspection method and 3D imaging device
CN113115017B (en) * 2021-03-05 2022-03-18 上海炬佑智能科技有限公司 3D imaging module parameter inspection method and 3D imaging device

Also Published As

Publication number Publication date
CN105333818B (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN109859272B (en) Automatic focusing binocular camera calibration method and device
US8339463B2 (en) Camera lens calibration system
CN109238235B (en) A method for continuous measurement of rigid body pose parameters based on monocular image sequences
CN104613930B (en) Method and device for measuring distance as well as mobile terminal
CN103438904B (en) A kind of inertial positioning method and system using vision auxiliary corrective
CN111220130B (en) Focusing measurement method and terminal capable of measuring object at any position in space
TWI420066B (en) Object measuring method and system
CN104038740B (en) Method and device for shielding privacy region of PTZ (Pan/Tilt/Zoom) surveillance camera
CN105180841B (en) A kind of new micro element three-dimension measuring system and its measuring method
CN102661717A (en) Monocular vision measuring method for iron tower
CN110779491A (en) Method, device and equipment for measuring distance of target on horizontal plane and storage medium
CN112907647B (en) A three-dimensional spatial dimension measurement method based on a fixed monocular camera
CN103163725A (en) Camera module detection device and detection method
CN103148832A (en) Detection method of installation inclination angle of video camera
CN108108021A (en) The outer parameter correction gauge of tracing of human eye system and bearing calibration
CN109146959A (en) Monocular camera realizes dynamic point method for three-dimensional measurement
JP6645140B2 (en) Image calibration apparatus and calibration method
CN105333818B (en) 3d space measuring method based on monocular-camera
CN103323216B (en) A kind of device and method detecting parallax error of collimator
Hou et al. Camera lens distortion evaluation and correction technique based on a colour CCD moiré method
CN102589529A (en) Scanning close-range photogrammetry method
CN105043252A (en) Image processing based size measuring method without reference object
US20070273894A1 (en) Method and apparatus for remote spatial calibration and imaging
KR101703715B1 (en) The apparatus for measuring camera principal point and the method thereof
JP5848563B2 (en) In-vehicle camera

Legal Events

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