Cracking is one of the most common diseases that happen to the pavement and a field cracking survey and a forensic investigation are important work for preventive maintenance. In order to measure the pavement crackings automatically, this paper uses digital image processing techniques to process the pavement cracking images acquired by the digital camera and classify the pavement cracking types according to the topological properties to line crackings and alligator cracking, then classify the line crackings to longitudinal and transverse cracking according to the chain code of the cracking in the image. At the same time, the paper calculates the length and width of the line crackings and the area of the box rectangle of the alligator cracking. Finally, the paper calculates the Cracking Index (CI) of the pavement.