Abstract:In view of specific requirements of drug defect detection system and the difficulties of Canny operator in double threshold selection, improves the Canny operator. Applies Otsu algorithm to high and low thresholds selection, so the improved algorithm has the ability of adaptive threshold selection. The simulation result proves the validity and superiority of the algorithm.