A Novel Method for Evaluation of Ore Minerals Based on Optical Microscopy and Image Analysis: Preliminary Results

: Natural or artificial light allows us to see and analyze matter with our eyes, which are the first tools used in several experiments. In geosciences, particularly in mineralogy, light is used for optical microscopy observations. Reflected and transmitted light applied to the study of ore deposits can be useful to discriminate between gangue from precious phases. Knowledge of the structural and morphological characteristics, combined with the quantitative evaluation of mineral abun-dance, is fundamental for determining the grade of ore deposits. The accuracy and reliability of the information are closely linked to the ability of the mineralogist, who more and more often uses Scanning Electron technology and automated mineralogy systems to validate the observations or solve complex mineralogy. While highly accurate, these methods are often prohibitively expensive. The use of image analysis using standard algorithms and artificial intelligence, available as open source, and commercial packages (such as ImageJ, Fiji or MATLAB), can provide advantages in fast, cost-effective, and robust mineral analysis. Recently, the application of neural networks provided increasingly effective image analysis and, among the different types of neural networks available today, the self-organizing maps of Kohonen (SOM) seem to be among the most promising, given their capacity to receive many images as inputs and reduce them to a low number of neuronal outputs that represent all the input characteristics in a lower-dimensional space. In this work, we will show the preliminary results of a new method based on SOM and the combined use of images acquired in transmitted and reflected light to reconstruct false 3D surfaces, which were able to show the presence of intergrow between gangue phases and precious minerals.


Introduction
Optical microscopy (OM) was among the first techniques applied to study geological materials [1] and is commonly used for rock sample observations. The progress made in sample preparation and the advances reached in the optic field, combined with the invention of the Nicol prism in 1828 and the improved understanding of the polarized light potential [2][3][4][5][6][7][8][9][10], resulted in the widespread use of advanced microscopes (polarized light microscopes), making use of thin slices of rocks (up to 30 μm thick), allowing accurate discrimination of rocks and minerals under Transmitted Light Microscopy (TLM). Growth of this technique resulted in the development of modern petrography devoted to the observation of opaque and non-opaque minerals with the application of increasingly refined techniques and methods for the analysis of morphological and textural features of the rocks, up to modern techniques for modal analysis and advanced techniques for calculating the grain size distribution (GSD) [2][3][4][5][6][7][8][9].
Together with TLM, Reflected Light Microscopy (RLM) on opaque minerals was applied in the second half of the nineteenth century for metal and meteorite studies [10][11][12][13]. Until a few years ago, RLM was the primary technique used to observe and study ore minerals [14][15][16][17][18][19][20], but in the last 20 years, it has been integrated and/or replaced by modern and expensive automated mineralogy (AM) systems, used for both opaque and nonopaque minerals, that take advantage of the analytical potential of the Scanning Electron Microscopy (SEM) combined with Energy Dispersive X-ray Spectroscopy (EDX) [21][22][23][24][25][26][27]. AM Systems, such as QEMSCAN ® , MLA, Mineralogic, and TIMA-X [2,[28][29][30], allow obtaining very high-resolution micro-photos and use automated image analysis (IA) tools to quantify the mineral phases and obtain statistical information on grain and particle sizes, morphology, texture, liberation degree, etc., by rastering electron beams and X-rays on specimen surfaces [31][32][33]. Accurate mineralogic information is crucial to the mining industry, as it serves to optimize hydro-and pyro-metallurgic processing [34]. Additionally, in recent years, Laser-Induced Breakdown Spectroscopy (LIBS) has had a very rapid development in the field of applied mineralogy [35]. LIBS is a highly accurate atomic spectroscopy technique based on the use of a high-power laser which focuses on a small spot of the sample to generate ionization of a micro-volume of material. The plasma light is thus generated through a spectrometer. The proposed approaches for the use of LIBS in the field of mineralogy can be divided into two main categories: low speed, automatic on a low-speed laser (Hz < 20) [36][37][38][39][40], and high speed, with laser with speeds up to kHz [41][42][43].
Although AM systems are valuable methods in mineral deposit studies, their accuracy and amount of information that can be acquired on a single sample and their use are often limited to a selected number of samples because of their prohibitive costs.
IA is the extraction of meaningful information, for diagnostic purposes, directly from the digital image of an object. This research area was first established in the 1950s by MIT laboratories as a branch of artificial intelligence and robotics [44]. Thanks to technological advancement and the wide availability of increasingly powerful and low-cost computers, different algorithms developed for IA are now applied to many sectors, from industry to pure research. These also include the industry of optical microscopy [11][12][13][14][15][16][17][18][45][46][47][48][49][50][51].
The current IA systems range from simple image thresholding to artificial intelligence capable of segmenting peculiar image features and helping their identification and quantification [52]. Among the methods used for image segmentation, the most promising seems to be the application of self-organized maps [50][51][52][53][54]; given several input images greater than three, containing different features of an object, this method allows reducing this dimension to a few output images containing a representative grouping of these features.
Following the study of Lee and Rhodes [55], we used a contrast-enhancing method based on kernel convolution. Furthermore, to increase the feature space, we added the entropy [56], the standard deviation [57], and the pixel range [58] of the ore minerals images acquired by RLM, increasing the number of input images. Among the most useful analytical methods in RLM for ore minerals is the reflectivity index (R%), which is the quantity of light reflected by an opaque mineral relative to an incident natural or artificial light source. In this work, we tested a method based on a calibration line built on three reference materials: white (R% = 100), gray (R% = 50), and black (R% = 0). The correlation between the luminance value (L*) in the color space L* a* b* was defined, and its coefficients were used to recalculate the R% of the minerals present in the thin section microphoto. Among the most evident problems with the automatic calculation of reflectivity in RLM is that some minerals, although non-opaque, often have very high reflectivity due to their structure, internal reflections, and the presence of opaque minerals trapped inside them. If these problems are not well understood, they can lead to misinterpretations. Good operators know how to overcome these issues, but if not properly trained, an automatic system could read these reflectivities as belonging to opaque minerals. Our method provides a valuable tool to quickly understand and detect this type of problem, guiding the operator to discard these outliers and to consider only those values coming from truly opaque minerals. We have implemented a method based on a pseudo-3D surface (P3DS) of the minerals, which is helpful to immediately visualizing the portions of the image that are occupied by opaque and non-opaque minerals and those portions of the image occupied by non-opaque minerals overlapping the opaque minerals.
The current work aimed to develop a method that could also be good for those approaching the world of IA for the first time, maintaining a certain degree of comprehensibility of the physical relationship between the input and output of the neural network. In recent approaches proposed, such as in Koh et al. [8], understanding the relationship between input and output of the convolutional network (CNN) is more difficult for operators who are not specifically trained on the subject. In this work, we present the results of an experimental combination of images obtained by reflected and transmitted light observation on ore minerals with image analysis algorithms. Furthermore, the combination of reflected light and transmitted light to obtain a pseudo-surface (P3Ds) has never been used by other authors.

Materials and Methods
For this work, we selected a thin section of a rock sample containing magnetite (Fe3O4) and goethite (FeOOH) in a quartz-rich (SiO2) and tourmaline ((Na + , K + , Ca 2+ )(Li + , Mg 2+ , Fe 2+ , Al 3+ , Ti 4+ , Mn 2+ )3(Al 3+ , Cr 3+ , Fe 3+ , V 3+ )6(BO3)3[Si6O18](OH)4) gangue ( Figure 1). The observations were carried out using a polarizing microscope (Axio Plan, Zeiss, Germany) equipped with a d65 illuminator capable of using both transmitted and reflected light. The micro-photos were taken with a 14 Mpx USB CCD camera microscope (HD200VP-UM, AmScope, USA), coupled to the microscope using a 0.5× lens placed on the trinocular head, orthogonally to the observation plane. For the observation, we decided to use a lowmagnification objective, 2.5× (Plan-Neofluar), to obtain a comprehensive overview of the sample and greater representativeness of the sample features. As a result, we have a micro-photo at 5× (2.5×/0.5×). The metric calibration of the images was performed using a calibration slide with a step of 0.1mm per division.
SEM-EDS analyses were performed to validate the results by point analyses, X-ray and high-resolution quantitative maps of the selected area. The analyses were collected at University of Torino, using a SEM JEOL IT300LV, EDS Oxford Instruments Inca Energy 200, X-act SDD detector. Working conditions were E = 20 kV, I probe = 6 nA, EDS process time = 1105 counts/s, dwell time 10 µ s, 4 frames (X-ray maps), dwell time 1 ms, multispectral quantitative maps were processed by the Quantmap and Autophase map tool (Aztec Suite, v.3.3, Oxford Instrument, Abington, UK). A greyscale phase map was also acquired using the same analytical conditions as reported above and processed by the Feature tool (Aztec Suite, v. 3.3). For the analysis, a live script in Matlab environment (version R2020a, MathWorks, USA) has been developed. It combines the functions of some proprietary packages (ANN Tool) with original code written within our research group. The script is divided into four parts: (i) acquisition and balancing of images in reflected and transmitted light; (ii) data augmentation; (iii) spatial reduction and SOM segmentation; (iv) production of outputs and data extraction from segments.

White and Dark Calibration
For the white balance and the correction of the electronic noise of the CCD camera, two photos were taken: the first one was acquired with the shutter of the camera closed (dark), and the second one by placing a standard white (BaSO4 pellet) as a reference under the objective of the microscope. Subsequently, these images were used to correct all the acquired photos, keeping constant the shooting parameters and the microscope settings. For the correction of the micro-photos, we used the following Equation (1): where Icorr is the intensity of all the pixels of the corrected image, Ix,y is the intensity of each pixel of the original image, Blx,y is the intensity of each pixel in the dark image (for electronic noise), and Whx,y is the intensity of each pixel of the white reference image.

Color Spaces and Features Extraction
Images acquired in the RGB (Red, Green, and Blue) color space were subsequently transformed into the HSV (Hue, Saturation and Value) and L * a * b * (CIE 1976-luminance, and color opponent value a* and b*) color spaces and decomposed into individual grayscale images, resulting in a total of 9 images (3 for RGB, 3 for HSV and 3 for L* a* b*). For each image acquired as described, additional images of the entropy filter, standard deviation filter, and the range filter, respectively in Figure 2a-f, were added; the last step (i.e., the inclusion of filter-derived images) was pivotal to add further accurate information on the features of the original acquired photo. Moreover, a kernel-based filter, Kernfilt1( Figure 3a) and Kernfilt2 (Figure 3b), was further used to enhance the contrast at the edges of the grains ( Figure 3). The kernel filter is obtained from the convolution of a kernel of 3 × 3 pixels, whose central pixel alone has a gray value of 127.5, while all the contour pixels have 0 value. The kernel is convolved with each image pixel, increasing its contrast without saturating towards the values closest to white [56]. The filter obtained on the reflected light ( Figure 3a) and transmitted light ( Figure 3b) returns an image with grey shades that are substantially like the original one but with enhanced contrast (Figure 3).

Self-Organized Maps
Artificial neural networks are mathematical modeling of the behavior of biological neural networks [45][46][47][48][49][50][51][52][53][54]. These are fewer complex algorithms than biological functioning but are well suited to modeling and solving various problems related to computer vision, chemometry, engineering, etc. [50][51][52][53][54]. Several types of artificial neural networks exist and can be applied for different purposes. In the current work, the image segmentation on the micro-photos was carried out using Kohonen's Self-Organized Maps (SOM), an algorithm based on competitive learning [45][46][47]. The algorithm calculates the Euclidean distance between the target sample and all the weight vectors of the network. The neuron with the weight vector whose distance is closest to 0 is called the Best Matching Unit (BMU). The weights of the BMU and neurons close to it in the SOM lattice are updated and brought closer to the input vector. This updating process decreases with and as a function of the distance of the neurons from the BMU. It was originally developed to reduce the dimensionality of samples by grouping standard features into clusters and to produce a set of new features with a dimensional space (R) reduced to the number of neurons the operator decided to use based on his knowledge of the analyzed sample. In our case, the input space consisted of 25 two-dimensional images (R 25 ), while the output space was set to 4 (R 4 ) after several tests. The computational time for a single image processing is approximately 5′:35″ with a Ryzen 7 processor and 32 Gb RAM. The SOM segmentation output results in four binary images (0 = black and 1 = white), to which it is possible to apply morphological operators to determine the grain size distribution directly. Working on images where the components of the valuable minerals were already discriminated from the gangue allows a more accurate evaluation of the valuable mineral areas compared to the outputs obtained by working through the segmentation of a single image in which all the mineral components are mixed. A modal analysis was carried out for each segment based on morphological operators. After a few tests, several particulate area classes with a diameter equal to 100 were chosen by application of this analytical setting it was able to obtain eight parameters: (i) area; (ii) major axis; (iii) minor axis; (iv) eccentricity; (v) orientation; (vi) Euler number; (vii) equivalent diameter; (viii) perimeter.

The Pseudo-3D Surface
An opaque mineral will undoubtedly be black in transmitted light because there is no way for light to pass through it. In polarized transmitted light, on the other hand, even non-opaque minerals show a certain intensity of reflected light on their own, but also due to internal reflections caused by anisotropy. These internal reflection effects are not present in a few cases, and the non-opaque mineral or the porosity is black in the reflected light. To overcome this reading difficulty in reflected light images and optimize the segmentation, we have implemented a method capable of simultaneously mapping minerals that exclusively transmit light and those that reflect it on the same surface. Among these, some reflect and partially transmit light. The method we have identified involves the construction of a three-dimensional surface whose z-axis provides information on which are the minerals that entirely transmit light, those that transmit/reflect it partially, and those that reflect it. To obtain a pseudo-3D surface (P3DS), we have added in addition to the two-dimensional information (x, y) a different z-axis which is the Euclidean distance between the intensity in a grayscale of the image acquired by reflected light and the one in transmitted light (Figure 4). In this way, when the CCD captures the light coming exclusively from an opaque mineral, the distance between the focal plane of the sample and the CCD detector will be shorter. Hence, the resulting difference will be equal to the intensity of the reflected light, and vice versa; if the light comes entirely from a non-opaque mineral, a long-distance beyond the focal plane of the reflected light will result and the Euclidean distance will be equivalent to the value of the intensity of the transmitted light, in shades of gray ( Figure 5). Following the diagram in Figure 4, the z-axis was obtained from the following Formula (2): where d is the Euclidean distance between the value (in shades of gray) of the transmitted light and the reflected light, Tl is the transmitted light, and Rl is the reflected light. The obtained values were then multiplied by the image metric scale calibration factor and used to determine the z-axis of the reconstructed pseudo-3D surface. In this way, the Euclidean distance d (a.u.) is reported in millimeters (mm). Brighter pixels indicate opaque minerals, while less bright pixels indicate non-opaque or partially opaque minerals. Situations, where non-opaque minerals cover opaque minerals (they show a dimmed brightness) are noticeable.

Calibration Curve and Reflectivity
According to Craig et al. [19], the reflectivity (R%) is given by the ratio between the intensity of the reflected light at certain wavelength, multiplied by 100, and then divided by the intensity of the light incident on the sample (in our case, 100%) as in the following Equation (3).

R% = • 100
where IRl was the intensity of the reflected light, and IIl was the intensity of incident light. The optical microscope we used is not equipped with a device for directly measuring the reflectivity of opaque minerals; hence, considering all the problems relating to the optical path, it was necessary to use an alternative method to obtain reliable results. Since we used the integral intensity of the luminance (a.u.) to measure the intensity of reflectivity, we substitute it in Formula (3) to obtain the reflectance values of the minerals present in the thin section.
Building a calibration curve based on three reference materials with reflectivity values (R%) of 100, 50, and 0, we assumed that the integral intensity of luminance in the color space L* a * b * was directly correlated to R% ( Figure 6). The slope coefficients (0.0013) and the intercept (0.9514) of the calibration line were used to recalculate the R% value of each segment obtained from the SOM neural network. Finally, we compared the results with the original Craig et al. [19] Equation (3). We established the correlation between the R% value of analyzed minerals and their luminance (a.u.) integral intensity, and the correlation coefficient R 2 was equal to 1. Since the luminance value of an image is always affected by the individual luminance values within an image, we multiplied single pixels of each segment by its values of d and in our calibration curve before performing the calculations with the Craig et al. Equation (3), to mitigate this influence.
Given the generic equation of the line y = mx + q, we add a parameter k = d (Euclidean distance) which normalizes the luminance value to the only light reflected by the opaque minerals, discarding or attenuating the light transmitted by the semi-opaque or nonopaque minerals.

SEM Validation
SEM observation in backscattered electrons (SEM-BSE) on the area observed in optical microscopy, allowed the discrimination of goethite and magnetite minerals (bright grey in Figure 7a) and quartz and tourmaline (dark grey in Figure 7a). An autophase map was used to better discriminate the gangue phases by false color image (Figure 7b). From the Fe map in Figure 7c, it is possible to observe the texture of the magnetite which is replaced by goethite along fractures and grain boundaries. A series of measurement points were carried out in a selected area to define the chemical composition of the mineralogical phases identified (Figure 8 and Table 1).

Results and Discussion
The segmentation carried out with the SOM method allowed us to highlight the image's characteristics quickly and quantify their percentage relative to the total area of the image. Figure 9 displays a pseudo-color image of the segmentation obtained using the SOM neural network. Through this first step, it was possible to estimate the percentage of area occupied by each segment regarding the analyzed image total area. Green and brown segments (respectively segments 1 and 2, Figure 10) represent only a tiny area of the image (16% green and 19% brown), while blue and cyan segments (respectively segments 3 and 4 in Figure 10) represents most of the image area (32% cyan and 34% blue). Segment 1 (green) refers to the opaque minerals (magnetite and goethite) present in the section. Segment 2 (brown) shows quartz minerals. Segment 3 (blue) shows the occurrence of tourmaline minerals. Finally, segment 4 (cyan) refers to mixed phases. At the used magnification scale, the neural network has not been able to resolve the different mineral features present, whether they are opaque, semi-opaque, or non-opaque. This issue is also since the information derived from the images acquired with a CCD camera (at any color space considered) (i.e., RGB, HSV, L* a* b*) are mutually influenced, and the only truly decorrelated information corresponds to those related to the mineral contact edges and textures present. Using different color spaces allowed us to segment well the areas where an opaque mineral is present from those where the opaque mineral is intergrown with a nonopaque mineral and those where only a non-opaque mineral is present. Other types of information should be added further to distinguish the different minerals present within these areas (e.g., information on the reflectance/absorbance spectrum). Although this may seem a severe limitation of the current method, this is not the case, as, for most industrial applications to whom our work is addressed, preliminary investigations only need broad information on the degree of release of the mineral from its gangue. Image analyses at higher magnification can be carried out to overcome this issue if needed.
At the used magnification scale, the analytical method applied was successful in clearly discriminating massive opaque minerals (magnetite and goethite) from gangue (quartz and tourmaline); a small portion of the areas (segment 4, 32%) displays the occurrence of opaque minerals disseminated in quartz or tourmaline. The actual SOM segments are two-dimensional images that contain only logical values (0 and 1), which indicate the presence of a feature. Thus, starting from these images, it is possible to use image morphological operators to return information on the areas, diameters, perimeters, and axes of the minerals present in each segment. Once the number of classes of interest is established, an algorithm can extract these characteristics. For our purposes, we decided to report exclusively on the area of the size classes of minerals expressed in mm 2 . The histograms of the segmented areas in Figure 10 show how most of the mineral grains areas are between 0.1 and 0.2 mm 2 . Mineral grain sizes greater than 1.6 mm 2 are also present but occur with a mean lower frequency than the total mineral particulate <1.6 mm 2 . Segments 2 in Figure 10b, 3 in Figure 10c and 4 in Figure 10d refer to semi-opaque, non-opaque, or mixed occurrence of minerals. The SOM segmentation exclusively returns a reduction in the space of the incoming features, maintaining the same topologic information. From this, it is difficult to understand whether the segment we observe belongs to an opaque, semi-opaque, non-opaque mineral, or a mixture of these. The P3DS (Figure 11) highlights the roughness characteristics in a 3D space. This 3D map was effective in distinguishing between opaque and non-opaque mineral phases. Moreover, P3DS allows appreciating even the minor details, which are commonly undetected or misidentified in a traditional 2D micro-photo. For instance, the presence of nonopaque minerals in tiny areas or spots of 2D image could be detected, and the opaque minerals can be well distinguished from the gangue groundmass ( Figure 9). The P3DS represents an artificial construction that contains information about spatial topologies and the opaque/non-opaque nature of the mineral features represented. When observing the Euclidean distance (d) on the z-axis, it must be considered that the Z dimension is overestimated due to the different optical paths of the transmitted and reflected light. This overestimation is due to the thickness of the thin section slide. Opaque minerals will have greater distance (d > 0) values than semi-opaque and non-opaque minerals approaching d = 0. In the P3DS image of Figure 9, we observe a large portion of the two-dimensional space occupied by non-opaque minerals, representing our gangue (values of d ~0, in bluish color).
In contrast, the remaining portion of 2D space is occupied by opaque minerals (values of d~0.2, in ochre-yellowish color), which are the ores, and by opaque minerals intergrown with non-opaque gangue or a mixture of these two phases (values of d~0.1, in greenish color). The opaque minerals scattered in the gangue, are present as isolated spikes on the 3D surface or grouped in modest masses that emerge from the background and stand up in reliefs that gently fade towards the bottom gangue. If we look at the edge of an area of opaque minerals and compare it to areas with intermediate values of d (approximately between 0.1 and 0.15, in greenish color), we can observe that these are probably generated by opaque minerals finely intergrown with a non-opaque mineral. It is essential to highlight that this level is not clear in the SOM segmentation, but the modal estimation of the grain sizes is statistically representative of the sizes of the mineral present. The contact borders between the different mineral species appear slopes-like due to the edge effect that attenuates the reflectance in the transition between an opaque and a non-opaque mineral; the greater the difference in reflectance between the observed materials is, the more this effect is accentuated [59,60]. This effect is difficult to evaluate on a two-dimensional image, while it is clear and evident in 3D surface representation. Table 2 displays the values of reflectivity (R%) in air. The calculation of R% was obtained after correction with the Euclidean distance values (d) between the luminance of the micro-photo in RLM and TLM.
The results show that segment 1, referring to opaque minerals, has the highest R% value. Segment 3, which includes mixing situations between opaque, semi-opaque, and non-opaque minerals, has a slightly lower R% than segment 1. On the contrary, segments 2 and 3, referring to non-opaque minerals, show the lowest values of R%, very close to 0. This method allows the operator to bypass the particulate de-agglomeration procedure before carrying out the analysis, which would typically require a grinding step, X-ray powder diffraction, and SEM-EDS on particulate to discriminate and identify the relevant mineral phases from the gangue. Furthermore, considering the statistical data obtained from the segmentation, we can quickly understand that segment 3 must also be considered in calculating the area occupied by metal ores, even if intergrown with non-opaque gangue minerals. The values shown in Table 2 must be considered relatively as for two factors: (i) we are considering a case in which the incident light is not monochromatic; (ii) there are several attenuation factors of the light reflected from the sample that we are not considering within our method. Nevertheless, by building a set of reference standards using monochromatic light and building a calibration curve for the optical path from the lamp to the sample and from the sample to the detection system, these numbers can be reported to values closer to those of reference for opaque minerals [19]. The determination of the area and grain size of valuable minerals serves as a guide for the grinding processes of the bulk rock. Being aware that most of the valuable minerals fall within a specific size, we can address the choice of grinding the rock to that size, hence increasing the degree of liberation of the ores using quick and inexpensive analysis. In the three areas where opaque minerals trapped by gangue minerals occur, we observe that the size distribution falls mostly between 0.3 and 1.1 mm, with a slightly higher frequency between 0.3 and 0.4 mm. Hence, to obtain the maximum degree of liberation of the valuable minerals from the gangue, grinding the rock below 0.4 mm will be sufficient. The identification and quantification of mixed gangue phases, yet at first preliminary observation in thin section, can immediately help to identify a likely loss of economically exploitable minerals destined to accumulate within tailings and determine, in the first instance, optimization of the processing strategies that do not involve further treatment of the waste materials, with considerable economic advantages. Indeed, the methods of AM allow obtaining more precise analysis, providing the mineralogy and chemistry of the minerals present and the degree of liberation. However, these systems have very high analytical costs, which small companies can hardly afford. Additionally, in some cases, expensive AM methods might sometimes be unnecessary due to the low complexity of the deposit mineralogy.
Although information on the potential liberation of the ores is still essential. Hence, using RLM as a quick and cheap method might still represent a significant advantage to better address the processing route and benefit further industrial operation.

Conclusions and Recommendations
Thanks to the new and increasingly refined image analysis methods, optical microscopy is still a valid methodology for analyzing ore minerals. These methods allow, with good approximations, to model various fundamental parameters for Mineral Liberation Analysis (MLA), which is fundamental in mining and metallurgical applications. Using simple algorithms of Image Analyses and application of neural networks, we can approximate a calculation of the area occupied by valuable ore minerals in respect to gangue. We can establish the grain size distribution for opaque and non-opaque minerals, although some errors due to the automatic determination algorithm must be considered. These errors arise because the definition of the edge of the grains and their interior, being a heuristic process based on the operator's experience, can suffer from a certain degree of uncertainty. Without conducting preliminary grinding of the sample, we can determine directly from the thin section at which size we should grind the sample to obtain an optimal liberation of ore minerals.
We are aware that the resolution obtained by an optical microscope is very different from that possible with an SEM, which affects our measurement results. However, in this work, we have presented a fast and low-cost tool for a preliminary evaluation and immediate identification of some fundamental parameters to consider while studying ore minerals for mining industry applications.

Additional Comments
This work is a preliminary study that refers to the first three levels of the technology readiness level (TRL1-3) and constitutes an experimental proof of concept (TRL3) that requires further tests to improve and validate the methodology; laboratory tests (TRL4) and application to industry (TRL5) will be further planned and carried out. Additional considerations on the hardware and the algorithms used and tested can be made based on the results of the tests.
Future work would be to use higher-magnification objectives on a microscope capable of mapping areas to obtain more accurate results although the resolution of the optical microscope can never be smaller than the diffraction limit of light, even using adaptive lenses. Perhaps the future the development of new generation lenses made of metamaterials will allow us to go beyond this physical limit. For more precise and accurate results, we would like to be able to exploit higher-magnification objectives on a microscope capable of mapping areas.