# Automatically Extracting Rubber Tree Stem Shape from Point Cloud Data Acquisition Using a B-Spline Fitting Program

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Rubber Tree Trunk Characteristics

#### 2.2. B-Spline Curve Fitting Processing in MATLAB

_{i}on the rubber tree contour and the center point O may be computed using Equation (1), which varies with the distance between the laser finder and the rubber tree trunk.

- ∆d—distance between the contour point and center point O, expressed in mm;
- R—scanning radius related to the length of scanning arm, expressed in mm;
- ∆L—point cloud data collected, expressed in mm;
- r—zero radius of laser ranging finder, expressed in mm, where r = 200 mm.

_{i}(i = 0,1, …, n):

- ∆θ—increment in the polar angle, rad.

_{i}can be described in polar coordinates by Equation (3), which can then be translated into rectangular coordinate points in MATLAB, as follows:

_{i}= (ρ

_{i}, θ

_{i}) = (∆d

_{i}, i·∆θ),

- ρ
_{i}—polar radius of contour point, mm; - θ
_{i}—polar angle of contour point, rad.

_{i}is used as the interpolating point of the spline curve, and the control points of curve can be generated using the Thomas algorithm [39]. Equation (4) represents the third-degree B-spline and Equation (5) represents the equation of each B-spline segment [23] (pp. 234–299):

- Q
_{i}—the expression of curve segment, i = (1, 2, …, n); - u—local parameter, u ∈ [0,1].

_{i}(x, y) can be calculated using Equation (6):

- Read point cloud data and convert them to rectangle coordinates (Lines 2–9); “record3” is the name of the database used to record point cloud data, which should be modified before executing the program.
- All of the cloud points were used as knots, and the coordinates of the control points were calculated using the Thomas algorithm (Lines 11–20), which was written as a function named Chase_method.
- Establish the basic equations of B-spline (Lines 22–28).
- Calculate the coordinates of fitting points based on the basic equations (Lines 30–31).
- Since the contour curve of the rubber tree trunk is a closed curve, the initial and last points are the same, so in this algorithm, an end point is appended to the contour curve, which has no influence on the fitting result (Lines 35–37).

#### 2.3. Acquisition System Adopted

- As a power module, the MW-230-115 switching power supply delivered consistent 24V DC voltage to devices in the acquisition system.
- The control module incorporates a Haiwell Company ACM120R Series PLC programmable controller and a speed regulator for determining the acquisition direction and speed.
- The executive module includes an EzM-42XL Series servo motor and servo drivers that are used to drive the finder around the rubber tree; the output torque of the servo motor is 0.65 N·m.
- The acquisition module was a HG-C1200 Series laser ranging finder produced by Panasonic, with an accuracy of 0.07 mm, a center radius (r) of 200 mm, and an effective range of 120–280 mm (the distance between the rubber tree and finder cannot exceed this range).
- A Bluetooth transmission device with an 800 Bd baud rate was used to transmit the point cloud data, and the data signal was transformed into a keyboard signal capable of automatic recording.

- Drive the servo motor at a constant velocity to guarantee that the point cloud data are captured uniformly;
- Continuously monitor the servo motor’s angle and break down the operation when the angle reaches 360° to avoid the appearance of repeated collection points;
- Transmit contour point cloud data to the PC at a set rate. The operating principle of the acquisition system is shown in Figure 5. The program of PLC controller was compiled in the visual programming environment of Haiwell-Happy V2.2.9 and it met the requirements after verification.

#### 2.4. Method of Analysis

_{1}/n) × 100%,

- n
_{1}—number of features recognized; - n—number of features.

- N—the quantity of the acquired contour curve;
- Q
_{i}—the area of the contour curve, expressed in mm^{2}.

## 3. Results

#### 3.1. Results of Different Acquisition Directions

#### 3.2. Results of Different Relative Positions

#### 3.3. Results of Statistical Analysis

## 4. Discussion

#### 4.1. Acquisition System Performance

#### 4.2. Feasibility

Technology | Laser Range | Ultrasonic [41] | Visual Identification [42,43] |
---|---|---|---|

Measuring media | Laser range finder | Ultrasonic depth finder | Industrial camera |

Prior knowledge | No need | No need | The knowledge of image processing |

Objective | Information of contour | Information of contour and interior structure | Identifying species and contour |

Position adjustment | No need | No need | Yes |

Input data | Point cloud data | Scatter points | Pixels |

Processing Method | Control point fitting | Control point fitting | Image filtering and processing |

Output results | Curve, surface, or volume of contour | Surface or volume of contour | Image of contour |

Efficiency | ≈2 min (Depends on quality of data) | ≈30 s (Depends on detection environment) | ≈2–4 s (Depends on quality of sample set) |

Cost | <RMB 10,000 | >RMB 120,000 | >RMB 200,000 (Includes deep learning software) |

#### 4.3. Applicability

^{2}) could be scanned in an hour. The contour curve information of the rubber trees may be collected in 2 minutes if each rubber tree is equipped with one acquisition system. Manual tapping, on the other hand, cannot provide precise contour curve information.

## 5. Conclusions

- (1)
- The automatic acquisition system and B-spline fitting program proposed in this study have equivalent functions that enable the automatic contour curve extraction of rubber tree trunks. The contour curve of the rubber tree trunks can be used as a reference for the trajectory planning of rubber tapping equipment, and the B-spline fitting program is ideal for the extraction of irregular curves such as the rubber tree trunk’s contour curve.
- (2)
- Changes in acquisition directions and relative positions had no effect on the contour curves of the trunk, implying that the contour curve can be extracted as long as the rubber tree is within the range of the laser range finder. The acquisition system presented in this study is practicable, and its accuracy is high and reliable.
- (3)
- The acquisition system in this study has the advantages of simplicity and convenience. It was unnecessary to adjust the position of the acquisition device prior to the collection process, which helped to improve acquisition efficiency. Because of its cheaper cost, this system can satisfy the development form of the rubber industry.

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Appendix A

Line | Program |
---|---|

1 | % 1-Converting cloud points to rectangular coordinate points |

2 | A = xlsread(‘record3.xlsx’); |

3 | Cloudpoint = A(:, 2); % Cloudpoint: Cloudpoint of rubber tree trunk |

4 | Rt = double(input(“Please input the radius of rotate arm:”)); |

5 | r0 = double(input(“Please input the center distance:”)); |

6 | r = Rt− (r0−Cloudpoint); % Polar diameter |

7 | N = length(Cloudpoint); % Volume of point cloud data |

8 | theta = (0:2*pi/(N−1):2*pi)’; % Polar angle |

9 | [x, y] = pol2cart(theta, r); |

10 | % 2-Using Thomas-method to calculate the control points |

11 | k = 3; % Degree of B-spline |

12 | A1 = eye(N)*4; |

13 | A1(1, N) = 1;A1(N, 1) = 1;A1(1, 2) = 1;A1(N, N−1) = 1; |

14 | for i = 2:N−1 |

15 | A1(i,i−1) = 1;A1(i,i + 1) = 1; |

16 | end |

17 | b1 = x*6; |

18 | cpx =Chase_method(A1,b1); % Abscissa of control points |

19 | b2 = y*6; |

20 | cpy =Chase_method(A1,b2); % Ordinate of control points |

21 | % 3-Fitting the curve of rubber tree trunk |

22 | n = 1; % Number of curve segments |

23 | for i = 1:N−3 |

24 | for u = 0:1/(N + k + 2):1 |

25 | BF0 = 1/6*(1−u)^3; |

26 | BF1 = 1/6*(3*u^3−6*u^2 + 4); |

27 | BF2 = 1/6*(−3*u^3 + 3*u^2 + 3*u + 1); |

28 | BF3 = 1/6*u^3; |

29 | % Fitting curve |

30 | x(n) = BF0*cpx(i,1) + BF1*cpx(i + 1,1) + BF2*cpx(i + 2,1) + BF3*cpx(i + 3,1); |

31 | y(n) = BF0*cpy(i,1) + BF1*cpy(i + 1,1) + BF2*cpy(i + 2,1) + BF3*cpy(i + 3,1); |

32 | n = n + 1; |

33 | end |

34 | end |

35 | x(end + 1,:) = x(1,:); |

36 | y(end + 1,:) = y(1,:); |

37 | plot(x,y,”r”) |

## References

- Liu, R.; Mo, Y.; Yang, L.; Wu, W.; He, C. Re-recognition and Advice on the Strategic Role of Natural Rubber Industry in China. China Trop. Agric.
**2022**, 1, 13–18. Available online: https://kns.cnki.net/kcms/detail/detail.aspx?FileName=ZGRD202201004&DbName=CJFQ2022 (accessed on 10 February 2022). - Soares, F.A.; Steinbüchel, A. Natural rubber degradation products: Fine chemicals and reuse of rubber waste. Eur. Polym. J.
**2022**, 165, 111001. [Google Scholar] [CrossRef] - Li, Y.; Pan, Y.; Luo, P.; Li, F.; Huang, M.; Yuan, K.; Yang, H.; Yuan, Z.; Xie, L. Preliminary report on daytime rubber tapping test of rubber trees. Chin. J. Trop. Crops
**2022**, 3, 1–10. Available online: https://kns.cnki.net/kcms/detail/detail.aspx?FileName=RDZX20221114000&DbName=CAPJ2022 (accessed on 16 November 2022). - Zhang, C.; Li, D.; Zhang, S.; Shui, Y.; Tan, Y.; Li, W. Design and Test of Three-coordinate Linkage Natural Rubber Tapping Device Based on Laser Ranging. Chin. J. Trop. Crops
**2023**, 50, 121–127. [Google Scholar] [CrossRef] - Silva, T.; Seneviratne, P. Influence of Some Latex Flow Dynamics Associated with Different Latex Harvesting Systems on Latex Yield of Different Clones of Rubber (Hevea brasiliensis Muell. Arg.). In Proceedings of the International Symposium on Agriculture & Environment, Matara, Sri Lanka, 14 February 2020; Available online: https://www.researchgate.net/publication/352710504 (accessed on 24 June 2021).
- Zeng, X.; Huang, H.S. Development and Prospects of Natural Rubber Technology in China. China Trop. Agric.
**2021**, 1, 25–30. Available online: http://qikan.cqvip.com/Qikan/Article/Detail?id=7103858557 (accessed on 7 February 2021). - Rukkhun, R.; Khongdee, N.; Iamsaard, K.; Mawan, N.; Sainoi, T.; Sdoodee, S. Latex Diagnosis at the Whole Trunk Level under Different Tapping Systems in Young-tapping Rubber Trees. Indian J. Agric. Res.
**2021**, 51, 59–66. [Google Scholar] [CrossRef] - Qi, D.; Yang, C.; Xie, G.; Wu, Z.; Wu, Z. Preliminary Study on Seedling Growth Rhythm and Grey Correlation Analysis of Rubber (Hevea brasiliensis) Seedlings in Danzhou District, Hainan. Am. J. Plant Sci.
**2014**, 5, 66–72. [Google Scholar] [CrossRef] - Yao, X.C.; Tu, H.Q.; Wang, X.L.; Wang, J. The effect of supplemental LED night lighting on the growth and physiology of the Para rubber tree. J. Rubber Res.
**2021**, 24, 321–326. [Google Scholar] [CrossRef] - Yang, H.; Sun, Z.; Liu, J.; Zhang, Z.; Zhang, X. The Development of Rubber Tapping Machines in Intelligent Agriculture: A Review. Appl. Sci.
**2022**, 12, 9304. [Google Scholar] [CrossRef] - Zeng, X.; Lu, L.; Sun, D.Z.; Huang, J. The Application on 3-D Construction of Fruit Tree Canopy Using Ultrasonic Ranging. J. Agric. Mech. Res.
**2012**, 12, 148–151. [Google Scholar] [CrossRef] - Yang, C.; Wang, A.L.; Wang, J.H.; Cai, J. Hilbert-Huang Transfer Time-frequency Energy Analysis on Ultrasonic Signal of Detecting Lotus Root Based on ICEEMDAN. Mech. Eng.
**2021**, 10, 52–54 + 59. Available online: http://qikan.cqvip.com/Qikan/Article/Detail?id=7105755414 (accessed on 10 October 2021). - Wu, X.; Gao, L.; Kan, J.; Li, W. Extraction of Information of Standing Tree Images Based on Region Growth and Edge Detection. Sci. Technol. Rev.
**2009**, 22, 44–47. [Google Scholar] [CrossRef] - Hu, C.S.; Xing, Y.X.; Yun, H.; Zhu, X.; Li, C. Locating and Identifying Sound Knots and Dead Knots on Sugi by the Rule-Based Color Vision System. J. South China Agric. Univ.
**2009**, 1, 99–103. [Google Scholar] [CrossRef] - Hyyppä, E.; Hyyppä, J.; Hakala, T.; Kukko, A.; Wulder, M.A.; White, J.C.; Pyörälä, J.; Yu, X.; Wang, Y.; Virtanen, J.P.; et al. Under-canopy UAV laser scanning for accurate forest field measurements. ISPRS J. Photogramm. Remote Sens.
**2020**, 164, 41–60. [Google Scholar] [CrossRef] - Hyyppä, E.; Yu, X.; Kaartinen, H.; Hakala, T.; Kukko, A.; Vastaranta, M.; Hyyppä, J. Comparison of Backpack, Handheld, Under-Canopy UAV, and Above-Canopy UAV Laser Scanning for Field Reference Data Collection in Boreal Forests. Remote Sens.
**2020**, 12, 3327. [Google Scholar] [CrossRef] - Hyyppä, E.; Kukko, A.; Kaijaluoto, R.; White, J.C.; Wulder, M.A.; Pyörälä, J.; Liang, X.; Yu, X.; Wang, Y.; Kaartinen, H.; et al. Accurate derivation of stem curve and volume using backpack mobile laser scanning. ISPRS J. Photogramm. Remote Sens.
**2020**, 161, 246–262. [Google Scholar] [CrossRef] - Balenović, I.; Liang, X.; Jurjević, L.; Hyyppä, J.; Seletković, A.; Kukko, A. Hand-Held Personal Laser Scanning—Current Status and Perspectives for Forest Inventory Application. Croat. J. For. Eng.
**2021**, 42, 165–183. [Google Scholar] [CrossRef] - Puliti, S.; Breidenbach, J.; Astrup, R. Estimation of Forest Growing Stock Volume with UAV Laser Scanning Data: Can It Be Done without Field Data? Remote Sens.
**2020**, 12, 1245. [Google Scholar] [CrossRef] - Holmgren, J.; Tulldahl, M.; Nordlöf, J.; Willén, E.; Olsson, H. Mobile Laser Scanning for Estimating Tree Stem Diameter Using Segmentation and Tree Spine Calibration. Remote Sens.
**2019**, 11, 2781. [Google Scholar] [CrossRef] - Lin, W.; Fan, W.; Liu, H.; Xu, Y.; Wu, J. Classification of Handheld Laser Scanning Tree Point Cloud Based on Different KNN Algorithms and Random Forest Algorithm. Forests
**2021**, 3, 292. [Google Scholar] [CrossRef] - De Paula Pires, R.; Olofsson, K.; Persson, H.J.; Lindberg, E.; Holmgren, J. Individual tree detection and estimation of stem attributes with mobile laser scanning along boreal forest roads. ISPRS J. Photogramm. Remote Sens.
**2022**, 187, 211–224. [Google Scholar] [CrossRef] - Chianucci, F.; Puletti, N.; Grotti, M.; Ferrara, C.; Giorcelli, A.; Coaloa, D.; Tattoni, C. Nondestructive Tree Stem and Crown Volume Allometry in Hybrid Poplar Plantations Derived from Terrestrial Laser Scanning. For. Sci.
**2020**, 6, 737–746. [Google Scholar] [CrossRef] - Saha, K.K.; Tsoulias, N.; Zude-Sasse, M. Assessment of measurement uncertainty when using 2D mobile laser scanner to estimate tree parameters. Landtechnik
**2020**, 4, 270–277. [Google Scholar] [CrossRef] - Stal, C.; Verbeurgt, J.; De Sloover, L.; De Wulf, A. Assessment of handheld mobile terrestrial laser scanning for estimating tree parameters. J. For. Res.
**2021**, 4, 1503–1513. [Google Scholar] [CrossRef] - Yin, C.H.; Tan, J.Q. Trigonometric Polynomial Uniform B-spline Curves and Surfaces with Multiple Shape Parameters. J. Comput. Aided Des. Comput. Graph.
**2011**, 7, 1131–1138. [Google Scholar] - Andrés, I.; Akemi, G.; Carlos, L. Two Simulated Annealing Optimization Schemas for Rational Bézier Curve Fitting in the Presence of Noise. Math. Probl. Eng.
**2016**, 2016, 8241275. [Google Scholar] [CrossRef] - Newson, R. BSPLINE: Stata Modules to Compute B-Splines Parameterized by Their Values at Reference Points. Statistical Software Components. 2020, pp. 1–12. Available online: https://ideas.repec.org/c/boc/bocode/s411701.html (accessed on 5 April 2020).
- Shi, F.Z. Cagd & Nurbs, 1st ed.; Higher Education Press: Beijing, China, 2001; pp. 234–299. [Google Scholar]
- Johannessen, K.A.; Fonn, E. Splipy: B-Spline and NURBS Modelling in Python. J. Phys. Conf. Ser.
**2020**, 1, 12–32. [Google Scholar] [CrossRef] - Long, Q.Z.; Ding, X.X.; Liu, W. Exploring the Application of MATLAB Software in Computer Aided Geometric Design. Digit. Technol. Appl.
**2017**, 7, 233–236. [Google Scholar] [CrossRef] - Ma, Z.Y.; Zhang, H.Q.; Li, Y.L. Diversity model and growth simulation of tree. J. Geo-Inf. Sci.
**2018**, 10, 1422–1431. [Google Scholar] [CrossRef] - Wu, Z.K.; Zhou, M.Q.; Wang, X.C. Interactive modeling of 3D tree with ball B-spline curves. Int. J. Virtual Real.
**2009**, 2, 101–107. [Google Scholar] [CrossRef] - Li, J.; Cao, W.Q.; Cui, Y. Research and Implementation of Parametric Modeling Method of Tree Knots. J. Inf. Comput. Sci.
**2015**, 12, 3345–3356. [Google Scholar] [CrossRef] - Yang, L.; Tang, Z.; Wu, P.; Peng, J.; Shi, J.; Long, L. Visual Modeling of Rice Root Growth Based on B-Spline Curve. Wuhan Univ. J. Nat. Sci.
**2022**, 1, 85–92. [Google Scholar] [CrossRef] - Zhang, M.J.; Qin, H. Hierarchical D-NURBS surfaces and their physics-based sculpting. In Proceedings of the International Conference on Shape Modeling and Applications, Genova, Italy, 7–11 May 2001; pp. 257–266. [Google Scholar] [CrossRef]
- Chen, S.Y.; Guan, Q. Parametric Shape Representation by a Deformable NURBS Model for Cardiac Functional Measurements. IEEE Trans. Biomed. Eng.
**2011**, 58, 480–487. [Google Scholar] [CrossRef] [PubMed] - Liu, L.M.; Wu, M.L. Least Square Curve Fitting based on Matlab. J. Fujian Comput.
**2019**, 8, 9–12. [Google Scholar] [CrossRef] - Wang, X.B.; Zhong, Z.H. Generalized Thomas algorithm for solving cyclic tridiagonal equations. Chin. J. Comput. Mech.
**2004**, 1, 73–76. [Google Scholar] [CrossRef] - Hu, Y.Y.; Zhang, Z.Y.; Feng, C.T.; Li, J.H.; Liu, H.; Wang, Z.H. Investigation and analysis of hevea brasiliensis Tapping panel dryness occurring in Experimental farm CATAS. Chin. J. Trop. Agric.
**2022**, 42, 86–90. [Google Scholar] [CrossRef] - Abd Aziz, S.; Steward, B.L.; Birrell, S.J.; Kaspar, T.C.; Shrestha, D.S. Ultrasonic Sensing for Corn Plant Canopy Characterization. In Proceedings of the 2004 ASAE Annual Meeting, Ottawa, ON, Cannada, 1 August 2004. [Google Scholar] [CrossRef]
- Goëau, H.; Joly, A.; Selmi, S.; Bonnet, P.; Mouysset, E.; Joyeux, L.; Molino, J.F.; Birnbaum, P.; Bathelemy, D.; Boujemaa, N. Visual-based plant species identification from crowdsourced data. In Proceedings of the 19th International Conference on Multimedea, Scottsdale, AZ, USA, 28 November 2011. [Google Scholar] [CrossRef]
- Liu, X.; Hou, K.; Wang, L.; Liu, P. Index and Recognition for the Shape Contour of Plant Leaves. In Proceedings of the Congress on Intelligent Systems, Xiamen, China, 19 May 2009. [Google Scholar] [CrossRef]

**Figure 2.**Method of point cloud data acquisition: 1—laser range finder; 2—zero radius of the finder; 3—acquisition trajectory; 4—rubber tree.

**Figure 7.**Results of contour curves in different acquisition directions: (

**a**) the first position; (

**b**) the second position; (

**c**) the third position.

**Figure 8.**Results of different relative positions: (

**a**,

**d**) results of different directions in the first position; (

**b**,

**e**) results of different directions in the second position; (

**c**,

**f**) results of different directions in the third position.

**Figure 9.**Phenomenon of incorrect tapping process: (

**a**) phenomenon of latex overflow; (

**b**) a wounded rubber tree.

**Figure 10.**Effect of low precision of repeated tapping: (

**a**) the isolated rubber tree bark; (

**b**) the irregular tapping panel.

Relative Position | Direction | Groups | Mean/μ | Standard Deviation/s | Variable Coefficient/σ |
---|---|---|---|---|---|

First position | Clockwise | 5 | 24,588.59 | 6.27 | 0.0003 |

Counterclockwise | 5 | 24,597.22 | 11.42 | 0.0005 | |

Second position | Clockwise | 5 | 24,689.61 | 8.71 | 0.0004 |

Counterclockwise | 5 | 24,688.65 | 18.33 | 0.0007 | |

Third position | Clockwise | 5 | 24,683.41 | 11.64 | 0.0005 |

Counterclockwise | 5 | 24,701.60 | 9.96 | 0.0004 |

Factor | Mean Square Error | F | p (<0.05) |
---|---|---|---|

Direction | 557.46 | 3.193 | 0.086 |

Position | 57.02 | 0.253 | 0.621 |

Direction × Position | / | 0.977 | 0.452 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Li, T.; Zheng, Y.; Huang, C.; Cao, J.; Wang, L.; Wang, G.
Automatically Extracting Rubber Tree Stem Shape from Point Cloud Data Acquisition Using a B-Spline Fitting Program. *Forests* **2023**, *14*, 1122.
https://doi.org/10.3390/f14061122

**AMA Style**

Li T, Zheng Y, Huang C, Cao J, Wang L, Wang G.
Automatically Extracting Rubber Tree Stem Shape from Point Cloud Data Acquisition Using a B-Spline Fitting Program. *Forests*. 2023; 14(6):1122.
https://doi.org/10.3390/f14061122

**Chicago/Turabian Style**

Li, Tuyu, Yong Zheng, Chang Huang, Jianhua Cao, Lingling Wang, and Guihua Wang.
2023. "Automatically Extracting Rubber Tree Stem Shape from Point Cloud Data Acquisition Using a B-Spline Fitting Program" *Forests* 14, no. 6: 1122.
https://doi.org/10.3390/f14061122