Automatic element and mineral detection in thin sections using hyperspectral transmittance imaging microscopy (HyperTIM)

. In this study we present a novel method for the automatic detection of minerals and elements using hyperspectral transmittance imaging microscopy measurements of complete thin sections (HyperTIM). This is accomplished by using a hyperspectral camera system that operates in the visible and near-infrared (VNIR) range with a speciﬁcally designed sample holder, scanning setup, and a microscope lens. We utilize this method on a monazite ore thin section from Steenkampskraal (South Africa), which we analyzed for the rare earth element (REE)-bearing mineral monazite ((Ce,Nd,La)PO 4 ), with high concentrations of Nd. The transmittance analyses with the hyperspectral VNIR camera can be used to identify REE minerals and Nd in thin sections. We propose a three-point band depth index, the Nd feature depth index (NdFD), and its related product the Nd band depth index (NdBDI), which enables automatic mineral detection and classiﬁcation for the Nd-bearing monazites in thin sections. In combination with the average concentration of the relative Nd content, it permits a destruction-free, total concentration calculation for Nd across the entire thin section.


Introduction
The detection and classification of minerals and elements are crucial in mineral exploration and outcrop characterization. They are the main drivers of past and recent scientific research in spectroscopy and imaging spectroscopy (Hunt, 1977;Boesche et al., 2015). Hyperspectral imaging cameras have been successfully used to detect minerals and elements in outcrops, rock samples, and drill cores using reflectance measurements (van der Meer et al., 2012). Whereas hyperspectral imaging is widely used for reflectance measurements in the geosciences, transmittance measurements using imaging spectrometers are mostly applied in biology, agricultural, and food sciences. Examples of hyperspectral imaging trans-mittance applications include imaging transmittance measurements of leaf traits (Bergsträsser et al., 2015), plantpathogen interaction (Thomas et al., 2017), quality of blueberries (Leiva-Valenzuela et al., 2014), and insect damage in soybeans (Huang et al., 2013). In geosciences, hyperspectral transmittance measurements have been conducted using point spectrometers. Examples of transmittance measurements involving (non-imaging) point spectrometers include the measurement of thin sections and powdered minerals for evaluating the effects of mineral orientation using a Fourier transform infrared (FTIR) micro-spectrometer (Ekaterina and Veronique, 2009), as well as measurements of the transmittance, reflectance, and emission of meteorite samples over a spectral range from the ultra-violet (UV) to the infrared (IR) using two FTIR spectrometers (Maturilli et al., 2016).
This study presents and discusses a new method for the detection of minerals and chemical elements involving hyperspectral imaging transmittance measurements of complete thin sections from rock samples. The measurements are performed by using a hyperspectral push broom imaging camera that operates in the visible and near-infrared (VNIR). It is designed for a broad variety of applications in the laboratory. The camera is equipped with a microscope lens for the use in the laboratory environment. A special measurement setup to mount the thin sections for transmittance measurements was constructed. The method was developed to analyze several thin sections containing Nd-bearing monazites from various regions including Norway, Sweden, South Africa, and Namibia.
In this study we present an application of this method to a polished thin section from a monazite-rich sample, collected from the Steenkampskraal monazite mine in South Africa. The thin section was additionally examined using a petrographic microscope and analyzed using an electron microprobe in order to provide a geochemical reference frame for comparison with our analytical results. Using this sample as an example, we present the mineral and element detection capabilities of the hyperspectral imaging camera when measuring transmittance in the VNIR spectrum.

Geology of Steenkampskraal
The Steenkampskraal monazite ore body is located ca. 70 km north of Vanhynsdorp in the Western Cape Province, South Africa. It represents one of the largest vein-type monaziteapatite-chalcopyrite-magnetite deposits in the Mesoproterozoic Bushmanland subprovince of the Namaqua-Natal Metamorphic Belt (e.g., Kilian, 2011;Basson et al., 2016). The ore body is lenticular-shaped, with an average thickness of about 0.5 m. Mesoproterozoic granite gneiss hosts the ore body, which is situated in a structural zone characterized by early ductile shearing and overprinted by later brittle deformation and faulting. The ore occurs as fine-grained massive lode that is exposed on the surface for about 400 m, with a known down-dip extension of 450 m. Preliminary U-Pb geochronological data on monazite suggest that formation of the Steenkampskraal monazite ore body occurred at 1046 ± 7.5 Ma (Knoper et al., unpublished data, cited by Basson et al., 2016). Mining of monazite for Th was active from 1952 to 1963. Detailed studies of the ore body have been made by Pike (1959), De Waal andViljoen (1970), Andreoli et al. (1994Andreoli et al. ( , 2006, Basson et al. (2016), Read et al. (2002), Kilian (2011), Jones andBurnett (2013), and Jones and Hancox (2012). The ore body contains up to 55 % following Andreoli et al. (1994) and up to 80 vol % monazite with a total rare earth element (REE) concentration of ca. 45 wt % following Kilian (2011), with the light rare earth el-ements (LREEs) predominating. Highly fractionated P-rich immiscible liquids in a tectonically instable environment are suggested to form the deposit (Andreoli et al., 1994).

Methodology
In order to perform the transmittance measurements, we used a HySpex VNIR 1600 hyperspectral imaging camera. The push broom line scanner utilizes a Kodak KAI-2020 CCD as the detector element, which is part of the Adimec1600m/D camera (Lenhard et al., 2015). It operates in the spectral range from 400 to 1000 nm with 160 bands and 1600 spatial pixels per line (Lenhard et al., 2015). The resulting hyperspectral images were analyzed with feature-fitting techniques, and then compared to petrographic microscope images and electron microprobe analyses (EMPAs).

Measurement setup
All analyses with the HySpex camera were conducted in the optical laboratory of the German Research Centre for Geosciences (GFZ) in Potsdam. The HySpex camera is mounted on an aluminum frame for translational measurements in the laboratory (Rogass et al., 2017) (Fig. 1, label 1). The frame supports a motorized sample tray (translation stage) that carries the samples (Fig. 1, label 7). The speed with which the translation stage moves and transports the samples through the field of view of the sensors depends on the integration time and the fore-optics of the fixed camera (Rogass et al., 2017). To measure transmittance with the HySpex camera a special sample holder was constructed ( Fig. 1, label 3). The holder was painted in matte black to reduce reflection and to buffer and reduce the effects of specular reflection by the light source. The light from the lamp was reflected by a white reference panel with a spectrally known diffuse, Lambertian spectral reflectance standard: 95 % reflectance, SphereOptics SG3151 95 % A (Fig. 1, label 6). The lamp irradiates the white reference with a 45 • angle through the open side of the sample holder ( Fig. 1, label 5). The white reference diffusely reflects the light through the opening slit at the top of the sample holder where the thin section is mounted (Fig. 1, label 4). The HySpex camera is mantled in order to reduce the stray light from sources other than the opening slit of the sample holder. Black cellular rubber was used to darken the space between sample holder and camera as this material mainly absorbs light in the considered wavelength range (Fig. 1, label 2). Measurements with an epoxy-covered microscope slide were conducted in order to subtract the irradiation, reflected by the white reference plate and the absorption and transmittance features of the epoxy and glass of the microscope slides, from the spectrum of the rock thin sections. The integration time was calibrated from several test runs until a strong signal was acquired and oversaturated pixels were not present (Table 1). A high signal to noise ratio   (Lenhard et al., 2015) and the applied setting. (SNR) mode was used to reduce noise in the collected spectra. It is embedded into the software of the HySpex data acquisition tool and determines how often a frame is repeatedly captured. These measurements are averaged to reduce the zero mean, white Gaussian noise in the measurements. Since the measurement time for each thin section is roughly multiplied by the number of measurements set at the high SNR setting, an optimum between signal quality and practical measurement time had to be found. A high SNR mode of 6, which resulted in a roughly 60 min overall measurement time, was chosen for the thin section with the given integration time shown in Table 1.

Data processing
First the raw image data with the "HySpex RAD" software was processed, rescaling the digital numbers (DNs) into radiance in accordance with the camera's radiometric profile (calibration is done by NEO yearly). The files were then spatially resized. The parts of the images not covering the thin sections (the black surface of the sample holder) are cropped to shrink the file size in order to speed up the following calculations and also save data storage space and memory. After the images have been cropped, the transmittance of the rock thin sections are isolated. Each pixel of the according image is divided by an averaged spectrum of the measured epoxy-coated reference slide. This spectrum includes that of the light source (white reference) so that the images are normalized and only the transmittance of the thin sections remains, ranging between 0 and 1.

Identification of minerals
For comparative data analysis, we fitted spectral reflectance library data to the obtained hyperspectral image data. The USGS Spectral Library version 7 (Kokaly et al., 2017) had to be spectrally resampled with respect to HySpex spectral bands using the spectral resampling tool embedded in ENVI. The spectral resampling tool in ENVI utilizes a Gaussian model of the spectral response functions (SRFs) for all HySpex bands, which is derived from former calibration measurements (Norsk Elektro Optikk, 2020). The spectral signatures of certain minerals and elements in Nd-bearing monazites are characterized by multiple absorption features in the VNIR range . Absorption features can then be used to identify minerals in hyperspectral imaging spectroscopy . The automatic identification and mapping of Nd-bearing monazite were implemented through the following steps. Three characteristic absorption features of Nd-bearing monazite for mineral identification and mapping were used: ∼ 580, ∼ 740, and ∼ 800 nm, following Boesche et al. (2014). The law of conservation of energy justifies using the position of the absorption features derived from reflectance spectra for transmittance measurements. The representative spectral absorption features of elements and minerals have the same position in measured transmittance spectra, given that they are not opaque. A three-point band depth index for each of the three main absorption features of Nd was used for detection and mapping.
The Fe feature depth index (IFD) was adapted  (Eq. 1) to the three features of the monazite-bound Nd (∼ 580, ∼ 740, ∼ 800 nm), resulting in the Nd feature depth index (NdFD), with the shoulders and maxima shown in Table 2. The NdFD is the difference between the transmittance (t) in the absorption maxima (t (AM)) of the specific feature (see Table 2) and the linearly interpolated transmittance value of the specific feature (t int (AM)) see Eq.
(1) (adapted from Mielke et al., 2014). t int (AM) is calculated following Eq. (2), where t (LS) is the transmittance of the band closest to the position of the left shoulder of the feature (see Table 2), and t (RS) is the transmittance of the band closest to the position of the right shoulder of the feature (see Table 2).
Equation (3) shows the application of Eqs. (1) and (2) for the first main absorption feature of Nd.
The classification map is then created using the NdBDI greyscale value image. The resulting monazite map displays Nd-bearing monazite as red pixels, while the rest (no detection of Nd) is displayed as black pixels. The red pixels of the monazite classification map can also be overlaid on a true color RGB image of the thin section to mark the monazites. The pixel-wise classification of Nd-bearing monazite and the knowledge of the relative Nd content (wt %) of the monazites (either content estimate by a database or more exact by EMPA) allows for the free determination of the total weight content (W ) of Nd in the thin section by the calculation shown in Eq. (5).
where weight content of the element is W (Element) (µg), pixel size is A (Pixel) (µm 2 ), thickness of the thin section is T (µm), number of pixels classified as mineral is N (Mineral) , bulk density (electron density) of classified mineral is ρ (Mineral) (µg µm −3 ), and relative element concentration in the mineral is C (Element) (0-1).
The results from the mineral chemical analysis are compared to the results from the processed hyperspectral images of the thin sections for method assessment. This includes the analysis by a petrographic microscope and EMPA. All calculations were conducted using the programming language  The EMPA data were reduced using the PRZ-XXP (Phi-Rho-Z method) correction routine.
4 Results and discussion

Microscope and electron microprobe results
The thin section used (sample STK 115c) contains mediumgrained monazite forming layers intergrown with quartz or allanite. In the monazite layers, pyrite occurs as an interstitial phase along monazite grain boundaries. Layers, adjacent to the monazite-rich part, are dominated by coarsegrained anhedral quartz and anhedral to euhedral pyrite or quartz-allanite rich layers. More fine-grained layers or coronas between quartz contain allanite (ca. 20 wt % LREE, Ce > Nd > La), monazite, and fluorapatite (

Hyperspectral transmittance imaging microscopy (HyperTIM) results
The false color image in Fig. 3 is the result of the transmittance calculation. The RGB bands at R 603.91 nm, G 578.46 nm, and B 563.9 nm are displayed in order to highlight the monazites by one major absorption band (AM at ∼ 580 nm). Color saturation was adjusted (300 %). This image already enables a quick manual assessment of Ndbearing monazites through the purple color as the greenish part of the RGB representation is absorbed (Fig. 3a). A comparison between the measured spectral signatures of a 3 × 3 pixel area on a monazite and a measured monazite from the USGS Spectral Library reveals that the absorption features share the same position and shape, only varying in feature depth (Fig. 3b). This similarity in reflectance and transmittance measurements is expected as the absorption feature positions are the same. Hence hyperspectral signal processing methods, other than a three-point band depth index, could also be used for analyzing the images as they can be treated as being very similar to more classical reflectance measurements, with the exception of opaque minerals. The false color RGB image calculated by the three-point band depth index (R: NdFD 1: Band 1 = ∼ 580 nm; G: NdFD 2: Band 2 = ∼ 740 nm; B: NdFD 3: Band 3 = ∼ 800 nm) displays and highlights the monazites through purple and bluish pixels, while other minerals remain dark (Fig. 4a). Color enhancement (Saturation 400 %) improved the visibility of the monazite. The NdFD image highlights Nd bound to monazite due to the three characteristic absorption bands of the embedded Nd (∼ 580, ∼ 740, ∼ 800 nm), whereas other minerals that do not contain Nd in detectable concentrations are displayed as dark. Hence, the relative absorption depth of the three bands (R: NdFD 1: Band 1 = ∼ 580 nm; G: NdFD 2: Band 2 = ∼ 740 nm; B: NdFD3: Band 3 = ∼ 800 nm) determine the brightness and color of the pixel. The variation from purple to blue for the monazites is the result of differences in the relative absorption depth of the three bands towards each other and might be caused by slight chemical variations in the monazite Nd content by two different temporal stages of formation or from different mineral orientations. The effects of slight variations in the relative feature depth is eliminated with the calculation of the NdBDI image by Eq. (4). In the NdBDI single-band greyscale image, the overall absorption depth of the three features determines the brightness of each pixel. Hence the stronger the cumulative absorption is, the brighter the pixel is displayed (Fig. 4b). The single-band greyscale image allows an easy comparison with standard analysis techniques such as SEM/BSE imaging. We interpret the greyscale feature depth image as a correlation-scale image representing the correlation towards the Nd bound to monazite. Our algorithm then uses the greyscale image to create the classification image, which displays the pixels identified as monazites in red and non-classified pixels in black (Fig. 4c). The resulting classification image can be overlaid with a true color RGB or over a crossed nicols image for easy context interpretation (Fig. 5a). The classified pixels are counted automatically, resulting in 363 522 pixels that have been classified as monazite through their Nd content by the algorithm. HyperTIM is able to detect Nd in all non-opaque crystals in the thin section through its spectral signature, but in order to calculate an estimated value for the total content of Nd in Eq. (5) (W (Nd) in µg) in the thin section by applying Eq. (5), this method requires an average concentration of the relative Nd content (wt %), which is here provided by an EMPA measurement.
where A (VNIR-Pixel) is pixel size: 24 µm × 24 µm = 576 (µm 2 ); T is thickness of the thin section: 30 µm; N (Monazite) is number of pixels classified as monazite (through Nd content): 363 522; and ρ (Monazite(Ce)) is bulk density (electron density) of monazite: 4.58 g cm −3 = 4.58 × 10 −6 µg µm −3 (Webmineral, 2020). C (Nd) is the relative element concentration in the mineral: Table 3). The total Nd (W (Nd) ) content in the thin section was estimated/determined to be 2491.84 µg. The accuracy of this value is dependent on the accuracy of the classification and the assumption that the Nd concentration in the Monazite is 0.0866 on average. Further study would be required to geochemically validate and evaluate the accuracy of these measurements and calculations, which are only shown here as a first proof of the concept.

Comparison of the results
A comparison of the processed images (Figs. 3 and 4) with the XPL (cross-polarized light) image (Fig. 2) reveals that the images created by the three-point band depth index (RGB (NdFD) and greyscale (NdBDI)) ( Fig. 4a and b) already enable a quick visual detection of the monazites. Figure 4a and b also have the advantage over classical XPL analysis by highlighting only Nd-bearing monazites, while the other minerals are not displayed. The classification image/map, on the other hand, also shows monazites at the edges of the thin section and others that are only slightly visible in the greyscale image. This is caused by a weaker absorption depth probably due to imperfect lighting, thickness variation, or a lower Nd content, but they still classify as monazites in the map as all three absorption bands are present. Figure 5 shows a side-by-side comparison of the HyperTIM classification and an area of the thin section that has been mapped with an electron microprobe (Fig. 5c). The result from Nd 2 O 3 mapping by electron microprobe across the profile region shows that the highest Nd 2 O 3 concentrations occur within the monazites (green) and lower concentrations within the allanites (blue) (Fig. 5c). In the following the advantages and disadvantage of Hy-perTIM are discussed and compared to chosen classical analytical methods used in this study such as XPL and EMPA.

Advantages of HyperTIM
The comparison shows that HyperTIM can accurately map non-opaque monazites based on their Nd content (Fig. 5). HyperTIM's largest advantage over classical methods is the time required to fully map a thin section. This is due to the automation of the mapping process. XPL requires a trained expert to manually look over a thin section. While analysis software for light microscopes automates the mapping to some degree, the complete automatized mapping of an entire thin section is a novel feature of the HyperTIM method pre- sented here. Compared to EMPA, HyperTIM has the advantage that hyperspectral cameras are usable with less training, mostly cost less, and require less operating expense to use.
Thin sections analyzed with HyperTIM require no prior preparation or coating, while for EMPA a carbon coating of the thin sections is needed. A HyperTIM measurement of an entire thin section requires roughly 1 h (plus 30 min of classification/mapping), while electron microprobe element mapping for a small fraction (shown in Fig. 5c) of the thin section required 84 h. Hence, the time and preparation efficiencies of HyperTIM are the largest advantages over classical analytical methods. The full automation possibility and speed of HyperTIM measurements (unsupervised classification) of entire thin sections could be used to map large amounts of thin sections in a relatively short amount of time.

Disadvantages of HyperTIM
The biggest disadvantage of HyperTIM is that it is not possible to map opaque minerals. This can be seen in the case of the allanite present in the studied sample. The opaque allanite (< 10 Nd wt %) is mapped by the electron microprobe, while due to its opaque nature it was not mapped through Hyper-TIM. HyperTIM is also only able to map elements and minerals based on their spectral absorption properties and create classification (pixel-based location maps) of these. The total element content calculation we have demonstrated in this study relies on the average concentration of the relative Nd content (wt %). This was provided by an EMPA measurement. It is still unknown how many minerals and elements can or could be mapped with HyperTIM as this depends on the instrument used and wavelength ranges used for the mea-surements, and no mineralogical databank exists yet for hyperspectral transmittance measurements.

Conclusion
HyperTIM represents the first scanning transmittance measurement method that involves imaging microscopy for entire rock thin sections. This study shows that HyperTIM can be used to detect, classify, and map minerals and their associated elements such as Nd-bearing monazite in thin sections. The classification of the minerals is fully automated through the programming language Python. In the processing, a three-point band depth index algorithm is applied (NdFD), and a single-band greyscale image (NdBDI) is derived from it. A classification image/map is then derived from the greyscale image, which in combination with an average concentration of the relative Nd content (wt %) (from EMPA) is used to calculate an estimate of the total mass content of Nd in the entire thin section. HyperTIM is a time-efficient, novel method for destruction-free mineral and element detection, classification, and quantization in entire thin sections, which complements more classical methods and especially EMPA, which in combination allows for a more exact element quantization. While it is not possible to map opaque minerals using HyperTIM, it is a much more time and costeffective method for mapping non-opaque minerals. The authors of this study therefore conclude that the ability of Hy-perTIM to map entire thin sections in relatively short time compared to classical methods and the ability to use automatic mapping algorithms to speed up analysis of thin sections are strong advantages over classical methods.

Outlook
As this study intends to function as a first technical proof of concept for a novel analytical method, a thin section with an abundance of monazite and neodymium was chosen as a showcase. Further research with more thin sections is needed to assess the sensitivity and accuracy, as well as to validate the element content calculations/estimation geochemically. HyperTIM is a destruction-free process/method and can be applied to other minerals, elements, and substances with characteristic absorption bands, including REEs and other economically critical resources. The general methodology of HyperTIM can also be applied to other wavelength ranges including UV (ultra-violet), SWIR (short-wave infrared), or TIR (thermal infrared) if used with other hyperspectral instrumentation.
Although most absorption features of elements and minerals should share the same position in transmittance and reflectance measurements as explained in Sect. 3, their intensity could vary to such a degree that some might be exclusively measurable in transmittance. As HyperTIM measurements of rock thin sections are a novel field, absorption features of elements and minerals exclusive to transmittance measurements due to stronger crystal lattice effects and other absorption effects than present in reflectance measurements might present a possible new research field. This possible difference in measurable absorption in reflectance and transmittance of naturally occurring minerals is suggested by research in the field of crystallography, industrial applications, and in crystal thin film research. Also, a combination of reflectance and transmittance measurements is a possible future solution to map minerals that are opaque and do not allow transmittance measurements in the studied wavelength ranges. This makes HyperTIM very promising for further research and studies on absorption characteristics and element abundances in thin sections of all rock types.
Data availability. All data derived from this research are available upon request from the corresponding author.
Author contributions. HLCD wrote and prepared the original draft, conceptualized and performed the hyperspectral transmittance microscope measurements, related calculations, and constructed the sample holder. CM contributed to the development of the band ratios. NK and ML performed the microprobe measurements and analysis. NK also helped with the calculations. CR was involved in the conceptualization and was consulting on the methodology. UA and MK provided mineralogical analysis and geological background on the sample and reviewed the manuscript. DEH reviewed the manuscript and consulted on the mineralogical background. MK and DEH provided the sample STK 115c for the measurements.
Competing interests. The contact author has declared that neither they nor their co-authors have any competing interests.
Disclaimer. Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The article processing charges for this open-access publication were covered by the Helmholtz Centre Potsdam -GFZ German Research Centre for Geosciences.
Review statement. This paper was edited by Alessandro Pavese and reviewed by Simona Ferrando and one anonymous referee.