## 3 Review of Global Appearance Descriptors
### Histogram of Oriented Gradient  
The Histogram of Oriented Gradient (HOG) was initially used in computer vision to solve object detection tasks. HOG was described by [PERSON] and [PERSON] [29], who used it to detect people. This method was later improved in detection and computational cost in the version described in [54]. Afterwards, it was updated by [PERSON] et al. [55], who used a weighted histogram of oriented gradients in small and controlled environments to solve localization from low resolution images. The same authors present a comparison of HOG with other techniques in localization tasks of small robots in reduced environments in [56]. Originally, HOG was built to describe local parts of the scene but it can be redefined to work as a global-appearance descriptor, as in [3], where HOG and other global-appearance descriptors are used to perform hierarchical localization in topological models.  
Essentially, it consists of calculating the gradient of the image, obtaining the module and orientation of each pixel. If \(D_{x}\) and \(D_{y}\) represent the derivatives of the image with respect to the \(x\) and \(y\) axes, respectively, it is possible to calculate the magnitude and orientation of the gradient as:  
\[|G|=\sqrt{D_{x}^{2}+D_{y}^{2}} \tag{1}\]  
\[\theta=\arctan\frac{D_{x}}{D_{y}} \tag{2}\]  
Afterwards, using a set of cells that covers the whole image it is possible to build the global descriptor using the information of the gradient orientation. To this end, the data is collected in bins, weighting each bin with the module of the gradient of each pixel. Each cell has its own associated histogram and at the end the vector is built concatenating all the histograms. To build the descriptor, the number of bins and cells must be defined. Specifications are shown in Section 6.1.  
Classically, this method divided the image into horizontal cells. Authors such as [PERSON] et al. [11] or [PERSON] et al. [38] used this classical HOG technique to perform localization with a mobile robot. In the present work, as stated before, we will consider both horizontal (with positional intent) and overlapped vertical cells (with orientational intent), as explained at the beginning of the section (Figure 1). HOG using only horizontal cells is comprehensively described in [48] whereas the second alternative is presented in [49]. Figure 2 shows the method used to build the HOG descriptor, using horizontal cells.  
Figure 1: Approaches to build a global-appearance descriptor from a panoramic image: (**a**) with horizontal and (**b**) with overlapped vertical cells.  
First, regarding the position descriptor, horizontal cells (with the same width as the image) are used, as shown in Figure 1a. Second, in order to obtain the orientation descriptor, vertical cells (with the same height as the image) are used (Figure 1b). Vertical cells are overlapped and separated a distance of \(dist_{ho}\) pixels. By shifting the descriptor a rotation of the robot can be simulated.  
Once the HOG description is performed, the whole image is reduced to a vector whose size will depend on the number of cells and bins as Figure 1. First, the position descriptor, \(b_{hp}\) is the number of bins per histogram and \(k_{hp}\) is the number of cells in which the image was divided. The descriptor size is \(\vec{d}_{p}\in\mathbb{R}^{b_{hp}\cdot k_{hp}\times 1}\). Second, in the case of the vertical cells descriptor, the cells are overlapped. This descriptor introduces a new parameter \(dist_{ho}\) which refers to distance between consecutive cells. \(k_{ho}\) is the number of cells, and it is calculated by \(N_{y}/dist_{ho}\), where \(N_{y}\) is the number of columns of the panoramic image. \(b_{ho}\) is still referring to the number of bins per histogram. At the end, HOG with vertical cells reduces a panoramic image into a vector whose size is \(\vec{d}_{o}\in\mathbb{R}^{b_{ho}\cdot k_{ho}\times 1}\). The parameters of the descriptors are summarized in Tables S1 and S2, and the values used in the experiments are specified in Section 6.1.