摘要

In view of the low efficiency of manual detection, the slow change of gray scale on the surface of the blood warmer and the limitation of defect extraction, a method of testing the defect of the heater based on image processing was proposed. First of all, a visual detection platform was set up to make pretreatments such as graying and histogram equalization on the collected images. Secondly, the threshold segmentation algorithm was improved, the gray mapping transformation histogram was fitted and judgment conditions were introduced to automatically threshold segment the single-peak gray map directly, the double-peak and multi-peak gray maps were decomposed into multiple parts, and the optimal threshold T was obtained by iteration. Finally, morphology was used to extract the profile information and complete the defect classification. Experimental results show that this method can effectively distinguish defect types and improve the accuracy to 99.33%, which meets the actual detection requirements of enterprises.