The full surface detection of ceramic insulators on high-voltage lines is an important part of ensuring its quality. Due to the complexity of its surface, manual detection is the mainstream at present, and missed detection and false detection are inevitable. It is a trend in recent years to use automatic devices with machine vision to detect ceramic insulators. This paper identifies the main defects of insulators, bubbles and cracks, and preprocesses the pictures by improving KNN edge filtering. The weighted fitting method extracts bubble defects. Bubble ROI is used for positioning and extraction, threshold segmentation method, morphological crack processing and crack positioning, and finally through feature screening, this method can quickly and accurately identify the characteristics of ceramic surface defects, the recognition efficiency is within 200ms, and the recognition rate has reached 98.2%, meeting the precision requirements of the high-voltage line ceramic industry.