# Geometric Characterization of Vines from 3D Point Clouds Obtained with Laser Scanner Systems
## 2 Materials and Methods
### Algorithms for Volume Calculation
#### 2.5.1 Point Cloud Preprocessing  
The raw data collected by TLS and MMS are processed with the software supplied with the equipment--FARO SCENE for TLS and the Topcon Geoclean Workstation for MMS--integrating the information from the different sensors that each system incorporates (Section 2.3). As a result, these software packages return two georeferenced and colored 3D point clouds. However, before applying the algorithms to volume calculation, it is necessary to preprocess the georeferenced and colored point cloud to (1) obtain the point cloud relative to each individual vine; (2) eliminate any point cloud belonging to leaves; and (3) remove any outliers that appear because of the adverse environment in which the measurements were obtained. To perform these preprocesses, software was developed that permits the automated application of this preprocess. (1) Cylinder and square clipping subprocesses  
With the cylinder clipping algorithm, the input point clouds are segmented for each vine as a cylinder with two possible criteria from which to choose the radio: the ROI (region of interest) buffer (found at a half distance between the contiguous vines in its strip) or the fixed distance between vines in the same row. The cylinder centers are determined by the coordinates of the vine base collected by centimetric GPS-RTK measurement. The square clipping step algorithm permits one to approximate cropping to a composed figure of two superposed straight parallelepipeds, one for trunk definition and one for arm definition (Figure 6), depending on the type of pruning performed. In the case study, the scanned vines were pruned with Guyot, so only the trunk was characterized. This process helps to improve the point cloud depruation and removing noise and other elements. A review of the editable parameters of these two steps is listed in Table 2.  
(2) Point cloud classifier subprocess  
This process consists of classification according to standardized classes [53]. This allows one to segment the points that define the woody part of the plant in case the canopy is developed. The implemented algorithm is a semi-automatic segmentation of points using only their color. This approach is an application of computational vision techniques based on an artificial neural network (ANN) capable of clustering points with similar radiometric responses. This process has two subprocesses that are clearly differentiated: training a neural network and applying it. This algorithm is a further development of the leaf area index calculation software (LAIC) [54], which is applied to point clouds. For training, only one vine has to be used. In the input point cloud loading, the RGB color space is transformed into a CIE-Lab color space (Commission Internationale de l'Eclairage (Lab)), where L is lightness, a is the green to red scale, and b is the blue to yellow scale. In this way, we transform the color space of the three components (R, G, and B) to two components \begin{table}
\begin{tabular}{c c c} \hline \hline
**Name** & **Description** & **Possible Values** \\ \hline ROI 1 buffer & Method to segment first cylinder & fix@distance, \\  & & computed@halfMeanDistance \\ Trunk buffer from strip & Length in meters. See Figure 6 & 0.050 to 0.500 \\ Trunk buffer in strip & Length in meters. See Figure 6 & 0.050 to 0.500 \\ Minimum foliage height from & Length in meters. See Figure 6 & 0.100 to 1.000 \\ terrain & Length in meters. See Figure 6 & 0.400 to 2.000 \\ Maximum foliage height from & Length in meters. See Figure 6 & 0.100 to 1.000 \\ terrain & Length in meters. See Figure 6 & 0.100 to 1.000 \\ Foliage buffer in strip & Length in meters. See Figure 6 & ROI buffer, distance (0.500 to 2.000) \\ Sensor type & Sensor type choice & TLS 2, MMS 3 \\ \hline \hline \end{tabular}  
* Region of interest. 2 Terrestrial laser scanner. 3 Mobile mapping system.  
\end{table} 
Table 2: List of the editable parameters of the cylinder and square clipping processes. (a and b).