Aiming to improving the manual inspection process of the elevator compensation chain, an automatic vision inspection system for detecting surface cracks of the welding joint is presented. To this end, firstly, an image acquisition system is designed to make the gray level of cracks obviously distinct from background in the captured image, which can effectively simplify the image segmentation algorithm. Then, on the basis of enhancement and de-noising of ROI image, the threshold segmentation and morphological features determination are employed to meet the demands of detection accuracy and time efficiency under the complex background and noise interference. Experimental results demonstrate that the system has good adaptability to various cracks and has achieved good performance in detection accuracy and time efficiency.