1. A method for determining mineral contents of samples using an electron microscope, said method comprising: directing an electron beam toward a surface of a first sample comprising an unknown composition of minerals; determining a first working distance, the first working distance being the distance between a backscattered electron detector of the electron microscope and the surface of the first sample, by determining a focal distance of the surface of the first sample using an auto-focus feature of the electron microscope; compensating for the difference between the first working distance and a predetermined working distance, the predetermined working distance being the working distance that provides desired grayscale values for detected backscattered electrons; and detecting backscattered electrons from the surface of the first sample.