Granite is generally composed of the minerals such as quartz, feldspar and mica. Distinguishing types and distributions of these meso-compositions are of significantly importance in analyzing the properties of granite in practice. In the current study, the Bayes rule was used to classify the compositions in granite images. The grayscale threshold based technique was used to initially distinguish the meso-compositions in the original image. Six parameters, including the average, variance, contrast, correlation, energy, homogeneity of grayscale values, were extracted from the granite images and selected as the variables characterized minerals in the classifier. A linear discrimination function is then obtained. The meso-compositions of the granite images from different sites were used for the purpose of validation. The image processing was coded into a program and can be automatically run. The result shows that the grayscale threshold based technique and Bayes classifier proposed herein may provide a lot of valuable information both in distinguishing the meso- compositions in rock materials and in analyzing those in the field of the civil engineering.