Geotechnical engineering material is a kind of heterogeneous composite material. The stone, mineral, gravel, hole, and crack contained in it have different physical and mechanical properties, and their responses to external forces are very different. For example, stress distribution, crack propagation, and failure mode are closely related to material heterogeneity and microstructure. This paper presents a finite element model method for processing CT images of geotechnical materials by using digital image technology. This paper presents a finite element model method for processing CT images of geotechnical materials by using digital image technology. The theory of digital image processing is applied to geotechnical CT image processing to realize pseudo-color enhancement of CT image, and the histograms of different geotechnical CT numbers are obtained. Canny operator is used to detect the edge of geotechnical CT image, and the binary image of geotechnical microstructure is obtained. According to the color change of pseudo-color enhanced image and CT histogram, the meso-structure and variation of rock and soil can be quantitatively analyzed. The finite element model established by this method can fully consider the heterogeneity of geotechnical materials, especially the effect of void distribution on the mechanical properties of geotechnical materials.