Introduction

Sandstone materials have widely been employed as building and carving stones in southwestern China. They not only provide resources for us, but they also preserve cultural value for future generations. However, there are susceptible to weathering damage due to the local hot and humid environment [1,2,3]. Weathering causes different forms of deterioration in stones under the influence of environment, climate, and atmosphere [4,5,6]. In building sandstone, in particular those that are exposed to outdoor environments, inevitable microdamage is formed under long-term weathering, which affects the stability and durability features of these materials. Therefore, this situation stresses the necessity of evaluating the weathering degree of building sandstone.

Influence on weathering degree includes material property and environmental factors. Among them, the mineral composition has been proven to be the main factor controlling the weathering rate [7, 8]. Environmental factors are solar radiation, moisture, atmosphere, and biology, which are manifested as physical, chemical, and biological weathering [9,10,11]. Molina et al.[12]. found that sandstones with montmorillonite show poor durability due to high porosity and salt crystallization pressure during deterioration. Schröer et al. [13] investigated the effects of water on the physical, chemical, and biological weathering of building sandstone. It is shown that the presence of biofilm will aggravate physical weathering. Therefore, the weathering of building materials is a coupling process. Various detection techniques and evaluation indicators should be integrated to explore the whole process of building sandstone weathering.

Based on weathering mechanism of stone, several indicators of material properties are generally introduced to quantitatively evaluate the weathering degree of stone, such as chemical index of alteration, particle size, and weathering amount [14,15,16]. Nevertheless, the acquisition of traditional evaluation indicators, and meanwhile it will also result in inevitable damage to building sandstone. This is one of the reasons why contactless techniques are widely mentioned in weathering assessment. Thus, establishing a nondestructive assessment method for weathering degree of building sandstone is of great significance.

Existing research indicates that the common nondestructive quantitative weathering assessment methods include electrical resistivity method [17,18,19], ultrasonic test [20,21,22], and image processing technique [23, 24]. Among them, image processing technique is an emerging method for determining changes in research targets by computer identification. Moreover, the features embedded in images can be acquired by machine learning [25]. Ma et al. [26] indicated that the visualization and quantification of the internal microstructure distribution of slate can be realized by the three dimensions reconstruction and hybrid segmentation of images. Reedy and Reedy [27] proposed that spatial resolution obtained from the three dimensions image has a strong correlation with the pore system of the bricks, and pore variables in the multi-stage image can be a performance indicator to evaluate the deterioration of bricks. The morphological characteristics of research objects can be reflected by RGB image processing [28], however, the quantitative description of subtle differences in weathering characteristics remains to be improved.

In contrast, hyperspectral imaging technique presents the distribution of reflected light brightness of multiple narrow-band monochromatic lights that are densely and evenly distributed in a certain spectral range. The spectral image set is composed of monochromatic light images under multiple different bands, and the combination of image technology and spectral technology is realized. Moreover, the spatial information in all bands and the spectral information with continuous and high-resolution can be obtained simultaneously [29, 30]. Some researchers have demonstrated the feasibility of hyperspectral technique in identifying the size, shape, texture, and external defects [31,32,33]. In the application of building materials, the change of raw materials used in construction can be characterized by the mineral composition information collected by hyperspectral imaging technique [34]. Moreover, remote hyperspectral imaging is a powerful tool to discriminate lithology and mineral composition. Weber et al. [35]. quantified the effects of crust types and single cyanobacterial strain on biological soil crusts by hyperspectral imaging. Similarly, many studies of hyperspectral imaging acquisition for field sites have demonstrated the advantages of spectroscopy for characterizing the distribution of diagenetic phases [36,37,38]. Also, spectral characteristics may be applied to describe the differences in surface roughness and particle size in geological samples [33, 39]. Therefore, information expressed by hyperspectral imaging is more detailed, multi-dimensional, and comprehensive, which has a wide application prospect in geotechnical engineering.

As mentioned above, analyzing the information contained in hyperspectral images is conducive to investigating weathering process of building sandstone from a new perspective. Due to the abundant information on hyperspectral images, various artificial intelligence methods have been successfully applied to hyperspectral data classification [40,41,42,43]. Yang et al. [44] considered that the consolidation of hyperspectral imaging and support vector machine is a convenient tool for classifying coal and carbonaceous shale. Hu et al. [45] proposed an estimation method for quantifying surface soil salinity by using hyperspectral image and random forest regression. As a result, to achieve the best assessment results while obtaining hyperspectral images, the focus is to have a deep understanding of weathering process and classification model. Regrettably, the application of hyperspectral imaging technique for weathering assessment of building sandstone is still uncommon.

In this study, the construction of weathering assessment approach for building sandstone is organized as follows: First, weathering characteristics of building sandstone are analyzed by microscopic observations. Second, weathering degree will be redefined according to the factors influencing the weathering process. Third, the mapping relationships between hyperspectral data and microscopic weathering characteristics are established. Fourth, the classification model will be trained using the spectral response of different weathering degrees. Fifth, the developed model for building sandstone based on spectral data and intelligent algorithms will be introduced to field applications. The study is an example of interdisciplinary research. Surface characteristics of building sandstone are extracted nondestructively by spectral data containing mineral composition information, which provides a novel weathering assessment approach for building sandstone.

Materials and methods

Location and sampling

The two investigated sandstone buildings in Shapingba district of Chongqing city, China have a history of more than 70 years. As shown in Fig. 1, the geological structure of study area is mainly composed of sandstone, mudstone, and sand-mud interbed [46]. From Fig. 2, the obvious weathering phenomena can be clearly observed on the sandstone surface. These buildings are located in a humid subtropical climate, which provides environmental conditions for moisture migration, mineral hydrolysis, and biological colonization in building materials. In order to avoid destruction caused by sampling to the building itself, the samples collected in this study are all sandstone blocks that naturally peel off with weathering. Therefore, there are only a total of ten samples collected, all of which are shedding samples with different weathering characteristics.

Fig. 1
figure 1

Geological condition of study area

Fig. 2
figure 2

Different weathering damage observed in building sandstone: a building facade; b weathering on sandstone windowsill; c weathering on upper sandstone wall; d weathering on bottom sandstone wall

According to the literature, the mineral composition of building sandstone has a significant impact on the weathering process [47]. In addition, the overall style and form structure of the building are coordinated and unified, and the sandstone material used is from the same stratum in the Chongqing region with similar mineral composition. Thus, the X-ray diffraction (XRD) tests were performed to determine the mineral composition of shedding samples of wall and windowsill. Two sandstone samples at different locations were selected for XRD testing. The detailed process is as follows [48, 49]. (\(\mathrm{i}\)) The sample was ground to the powder with particle size of about 40 μm. (\(\mathrm{ii}\)) The powder was filled in a glass groove with a filling amount of 2 g. (\(\mathrm{iii}\)) The flat test piece was made containing the sample powder. (\(\mathrm{iv}\)) The detection of XRD was performed by Smartlab SE with the goniometer radius of 300 mm and the 2θ rotation range of – 10 \(^\circ\)~160 \(^\circ\). (\(\mathrm{v}\)) Analysis method for clay minerals and ordinary non-clay minerals in sedimentary rocks by the X-ray diffraction (SY/T163-2018) was applied for the data processing of diffraction patterns and the identification of mineral composition.

Besides, microscopic observation, a common method for preliminary rock identification, can provide valuable image information and a basis for comparison in property research [50]. Also, this method is used to verify the feasibility of acoustic emission technology in porous rock weathering [9]. The microstructural study provides a more detailed rock sample of weathering type classification in different samples. For this purpose, a microscope system is applied to capture the characteristics of ten shedding samples that are difficult to obtain visually. The microscope system consists of a stereomicroscope camera, transmission device, and computer processing software. Among them, observations were completed using OLYMPUS SZX16 stereomicroscope with 0.7 to 11.5 magnifications of zoom range and 900 LP/mm of resolution. The system integrates microscopic imaging, image processing, and measurement, which greatly facilitates the information conversion between microscope and computer. Before the microscope tests, the samples were dried naturally in air to constant weight. Following the processing, the samples were placed on the microscope stage for direct observation, meanwhile the collected images were saved on the computer. The microscopic observation process in this study does not need to grind the rock into slices, and direct observation of the original state will not disturb the surface weathering characteristics of samples to be tested.

Hyperspectral imaging system

Traditional optical imaging and spectral measurement are combined in hyperspectral imaging [51]. Hyperspectral image data is known as a hypercube, and it is stored as a three-dimensional matrix. Among them, two-dimensional and three-dimensional are used to represent spatial and spectral data, respectively [52]. In this study, a portable near-infrared hyperspectral imaging system is applied to obtain spectral information on building sandstone.

The portable near-infrared hyperspectral imaging system is mainly composed of staring-type hyperspectral camera (SHIS-N220), movable tripodal, dedicated computer, data acquisition software, and transmission devices. Hyperspectral data are acquired by area scanning of a staring-type hyperspectral camera, which can sample pixel values in a specific order on a continuous band. Furthermore, the adopted hyperspectral imaging system is upgraded in area scanning, which collects spectral data with only one exposure [29]. It facilitates the rapid acquisition of large-scale hyperspectral images.

The spectral resolution of the hyperspectral camera used in this study is 5 nm, with the bands of 400–1000 nm. It includes visible and partial near-infrared bands. The time to complete a hyperspectral image acquisition is about 5 min. The spatial resolution of the images taken by the hyperspectral imaging system is related to the distance between the object lens and the object to be measured. The data acquisition distances in this study were 0.5 m for indoor measurements and 5 m for in-situ measurements, with the actual sizes corresponding to a single pixel being 0.0368 mm and 0.407 mm, respectively. Therefore, the spatial resolution of the captured hyperspectral images can reach the millimeter level. After that, the hyperspectral image will be saved in BSQ format with a resolution of 2048 × 2046.

To reduce the systematic error caused by equipment during the testing process, the hyperspectral camera is preheated for 10 min before the acquisition. Subsequently, the auto exposure is set with 5 nm interval channels for a total of 121 bands. The change of light intensity in the hyperspectral camera and the dark current will usually cause some noise in the collected spectral data. Therefore, a whiteboard with the 99.99% reflectance should be used as a reference before each hyperspectral image acquisition. For dark current image acquisition, the lens cover of the hyperspectral camera is closed. The hyperspectral reflectance can be calibrated according to Eq. (1):

$$R=\frac{{R}_{o}-D}{W-D}\times 100\%$$
(1)

where R is calibrated reflectance, \({R}_{o}\) is raw reflectance, D is dark reference spectrum, and W is white reference spectrum.

Hyperspectral information processing

Noise is unavoidable in the acquisition of spectral data. Therefore, spectral data preprocessing is required to reduce the impact of noise while amplifying the differences between spectral features. The position of the hyperspectral camera was first fixed during image acquisition. Three consecutive hyperspectral images were collected in a short time for the same position, and then the average value of spectral data was calculated. In addition, preprocessing methods such as bands clipping, smoothing, and normalization were applied in the study. Following that, spectral bands with high noise were removed, and 450–950 nm bands were chosen as the research range. Besides, the remaining bands were normalized by Eq. (2) to eliminate spectral variations caused by optical distance differences.

$${y}_{i}=\frac{{x}_{i}-{x}_{imin}}{{x}_{imax}-{x}_{imin}}$$
(2)

where \({y}_{i}\) is normalized reflectance value of the ith band, \({x}_{i}\) is original reflectance value of the ith band, \({x}_{imax}\) is maximum reflectance value of the ith band, \({x}_{imin}\) is minimum reflectance value of the ith band.

Finally, the spectral curve is processed with the Savitzky-Golay (SG) smoothing filter [53, 54]. After a series of preprocessing steps, a corresponding assessment model based on spectral information can be constructed, which can provide a basis for analyzing the weathering characteristics of building sandstone.

Weathering assessment model based on the intelligent algorithm

Random Forest (RF) model is an ensemble classifier that constructs multiple decision trees, which performs well in classification applications [55, 56]. Also, RF model is used to classify the spectral characteristics with the advantages of strong anti-interference ability, robustness, high efficiency, and over-fitting prevention in relevant research [57]. In this study, RF model is applied to establish a weathering assessment model for building sandstone, then the hyperspectral image data with unknown weathering degrees can be quantitatively evaluated.

There are many built-in parameters in RF model. Grey Wolf Optimizer (GWO) with a global optimization solution is employed to obtain the four best hyperparameters of RF model [58, 59]: (1) the number of decision trees (n_estimators); (2) the maximum depth of tree (max_depth); (3) the minimum number of samples required to split a node in the tree (min_samples_split); (4) the minimum number of samples required to be at a leaf node (min_samples_leaf). The hybrid model flowchart to classify weathering degree is illustrated in Fig. 3. The whole process of hyperspectral analysis in building sandstone weathering assessment is shown in Fig. 4. The detailed steps for weathering assessment model are as follows.

Fig. 3
figure 3

Flowchart of the GWO-SG-RF model in classifying weathering degrees

Fig. 4
figure 4

The whole process of hyperspectral analysis in building sandstone weathering assessment

Step 1: First, the weathering degree of the samples is preliminarily determined by microscopic observation. Then, hyperspectral images of building sandstone with different weathering degrees are preprocessed by clipping, normalization, and Savitzky-Golay (SG) smoothing.

Step 2: Hyperspectral data of building sandstone with different weathering degrees are labeled. Among them, unweathered as grade 1, slightly weathered as grade 2, moderately weathered as grade 3, and highly weathered as grade 4.

Step 3: Original databases are divided into training sets (containing 70% of the samples) and testing sets (containing 30% of the samples). RF model is adopted to classify weathering degrees of building sandstone, and hyperparameters of RF model are optimized by Grey Wolf Optimizer. Following that, a hybrid weathering assessment model is established.

Step 4: Collect the hyperspectral images of large-scale building sandstone from the site. Preprocessing is done in the same way that the database is. The processed data is fed into the weathering assessment model that has been trained. Then, the weathering evaluation cloud map of building sandstone can be obtained.

Compared with other machine learning algorithms that treat samples as the basic unit [43, 44], subtle differences in spectral characteristics of samples are considered by pixels in this study. The assessment cloud map obtained by hyperspectral image has 2048 × 2046 pixels, which are suitable for large-scale refined weathering assessment. Each pixel corresponds to a spectral curve in the collected hyperspectral image. Then, the small area is divided to take the average reflectivity in the process of spectral data extraction. Therefore, the amount of data used to train the model in 10 spectral images is 20951040.

Some essential indicators are employed to evaluate the classification performance of the proposed model [60], including accuracy, precision, recall, and F1-score. These indicators can be calculated as follows:

$$Accuracy=\frac{TP+TN}{TP+TN+FP+FN}$$
(3)
$$Precision=\frac{TP}{TP+FP}$$
(4)
$$Recall=\frac{TP}{TP+FN}$$
(5)
$$\it F1-score=\frac{2\times \left(Precision\times Recall\right)}{Precision+Recall}$$
(6)

where true positive (TP) and true negative (TN) refer to the numbers of correctly classified positive samples and correctly classified negative samples, respectively. False positive (FP) and false negative (FN) represent the numbers of misclassified positive samples and misclassified negative samples, respectively. F1-score is a compromised indicator of precision and recall.

Results and discussion

Microscopic weathering mechanism of building sandstone

The XRD results of two representative sandstone samples are plotted in Fig. 5, and the content of main mineral composition is shown in Table 1. The main components of the wall and sill samples are feldspar, quartz, and clay minerals. According to Folk’s rock classification scheme [61], the building material is classified as feldspar sandstone. The mineral composition content of the samples from two locations differs slightly, which is reflected in the fact that the feldspar content (54.5%) and quartz content (28.4%) of the wall samples are slightly lower than those of the windowsill (56.5% and 30.6%), while the clay minerals content of the wall (15.3%) is significantly higher than that of the windowsill (9.7%). Therefore, the cementation between the skeleton particles of the wall sample is closer than windowsill sample, and the ability to resist damage is stronger. This may be affected by the type of weathering.

Fig. 5
figure 5

X-ray diffraction responses of wall and windowsill samples

Table 1 Mineral composition content of wall and windowsill samples

Microscopically, the spatial distribution of weathering damage in wall and windowsill samples under natural conditions can be seen in Fig. 6. The weathering degree of building sandstone exposed to the external environment is significantly greater than that of the unexposed part. Thus, weathering degree of building sandstone presents a decreased tendency from outside to inside. A similar state was proposed in characterization of the weathering intensity of basalt blocks [62]. In addition, some studies have also shown that such weathering is strongly correlated with exposure time and external environment [63]. The accompanying phenomenon of building sandstone caused by natural weathering can be presented in Fig. 6b–f. Biological weathered crusts can be seen on the surface of building sandstone clearly.

Fig. 6
figure 6

Microscopic observation of shedding samples: a collected wall samples; b interior of wall samples; c exterior of wall samples; d collected windowsill samples; e interior of wall samples; f exterior of wall samples

By comparing Figs. 6b, c, the mineral crystal grains inside the wall samples are intact, and the bonding between grains is tight with no visible pores or cracks. It indicates that the interior of wall samples is not affected by weathering. Meanwhile, the exterior of wall samples has been biologically covered. It means the exterior of wall samples has achieved the conditions for biological colonization, and the weathering degree of exterior is significantly higher than that of interior. Similarly, the exterior of windowsill samples is also directly exposed to the natural environment as seen in Fig. 6f. The dispersed biological weathering crusts and obvious cracks can be clearly seen on the exterior of windowsill sample.

The phenomenon shows that the accumulation of time results in microscopic damage. The initiation and propagation of microcracks on the surface of building sandstone are significantly influenced by long-term variations in temperature, humidity, and moisture. As a result, the pores of sandstone are destroyed, which leads to the physical weathering disease of cracking and hollowing on the sandstone surface. Simultaneously, the porosity of stone will be increased by physical weathering, and then the bonding between rock particles is weakened [64, 65]. It provides a pathway for other factors such as moisture, gas, and microorganism to enter, which promotes chemical and biological weathering. Therefore, there is already biological colonization on the interior of windowsill sample in Fig. 6e, and the weathering degree of windowsill sample is higher than that of wall sample.

The typical structure of weathered building sandstone is shown in Fig. 7, there is visible layered weathering accompanied by biological colonization on windowsill due to variances in the timing of exposure to the natural environment. Among them, the outer layer, inner layer, and weathering front of stone can be easily identified. Some studies have confirmed that the color change of stone caused by biological colonization is closely related to the weathering degree [11, 66, 67]. This is consistent with the findings of this study. In conclusion, the difference in the weathering degree of building sandstone is directly related to natural environment of its location.

Fig. 7
figure 7

Typical structure of weathered building sandstone

Weathering damage in stone is generally considered to be a sequential and progressive variation trend. The environment may affect stone properties through physical, chemical, and biological reactions in the process [16, 68]. All collected samples are observed microscopically to obtain a complete weathering process of building sandstone, as illustrated in Fig. 8.

Fig. 8
figure 8

Microscopic characteristics of the weathering process of building sandstone: a unweathered; b slightly weathered with exfoliation of mineral particles; c slightly weathered with the expansion of pores; d moderately weathered with mineral hydrolysis; e moderately weathered with biological colonization; f highly weathered with biological weathered crust

According to the weathering process mentioned above, the microscopic evolution of building sandstone can be summarized as follows:

  1. 1.

    Building sandstone remains in its original unweathered state (Fig. 8a). Mineral particles will exfoliate as a result of physical factors, including temperature and humidity (Fig. 8b).

  2. 2.

    The exfoliation of bound minerals exposes the interior mineral particles to the external environment directly, resulting in more microcracks and pores (Fig. 8c). It provides favorable conditions for moisture migration and mineral hydrolysis (Fig. 8d).

  3. 3.

    The growth of fungi and lichen on the surface of building sandstone are caused by the simultaneous hydrolysis of minerals and adherence of atmospheric dust, which creates the necessary circumstances for their existence (Fig. 8e).

  4. 4.

    A weathering crust dominated by biological colonization is formed on the sandstone surface (Fig. 8f). At this point, weathering of building sandstone transforms to a relatively stable stage.

Jaques et al. [69]. proposed that the weathering process of rock can be divided into the physical and chemical weathering stages on the micro-scale. These stages control the initial and later changes of rock, respectively. Due to local environmental impact, biological weathering should also be considered in this study. To better describe this process, a progressive weathering relationship of building sandstone is suggested, that is, the weathering process from fresh sandstone to the surface is completely covered by biological colonization. It is the extension of previous findings reported by Jaques et al. [69]. The different stages in the weathering process of building sandstone are shown in Fig. 9.

Fig. 9
figure 9

Schematic diagram of weathering process of building sandstone

According to characteristics presented in the microscopic, it is found that there are three characteristic behaviors in the weathering process of building sandstone. Based on the influence degree of characteristic behavior in different stages, the weathering process can be divided into three stages: The initial weathering stage, weathering is mainly controlled by physical behavior. The accelerated weathering stage, weathering is largely affected by the coupling of physical and chemical behaviors. The stable weathering stage, the weathering is affected by physical–chemical-biological interaction.

The weathering characteristics of building sandstone in different weathering stages can be generalized as follows:

  1. 1.

    Since the surface of fresh building sandstone is exposed to the natural environment, physical behavior is the most notable difference in the initial weathering stage. Among them, temperature and humidity are controlling factors at this stage. Small-scale fluctuations in the stone near the surface region (5-10 mm) may be brought on by temperature cycling [10]. On the other hand, the dry-wet cycle leads to more microcracks and surface height deviations [5]. Correspondingly, there is a loss of mineral particles.

  2. 2.

    The alteration of stone structure promotes weathering rates under the physical behavior [70]. Weathering is affected by water-rock interaction in the accelerated weathering stage, including feldspar hydrolysis and calcite dissolution [71, 72]. According to the mineral composition of the samples, the major reaction can be expressed as:

    $$2{\mathrm{NaAlSi}}_{3}{\mathrm{O}}_{8}+2{\mathrm{H}}^{+}+{\mathrm{H}}_{2}\mathrm{O}\to 2{\mathrm{Na}}^{+}+4{\mathrm{SiO}}_{2}+{\mathrm{Al}}_{2}({\mathrm{Si}}_{2}{\mathrm{O}}_{5})(\mathrm{OH}{)}_{4}$$
    (7)
    $$2{\mathrm{KAlSi}}_{3}{\mathrm{O}}_{8}+2{\mathrm{H}}^{+}+{\mathrm{H}}_{2}\mathrm{O}\to 2{\mathrm{K}}^{+}+4{\mathrm{SiO}}_{2}+{\mathrm{Al}}_{2}({\mathrm{Si}}_{2}{\mathrm{O}}_{5})(\mathrm{OH}{)}_{4}$$
    (8)
    $${\mathrm{CaCO}}_{3}+{\mathrm{H}}^{+}\to {\mathrm{Ca}}^{2+}+{\mathrm{HCO}}_{3}^{-}$$
    (9)

The coupling of physical and chemical behaviors further aggravates the weathering of building sandstone. Therefore, the weathering rate in this stage is significantly higher than that of initial stage, and there is an accelerated tendency.

  1. 3.

    Minerals hydrolysis and acid environment in earlier stages provide favorable nutritional conditions for fungi and lichen. Stone damage caused by lichen hyphae penetration and organic acids released due to biological metabolism, which in turn accelerates the physical and chemical weathering process [73]. A relatively stable biocrust will be formed when the sandstone surface is completely covered by biological colonization. The contact between internal stone and external environment can be reduced due to biocrust. However, the exterior of weathering crust will be further weathered, resulting in biocrust thickening [14]. Some studies have verified the protective effect of biological crusts on internal rock layers from microscopic observations, chemical compositions, and mechanical properties [67, 74, 75]. Therefore, the weathering of building sandstone is in a temporary stable state before the biocrust is destroyed.

The above three different weathering stages can be described as a progressive process, from which an obvious trend in weathering rate of building sandstone can be shown in Fig. 10. Nevertheless, it should be noted that the studied weathering process refers only to the near-surface effects. Considering that most weathering evaluation systems are characterized by experiments on physical and chemical parameters of material [15], weathering assessment for building sandstone generally needs to be carried out in the nondestructive method. Therefore, based on the microscopic characteristics of the weathering process of building sandstone, a novel method for grading the weathering degree is proposed by considering the combined behaviors of physical, chemical, and biological. The weathering process is initially divided into four grades, which can be regarded as a reference for hyperspectral imaging, as listed in Table 2.

Fig. 10
figure 10

Evolution process of building sandstone in various weathering stages

Table 2 Weathering degree classification of building sandstone according to microscopic observation

Hyperspectral characteristics of building sandstone with different weathering degrees

Microscopic observation is valuable to obtain the essential data of building sandstone weathering properties, but it is insufficient to quantify the degree of weathering. Hyperspectral imaging technique has proven to be effective in the classification of subtle differences [43, 76]. Therefore, weathering degrees of selected samples are required to mark tentatively in the hyperspectral image based on microscopic observation results. The mapping relationship between microscopic weathering characteristics and spectral information is shown in Fig. 11. The correspondence can be used to construct weathering assessment models based on hyperspectral images of building sandstone.

Fig. 11
figure 11

Establishment of mapping relationship between microscopic weathering characteristics and spectral response

Hyperspectral images were preprocessed to investigate the spectral characteristics of building sandstone with different weathering degrees. The bands of 400–1000 nm were chosen as our research object for three main reasons. (a) These bands have an excellent spatial resolution, which is conducive to the analysis of spectral characteristics of the surface differences in sandstone. (b) The mechanism of mineral spectral absorption mainly includes the electron transfer of metal cations and the vibration process of anionic groups. The absorption peaks of common cations are mainly at the bands of 400–1000 nm. (c)The change in rock surface composition caused by weathering will be more closely related to metal cations. A similar study has shown that the bands of 400–1000 nm have a good effect on the identification of stone weathering [43]. Then, the corresponding spectral curves of building sandstone with bands ranging from 450 to 950 nm were plotted in Fig. 12.

Fig. 12
figure 12

Preprocessed spectral curves of building sandstone: a unweathered; b slightly weathered; c moderately weathered; d highly weathered

A clear double peak feature is shown in the spectral curves of the unweathered building sandstone (Fig. 12(a)). The maximum absorption peak is around 550–735 nm, and another absorption peak is around 735–800 nm. These two characteristic peaks are largely affected by Fe3+ ions, which are produced by the formation of hematite in sandstone [77]. In chemical and mineralogical analysis, iron oxide is also regarded as the most sensitive element in rock blocks during weathering [62].

Comparing Fig. 12a, b show that the slightly weathered still appear with double absorption peaks in the same bands. However, the spectral curve characteristics are significantly different from those of the unweathered sample. The absorption peak in slightly weathered state is wider than that in unweathered state in the bands of 550–735 nm. The reflectance value at the absorption peaks of 735–800 nm and 800–950 nm in slightly weathered state move up 0.2–0.3 than those in unweathered state. Given that building sandstone with slightly weathered is mainly controlled by physical behavior, particularly the surface porosity and roughness of stone [78, 79]. Some research demonstrates that an increase in rock surface roughness will weaken the specular reflection effect, which results in a decrease in reflectivity [80, 81]. Moreover, the content of interstitial material is increased as the lower porosity of rock samples. Considering that the spectral reflectance of sandstone fillers such as epidote, chlorite, and biotite is lower than that of major clastic particles such as quartz and feldspar. Accordingly, there is a positive correlation between reflectivity and surface porosity [33, 39, 82]. In this study, the fluctuation of reflectivity can be obtained due to the variations in roughness and surface porosity of stone.

From Fig. 12c, the absorption peak at 550–735 nm in moderately weathered state is replaced by double absorption peaks of 555–660 nm and 660–730 nm. Moreover, the absorption peak intensity at 735–755 nm is weakened. As moderately weathered state is controlled by physical and chemical alterations, a large number of cations are produced due to mineral hydrolysis, such as K+, Na+, and Ca2+. Related studies show that hydrolysis will significantly alter mineral composition of stone surfaces [40, 83]. This feature was also confirmed by the spectral trend obtained in this study. The position and intensity of the absorption peak will be affected by the change in mineral composition, which reflected the characteristic of hyperspectral imaging technique. Infrared spectra are characterized by bending, stretching, and electron leaping between atoms in the mineral lattice, which is active in a specific region of the infrared spectrum, resulting in a characteristic absorption peak [84]. Moreover, high uncertainty and discreteness are presented in spectral curves with different weathering degrees, which is convenient for the classification of weathering degrees.

As shown in Fig. 12d, the spectral curve shows a low reflectivity value in the bands of 550–660 nm, then slowly increases, and a sharp increase in reflectivity around 700 nm. Moreover, an absorption peak characteristic of stone under the highly weathered state is at 900 nm. The highly weathered state is affected by physical–chemical-biological behaviors, among which biological behaviors are dominant. Due to the biological weathering of sandstone buildings, a large number of humus, iron oxide, and other coloring components are formed on the surface of aggregates and mineral particles [67, 85]. Similar studies have shown that the spectral response around 700 nm is related to the presence of chlorophyll-a [86]. Combined with the spectral characteristics of cations, the absorption peak at 900 nm is mainly related to Fe3+. Meanwhile, the surface of building sandstone is covered by biological colonization, which will cause previous spectral characteristics of sandstone to be obscured [87]. Besides, the organic matter produced by biological weathering and the shadow caused by organisms makes the spectral characteristics of stone more random. Therefore, spectral characteristics of highly weathered building sandstone are greatly different from other weathering degrees.

In addition, the vibration absorption of different groups of clay minerals in sandstone samples will cause characteristic absorption peaks in the bands of 1000–2500 nm [88, 89]. Among them, the absorption characteristics around 1400 nm are caused by the frequency doubling of stretching vibration of the OH groups. The absorption characteristics around 1900 nm are caused by the combination of stretching vibration of OH groups and bending vibration of water in minerals. The absorption characteristics around 2200 nm are caused by the combination of stretching and bending vibration of Al–OH groups in clay minerals. Meanwhile, the type and content of clay minerals vary with the weathering strength, and there is an evolution process from illite and chlorite to kaolinite [90, 91]. The kaolinite appears in large quantities in the spectral response, showing obvious double absorption characteristics at 1400 and 2200 nm. When almost all clay minerals are kaolinite, the absorption characteristics at 1900 nm are relatively wider than those of semi-weathered samples. Some studies have indicated that the spectral characteristics of moss and lichen may relate to inorganic and organic compounds with significant OH bonds in the bands of 1000–2500 nm [35, 92].

The analysis above reveals that weathering of building sandstone leads to considerable changes in the mineral composition of surface, which exhibit various spectral characteristics. This phenomenon is consistent with the results found by Zhou and Wang [61]. By comparing spectral differences between weathered and fresh rock samples, it may be determined that mineral material produced by rock weathering is different from the parent rock, resulting in changes in spectral characteristics. It can be seen from the differences in absorption peaks and amplitude characteristics of spectral profiles of building sandstone, there is a high correlation between weathering and hyperspectral data. Thus, weathering assessment for building sandstone based on hyperspectral imaging technique is supported by this correlation.

Validation of intelligent assessment model for building sandstone weathering based on hyperspectral images

As shown in Fig. 13, the accuracy of GWO-SG-RF weathering assessment model for building sandstone based on hyperspectral data reaches 99.625%, and precision, recall rates, F1-score of model for different weathering degrees are all greater than 0.99. This demonstrates that the constructed model is capable, powerful, and effective at classifying weathering degrees correctly. According to the confusion matrix, misclassifications are mostly distributed between unweathered and slightly weathered, as well as slightly weathered and moderately weathered. This is due to the uneven weathering of building sandstone on a local scale. Based on rebound value and ultrasonic velocity tests [93], some researchers have also proposed that the randomness of weathering damage leads to the heterogeneity of sandstone facades, which is compatible with the results of this study.

Fig. 13
figure 13

Results of the applied hybrid model for classifying weathering degree: a confusion matrix; b indicators performance

To further test the effectiveness of weathering assessment model in large-scale field applications, hyperspectral images of building sandstone are collected on-site and fed into the trained GWO-SG-RF model. Compared to indoor hyperspectral image collection, a larger scale is required in the outdoor acquisition, resulting in a wider range of single-point pixel coverage and a lower spatial resolution. The spectral characteristics of material properties will be affected obviously due to external environmental changes, such as light intensity and temperature [94, 95]. To reduce accidental errors caused by the external environment, a stable environment of temperature and light conditions is required. The entire weathering assessment process on-site is completed in 5 min at each point. The weathering assessment cloud map of the sandstone walls generated by the trained assessment model is displayed in Fig. 14.

Fig. 14
figure 14

On-site weathering assessment of sandstone walls using the trained model

The assessment cloud map reveals that the majority of the selected sandstone walls are slightly weathered. The unweathered and slightly weathered areas are mainly noticeable in the joints of sandstone blocks, which is due to the fragile edges of blocks after weathering damage. Thus, mineral particles on the wall surface separate significantly, exposing the fresh part of the block to the external environment. These phenomena are caused by changes between unweathered and slightly weathered states, which may lead to misclassification. Affected by rainfall and moisture migration, most moderately and highly weathered areas of sandstone wall are located in the upper windowsill and the lower part near ground. The total number and percentage of pixel points for different weathering degrees of sandstone walls are shown in Table 3.

Table 3 Total number and percentage of pixel points of sandstone walls with different weathering degrees

The overall weathering grade value \({W}_{d}\) of sandstone wall can be calculated by following:

$${W}_{d}=\frac{\sum \left({{W}_{d}}_{i}{A}_{i}\right)}{\sum {A}_{i}}$$
(10)

where \({{W}_{d}}_{i}\) is grade value corresponding to different weathering degrees, which 1 to 4 in turn represents weathering degree from unweathered to highly weathered; \({A}_{i}\) is area occupied by different grades.

Then, evaluation results of the sandstone wall are substituted into Eq. (10). The overall weathering grade value for the selected region can be obtained as 2.3163. It indicates that the sandstone wall is in a slightly weathered state, which corresponds to the actual situation. Also, the proposed model is applied to another sandstone building selected in the same region to quantify the weathering degree on-site, as shown in Fig. 15. The assessment results verify that the method is applicable to other buildings of the same material in this region.

Fig. 15
figure 15

Application of weathering assessment model in another sandstone building from the same stratum

Consequently, large-scale building sandstone can be quantitatively evaluated using the constructed model with microscopic observation and hyperspectral data. Compared with other stone weathering assessment methods [2, 96,97,98], the advantages of the approach applied in this study are that it only requires the acquisition of spectral images, and it can completely avoid destroying building sandstone.

Conclusions

Based on the influencing factors of weathering on building sandstone, the weathering process in this study can be divided into three stages: initial weathering, accelerated weathering, and stable weathering. Correspondence between microscopic structure and spectral characteristics of building sandstone with different weathering degrees is established by combination with hyperspectral imaging technique.

Weathering degree can be classified according to the spectral curve characteristics of different weathering stages. A hybrid GWO-SG-RF model with high accuracy in selected sample classification can be extended to evaluate the field weathering degree of building sandstone quantitatively.

Hyperspectral data and intelligent algorithms are used to create a pixel-level weathering assessment process for building sandstone that is fast, nondestructive, and accurate. The proposed assessment model shows good scalability in large-scale field applications, and this process has reference significance for the quantification of weathering assessment of other porous stones. Furthermore, to extend the application of the assessment model, the research group is now collecting weathering data from other types of building stone, which will be combined with the local climate environment, to consider the impact of multiple factors on the assessment results.