Extracting DBH Measurementsfrom RGB Photo Images2017 Northeastern Mensurationists Annual Meeting

WANG Haozhou*, John A.Kershaw

University of New Brunswick
2017-11-06

01 Introduction

Contents

02 Methods
03 Results and Discussion
04 Conclusion

01Introduction

01 Introduction

01 Forest inventory Requires significant
financial investment.
 Also labor intensive.
 Great importance

02 Tools
 Direct Measurements
 Indirect Measurements
 Regression models
 Laser technology
 Photos with computer vision

01 Introduction

Direct measurement

Diameter tapesCalipers

Biltmore stick01 Introduction
Laser dendrometers
Direct measuringHand-held laser survey

Regression model

instrument

Laser technology

Ground-based
LiDAR (3D)

Indirect Measurements

Airborne laser scanner
2D laser scanner

Structure from motion
Photos with computer(SfM)
Benchmark assist

visionEstimate scale

Laser point assist

01 Introduction

Our work

Algorithm• Designed an algorithm based onvanishing point horizon to extract
and calculate DBH from photos.
• Made an open source software

Application

called ImageDBH in Python3.5.
• Validated the calculated results byfield measurements.

Validation

02Methods

02 Methods

2.1 SiteNoonan plot, Fredericton,

2.2 Instrument
DIY laser scanner

2.3 Algorithm
Triangular similarity
Analytic geometry

New Brunswick, Canada.

02 Methods

2.1 Site
Noonan plot, Fredericton,

2.2 Instrument
DIY laser scanner

2.3 Algorithm
Triangular similarity
Analytic geometry

New Brunswick, Canada.

2.1 Site

02 Methods

2.1 Site
Noonan plot, Fredericton,

2.2 Instrument
DIY laser scanner

2.3 Algorithm
Triangular similarity
Analytic geometry

New Brunswick, Canada.

2.2 Instrument

Laser pointerSupporter

45cm
CameraAdjusterRotary table

Parallel laser line

02 Methods

2.1 Site
Noonan plot, Fredericton,

2.2 Instrument
DIY laser scanner

2.3 Algorithm
Triangular similarity
Analytic geometry

New Brunswick, Canada.

2.3 Algorithm - Overview
Focal WidthYY
Z
A'f

D'

B'

E'

C'

X

Focal
HeightF'

𝑓𝑓
𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑠𝑠‘ 𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 = 45𝑐𝑐𝑐𝑐
X
𝐴𝐴′ 𝑥𝑥𝐴𝐴′ , 𝑦𝑦𝐴𝐴′
𝐵𝐵′ 𝑥𝑥𝐵𝐵′ , 𝑦𝑦𝐵𝐵′
𝑡𝑡𝑡𝑡𝑡𝑡𝜃𝜃 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒
What we known： ′ ′ ′𝐶𝐶 𝑥𝑥𝐶𝐶 , 𝑦𝑦𝐶𝐶
What we want to be represented：�𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷𝐷′′ ′𝐷𝐷 𝑥𝑥𝐷𝐷 , 𝑦𝑦𝐷𝐷
* f = Focal length
𝐷𝐷𝐷𝐷𝐷𝐷 = 2 ∗ 𝑟𝑟
Points on real tree: A
𝐸𝐸 ′ 𝑥𝑥𝐸𝐸′ , 𝑦𝑦𝐸𝐸′
Points on photo: A’
𝐹𝐹 ′ 𝑥𝑥𝐹𝐹′ , 𝑦𝑦𝐹𝐹′2.3 Algorithm - Overview

2.3 Algorithm - Radius Calculation
Z

P
C

A
B

X

Y
𝐴𝐴(𝑥𝑥𝐴𝐴 , 𝑦𝑦𝐴𝐴 , 𝑧𝑧𝐴𝐴 )𝐵𝐵(𝑥𝑥𝐵𝐵 , 𝑦𝑦𝐵𝐵 , 𝑧𝑧𝐵𝐵 )𝐶𝐶(𝑥𝑥𝐶𝐶 , 𝑦𝑦𝐶𝐶 , 𝑧𝑧𝐶𝐶 )𝐷𝐷(𝑥𝑥𝐷𝐷 , 𝑦𝑦𝐷𝐷 , 𝑧𝑧𝐷𝐷 )𝐸𝐸(𝑥𝑥𝐸𝐸 , 𝑦𝑦𝐸𝐸 , 𝑧𝑧𝐸𝐸 )𝐹𝐹(𝑥𝑥𝐹𝐹 , 𝑦𝑦𝐹𝐹 , 𝑧𝑧𝐹𝐹 )𝐴𝐴𝐴 = 𝑥𝑥𝐴𝐴 − 𝑥𝑥𝐵𝐵
𝐵𝐵1 = 𝑧𝑧𝐴𝐴 − 𝑧𝑧𝐵𝐵
𝑥𝑥𝐴𝐴2 − 𝑥𝑥𝐵𝐵2 + 𝑧𝑧𝐴𝐴2 − 𝑧𝑧𝐵𝐵2
𝐶𝐶𝐶 =2𝐴𝐴2 = 𝑥𝑥𝐶𝐶 − 𝑥𝑥𝐵𝐵𝐵𝐵𝑥𝑥 = 𝑧𝑧𝐶𝐶 − 𝑧𝑧𝐵𝐵
𝑥𝑥𝐶𝐶2 − 𝑥𝑥𝐵𝐵2 + 𝑧𝑧𝐶𝐶2 − 𝑧𝑧𝐵𝐵2
𝐶𝐶2 =2𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 = 𝐴𝐴𝐴 × 𝐵𝐵𝐵 − 𝐴𝐴𝐴 × 𝐵𝐵𝐵
DBH = 2𝑟𝑟 = 2 ×
𝐷𝐷𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 =»𝑥𝑥𝑃𝑃 = 𝑥𝑥𝐴𝐴
𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 = 0 � 𝑧𝑧 = 𝑧𝑧
𝑃𝑃𝐴𝐴

𝐶𝐶𝐶×𝐵𝐵𝐵−𝐶𝐶𝐶×𝐵𝐵𝐵

𝑥𝑥𝑃𝑃 =𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑 ≠ 0 �
𝐴𝐴𝐴×𝐶𝐶𝐶−𝐴𝐴𝐴×𝐶𝐶𝐶𝑧𝑧𝑃𝑃 =𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑

𝑥𝑥𝑃𝑃 − 𝑥𝑥𝐴𝐴|𝐵𝐵|𝐶𝐶2+ 𝑧𝑧𝑃𝑃 − 𝑧𝑧𝐴𝐴|𝐵𝐵|𝐶𝐶

𝑥𝑥𝑃𝑃 2 + 𝑧𝑧𝑃𝑃 2 − 𝑟𝑟22.3 Algorithm - Software

https://github.com/HowcanoeWang/ImageDBH

03Results and Discussion

03 Results and Discussion

01 Comparison 02 Error reasons 03 Improvements
Compare DBH

Analyze the reasons

Four possible ways

measured results bythat cause theseto improve photo

Photos and Fielderrormeasurement

Survey in distance tocamera and breast
diameters

03 Results and Discussion

01 Comparison 02 Error reasons 03 Improvements
Compare DBH

Analyze the reasons

Four possible ways

measured results bythat cause theseto improve photo

Photos and Fielderrormeasurement

Survey in breast
diameters

3.1.1 Distance Comparison

1.Most of calculated distance
distributed below 15m
2.Underestimate：hard tooverestimate

guarantee the tape no curving
3.Overestimate：distance too far，
the trunks in photo are too
small (only a few pixels), causes
variance

underestimate

3.1.2 DBH results comparison

1.Equivalence test: region ofsimilarity = 32% at α = 0.05
2.The DBH results between fieldmeasured and photo calculated
are similar and this method isapplicable.

03 Results and Discussion01 Comparison 02 Error reasons 03 Improvements
Compare DBH

Analyze the reasons

Four possible ways

measured results bythat cause theseto improve photo

Photos and Fielderrormeasurement

Survey in distance tocamera and breastdiameters3.2 Error Reasonsab

1. Different photo angles
may capture shorter or
longer axes of the stem
cross-section

Field measured: No.203 = 17.5cm

3.2 Error Reasonsc2. Tree lean is another factor that
contributes to large deviations inDBH measurement

Field measured: No.59 = 16.4cm

3.2 Error Reasons

3. The photo measured
diameter positions are notexactly same to that offield survey (Field not flat)
4. Key points are marked
manually which may
cause error

03 Results and Discussion

01 Comparison 02 Error reasons 03 Improvements
Compare DBH

Analyze the reasons

Four possible ways

measured results bythat cause theseto improve photo

Photos and Fielderror

measurement

Survey in distance tocamera and breast
diameters

3.3 Improvement

1234

Make two methods

The best distance

Vanishing point

Automate laser line

measured places

between trees andhorizon algorithm

detection throughon trunk closed tocamera should

is too complex,

AI to minimize

each other (takearound 10-20m

simplify algorithm

human-induced

photos for single

by direct

errors associatedtrees rather thanestimation ofwith manual

multiple trees)

scale (In future)

selection

04

Conclusion

04 Conclusion

Algorithm

Application

Validation

The procedure andAn open source software

The calculated results havealgorithms to extract thedeveloped in Python 3.5 makes

also been validated by theDBH of trees from digital
images with laser line havebeen illustrated.

great contribution for simplify thecalculation procedure andmaking it convenience for otherresearchers’usage

field survey data. It isapplicable to obtain DBH
from photos

04 Conclusion

Future work
This new technology could
1. Simplify algorithm by estimating scale
2. Be validated and applied for estimating the upper-stem diameter
3. Optimize image identification algorithm and reduce people participation

Simplify

Validate by upper stem

Image id by AI

Thanks for Your
Attention
howcanoewang@gmail.com