Applying digital image processing technology to the extraction of mesostructural features from heterogeneous geomaterials is an effective approach for quantifying mesostructures. To improve the quality and efficiency of image processing, the classification method of the support vector machines (SVM) based on statistics theory was utilized in the threshold segmentation of digital image processing. First, a rectangular region of the original image was selected as the training sample image. The characteristics derived from this sample image and training targets constitute a training sample set. By learning the training sample set, the SVM classifier was produced next. The characteristic image then can be obtained using the SVM classifier. When employing this method to analyze a granitic rock image, the results show that the new method improves the precision as well as the efficiency of image processing. The new method obtains the best processing performance when reasonable training samples and SVM parameters are selected.