Abstract:In order to meet the demand of rapid detection of microorganisms indicators for agricultural products in safety onsite monitoring, an automatic rapid detection system was developed based on computer vision and serial-communication technology. The realized functions of the proposed system included, automatic capture of the images, auto-focus of the system, analysis and processing of images, output the detection results, etc. The system adopted an auto-focus technology based on digital image processing. According to the characteristics of staining images of microorganisms in the agricultural products, rough focusing method combined with accurate focusing method were used to improve the auto-focus efficiency. The average auto-focus time of the system was 10.2s. By using this detection system, the close to real-time detection results could be obtained (detection time was less than 1h). Moreover, the system had advantages of easy operation and high automation.