## 4 Methodology  
The training stage in the proposed methodology is presented in Figure 3. It includes the image database reading, the change of color space, the random points selection, the attributes extraction, the auto-grouping, the time series generation, the causality calculation, the classification-recovery of the k-next images, and finally, the most similar natural scenes are shown. The main hypothesis of the proposed methodology is the automatic texture dictionary generation, which represents their own elements contained in the scenes such as water, foliage, clouds, rocks, sand, etc. (see Figure 4). It depends on the self-organization of the information through the k-means clustering algorithm. Each block in the methodology is described in detail below. 1. **DB:** Contains the set of natural scenes images. 2. **Preprocessing:** Load the image from the DB, equalize the histogram in the three layers and finally change the RGB color space to the HSI (Hue, Saturation, Intensity) color space, which provides the related textured information. 3. **Random points seeding:** A uniform 300 random points seeding is done inside the image. 4. **Feature extraction. ** This step is carried out in two main parts and to have several samples of the image, the process is repeated \(r\) number of times. * **Neighborhood generation:** At each random point, a window of size \(p\times p\) pixels is created starting with the interest point in the upper right corner, as shown in Figure 5, where \(p<image\_rows\) and \(p<image\_columns\). * **CBIR feature extraction:** In each neighborhood, three CBIR features are extracted, that are mean, standard deviation, and homogeneity in the three layers of the HSI color space. This appears in a \(1\times 9\) CBIR features vector, for an image  
Figure 4: Textured zones example in a natural scene for \(k=4\) value in the k-means algorithm. Figure 3: Training and test classification system architecture. a matrix \(N_{P}\times 9\) size is created. Where \(N_{P}\) is the number of random points and \(F_{CBIR}\) are the extracted CBIR features. 5. **Grouping CBIR textures:** Once the CBIR features of each image in the database are extracted, an \(F_{CBIR}\) matrix of size \((r\times N_{I}\times N_{P})\times 9\) is generated, where \(r\) is the number of repetitions, \(N_{I}\) is the number of images in the database, \(N_{P}\) is the number of random points and, \(F_{CBIR}\) the CBIR features at each point for each HSI color layer. By means of the k-means algorithm, the CBIR features are grouped into k clusters which constitute the k most representative database textures, generating a \(CM_{k}\) matrix. 6. **Time series generation:** From the \(F_{CBIR}\) matrix of the previous step, each item of the matrix is compared with the entries of the \(MC_{k}\) matrix of the automatic dictionary to construct a discrete signal as a time series \(T_{S}\) having a size of \(k\times r\times N_{I}\), where \(k\) is the number of automatic textures of the k-means algorithm, \(r\) is the number of repetitions of experiment, and \(N_{I}\) is the number of image in the database. 7. **Wiener-Granger Causality analysis:** An entry in the \(T_{S}\) matrix has a size of \(k\times r\) for each image in the database. This input will be the one that feeds the CWG analysis, as shown in Figure 6. The causality analysis was calculated with the MVGC causality toolbox [48]. When causality analysis has been performed for each image in the database, we obtain a causality relationships matrix \(\Lambda_{I}\) of size \(k\times k\). The element \(F_{C_{i},C_{j}}\) represents the causal relationships between the scene components \(C_{i}\) towards \(C_{j}\)\(\forall i,j\in[1...k]\) (see Equation (9)). If \(F_{C_{i},C_{j}}=0\), then there is no causal relationship between the image \(i\to j\), otherwise, there is a strong causal relationship between them. Figure 5: Image with random points, each one generating a neighborhood \(10\times 10\) size pixels. Figure 6: Causal relationships matrix generation \(\Lambda_{I}\) using CWG analysis.