针对国内某企业生产的125ml玻璃瓶装药酒内可见异物的检测要求,设计了一套基于机器视觉的高速检测系统,该系统包括机械传动子系统、多类型异物成像子系统、伺服控制子系统、图像识别与处理系统等。通过利用异物在图像中运动的连续性和噪声运动无序性等特点,提出了基于序列图像差分和阀值分割的检测算法,该方法首先采用Top-hat形态学滤波抑制图像噪声,通过三帧差分提取图像中的运动目标,然后提出改进二维最大熵阀值分割算法实现了目标的快速分割,最后根据异物运动的方向性确定是否存在异物并判断出产品质量。实验结果表明,研制的系统能够有效地检测出酒液中的异物,在检测精度、误漏检率等方面满足企业要求,已成功替代了原有的人工检测。
According to the demand of visible particle detection for a domestic 125ml glass bottle healthy wine, a high-speed detection system based on machine vision was designed, which consists of mechanical drive system, multi-type foreign substance image acquisition system, servo control system and other subsystems. Utilizing the movement continuity of the foreign matter in the image and noise movement randomness, a detection algorithm based on the sequence image difference and threshold value segmentation is proposed. Firstly, the Top-hat morphology filter is used to suppress the image noise and extracts the moving target in image through three frame difference. Secondly, an improved two-dimensional maximum entropy threshold value segmentation algorithm is proposed to realize the target division quickly. Finally, according to the movement directivity of the foreign matter, whether the foreign matter exists is determined and the production quality is judged. Experimental results indicate that the developed system can detect foreign substance in the wine liquor effectively and satisfy the requirements of the enterprise in the fields of detection accuracy, miss and false reject rates and so on.