In the crack image threshold segmentation, an image crack gray value and abackground gray value need to be set. The portion larger than the threshold is a crack, while the portion smaller than the threshold is a background. So that the crack can be quickly and accurately divided.