# Regressed Terrain Traversability Cost for Autonomous Navigation Based on Image Textures
## 3 Traversability Cost Prediction
### Terrain Non Uniformity Detection-Region Extraction  
Terrain non-uniformity detection aims at identifying whether ahead of the unmanned ground vehicle is a uniformly distributed terrain or contains spiky material. TNUD can be treated as a low-level image processing problem. A bump in a terrain image, as an example of spiky terrain, can be different from the background in terms of contrast. Thus, to detect bumps, we evaluate the lightness contrast distance for each block in the terrain image. Let **I** denote the input terrain image. **I** is divided into overlapping blocks of size \(w\times w\) pixels. Bumps tend to have a higher contrast value than their surrounding regions. Therefore, we measure the distance contrast between the local and global contrast values of the blocks and input image **I**, respectively. For this purpose, two additional scale images are produced by resizing the original image to half and a quarter by bicubic interpolation. Then, \(R\), \(G\), \(B\) values are converted to \(L^{*}\), \(a^{*}\), \(b^{*}\) measured in the Commission Internationale de l' Eclairage (CIE 1976) (\(L^{*}\), \(a^{*}\), \(b^{*}\)) color space (CIELAB) as described in [31]. Using the lightness channel, the global lightness contrast of the image is measured by:  
\[C(\textbf{I})=STD(\textbf{I})/\max(MEAN(\textbf{I}),1), \tag{2}\]  
where \(STD(\textbf{I})\) and \(MEAN(\textbf{I})\) denote the standard deviation and mean values of the input image **I**, respectively. Let **x** denote a block in the input image **I**, and let \(C(\textbf{x})\) denote the lightness contrast measured for **x**. \(C(\textbf{x})\) is given as :  
\[C(\textbf{x})=STD(\textbf{x})/\max(MEAN(\textbf{x}),1), \tag{3}\]  
where \(STD(\textbf{x})\) and \(MEAN(\textbf{x})\) denote the standard deviation and mean values of the block **x**. The contrast distance is calculated using the results of Equations (2) and (3) as follows:  
\[CD(\textbf{x})=\left\|C(\textbf{I})-C(\textbf{x})\right\|, \tag{4}\]  
where \(CD(\textbf{x})\) denotes the lightness contrast distance value of the block **x**. Sample results are given in Figures 6 and 7. To detect non-uniformity in terrain image, all scale maps are combined together to compute a refined contrast distance map using a maximum operator. As shown in Figure 8, non-uniform image regions tend to have a higher contrast distance value than the surrounding uniform areas. From the terrain images, regions traversed by the mobile robot are considered for texture extraction. For this purpose, the camera model in [32] is employed to define ROIs. As shown in Figure 9, the camera is defined by the camera frame \(\{O_{c},x_{c},y_{c},z_{c}\}\) where \(O_{c}\) is the center. The following equation projects a point from the world reference frame given by \(P\in\mathbb{R}^{4}\) to \(p\in\mathbb{R}^{3}\) (both containing one as the last element) onto the image plane:  
\[p=\mathbf{K}[\mathbf{R}|t]P, \tag{5}\]  
Figure 8: Refined contrast feature maps. Figure 7: Multiscale analysis for a non homogeneous terrain. where \([\mathbf{R}|t]\in\mathbb{R}^{4\times 4}\) is the extrinsic parameter matrix, and \(\mathbf{K}\in\mathbb{R}^{4\times 3}\) is the camera parameter matrix obtained through a calibration process. The above-mentioned model will be combined with the physical characteristics of the UGV, that is, the UGV's wheels base \(L\) and width \(W\) to determine the image regions traversed by the mobile robot. As shown in Figure 10, both camera and world reference frames are centered on the platform. The world reference frame is given by \(\{O_{w}\),\(x_{w}\),\(y_{w}\),\(z_{w}\}\) with \(O_{w}\) as the origin. The objective is to map points to identify the inner and outer bounds of the terrain region crossed by the vehicle. All points belong to the same line; hence, only the depth components with respect to the \(w_{z}\)-axis will change. For both the left and right sides, the coordinates of these points are expressed as follows:  
\[