Measuring Surface Roughness through the Use of Digital Photography and Image Processing

This paper aims to provide a quantitative method that employs image processing in the assessment of surface roughness based on digital photograph field surveys, as in previous studies employing the outdoor integrated digital photography and image processing (O-IDIP) method. Digital photographs were taken on two different days under contrasting outdoor lighting conditions (overcast versus clear sky). Images were captured mounted on a tripod close up to the surface of a 380-year-old wall located at the University of Oxford Botanic Garden in the City of Oxford, UK. Sampling points were established at regular intervals along the border wall and encompassed sections facing west, north, and east, respectively along the survey. Two photographs were taken with a digital camera at each sampling point, one containing a color chart used to calibrate outdoor lighting conditions across images, which was excluded from the other photographic pair. Histogram-based quantification was performed based on images converted to Lab Color mode. The 10-step calibration procedure presented in this paper required more adjustments of contrast. However, more adjustments were not required under a clear sky. Std Dev L measurements were used to establish categories in a simple 3-point roughness index, namely the surface roughness index (SRI). The results denote that pitting did not affect surface roughness measurements. The study shows that it is possible to use Std Dev L measurements to quantify surface roughness on a comparative basis.


Introduction
Building stone like any other stone is susceptible to weathering, especially in polluted (urban) environments.
Stephenson and Finlayson [1] and others (e.g., [2] [3]), deployed microerosion meters (MEMs) in measurements of building stone weathering rates; these are considered to be intrusive due to the required installation of bolts.Kamh and Hanna [4] used an MEM to establish a surface roughness index.Other than recession rates, authors have also quantified weathering by examining the surface roughness of building stone, such as of Spanish granites [5].A nondestructive in situ technique to measure weathering of these granites was through surface roughness determination (SR) of minerals, including quartz, feldspar, and biotite, at their center and edges.The latter two minerals (and their intergranular contacts) were found to be most easily affected by physical and chemical weathering in salt crystallization.
Changes in surface roughness have been attributed to both the action of salts as well as air pollution (e.g., [6]).In the latter, surface roughness was measured using a Surfcom plotter to acquire Ra (arithmetic mean deviation) values through 20 transverses, the direction of which did not significantly affect Ra values and should reliably reflect weathering on the surfaces of exposed tablets comprised of Monk's Park and Portland stones.However, stone type affected the output in this study, as the former (Monk's Park stone) was too irregular for the Surfcom plotter.The results, based on Portland stone, suggested that the exposed tablet was irregular and the sheltered tablet rougher than a fresh tablet.
Gómez-Pujol and colleagues [7] used a laser scanner to construct 800 microrelief maps of surfaces at the millimeter scale.These 200 × 200 mm surfaces (with a maximum of 400 × 400 mm area) at two Mallorcan coastal sites differed depending on whether they were located on splash or spray zones.These results were able to denote differences in the geomorphologic domain because the same rock type (limestone) was examined.Feng and Röshoff [8] used a three-dimensional laser scanner in-situ that took up to 6 minutes (depending on resolution) to derive a scan at 3-mm resolution, with which they were able to test for scaling effects evident on large fracture surfaces.
Sometimes it is not possible to sample directly in the field and molds/casts are used for later analysis.For instance, Yang and colleagues [9] made a mold of a mica-schist joint and used a laser scanner to produce a digital image of it.The laser profilometer employed was a noncontact optical instrument used in order to obtain vertical and horizontal profile numbers.Subsequently, they used the Hurst exponent (H) as an index of roughness (r).They cautioned that roughness measurements based on statistical and quantitative parameters are susceptible to error associated with interpolated points.A three-dimensional surface roughness index should be employed simply because a two-dimensional roughness index should not be used to measure three-dimensional surfaces.Moreover, the authors encouraged the use of austerity angle (rather than height) for computation of three-dimensional roughness.
Ehlmann and colleagues [10] also made a mold/cast of 10 boulders located at the Ephrata Fan, Channeled Scabland in Washington, USA.Casts were brought into the laboratory for scanning at a minimum resolution of 0.4 -0.7 mm using a Konica Minolta VI-9i three-dimensional digitizer.Their findings indicated that their plaster surface models (molds/casts) had a reduced vertical resolution (e.g., 200 µm scan resolution instead of 500 µm) and, accordingly, displayed less roughness.They also found that exposed boulders were significantly rougher than those buried under fan deposits.These authors were able to develop a digital elevation model (with relief up to 2 cm in a cast area of 13 × 15 cm 2 ) that enabled them to perform a morphometric classification, which conveyed a conchoidal fracture and evidence of channels, ridges, peaks, passes, planes, and pits.
High-resolution laser profilometry has been employed with statistical analysis to develop a classification of stylolites [11].These have also been examined using ground-based LIDAR [12] more recently on stylolites >km long located in Northern Israel.The resulting Hurst exponent was approximately 0.65, which is similar to results based on smaller samples, and it was reduced at larger scales; behavioral changes were evident at scales >50 cm.
Authors have expressed difficulty in quantifying roughness.For instance, McCarroll and Nesje [13] commented on the availability of many instruments to measure roughness, such as micromapping (which is timeconsuming and requires heavy and expensive equipment, and computing power) and profiling, and found the simple (short) profile gauge to be the most accurate.McCarroll [14] introduced a simpler manual technique employing a microroughness meter (a profiling instrument).This approach was later used with a digital meter and processor by Whalley and Rea [15].McCarroll and Nesje [13] also commented on indices devised by geomor-phologists in order to measure roughness, finding them to be too complex, labor-intensive, or sensitive to scale.They found the standard deviation of differences in height values along a profile or "deviogram" to be the optimal way to quantify the roughness of rock surface profiles irrespective of the angle that they are measured.Finally, the authors recommended the use of the maximum scale possible in any given study.Subsequent work by McCarroll [16] suggested that if a profile gauge is employed, that the profile must be at least 19 cm and four profiles (A-D) are required for each of 10 (1-10) surfaces.Microroughness meters are more accurate, and can be digital (e.g., [15]); however, 38 horizontal measurements are required, with units taken in millimeters and usually at intervals of 5 mm.Coordinates of x-y are used, representing this sampling interval and measurements of height, with differences in adjacent readings reflective of roughness.McCarroll [16] also employed other intervals, of 10, 15, 20, 25, and 30 mm.The calculated roughness index resulted from the standard deviation of differences in adjacent heights.The standard error was then computed in order to obtain the root-mean-square (rms) roughness.
Color changes are evident on rocks due to the process of oxidation.Chromophores, such as iron, produce color changes, red-brown in color with oxidation and blue-black with reduction, with the latter occurring more quickly because of the relative stability of oxidized phases.According to Benavente and colleagues [17], in addition to oxidation/reduction, gloss, and polish can also affect surface color through alterations in perceived surface roughness.For instance, polishing reduces surface roughness through abrasion.Using an experimental laboratory test of acid attack to simulate weathering, these authors examined the polishing process on limestone and marble.They employed a surface roughness tester, taking three measurements along a 12.5-mm line.Roughness changes (Ra) were taken in millimeters and they discovered that stone surface roughness decreased with grinding.On the other hand, acid attack dissolved stone grains and increased the roughness of stone surfaces.Whereas polishing mechanically reduced roughness homogeneously across the stone surface, acid attack is more heterogeneous (attributable to grain distribution and size).Most importantly, they compared surface roughness with stone color and found that polishing reduced surface roughness and also lightness (L*), but the chromatic values (a* and b*, together C*) actually increased.Conversely, with acid attack, lightness increased and chroma decreased.In both cases, the chromogen mineral remained unaltered during decay, so that there was no perceivable alteration and no hue change.Color changes occurred due to surface roughness in addition to changes (due to acid-oxidation) in particle and precipitated minerals deposited on surfaces.
The integrated digital photography and image processing (IDIP) method was originally introduced by Thornbush and Viles [18] based on an indoor application on stone sensors exposed in a polluted urban environment (in central Oxford) between 1996 and 2001.IDIP was employed to measure (uncalibrated in a laboratory setting, where indoor lighting was controlled) surface brightness and soiling pattern [19].It was subsequently applied out-of-doors and a calibration procedure was established based on the inclusion of a grayscale in digital photographs [20] [21].Finally, Thornbush [22] devised a calibration procedure that enabled for its outdoor application, known as the O-IDIP (namely, the outdoor integrated digital photography and image processing) method.The results were verified using spectrophotometric data and the study tested for outdoor lighting conditions under overcast versus a clear sky.The study conveyed a stronger linear correlation between calibrated Mean L (r = 0.7157) and spectrophotometric data in comparison with calibrated Std Dev L values (r = 0.5157).In fact, calibration tended to weaken the latter correlation (from r = 0.6531).
The O-IDIP method has been applied at various scales, from sensor to the building (facade) scale.It was applied, for instance, at the Ashmolean Museum in central Oxford in order to compare the impact of the cleaning of the building exterior on its brightness and coloration [23].Outdoor lighting conditions were also tested, with the results showing that lightness was more affected than the chromatic channels of color.This indicates that more error is associated with soiling measurements.A most recent study by the author examined greening on north-facing walls located in central Oxford [24].This was possible using the green-red channel of chromatic color (a); and the results quantitatively captured the greening of walls with the growth of algae and mosses.
These past studies have indicated several characteristics of the Std Dev L value in particular.Specifically, this value is affected by outdoor lighting through the casting of shadows.It is reflective of surface soiling patterns (as conveyed by [19]), and is also sensitive to shadows cast by unevenness of the surface (roughness).For this reason, the current paper examines the potential of this value as an indicator of surface roughness, with potential to assess across entire areas of surfaces (rather than just individual profiles).
The purpose of this paper was to apply a new simple and inexpensive method using image processing of digital photographs to measure the surface roughness of rocks.As such, this is another contribution to a (quantitative) photogeomorphologic study based in central Oxford (cf.[25]).It is useful to quantitatively decipher the weathering of rocks, such as limestone comprising Oxford stone and the city's historical buildings.Those rocks located in a polluted urban environment are known to degrade (soil) and deteriorate (decay) at faster rates than those situated in unpolluted environments; however, this method is versatile and can be employed in any setting where a digital camera is functional.Furthermore, it may be employed at various scales (from sensor to building).

Materials and Methods
Digital photographs were acquired in the field using a FujiFilm (Finepix) J32 with 12.2 megapixels (M) with flash off and macro on at 3 M image resolution.The camera was mounted on a tripod, which was placed at regular intervals of 10 m apart along a (consistently vertical and flat) border wall located at the University of Oxford Botanic Garden situated in the City of Oxford, UK.An attempt was made to secure as equal as possible a distance (of 3.77 m) between the wall and tripod along the border beds.The photographic survey was performed on two different days in August 2013 (specifically, on the 24 and 31 of August).The reason for doing this was in order to compare lighting conditions in overcast versus a clear sky.Previous studies indicated the overcast condition to be preferred for quantitative photography; however, it is arguable that given calibration, this should not matter.
The current calibration procedure is different from the previously published work in an attempt to select equal areas of photographic pairs.For this reason, the area behind the color chart was consistently selected for sampling and set the scale of the investigation (to the cm-m scale, or mesoscale).A flow chart summary of the simple 2-point (white-black) procedure for calibration and acquirement of quantitative lightness information conducted in Adobe Photoshop appears in Figure 1.According to this procedure, each image needs to be processed manually at present.For this reason, this study was restricted to a total of 18 sampling points (or sites) at which photographic pairs were obtained in the photographic survey.The specific 10-step procedure conducted in Adobe Photoshop was as follows: 1) Duplicate the photographic layer of the image containing the color chart as a layer in the other photographic pair; 2) Convert the photographic mode to Lab Color, but Don't Flatten; 3) Use the Zoom Tool to zoom to 100%; 4) Use the Color Sampler Tool to select points in the centre of white and black color swabs contained in the color chart; 5) Perform adjustments to the sampled colors until black = 0% and white = 100% lightness (L).This is done by adding percentages to 100% for Brightness and Contrast until 0% is achieved; 6) Select chart area using the Rectangular Marquee Tool; 7) Convert Opacity to 0% on the layer containing the color chart;

Results
Resultant images were of dimensions 2048 × 1536 pixels.They covered an actual area of 0.29 m width and 0.20 m height.A demonstration is provided based on Site 1 (Figure 2).Site 3 required the most total adjustments in the calibration procedure.Overall, substantially more adjustments were required in the calibration procedure for contrast than brightness (Table 1).More total adjustments were required in an overcast outdoor condition, with an average of 61 adjustments required versus 54 under a clear sky.There was also more variance (standard deviation) in the former condition (an average of 19) in comparison with the latter (11).
As appears in Figure 3  an increase in calibrated Mean L values at some three-fourths of the sampling points (except at Sites 1, 3, 6, 8, 10, and 17) and across the two lighting conditions.However, there was not much overall change in Mean L values  4 shows a strong positive linear correlation between the two variables, where r = 0.9488.However, % Std Dev L values did not follow suit and were more deviant in a very weak negative correlation with % Mean L. In order to establish an index for % Std Dev L values, a dispersion diagram was constructed and appears in Figure 5.It is evident from this figure that clusters appear at 10.00% and just before the 20.00% mark.Based on this spread of data, cutoff points were derived for an index.
The surface roughness index (SRI) is based on the understanding that % Std Dev L denotes variations in L and that this variation increases on more textured surfaces.This value conveys darkness and lightness variations that capture surface roughness quantitatively.For this reason, % Std Dev L values were used for establishing this 3-point index.Ranked from lowest to highest are Sites 17, 7, 5, 2, 4, 16, 11, 9, 13, 12, 8, 15, 1, 18, 14, 6, 10, and 3, with the median situated between Sites 12 and 13 (13.88%).This constitutes a medium level of surface roughness according to the SRI, where Std Dev L values between 0% and 10% represent a low surface roughness; 11% -20% is medium; and 21%+ is high (Table 2).These point breaks were established based on divisions in the data appearing in Figure 5. Finally, there is some suggestion of more sites having low surface roughness values associated with an overcast condition (Table 3).

Discussion
The dispersion diagram (see Figure 5) led to a 3-point index for the SRI; however, it is noteworthy that the number of points could have increased to 4 and even 6 points.For instance, a very high category could have been added for % Std Dev L values of 31+; also, the categories could have been further divided as very low,    low, low-medium, medium-high, high, and very high based on increments of 5% rather than 10%, in this way refining the level of surface roughness.Based on Appendix A, several observations are possible, including that pits in the wall did not increase calibrated Std Dev L values, as evident at Site 17.For instance, a greatly pitted section of wall at Site 13 only received a medium level of roughness.What seems to make a difference to surface roughness was the amount of undulation in the surface (peaks and troughs) rather than pit depth.Precipitates visible on some of these surfaces, such as at Site 3, increased the surface relief and unevenness and, therefore, the roughness.
Fischer and Gaupp [26] performed optical roughness quantification through the use of white light interferometry and confocal laser scanning microscopy.They conveyed that rock surface roughness is affected by fabric and pore space characteristics, so that roughness is indicative of dissolution and precipitation.However, in the current study, pitting did not affect surface roughness in the way that precipitates did.Moreover, rougher surfaces did not display a greater lightness, as anticipated in research by Benavente and colleagues [17].
Other researchers have observed that organic matter (OM) on the surfaces of black slates controls surface roughness measured using light-optical topographic microscopy, with combined vertical scanning interferometry and laser scanning microscopy [27].More specifically, at the nanometer to micrometer scale, there is an increased OM along with greater roughness during weathering; however, this decreased with further weathering.The authors concluded that OM oxidative degradation controls both the reactivity and topography of the rock surface.Fischer and colleagues [28] relayed that geochemistry affects surface roughness, with the elements U, P, Cu, and Zn on black slates being inversely correlated with (the surface parameter) F.More recently, Fischer and colleagues [29] discovered a positive linear correlation between surface roughness, on surfaces of <100 nm, and adsorbed particle density.They also found a minimum roughness range (of at least 50 nm for particles with diameter of 1 µm) for initial colloid deposition, which occurred primarily at micrite (mainly calcite, but also with traces of quartz and ankerite) grain boundaries, where surface steps were established, forming small protrusions [30].A scan area of 300 × 300 µm revealed that increased roughness increases the deposition of colloids, but chiefly at low concentrations.The highest deposition efficiency was evident at intergranular pores in sections of wall with roughness Rq = 500 -2000 nm (low surface roughness, where Rq < 500 nm, where there were quartz and feldspar crystals and intragranular pores).These results agree with the current study findings in that deposited elements (e.g., precipitated Ca) seem to have a greater impact on surface roughness than those features associated with dissolution (pits).
Scale is an important consideration in studies of surface roughness.Tatone and Grasselli [31] recently investigated roughness using 2 × 2 and 2 × 3 m 2 surfaces and discovered that surface roughness actually increases at this scale compared with <1 m 2 (e.g., 100 × 100 mm), which they argue is most often examined.Nevertheless, the authors believed the resolution of surface measurements to be more influential on estimates of surface roughness than sampling window size.In their study, they found that roughness decreased (by up to 88%) with increased space in sampling intervals (measurement resolution affecting digital resolution) from 0.044 to 1 mm.Other researchers have shown that both roughness anisotropy and variability decrease with increasing scale (e.g., [32]).Consequently, the resolution of digital images in the current study remained constant and unchanged, with the area behind the color chart consistently selected across sampling points.
Finally, increases in values that reflect surface roughness, such as the R-value, do not always convey just weathering [33].The reason for this is that differences in surface roughness can reflect the initial texture as well as any influence of weathering.Also, weathering can contribute to the decline of R-values in the advanced weathering process.In the current study, initial texture could not be considered, however, because of the age of the wall and lack of close-up records that could possibly denote such cross-temporal change.Moreover, the piecemeal replacement of blocks would have altered the consistency of age in this wall so that an uneven level of roughness could be attributed to differences in age predominantly between sampling points.In addition, (recent) replacement limestone blocks comprised other types of limestone (differences in lithology) rather than the original Headington stone.It is possible to deploy a quantitative approach using depth measurements (e.g., cf.[34]) and this will be executed as part of further research as a form of surface roughness calibration using the current method.However, there are bound to be differences due to contrasting approaches of using profiles versus areal measurements based on this application of O-IDIP.Nevertheless, verification is needed due to adjustments of contrast, in particular, which were executed here, that could augment the (calibrated) results.

Conclusions
This study has introduced a simple 2-point (white-black) 10-step calibration procedure that enables for the measurement of surface roughness based on lightness.Using a color chart in digital photographs taken under different outdoor lighting conditions of overcast and a clear sky, 18 sites were systematically and consistently photographed.These images were processed using Adobe Photoshop, including a simple 2-point (10-step) calibration procedure based on a color chart.Calibrated results were inflated for most sites, with some exceptions for Mean L. The calibration process is needed in this quantitative photographic method; this was portrayed by the changes undergone by Std Dev L values.These calibrated values for % Std Dev L were subsequently employed in the derivation of the surface roughness index (SRI).This is presently a 3-point index, but can be modified (using the data in Figure 5 in conjunction with Appendix A) to a 4-and even 6-point index.Further research is needed not only to increase samples (to at least 30 sites), but also to use a surface roughness tester to verify the results (in an upcoming research publication).
Based on the present findings, it is possible to conclude that the O-IDIP method works to quantify surface roughness of a limestone wall based on lightness output.The Std Dev L is particularly useful in this regard, as it portrays variations in lightness measurements across image pixels.Since shadows were deliberately avoided in this study in order not to unnecessarily augment surface roughness, the results convey changes in surface smoothness affecting measurements of surface roughness.These results are coherent and have enabled for the derivation of the SRI.Pitting does not augment the results, mostly likely because light as well as dark variations comprising the rock surface are considered.Precipitates, on the other hand, appear to affect the surface roughness of this wall perhaps due to cast shadows.

Figure 2 .
Figure 2. (a) Brightness/Contrast adjustments in Lab Color mode based on a 2-point calibration using a color chart; (b) Selection of area behind color chart with histogram output after calibration.

Figure 3 .
Figure 3. (a) Uncalibrated and calibrated results for Mean L; (b) Uncalibrated and calibrated results for Std Dev L; (c) Calibrated results for % Mean L and % Std Dev L.

Figure 4 .
Figure 4. Relationship between % Mean L and % Median L values.

Figure 5 .
Figure 5. Dispersion of results for % Std Dev L.

Table 1 .
Brightness/Contrast adjustments made at each site.
in comparison to the Std Dev L. Figure3(b) conveys an increase in calibrated Std Dev L values at all sites, particularly at Sites 1, 3, 6, 8, 10, 14, 15, and 18.These data demonstrate the importance of the calibration process.When considering the final proportions of (%) Mean L and Std Dev L, depicted in Figure3(c), it is clear that the former was highest at Sites 4 (75.21%),11(76.20%), 17 (77.45%)andlowest at Site 2 (58.27%) in particular; for the latter, Std Dev L values were highest at Sites 3 (31.27%)and 10 (23.80%) and lowest at Sites 7 (7.14%) and 17 (6.42%).The % Median L values were quite similar to % Mean L values.Figure

Table 2 .
Category ranges based on the dispersion of % Std Dev L values.

Table 3 .
Index frequency counts under different outdoor lighting conditions.