## 2 Tree Detection and Counting
[13] for the detection and the semi-automatic counting of the olive trees in grey-scale input on Quickbird imagery, utilizing an algorithm based on a set of input parameters on which the shape and radiometry (grey level) depend: the minimum and maximum grey values in the image which discriminates trees from the background; the diameter range of the tree; the aspect ratio of the tree crown; the density interval that measures the size of the holes in the tree canopy concerning the total area of the tree. The results showed that OLICOUNT produced a high error for mixed (olive tree associated with other tree species), small, and irregular parcels, but less for regular parcels occupied by young olive trees. Template matching involves the extraction of the objects of interest, such as trees, from the image if they show a match with predefined models [29]. [PERSON] et al. [19] provided an example of template matching by implementing a method of counting based on the integration of different image analysis and probabilistic techniques tested on Quickbird imagery. In particular, the probability was calculated for olive trees present within a reticular layout and with precise geometric features such as shape, size, and the angle formed between trees. The method was based primarily on the premise that, generally, olive trees are planted following a reticular structure within the same plantation. First, it was considered a representative portion of the image in which the dark points (trees), satisfying a particular reticular layout, are located by means of a voting scheme. This step provides an estimate of how well dark point fits into the reticle. The higher is this value, the higher is the probability of a dark point to be an olive tree of the parcel represented by the selected reticle. Based on exploiting the similarity of olive trees, considering that all of them within a parcel are of the same age and probably of similar size, a prototype of the typical olive tree was obtained by processing the candidate olive trees within a representative area. The final probability that each candidate was an olive tree depended on the likelihood that the dark spot belonged to the reticular pattern and had similar characteristics to the prototype. Olive tree candidates were located by computing the closed contours of the image through the Canny operator [38] and the centroid of each shape through the Chamfer Distance Transform [39]. The previous step is prone to produce many false positives, i.e., objects identified as olive trees because of the similar shape when viewed from above. This issue is perhaps the main limitation of tree detection methods that rely solely on the object's shape. For this reason, the authors exploited the typical arrangement of trees in olive groves according to a reticular structure in which each tree forms a precise angle with its neighbors. The detection accuracy resulting in this work was 98%. [PERSON] and [PERSON] [40] compared four methods for olive tree counting in three distinct areas using Quickbird imagery: OLICOUNT, M-OLICOUNT, a template method, and the Geographic Object-Based Image Analysis (GEOBIA) approach implemented in the eCognition software (Trimble GeoSpatial, Munich, Germany). M-OLICOUNT is a modified version of OLICOUNT and includes the changes introduced to use multiple bands in its tree training module. Results showed that the template counting method had a higher accuracy where the topography was inclined and natural vegetation was mixed with olive trees. Other software methods showed better performance regarding time and costs in olive groves lying flat or slightly sloping areas. Some challenges to overcome include distinguishing species with spectral similarities, discriminating between desired and invasive species, and species that are difficult to detect in high-density environments with narrow spaces between rows and tree canopies touching each other.