## 2 Tree Detection and Counting  
Tree crown detection is an important field in RS research, providing a means for species classification, vegetation distribution mapping, vegetation density estimation, and vegetation change monitoring [23]. In addition, given the economic importance of olives, especially in the Mediterranean area and considering European Union olive production subsidies, the distribution of plantations and data for estimating production require monitoring. The dynamic monitoring of the canopy in olive growing can provide information on growth and health status by exploiting vegetation indices (VIs), and is a decision support tool for the timing and mode of execution of various crop operations such as irrigation, fertilization, pruning, pest control, and yield forecasting [24]. Traditional counting methods are based on human visual inspections in the field, which are time-consuming and prone to errors, mainly when performed in large-scale plantations [25]. Since the end of the 1990s, with the launch of commercial satellites able to provide high-resolution images (< 2 m), the level of detail has become advantageous for observing smaller geographical objects such as trees. Therefore, until the end of the first decade of the 2000s, tree detection using RS techniques was performed using imagery taken by manned aircraft or satellites [16; 18]. Spatial resolution is of crucial importance in the image recognition of single trees. Generally, olive trees in the productive phase have a crown diameter between 3 and 12 m, with spacing between trees variable between 8-10 m for traditional olive groves to 5 m for intensive ones, depending on the planting pattern, and trees regularly aligned [12; 26; 27]. Relevant data for tree counting was initially derived from panchromatic imagery with a spatial resolution between 0.6 m and 3.6 m, provided by satellites Quickbird and IKONOS and from high resolution 1:40,000 scale aircraft flights [15; 20; 21]. With the advent of UAVs, these platforms are increasingly used for this application and can provide images with centimeter resolution. Most applications have regarded object detection and feature extraction for tree counting and planting line detection, recognition of planting gaps, and segmentation of invasive species. In addition, tree counting allows to geolocate plants, provide production estimates, and determine the presence of gaps [28]. According to the literature, several techniques for detecting trees were proposed, among which blob detection, template matching, image segmentation, unsupervised and supervised classification by using machine learning algorithms, and deep learning [25; 29; 30; 31; 32]. Algorithms that exploit the spatial patterns in olive groves, based on mathematical morphology operators, were tested by [PERSON] and [PERSON] [11] in very high spatial resolution (VHR) (1 m/pixel) RGB aerial images. Usually, researchers considered olive groves characterized by a regular spatial pattern of rows with adjacent trees placed at standard distances. In this pattern, each tree can be identified within a circular shape area if seen from above. The proposed methodologies involved the global segmentation of the olive groves to create a mask of single trees, considering olive trees as objects that do not follow the typical spatial patterns. The olive trees were segmented using a modified version of the top-hat transform [33] which identifies darker local regions against a lighter background, and allows for segmenting only the isotropic dark structures (trees) and avoiding the segmentation of directional structures like roads, water lines, or connected alignments of trees. While demonstrating a high rate in the ability to identify olive trees (89% of olive groves were correctly identified), this methodology showed limitations due to the similarity of other regular patterns that can be confused with olive trees patterns, such as fruit orchards.