**6.2 Microscopic image analysis**

Optical microscopy with polarized light microscopes has become one of the most powerful techniques in petrography and mineral exploration. However, due to the complexity of mineral assemblages, acquiring quality images with details of mineral grains and fine textures is a challenging task. Here we present an application of the

### **Figure 18.**

*Spectral negentropy maximization ICA. (a–c) Independent spectral features. (d) RGB image compilation. (e) Extracted lineaments (dashed red lines).*

*SFE2D: A Hybrid Tool for Spatial and Spectral Feature Extraction DOI: http://dx.doi.org/10.5772/intechopen.101363*

**Figure 19.**

*(a) An example of petrographic thin section imagery used in this study for mineralogical feature extraction. (b– d) Independent components of RGB bands combined to form different representations for enhanced visualization. The thin section image is exerted from Carleton NAGTWorkshops [20].*

SFE2D program in the micromorphological characterization of minerals under thin section. An example of an optical microscopic image is presented in **Figure 19a**. The SFE2D program can separate mineral zones on a highly mixed texture.

The algorithm starts with balancing the colors on the original image based on the normal distribution. Then, source separation on color bands helps extract hidden features in principal or independent components. The RGB compilation of independent components of the image is also shown in **Figure 19b**–**d**. As can be seen, different polarities offer different feature representations.

The program also offers a fast detection of the region of interest (ROI) with a color-pick algorithm based on few clicks on specified color zones. As can be seen in **Figure 20**, subtle mineralogical zones are optimally extracted for geological interpretations. This eventually helps calculate the percentage of specified minerals on thin sections that are very important for mineral exploration studies.

### **Figure 20.**

*Regions of interest delineated by the color-pick algorithm in the SFE2D program. (a) First extract mineral. (b) Second extract mineral. (c) Third extracted mineral.*

## **7. Conclusions**

The result presented here illustrates the theory, design, performance, and applications of a standalone mathematical tool (SFE2D) for 2D spatial and spectral feature extraction, based on PCA, ICA, CWT, *k*-means clustering segmentation, and image processing algorithms. SFE2D provides an integration tool for the interpretation of multiple geoscientific data sets at once. SFE2D has straightforward applications in various geophysical and geoscientific explorations where one needs to add value to observed geo-images by recovering hidden features in hyperdimensional data sets.

The program can perform an image segmentation based on the *k*-means algorithm over the RGB-merged independent/principal components. The results are pseudo-geological maps that integrate extracted features from multiple data sets. Unlike traditional segmentation methods, the integrated *k*-means segmentation algorithm helps calculate segments based on principal or independent components of the original data sets. The proposed approach integrates information from multiple geophysical data sets and makes sure that the combined images are maximally independent and unique. In other words, the feature overlaps are minimal. This has an important implication in image segmentation since a slight presence of image overlaps and artifacts distort the segmentation output.

Spectral decomposition of images also provides a unique way for feature extraction in the frequency domain. Deploying the SFE2D algorithms helps eliminate redundant frequency volumes and reduce them to a more manageable number of components. Taking advantage of the ICA statistical properties, we can keep the most geologically pertinent information within the spectral decomposed data. The feature extraction algorithms in SFE2D can also be used in deep learning applications where feature extraction is a primary step in optimizing neural network design.

The SFE2D program can also be used in the micromorphological characterization of minerals under thin sections. The program offers a fast detection of the region of interest (ROI) with a color-pick algorithm based on few clicks on specified color zones.

The SFE2D application is straightforward and for immediate use, as long as users already installed the MATLAB runtime library on their computer.

### **Acknowledgements**

This study is funded by FRQNT (Fonds de recherche, Nature et technologies du Québec) and MERNQ (ministère de l'Énergie et des Ressources naturelles du Québec).

### **Appendix A: SFE2D program environment**

The SFE2D is provided as a standalone executable program. To use the executable program (SFE2D.exe), users do not need any previously installed Matlab software on the PC. The only prerequisite is installing the latest Matlab 2021a Runtime library, free to download from MathWorks [21]. To do so, users can install the required runtime codes by double-clicking on the offline program installer "Installer\_SFE2D (Offline).exe" or the online version of it "Installer\_SFE2D (Online).exe" that is a lightweight version in which the program and the runtime codes are going to be installed automatically through downloading from

*SFE2D: A Hybrid Tool for Spatial and Spectral Feature Extraction DOI: http://dx.doi.org/10.5772/intechopen.101363*

MathWorks server. Users can also directly download the runtime from the MathWorks website [21].

After unzipping the file and installing the runtime, the program should work by simply double click on the SFE2D.exe. It is recommended to copy/paste the SFE2D. exe to a project folder where data sets are located with read/write permission. Running the program for the first time needs activation. To activate the program, one needs to double click on the "Activate.exe" file to create a "Key" file. A dialog box (Password Required) appears that asks to insert the password provided for the user. As soon as typing it and pressing Enter, a "Key" file is going to be generated. The user needs to keep that file and save it in the same project folder where "SFE2D. exe" is copied. When running the SFE2D, the program interface appears as in Figure A1. On the right side, the user can control the program parameters, and on the left, the progress of calculations and possible errors can be tracked with the windows command shell console for execution (black screen on the left).


**Figure A1.** *SFE2D program interface.*

*Mining Technology*
