Abstract:The red sandstone of Hongshanyao Hydraulic Project in Nanjing has characteristics of microdilatancy and is easy to be weathered and wetted. By using the advanced equipments such as SEM,X-radial diffraction instrument,rock mechanics testing machine of MTS81503 and so on,a lot of mesostructural pictures of red sandstone with different water contents are obtained;and the gray level thresholding is done with these images. The paper puts forward the digital image processing technique to deal with gray distribution pictures of red sandstone in different dynamic damage stages with different water contents. Further studies on the mesostructural changes of red sandstone in different damage states with different water injection times and crack propagation are discussed quantitatively. The aim of this paper is to bring forward a reliable research method to analyze and evaluate quantitatively the expansive deformation failure mechanism of expansive red sandstone with time. The research results have momentous reference value for foundation treatment design and construction of Hongshanyao Hydraulic Project in Nanjing.