## 3 Methodology
### Generation of Input Data from RGB Imagery  
Vegetation has different reflectance values on remotely sensed imagery because different species have different leaf pigments. When these characteristics were determined from RGB imagery, the needle-leaf forest was brighter than the broad-leaf forest on the converted red image (Median-filtered Index Map). To analyze the optical imaging characteristics of each colony's vegetation, a normalized index map was produced. First, the initial RGB imagery (0.12 m GSD) has a deep shadow due to topographic effects that should be reduced. The shadow effect appears in both the red and green images. Thus, an index map was used instead of the red or green images. The index map is generated in two steps: (i) the red image is converted using the mean and standard deviation of the green image; and (ii) the ratio of the difference between the red and green images and the summation of the red and green images is calculated. This conversion reduces the topographic shadow artefact very effectively. The converted red image (\(\overline{R}\)) was calculated using:  
\[\overline{R}(i,j)=\frac{\sigma_{G}}{\sigma_{R}}\times(R(i,j)-\mu_{R})+\mu_{G} \tag{1}\]  
where \(i\) and \(j\) are the line and pixel, respectively, \(R\) is the red image, \(\sigma_{G}\) and \(\sigma_{R}\) are the means of the green and red images, and \(\mu_{G}\) are \(\mu_{R}\) are the standard deviation of the green and red images. The normalized index map (\(N\!I\)) was defined using:  
\[\mathrm{NI}(i,j)=\left(G(i,j)-\overline{R}(i,j)\right)/\left(G(i,j)+\overline{ R}(i,j)\right) \tag{2}\]  
where \(G\) is the green image.  
Figure 4: Detailed workflow used to classify the forest vertical structure from RGB orthophoto and lidar data using a machine learning approach.  
The index map contains noise from the crown. Since it can degrade the accuracy of the ANN analysis, we applied a median filter with a kernel size of \(3\times 3\) pixels to reduce the noise. The median filtered index map was used as part of the input data for the ANN. To determine each colony's overall reflectance, we resampled the median-filtered index map to a spatial resolution of 48 cm and applied a NL-means filter with a kernel size of \(21\times 21\) pixels. The NL-means filter is a powerful smoothing filter that preserves the edges of objects. The NL-means filtered index map represents the overall reflectance of a forest vegetation colony. The third input map from the RGB image indicates the spatial texture of the reflectance values. If a colony has a double- or triple-layered forest vertical structure, it must have several species and the species' reflectance values must be mixed. Thus, if a colony contains various species, the spatial texture of the reflectance would be rough. On the contrary, if only a few species are present such as in an artificial forest, the spatial texture would be smooth. The reflectance texture map is generated by calculating the standard deviation of the difference between the median-filtered and NL-means filtered maps using a moving window of \(5\times 5\) pixels. Figure 5 shows the three input layers used for the ANN analysis. To ensure that the topographic effect was mitigated in the median-filtered index map from Figure 5a, it was compared with Figure 1. As shown in Figure 5b, the NL-means filtered index map was smoothed with well preserved object edges. The smooth or rough texture of the surface reflectance map can be recognized from Figure 5c. The water surface had lower values while the forest areas had higher texture values.  
Figure 5: The five input layers used for the artificial neural network (ANN) analysis. (**a**) median-filtered index map; (**b**) non-local (NL)-means filtered index map; (**c**) reflectance texture map; (**d**) height difference map; and (**e**) height texture map.