Building crack monitoring is of great value to the judgment of building safety. In this study, the digital image processing technology was studied and applied to the monitoring of building cracks. Crack images were collected by CCD camera, and then operations such as graying, correction, denoising and segmentation were carried out to obtain clear crack images. The obtained images were processed morphologically to further improve the quality. Finally, the width and length of cracks were calculated. In the case analysis, the results of 15 cracks measured by a microscope were taken as the standards and compared with the calculated results. The results showed that the results calculated in this study and the manual measurement results differed little, and the average errors of the width and length were 0.021 mm and 0.024 mm respectively, which suggested that the method proposed had a high reliability. The findings of this study provide a new idea for the further development of the building crack monitoring field and is conducive to the accurate assessment of building safety.