CN108896574A - A kind of bottled liquor method for detecting impurities and system based on machine vision - Google Patents
A kind of bottled liquor method for detecting impurities and system based on machine vision Download PDFInfo
- Publication number
- CN108896574A CN108896574A CN201810451360.1A CN201810451360A CN108896574A CN 108896574 A CN108896574 A CN 108896574A CN 201810451360 A CN201810451360 A CN 201810451360A CN 108896574 A CN108896574 A CN 108896574A
- Authority
- CN
- China
- Prior art keywords
- image
- bottled liquor
- moving target
- bottled
- machine vision
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N21/00—Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
- G01N21/84—Systems specially adapted for particular applications
- G01N21/88—Investigating the presence of flaws or contamination
- G01N21/90—Investigating the presence of flaws or contamination in a container or its contents
- G01N21/9018—Dirt detection in containers
- G01N21/9027—Dirt detection in containers in containers after filling
Landscapes
- Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Biochemistry (AREA)
- General Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Image Processing (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
本发明公开了一种基于机器视觉的瓶装白酒杂质检测方法及系统,首先采用翻转方式使酒液运动,并采集酒液运动的连续图像,再通过改进的二次差分算法,分离出运动目标,最后根据运动目标轮廓属性,判断出瓶装白酒是否含有杂质,这种检测方式不仅可以避免产生大量的气泡,降低气泡所带来的干扰影响,而且解决了背景以及瓶身带来的干扰影响;因此可以实现对瓶装白酒杂质的高精度检测。
The invention discloses a method and system for detecting impurities in bottled liquor based on machine vision. Firstly, the wine liquid is moved in a flipping manner, and continuous images of the wine liquid movement are collected, and then the moving target is separated through an improved secondary difference algorithm. Finally, according to the contour properties of the moving target, it is judged whether the bottled liquor contains impurities. This detection method can not only avoid the generation of a large number of bubbles, reduce the interference caused by the bubbles, but also solve the interference caused by the background and the bottle body; therefore High-precision detection of impurities in bottled liquor can be realized.
Description
技术领域technical field
本发明属于白酒检测技术领域,涉及一种基于机器视觉的瓶装白酒杂质检测方法及系统。The invention belongs to the technical field of liquor detection, and relates to a method and system for detecting impurities in bottled liquor based on machine vision.
背景技术Background technique
在瓶装酒的生成过程中,由于生成工艺、封装技术等原因,酒液中可能出现一些杂质。目前常用的液体杂质检测方法包括人工灯检法、半自动灯检法、激光射线检测法、光-电(阻)检测法、机器视觉检测方法等;机器视觉检测方法,鉴于其操作简单、检测精度高等优点,被广泛应用于饮料酒和医药行业的诸如啤酒检测、口服液检测等。During the production of bottled wine, due to the production process, packaging technology and other reasons, some impurities may appear in the wine liquid. At present, the commonly used liquid impurity detection methods include artificial light detection method, semi-automatic light detection method, laser ray detection method, photoelectric (resistance) detection method, machine vision detection method, etc.; machine vision detection method, in view of its simple operation and detection accuracy With high advantages, it is widely used in beverage wine and pharmaceutical industries such as beer detection, oral liquid detection, etc.
机器视觉检测方法是视觉传感、数字图像处理、模式识别与人工只能技术相结合的非接触检测方法,其原理为:首先是通过摄像机获取旋转的运动图像,然后由计算机视觉系统对采集的运动图像进行处理【包括采用滤波方法(如中值或均值滤波)对图像进行滤波处理和采用边缘检测方法提取所需要的部分】,最后对计算机视觉系统处理的被测图像进行嗯,从而得到所需的检测信息(如合格或不合格)。目前基于机器视觉检测的检测设备厂家主要有德国Seidenada、Miho、Heuft,意大利Brevetti、GF、CMP,日本Esia、东芝等。具体而言,基于机器视觉的杂质检测设备又可分为间歇式视觉监测、跟踪式视觉监测和相机固定方式的杂质检测。间歇式视觉检测是指设备间歇式运转,即检测主轮盘采用“走-停-走-停”的循环运转方式,被检测产品经过高速旋转工位后进入拍照点,停顿n毫秒等相机获取序列图像后再继续运转,该类型代表设备有意大利Brevetti的小容量药品检查机、意大利CMP灯检机等,主要检测装量在1~20mL之间,速度一般为150~300瓶/分钟,该类机型具有获取的图像稳定、机械装置相对简单的优点,但同时检测速度较慢,对大容量产品检测较易发生误判或漏检。跟踪式视觉检测设备是指检测轮盘匀速运转,而成像装置对被检产品进行跟踪拍照,获取序列图像,然后快速返回后跟踪拍摄下一批次被检测产品。该类检测系统的主要特点是检测主轮盘连续运转,通过相机同角速度运转或者采用反光镜的运转,使产品图像在序列图像中相对静止,而杂质却有相对位移,由此判断出正次品。该类型设备主要有Filtec、Miho、Seidenada、Brevett、Pharmamech、Bosch等,国内外大部分厂商采用跟踪式视觉检测,由于采用跟踪拍摄,检测速度比间歇式更快,一般在200-600瓶/分钟,检测装量在1~500毫升范围内。跟踪方式的优点是速度快,进出瓶爆瓶率低,但其机械装置更复杂且跟踪拍照需要精准稳定。相机固定方式的杂质检测采用摄像机固定,被检测产品经过时拍摄少量照片与存储在程序中的标准照片进行比较,从而判断被检测产品中是否含有明显异物,这种方式速度最快,能完全满足高速自动化生产线上在线检测的要求,但由于采用和标准照片对比的算法思路,因此检测精度不高,只能识别溶液中的明显异物。The machine vision detection method is a non-contact detection method that combines visual sensing, digital image processing, pattern recognition and artificial intelligence technology. The moving image is processed [including filtering the image by filtering method (such as median or mean value filter) and extracting the required part by edge detection method]. Finally, the measured image processed by the computer vision system is processed, so as to obtain the Required test information (e.g. Pass or Fail). At present, the inspection equipment manufacturers based on machine vision inspection mainly include Germany Seidenada, Miho, Heuft, Italy Brevetti, GF, CMP, Japan Esia, Toshiba, etc. Specifically, impurity detection equipment based on machine vision can be divided into intermittent visual monitoring, tracking visual monitoring and impurity detection with fixed cameras. Intermittent visual inspection refers to the intermittent operation of the equipment, that is, the main wheel of the inspection adopts the "go-stop-go-stop" cycle operation mode, and the inspected product enters the camera point after passing through the high-speed rotating station, and the camera pauses for n milliseconds to obtain Continue to run after the sequence of images. This type of representative equipment includes Italian Brevetti small-capacity drug inspection machine, Italian CMP light inspection machine, etc. The main inspection volume is between 1-20mL, and the speed is generally 150-300 bottles/min. Similar models have the advantages of stable image acquisition and relatively simple mechanical devices, but at the same time, the detection speed is slow, and it is easy to cause misjudgment or missed detection for large-capacity product detection. Tracking visual inspection equipment means that the inspection wheel runs at a constant speed, and the imaging device tracks and takes pictures of the inspected products, acquires a sequence of images, and then returns quickly to track and take pictures of the next batch of inspected products. The main feature of this type of detection system is to detect the continuous operation of the main wheel. Through the operation of the camera at the same angular speed or the operation of the mirror, the product image is relatively static in the sequence image, but the impurities have relative displacement, thus judging the positive and negative Taste. This type of equipment mainly includes Filtec, Miho, Seidenada, Brevett, Pharmamech, Bosch, etc. Most manufacturers at home and abroad use tracking visual inspection. Due to the use of tracking shooting, the detection speed is faster than intermittent, generally at 200-600 bottles/minute , The detection capacity is in the range of 1 to 500 ml. The advantage of the tracking method is that it is fast, and the bottle burst rate is low, but its mechanical device is more complicated and the tracking camera needs to be accurate and stable. The impurity detection of the fixed camera method uses a fixed camera. When the tested product passes by, take a small amount of photos and compare them with the standard photos stored in the program, so as to judge whether there are obvious foreign objects in the tested product. This method is the fastest and can fully meet the requirements. On-line inspection requirements on high-speed automated production lines, but due to the algorithmic idea of comparing with standard photos, the detection accuracy is not high, and only obvious foreign objects in the solution can be identified.
此外,对于口服液、注射液药物等透明液体杂质,基于机器视觉的杂质检测方法主要采用旋转急停的方法,利用摄像机获取连续帧图像,然后对图像进行处理找到运动目标,最后利用支持向量机或者其他跟踪算法(例如meanshift算法)来进行异物识别,完成杂质的检测。然而,这种基于机器视觉的杂质检测方法主要是针对啤酒、保健酒、口服液等有色液体的检测,还没有专门针对瓶装白酒杂质的检测;特别是基于旋转急停方式,易在旋转急停过程中会产生大量气泡,严重影响白酒中杂质检测精度。In addition, for transparent liquid impurities such as oral liquids and injections, the impurity detection method based on machine vision mainly adopts the method of rotating emergency stop, using the camera to obtain continuous frame images, then processing the images to find moving targets, and finally using support vector machines Or other tracking algorithms (such as meanshift algorithm) to identify foreign matter and complete the detection of impurities. However, this impurity detection method based on machine vision is mainly aimed at the detection of colored liquids such as beer, health wine, oral liquid, etc., and has not yet specifically targeted at the detection of impurities in bottled liquor; especially based on the rotating emergency stop method, it is easy to A large number of bubbles will be generated during the process, which seriously affects the detection accuracy of impurities in liquor.
因此,现有基于机器视觉的液体杂质检测方法还不够完善,不能满足白酒行业杂质检测的需求。Therefore, the existing liquid impurity detection method based on machine vision is not perfect enough to meet the needs of the liquor industry for impurity detection.
发明内容Contents of the invention
本发明的目的旨在提供一种基于机器视觉的瓶装白酒杂质检测方法,实现对瓶装白酒中杂质的准确检测。The object of the present invention is to provide a method for detecting impurities in bottled liquor based on machine vision, so as to realize accurate detection of impurities in bottled liquor.
本发明另一目的旨在提供一种基于机器视觉的瓶装白酒杂质检测系统。Another object of the present invention is to provide a system for detecting impurities in bottled liquor based on machine vision.
针对瓶装白酒、特别是圆形的透明瓶装白酒,本发明提供了一种基于机器视觉的瓶装白酒杂质检测方法,首先获取连续多帧图像,然后对多帧图像进行处理得到含有运动目标的图像,再根据运动目标轮廓形态完成对瓶装白酒杂质的检测。本发明进一步运用一种改进的二次差分算法,利用序列图像在时间和空间上的连续性,实现从大量干扰背景下分割出细小目标的问题。Aiming at bottled liquor, especially round transparent bottled liquor, the present invention provides a method for detecting impurities in bottled liquor based on machine vision. First, continuous multi-frame images are obtained, and then multi-frame images are processed to obtain images containing moving objects. Then complete the detection of impurities in bottled liquor according to the contour shape of the moving target. The present invention further uses an improved quadratic difference algorithm to realize the problem of segmenting small targets from a large number of interference backgrounds by utilizing the continuity of sequence images in time and space.
本发明提供的基于机器视觉的瓶装白酒杂质检测方法,包括以下步骤:The bottled liquor impurity detection method based on machine vision provided by the invention comprises the following steps:
(1)将瓶装白酒翻转180°;(1) Turn over the bottled liquor 180°;
(2)对翻转后的瓶装白酒采集视频;(2) video collection of bottled liquor after flipping;
(3)从视频的连续帧图像中提取N帧图像,每一帧图像与上一帧图像或下一帧图像之间间隔M帧图像,其中N为正奇数,M为大于等于0的整数;(3) Extract N frames of images from the continuous frame images of the video, M frames of images are separated between each frame of images and the previous frame of images or the next frame of images, wherein N is a positive odd number, and M is an integer greater than or equal to 0;
(4)对提取的N帧图像进行预处理,去除图像噪声;(4) Preprocessing the extracted N frames of images to remove image noise;
(5)采用二次差分算法对预处理得到的图像进行分析,提取出含有运动目标的图像;(5) Using the quadratic difference algorithm to analyze the preprocessed image, and extract the image containing the moving target;
(6)提取运动目标的轮廓,并计算轮廓长轴与短轴的比值;(6) Extract the contour of the moving target, and calculate the ratio of the contour major axis to the minor axis;
(7)将得到的轮廓长短轴比值与设定的阈值相比较,若轮廓长短轴比值属于1.0~1.1,运动目标为气泡;若轮廓长短轴比值大于1.4,运动目标为杂质。(7) Comparing the obtained contour long-short axis ratio with the set threshold, if the contour long-short axis ratio is 1.0-1.1, the moving target is a bubble; if the contour long-short axis ratio is greater than 1.4, the moving target is an impurity.
上述基于机器视觉的瓶装白酒杂质检测方法,为了减少由于液体运动而产生的大量气泡,本发明采用翻转180°的方式使酒液运动起来。相对于通常采用的旋转急停方式,该方法能够实现瓶中液体以及可能存在的杂质发生运动的同时减少气泡的产生。尤其当采用倒置翻转180°(即先将瓶身倒置,瓶口超下,然后再将瓶身翻转180°)时,可以使杂质位于瓶颈附近,翻转可以使杂质尽量在中轴线附近,从而降低由于杂质贴近瓶壁而发生漏检的情况。In the method for detecting impurities in bottled liquor based on machine vision, in order to reduce a large number of air bubbles caused by the movement of the liquid, the present invention adopts a method of turning over 180° to make the liquor move. Compared with the commonly used rotary emergency stop method, this method can realize the movement of the liquid in the bottle and possible impurities while reducing the generation of air bubbles. Especially when using an inverted 180° (that is, first turn the bottle body upside down, the bottle mouth is super-lower, and then turn the bottle body 180°), the impurities can be located near the bottleneck, and the inversion can make the impurities near the central axis as much as possible, thereby reducing Missing detection occurs due to impurities close to the bottle wall.
上述基于机器视觉的瓶装白酒杂质检测方法,且经反复实验给出,检测所用的光源和照明方式与杂质种类相关,从瓶装白酒正面采集视频,当检测的杂质为白色时,对瓶装白酒采用暗背景、底部给光的照明方式;当检测的杂质为黑色时,采用背部给光的照明方式;这样可以有利于获取高质量视频图像。对于圆形酒瓶,易产生光的反射和折射效应,从而在酒瓶壁周围产生大量的干扰;为了防止由于圆形酒瓶的这种物理特性产生的干扰,在进入酒瓶的光源前面设置一层滤光纸,从而减少光对成像的干扰。The above-mentioned detection method of impurities in bottled liquor based on machine vision has been obtained through repeated experiments. The light source and lighting method used for detection are related to the type of impurities. Videos are collected from the front of bottled liquor. When the detected impurities are white, dark The lighting method of background and bottom lighting; when the detected impurities are black, the lighting method of back lighting is used; this is conducive to obtaining high-quality video images. For round wine bottles, it is easy to produce light reflection and refraction effects, resulting in a lot of interference around the bottle wall; in order to prevent interference due to the physical characteristics of round wine bottles, set A layer of filter paper to reduce the interference of light on imaging.
上述基于机器视觉的瓶装白酒杂质检测方法,为了确保图像处理效果,提高瓶装白酒杂质检测准确度,所述视频中包含至少三帧的连续帧图像。In the method for detecting impurities in bottled liquor based on machine vision, in order to ensure the effect of image processing and improve the detection accuracy of impurities in bottled liquor, the video contains at least three consecutive frame images.
上述基于机器视觉的瓶装白酒杂质检测方法,在确保瓶装白酒杂质检测准确度的同时,提高检测效率,所述N为3或5,所述M的取值为:2≤M≤5。The above method for detecting impurities in bottled liquor based on machine vision improves detection efficiency while ensuring the detection accuracy of impurities in bottled liquor. The N is 3 or 5, and the value of M is: 2≤M≤5.
上述基于机器视觉的瓶装白酒杂质检测方法,为了消除背景干扰,去除图像噪声,对提取的N帧图像进行预处理,去除图像噪声,包括以下分步骤:The above method for detecting impurities in bottled liquor based on machine vision, in order to eliminate background interference and remove image noise, preprocess the extracted N frames of images to remove image noise, including the following sub-steps:
(41)对提起的N帧图像进行Gamma校正,并将Gamma校正后的图像转化为灰度图像;(41) Carry out Gamma correction to the proposed N frame image, and convert the image after Gamma correction into a grayscale image;
(42)采用加权均值滤波算法对步骤(41)得到的灰度图像进行处理,滤除图像噪声。(42) Process the grayscale image obtained in step (41) by using a weighted mean filtering algorithm to filter out image noise.
上述步骤(41),对提取的N帧图像进行Gamma校正,以调整亮暗区域的对比度(例如降低高亮区域的对比度),从而更加有效减少由于光的反射和折射效应产生的干扰。可以采用本领域已经披露的常规Gamma校正方法。再将Gamma校正后的图像转化为灰度图像。In the above step (41), Gamma correction is performed on the extracted N frames of images to adjust the contrast of bright and dark areas (for example, reduce the contrast of highlighted areas), so as to more effectively reduce the interference caused by light reflection and refraction effects. Conventional Gamma correction methods already disclosed in the art can be used. Then convert the Gamma-corrected image into a grayscale image.
上述步骤(42)的目的是去除图像噪声,可以采用本领域已经披露的常规滤波算法对图像进行滤波处理去除噪声,本发明采用的是基于中值的加权均值滤波算法(李秀峰,苏兰海,荣慧芳,陈华.改进均值滤波算法及应用研究[J].微计算机信息,2008(01):235-236+202.)对得到的灰度图像进行滤波处理,在去除图像噪声的同时保留检测目标,从而使得检测的结果更加准确。上述基于机器视觉的瓶装白酒杂质检测方法,本发明采用二次差分算法对步骤(4)预处理后的图像进行处理,包括以下分步骤:The purpose of above-mentioned step (42) is to remove image noise, can adopt conventional filter algorithm disclosed in the art to carry out filtering process to image and remove noise, what the present invention adopts is based on the weighted mean filter algorithm of median value (Li Xiufeng, Su Lanhai, Rong Hui Fang, Chen Hua. Research on Improved Mean Filtering Algorithm and Its Application[J]. Microcomputer Information, 2008(01): 235-236+202.) Filtering the obtained grayscale image, retaining while removing image noise Detect the target, so that the detection result is more accurate. Above-mentioned bottled liquor impurity detection method based on machine vision, the present invention adopts quadratic difference algorithm to process the image after step (4) pretreatment, comprises the following sub-steps:
(51)将N帧图像中,相邻两帧图像进行差分运算得到(N-1)幅差分图像;(51) In the N frame of images, two adjacent frames of images are differentially calculated to obtain (N-1) differential images;
(52)将(N-1)幅差分图像中,每两个相邻两幅差分图像分为一组,每组中的两幅差分图像分别进行差分运算和能量积累运算得到相关联的二次差分图像和能量积累图像;(52) In the (N-1) difference images, every two adjacent difference images are divided into one group, and the two difference images in each group are respectively subjected to difference operation and energy accumulation operation to obtain the associated secondary Difference image and energy accumulation image;
(53)将得到的能量积累图像与之相关联的二次差分图像相减即得到含有运动目标的图像。(53) Subtract the obtained energy accumulation image from its associated quadratic difference image to obtain an image containing a moving target.
通过采用二次差分算法,可以分离出瓶中的运动目标,解决了背景及瓶身等静态物体图像带来的干扰。By adopting the quadratic difference algorithm, the moving target in the bottle can be separated, and the interference caused by the static object images such as the background and the bottle body can be solved.
上述基于机器视觉的瓶装白酒杂质检测方法,步骤(5)中,对提取的含有运动目标的图像采用Otsu’s最大类间方差法进行二值化阈值处理,以有效的分离背景图像,尽可能消除背景干扰;并运用形态学开运算2×2去除图像中小于4个像素的亮点。In the above method for detecting impurities in bottled liquor based on machine vision, in step (5), the extracted images containing moving objects are subjected to binarization threshold processing using Otsu's maximum inter-class variance method to effectively separate the background image and eliminate the background as much as possible interference; and use the morphological opening operation 2×2 to remove the bright spots less than 4 pixels in the image.
上述基于机器视觉的瓶装白酒杂质检测方法,运动目标轮廓长轴与短轴分别是指运动目标轮廓外接矩形的长与宽。In the above-mentioned method for detecting impurities in bottled liquor based on machine vision, the long axis and short axis of the contour of the moving target refer to the length and width of the rectangle circumscribing the contour of the moving target respectively.
上述基于机器视觉的瓶装白酒杂质检测方法,为了能够区分杂质与气泡,根据杂质与气泡的形状特点进行分类,当运动目标轮廓长短轴比值属于1.0~1.1时,运动目标确定为气泡;当运动目标轮廓长轴与短轴比值在大于1.1且小于等于1.4之间时,可能是气泡也可能是杂质,因此为了提高对杂质检测的准确度,将轮廓长短轴比值大于1.4的运动目标确定为杂质。The above method for detecting impurities in bottled liquor based on machine vision, in order to be able to distinguish impurities and air bubbles, classifies impurities and air bubbles according to their shape characteristics. When the ratio of the long and short axes of the contour of the moving target is 1.0 to 1.1, the moving target is determined to be a bubble; when the moving target When the ratio of the major axis to the minor axis of the contour is greater than 1.1 and less than or equal to 1.4, it may be a bubble or an impurity. Therefore, in order to improve the accuracy of impurity detection, the moving target with a contour major axis ratio greater than 1.4 is determined as an impurity.
当基于运动目标轮廓无法实现杂质还是气泡的区分时,可以重复上述步骤(1)~(7),进行重新检测。When the distinction between impurities and air bubbles cannot be realized based on the contour of the moving target, the above steps (1) to (7) can be repeated for re-detection.
本发明进一步提供了一种基于机器视觉的瓶装白酒杂质检测系统,包括:The present invention further provides a machine vision-based impurity detection system for bottled liquor, comprising:
图像采集装置,用于对翻转180°的瓶装白酒采集视频;The image acquisition device is used to collect video of bottled liquor turned over 180°;
图像处理装置,用于对图像采集装置采集的视频进行处理,完成对瓶装白酒杂质的检测;所述图像处理装置包括:The image processing device is used to process the video collected by the image acquisition device to complete the detection of impurities in bottled liquor; the image processing device includes:
帧图像提取单元,从视频的连续帧图像中提取N帧图像,每一帧图像与上一帧图像或下一帧图像之间间隔M帧图像,其中N为正奇数,M为大于等于0的正整数;The frame image extraction unit extracts N frames of images from the continuous frame images of the video, and there are M frames of images between each frame image and the previous frame image or the next frame image, wherein N is a positive odd number, and M is greater than or equal to 0 positive integer;
图像预处理单元,对提取的N帧图像进行预处理,去除图像噪声;An image preprocessing unit is used to preprocess the extracted N frames of images to remove image noise;
运动目标图像提取单元,采用二次差分算法对预处理得到的图像进行处理,提取出含有运动目标的图像;The moving target image extraction unit processes the pre-processed image by using the quadratic difference algorithm to extract the image containing the moving target;
轮廓提取及长短轴比值计算单元,提取运动目标的轮廓,并计算轮廓长轴与短轴的比值;The contour extraction and long-short axis ratio calculation unit extracts the contour of the moving target and calculates the ratio of the long axis to the short axis of the contour;
判定单元,将得到的轮廓长短轴比值与设定的阈值相比较,若轮廓长短轴比值属于1.0~1.1,运动目标为气泡;若轮廓长短轴比值大于1.4,运动目标为杂质。The judging unit compares the obtained contour long-short axis ratio with the set threshold, if the contour long-short axis ratio is 1.0-1.1, the moving target is a bubble; if the contour long-short axis ratio is greater than 1.4, the moving target is an impurity.
上述基于机器视觉的瓶装白酒杂质检测系统,该检测系统设置有黑杂质检测工位和/或白杂质检测工位,黑杂质检测工位和/或白杂质检测工位配置一个图像采集装置;对于黑色检测工位,图像采集装置的图像采集窗口对准翻转180°的瓶装白酒,同时利用光源从瓶装白酒背部给光;对于白色检测工位,图像采集装置的图像采集窗口对准翻转180°的瓶装白酒,同时利用光源从瓶装白酒底部给光,且瓶装白酒背部采用暗背景。由于黑色杂质更容易检测且检测精度较高,先对黑色杂质进行检测,再对白色杂质进行检测,可以在提高检测效率的同时进一步提高检测精度。因此,当设定黑色杂质检测工位和白色检测工位时,先将瓶装白酒进入黑色检测工位进行检测,如果含有黑色杂质,直接将瓶装白酒筛选出,不需要进入下一个白色杂质检测工位;如果没有黑色杂质,进入白色杂质检测工位,判断是否含有白色杂质。In the above-mentioned bottled liquor impurity detection system based on machine vision, the detection system is provided with a black impurity detection station and/or a white impurity detection station, and an image acquisition device is configured at the black impurity detection station and/or white impurity detection station; For the black detection station, the image acquisition window of the image acquisition device is aimed at the bottled liquor turned over 180°, and at the same time, the light source is used to give light from the back of the bottled liquor; Bottled liquor, at the same time, use the light source to give light from the bottom of the bottled liquor, and use a dark background on the back of the bottled liquor. Since the black impurities are easier to detect and the detection accuracy is higher, the black impurities are detected first, and then the white impurities are detected, which can further improve the detection accuracy while improving the detection efficiency. Therefore, when setting the black impurity detection station and the white detection station, first put the bottled liquor into the black detection station for detection, if it contains black impurities, the bottled liquor will be screened out directly, without entering the next white impurity detection station If there is no black impurity, enter the white impurity detection station to judge whether it contains white impurities.
与现有技术相比,本发明具有以下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
(1)本发明首先采用翻转方式使酒液运动,并采集酒液运动的连续图像,再通过改进的二次差分算法,分离出运动目标,最后根据运动目标轮廓属性,判断出瓶装白酒是否含有杂质,这种检测方式不仅可以避免产生大量的气泡,降低气泡所带来的干扰影响,而且解决了背景以及瓶身带来的干扰影响;因此可以实现对瓶装白酒杂质的高精度检测;(1) The present invention first adopts the overturning method to make the wine liquid move, and collects the continuous images of the wine liquid motion, then separates the moving target through the improved secondary difference algorithm, and finally judges whether the bottled liquor contains Impurities, this detection method can not only avoid a large number of bubbles and reduce the interference caused by the bubbles, but also solve the interference caused by the background and the bottle; therefore, it can achieve high-precision detection of impurities in bottled liquor;
(2)本发明将瓶装白酒在翻转前处于倒置状态,从而使杂质位于瓶颈附近,翻转之后杂质尽量在中轴线附近,进一步减少因杂质贴近瓶壁而发生漏检的情况;(2) The present invention puts the bottled liquor in an upside-down state before turning over, so that the impurities are located near the bottleneck, and after turning over, the impurities are as close to the central axis as possible, further reducing the situation of missed detection due to the impurities being close to the bottle wall;
(3)本发明可以分别实现对瓶装白酒中黑白两类杂质的检测,在确保杂质检测精度的同时提高检测效率;(3) The present invention can respectively realize the detection of black and white impurities in bottled liquor, and improve the detection efficiency while ensuring the detection accuracy of impurities;
(4)本发明在对采集的瓶装白酒酒液连续图像进行数据处理,提取运动目标过程中,通过在光源后方设置滤光纸以及后期的Gamma校正,可以有效减少由于光原引起的光反射和折射干扰;(4) The present invention is carrying out data processing to the continuous image of bottled white wine liquor collected, and in the process of extracting the moving target, by setting the filter paper behind the light source and the Gamma correction in the later stage, the light reflection and light caused by the light source can be effectively reduced refraction interference;
(5)本发明进一步采用Otsu’s最大类间方差法对提取的含有运动目标的图像进行阈值化处理,可以有效分离出背景,进一步降低背景的干扰;(5) The present invention further adopts Otsu's maximum inter-class variance method to carry out threshold value processing to the extracted image containing the moving target, which can effectively separate the background and further reduce the interference of the background;
(6)本发明可以依托现有设备来实现,操作简单、高效,适于在液体杂质、特别是瓶装白酒杂质检测领域内进行推广使用。(6) The present invention can be realized by relying on existing equipment, is simple and efficient in operation, and is suitable for popularization and use in the field of detection of liquid impurities, especially bottled liquor impurities.
附图说明Description of drawings
图1为本发明实施例1基于机器视觉的瓶装白酒白色杂质检测流程示意图。Fig. 1 is a schematic flow chart of machine vision-based detection of white impurities in bottled liquor according to Embodiment 1 of the present invention.
图2为本发明基于机器视觉的瓶装白酒杂质检测示意图;其中(a)瓶装白酒倒置翻转示意图,(b)瓶装白酒白色杂质检测示意图,(c)瓶装白酒黑色杂质检测示意图;图中,1-摄像机,2-瓶装白酒,3-红色滤光纸,4-LED光源,5-黑色遮光板。Fig. 2 is a schematic diagram of detection of impurities in bottled liquor based on machine vision in the present invention; wherein (a) a schematic diagram of bottled liquor upside down, (b) a schematic diagram of detection of white impurities in bottled liquor, (c) a schematic diagram of detection of black impurities in bottled liquor; among the figures, 1- Video camera, 2-bottled white wine, 3-red filter paper, 4-LED light source, 5-black shading plate.
图3为本发明实施例1中采用二次差分算法提取运动目标的流程示意图。FIG. 3 is a schematic flow chart of extracting a moving target using a quadratic difference algorithm in Embodiment 1 of the present invention.
图4为本发明基于机器视觉的瓶装白酒杂质检测效果示意图;其中(a)、(e)、(i)和(i1)分别对应瓶装白酒中纤维杂质的采集图像、二次差分处理图像、运动目标轮廓和运动目标轮廓放大图,(b)、(f)、(j)和(j1)分别对应瓶装白酒中黑渣杂质的采集图像、二次差分处理图像、运动目标轮廓和运动目标轮廓放大图,(c)、(g)、(k)和(k1)分别对应瓶装白酒中玻璃碎屑的采集图像、二次差分处理图像、运动目标轮廓和运动目标轮廓放大图,(d)、(h)、(l)和(l1)分别对应瓶装白酒中白色絮状物杂质的采集图像、二次差分处理图像、运动目标轮廓和运动目标轮廓放大图。Fig. 4 is a schematic diagram of the detection effect of bottled liquor impurities based on machine vision in the present invention; wherein (a), (e), (i) and (i1) respectively correspond to the collection image, secondary difference processing image, and motion of fiber impurities in bottled liquor Enlarged image of target outline and moving target outline, (b), (f), (j) and (j1) correspond to the collected image, secondary difference processing image, moving target outline and moving target outline enlargement of black slag impurities in bottled liquor, respectively Figures, (c), (g), (k) and (k1) respectively correspond to the collected image of glass debris in bottled liquor, the second difference processing image, the outline of the moving target and the enlarged image of the moving target outline, (d), ( h), (l) and (l1) respectively correspond to the collected image of the white floc impurity in bottled liquor, the image processed by the second difference, the contour of the moving target and the enlarged image of the contour of the moving target.
图5为本发明实施例2基于机器视觉的瓶装白酒黑色杂质检测流程示意图。Fig. 5 is a schematic flow chart of the detection of black impurities in bottled liquor based on machine vision according to Embodiment 2 of the present invention.
图6为本发明实施例2中采用二次差分算法提取运动目标的流程示意图。FIG. 6 is a schematic flow chart of extracting a moving target using a quadratic difference algorithm in Embodiment 2 of the present invention.
具体实施方式Detailed ways
以下将结合附图给出本发明实施例,并通过实施例对本发明的技术方案进行进一步的清楚、完整说明。显然,所述实施例仅仅是本发明的一部分实施例,而不是全部的实施例。基于本发明内容,本领域普通技术人员在没有做出创造性劳动的前提下所得到的所有其它实施例,都属于本发明所保护的范围The embodiments of the present invention will be given below in conjunction with the accompanying drawings, and the technical solutions of the present invention will be further clearly and completely described through the embodiments. Apparently, the embodiments described are only some of the embodiments of the present invention, but not all of them. Based on the contents of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative work belong to the protection scope of the present invention
实施例1Example 1
本实施例以检测玻璃碎屑、纤维毛等白色杂质为例,对基于机器视觉的瓶装白酒杂质检测过程进行详细描述。In this embodiment, the detection process of impurities in bottled liquor based on machine vision is described in detail by taking the detection of white impurities such as glass shavings and fiber wool as an example.
本实施例提供的瓶装白酒白色杂质检测过程,如图1所示,包括以下步骤:The bottled liquor white impurity detection process provided by the present embodiment, as shown in Figure 1, comprises the following steps:
(1)将瓶装白酒翻转180°。(1) Turn over the bottled liquor 180°.
由于瓶装白酒瓶身存在刻度、花纹、吸附的杂质以及在生产运输过程中因为碰撞等原因产生的细纹等多种类型的干扰,使得检测酒液中的微小异物变得困难。如图2(a)所示,首先将含有白色杂质的瓶装白酒2倒置,进入待检测区域时将瓶装白酒2翻转180°,这种倒置翻转的进入方式,酒瓶存在的干扰在多张图像中相对静止,而瓶内的液体以及可能存在的杂质因瓶体的翻转倒置而从位于瓶颈附近沿瓶装白酒2中轴线运动,得到序列图像。这样不仅可以降低由于杂质贴近瓶壁而发生漏检的情况,相对于现有的旋转急停方式,所产生的气泡更少,从而尽量减少气泡对杂质检测的干扰,提高杂质检测精度。Due to various types of interference such as scales, patterns, adsorbed impurities on the body of bottled liquor, and fine lines caused by collisions during production and transportation, it is difficult to detect tiny foreign objects in liquor. As shown in Figure 2(a), first turn the bottled liquor 2 containing white impurities upside down, and turn the bottled liquor 2 180° when entering the area to be detected. In this inverted way of entering, the interference of the wine bottle is in multiple images The middle is relatively static, but the liquid in the bottle and possible impurities move from near the neck of the bottle along the central axis of the bottled liquor 2 due to the upside-down of the bottle body, and a sequence of images is obtained. This can not only reduce the occurrence of missed detection due to impurities close to the bottle wall, but also generate fewer air bubbles compared with the existing rotary emergency stop method, thereby minimizing the interference of air bubbles on impurity detection and improving the accuracy of impurity detection.
(2)对翻转后的瓶装白酒采集视频。(2) Collect video of the flipped bottled liquor.
本实施例采用高清摄像机1对翻转后的瓶装白酒2拍摄视频。为了提高对白色杂质的检测精度,如图2(b)所示,本实施例在检测白色杂质时,瓶装白酒2背部采用黑色遮光板5形成暗背景,LED光源4从瓶装白酒2底部照射,同时在LED光源4的前方加一层红色滤光纸3(所使用的高清数字摄像头对红光效果更好),从而减少光对成像的干扰。In this embodiment, a high-definition camera 1 is used to shoot a video of the overturned bottled liquor 2 . In order to improve the detection accuracy of white impurities, as shown in Figure 2 (b), when detecting white impurities in this embodiment, the back of the bottled liquor 2 adopts a black light-shielding plate 5 to form a dark background, and the LED light source 4 is illuminated from the bottom of the bottled liquor 2. At the same time, a layer of red filter paper 3 is added in front of the LED light source 4 (the used high-definition digital camera has a better effect on red light), thereby reducing the interference of light on imaging.
(3)从视频的连续帧图像中提取3帧图像,每一帧图像与上一帧图像或下一帧图像之间间隔2帧图像,这样可以在确保从图像中提取到运动目标的同时,减少由于干扰引起的不确定性因素带来的误差。本领域技术人员可以根据杂质移动快慢,适当调整两相邻帧图像之间间隔的帧数。(3) Extract 3 frames of images from the continuous frame images of the video, and each frame of images is separated from the previous frame of images or the next frame of images by 2 frames of images, so that while ensuring that the moving target is extracted from the images, Reduce errors caused by uncertain factors caused by interference. Those skilled in the art can properly adjust the number of frames between two adjacent frame images according to the moving speed of the impurity.
(4)对提取的3帧图像进行预处理,去除图像噪声,包括以下分步骤:(4) Preprocessing the extracted 3 frames of images to remove image noise, including the following sub-steps:
(41)对提起的3帧图像进行常规Gamma校正,降低高亮区域的对比度,并将Gamma校正后的图像转化为灰度图像;(41) Carry out conventional Gamma correction to the 3 frames of images mentioned, reduce the contrast of the highlighted area, and convert the image after Gamma correction into a grayscale image;
(42)采用基于中值的加权均值滤波算法对步骤(41)得到的灰度图像进行处理,滤除图像噪声的同时保留待测目标。(42) Process the grayscale image obtained in step (41) by adopting a median-based weighted mean filtering algorithm to filter out image noise while retaining the target to be measured.
本实施例采用基于中值的加权平均滤波算法包括以下步骤:In this embodiment, the weighted average filtering algorithm based on the median comprises the following steps:
(A)以X=[x(i,j)]M×N表示输入图像,其中x(i,j)表示图像灰度值矩阵中(i,j)点处像素的灰度值,W3(i,j)代表中心像素在(i,j)、大小为3×3的一个窗口(由于杂质较小因此取3×3,本领域可以根据预估杂质大小选取合适的窗口)。则(A) The input image is represented by X=[x(i,j)] M×N , where x(i,j) represents the gray value of the pixel at point (i, j) in the image gray value matrix, W 3 (i,j) represents a window with a center pixel at (i,j) and a size of 3×3 (3×3 is chosen because the impurity is small, and an appropriate window can be selected according to the estimated impurity size in the field). but
(B)首先用W3(i,j)在X=[x(i,j)]M×N中扫描,读取W3(i,j)中各个像素的灰度值x(i,j),并将灰度值按大小排序,取灰度值中的最大值MAX和最小值MIN。(B) First use W 3 (i,j) to scan in X=[x(i,j)] M×N , and read the gray value x(i,j) of each pixel in W 3 (i,j) ), and sort the gray values by size, and take the maximum value MAX and the minimum value MIN in the gray value.
(C)若x(i,j)等于最大值MAX或者最小值MIN,则令相乘权值为0,即不考虑他们对图像的影响,然后根据式(C) If x(i, j) is equal to the maximum value MAX or the minimum value MIN, then set the multiplication weight to 0, that is, regardless of their influence on the image, and then according to the formula
A=x1(i,j)×m1+x2(i,j)×m2+x3(i,j)×m3+x4(i,j)×m4+x5(i,j)×m3+x6(i,j)×m2+x7(i,j)×m1 A=x 1 (i,j)×m 1 +x 2 (i,j)×m 2 +x 3 (i,j)×m 3 +x 4 (i,j)×m 4 +x 5 (i ,j)×m 3 +x 6 (i,j)×m 2 +x 7 (i,j)×m 1
得到A,其中x1(i,j)、x2(i,j)...x7(i,j)为除去最大值MAX或者最小值MIN从小到大排列的灰度值,m1、m2、m3、m4为各个灰度值所对应的权值,权值取值规则为,m4对应这些灰度值中的中值,取系数最大,m3、m2、m1逐渐减小,且m1、m2、m3、m4均属于(0,1),m1、m2、m3、m4可以根据上述规则进行设定。Obtain A, where x 1 (i,j), x 2 (i,j)...x 7 (i,j) are the gray values arranged from small to large except the maximum value MAX or minimum value MIN, m 1 , m 2 , m 3 , and m 4 are the weights corresponding to each gray value, and the weight value selection rules are as follows: m 4 corresponds to the median value of these gray values, and the coefficient is the largest, m 3 , m 2 , m 1 gradually decreases, and m 1 , m 2 , m 3 , and m 4 all belong to (0,1), m 1 , m 2 , m 3 , and m 4 can be set according to the above rules.
(D)令 (D) order
并将Z值赋给窗口所扫描区域中像素中心点x(i,j)=Z,即可。And assign the Z value to the pixel center point x(i, j)=Z in the area scanned by the window, that is.
依据上述步骤(A)-(D)对得到的灰度图像进行处理,便可滤除图像噪声。Image noise can be filtered out by processing the obtained grayscale image according to the above steps (A)-(D).
(5)采用二次差分算法对预处理得到的图像进行分析,提取出含有运动目标的图像。(5) Using the quadratic difference algorithm to analyze the preprocessed image, and extract the image containing the moving target.
本步骤采用一种改进的二次差分算法对预处理得到的图像进行分析,分离出微小的运动目标,如图3所示,具体包括以下步骤:In this step, an improved quadratic difference algorithm is used to analyze the preprocessed image to separate tiny moving objects, as shown in Figure 3, which specifically includes the following steps:
(51)将三帧图像中,相邻两帧图像进行差分运算得到两幅差分图像。(51) Perform difference operation on two adjacent frames of images among the three frames of images to obtain two difference images.
以f(x,y,t-2),f(x,y,t),f(x,y,t+2)表示步骤(4)处理后的三帧图像,第一帧图像f(x,y,t-2)与第二帧图像f(x,y,t)之间间隔2帧图像,第二帧图像f(x,y,t)与第三帧图像f(x,y,t+2)之间间隔2帧图像。第一帧图像f(x,y,t-2)与第二帧图像f(x,y,t)做绝对差,第二帧图像f(x,y,t)和第三帧图像f(x,y,t+2)做绝对差,分别得到两幅差分图像d(t-2,t)(x,y)和d(t,t+2)(x,y);这里可以通过直接调用OpenCV中的函数absdiff()进行操作完成。Use f(x,y,t-2), f(x,y,t), f(x,y,t+2) to represent the three frames of images processed in step (4), the first frame image f(x , y, t-2) and the second frame image f(x, y, t) are separated by 2 frames of images, the second frame image f(x, y, t) and the third frame image f(x, y, There are 2 frames of images between t+2). The absolute difference between the first frame image f(x,y,t-2) and the second frame image f(x,y,t), the second frame image f(x,y,t) and the third frame image f( x, y, t+2) do the absolute difference, and get two difference images d (t-2, t) (x, y) and d (t, t+2) (x, y); here you can directly Call the function absdiff() in OpenCV to complete the operation.
d(t-2,t)(x,y)=|f(x,y,t)-f(x,y,t-2)|d (t-2,t) (x,y)=|f(x,y,t)-f(x,y,t-2)|
d(t,t+2)(x,y)=|f(x,y,t)-f(x,y,t+2)|d (t,t+2) (x,y)=|f(x,y,t)-f(x,y,t+2)|
(52)将两幅差分图像再次进行差分运算得到二次差分图像,将两幅差分图像进行能量积累运算得到能量积累图像。(52) Perform differential operation on the two difference images again to obtain a second difference image, and perform energy accumulation operation on the two difference images to obtain an energy accumulation image.
本实施例中将两幅差分图像d(t-2,t)(x,y)和d(t,t+2)(x,y)做绝对差得到图像D(x,y);可以通过直接调用OpenCV中的函数absdiff()进行操作完成。In this embodiment, two difference images d (t-2, t) (x, y) and d (t, t+2) (x, y) are made absolute difference to obtain image D (x, y); Directly call the function absdiff() in OpenCV to complete the operation.
D(x,y)=|d(t-2,t)(x,y)-d(t,t+2)(x,y)|。D(x,y)=|d (t-2,t) (x,y)-d (t,t+2) (x,y)|.
本实施例中将两幅差分图像d(t-2,t)(x,y)和d(t,t+2)(x,y)进行能量积累得到图像E(x,y);可以通过直接调用OpenCV中的函数addWeighted(src1,scr2,1,result)进行操作完成,这里src1和src2分别为图像d(t-2,t)(x,y)和d(t,t+2)(x,y)。In this embodiment, two differential images d (t-2, t) (x, y) and d (t, t+2) (x, y) are energy accumulated to obtain an image E (x, y); Directly call the function addWeighted(src1,scr2,1,result) in OpenCV to complete the operation, where src1 and src2 are images d (t-2,t) (x,y) and d (t,t+2) ( x,y).
E(x,y)=d(t-2,t)(x,y)+d(t,t+2)(x,y)。E(x,y)=d (t-2,t) (x,y)+d (t,t+2) (x,y).
(53)将得到的能量积累图像与之相关联的二次差分图像相减即得到含有运动目标的图像。(53) Subtract the obtained energy accumulation image from its associated quadratic difference image to obtain an image containing a moving target.
本实施例中将图像E(x,y)与图像D(x,y)相减即得到含有运动目标的灰度图像F(x,y)。可以通过直接调用OpenCV中的函数addWeighted(src1,scr2,-1,result)进行操作完成,这里其中src1和src2分别为图像E(x,y)与图像D(x,y)。In this embodiment, the image E(x, y) is subtracted from the image D(x, y) to obtain the grayscale image F(x, y) containing the moving object. It can be done by directly calling the function addWeighted(src1,scr2,-1,result) in OpenCV, where src1 and src2 are image E(x,y) and image D(x,y) respectively.
F(x,y)=E(x,y)-D(x,y)。F(x,y)=E(x,y)-D(x,y).
因此,得到的图像中只保留了中间一帧的增强的运动目标,降低了瓶身本身存在的干扰。Therefore, only the enhanced moving target in the middle frame is retained in the obtained image, which reduces the interference of the bottle itself.
为了尽可能消除背景干扰,本实施例进一步采用Otsu’s最大类间方差法对提取的含有运动目标的图像进行二值化阈值处理,以有效的分离背景图像;并运用形态学开运算2×2去除图像中小于4个像素的亮点。In order to eliminate background interference as much as possible, this embodiment further uses Otsu's maximum inter-class variance method to perform binarization threshold processing on the extracted images containing moving objects, so as to effectively separate the background image; Bright spots smaller than 4 pixels in an image.
(6)提取运动目标的轮廓,并计算轮廓长轴与短轴的比值。(6) Extract the contour of the moving target, and calculate the ratio of the long axis to the short axis of the contour.
本实施例中,运动目标轮廓长轴与短轴分别是指运动目标轮廓外接矩形的长与宽In this embodiment, the long axis and short axis of the moving target contour refer to the length and width of the circumscribed rectangle of the moving target contour respectively.
(7)将得到的轮廓长短轴比值与设定的阈值相比较,若轮廓长短轴比值属于1~1.1,运动目标为气泡;若轮廓长短轴比值大于1.4,运动目标为杂质。(7) Comparing the obtained contour long-short axis ratio with the set threshold, if the contour long-short axis ratio is 1-1.1, the moving target is a bubble; if the contour long-short axis ratio is greater than 1.4, the moving target is an impurity.
为了能够区分杂质与气泡,根据杂质与气泡的形状特点进行分类,当运动目标轮廓长短轴比值属于1.0~1.1时,运动目标确定为气泡;当运动目标轮廓长轴与短轴比值在大于1.1且小于等于1.4之间时,可能是气泡也可能是杂质,因此为了提高对杂质检测的准确度,将轮廓长短轴比值大于1.4的运动目标确定为杂质。In order to be able to distinguish impurities and air bubbles, the classification is carried out according to the shape characteristics of impurities and air bubbles. When the ratio of the long axis to the short axis of the moving target contour is 1.0 to 1.1, the moving target is determined to be a bubble; when the ratio of the long axis to the short axis of the moving target contour is greater than 1.1 and When it is less than or equal to 1.4, it may be a bubble or an impurity. Therefore, in order to improve the accuracy of impurity detection, the moving target whose contour long-short axis ratio is greater than 1.4 is determined as an impurity.
当基于运动目标轮廓无法实现杂质还是气泡的区分时,可以重复上述步骤(1)~(7),进行重新检测。When the distinction between impurities and air bubbles cannot be realized based on the contour of the moving target, the above steps (1) to (7) can be repeated for re-detection.
为了说明本实施例提供的基于机器视觉的瓶装白酒白色杂质检测方法的检测效果,以纤维毛、玻璃碎屑和白色絮状物为白色杂质添加到瓶装白酒中,按照上述步骤(1)-(7)对白色杂质进行检测,得到的相应采集图像(图4(a)、(c)和(d))、二次差分处理图像(图4(e)、(g)和(h))、运动目标轮廓(图4(i)、(k)和(l))和运动目标轮廓放大图(图4(i1)、(k1)和(l1))。从图4(i1)中给出,运动目标轮廓的长轴与短轴比值为6.3,因此判定运动目标为杂质;从图4(k1)中给出,运动目标轮廓的长轴与短轴比值为1.6,因此判定运动目标为杂质;从图4(l1)中给出,运动目标轮廓的长轴与短轴比值为2.0,因此判定运动目标为杂质。以上分析结果与设定的杂质尺寸基本相符。因此,通过本实施例提供的检测方法可以实现对瓶装白酒白色杂质的准确检测。In order to illustrate the detection effect of the method for detecting white impurities in bottled liquor based on machine vision provided in this example, fiber wool, glass chips and white flocs are added to bottled liquor as white impurities, and the above steps (1)-( 7) Detect the white impurities, and obtain corresponding collected images (Figure 4(a), (c) and (d)), secondary difference processing images (Figure 4(e), (g) and (h)), The contours of moving targets (Fig. 4(i), (k) and (l)) and the enlarged contours of moving targets (Fig. 4(i1), (k1) and (l1)). From Figure 4(i1), the ratio of the major axis to the minor axis of the moving target profile is 6.3, so it is determined that the moving target is an impurity; from Figure 4(k1), the ratio of the major axis to the minor axis of the moving target profile is 1.6, so it is determined that the moving target is an impurity; as shown in Figure 4 (l1), the ratio of the major axis to the short axis of the moving target contour is 2.0, so it is determined that the moving target is an impurity. The above analysis results are basically consistent with the set impurity size. Therefore, accurate detection of white impurities in bottled liquor can be realized through the detection method provided in this embodiment.
实施例2Example 2
本实施例以检测黑渣黑色杂质为例,对基于机器视觉的瓶装白酒杂质检测过程进行详细描述。In this embodiment, the detection process of impurities in bottled liquor based on machine vision is described in detail by taking the detection of black impurities in black slag as an example.
本实施例提供的瓶装白酒黑色杂质检测过程,如图5所示,包括以下步骤:The bottled liquor black impurity detection process that present embodiment provides, as shown in Figure 5, comprises the following steps:
(1)将瓶装白酒翻转180°。(1) Turn over the bottled liquor 180°.
由于瓶装白酒瓶身存在刻度、花纹、吸附的杂质以及在生产运输过程中因为碰撞等原因产生的细纹等多种类型的干扰,使得检测酒液中的微小异物变得困难。如图2(a)所示,首先将含有白色杂质的瓶装白酒2倒置,进入待检测区域时将瓶装白酒2翻转180°,这种倒置翻转的进入方式,酒瓶存在的干扰在多张图像中相对静止,而瓶内的液体以及可能存在的杂质因瓶体的翻转倒置而从位于瓶颈附近沿瓶装白酒2中轴线运动,得到序列图像。这样不仅可以降低由于杂质贴近瓶壁而发生漏检的情况,相对于现有的旋转急停方式,所产生的气泡更少,从而尽量减少气泡对杂质检测的干扰,提高杂质检测精度。Due to various types of interference such as scales, patterns, adsorbed impurities on the body of bottled liquor, and fine lines caused by collisions during production and transportation, it is difficult to detect tiny foreign objects in liquor. As shown in Figure 2(a), first turn the bottled liquor 2 containing white impurities upside down, and turn the bottled liquor 2 180° when entering the area to be detected. In this inverted way of entering, the interference of the wine bottle is in multiple images The middle is relatively static, but the liquid in the bottle and possible impurities move from near the neck of the bottle along the central axis of the bottled liquor 2 due to the upside-down of the bottle body, and a sequence of images is obtained. This can not only reduce the occurrence of missed detection due to impurities close to the bottle wall, but also generate fewer air bubbles compared with the existing rotary emergency stop method, thereby minimizing the interference of air bubbles on impurity detection and improving the accuracy of impurity detection.
(2)对翻转后的瓶装白酒采集视频。(2) Collect video of the flipped bottled liquor.
本实施例采用高清摄像机1对翻转后的瓶装白酒2拍摄视频。为了提高对黑色杂质的检测精度,如图2(c)所示,本实施例在检测黑色杂质时,LED光源4从瓶装白酒2背部照射,采用背部给光的方式。In this embodiment, a high-definition camera 1 is used to shoot a video of the overturned bottled liquor 2 . In order to improve the detection accuracy of black impurities, as shown in Figure 2(c), in this embodiment, when detecting black impurities, the LED light source 4 is illuminated from the back of the bottled liquor 2, and the backlighting method is adopted.
(3)从视频的连续帧图像中提取5帧图像,每一帧图像与上一帧图像或下一帧图像之间间隔5帧图像,这样可以在确保从图像中提取到运动目标的同时,减少由于干扰引起的不确定因素带来的误差。本领域技术人员可以根据杂质移动快慢,适当调整两相邻帧图像之间间隔的帧数。(3) Extract 5 frames of images from the continuous frame images of the video, and there are 5 frames of images between each frame of images and the previous frame of images or the next frame of images, so that while ensuring that the moving target is extracted from the images, Reduce errors caused by uncertain factors caused by interference. Those skilled in the art can properly adjust the number of frames between two adjacent frame images according to the moving speed of the impurity.
(4)对提取的5帧图像进行预处理,去除图像噪声,包括以下分步骤:(4) Preprocessing is carried out to the extracted 5 frames of images to remove image noise, including the following sub-steps:
(41)对提起的5帧图像进行常规Gamma校正,降低高亮区域的对比度,并将Gamma校正后的图像转化为灰度图像;(41) Carry out conventional Gamma correction to the 5 frames of images mentioned, reduce the contrast of the highlighted area, and convert the image after Gamma correction into a grayscale image;
(42)采用基于中值的加权均值滤波算法对步骤(41)得到的灰度图像进行处理,滤除图像噪声的同时保留待测目标。(42) Process the grayscale image obtained in step (41) by adopting a median-based weighted mean filtering algorithm to filter out image noise while retaining the target to be measured.
本实施例采用基于中值的加权平均滤波算法包括以下步骤:In this embodiment, the weighted average filtering algorithm based on the median comprises the following steps:
(A)以X=[x(i,j)]M×N表示输入图像,其中x(i,j)表示图像灰度值矩阵中(i,j)点处像素的灰度值,W3(i,j)代表中心像素在(i,j)、大小为3×3的一个窗口(由于杂质较小因此取3×3,本领域可以根据预估杂质大小选取合适的窗口)。则(A) The input image is represented by X=[x(i,j)] M×N , where x(i,j) represents the gray value of the pixel at point (i, j) in the image gray value matrix, W 3 (i,j) represents a window with a center pixel at (i,j) and a size of 3×3 (3×3 is chosen because the impurity is small, and an appropriate window can be selected according to the estimated impurity size in the field). but
(B)首先用W3(i,j)在X=[x(i,j)]M×N中扫描,读取W3(i,j)中各个像素的灰度值x(i,j),并将灰度值按大小排序,取灰度值中的最大值MAX和最小值MIN。(B) First use W 3 (i,j) to scan in X=[x(i,j)] M×N , and read the gray value x(i,j) of each pixel in W 3 (i,j) ), and sort the gray values by size, and take the maximum value MAX and the minimum value MIN in the gray value.
(C)若x(i,j)等于最大值MAX或者最小值MIN,则令相乘权值为0,即不考虑他们对图像的影响,然后根据式(C) If x(i, j) is equal to the maximum value MAX or the minimum value MIN, then set the multiplication weight to 0, that is, regardless of their influence on the image, and then according to the formula
A=x1(i,j)×m1+x2(i,j)×m2+x3(i,j)×m3+x4(i,j)×m4+x5(i,j)×m3+x6(i,j)×m2+x7(i,j)×m1 A=x 1 (i,j)×m 1 +x 2 (i,j)×m 2 +x 3 (i,j)×m 3 +x 4 (i,j)×m 4 +x 5 (i ,j)×m 3 +x 6 (i,j)×m 2 +x 7 (i,j)×m 1
得到A,其中x1(i,j)、x2(i,j)...x7(i,j)为除去最大值MAX或者最小值MIN从小到大排列的灰度值,m1、m2、m3、m4为各个灰度值所对应的权值,权值取值规则为,m4对应这些灰度值中的中值,取系数最大,m3、m2、m1逐渐减小,且m1、m2、m3、m4均属于(0,1),m1、m2、m3、m4可以根据上述规则进行设定。Obtain A, where x 1 (i,j), x 2 (i,j)...x 7 (i,j) are the gray values arranged from small to large except the maximum value MAX or minimum value MIN, m 1 , m 2 , m 3 , and m 4 are the weights corresponding to each gray value, and the weight value selection rules are as follows: m 4 corresponds to the median value of these gray values, and the coefficient is the largest, m 3 , m 2 , m 1 gradually decreases, and m 1 , m 2 , m 3 , and m 4 all belong to (0,1), m 1 , m 2 , m 3 , and m 4 can be set according to the above rules.
(D)令 (D) order
并将Z值赋给窗口所扫描区域中像素中心点x(i,j)=Z,即可。And assign the Z value to the pixel center point x(i, j)=Z in the area scanned by the window, that is.
依据上述步骤(A)-(D)对得到的灰度图像进行处理,便可滤除图像噪声。Image noise can be filtered out by processing the obtained grayscale image according to the above steps (A)-(D).
(5)采用二次差分算法对预处理得到的图像进行分析,提取出含有运动目标的图像。(5) Using the quadratic difference algorithm to analyze the preprocessed image, and extract the image containing the moving target.
本步骤采用一种改进的二次差分算法对预处理得到的图像进行分析,分离出微小的运动目标,如图6所示,具体包括以下步骤:In this step, an improved quadratic difference algorithm is used to analyze the preprocessed image and separate tiny moving objects, as shown in Figure 6, which specifically includes the following steps:
(51)将五帧图像中,相邻两帧图像进行差分运算得到两幅差分图像。(51) Perform difference operation on two adjacent frames of images among the five frames of images to obtain two difference images.
以f(x,y,t-10),f(x,y,t-5),f(x,y,t),f(x,y,t+5),f(x,y,t+10)表示步骤(4)处理后的五帧图像,相邻两帧图像之间间隔5帧图像。相邻两帧图像做绝对差,得到四幅差分图像(差分图像1至差分图像4);这里可以通过直接调用OpenCV中的函数absdiff()进行操作完成。Take f(x,y,t-10),f(x,y,t-5),f(x,y,t),f(x,y,t+5),f(x,y,t +10) represents the five frames of images processed in step (4), and there is an interval of 5 frames of images between two adjacent frames of images. The absolute difference is made between two adjacent frames of images to obtain four difference images (difference image 1 to difference image 4); here, the operation can be completed by directly calling the function absdiff() in OpenCV.
(52)将四幅差分图像分为两组,每组中的两幅差分图像分别进行差分运算和能量积累运算得到相关联的二次差分图像和能量积累图像。(52) The four difference images are divided into two groups, and the two difference images in each group are respectively subjected to difference operation and energy accumulation operation to obtain associated secondary difference images and energy accumulation images.
本实施例中将差分图像1和差分图像2做绝对差得到图像二次差分1,可以通过直接调用OpenCV中的函数absdiff()进行操作完成。将差分图像1和差分图像2进行能量积累得到能量积累1,可以通过直接调用OpenCV中的函数addWeighted(src1,scr2,1,result)进行操作完成,这里src1和src2分别为差分图像1和差分图像2In this embodiment, the absolute difference between the difference image 1 and the difference image 2 is obtained to obtain the second difference 1 of the image, which can be completed by directly calling the function absdiff() in OpenCV. Energy accumulation of differential image 1 and differential image 2 to obtain energy accumulation 1 can be completed by directly calling the function addWeighted(src1,scr2,1,result) in OpenCV, where src1 and src2 are differential image 1 and differential image respectively 2
本实施例中将差分图像3和差分图像4做绝对差得到图像二次差分2,可以通过直接调用OpenCV中的函数absdiff()进行操作完成。将差分图像3和差分图像4进行能量积累得到能量积累2,可以通过直接调用OpenCV中的函数addWeighted(src1,scr2,1,result)进行操作完成,这里src1和src2分别为差分图像3和差分图像4。In this embodiment, the absolute difference between the difference image 3 and the difference image 4 is obtained to obtain the image secondary difference 2, which can be completed by directly calling the function absdiff() in OpenCV. Energy accumulation of differential image 3 and differential image 4 to obtain energy accumulation 2 can be completed by directly calling the function addWeighted(src1, scr2, 1, result) in OpenCV, where src1 and src2 are differential image 3 and differential image respectively 4.
(53)将得到的能量积累图像与之相关联的二次差分图像相减即得到含有运动目标的图像。(53) Subtract the obtained energy accumulation image from its associated quadratic difference image to obtain an image containing a moving target.
本实施例中将能量积累1与二次差分1相减即得到含有运动目标的图像1,将能量积累2与二次差分2相减即得到含有运动目标的图像2,这些可以通过直接调用OpenCV中的函数addWeighted(src1,scr2,-1,result)进行操作完成,这里其中src1为能量积累1或能量积累2,scr2为二次差分1或二次差分2。In this embodiment, the energy accumulation 1 is subtracted from the secondary difference 1 to obtain the image 1 containing the moving object, and the energy accumulation 2 is subtracted from the secondary difference 2 to obtain the image 2 containing the moving object. These can be obtained by directly calling OpenCV The function addWeighted(src1,scr2,-1,result) in the operation is completed, where src1 is energy accumulation 1 or energy accumulation 2, and scr2 is secondary difference 1 or secondary difference 2.
因此,得到的含有运动目标的图像1和含有运动目标的图像2中均只保留了中间一帧的增强的运动目标,降低了瓶身本身存在的干扰。而含有运动目标的图像2与含有运动目标图像1是相同运动目标在不同时间的运功状态,不仅可以减少因为干扰引起的不确定性因素带来的误差,同时对同一运动目标的两个进行检测可以增加判断的准确度。Therefore, in the obtained image 1 containing the moving object and the image 2 containing the moving object, only the enhanced moving object in the middle frame is retained, which reduces the interference of the bottle body itself. The image 2 containing the moving target and the image 1 containing the moving target are the movement states of the same moving target at different times. Detection can increase the accuracy of judgment.
为了尽可能消除背景干扰,本实施例进一步采用Otsu’s最大类间方差法对提取的含有运动目标的图像1和含有运动目标的图像2进行二值化阈值处理,以有效的分离背景图像;并运用形态学开运算2×2去除图像中小于4个像素的亮点。In order to eliminate background interference as much as possible, this embodiment further uses Otsu's maximum inter-class variance method to perform binarization threshold processing on the extracted image 1 containing the moving object and image 2 containing the moving object, so as to effectively separate the background image; and use Morphological opening operation 2×2 removes bright spots smaller than 4 pixels in the image.
(6)提取运动目标的轮廓,并计算轮廓长轴与短轴的比值。(6) Extract the contour of the moving target, and calculate the ratio of the long axis to the short axis of the contour.
本实施例中,含有运动目标的图像1和含有运动目标的图像2中任意一个为研究对象,计算运动目标轮廓的长轴与短轴。In this embodiment, any one of the image 1 containing the moving object and the image 2 containing the moving object is the research object, and the long axis and short axis of the contour of the moving object are calculated.
(7)将得到的轮廓长短轴比值与设定的阈值相比较,若轮廓长短轴比值属于1~1.1,运动目标为气泡;若轮廓长短轴比值大于1.4,运动目标为杂质。(7) Comparing the obtained contour long-short axis ratio with the set threshold, if the contour long-short axis ratio is 1-1.1, the moving target is a bubble; if the contour long-short axis ratio is greater than 1.4, the moving target is an impurity.
为了能够区分杂质与气泡,根据杂质与气泡的形状特点进行分类,当运动目标轮廓长短轴比值属于1.0~1.1时,运动目标确定为气泡;当运动目标轮廓长轴与短轴比值在大于1.1且小于等于1.4之间时,可能是气泡也可能是杂质,因此为了提高对杂质检测的准确度,将轮廓长短轴比值大于1.4的运动目标确定为杂质。In order to be able to distinguish impurities and air bubbles, the classification is carried out according to the shape characteristics of impurities and air bubbles. When the ratio of the long axis to the short axis of the moving target contour is 1.0 to 1.1, the moving target is determined to be a bubble; when the ratio of the long axis to the short axis of the moving target contour is greater than 1.1 and When it is less than or equal to 1.4, it may be a bubble or an impurity. Therefore, in order to improve the accuracy of impurity detection, the moving target whose contour long-short axis ratio is greater than 1.4 is determined as an impurity.
当基于运动目标轮廓无法实现杂质还是气泡的区分时,可以重复上述步骤(1)~(7),进行重新检测。When the distinction between impurities and air bubbles cannot be realized based on the contour of the moving target, the above steps (1) to (7) can be repeated for re-detection.
本实施例以黑渣作为黑色杂质,得到的相应采集图像、二次差分处理图像、运动目标轮廓和运动目标轮廓放大图分别为图4(b)、(f)、(j)、(j1),从图4(j1)中给出,运动目标轮廓的长轴与短轴比值为1.7,因此判定运动目标为杂质。以上分析结果与设定的杂质尺寸基本相符。因此,通过本实施例提供的检测方法可以实现对瓶装白酒黑色杂质的准确检测。In this embodiment, black slag is used as black impurities, and the obtained corresponding collected images, secondary difference processing images, moving target contours and moving target contour enlarged images are respectively shown in Figure 4 (b), (f), (j), (j1) , given in Figure 4(j1), the ratio of the major axis to the minor axis of the moving target profile is 1.7, so it is determined that the moving target is an impurity. The above analysis results are basically consistent with the set impurity size. Therefore, accurate detection of black impurities in bottled liquor can be realized through the detection method provided in this embodiment.
实施例3Example 3
本实施例提供了一种基于机器视觉的瓶装白酒杂质检测系统,可以实现对瓶装白酒黑色杂质和白色杂质的检测,该检测系统包括:This embodiment provides a system for detecting impurities in bottled liquor based on machine vision, which can detect black impurities and white impurities in bottled liquor. The detection system includes:
黑杂质检测工位,包括瓶装白酒酒瓶支撑部件以及LED光源,LED光源从瓶装白酒背部给光;Black impurity detection station, including bottled liquor bottle support parts and LED light source, LED light source provides light from the back of bottled liquor;
白杂质检测工位,包括瓶装白酒酒瓶支撑部件、LED光源、红色滤光纸和黑色遮光板,酒瓶支撑部件对准酒瓶底部的部分为透明结构,以便于光透过;LED光源从瓶装白酒底部给光,LED光源前面设置有红色滤光纸;黑色遮光板设置于瓶装白酒背部,从而使瓶装白酒背部为暗背景;White impurity detection station, including bottled liquor bottle support parts, LED light source, red filter paper and black shading plate, the part of the wine bottle support part aligned with the bottom of the wine bottle is a transparent structure to facilitate light transmission; the LED light source from The bottom of the bottled liquor is illuminated, and a red filter paper is set in front of the LED light source; a black light-shielding plate is placed on the back of the bottled liquor, so that the back of the bottled liquor is a dark background;
图像采集装置,用于对翻转180°的瓶装白酒采集视频,可以为高清数字摄像机、CCD工业摄像机等;The image acquisition device is used to collect video of bottled liquor turned over 180°, which can be a high-definition digital camera, CCD industrial camera, etc.;
图像处理装置,用于对图像采集装置采集的视频进行处理,完成对瓶装白酒杂质的检测;所述图像处理装置包括:The image processing device is used to process the video collected by the image acquisition device to complete the detection of impurities in bottled liquor; the image processing device includes:
帧图像提取单元,从视频的连续帧图像中提取N帧图像,每一帧图像与上一帧图像或下一帧图像之间间隔M帧图像,其中N为正奇数,M为大于等于0的正整数;The frame image extraction unit extracts N frames of images from the continuous frame images of the video, and there are M frames of images between each frame image and the previous frame image or the next frame image, wherein N is a positive odd number, and M is greater than or equal to 0 positive integer;
图像预处理单元,对提取的N帧图像进行预处理,去除图像噪声;An image preprocessing unit is used to preprocess the extracted N frames of images to remove image noise;
运动目标图像提取单元,采用二次差分算法对预处理得到的图像进行处理,提取出含有运动目标的图像;The moving target image extraction unit processes the pre-processed image by using the quadratic difference algorithm to extract the image containing the moving target;
轮廓提取及长短轴比值计算单元,提取运动目标的轮廓,并计算轮廓长轴与短轴的比值;The contour extraction and long-short axis ratio calculation unit extracts the contour of the moving target and calculates the ratio of the long axis to the short axis of the contour;
判定单元,将得到的轮廓长短轴比值与设定的阈值相比较,若轮廓长短轴比值属于1.0~1.1,运动目标为气泡;若轮廓长短轴比值大于1.4,运动目标为杂质。The judging unit compares the obtained contour long-short axis ratio with the set threshold, if the contour long-short axis ratio is 1.0-1.1, the moving target is a bubble; if the contour long-short axis ratio is greater than 1.4, the moving target is an impurity.
可以黑杂质检测工位和白杂质检测工位均配置一个图像采集装置,也可以只采用一个图像采集装置,此时需要配置用于承载图像采集装置的移动平台,使图像采集装置能够在不同的检测工位间切换。由于黑色杂质更容易检测且检测精度较高,先对黑色杂质进行检测,再对白色杂质进行检测,可以在提高检测效率的同时进一步提高检测精度。因此,当设定黑色杂质检测工位和白色检测工位时,先将瓶装白酒进入黑色检测工位进行检测,如果含有黑色杂质,直接将瓶装白酒筛选出,不需要进入下一个白色杂质检测工位;如果没有黑色杂质,进入白色杂质检测工位,判断是否含有白色杂质。Both the black impurity detection station and the white impurity detection station can be equipped with an image acquisition device, or only one image acquisition device can be used. Detect switching between stations. Since the black impurities are easier to detect and the detection accuracy is higher, the black impurities are detected first, and then the white impurities are detected, which can further improve the detection accuracy while improving the detection efficiency. Therefore, when setting the black impurity detection station and the white detection station, first put the bottled liquor into the black detection station for detection, if it contains black impurities, the bottled liquor is directly screened out, and there is no need to enter the next white impurity detection station If there is no black impurity, enter the white impurity detection station to judge whether it contains white impurities.
上述由帧图像提取单元、图像预处理单元、运动目标图像提取单元、轮廓提取及长短轴比值计算单元、判定单元组成图像处理装置可以加载到计算机或具有图像处理功能的处理器中,来完成图像处理和杂质判定等功能。The above-mentioned image processing device composed of frame image extraction unit, image preprocessing unit, moving target image extraction unit, contour extraction and long-short axis ratio calculation unit, and determination unit can be loaded into a computer or a processor with image processing function to complete the image processing. Processing and impurity judgment and other functions.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810451360.1A CN108896574B (en) | 2018-05-11 | 2018-05-11 | Bottled liquor impurity detection method and system based on machine vision |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810451360.1A CN108896574B (en) | 2018-05-11 | 2018-05-11 | Bottled liquor impurity detection method and system based on machine vision |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108896574A true CN108896574A (en) | 2018-11-27 |
CN108896574B CN108896574B (en) | 2020-03-17 |
Family
ID=64342840
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810451360.1A Active CN108896574B (en) | 2018-05-11 | 2018-05-11 | Bottled liquor impurity detection method and system based on machine vision |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108896574B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109741282A (en) * | 2019-01-16 | 2019-05-10 | 清华大学 | A multi-frame bubble flow image processing method based on prediction correction |
CN110006917A (en) * | 2019-05-10 | 2019-07-12 | 陈昌涛 | A kind of online vision detection system of bottled liquor impurity and its implementation |
CN110811325A (en) * | 2019-11-13 | 2020-02-21 | 重庆科文净水设备有限公司 | Intelligent drinking water system |
JPWO2020188730A1 (en) * | 2019-03-19 | 2020-09-24 | ||
CN111830044A (en) * | 2019-04-19 | 2020-10-27 | 无锡维胜威信息科技有限公司 | White spirit quality detection system |
CN111950466A (en) * | 2020-08-13 | 2020-11-17 | 北京福通互联科技集团有限公司 | Bottled liquor detection method and detection device based on trajectory cascade algorithm |
CN112381776A (en) * | 2020-11-09 | 2021-02-19 | 深圳前海微众银行股份有限公司 | Method and device for determining impurities of contents in transparent container |
CN112418105A (en) * | 2020-11-25 | 2021-02-26 | 湖北工业大学 | High maneuvering satellite time sequence remote sensing image moving ship target detection method based on difference method |
CN113284116A (en) * | 2021-05-28 | 2021-08-20 | 荆门汇易佳信息科技有限公司 | Real-time image analysis type red wine semi-finished product motion detection system |
CN114124626A (en) * | 2021-10-15 | 2022-03-01 | 西南交通大学 | Signal noise reduction method, device, terminal device and storage medium |
CN118941537A (en) * | 2024-07-26 | 2024-11-12 | 山东鼎欣生物科技有限公司 | Intelligent detection method of sodium acetate impurities based on machine vision |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1588015A (en) * | 2004-09-28 | 2005-03-02 | 上海金纳德制药设备科技发展有限公司 | On-line lamp detecting method and its device using machine visual system |
CN101403705A (en) * | 2008-11-17 | 2009-04-08 | 湖南大学 | Foreign body machine vision recognition method and device for assembly line special-shaped bottling liquid |
CN101413904A (en) * | 2008-11-25 | 2009-04-22 | 湖南大学 | Impurity real time machine vision detection method and apparatus in special-shaped bottle-packaging solution |
CN101806752A (en) * | 2010-03-12 | 2010-08-18 | 长沙图创机电科技有限公司 | Method and equipment for visual detection of visible foreign matters in bottled liquid medicine |
-
2018
- 2018-05-11 CN CN201810451360.1A patent/CN108896574B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1588015A (en) * | 2004-09-28 | 2005-03-02 | 上海金纳德制药设备科技发展有限公司 | On-line lamp detecting method and its device using machine visual system |
CN101403705A (en) * | 2008-11-17 | 2009-04-08 | 湖南大学 | Foreign body machine vision recognition method and device for assembly line special-shaped bottling liquid |
CN101413904A (en) * | 2008-11-25 | 2009-04-22 | 湖南大学 | Impurity real time machine vision detection method and apparatus in special-shaped bottle-packaging solution |
CN101806752A (en) * | 2010-03-12 | 2010-08-18 | 长沙图创机电科技有限公司 | Method and equipment for visual detection of visible foreign matters in bottled liquid medicine |
Non-Patent Citations (2)
Title |
---|
张辉 等: "基于机器视觉的保健酒可见异物检测系统研究与开发", 《仪器仪表学报》 * |
陈文广: "基于机器视觉的酒液异物在线检测技术研究", 《万方学位论文数据库》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109741282A (en) * | 2019-01-16 | 2019-05-10 | 清华大学 | A multi-frame bubble flow image processing method based on prediction correction |
JP7238965B2 (en) | 2019-03-19 | 2023-03-14 | 日本電気株式会社 | Inspection device, inspection method, and program |
JPWO2020188730A1 (en) * | 2019-03-19 | 2020-09-24 | ||
WO2020188730A1 (en) * | 2019-03-19 | 2020-09-24 | 日本電気株式会社 | Inspection device, inspection method, and non-transitory computer-readable medium |
CN111830044A (en) * | 2019-04-19 | 2020-10-27 | 无锡维胜威信息科技有限公司 | White spirit quality detection system |
CN110006917A (en) * | 2019-05-10 | 2019-07-12 | 陈昌涛 | A kind of online vision detection system of bottled liquor impurity and its implementation |
CN110811325A (en) * | 2019-11-13 | 2020-02-21 | 重庆科文净水设备有限公司 | Intelligent drinking water system |
CN111950466A (en) * | 2020-08-13 | 2020-11-17 | 北京福通互联科技集团有限公司 | Bottled liquor detection method and detection device based on trajectory cascade algorithm |
CN112381776A (en) * | 2020-11-09 | 2021-02-19 | 深圳前海微众银行股份有限公司 | Method and device for determining impurities of contents in transparent container |
CN112418105A (en) * | 2020-11-25 | 2021-02-26 | 湖北工业大学 | High maneuvering satellite time sequence remote sensing image moving ship target detection method based on difference method |
CN113284116A (en) * | 2021-05-28 | 2021-08-20 | 荆门汇易佳信息科技有限公司 | Real-time image analysis type red wine semi-finished product motion detection system |
CN114124626A (en) * | 2021-10-15 | 2022-03-01 | 西南交通大学 | Signal noise reduction method, device, terminal device and storage medium |
CN114124626B (en) * | 2021-10-15 | 2023-02-17 | 西南交通大学 | Signal noise reduction method and device, terminal equipment and storage medium |
CN118941537A (en) * | 2024-07-26 | 2024-11-12 | 山东鼎欣生物科技有限公司 | Intelligent detection method of sodium acetate impurities based on machine vision |
Also Published As
Publication number | Publication date |
---|---|
CN108896574B (en) | 2020-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108896574B (en) | Bottled liquor impurity detection method and system based on machine vision | |
CN105784722B (en) | On a kind of assembly line in medicinal liquid bottle visible foreign matters detection method and system | |
CN105181714A (en) | Image processing-based bottled liquid impurity detection system and detection method thereof | |
CN109001212A (en) | A kind of stainless steel soup ladle defect inspection method based on machine vision | |
JP4254347B2 (en) | Method and apparatus for detecting foreign matter in liquid in container | |
CN108267455B (en) | Device and method for detecting defects of printed characters of plastic film | |
CN101692056B (en) | Method and device for automatic detection of impurities in health wine | |
CN109550712A (en) | A kind of chemical fiber wire tailfiber open defect detection system and method | |
CN109454006A (en) | Chemical fiber wire ingot is stumbled the device and its detection stage division of a defect on-line checking and classification | |
CN105865570A (en) | Machine vision-based glass bottle liquid level detection method | |
CN102141379A (en) | Novel glass bottle and jar detection device | |
CN110310275B (en) | Chain conveyor belt defect detection method based on image processing | |
CN110648330B (en) | Defect detection method for camera glass | |
CN106370659A (en) | Visual inspection method for bottle packaging quality | |
CN102507598A (en) | High-speed unordered capsule defect detecting system | |
CN116563237A (en) | A hyperspectral image detection method for chicken carcass defects based on deep learning | |
CN108802052A (en) | A kind of detecting system and its detection method about slide fastener defect | |
CN111330874A (en) | Detection device and detection method for pollution or impurity defects of bottom area of medicine bottle | |
CN108520260B (en) | Method for identifying visible foreign matters in bottled oral liquid | |
CN105115986A (en) | System and method for detecting visible foreign substances in traditional Chinese medicine oral liquid bottles | |
CN110174063A (en) | A kind of neutral pen ink height detecting system and detection method based on machine vision | |
CN112577967B (en) | Method for detecting appearance quality of head of medical ampoule bottle | |
CN105973903B (en) | A kind of Oral liquid bottle lid detection method | |
CN211741094U (en) | Surface defect detection device for transparent mirror printing and gold stamping process | |
CN112987356A (en) | Method and device for false detection and filtering of foreign matters at bottom of liquid crystal panel |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |