1. A method for processing an image, said image representing a rock sample, wherein the method comprises: a) receiving said image; for each current threshold value in a plurality of threshold values: b) determining a threshold image, the threshold image having pixels associated with a first color value or a second color value, the determination of the threshold image being based on the received image and the current threshold; c) for each current connected set of pixels associated with the first color value in the threshold image, determining a connected size of said current connected set of pixels; d) determining at least one number of connected sets of pixels associated with the first color value for which the connected size is identical; e) creating a plurality of histograms based on the determined at least one number of connected sets of pixels associated with a color value for which the connected size is identical; f) creating a texture model from the plurality of histograms; and g) classifying the rock sample based on the texture model.