CN110672020A - A method for measuring the height of standing trees based on monocular vision - Google Patents

A method for measuring the height of standing trees based on monocular vision Download PDF

Info

Publication number
CN110672020A
CN110672020A CN201910515301.0A CN201910515301A CN110672020A CN 110672020 A CN110672020 A CN 110672020A CN 201910515301 A CN201910515301 A CN 201910515301A CN 110672020 A CN110672020 A CN 110672020A
Authority
CN
China
Prior art keywords
image
height
standing tree
camera
plane
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
CN201910515301.0A
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.)
Jiyang College of Zhejiang A&F University
Original Assignee
Jiyang College of Zhejiang A&F University
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 Jiyang College of Zhejiang A&F University filed Critical Jiyang College of Zhejiang A&F University
Priority to CN201910515301.0A priority Critical patent/CN110672020A/en
Publication of CN110672020A publication Critical patent/CN110672020A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/06Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness for measuring thickness ; e.g. of sheet material
    • G01B11/0608Height gauges
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B5/00Measuring arrangements characterised by the use of mechanical techniques
    • G01B5/0035Measuring of dimensions of trees

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Botany (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

本发明公开了一种基于单目视觉的立木高度测量方法。解决现有树高测量存在运算复杂、耗时较大,无法快速便捷检测立木高度的问题。方法包括对相机进行标定,获取相机内部参数,对输入图像进行立木轮廓提取,建立图像坐标系与世界坐标系距离的几何模型,获取立木图像深度关系式,建立高度像素坐标映射模型,获取待测目标高度关系式,根据相机拍摄高度与角度计算出立木高度。本发明测量成本低且工作效率高,只需采用现有智能手机,只需获取拍摄角度和拍摄高度,操作更加方便快捷。且本发明测量方法无需复杂的运算,耗时少,且算法精度高,自动化程度高,操作简单。

Figure 201910515301

The invention discloses a method for measuring the height of a standing tree based on monocular vision. The problem that the existing tree height measurement is complicated and time-consuming, and the standing tree height cannot be detected quickly and conveniently is solved. The method includes calibrating the camera, acquiring the internal parameters of the camera, extracting the outline of the standing tree on the input image, establishing a geometric model of the distance between the image coordinate system and the world coordinate system, acquiring the depth relational expression of the standing tree image, establishing the height pixel coordinate mapping model, and obtaining the object to be measured. The relationship between the target height and the height of the standing tree is calculated according to the shooting height and angle of the camera. The invention has low measurement cost and high work efficiency, only needs to use the existing smart phone, only needs to obtain the shooting angle and shooting height, and the operation is more convenient and fast. In addition, the measurement method of the present invention does not require complicated operations, consumes less time, and has high algorithm precision, high degree of automation and simple operation.

Figure 201910515301

Description

一种基于单目视觉的立木高度测量方法A method for measuring the height of standing trees based on monocular vision

技术领域technical field

本发明涉及树木检测技术范围,尤其是涉及一种基于单目视觉的立木高度测量方法。The invention relates to the technical scope of tree detection, in particular to a method for measuring the height of a standing tree based on monocular vision.

背景技术Background technique

树木高度是评价立木质量和林木生长状况的重要标志之一,在森林资源调查中已成为一项必须的工作。树木测定工具及其算法作为获取基本测树因子的基本途径,其准确性、实用性极为重要,其现代化水平也体现了林业现代化水平[5]。目前,主流的测高仪器,如布鲁莱斯式测高器[6]因价格低廉、操作简单、能够满足一般精度的要求,应用较为广泛,但其受到需要测量水平距离的限制,在实际森林测量中容易受到遮挡的影响。三维激光扫描技术通过快速准确的获取物体三维坐标点云,达到树木高度快速精确自动测量的目的,但激光雷达测量具有设备成本高,不易携带且处理时间较长等缺点。The height of trees is one of the important indicators to evaluate the quality of standing trees and the growth status of trees, and it has become a necessary work in the investigation of forest resources. As a basic way to obtain basic tree measurement factors, tree measurement tools and their algorithms are extremely important in accuracy and practicability, and their modernization level also reflects the level of forestry modernization [5] . At present, the mainstream altimeter instruments, such as the Bruce-type altimeter [6] , are widely used because of their low price, simple operation, and can meet the requirements of general accuracy, but they are limited by the need to measure the horizontal distance. Forest measurements are susceptible to occlusion. 3D laser scanning technology achieves the purpose of fast and accurate automatic measurement of tree height by quickly and accurately obtaining the 3D coordinate point cloud of objects. However, lidar measurement has the disadvantages of high equipment cost, not easy to carry, and long processing time.

近年来,机器视觉测量技术发展迅速,其在林业应用的深度与广度也在日益增大。目前主流的视觉测量系统可以分为两类,主要包括单目视觉测量系统和双目视觉测量系统。其中双目视觉测量系统的主要原理是利用两台相机从不同视觉对待测目标进行图像拍摄,通过两幅图像中相应的匹配点进行三维重建,从而获得待测目标在三维空间中的信息。与双目视觉相比,单目视觉系统具有相机标定过程和系统构造简单的优点,并且避免了双目视觉测量系统中立体匹配困难的缺点,因此成为了摄影测量、计算机视觉领域的重要研究趋势之一。实际中,单目视觉测量的测量灵活性,图像获取快捷性,解算方法普适性也使其广泛的运用于自然环境下的非接触测量。朱冰琳等利用机器视觉获取温室中植株三维表型,对不同时期生长的玉米,大豆植株进行三维重建,并基于手动测量值对叶长,叶最大宽进行精度评估。杨坤等利用无人机高分辨率影像,采用PIX4D软件生产三维点云,基于最大类间方差法把树木分割为树木点云以及地面点云,由此提取树木顶端高度和地面平均高度。周克瑜等在测量树高时以相似三角形原理,基于三角函数根据已知标定物尺寸进行对比计算,在一定程度上完成了立木高度的快速测量。管昉立等通过数字图像处理计算提取树木的最小外界矩形,标定并获取智能手机中相机的内外参数。根据相机的二维图像信息和已知参数进行三维世界的坐标重建实现立木高度的测量。但目前国内树木测定工具及其算法大部分存在精度较差、自动化程度不高、操作复杂等问题。在树高测量方面仍使用传统的测量原理和方法,并且要事先测得立木的距离信息,除此之外大多都需要复杂的运算,耗时较大,无法快速便捷的测量立木的高度。In recent years, machine vision measurement technology has developed rapidly, and its depth and breadth in forestry applications are also increasing. The current mainstream vision measurement systems can be divided into two categories, mainly including monocular vision measurement systems and binocular vision measurement systems. Among them, the main principle of the binocular vision measurement system is to use two cameras to capture images from different visions of the target to be measured, and to reconstruct three-dimensionally through the corresponding matching points in the two images, so as to obtain the information of the target to be measured in the three-dimensional space. Compared with binocular vision, monocular vision system has the advantages of simple camera calibration process and system structure, and avoids the disadvantage of difficult stereo matching in binocular vision measurement system, so it has become an important research trend in the fields of photogrammetry and computer vision. one. In practice, the measurement flexibility of monocular vision measurement, the quickness of image acquisition, and the universality of the solution method make it widely used in non-contact measurement in natural environment. Zhu Binglin et al. used machine vision to obtain the three-dimensional phenotype of plants in the greenhouse, reconstructed the three-dimensional corn and soybean plants grown in different periods, and evaluated the accuracy of leaf length and leaf maximum width based on manual measurements. Yang Kun et al. used high-resolution images of unmanned aerial vehicles and used PIX 4D software to produce 3D point clouds. Based on the maximum inter-class variance method, the trees were divided into tree point clouds and ground point clouds, and the tree top height and the average ground height were extracted. . Zhou Keyu et al. used the similar triangle principle when measuring the tree height, based on the trigonometric function and the known calibration object size to compare and calculate, to a certain extent, completed the rapid measurement of the standing tree height. Guan Fangli et al. extracted the minimum external rectangle of trees through digital image processing calculation, and calibrated and obtained the internal and external parameters of the camera in the smartphone. According to the two-dimensional image information of the camera and the known parameters, the coordinate reconstruction of the three-dimensional world is carried out to measure the height of the standing tree. However, most of the domestic tree measurement tools and their algorithms have problems such as poor accuracy, low degree of automation, and complicated operations. Traditional measurement principles and methods are still used in tree height measurement, and the distance information of standing trees must be measured in advance. In addition, most of them require complex calculations, which are time-consuming and cannot measure the height of standing trees quickly and conveniently.

发明内容SUMMARY OF THE INVENTION

本发明主要是解决现有技术中树高测量存在运算复杂、耗时较大,无法快速便捷检测立木高度的问题,提供了一种基于单目视觉的立木高度测量方法。The invention mainly solves the problems in the prior art that the tree height measurement is complicated in operation, takes a long time, and cannot quickly and conveniently detect the height of a standing tree, and provides a method for measuring the height of a standing tree based on monocular vision.

本发明的上述技术问题主要是通过下述技术方案得以解决的:一种基于单目视觉的立木高度测量方法,包括以下步骤,The above-mentioned technical problems of the present invention are mainly solved by the following technical solutions: a method for measuring the height of a standing tree based on monocular vision, comprising the following steps,

S1.对相机进行标定,获取相机内部参数;S1. Calibrate the camera and obtain the internal parameters of the camera;

标定采用改进的张正友标定法,引入带有非线性畸变项的相机标定模型进行标定,实现畸变矫正并获取相机内部参数。改进的张正友标定法参考:刘艳,李腾飞.对张正友相机标定法的改进研究.光学技术,2014,40(06):565-570。若图像坐标系(x,y)原点在像素坐标系(u,v)中的坐标为(u0,v0)。相机坐标系中任一点(Xc,Yc,Zc)投影到图像坐标系上的(x,y,f),图像坐标系平面与圆点距离为f。且从物体的世界坐标Pw(XW,YW,ZW)到相机坐标Pc变换的过程是一种刚体运动,可以用物体的平移和旋转来描述。所以世界坐标系到相机坐标系的转换关系为:The calibration adopts the improved Zhang Zhengyou calibration method, introduces a camera calibration model with nonlinear distortion term for calibration, realizes the distortion correction and obtains the internal parameters of the camera. Reference for the improved Zhang Zhengyou calibration method: Liu Yan, Li Tengfei. Research on the improvement of Zhang Zhengyou's camera calibration method. Optical Technology, 2014, 40(06): 565-570. If the coordinates of the origin of the image coordinate system (x, y) in the pixel coordinate system (u, v) are (u 0 , v 0 ). Any point (X c , Y c , Z c ) in the camera coordinate system is projected to (x, y, f) on the image coordinate system, and the distance between the image coordinate system plane and the dot is f. And the process of transforming from the object's world coordinates P w (X W , Y W , Z W ) to the camera coordinates P c is a rigid body motion, which can be described by the translation and rotation of the object. So the conversion relationship from the world coordinate system to the camera coordinate system is:

其中Mint,Mext分别是相机内、外参数,相机外参数包括旋转矩阵R和平移矩阵T。dx、dy为平面上每个的物力尺寸(单位:mm)。Among them, M int and M ext are internal and external parameters of the camera, respectively, and the external parameters of the camera include a rotation matrix R and a translation matrix T. d x and dy are the physical dimensions of each on the plane (unit: mm).

S2.对输入图像进行立木轮廓提取,获取立木高度像素差;S2. Extract the outline of the standing tree from the input image, and obtain the pixel difference of the height of the standing tree;

S3.建立图像坐标系与世界坐标系距离的几何模型,获取立木图像深度关系式S3. Establish a geometric model of the distance between the image coordinate system and the world coordinate system, and obtain the relationship between the depth of the standing tree image

Figure BDA0002094824200000032
Figure BDA0002094824200000032

其中d为相机到待测目标深度值,h为镜头中心到地面的垂直水平高度,γ为相机的垂直俯视角,fy为图像平面y轴方向的焦距,v为图像坐标系中y轴坐标,v0为图像像平面y轴的主点;where d is the depth value from the camera to the target to be measured, h is the vertical horizontal height from the center of the lens to the ground, γ is the vertical top-down angle of the camera, f y is the focal length in the y-axis direction of the image plane, and v is the y-axis coordinate in the image coordinate system , v 0 is the principal point of the y-axis of the image plane;

S4.建立高度像素坐标映射模型,获取待测目标高度关系式S4. Establish a height pixel coordinate mapping model to obtain the height relationship of the target to be measured

Figure BDA0002094824200000041
Figure BDA0002094824200000041

其中H为立木高度,yy′为立木高度像素差;Where H is the height of the standing tree, and yy′ is the pixel difference of the height of the standing tree;

S5.根据相机拍摄高度与角度计算出立木高度。S5. Calculate the height of the standing tree according to the shooting height and angle of the camera.

本发明借助智能手机结合机器视觉技术进行立木高度测量。利用GraphCut算法对立木图像进行分割,实现立木图像中立木高度像素的自动获取,然后通过几何相似模型自动获取的立木图像深度信息,再提取手机内置陀螺仪的角度信息和手机拍摄高度信息来解算测量树高。形成了一套新的测量方法,只需采用现有智能手机自带的摄像头,获取拍摄角度和拍摄高度,而无需事先测得与立木的距离,操作更加方便快捷。且本发明测量方法无需复杂的运算,耗时少,且算法精度高,自动化程度高,操作简单。本方法测量成本低且工作效率高,使用智能手机设备进行树高测量时不需要严格的硬件条件且设备集成便捷,整个树木高度测量的过程只需一人即可完成。In the present invention, the height of the standing tree is measured by means of a smart phone and a machine vision technology. The GraphCut algorithm is used to segment the standing tree image to automatically obtain the height pixels of the standing tree in the standing tree image. Then, the depth information of the standing tree image is automatically obtained through the geometric similarity model, and then the angle information of the built-in gyroscope of the mobile phone and the height information of the mobile phone are extracted to solve the calculation. Measure tree height. A new set of measurement methods is formed. It only needs to use the camera of the existing smartphone to obtain the shooting angle and shooting height, without measuring the distance from the standing tree in advance, and the operation is more convenient and fast. In addition, the measurement method of the present invention does not require complicated operations, consumes less time, and has high algorithm precision, high degree of automation and simple operation. The method has low measurement cost and high work efficiency, does not require strict hardware conditions when using a smartphone device for tree height measurement, and is convenient for device integration, and only one person can complete the entire tree height measurement process.

作为一种优选方案,步骤S1中标定后获取的相机内部参数包括fx、fy、u0、v0,其中fx为图像平面x轴方向的焦距,u0为图像像平面x轴的主点。As a preferred solution, the camera internal parameters obtained after calibration in step S1 include f x , f y , u 0 , and v 0 , where f x is the focal length in the x-axis direction of the image plane, and u 0 is the x-axis of the image plane. main point.

作为一种优选方案,步骤S2具体过程包括:As a preferred solution, the specific process of step S2 includes:

S21.对输入图像进行预处理,获得突出立木图像特征的图像;预处理包括利用点集性质、积分几何集及拓扑学理论对物体像素集进行变换,对图像进行膨胀和腐蚀的处理。S21. Preprocess the input image to obtain an image that highlights the characteristics of the standing tree image; the preprocessing includes transforming the object pixel set using point set properties, integral geometric sets and topology theory, and dilating and eroding the image.

S22.对预处理后的图像进行前背景分割,获得立木轮廓图像;S22. Perform front and background segmentation on the preprocessed image to obtain a standing tree outline image;

本步骤采用GraphCut算法对图像进行前景分割,以获得待测立木底部中心点、立木图像上的最高点。该算法能在不同的光照强度等自然环境的影响中,有效克服自然环境下的复杂背景干扰,准确分割出特定立木。In this step, the GraphCut algorithm is used to segment the foreground of the image to obtain the bottom center point of the standing tree to be measured and the highest point on the standing tree image. The algorithm can effectively overcome the complex background interference in the natural environment under the influence of different light intensities and other natural environments, and accurately segment specific standing trees.

S23.对立木轮廓图像进行扫描,获取立木轮廓图像的坐标分布情况;S23. Scan the standing tree contour image to obtain the coordinate distribution of the standing tree contour image;

S24.输出立木轮廓图像中的两个最值点,分别为立木轮廓在像平面坐标系下y轴的最大值和最小值,根据最值点计算出立木高度像素差。立木轮廓图像中的两个最值点为Smax(x,y)、Smin(x,y),yy′为立木图像在像平面上垂直方向的像素差。本方案通过扫描立木轮廓图像,输出图像中的这两个最值点,作为后续测量立木高度的模型中的输入。S24. Output two maximum points in the standing tree outline image, which are the maximum and minimum values of the y-axis of the standing tree outline in the image plane coordinate system, and calculate the height pixel difference of the standing tree according to the maximum points. The two maximum points in the standing tree contour image are S max (x, y) and S min (x, y), and yy′ is the pixel difference in the vertical direction of the standing tree image on the image plane. This scheme scans the standing tree contour image and outputs the two maximum points in the image as the input in the subsequent model for measuring the standing tree height.

作为一种优选方案,步骤S3中获取立木图像深度关系式的过程包括:As a preferred solution, the process of obtaining the depth relational expression of the standing tree image in step S3 includes:

S31.根据相机成像原理,以及相机与地平面的关系建立图像坐标系与世界坐标系距离的几何模型,几何模型为设定P点和光轴分别通过镜头中心在图像像平面ABCD上形成交点(x,y)、(x0,y0),(x,y)为P点在二维平面图形坐标系即图像像平面上的投影点,(x0,y0)为光轴与图像像平面的交点,相机到待测目标的深度值即P点到镜头中心距离为d,镜头中心到像平面的距离为f,镜头中心到地面的垂直水平高度为h,相机的垂直俯视角为γ,相机投影与光轴的夹角为β。S31. Establish a geometric model of the distance between the image coordinate system and the world coordinate system according to the camera imaging principle and the relationship between the camera and the ground plane. The geometric model is to set the point P and the optical axis to form an intersection on the image image plane ABCD through the center of the lens (x , y), (x 0 , y 0 ), (x, y) is the projection point of point P on the two-dimensional plane graphics coordinate system, that is, the image plane, (x 0 , y 0 ) is the optical axis and the image plane , the depth value from the camera to the target to be measured, that is, the distance from point P to the center of the lens is d, the distance from the center of the lens to the image plane is f, the vertical height from the center of the lens to the ground is h, and the vertical top-down angle of the camera is γ, The angle between the camera projection and the optical axis is β.

S32.根据几何模型导出像素坐标与世界坐标距离的关系式S32. Derive the relationship between the distance between pixel coordinates and world coordinates according to the geometric model

Figure BDA0002094824200000051
Figure BDA0002094824200000051

β在三维图像中像素与焦距的关系表达式为The relationship between the pixel and the focal length of β in the three-dimensional image is expressed as

Figure BDA0002094824200000052
Figure BDA0002094824200000052

根据公式(1)和(2)得到:According to formulas (1) and (2), we get:

Figure BDA0002094824200000061
Figure BDA0002094824200000061

S33.根据图像坐标与像素坐标之间的几何关系S33. According to the geometric relationship between image coordinates and pixel coordinates

Figure BDA0002094824200000062
Figure BDA0002094824200000062

获得y=(v-v0)dy,已知y0=0,得到Obtain y=(vv 0 )dy, given that y 0 =0, get

Figure BDA0002094824200000063
Figure BDA0002094824200000063

S34.根据

Figure BDA0002094824200000064
得到立木图像深度关系式S34. According to
Figure BDA0002094824200000064
Get the relationship between the depth of the standing tree image

Figure BDA0002094824200000065
Figure BDA0002094824200000065

作为一种优选方案,步骤S4获取待测目标高度关系式的过程包括:As a preferred solution, the process of obtaining the height relational expression of the target to be measured in step S4 includes:

S41.根据相机小孔成像原理,建立高度像素坐标映射模型,模型为实际成像面内A3A4通过镜头中心在像平面内成像,A3A4为实际立木高度H,A3在像平面内成像点为xy,A4在像平面内成像点为xy′,yy′为立木图像在像平面上垂直方向的像素差,Q为镜头中心,M为光轴与实际成像面的交点,QM为光轴所在位置,镜头中心P到理想成像面的距离为d,相机的垂直俯视角为γ;S41. According to the principle of camera pinhole imaging, establish a height pixel coordinate mapping model. The model is that A 3 A 4 in the actual imaging plane is imaged in the image plane through the center of the lens, A 3 A 4 is the actual standing height H, and A 3 is in the image plane. The inner imaging point is xy, the imaging point of A4 in the image plane is xy', yy' is the pixel difference of the standing tree image in the vertical direction on the image plane, Q is the center of the lens, M is the intersection of the optical axis and the actual imaging plane, QM is the position of the optical axis, the distance from the lens center P to the ideal imaging surface is d, and the vertical top-down angle of the camera is γ;

xy,xy′为立木在像平面上的成像点,其中最大值Smax(x,y)和最小值为Smin(x,y)。理想成像面为垂直水面面,相机的俯视角随着测量的需求发送变换,形成的实际成像面为倾斜的,M点同时也为实际成像面和理想成像面相交点。QO为相机离水平面的垂直高度,理想情况下相机俯视角γ为0度,光轴为水平直线,N为理想情况下光轴与离心成像面的交点,QN为理想情况下光轴所在直线。当相机俯视角发生变化时,个成像面之间的相对夹角不会发生变化。xy, xy' are the imaging points of the standing tree on the image plane, wherein the maximum value S max (x, y) and the minimum value are S min (x, y). The ideal imaging plane is the vertical water surface, and the top-view angle of the camera is transformed according to the measurement requirements. The actual imaging plane formed is inclined, and the M point is also the intersection of the actual imaging plane and the ideal imaging plane. QO is the vertical height of the camera from the horizontal plane. Ideally, the camera top-down angle γ is 0 degrees, the optical axis is a horizontal straight line, N is the intersection of the optical axis and the centrifugal imaging plane in the ideal case, and QN is the ideal line where the optical axis is located. When the top-down angle of the camera changes, the relative angle between the two imaging planes does not change.

S42.根据高度像素坐标映射模型得出S42. Obtained according to the height pixel coordinate mapping model

Figure BDA0002094824200000071
Figure BDA0002094824200000071

其中

Figure BDA0002094824200000072
A3A4=H,得到in
Figure BDA0002094824200000072
A 3 A 4 =H, we get

Figure BDA0002094824200000073
Figure BDA0002094824200000073

S43.结合立木图像深度关系式得到立木高度关系式S43. Combining the relationship of the depth of the standing tree image to obtain the relationship of the height of the standing tree

Figure BDA0002094824200000074
Figure BDA0002094824200000074

本方案获得立木高度关系式,只需通过获取立木图像在成像面上的像素差yy′和相机内部高精度陀螺仪获得的俯视角γ来获取立木的高度H,其中h的物理单位为米/m,yy′和fy的物力单位都为像素/pixel,H的距离单位为米/m。该方法无需知道相机的运动信息,无需进行辅助运算,耗时短,操作快速便捷,且具有较高精确性和有效性。This scheme obtains the relationship formula of the height of the standing tree, and only needs to obtain the height H of the standing tree by obtaining the pixel difference yy′ of the standing tree image on the imaging plane and the top-down angle γ obtained by the high-precision gyroscope inside the camera, where the physical unit of h is m/ The physical force units of m, yy' and f y are all pixels/pixel, and the distance unit of H is meters/m. The method does not need to know the motion information of the camera, does not need to perform auxiliary operations, takes less time, is fast and convenient to operate, and has high accuracy and effectiveness.

因此,本发明的优点是:Therefore, the advantages of the present invention are:

只需采用现有智能手机,获取拍摄角度和拍摄高度,而无需事先测得与立木的距离,操作更加方便快捷。Just use the existing smartphone to obtain the shooting angle and shooting height, without measuring the distance to the standing tree in advance, the operation is more convenient and fast.

测量方法无需复杂的运算,耗时少,且算法精度高,自动化程度高,操作简单。The measurement method does not require complicated operations, takes less time, and has high algorithm accuracy, high automation and simple operation.

测量成本低且工作效率高,使用智能手机设备进行树高测量时不需要严格的硬件条件且设备集成便捷,整个树木高度测量的过程只需一人即可完成。The measurement cost is low and the work efficiency is high. The use of smartphone devices for tree height measurement does not require strict hardware conditions and the device is easily integrated. The entire tree height measurement process can be completed by only one person.

附图说明Description of drawings

图1是本发明中图像坐标系与世界坐标系距离的几何模型一种示意图;Fig. 1 is a kind of schematic diagram of the geometric model of the distance between the image coordinate system and the world coordinate system in the present invention;

图2是本发明中图像坐标系与像素坐标系转换模型的一种示意图;Fig. 2 is a kind of schematic diagram of image coordinate system and pixel coordinate system conversion model in the present invention;

图3是本发明中高度像素坐标映射模型的一种构示意图;Fig. 3 is a kind of structure schematic diagram of height pixel coordinate mapping model in the present invention;

图4a是本发明中输入的待测立木图像;Fig. 4a is the standing tree image to be measured input in the present invention;

图4b是本发明中分割后的立木轮廓图像;Fig. 4b is the standing tree outline image after segmentation in the present invention;

图5是本发明实施例中相对误差对比图。FIG. 5 is a comparison diagram of relative errors in an embodiment of the present invention.

具体实施方式Detailed ways

下面通过实施例,并结合附图,对本发明的技术方案作进一步具体的说明。The technical solutions of the present invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.

实施例:Example:

本实施例一种基于单目视觉的立木高度测量方法,具体的是借助智能手机结合机器视觉技术的立木高度测量方法,智能手机具有相机和高精度陀螺仪。方法利用GraphCut算法对立木图像进行分割,实现立木图像中立木高度像素的自动获取,然后通过几何相似模型自动获取的立木图像深度信息,再提取手机内置陀螺仪的角度信息和手机拍摄高度信息来解算测量树高,为森林资源调查提供了一套新的测量方法和技术手段。This embodiment is a method for measuring the height of a standing tree based on monocular vision, specifically a method for measuring the height of a standing tree based on a smartphone combined with machine vision technology, and the smartphone has a camera and a high-precision gyroscope. Methods The GraphCut algorithm was used to segment the standing tree image to realize the automatic acquisition of the height pixels of the standing tree in the standing tree image. Then, the depth information of the standing tree image was automatically obtained through the geometric similarity model, and then the angle information of the built-in gyroscope of the mobile phone and the height information of the mobile phone were extracted to solve the problem. The calculation and measurement of tree height provides a new set of measurement methods and technical means for forest resources survey.

本实施例方法的具体步骤包括:The specific steps of the method of this embodiment include:

S1.对相机进行标定,获取相机内部参数;S1. Calibrate the camera and obtain the internal parameters of the camera;

S2.对输入图像进行立木轮廓提取,获取立木高度像素差;S2. Extract the outline of the standing tree from the input image, and obtain the pixel difference of the height of the standing tree;

S3.建立图像坐标系与世界坐标系距离的几何模型,获取立木图像深度;S3. Establish a geometric model of the distance between the image coordinate system and the world coordinate system, and obtain the depth of the standing tree image;

S4.建立高度像素坐标映射模型,获取待测目标高度关系式;S4. Establish a height pixel coordinate mapping model, and obtain the height relationship of the target to be measured;

S5.根据相机拍摄高度与角度结合高度关系式计算出立木高度。S5. Calculate the height of the standing tree according to the camera shooting height and the angle combined with the height relationship.

在步骤S1中,标定采用改进的张正友标定法,引入带有非线性畸变项的相机标定模型进行标定,实现畸变矫正并获取相机内部参数。改进的张正友标定法参考:刘艳,李腾飞.对张正友相机标定法的改进研究.光学技术,2014,40(06):565-570。若图像坐标系(x,y)原点在像素坐标系(u,v)中的坐标为(u0,v0)。相机坐标系中任一点(Xc,Yc,Zc)投影到图像坐标系上的(x,y,f),图像坐标系平面与圆点距离为f。且从物体的世界坐标Pw(XW,YW,ZW)到相机坐标Pc变换的过程是一种刚体运动,可以用物体的平移和旋转来描述。所以世界坐标系到相机坐标系的转换关系为:In step S1, the calibration adopts an improved Zhang Zhengyou calibration method, and a camera calibration model with nonlinear distortion terms is introduced for calibration, so as to achieve distortion correction and obtain camera internal parameters. Reference for the improved Zhang Zhengyou calibration method: Liu Yan, Li Tengfei. Research on the improvement of Zhang Zhengyou's camera calibration method. Optical Technology, 2014, 40(06): 565-570. If the coordinates of the origin of the image coordinate system (x, y) in the pixel coordinate system (u, v) are (u 0 , v 0 ). Any point (X c , Y c , Z c ) in the camera coordinate system is projected to (x, y, f) on the image coordinate system, and the distance between the image coordinate system plane and the dot is f. And the process of transforming from the object's world coordinates P w (X W , Y W , Z W ) to the camera coordinates P c is a rigid body motion, which can be described by the translation and rotation of the object. So the conversion relationship from the world coordinate system to the camera coordinate system is:

Figure BDA0002094824200000091
Figure BDA0002094824200000091

其中Mint,Mext分别是相机内、外参数,相机外参数包括旋转矩阵R和平移矩阵T。dx、dy为平面上每个的物力尺寸(单位:mm)。Among them, M int and M ext are internal and external parameters of the camera, respectively, and the external parameters of the camera include a rotation matrix R and a translation matrix T. d x and dy are the physical dimensions of each on the plane (unit: mm).

本方法中通过标定获取的相机内部参数包括fx、fy、u0、v0。fx为图像平面x轴方向的焦距,fy为图像平面y轴方向的焦距,v为图像坐标系中y轴坐标,u0为图像像平面x轴的主点,v0为图像像平面y轴的主点。The camera internal parameters obtained through calibration in this method include f x , f y , u 0 , and v 0 . f x is the focal length in the x-axis direction of the image plane, f y is the focal length in the y-axis direction of the image plane, v is the y-axis coordinate in the image coordinate system, u 0 is the principal point of the x-axis of the image image plane, v 0 is the image image plane The principal point of the y-axis.

步骤S2是对输入图像进行预处理和特征提取,具体过程包括:Step S2 is to perform preprocessing and feature extraction on the input image, and the specific process includes:

S21.对输入图像进行预处理,获得突出立木图像特征的图像;S21. Preprocess the input image to obtain an image that highlights the characteristics of the standing tree image;

由于在自然场景中具有复杂的背景干扰,在采集立木图像时,需要对原始图像进行预处理,突出有用信息、抑制无用信息,从而改善图像质量来方便立木图像特征信息的提取。Due to the complex background interference in natural scenes, when collecting standing tree images, it is necessary to preprocess the original images to highlight useful information and suppress useless information, so as to improve image quality and facilitate the extraction of standing tree image feature information.

S22.对预处理后的图像进行前背景分割,获得立木轮廓图像;S22. Perform front and background segmentation on the preprocessed image to obtain a standing tree outline image;

使用Graph Cut算法对采集的立木图像进行前背景分割,以帮助获得待测立木底部中心点、立木在图像上的最高点。该算法能在不同的光照强度等自然环境的影响中,有效克服自然环境下的复杂背景干扰,准确分割出特定立木。Use the Graph Cut algorithm to perform front and background segmentation on the collected standing tree images to help obtain the bottom center point of the standing tree to be tested and the highest point of the standing tree on the image. The algorithm can effectively overcome the complex background interference in the natural environment under the influence of different light intensities and other natural environments, and accurately segment specific standing trees.

S23.对立木轮廓图像进行扫描,获取立木轮廓图像的坐标分布情况;由于待测立木在图像中存在形状不规则,位置、方向自由等情况,通过扫描二维图像的坐标分布情况。S23. Scan the standing tree outline image to obtain the coordinate distribution of the standing tree outline image; since the standing tree to be measured has irregular shapes, free positions and directions in the image, the coordinate distribution of the two-dimensional image is scanned.

S24.输出立木轮廓图像中的两个最值点,分别为立木轮廓在像平面坐标系下Y轴的最大值和最小值,根据最值点计算出立木高度像素差。立木轮廓图像中的两个最值点为Smax(x,y)、Smin(x,y),yy′为立木图像在像平面上垂直方向的像素差。通过扫描立木轮廓图像,输出图像中的这两个最值点,作为后续测量立木高度的模型中的输入。S24. Output two maximum points in the standing tree outline image, which are the maximum and minimum values of the Y-axis of the standing tree outline in the image plane coordinate system, and calculate the height pixel difference of the standing tree according to the maximum points. The two maximum points in the standing tree contour image are S max (x, y) and S min (x, y), and yy′ is the pixel difference in the vertical direction of the standing tree image on the image plane. By scanning the standing tree contour image, these two maximum points in the image are output as the input in the subsequent model for measuring the standing tree height.

在树高测量模型中,采用几何相似法来测量待测目标的形状、二维位置等信息,其原理是当待测目标的几何参数位于同一平面上,且相机的像平面与待测目标平行时,通过待测目标与图像之间的空间几何相似关系获得待测目标的实际参数。步骤S3根据相机成像原理,以及相机与地平面的关系建立图像坐标系与世界坐标系距离的几何模型,采用几何相似法来获取图像深度信息。In the tree height measurement model, the geometric similarity method is used to measure the shape, two-dimensional position and other information of the target to be measured. , the actual parameters of the object to be measured are obtained through the spatial geometric similarity relationship between the object to be measured and the image. Step S3 establishes a geometric model of the distance between the image coordinate system and the world coordinate system according to the imaging principle of the camera and the relationship between the camera and the ground plane, and uses the geometric similarity method to obtain image depth information.

步骤S3中获取立木图像深度关系式的过程包括:The process of obtaining the depth relational expression of the standing tree image in step S3 includes:

S31.根据相机成像原理,以及相机与地平面的关系建立图像坐标系与世界坐标系距离的几何模型。S31. Establish a geometric model of the distance between the image coordinate system and the world coordinate system according to the camera imaging principle and the relationship between the camera and the ground plane.

如图1所示,几何模型为设定P点和光轴分别通过镜头中心在图像像平面ABCD上形成交点(x,y)、(x0,y0),(x,y)为P点在二维平面图形坐标系即图像像平面上的投影点,(x0,y0)为光轴与图像像平面的交点,相机到待测目标的深度值即P点到镜头中心距离为d,镜头中心到像平面的距离为f,镜头中心到地面的垂直水平高度为h,相机的垂直俯视角为γ,相机投影与光轴的夹角为β,L点所在直线代表地平面。As shown in Figure 1, the geometric model is to set point P and the optical axis to form intersection points (x, y), (x 0 , y 0 ) on the image plane ABCD through the center of the lens respectively, and (x, y) is the point P at The two-dimensional plane graphic coordinate system is the projection point on the image plane, (x 0 , y 0 ) is the intersection of the optical axis and the image plane, and the depth value from the camera to the target to be measured, that is, the distance from point P to the center of the lens is d, The distance from the center of the lens to the image plane is f, the vertical height from the center of the lens to the ground is h, the vertical top-down angle of the camera is γ, the angle between the camera’s projection and the optical axis is β, and the line where the L point is located represents the ground plane.

S32.根据几何模型导出像素坐标与世界坐标距离的关系式S32. Derive the relationship between the distance between pixel coordinates and world coordinates according to the geometric model

β在三维图像中像素与焦距的关系表达式为The relationship between the pixel and the focal length of β in the three-dimensional image is expressed as

根据公式(1)和(2)得到:According to formulas (1) and (2), we get:

Figure BDA0002094824200000113
Figure BDA0002094824200000113

S33.如图2所示,根据图像坐标与像素坐标之间的几何关系S33. As shown in Figure 2, according to the geometric relationship between the image coordinates and the pixel coordinates

Figure BDA0002094824200000114
Figure BDA0002094824200000114

获得y=(v-v0)dy,已知y0=0,得到Obtain y=(vv 0 )dy, given that y 0 =0, get

S34.根据得到立木图像深度关系式S34. According to Get the relationship between the depth of the standing tree image

Figure BDA0002094824200000121
Figure BDA0002094824200000121

其中d为相机到待测目标深度值,h为镜头中心到地面的垂直水平高度,γ为相机的垂直俯视角,fy为图像平面y轴方向的焦距,v为图像坐标系中y轴坐标,v0为图像像平面y轴的主点。v0和fy都是相机的内部参数,通过步骤S1的相机标定获得。where d is the depth value from the camera to the target to be measured, h is the vertical horizontal height from the center of the lens to the ground, γ is the vertical top-down angle of the camera, f y is the focal length in the y-axis direction of the image plane, and v is the y-axis coordinate in the image coordinate system , v 0 is the principal point of the y-axis of the image plane. Both v 0 and f y are internal parameters of the camera, obtained through the camera calibration in step S1.

步骤S4获取待测目标高度关系式的过程包括:The process of obtaining the height relational expression of the target to be measured in step S4 includes:

S41.根据相机小孔成像原理,建立高度像素坐标映射模型。S41. According to the camera pinhole imaging principle, establish a height pixel coordinate mapping model.

如图3所示,模型为实际成像面内A3A4通过镜头中心在像平面内成像,A3A4为实际立木高度H,A3在像平面内成像点为xy,A4在像平面内成像点为xy′,yy′为立木图像在像平面上垂直方向的像素差,Q为镜头中心,M为光轴与实际成像面的交点,QM为光轴所在位置,镜头中心P到理想成像面的距离为d,相机的垂直俯视角为γ;As shown in Figure 3, the model is that A 3 A 4 is imaged in the image plane through the center of the lens in the actual imaging plane, A 3 A 4 is the actual height H of the standing tree, the imaging point of A 3 in the image plane is xy, and A 4 is in the image plane. The imaging point in the plane is xy′, yy′ is the pixel difference of the standing tree image in the vertical direction on the image plane, Q is the center of the lens, M is the intersection of the optical axis and the actual imaging plane, QM is the position of the optical axis, and the center of the lens P to The distance of the ideal imaging plane is d, and the vertical top-down angle of the camera is γ;

xy,xy′为立木在像平面上的成像点,其中最大值Smax(x,y)和最小值为Smin(x,y)。A1A2为理想成像面,理想成像面为垂直水面面,相机的俯视角随着测量的需求发送变换,形成的实际成像面为倾斜的,M点同时也为实际成像面和理想成像面相交点。QO为相机离水平面的垂直高度,理想情况下相机俯视角γ为0度,∠OQN=90度,光轴为水平直线,N为理想情况下光轴与离心成像面的交点,QN为理想情况下光轴所在直线,QN⊥A1A2,A1A2代表的长度为三维空间中待测的树高H。在实际测量中,相机的俯视角会随着测量的需求发生变化,根据高度像素坐标映射模型,当相机俯视角发生变化时,个成像面之间的相对夹角不会发生变化。若设俯视角∠OQG=γ,则∠GQM=90度,QN⊥A3A4,所以∠GQM=γ。xy, xy' are the imaging points of the standing tree on the image plane, wherein the maximum value S max (x, y) and the minimum value are S min (x, y). A 1 A 2 is the ideal imaging plane, and the ideal imaging plane is the vertical water surface. The top-down angle of the camera is transformed according to the measurement requirements. The actual imaging plane formed is inclined, and point M is also the actual imaging plane and the ideal imaging plane. intersection. QO is the vertical height of the camera from the horizontal plane. Ideally, the camera top-down angle γ is 0 degrees, ∠OQN=90 degrees, the optical axis is a horizontal straight line, N is the intersection of the optical axis and the centrifugal imaging plane in the ideal case, and QN is the ideal case. The straight line where the lower optical axis is located, QN⊥A 1 A 2 , the length represented by A 1 A 2 is the tree height H to be measured in the three-dimensional space. In actual measurement, the top-down angle of the camera will change with the measurement requirements. According to the height pixel coordinate mapping model, when the top-down angle of the camera changes, the relative angle between the imaging surfaces will not change. If the top view angle ∠OQG=γ, then ∠GQM=90 degrees, QN⊥A 3 A 4 , so ∠GQM=γ.

S42.根据高度像素坐标映射模型得出A3A4高度公式S42. Obtain the A3A4 height formula according to the height pixel coordinate mapping model

Figure BDA0002094824200000131
Figure BDA0002094824200000131

其中

Figure BDA0002094824200000132
已知QN=d,A3A4=H,得到in
Figure BDA0002094824200000132
Given that QN=d, A 3 A 4 =H, we get

Figure BDA0002094824200000133
Figure BDA0002094824200000133

S43.结合立木图像深度关系式得到立木高度关系式S43. Combining the relationship of the depth of the standing tree image to obtain the relationship of the height of the standing tree

其中h的物理单位为米/m,yy′和fy的物力单位都为像素/pixel,H的距离单位为米/m。只需通过获取立木图像在成像面上的像素差yy′和相机内部高精度陀螺仪获得的俯视角2来获取立木的高度H。The physical unit of h is m/m, the physical unit of yy′ and f y is pixel/pixel, and the distance unit of H is m/m. It is only necessary to obtain the height H of the standing tree by obtaining the pixel difference yy′ of the standing tree image on the imaging plane and the top-down angle 2 obtained by the high-precision gyroscope inside the camera.

本实施以下采用型号为MI2S的小米手机进行具体说明。该手机Android版本为4.1.2。经过相机丁冰后求得相机内部参数为:fx=3486.5637,u0=1569.0383,fy=3497.4652,v0=2107.9898,设定手机距离地面的垂直高度h=1.10cm,图像分辨率为3120×4208。以测量数据为立木高度真值,测得立木实际高度为6.2米。如图4a所示,输入待测立木图像,通过图像处理技术利用Graph Cut对立木图像进行分割,,如图4b所示,输出立木轮廓图像。This implementation is described below using a Xiaomi mobile phone with a model of MI2S. The phone's Android version is 4.1.2. After passing through the camera Ding Bing, the internal parameters of the camera are obtained: f x =3486.5637, u 0 =1569.0383, f y =3497.4652, v 0 =2107.9898, set the vertical height of the mobile phone from the ground h=1.10cm, and the image resolution is 3120 ×4208. Taking the measured data as the true value of the standing tree height, the actual height of the standing tree was measured to be 6.2 meters. As shown in Figure 4a, input the standing tree image to be measured, and use Graph Cut to segment the standing tree image through image processing technology. As shown in Figure 4b, the standing tree outline image is output.

扫描立木轮廓图像的坐标分布情况,可以得到Y轴方向上的最大值Smax(977,365)和最小值Smin(1299,3463),可以得到yy′=3144.6897,此时手机俯视角γ=10.0°,手机距离地面垂直高度h=1.10m。通过立木高度关系式可以得到立木高度H=6.2815m。Scanning the coordinate distribution of the standing tree contour image, the maximum value S max (977,365) and the minimum value S min (1299,3463) in the Y-axis direction can be obtained, and yy′=3144.6897 can be obtained. At this time, the top view angle of the mobile phone is γ=10.0° , the vertical height of the mobile phone from the ground is h=1.10m. Through the relationship formula of the height of the standing tree, the height of the standing tree H=6.2815m can be obtained.

为了验证不同高度样木区间树高测量模型的精度,本实施例以常见的样木高度范围为样木区间,从不同的角度测量待测立木的高度。对树木进行编号并与基于无人机高分辨影响的立木高度提取方法(杨坤,赵艳玲,张建勇,等.利用无人机高分辨率影像进行树木高度提取.北京林业大学学报,2017,39(8):17-23.以下称为对比方法)做比较分析。结果如表1所示。In order to verify the accuracy of the tree height measurement model in the sample wood interval with different heights, in this embodiment, the common sample wood height range is used as the sample wood interval, and the height of the standing wood to be measured is measured from different angles. Numbering the trees and extracting the height of standing trees based on the high-resolution influence of UAVs (Yang Kun, Zhao Yanling, Zhang Jianyong, et al. Extracting tree heights using UAV high-resolution images. Journal of Beijing Forestry University, 2017, 39( 8): 17-23. Hereinafter referred to as the comparative method) for comparative analysis. The results are shown in Table 1.

表1立木高度测量数据表Table 1 Standing tree height measurement data table

Figure BDA0002094824200000141
Figure BDA0002094824200000141

如图5所示,经过计算得出测量相对误差范围为-0.029~0.338m,立木高度测量的最高相对误差为4.22%,最低相对误差为0.30%。对比方法的最高相对误差为16.23%,最低相对误差为0.33%。其中本实施例方法只有13.64%的误差在6%的以上,基于对比方法的立木高度测量方法有72.74%的相对误差超过6%,具有较大的波动。通过对比分析可以得出本实施例的方法进行立木高度的测量精度更高且测量结果更加稳定。且该方法在利用手机相机进行图像采集时,选取手机的旋转角度时应确保待测立木的图像能完整的成像在手机相机成像面,同时让图像中待测立木的底端的像素成像在光心平面的主点,以便能够准确的测得待测立木的高度。图5中本文方法即本实施例方法,文献(15)方法即对比方法。As shown in Figure 5, after calculation, the relative error range of measurement is -0.029~0.338m, the highest relative error of standing tree height measurement is 4.22%, and the lowest relative error is 0.30%. The highest relative error of the contrasting method is 16.23%, and the lowest relative error is 0.33%. Among them, only 13.64% of the method in this embodiment has an error of more than 6%, and 72.74% of the method based on the comparison method has a relative error of more than 6%, which has a large fluctuation. Through comparative analysis, it can be concluded that the method of this embodiment has higher accuracy in measuring the height of standing trees and more stable measurement results. In addition, when using the mobile phone camera for image acquisition, the rotation angle of the mobile phone should be selected to ensure that the image of the standing tree to be measured can be completely imaged on the imaging surface of the mobile phone camera, and the pixels at the bottom of the standing tree to be measured in the image are imaged in the optical center. The main point of the plane, so that the height of the standing tree to be measured can be accurately measured. In FIG. 5 , the method in this paper is the method in this embodiment, and the method in document (15) is the comparison method.

本文中所描述的具体实施例仅仅是对本发明精神作举例说明。本发明所属技术领域的技术人员可以对所描述的具体实施例做各种各样的修改或补充或采用类似的方式替代,但并不会偏离本发明的精神或者超越所附权利要求书所定义的范围。The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which the present invention pertains can make various modifications or additions to the described specific embodiments or substitute in similar manners, but will not deviate from the spirit of the present invention or go beyond the definitions of the appended claims range.

Claims (5)

1. A standing tree height measuring method based on monocular vision is characterized in that: comprises the following steps of (a) carrying out,
s1, calibrating a camera to obtain internal parameters of the camera;
s2, performing standing tree contour extraction on the input image to obtain a standing tree height pixel difference;
s3, establishing a geometric model of the distance between the image coordinate system and the world coordinate system to obtain a stumpage image depth relational expression
Figure FDA0002094824190000011
Wherein d is the depth value from the camera to the target to be measured, h is the vertical horizontal height from the center of the lens to the ground, gamma is the vertical depression angle of the camera, and fyIs the focal length in the y-axis direction of the image plane, v is the y-axis coordinate in the image coordinate system, v0Is the principal point of the y axis of the image plane;
s4, establishing a height pixel coordinate mapping model to obtain a height relation formula of the target to be measured
Figure FDA0002094824190000012
Wherein H is the standing tree height, yy' is the standing tree height pixel difference;
and S5, calculating the height of the standing tree according to the shooting height and angle of the camera.
2. The method as claimed in claim 1, wherein the camera internal parameters obtained after calibration in step S1 include fx、fy、u0、v0Wherein f isxIs the focal length, u, of the x-axis direction of the image plane0Is the principal point of the x-axis of the image plane.
3. The standing tree height measuring method based on the monocular vision as claimed in claim 1, wherein the step S2 comprises the following steps:
s21, preprocessing an input image to obtain an image with outstanding standing tree image characteristics;
s22, performing foreground and background segmentation on the preprocessed image to obtain a standing tree contour image;
s23, scanning the standing tree outline image to obtain the coordinate distribution condition of the standing tree outline image;
and S24, outputting two minimum points in the standing tree contour image, wherein the two minimum points are respectively the maximum value and the minimum value of the standing tree contour on the y axis under the image plane coordinate system, and calculating the standing tree height pixel difference according to the minimum points.
4. The method for measuring the height of the standing tree based on the monocular vision as claimed in claim 1, wherein the step of obtaining the depth relation of the standing tree image in the step S3 comprises:
s31, establishing a geometric model of the distance between the image coordinate system and the world coordinate system according to the camera imaging principle and the relation between the camera and the ground plane, wherein the geometric model is that a P point and an optical axis are set to form intersection points (x, y) and (x) on the image plane ABCD through the lens center respectively0,y0) (x, y) is the projection point of the point P on the two-dimensional plane figure coordinate system, namely the image plane, (x)0,y0) The distance from the camera to the depth value of a target to be detected, namely the distance from a point P to the center of the lens is d, the distance from the center of the lens to the image plane is f, the vertical horizontal height from the center of the lens to the ground is h, the vertical depression angle of the camera is gamma, and the included angle between the projection of the camera and the optical axis is beta.
S32, deriving a relational expression of the distance between the pixel coordinate and the world coordinate according to the geometric model
Figure FDA0002094824190000021
Beta in the three-dimensional image, the relational expression of the pixel and the focal length is
Figure FDA0002094824190000022
Obtained according to equations (1) and (2):
Figure FDA0002094824190000031
s33, according to the geometric relation between the image coordinates and the pixel coordinates
Figure FDA0002094824190000032
Obtaining y ═ v-v0) dy, known y0Is equal to 0, to obtain
Figure FDA0002094824190000033
S34. according to
Figure FDA0002094824190000034
Obtaining the vertical tree image depth relational expression
Figure FDA0002094824190000035
5. The method for measuring the height of the standing tree based on the monocular vision as claimed in claim 4, wherein the step S4 of obtaining the relation of the height of the object to be measured comprises:
s41, establishing a height pixel coordinate mapping model according to the camera pinhole imaging principle, wherein the model is A in an actual imaging plane3A4Imaging in the image plane through the lens center, A3A4To the actual standing height H, A3In the image planeThe imaging point is xy, A4The imaging point in the image plane is xy ', yy' is the pixel difference of the standing tree image in the vertical direction on the image plane, Q is the lens center, M is the intersection point of the optical axis and the actual imaging plane, QM is the position of the optical axis, the distance from the lens center P to the ideal imaging plane is d, and the vertical depression angle of the camera is gamma;
s42, obtaining the height pixel coordinate mapping model
Figure FDA0002094824190000036
Wherein
Figure FDA0002094824190000041
A3A4H, to obtain
Figure FDA0002094824190000042
S43, combining the vertical wood image depth relational expression to obtain a vertical wood height relational expression
Figure FDA0002094824190000043
CN201910515301.0A 2019-06-14 2019-06-14 A method for measuring the height of standing trees based on monocular vision Pending CN110672020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910515301.0A CN110672020A (en) 2019-06-14 2019-06-14 A method for measuring the height of standing trees based on monocular vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910515301.0A CN110672020A (en) 2019-06-14 2019-06-14 A method for measuring the height of standing trees based on monocular vision

Publications (1)

Publication Number Publication Date
CN110672020A true CN110672020A (en) 2020-01-10

Family

ID=69068535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910515301.0A Pending CN110672020A (en) 2019-06-14 2019-06-14 A method for measuring the height of standing trees based on monocular vision

Country Status (1)

Country Link
CN (1) CN110672020A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111307046A (en) * 2020-02-17 2020-06-19 东北林业大学 Tree Height Measurement Method Based on Hemisphere Image
CN111380503A (en) * 2020-05-29 2020-07-07 电子科技大学 Monocular camera ranging method adopting laser-assisted calibration
CN111462317A (en) * 2020-04-27 2020-07-28 清华大学 Camera arrangement method for monitoring space grid structure based on multi-view three-dimensional reconstruction
CN111982072A (en) * 2020-07-29 2020-11-24 西北工业大学 Target ranging method based on monocular vision
CN112197708A (en) * 2020-08-31 2021-01-08 深圳市慧鲤科技有限公司 Measuring method and device, electronic device and storage medium
CN112288751A (en) * 2020-10-12 2021-01-29 董宇青 Automatic floor sweeping device and control algorithm
CN113124819A (en) * 2021-06-17 2021-07-16 中国空气动力研究与发展中心低速空气动力研究所 Monocular distance measuring method based on plane mirror
CN113421300A (en) * 2021-06-28 2021-09-21 上海迈外迪网络科技有限公司 Method and device for determining actual position of object in fisheye camera image
CN113592958A (en) * 2021-08-13 2021-11-02 大连海事大学 Monocular vision based AUV docking station optical guiding method
CN114046728A (en) * 2021-08-30 2022-02-15 中国水产科学研究院东海水产研究所 Method for measuring target object in large area based on hyperfocal distance imaging
CN114485549A (en) * 2022-01-26 2022-05-13 西交利物浦大学 Spatial distance measurement method and system for trees and overhead transmission lines
CN114800873A (en) * 2022-04-28 2022-07-29 郑州三和水工机械有限公司 Concrete mixing plant sandstone level AI intelligent detection method and system based on 5G data transmission
CN118918169A (en) * 2024-09-30 2024-11-08 上海同陆云交通科技有限公司 Road facility height calculation method based on monocular camera image

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103148786A (en) * 2013-01-15 2013-06-12 南京林业大学 Device and method for height measurement of object
US20150116092A1 (en) * 2013-10-29 2015-04-30 Electronics And Telecommunications Research Institute Girth measuring device and method for measuring girth of tree, and wireless communication tag apparatus including girth measuring device
CN105571561A (en) * 2015-12-15 2016-05-11 浙江农林大学 Method and device for collecting stumpage information
CN107084680A (en) * 2017-04-14 2017-08-22 浙江工业大学 Target depth measuring method based on machine monocular vision
CN108507460A (en) * 2017-02-27 2018-09-07 湖南聚宝盆网络技术有限公司 A kind of blade and standing tree Measurement Algorithm research method of handset image analysis
CN108571931A (en) * 2018-05-17 2018-09-25 北京林业大学 A Tree Measurement Method Using TOF Depth Camera as a Tool
CN108645346A (en) * 2018-06-15 2018-10-12 河海大学 A kind of tree height measurement device and its measurement method
CN109146980A (en) * 2018-08-12 2019-01-04 浙江农林大学 The depth extraction and passive ranging method of optimization based on monocular vision
CN109285145A (en) * 2018-08-12 2019-01-29 浙江农林大学 A smartphone-based method for measuring the height of multiple standing trees

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103148786A (en) * 2013-01-15 2013-06-12 南京林业大学 Device and method for height measurement of object
US20150116092A1 (en) * 2013-10-29 2015-04-30 Electronics And Telecommunications Research Institute Girth measuring device and method for measuring girth of tree, and wireless communication tag apparatus including girth measuring device
CN105571561A (en) * 2015-12-15 2016-05-11 浙江农林大学 Method and device for collecting stumpage information
CN108507460A (en) * 2017-02-27 2018-09-07 湖南聚宝盆网络技术有限公司 A kind of blade and standing tree Measurement Algorithm research method of handset image analysis
CN107084680A (en) * 2017-04-14 2017-08-22 浙江工业大学 Target depth measuring method based on machine monocular vision
CN108571931A (en) * 2018-05-17 2018-09-25 北京林业大学 A Tree Measurement Method Using TOF Depth Camera as a Tool
CN108645346A (en) * 2018-06-15 2018-10-12 河海大学 A kind of tree height measurement device and its measurement method
CN109146980A (en) * 2018-08-12 2019-01-04 浙江农林大学 The depth extraction and passive ranging method of optimization based on monocular vision
CN109285145A (en) * 2018-08-12 2019-01-29 浙江农林大学 A smartphone-based method for measuring the height of multiple standing trees

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杨炜 等: "基于单目视觉的纵向车间距检测研究", 《计算机测量与控制》 *
王展青 等: "基于单目视觉的车距测量方法综述", 《科技资讯》 *
高莉平 等: "应用智能终端的立木高度测量方法", 《东北林业大学学报》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111307046A (en) * 2020-02-17 2020-06-19 东北林业大学 Tree Height Measurement Method Based on Hemisphere Image
CN111307046B (en) * 2020-02-17 2021-06-01 东北林业大学 Tree height measuring method based on hemispherical image
CN111462317A (en) * 2020-04-27 2020-07-28 清华大学 Camera arrangement method for monitoring space grid structure based on multi-view three-dimensional reconstruction
CN111462317B (en) * 2020-04-27 2022-06-21 清华大学 Camera arrangement method for monitoring space grid structure based on multi-view three-dimensional reconstruction
CN111380503A (en) * 2020-05-29 2020-07-07 电子科技大学 Monocular camera ranging method adopting laser-assisted calibration
CN111982072A (en) * 2020-07-29 2020-11-24 西北工业大学 Target ranging method based on monocular vision
CN112197708A (en) * 2020-08-31 2021-01-08 深圳市慧鲤科技有限公司 Measuring method and device, electronic device and storage medium
CN112288751A (en) * 2020-10-12 2021-01-29 董宇青 Automatic floor sweeping device and control algorithm
CN113124819B (en) * 2021-06-17 2021-09-10 中国空气动力研究与发展中心低速空气动力研究所 Monocular distance measuring method based on plane mirror
CN113124819A (en) * 2021-06-17 2021-07-16 中国空气动力研究与发展中心低速空气动力研究所 Monocular distance measuring method based on plane mirror
CN113421300A (en) * 2021-06-28 2021-09-21 上海迈外迪网络科技有限公司 Method and device for determining actual position of object in fisheye camera image
CN113592958A (en) * 2021-08-13 2021-11-02 大连海事大学 Monocular vision based AUV docking station optical guiding method
CN114046728A (en) * 2021-08-30 2022-02-15 中国水产科学研究院东海水产研究所 Method for measuring target object in large area based on hyperfocal distance imaging
CN114485549A (en) * 2022-01-26 2022-05-13 西交利物浦大学 Spatial distance measurement method and system for trees and overhead transmission lines
CN114485549B (en) * 2022-01-26 2023-10-17 西交利物浦大学 Spatial ranging method and system for trees and overhead transmission line
CN114800873A (en) * 2022-04-28 2022-07-29 郑州三和水工机械有限公司 Concrete mixing plant sandstone level AI intelligent detection method and system based on 5G data transmission
CN114800873B (en) * 2022-04-28 2024-04-12 郑州三和水工机械有限公司 5G data transmission-based intelligent detection method and system for gravel material level AI of concrete mixing plant
CN118918169A (en) * 2024-09-30 2024-11-08 上海同陆云交通科技有限公司 Road facility height calculation method based on monocular camera image

Similar Documents

Publication Publication Date Title
CN110672020A (en) A method for measuring the height of standing trees based on monocular vision
CN109410256B (en) Automatic high-precision registration method of point cloud and image based on mutual information
CN109785379B (en) A measuring method and measuring system for the size and weight of a symmetrical object
CN109544628B (en) Accurate reading identification system and method of a pointer meter
CN109269430B (en) Passive measurement method of diameter at breast height of multiple standing trees based on depth extraction model
CN109708578B (en) Device, method and system for measuring plant phenotype parameters
CN103759671B (en) A kind of dental model three-dimensional surface data non-contact scanning method
CN104748683B (en) A kind of on-line automatic measurement apparatus of Digit Control Machine Tool workpiece and measuring method
CN111369630A (en) A method of multi-line lidar and camera calibration
CN110443836A (en) A kind of point cloud data autoegistration method and device based on plane characteristic
CN107016697B (en) A kind of height measurement method and device
CN110223355B (en) Feature mark point matching method based on dual epipolar constraint
CN115375842A (en) Plant three-dimensional reconstruction method, terminal and storage medium
CN105574812B (en) Multi-angle three-dimensional data method for registering and device
CN111260720A (en) A target height determination system based on deep learning method
CN109448043A (en) Standing tree height extracting method under plane restriction
CN109272555B (en) A method of obtaining and calibrating external parameters of RGB-D camera
CN107084680A (en) Target depth measuring method based on machine monocular vision
US20240394899A1 (en) Method, Apparatus and Device for Photogrammetry, and Storage Medium
CN111179335A (en) Standing tree measuring method based on binocular vision
CN104807449A (en) Power transmission line crossing measuring system based on stereo photogrammetry measurement
CN111307046A (en) Tree Height Measurement Method Based on Hemisphere Image
CN107705335A (en) Demarcate the non-method that ken line sweeps laser range finder and measures camera orientation altogether
CN111311659B (en) Calibration method based on three-dimensional imaging of oblique plane mirror
CN103697811A (en) Method of obtaining three-dimensional coordinates of profile of object through combining camera and structural light source

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

Application publication date: 20200110

RJ01 Rejection of invention patent application after publication