# Automatic Understanding and Mapping of Regions in Cities Using Google Street View Images
## 4 Methodology
### Bottom-Up Aggregation and Similarity Computation  
The semantic mapping proposal follows a bottom-up aggregation process where sequences of RGB images serve as input. The visual information is exploited to extract a descriptor suitable for computing the similarity between two or more different captures, as proposed in [23]. This is achieved by following the procedure previously presented, which relies on the lexical annotations provided by deep learning procedures.  
The bottom-up aggregation is carried out by means of a hierarchical clustering approach [46]. Initially, all the input images are established as different clusters, and every cluster is thus represented by the corresponding image descriptor (\(d_{CNN}(I)\)). These clusters are then combined iteratively, that is, the two most similar clusters are combined/aggregated in every new iteration. It is important to note that the final descriptor obtained for a specific cluster \(C\) is equivalent to the element-wise average of the descriptors of all images belonging to this cluster \(C\), that is,  
\[d_{CNN}(C)=\left[\frac{1}{|C|}\sum_{I\in C}p_{I}(I_{1}),\ldots,\frac{1}{|C|} \sum_{I\in C}p_{I}(I_{|L|})\right] \tag{4}\]  
The process stops when the most similar clusters are sufficiently different to be estimated as suitable to represent the same semantic category. This stopping condition can be tuned to select an optimal trade-off (threshold distance \(\tau_{d}\)) between specificity and generality. In this approach, the number of clusters will depend on the selected threshold, \(\tau_{d}\propto\frac{1}{\pi_{clusters}}\). We discard the standard \(k\)-means clustering algorithms because the final number of clusters cannot be established beforehand. This clustering algorithm produces a dendrogram (Figure 5) that allows us to see how the clusters have been created and the distances between them.  
The selected bottom-up clustering approach is order-independent, which increases its usability, as no additional details from the source sequence of images, such as the velocity or the acquisition rate, are requested. The current implementation of the proposal includes a single combination per iteration involving the two most similar clusters.  
Based on these preliminaries, the estimation of the cluster similarity is clearly established as the cornerstone of the proposal. As we adopt a representation where images are encoded using probabilities, we evaluate various similar measures that have been extensively studied [47]. The hierarchical clustering algorithm requires a set of parameters in order to generate the clusters. Table 1 shows the two main parameters of the method that will be evaluated in this study, the linkage strategy and the distance metrics, which are used to compute the distance between two clusters and define whether the image will merge a cluster or not.  
A distance metrics equation is used to identify closeness between two points, two clusters, or a cluster and a point. This metric will determine how the points merge for creating the clusters. Linkage strategy is used to determine from where the distances between clusters will be measured.