# A Vision-Based Two-Stage Framework for Inferring Physical Properties of the Terrain
## 2 Proposed Method
### Second Stage: From the Terrain Type to Physical Properties  
The friction and stiffness properties of the same terrain are also related to its state, such as the surface flatness, compactness, whether the surface has a covering, etc. That means the same type of terrain has different physical properties in different states, as shown in Figure 3, so we need to explore the mapping from terrain types to physical properties. Related biological studies show that optical characteristics and surface structure characteristics are important reference factors for humans to perceive the physical properties of materials through vision. Therefore, we designed two corresponding digital image features to imitate those two characteristics. The optical characteristics of an image are a complex set of many attributes, such as brightness, transparency, color and so on. We inferred the type of terrain in the previous section. Consequently, with this strong prior, it was not necessary to design corresponding feature representations for all attributes in optical characteristics. We chose brightness to represent the optical characteristics and designed a method to extract the brightness of the image. The gray value of each pixel in the image can represent the brightness of it, which ranges from 0 to 255. In addition, Gaussian blur can approximately mimic certain perceptual characteristics of the human eyes; that is, the brightness evaluation of a point is affected by the brightness around the  
Figure 9: Complete structure of TerrainNet. point. Therefore, as shown in Equation (4), the gray-scale image corresponding to the RGB image of the terrain is Gaussian blurred, so as to extract the brightness features of the image. \[L=I*F \tag{4}\]  
where \(L\) is a Gaussian blurred image, \(I\) is the gray image, \(F\) is the Gaussian kernel and * represents convolution. It should be noted that in order to improve the robustness of brightness features to the changes of ambient illumination, we perform histogram equalization on the image before extracting the brightness features, as shown in Figure 10.  
The surface structure characteristic refers to the changes in depth, direction and arrangement of the material surface. Significant changes in the pixel values of material images usually reflect important events and changes in material properties, generally including discontinuities in depth, discontinuities in surface orientation and changes in physical properties. Therefore, we can describe surface structure characteristics by the variation of the pixel value. Moreover, the gradient of a pixel in an image is the variation of the pixel value in its neighborhood. Thus, this paper uses the Sobel [42] operator to calculate the image gradient to represent the surface structure characteristics. Figure 10: Histogram equalization reduces the sensitivity to the changes of the overall environment illumination. The illumination of (**d**) is much darker than that of (**a**), but histogram equalization greatly reduces the illumination difference between the two images. (**c**,**f**) are the processed image. In (**b**,**e**), the blue bars represent the original gray distribution, and the orange bars represent the processed gray distribution. Sobel is a first-order gradient calculation operator, and its calculation formula is shown in Equation (5). \[ \begin{split} G_{x}&=I*\left[\begin{array}{ccc}-1&0&+1 \\ -2&0&+2\\ -1&0&+1\end{array}\right]\\ G_{y}&=I*\left[\begin{array}{ccc}+1&+2&+1\\ 0&0&0\\ -1&-2&-1\end{array}\right]\\ G&=\sqrt{G_{x}^{2}+G_{y}^{2}}\end{split}  \tag{5}\]  
where \(G_{x}\) and \(G_{y}\) are gradients in \(X\) and \(Y\) directions respectively, and \(G\) is the gradient of the pixel. To verify the effectiveness of the two feature extraction methods, we used them to extract the corresponding features of the terrain image, and performed statistical analysis. As shown in Figure 3, each terrain of land, rock, ice and asphalt road has different states.