A method for analyzing a sample region of a rock, the method comprising: accessing, by one or more processing devices, element maps (502, 503, 504) of an image of the sample region in a database, each element map comprising an array of pixels, and each pixel having a value that represents how closely the pixel correlates to a chemical element; accessing, by one or more processing devices, a database storing mineral specific threshold values for multiple chemical elements including the chemical element, each mineral specific threshold value being specific to a given chemical element; determining, by one or more processing devices, a presence of a mineral in a portion of the sample region corresponding to a given pixel of the element maps comprising determining whether a value of the given pixel in at least one of the element maps has a predetermined relationship with a mineral specific threshold value specific to a corresponding chemical element by: (i) selecting an element map of the image for a chemical element; (ii) comparing a value of the given pixel in the selected element map to the mineral specific threshold specific to the corresponding chemical element; and (iii) detecting the presence of a mineral by determining if the value of the given pixel has a predetermined relationship with the threshold; (iv) if the value of the pixel does not have the predetermined relationship with the first threshold, repeating steps (i), (ii), and (iii) with a further element map of the image for a different chemical element; labeling, by one or more processing devices, the pixel based on the presence of the mineral in the pixel to generate a mineral map; and outputting, by one or more processing devices, data representing the mineral map for rendering on a graphical interface. accessing, by one or more processing devices, element maps (502, 503, 504) of an image of the sample region in a database, each element map comprising an array of pixels, and each pixel having a value that represents how closely the pixel correlates to a chemical element; accessing, by one or more processing devices, a database storing mineral specific threshold values for multiple chemical elements including the chemical element, each mineral specific threshold value being specific to a given chemical element; determining, by one or more processing devices, a presence of a mineral in a portion of the sample region corresponding to a given pixel of the element maps comprising determining whether a value of the given pixel in at least one of the element maps has a predetermined relationship with a mineral specific threshold value specific to a corresponding chemical element by: (i) selecting an element map of the image for a chemical element; (ii) comparing a value of the given pixel in the selected element map to the mineral specific threshold specific to the corresponding chemical element; and (iii) detecting the presence of a mineral by determining if the value of the given pixel has a predetermined relationship with the threshold; (iv) if the value of the pixel does not have the predetermined relationship with the first threshold, repeating steps (i), (ii), and (iii) with a further element map of the image for a different chemical element; (i) selecting an element map of the image for a chemical element; (ii) comparing a value of the given pixel in the selected element map to the mineral specific threshold specific to the corresponding chemical element; and (iii) detecting the presence of a mineral by determining if the value of the given pixel has a predetermined relationship with the threshold; (iv) if the value of the pixel does not have the predetermined relationship with the first threshold, repeating steps (i), (ii), and (iii) with a further element map of the image for a different chemical element; labeling, by one or more processing devices, the pixel based on the presence of the mineral in the pixel to generate a mineral map; and outputting, by one or more processing devices, data representing the mineral map for rendering on a graphical interface.