patents.google.com

CN111504208A - A non-contact method and system for measuring tree diameter at breast height based on computer vision - Google Patents

  • ️Fri Aug 07 2020
A non-contact method and system for measuring tree diameter at breast height based on computer vision Download PDF

Info

Publication number
CN111504208A
CN111504208A CN202010435107.4A CN202010435107A CN111504208A CN 111504208 A CN111504208 A CN 111504208A CN 202010435107 A CN202010435107 A CN 202010435107A CN 111504208 A CN111504208 A CN 111504208A Authority
CN
China
Prior art keywords
tree
trunk
area
image
color
Prior art date
2020-05-21
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
CN202010435107.4A
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.)
Nanjing Hongyihe Intelligent Technology Co ltd
Nanjing University
Original Assignee
Nanjing Hongyihe Intelligent Technology Co ltd
Nanjing 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.)
2020-05-21
Filing date
2020-05-21
Publication date
2020-08-07
2020-05-21 Application filed by Nanjing Hongyihe Intelligent Technology Co ltd, Nanjing University filed Critical Nanjing Hongyihe Intelligent Technology Co ltd
2020-05-21 Priority to CN202010435107.4A priority Critical patent/CN111504208A/en
2020-08-07 Publication of CN111504208A publication Critical patent/CN111504208A/en
Status 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/08Measuring arrangements characterised by the use of optical techniques for measuring diameters
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K17/00Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations
    • G06K17/0022Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device
    • G06K17/0029Methods or arrangements for effecting co-operative working between equipments covered by two or more of main groups G06K1/00 - G06K15/00, e.g. automatic card files incorporating conveying and reading operations arrangements or provisions for transferring data to distant stations, e.g. from a sensing device the arrangement being specially adapted for wireless interrogation of grouped or bundled articles tagged with wireless record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20112Image segmentation details
    • G06T2207/20132Image cropping
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30181Earth observation
    • G06T2207/30188Vegetation; Agriculture

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Geometry (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Image Analysis (AREA)

Abstract

一种基于计算机视觉的非接触式树木胸径测量方法及系统,硬件设备包括:RFID标签、智能手机、RFID读写设备、手持设备;通过智能手机拍得带有彩色标签的树木躯干照片,将该照片传至服务器进行图像处理,处理后获得待测树木的胸径,所述彩色标签附有RFID标签,同时由RFID读写设备识别树木RFID标签,并在服务器中将测得的树木胸径与该树木的RFID标签对应存储。本发明实施例中设备装置简单、便于携带,整个系统可提升树木测量与管理的效率。

Figure 202010435107

A non-contact tree diameter measurement method and system based on computer vision, the hardware equipment includes: RFID tags, smart phones, RFID reading and writing equipment, and handheld devices; The photo is sent to the server for image processing. After processing, the diameter at breast height of the tree to be tested is obtained. The color label is attached with an RFID tag. At the same time, the tree RFID tag is identified by the RFID reading and writing device, and the measured tree diameter at breast height is compared with the tree in the server. The corresponding RFID tags are stored. The equipment in the embodiment of the present invention is simple and portable, and the whole system can improve the efficiency of tree measurement and management.

Figure 202010435107

Description

一种基于计算机视觉的非接触式树木胸径测量方法及系统A non-contact method and system for measuring tree diameter at breast height based on computer vision

技术领域technical field

本发明属于林业测量技术领域,具体为一种基于计算机视觉的非接触式树木胸径测量方法及系统。The invention belongs to the technical field of forestry measurement, in particular to a non-contact tree diameter at breast height measurement method and system based on computer vision.

背景技术Background technique

胸径是衡量苗木价格的很重要的一个依据,在苗圃的树木胸径盘点中,树木胸径的测量工作极其重要。Diameter at breast height is an important basis for measuring the price of seedlings. In the inventory of tree diameter at breast height in nurseries, the measurement of tree diameter at breast height is extremely important.

现有测量技术可以分为两大类:接触式测量和非接触式测量。接触式测量主要通过胸径尺,围绕树干一周,测量者必须接近树干,测量效率很低,对于动辄数十万的苗木数量,苗木胸径的测量难以完成。非接触式测量装置中,使用三角原理和激光测距等原理的测量系统需要相对稳定的平台才能测量;另外,使用图像采集并处理的测量装置无法避免使用测距尺测量图像采集点与待测量树木的距离,测量速度也相对很慢,不能适用于苗木数量庞大的测量环境。Existing measurement techniques can be divided into two categories: contact measurement and non-contact measurement. The contact measurement is mainly through the diameter at breast height, which surrounds the trunk, and the measurer must be close to the trunk, and the measurement efficiency is very low. In the non-contact measurement device, the measurement system using the principles of triangulation and laser ranging requires a relatively stable platform to measure; in addition, the measurement device using image acquisition and processing cannot avoid using a distance ruler to measure the image acquisition point and the to-be-measured. The distance between trees and the measurement speed are also relatively slow, which cannot be applied to the measurement environment with a large number of seedlings.

发明内容SUMMARY OF THE INVENTION

本发明针对现有技术的缺陷,提供了一种用于非接触式树木胸径测量的方法与系统,在不需要固定平台、激光测距仪与测距尺的情况下就可对树木胸径进行准确测量,并应对大规模测量实现数据自动整理。Aiming at the defects of the prior art, the present invention provides a method and system for non-contact tree diameter at breast height measurement, which can accurately measure tree diameter at breast height without the need for a fixed platform, a laser range finder and a distance measuring ruler. Measure and automatically organize data for large-scale measurements.

本发明的技术方案为:一种基于计算机视觉的非接触式树木胸径测量方法,其通过智能手机拍得带有彩色标签的树木躯干照片,将该照片传至服务器进行图像处理,处理后获得待测树木的胸径,所述彩色标签附有RFID标签,同时由RFID读写设备识别树木RFID标签,并在服务器中将测得的树木胸径与该树木的RFID标签对应存储。The technical scheme of the present invention is as follows: a non-contact tree diameter measurement method based on computer vision, which uses a smartphone to take a photo of tree trunks with color labels, transmits the photo to a server for image processing, and obtains a waiting list after processing. The diameter at breast height of the tree is measured, the color label is attached with an RFID tag, and the RFID tag of the tree is identified by the RFID reading and writing device, and the measured tree diameter at breast height is stored in the server corresponding to the RFID tag of the tree.

作为优选方式,所述测量方法通过软件程序实现,所述软件模块包括配置在智能手机中的倾斜度校验模块、图片采集模块、标签读取模块,以及配置在服务器的视觉测量模块和web端系统,所述倾斜度校验模块通过智能手机内部的陀螺仪获取当前智能手机的倾斜度,当所述倾斜度在允许区间内,且智能手机的摄像头准心对准树木躯干上的彩色标签时,触发图片采集模块采集待测量树木照片,所述标签读取模块通过串口向RFID读写设备发送指令,读取待测树木RFID标签,并接收返回数据,智能手机将待测量树木照片和RFID标签数据传至服务器,由所述视觉测量模块利用视觉测量算法处理照片以获得树木胸径;所述web端系统用于提供人机交互界面,提供对树木生长情况和员工测量情况信息查询端口,显示各个树木的历史生长信息、每个智能手机所对应的员工完成的测量工作量、以及树木生长区域的土壤肥沃度情况,用于进行可量化的管理。As a preferred way, the measurement method is implemented by a software program, and the software modules include an inclination verification module, a picture acquisition module, a label reading module configured in a smart phone, and a visual measurement module and a web terminal configured in the server. System, the inclination verification module obtains the inclination of the current smartphone through the gyroscope inside the smartphone, when the inclination is within the allowable interval, and the camera of the smartphone is aligned with the color label on the trunk of the tree , trigger the picture acquisition module to collect the photos of the trees to be measured, the tag reading module sends instructions to the RFID reading and writing device through the serial port, reads the RFID tags of the trees to be tested, and receives the returned data, and the smartphone will send the photos of the trees to be measured and the RFID tags. The data is transmitted to the server, and the visual measurement module uses the visual measurement algorithm to process the photos to obtain the tree diameter at breast height; the web terminal system is used to provide a human-computer interaction interface, provide a query port for information on tree growth and employee measurement, and display various information. Historical tree growth information, the amount of measurement work done by employees on each smartphone, and soil fertility in the tree-growing area are used for quantifiable management.

进一步的,所述视觉测量模块实现相机标定、树干分割和胸径计算;相机标定为检测采集到的图像中的彩色标签,计算彩色标签在图像中的尺寸,根据该尺寸和已知的相机焦距,计算拍摄时彩色标签中心与镜头之间的距离;树干分割是通过图像分割算法检测图像中的树干区域;胸径计算是由相机标定获得的拍摄时镜头与彩色标签中心的距离计算树干的实际胸径。Further, the visual measurement module realizes camera calibration, tree trunk segmentation and DBH calculation; the camera calibration is to detect the color label in the collected image, calculate the size of the color label in the image, and according to the size and the known camera focal length, Calculate the distance between the center of the color label and the lens at the time of shooting; the trunk segmentation is to detect the trunk area in the image through the image segmentation algorithm; the DBH calculation is the distance between the lens and the center of the color label obtained by the camera calibration to calculate the actual DBH of the trunk.

所述相机标定具体为:根据颜色获得图像中彩色标签所在区域,对该区域应用LSD直线检测算法获得该区域的两条长边和一条短边,计算彩色标签在平行于长边方向上的最大长度,即长轴长度,计算彩色标签在平行于短边方向上的最大长度,即短轴长度,根据长轴长度、短轴长度和已知的相机焦距获得拍摄时相机镜头与彩色标签中心的距离。The camera calibration is specifically: obtaining the area where the color label is located in the image according to the color, applying the LSD straight line detection algorithm to the area to obtain two long sides and one short side of the area, and calculating the maximum value of the color label in the direction parallel to the long side. Length, that is, the length of the long axis, calculate the maximum length of the color label in the direction parallel to the short side, that is, the length of the short axis, and obtain the distance between the camera lens and the center of the color label when shooting according to the length of the long axis, the length of the short axis and the known focal length of the camera. distance.

所述树干分割具体为:用相机标定检测到的彩色标签区域上方和下方的树干区域覆盖该彩色标签区域,将围绕原彩色标签所在位置的图像区域进行裁剪,并将覆盖且裁剪后的图像中原彩色标签位置的区域指定为前景区域,将覆盖且裁剪后的图像的左上角、左下角、右上角、右下角的区域指定为背景区域,将覆盖且裁剪后的图像、指定的前景区域位置、背景区域位置输入基于深度卷积神经网络的交互式图像分割算法,获得树干在覆盖且裁剪后的图像中的区域,即树干区域。The trunk segmentation is specifically as follows: the trunk area above and below the color label area detected by the camera calibration is used to cover the color label area, the image area surrounding the location of the original color label is cropped, and the original color label area is covered and cropped. The area where the color label is located is designated as the foreground area, and the areas of the upper left, lower left, upper right, and lower right corners of the overlaid and cropped image are designated as the background area, and the overlaid and cropped image, the designated foreground area position, The background region position is input to the interactive image segmentation algorithm based on the deep convolutional neural network, and the region of the tree trunk in the covered and cropped image is obtained, that is, the trunk region.

所述胸径计算具体为:对树干区域提取树干的左右边缘,将包含树干左右边缘的图像沿竖直方向分割为若干高度相同的矩形小区域,每一个小区域包含树干的部分左右边缘,利用线性回归将每一个小区域中的树干的部分左右边缘分别拟合为两条直线,计算原始树干边缘与拟合直线之间的均方误差,计算两条拟合直线之间的夹角;若均方误差大于指定阈值或夹角大于指定阈值,则丢弃该小区域,否则,将两条直线近似为平行线并计算两条直线之间的距离;再对各个小区域计算得到的距离求平均值作为树干在图像中的胸径;最后根据树干在图像中的胸径和相机标定模块中获得的拍摄时镜头与彩色标签中心的距离,利用几何关系即可算出实际的树干胸径。The DBH calculation is specifically: extracting the left and right edges of the trunk from the trunk area, dividing the image including the left and right edges of the trunk into several small rectangular areas with the same height in the vertical direction, and each small area contains part of the left and right edges of the trunk, using linear The regression fits the left and right edges of the trunk in each small area to two straight lines, calculates the mean square error between the edge of the original trunk and the fitted straight line, and calculates the angle between the two fitted straight lines; If the square error is greater than the specified threshold or the included angle is greater than the specified threshold, the small area will be discarded, otherwise, the two straight lines will be approximated as parallel lines and the distance between the two straight lines will be calculated; then the distance calculated by each small area will be averaged As the DBH of the trunk in the image; finally, according to the DBH of the trunk in the image and the distance between the lens and the center of the color label when shooting, the geometric relationship can be used to calculate the actual DBH of the trunk.

本发明还提供一种基于计算机视觉的非接触式树木胸径测量系统,包括彩色标签、智能手机、RFID读写设备、手持设备和服务器,手持设备用于装载智能手机和RFID读写设备,彩色标签设置在待测树木上,所有树木的彩色标签具有相同的尺寸,每个彩色标签附有RFID标签,用于记录唯一的树木编号,智能手机与服务器通信连接,所述智能手机及服务器中配置有软件程序,所述软件程序被执行时实现上述的测量方法。The invention also provides a non-contact tree diameter measurement system based on computer vision, including a color label, a smart phone, an RFID reading and writing device, a hand-held device and a server. The hand-held device is used to load the smart phone and the RFID reading and writing device. Set on the trees to be tested, the color labels of all trees have the same size, and each color label is attached with an RFID tag to record a unique tree number, the smartphone is connected to the server for communication, and the smartphone and the server are configured with A software program that, when executed, implements the measurement method described above.

进一步的,智能手机通过串口为RFID读写设备供电,并接受来自RFID读写设备的数据。Further, the smartphone supplies power to the RFID reading and writing device through the serial port, and accepts data from the RFID reading and writing device.

进一步的,所述手持设备装有可调节手机支架,适用与于同型号手机的承载;手持设备在智能手机和RFID读写设备的装载位置设有串口接口,串口接口之间通过串口线路连接,在串口线路上设置有一个开关,用于控制RFID读写设备电路的通断;Further, the handheld device is equipped with an adjustable mobile phone bracket, which is suitable for carrying mobile phones of the same model; the handheld device is provided with a serial port interface at the loading position of the smart phone and the RFID reading and writing device, and the serial port interfaces are connected by a serial port line. A switch is set on the serial port line to control the on-off of the circuit of the RFID read-write device;

进一步的,手持设备还有设置充电插口,充电插口连接串口线路,用于外部电源对智能手机充电。Further, the handheld device is also provided with a charging socket, and the charging socket is connected to a serial port line for charging the smart phone with an external power supply.

现有的接触式测量方法在测量大量树木的场景下多有不便,而部分非接触式方法,对部分天气的适应性较差。为了解决这一问题,本发明通过在树木上安装特定彩色标签,借助软件计算彩色标签的尺寸,可在不接触树木的情况下完成对树木胸径的测量,并将测量结果存储,同时提供配套系统可查询树木的生长情况和员工测量情况。本发明设备装置简单、便于携带,整个系统可提升树木测量与管理的效率。The existing contact measurement methods are inconvenient in the scene of measuring a large number of trees, and some non-contact methods have poor adaptability to some weather. In order to solve this problem, the present invention can complete the measurement of the tree diameter at breast height without touching the tree by installing a specific color label on the tree and calculate the size of the color label with the help of software, and store the measurement result, and provide a supporting system at the same time Check tree growth and employee measurements. The device of the invention is simple and easy to carry, and the whole system can improve the efficiency of tree measurement and management.

附图说明Description of drawings

图1为本发明实施例中用于树木胸径测量的装置示意图。FIG. 1 is a schematic diagram of a device for measuring tree diameter at breast height in an embodiment of the present invention.

图2为本发明实施例树木胸径测量的方法流程示意图。2 is a schematic flowchart of a method for measuring tree diameter at breast height according to an embodiment of the present invention.

图3为本发明实施例树木胸径测量中图像处理的流程示意图。FIG. 3 is a schematic flowchart of image processing in tree diameter at breast height measurement according to an embodiment of the present invention.

具体实施方式Detailed ways

本发明提供了一种非接触树木胸径测量的装置、系统和方法,设备简单便于携带,使用计算机视觉的方法完成树木胸径的测量,无需多余的辅助设备,为树木胸径的测量提供极大的便捷。The invention provides a device, system and method for non-contact tree diameter at breast height measurement. The device is simple and easy to carry. The computer vision method is used to complete the measurement of tree diameter at breast height without redundant auxiliary equipment, which provides great convenience for the measurement of tree diameter at breast height. .

结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明的保护范围。The technical solutions in the embodiments of the present invention are clearly and completely described with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present invention.

图1是本发明实施例用于测量树木胸径的手持设备部分装置结构示意图,下面结合图1,对本发明实施例作详细的描述。FIG. 1 is a schematic structural diagram of a part of a handheld device for measuring tree diameter at breast height according to an embodiment of the present invention. The embodiment of the present invention will be described in detail below with reference to FIG. 1 .

如图1所示,本实施例的移动测量端包括智能手机1、RFID读写设备4和手持设备3,所述智能手机1和RFID读写设备4设置在手持设备3上;所述智能手机1上的摄像头2与所述RFID读写设备4面朝同一方向,所述RFID读写设备4用于在智能手机1采集待测量树木胸径照片时,读取树木上标签的树木编号信息。As shown in FIG. 1 , the mobile measurement terminal in this embodiment includes a smartphone 1, an RFID reading and writing device 4, and a handheld device 3, and the smartphone 1 and the RFID reading and writing device 4 are arranged on the handheld device 3; the smartphone The camera 2 on the 1 faces the same direction as the RFID reading and writing device 4. The RFID reading and writing device 4 is used to read the tree number information on the tree label when the smartphone 1 collects the DBH photo of the tree to be measured.

具体地,本发明实施例手持设备3上设置有可调节手机支架6,用于放置不同尺寸的智能手机1。如图1所示,RFID读写设备设置在智能手机背侧的装置内部,只要保证RFID读写设备可读取到标签信息即可,其具体位置本发明实施例不做具体限定。Specifically, the handheld device 3 in the embodiment of the present invention is provided with an adjustable mobile phone holder 6 for placing smart phones 1 of different sizes. As shown in FIG. 1 , the RFID reading and writing equipment is arranged inside the device on the back of the smartphone, as long as the RFID reading and writing equipment can read the tag information, its specific location is not specifically limited in the embodiment of the present invention.

此外,本发明实施例中手持设备在智能手机和RFID读写设备的装载位置设有串口接口,串口接口之间通过串口线路连接,由智能手机1通过串口为整个硬件电路供电。在串口线路上设置有一个开关5,用于控制RFID读写设备电路的通断。串口在供电的同时,亦可完成数据传输的功能。;进一步的,手持设备还有设置充电插口,充电插口连接串口线路,用于外部电源对智能手机充电。In addition, in the embodiment of the present invention, the handheld device is provided with a serial port interface at the loading position of the smart phone and the RFID reading and writing device, the serial ports are connected by a serial port line, and the smart phone 1 supplies power to the entire hardware circuit through the serial port. A switch 5 is arranged on the serial port line, which is used to control the on-off of the circuit of the RFID read-write device. The serial port can also complete the function of data transmission while supplying power. ; Further, the handheld device is also provided with a charging socket, and the charging socket is connected to a serial port line for charging the smart phone with an external power supply.

本发明在上述硬件设备的基础上,通过配置软件程序,实现一种基于计算机视觉的非接触式树木胸径测量方法,通过智能手机拍得带有彩色标签的树木躯干照片,将该照片传至服务器进行图像处理,处理后获得待测树木的胸径,所述彩色标签附有RFID标签,同时由RFID读写设备识别树木RFID标签,并在服务器中将测得的树木胸径与该树木的RFID标签对应存储。On the basis of the above-mentioned hardware equipment, the present invention realizes a non-contact tree diameter measurement method based on computer vision by configuring software programs, taking a photo of tree trunk with a color label by a smart phone, and transmitting the photo to a server Image processing is performed, and the diameter at breast height of the tree to be tested is obtained after processing. The color label is attached with an RFID tag. At the same time, the tree RFID tag is identified by the RFID reading and writing device, and the measured tree diameter at breast height corresponds to the RFID tag of the tree in the server. storage.

作为优选方式,所述测量方法通过软件程序实现,所述软件模块包括配置在智能手机中的倾斜度校验模块、图片采集模块、标签读取模块,以及配置在服务器的视觉测量模块和web端系统,所述倾斜度校验模块通过智能手机内部的陀螺仪获取当前智能手机的倾斜度,当所述倾斜度在允许区间内,且智能手机的摄像头准心对准树木躯干上的彩色标签时,触发图片采集模块采集待测量树木照片,所述标签读取模块通过串口向RFID读写设备发送指令,读取待测树木RFID标签,并接收返回数据,智能手机将待测量树木照片和RFID标签数据传至服务器,由所述视觉测量模块利用视觉测量算法处理照片以获得树木胸径;所述web端系统用于提供人机交互界面,提供对树木生长情况和员工测量情况信息查询端口,显示各个树木的历史生长信息、每个智能手机所对应的员工完成的测量工作量、以及树木生长区域的土壤肥沃度情况,用于进行可量化的管理。As a preferred way, the measurement method is implemented by a software program, and the software modules include an inclination verification module, a picture acquisition module, a label reading module configured in a smart phone, and a visual measurement module and a web terminal configured in the server. System, the inclination verification module obtains the inclination of the current smartphone through the gyroscope inside the smartphone, when the inclination is within the allowable interval, and the camera of the smartphone is aligned with the color label on the trunk of the tree , trigger the picture acquisition module to collect the photos of the trees to be measured, the tag reading module sends instructions to the RFID reading and writing device through the serial port, reads the RFID tags of the trees to be tested, and receives the returned data, and the smartphone will send the photos of the trees to be measured and the RFID tags. The data is transmitted to the server, and the visual measurement module uses the visual measurement algorithm to process the photos to obtain the tree diameter at breast height; the web terminal system is used to provide a human-computer interaction interface, provide a query port for information on tree growth and employee measurement, and display various information. Historical tree growth information, the amount of measurement work done by employees on each smartphone, and soil fertility in the tree-growing area are used for quantifiable management.

图2为本发明实施例树木胸径测量的方法流程示意图,彩色标签采用蓝色,本发明实施例中的树木胸径测量的方法包括:智能手机内测量软件进行倾斜度校验,当倾斜度在规定范围以内,且拍摄准心对准蓝色标签时,采集待测量树木胸径图片;所述测量软件将图片传至服务器对图片进行视觉测量,获取蓝色标签图像尺寸和待测量树木轮廓,并根据蓝色标签图像和树木轮廓计算得到实际树木胸径。2 is a schematic flowchart of a method for measuring tree diameter at breast height according to an embodiment of the present invention, and the color label is blue. The method for measuring tree diameter at breast height in the embodiment of the present invention includes: measuring software in a smartphone to perform inclination verification, and when the inclination is within the specified range The measurement software transmits the picture to the server for visual measurement of the picture, obtains the image size of the blue label and the outline of the tree to be measured, and according to The actual tree diameter at breast height is calculated from the blue label image and the tree outline.

进一步的,在服务器端,所述视觉测量模块实现相机标定、树干分割和胸径计算;相机标定为检测采集到的图像中的彩色标签,计算彩色标签在图像中的尺寸,根据该尺寸和已知的相机焦距,计算拍摄时彩色标签中心与镜头之间的距离;树干分割是通过图像分割算法检测图像中的树干区域;胸径计算是由相机标定获得的拍摄时镜头与彩色标签中心的距离计算树干的实际胸径。Further, on the server side, the visual measurement module realizes camera calibration, tree trunk segmentation and DBH calculation; the camera calibration is to detect the color label in the collected image, calculate the size of the color label in the image, according to the size and known The focal length of the camera is used to calculate the distance between the center of the color label and the lens when shooting; the trunk segmentation is to detect the trunk area in the image through the image segmentation algorithm; the DBH calculation is to calculate the distance between the lens and the center of the color label when the camera is calibrated to calculate the trunk. actual diameter at breast height.

所述相机标定具体为:在如果把颜色空间中,根据颜色获得图像中彩色标签所在区域,对该区域应用LSD直线检测算法获得该区域的两条长边和一条短边,计算彩色标签在平行于长边方向上的最大长度,即长轴长度,计算彩色标签在平行于短边方向上的最大长度,即短轴长度,根据长轴长度、短轴长度和已知的相机焦距获得拍摄时相机镜头与彩色标签中心的距离。The camera calibration is specifically as follows: in the color space, the area where the color label is located in the image is obtained according to the color, the LSD straight line detection algorithm is applied to the area to obtain two long sides and a short side of the area, and the color label is calculated in parallel. Calculate the maximum length of the color label in the direction parallel to the short side, that is, the length of the short axis, based on the maximum length in the long-side direction, that is, the length of the long-axis The distance of the camera lens from the center of the colored label.

所述树干分割具体为:用相机标定检测到的彩色标签区域上方和下方的树干区域覆盖该彩色标签区域,将围绕原彩色标签所在位置的图像区域进行裁剪,并将覆盖且裁剪后的图像中原彩色标签位置的区域指定为前景区域,将覆盖且裁剪后的图像的左上角、左下角、右上角、右下角的区域指定为背景区域,将覆盖且裁剪后的图像、指定的前景区域位置、背景区域位置输入基于深度卷积神经网络的交互式图像分割算法(Interactive ImageSegmentation with Latent diversity(CVPR2018,MIT许可证可商用),获得树干在覆盖且裁剪后的图像中的区域,即树干区域。The trunk segmentation is specifically as follows: the trunk area above and below the color label area detected by the camera calibration is used to cover the color label area, the image area surrounding the location of the original color label is cropped, and the original color label area is covered and cropped. The area where the color label is located is designated as the foreground area, and the areas of the upper left, lower left, upper right, and lower right corners of the overlaid and cropped image are designated as the background area, and the overlaid and cropped image, the designated foreground area position, The background region position is input to the interactive image segmentation algorithm based on deep convolutional neural network (Interactive ImageSegmentation with Latent diversity (CVPR2018, MIT license is commercially available), and the region of the tree trunk in the covered and cropped image is obtained, that is, the trunk region.

所述胸径计算具体为:对树干区域提取树干的左右边缘,将包含树干左右边缘的图像沿竖直方向分割为若干高度相同的矩形小区域,每一个小区域包含树干的部分左右边缘,利用线性回归将每一个小区域中的树干的部分左右边缘分别拟合为两条直线,计算原始树干边缘与拟合直线之间的均方误差,计算两条拟合直线之间的夹角;若均方误差大于指定阈值或夹角大于指定阈值,则丢弃该小区域,否则,将两条直线近似为平行线并计算两条直线之间的距离;再对各个小区域计算得到的距离求平均值作为树干在图像中的胸径;最后根据树干在图像中的胸径和相机标定模块中获得的拍摄时镜头与彩色标签中心的距离,利用几何关系即可算出实际的树干胸径。The DBH calculation is specifically: extracting the left and right edges of the trunk from the trunk area, dividing the image including the left and right edges of the trunk into several small rectangular areas with the same height in the vertical direction, and each small area contains part of the left and right edges of the trunk, using linear The regression fits the left and right edges of the trunk in each small area to two straight lines, calculates the mean square error between the edge of the original trunk and the fitted straight line, and calculates the angle between the two fitted straight lines; If the square error is greater than the specified threshold or the included angle is greater than the specified threshold, the small area will be discarded, otherwise, the two straight lines will be approximated as parallel lines and the distance between the two straight lines will be calculated; then the distance calculated by each small area will be averaged As the DBH of the trunk in the image; finally, according to the DBH of the trunk in the image and the distance between the lens and the center of the color label when shooting, the geometric relationship can be used to calculate the actual DBH of the trunk.

本发明实施例提供的用于树木胸径测量的方法、装置与系统,结构简单,方便携带,智能手机采集待测量树木胸径图片后即可快速准确的获取待测量树木胸径,提高了树木胸径的测量效率和精度。The method, device and system for measuring the tree diameter at breast height provided by the embodiments of the present invention have a simple structure and are easy to carry. After collecting the DBH picture of the tree to be measured, the smartphone can quickly and accurately obtain the DBH of the tree to be measured, which improves the measurement of the tree diameter at breast height. Efficiency and Precision.

Claims (10)

1. A non-contact tree breast height diameter measuring method based on computer vision is characterized in that a tree trunk photo with a color tag is shot through a smart phone, the photo is transmitted to a server to be subjected to image processing, the breast height diameter of a tree to be measured is obtained after the image processing, the color tag is attached with an RFID tag, meanwhile, an RFID reading and writing device identifies the tree RFID tag, and the measured tree breast height diameter and the RFID tag of the tree are correspondingly stored in the server.

2. The non-contact tree breast diameter measuring method based on the computer vision is characterized in that the method is realized through a software program, the software module comprises an inclination checking module, a picture collecting module, a label reading module, a vision measuring module and a web end system, the inclination checking module is configured in a smart phone, the vision measuring module and the web end system are configured in a server, the inclination checking module obtains the current inclination of the smart phone through a gyroscope inside the smart phone, when the inclination is within an allowable range and a camera of the smart phone is aligned with a color label on a trunk of a tree, the picture collecting module is triggered to collect a tree photo to be measured, the label reading module sends a command to an RFID read-write device through a serial port, reads an RFID label of the tree to be measured and receives return data, and the smart phone transmits the tree photo to be measured and the RFID label data to the server, processing the photograph by the vision measurement module using a vision measurement algorithm to obtain a tree breast diameter; the web-side system is used for providing a human-computer interaction interface, providing an information query port for tree growth conditions and staff measurement conditions, displaying historical growth information of each tree, measurement workload completed by staff corresponding to each smart phone and soil fertility conditions of a tree growth area, and performing quantifiable management.

3. The non-contact tree breast diameter measuring method based on computer vision as claimed in claim 1, wherein the vision measuring module realizes camera calibration, trunk segmentation and breast diameter calculation; the camera is marked to detect a color label in the acquired image, the size of the color label in the image is calculated, and the distance between the center of the color label and the lens during shooting is calculated according to the size and the known focal length of the camera; the trunk segmentation is to detect a trunk region in an image through an image segmentation algorithm; the breast-height diameter calculation is to calculate the actual breast-height diameter of the trunk according to the distance between the lens and the center of the color label during shooting, which is obtained by calibrating the camera.

4. The method as claimed in claim 3, wherein the camera calibration is implemented by obtaining an area where a color label is located in an image according to color, obtaining two long sides and one short side of the area by applying L SD straight line detection algorithm to the area, calculating the maximum length of the color label in the direction parallel to the long sides, namely the length of the long axis, calculating the maximum length of the color label in the direction parallel to the short sides, namely the length of the short axis, and obtaining the distance between the camera lens and the center of the color label during shooting according to the length of the long axis, the length of the short axis and the known camera focal length.

5. The method as claimed in claim 3, wherein the trunk segmentation is as follows: the method comprises the steps of marking a tree trunk area above and below a detected color label area by a camera to cover the color label area, cutting an image area surrounding the position of an original color label, designating the area of the original color label position in the covered and cut image as a foreground area, designating the areas of the left upper corner, the left lower corner, the right upper corner and the right lower corner of the covered and cut image as a background area, inputting the covered and cut image, the designated foreground area position and the background area position into an interactive image segmentation algorithm based on a depth convolution neural network, and obtaining the area of the tree trunk in the covered and cut image, namely the tree trunk area.

6. The method for measuring the breast diameter of the tree based on the computer vision as claimed in claim 3, wherein the breast diameter is calculated by: extracting left and right edges of a trunk from a trunk region, dividing an image containing the left and right edges of the trunk into a plurality of rectangular small regions with the same height along the vertical direction, fitting the left and right edges of the trunk in each small region into two straight lines by utilizing linear regression, calculating the mean square error between the original trunk edge and the fitted straight line, and calculating the included angle between the two fitted straight lines; if the mean square error is larger than a specified threshold or the included angle is larger than a specified threshold, discarding the small area, otherwise, approximating the two straight lines as parallel lines and calculating the distance between the two straight lines; then, averaging the distances obtained by calculating each small area to be used as the breast diameter of the trunk in the image; and finally, calculating the actual trunk diameter according to the diameter of breast in the image of the trunk and the distance between the lens and the center of the color label during shooting, which is obtained in the camera calibration module, by utilizing the geometric relationship.

7. A non-contact tree breast height diameter measuring system based on computer vision is characterized by comprising color tags, a smart phone, RFID reading and writing equipment, handheld equipment and a server, wherein the handheld equipment is used for loading the smart phone and the RFID reading and writing equipment, the color tags are arranged on trees to be measured, the color tags of all the trees have the same size, each color tag is attached with an RFID tag and used for recording a unique tree number, the smart phone is in communication connection with the server, software programs are configured in the smart phone and the server, and when the software programs are executed, the measuring method of any one of claims 1-6 is achieved.

8. The system of claim 7, wherein the smart phone supplies power to the RFID reader/writer device through a serial port and receives data from the RFID reader/writer device.

9. The system of claim 7, wherein the hand-held device is equipped with an adjustable cell phone holder adapted to be carried by a cell phone of the same model; the handheld device is provided with serial ports at the loading positions of the smart phone and the RFID read-write equipment, the serial ports are connected through serial ports, and a switch is arranged on the serial ports and used for controlling the on-off of a circuit of the RFID read-write equipment.

10. The system of claim 9, wherein the handheld device further comprises a charging jack, the charging jack is connected to a serial line, and the charging jack is used for charging the smart phone with an external power source.

CN202010435107.4A 2020-05-21 2020-05-21 A non-contact method and system for measuring tree diameter at breast height based on computer vision Pending CN111504208A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010435107.4A CN111504208A (en) 2020-05-21 2020-05-21 A non-contact method and system for measuring tree diameter at breast height based on computer vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010435107.4A CN111504208A (en) 2020-05-21 2020-05-21 A non-contact method and system for measuring tree diameter at breast height based on computer vision

Publications (1)

Publication Number Publication Date
CN111504208A true CN111504208A (en) 2020-08-07

Family

ID=71878569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010435107.4A Pending CN111504208A (en) 2020-05-21 2020-05-21 A non-contact method and system for measuring tree diameter at breast height based on computer vision

Country Status (1)

Country Link
CN (1) CN111504208A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113888641A (en) * 2021-09-16 2022-01-04 广西大学 A method for measuring diameter at breast height of standing trees based on machine vision and deep learning

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201233223Y (en) * 2008-07-30 2009-05-06 天恒威科技(北京)有限公司 Lumber automatic monitor system
CN103267516A (en) * 2013-02-27 2013-08-28 北京林业大学 Sample plot measuring technology by using digital camera as tool
CN103942520A (en) * 2014-03-04 2014-07-23 北京林业大学 Forest permanent sample plot survey bar code ruler and use method thereof
US20150170378A1 (en) * 2013-12-16 2015-06-18 Symbol Technologies, Inc. Method and apparatus for dimensioning box object
CN204881538U (en) * 2015-09-01 2015-12-16 中国农业科学院农业信息研究所 A device for determining fruit tree diameter
CN107084672A (en) * 2017-05-08 2017-08-22 北京林业大学 An image acquisition device, system and method for tree diameter measurement
CN109242818A (en) * 2018-06-27 2019-01-18 深圳市全运通物流发展有限公司 A kind of mill scale method and apparatus
CN109269430A (en) * 2018-08-12 2019-01-25 浙江农林大学 The more plants of standing tree diameter of a cross-section of a tree trunk 1.3 meters above the ground passive measurement methods based on depth extraction model
CN111047588A (en) * 2019-12-26 2020-04-21 电子科技大学 A Graphical Measurement Method for Dimension of Small Shaft Parts

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201233223Y (en) * 2008-07-30 2009-05-06 天恒威科技(北京)有限公司 Lumber automatic monitor system
CN103267516A (en) * 2013-02-27 2013-08-28 北京林业大学 Sample plot measuring technology by using digital camera as tool
US20150170378A1 (en) * 2013-12-16 2015-06-18 Symbol Technologies, Inc. Method and apparatus for dimensioning box object
CN103942520A (en) * 2014-03-04 2014-07-23 北京林业大学 Forest permanent sample plot survey bar code ruler and use method thereof
CN204881538U (en) * 2015-09-01 2015-12-16 中国农业科学院农业信息研究所 A device for determining fruit tree diameter
CN107084672A (en) * 2017-05-08 2017-08-22 北京林业大学 An image acquisition device, system and method for tree diameter measurement
CN109242818A (en) * 2018-06-27 2019-01-18 深圳市全运通物流发展有限公司 A kind of mill scale method and apparatus
CN109269430A (en) * 2018-08-12 2019-01-25 浙江农林大学 The more plants of standing tree diameter of a cross-section of a tree trunk 1.3 meters above the ground passive measurement methods based on depth extraction model
CN111047588A (en) * 2019-12-26 2020-04-21 电子科技大学 A Graphical Measurement Method for Dimension of Small Shaft Parts

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113888641A (en) * 2021-09-16 2022-01-04 广西大学 A method for measuring diameter at breast height of standing trees based on machine vision and deep learning

Similar Documents

Publication Publication Date Title
CN105066877A (en) 2015-11-18 Tree measuring method based on intelligent terminal lens
CN108363386A (en) 2018-08-03 Position Method for Indoor Robot, apparatus and system based on Quick Response Code and laser
CN111854616A (en) 2020-10-30 A laser-assisted visual measurement method and system for tree diameter at breast height
US11875524B2 (en) 2024-01-16 Unmanned aerial vehicle platform based vision measurement method for static rigid object
CN103196382A (en) 2013-07-10 Standing-tree diameter measuring device based on laser ranging and image technologies
CN111307046B (en) 2021-06-01 Tree height measuring method based on hemispherical image
CN114322990B (en) 2024-04-19 A method and device for collecting data for building a mobile robot map
CN115170629A (en) 2022-10-11 Wound information acquisition method, device, equipment and storage medium
CN113494906B (en) 2023-03-10 Unmanned measuring method and system of image total station for recognizing target by machine learning
CN112053459A (en) 2020-12-08 Power equipment inspection device
CN108460051A (en) 2018-08-28 Parking stall ground drawing generating method, apparatus and system
CN105043252A (en) 2015-11-11 Image processing based size measuring method without reference object
CN111504208A (en) 2020-08-07 A non-contact method and system for measuring tree diameter at breast height based on computer vision
CN108828578A (en) 2018-11-16 A kind of forest sample investigation trees positioning system and method
CN205051245U (en) 2016-02-24 Line appearance is patrolled to portable multi -functional intelligence
JP2015147517A (en) 2015-08-20 Maintenance support system and maintenance support method
CN206865558U (en) 2018-01-09 A kind of Mobile phone for laser distance measurement
CN112685527B (en) 2024-09-17 Method, device and electronic system for creating a map
CN211926778U (en) 2020-11-13 A handheld tree diameter at breast height laser measuring instrument
CN105425260A (en) 2016-03-23 High-positioning-precision middle-long-distance intelligent read-write well lid device and identification method thereof
CN108088421A (en) 2018-05-29 A kind of method and system of aerial survey of unmanned aerial vehicle control point automatic identification
CN206532316U (en) 2017-09-29 A kind of new tool Identification platform system
CN111707202B (en) 2024-08-23 Hand-held tree breast diameter laser measuring instrument
CN110736961A (en) 2020-01-31 A system and method for measuring tree position
CN205484825U (en) 2016-08-17 Remote intelligence reading and writing well lid equipment among high positioning accuracy

Legal Events

Date Code Title Description
2020-08-07 PB01 Publication
2020-08-07 PB01 Publication
2020-09-01 SE01 Entry into force of request for substantive examination
2020-09-01 SE01 Entry into force of request for substantive examination
2023-02-28 RJ01 Rejection of invention patent application after publication
2023-02-28 RJ01 Rejection of invention patent application after publication

Application publication date: 20200807