Abstract:Aimed at obtaining better image segmentation effect in visual inspection of blister drug packaging, so as to ensure the smooth follow-up tasks such as feature extraction and defect recognition, the traditional two-dimensional Otsu algorithm was improved and combined with the artificial fish swarm algorithm to propose a new blister medicine packaging image segmentation algorithm,with the calculation theory and simulation analysis conducted. The results showed that the algorithm performed better image segmentation effect, enhanced the two-dimensional threshold search speed and improved the efficiency of drug defect detection. The algorithm indicated the characteristics of fast running speed, good segmentation effect, accuracy and reliability, which could be applied to the detection of blister drug packaging defects and image segmentation.