CN115791829A - Tobacco shred quality online detection system - Google Patents
Tobacco shred quality online detection system Download PDFInfo
- Publication number
- CN115791829A CN115791829A CN202211564030.6A CN202211564030A CN115791829A CN 115791829 A CN115791829 A CN 115791829A CN 202211564030 A CN202211564030 A CN 202211564030A CN 115791829 A CN115791829 A CN 115791829A
- Authority
- CN
- China
- Prior art keywords
- image
- light source
- conveyor belt
- shredded tobacco
- detection system
- 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.)
- Pending
Links
Images
Landscapes
- Manufacturing Of Cigar And Cigarette Tobacco (AREA)
Abstract
Description
技术领域technical field
本发明涉及机器视觉领域,特别是涉及一种烟丝质量在线检测系统。The invention relates to the field of machine vision, in particular to an online quality detection system for shredded tobacco.
背景技术Background technique
随着对烟支质量的要求越来越高,制丝生产过程中存在的杂物也越来越受到重视,目前车间光电除杂设备正常运转,但因原料来料中杂物多,在除杂切丝后发现在烟丝中仍偶尔出现杂物,影响后续正常生产过程及烟丝品质,因此,需要针对该现象制定检测方案,最终将杂物进一步去除,保证烟丝质量。As the requirements for the quality of cigarettes become higher and higher, more and more attention is paid to the impurities in the silk production process. At present, the photoelectric impurity removal equipment in the workshop is operating normally, but due to the large amount of impurities in the incoming raw materials, the removal After shredding, it is found that there are still occasional impurities in the shredded tobacco, which affects the subsequent normal production process and the quality of the cut tobacco. Therefore, it is necessary to formulate a detection plan for this phenomenon, and finally remove the impurities to ensure the quality of the shredded tobacco.
公告号CN214844880U的专利文献提出了一种烟丝杂物视像检测系统,系统包括工业相机、工控机、PLC控制器和速度传感器等,速度传感器用于检测烟丝输送带的传送速度,PLC控制器根据所述传送速度判断烟丝输送带的运行状态并发送给工控机。工控机在烟丝输送带处于运转状态时控制工业相机对烟丝输送带上的烟丝进行拍照得到烟丝图像。工控机上运行有图像处理算法,对烟丝图像进行图像处理并进行杂物识别。但是,该现有的烟丝质量检测系统结构较为复杂,需要实时判断输送带运行状态从而进行检测,且结构安装灵活性较差。The patent literature with the notification number CN214844880U proposes a shredded tobacco debris video detection system. The system includes an industrial camera, an industrial computer, a PLC controller, and a speed sensor. The speed sensor is used to detect the conveying speed of the shredded tobacco conveyor belt. The transmission speed determines the running state of the shredded tobacco conveyor belt and sends it to the industrial computer. When the shredded tobacco conveyor belt is in operation, the industrial computer controls the industrial camera to take pictures of the shredded tobacco on the shredded tobacco conveyor belt to obtain the shredded tobacco image. There is an image processing algorithm running on the industrial computer to process the shredded tobacco image and identify debris. However, the existing shredded tobacco quality detection system has a relatively complex structure, which requires real-time judgment of the running state of the conveyor belt for detection, and the structure and installation flexibility is poor.
发明内容Contents of the invention
本发明的目的是提供一种烟丝质量在线检测系统,与现有技术相比结构简单。The object of the present invention is to provide an online detection system for shredded tobacco quality, which has a simpler structure than the prior art.
为实现上述目的,本发明提供如下技术方案:To achieve the above object, the present invention provides the following technical solutions:
一种烟丝质量在线检测系统,包括:An online detection system for shredded tobacco quality, comprising:
设置于传送带上方的、向所述传送带发出照明光的光源;a light source arranged above the conveyor belt to emit illumination light to the conveyor belt;
设置于所述传送带上方的、获取所述传送带的图像的摄像装置;an imaging device arranged above the conveyor belt to acquire images of the conveyor belt;
用于安装所述光源、所述摄像装置的安装架;A mounting frame for installing the light source and the camera device;
分别与所述光源和所述摄像装置通信连接的、根据所述图像确定所述传送带正常运行时对所述图像进行处理以识别烟丝中杂物的控制装置,所述传送带用于输送烟丝。A control device that is communicatively connected with the light source and the camera device and processes the image to identify impurities in shredded tobacco when determining from the image that the conveyor belt is in normal operation, and the conveyor belt is used to transport shredded tobacco.
可选地,所述安装架包括竖直支撑杆和水平支撑杆,所述水平支撑杆与所述竖直支撑杆连接,所述光源、所述摄像装置分别安装于所述水平支撑杆。Optionally, the installation frame includes a vertical support rod and a horizontal support rod, the horizontal support rod is connected to the vertical support rod, and the light source and the camera device are respectively installed on the horizontal support rod.
可选地,所述光源为条形,所述光源沿着所述水平支撑杆长度方向布置。Optionally, the light source is bar-shaped, and the light source is arranged along the length direction of the horizontal support rod.
可选地,所述光源通过光源连接件与所述水平支撑杆连接,所述光源连接件包括第一T型夹和第一连接件,所述第一T型夹包括连接孔,所述水平支撑杆穿过该连接孔;Optionally, the light source is connected to the horizontal support bar through a light source connecting piece, the light source connecting piece includes a first T-shaped clip and a first connecting piece, the first T-shaped clip includes a connecting hole, and the horizontal The support rod passes through the connecting hole;
所述第一连接件与所述第一T型夹连接,所述第一连接件设置有第三螺孔和弧形槽口,在所述光源一端设置有并列的第一螺孔和第二螺孔,通过螺栓将所述第三螺孔与所述第一螺孔对应连接,通过螺栓将所述弧形槽口与所述第二螺孔对应连接。The first connecting piece is connected with the first T-shaped clip, the first connecting piece is provided with a third screw hole and an arc-shaped notch, and one end of the light source is provided with a parallel first screw hole and a second screw holes, the third screw hole is correspondingly connected with the first screw hole through bolts, and the arc-shaped notch is correspondingly connected with the second screw hole through bolts.
可选地,所述摄像装置通过摄像连接件与所述水平支撑杆连接,所述摄像连接件包括第二T型夹和第二连接件,所述第二T型夹包括连接孔,所述水平支撑杆穿过该连接孔;Optionally, the camera device is connected to the horizontal support bar through a camera connector, the camera connector includes a second T-shaped clip and a second connector, the second T-shaped clip includes a connection hole, the The horizontal support rod passes through the connecting hole;
所述第二连接件与所述第二T型夹连接,所述第二连接件包括用于安装所述摄像装置的槽。The second connecting piece is connected with the second T-shaped clip, and the second connecting piece includes a slot for installing the camera device.
可选地,所述第一T型夹的连接孔设置有断口,在该断口设置有从该断口一端贯通至另一端的螺孔,通过螺栓穿入螺孔以调节该连接孔的松紧度;Optionally, the connection hole of the first T-shaped clip is provided with a fracture, and a screw hole passing from one end of the fracture to the other end is provided in the fracture, and a bolt is inserted into the screw hole to adjust the tightness of the connection hole;
或者,所述第二T型夹的连接孔设置有断口,在该断口设置有从该断口一端贯通至另一端的螺孔,通过螺栓穿入螺孔以调节该连接孔的松紧度。Alternatively, the connecting hole of the second T-shaped clip is provided with a fracture, and a screw hole passing from one end of the fracture to the other end is provided in the fracture, and the tightness of the connecting hole is adjusted by passing a bolt into the screw hole.
可选地,所述控制装置对所述图像进行处理以识别烟丝中杂物包括所述控制装置用于:将所述图像转化到预设颜色空间,筛选出所述图像中的异常像素,所述异常像素是指像素的第一分量值、第二分量值和第三分量值超出第一预设范围的像素,若多个所述异常像素构成连通域且该连通域包括的异常像素的数量大于第一预设值,则判定该连通域对应杂物。Optionally, the processing of the image by the control device to identify impurities in shredded tobacco includes that the control device is used to: transform the image into a preset color space, filter out abnormal pixels in the image, and The abnormal pixel refers to the pixel whose first component value, second component value and third component value exceed the first preset range, if a plurality of the abnormal pixels form a connected domain and the connected domain includes abnormal pixels If the number is greater than the first preset value, it is determined that the connected domain corresponds to debris.
可选地,所述控制装置还用于:获取所述图像的预设颜色通道图像,筛选出所述预设颜色通道图像中像素值处于第二预设范围的像素,若像素值处于所述第二预设范围的像素与所述图像的像素数量占比大于等于第二预设值,则判定所述传送带上无烟丝。Optionally, the control device is further configured to: acquire a preset color channel image of the image, and filter out pixels whose pixel values are in a second preset range in the preset color channel image, if the pixel value is in the If the ratio of the pixels in the second preset range to the number of pixels in the image is greater than or equal to a second preset value, then it is determined that there is no shredded tobacco on the conveyor belt.
可选地,所述控制装置根据所述图像确定所述传送带正常运行包括所述控制装置用于:对所述图像二值化处理以及进行形态学开运算处理,得到二值图像,计算所述二值图像中像素值为非零的像素的总面积与所述二值图像的总面积的比值,若所述比值在第三预设范围内,则判定所述传送带上有烟丝且所述传送带停止运行。Optionally, the control device determining the normal operation of the conveyor belt according to the image includes the control device being used to: binarize the image and perform morphological open operation processing to obtain a binary image, and calculate the The ratio of the total area of pixels with non-zero pixel values in the binary image to the total area of the binary image, if the ratio is within a third preset range, it is determined that there is shredded tobacco on the conveyor belt and the conveyor belt stop running.
可选地,所述摄像装置用于对所述传送带进行行扫描,获得连续的多帧行图像,将连续的预设数量帧所述行图像依次拼接,得到所述传送带的所述图像。Optionally, the camera device is configured to scan the conveyor belt to obtain a continuous multi-frame row image, and sequentially splicing the row images of a predetermined number of consecutive frames to obtain the image of the conveyor belt.
由上述技术方案可知,本发明所提供的一种烟丝质量在线检测系统,包括:设置于传送带上方的、向传送带发出照明光的光源,设置于传送带上方的、获取传送带的图像的摄像装置,用于安装光源、摄像装置的安装架,分别与光源和摄像装置通信连接的、根据图像确定传送带正常运行时对图像进行处理以识别烟丝中杂物的控制装置,传送带用于输送烟丝。本发明的烟丝质量在线检测系统实现了检测传送带上输送的烟丝中杂物,与现有技术相比本发明的烟丝质量在线检测系统结构简单。It can be known from the above technical solution that the cut tobacco quality online detection system provided by the present invention includes: a light source arranged above the conveyor belt to emit illuminating light to the conveyor belt; an imaging device arranged above the conveyor belt to obtain images of the conveyor belt; The installation frame for installing the light source and the camera device is connected with the light source and the camera device respectively, and the control device for processing the image to identify impurities in the shredded tobacco is determined according to the image when the conveyor belt is in normal operation. The conveyor belt is used to transport the shredded tobacco. The shredded tobacco quality on-line detection system of the present invention realizes the detection of impurities in the shredded tobacco conveyed on the conveyor belt, and compared with the prior art, the shredded tobacco quality on-line detection system of the present invention has a simple structure.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本发明一实施例提供的一种烟丝质量在线检测系统的示意图;Fig. 1 is the schematic diagram of a kind of cut tobacco quality on-line detection system provided by an embodiment of the present invention;
图2为图1所示的水平支撑杆与光源、摄像装置连接的示意图;Fig. 2 is a schematic diagram of the connection between the horizontal support bar shown in Fig. 1 and the light source and camera device;
图3为本发明一实施例的烟丝质量在线检测系统的控制平台的示意图;Fig. 3 is the schematic diagram of the control platform of the cut tobacco quality on-line detection system of an embodiment of the present invention;
图4为本发明一实施例中传送带有烟丝且正常运行时的图像;Fig. 4 is an image of conveying shredded tobacco and operating normally in one embodiment of the present invention;
图5-1为本发明一实施例中传送带有烟丝但停止运行时的图像;Fig. 5-1 is the image when conveying shredded tobacco but stopping running in an embodiment of the present invention;
图5-2为对图5-1所示图像截取的中间区域;Figure 5-2 is the middle area intercepted from the image shown in Figure 5-1;
图5-3为对图5-2所示图像转化后的灰度图;Figure 5-3 is the converted grayscale image of the image shown in Figure 5-2;
图5-4为对图5-3所示图像进行二值化后的图像;Figure 5-4 is the image after binarization of the image shown in Figure 5-3;
图5-5为对图5-4所示图像进行形态学开运算后的图像;Figure 5-5 is the image after performing morphological opening operation on the image shown in Figure 5-4;
图6为本发明一实施例的烟丝质量在线检测系统的运行流程图。Fig. 6 is an operation flow chart of the on-line detection system for shredded tobacco quality according to an embodiment of the present invention.
说明书附图中的附图标记包括:The reference signs in the accompanying drawings of the specification include:
1-底座,2-竖直支撑杆,3-水平支撑杆,4-传送带,5-十字连接夹,6-光源连接件,7-光源,8-摄像连接件,9-摄像装置,10-控制平台,11-第一T型夹,12-第一连接件,13-第三螺孔,14-弧形槽口,15-第二T型夹,16-第二连接件,17-控制装置,18-光源控制器,19-报警装置。1-base, 2-vertical support rod, 3-horizontal support rod, 4-conveyor belt, 5-cross connection clip, 6-light source connector, 7-light source, 8-camera connector, 9-camera device, 10- Control platform, 11-first T-clip, 12-first connecting piece, 13-third screw hole, 14-arc notch, 15-second T-clip, 16-second connecting piece, 17-control Device, 18-light source controller, 19-alarm device.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described The embodiments are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.
本实施例提供一种烟丝质量在线检测系统,包括:This embodiment provides an online detection system for shredded tobacco quality, including:
设置于传送带上方的、向所述传送带发出照明光的光源;a light source arranged above the conveyor belt to emit illumination light to the conveyor belt;
设置于所述传送带上方的、获取所述传送带的图像的摄像装置;an imaging device arranged above the conveyor belt to acquire images of the conveyor belt;
用于安装所述光源、所述摄像装置的安装架;A mounting frame for installing the light source and the camera device;
分别与所述光源、所述摄像装置通信连接的、根据所述图像确定所述传送带正常运行时对所述图像进行处理以识别烟丝中杂物的控制装置,所述传送带用于输送烟丝。A control device that is respectively connected to the light source and the camera device in communication and processes the image to identify impurities in shredded tobacco when the conveyor belt is in normal operation according to the image, and the conveyor belt is used to transport shredded tobacco.
通过安装架将光源、摄像装置安装,光源向传送带发出照明光,通过摄像装置获取传送带的图像,控制装置根据获取的传送带图像,当根据图像确定传送带正常运行时,对图像进行处理以识别烟丝中杂物。本实施例的烟丝质量在线检测系统实现了检测传送带上输送的烟丝中杂物,与现有技术相比本烟丝质量在线检测系统结构简单。The light source and the camera device are installed through the mounting frame, the light source emits illumination light to the conveyor belt, and the image of the conveyor belt is obtained by the camera device, and the control device processes the image to identify the dust in the shredded tobacco when it is determined that the conveyor belt is in normal operation according to the acquired image of the conveyor belt. sundries. The cut tobacco quality online detection system of this embodiment realizes the detection of impurities in the cut tobacco conveyed on the conveyor belt. Compared with the prior art, the structure of the cut tobacco quality online detection system is simple.
本实施例中,对光源的类型、结构不做限定,光源可以采用但不限于条形光源。对摄像装置的类型、结构不做限定,可采用但不限于工业相机。In this embodiment, the type and structure of the light source are not limited, and the light source may be but not limited to a strip light source. The type and structure of the camera device are not limited, and industrial cameras can be used but not limited to.
在一些实施方式中,安装架包括竖直支撑杆和水平支撑杆,所述水平支撑杆与所述竖直支撑杆连接,所述光源、所述摄像装置分别安装于所述水平支撑杆,使光源、摄像装置位于传送带上方。In some embodiments, the installation frame includes a vertical support rod and a horizontal support rod, the horizontal support rod is connected to the vertical support rod, and the light source and the camera device are respectively installed on the horizontal support rod, so that The light source and camera are located above the conveyor belt.
可选地,光源可以为条形,光源沿着水平支撑杆长度方向布置,光源与水平支撑杆固定连接,以将光源稳固地安装。Optionally, the light source may be in the shape of a bar, and the light source is arranged along the length direction of the horizontal support bar, and the light source is fixedly connected with the horizontal support bar, so as to install the light source stably.
可选地,光源可通过光源连接件与所述水平支撑杆连接,所述光源连接件包括第一T型夹和第一连接件,所述第一T型夹包括连接孔,所述水平支撑杆穿过该连接孔;所述第一连接件与所述第一T型夹连接,所述第一连接件设置有第三螺孔和弧形槽口,在所述光源一端设置有并列的第一螺孔和第二螺孔,通过螺栓将所述第三螺孔与所述第一螺孔对应连接,通过螺栓将所述弧形槽口与所述第二螺孔对应连接。示例地可参考图1和图2,图1为一实施例提供的一种烟丝质量在线检测系统的示意图,图2为图1所示的水平支撑杆与光源、摄像装置连接的示意图。如图2所示,光源7通过光源连接件6与水平支撑杆3连接,光源连接件6包括第一T型夹11和第一连接件12,第一T型夹11包括连接孔,使水平支撑杆3穿过第一T型夹11的连接孔。优选地,第一T型夹11的连接孔设置有断口,在该断口设置有从该断口一端贯通至另一端的螺孔,通过螺栓穿入螺孔以调节该连接孔的松紧度,也方便于将第一T型夹11拆下。可通过松紧第一T型夹11灵活调整光源7的前后角度和左右位置。Optionally, the light source can be connected to the horizontal support bar through a light source connecting piece, the light source connecting piece includes a first T-shaped clip and a first connecting piece, the first T-shaped clip includes a connecting hole, and the horizontal support The rod passes through the connecting hole; the first connecting piece is connected with the first T-shaped clip, the first connecting piece is provided with a third screw hole and an arc-shaped notch, and one end of the light source is provided with a juxtaposed The first screw hole and the second screw hole are correspondingly connected to the third screw hole and the first screw hole by bolts, and the arc-shaped notch is correspondingly connected to the second screw hole by bolts. Refer to Figure 1 and Figure 2 for example, Figure 1 is a schematic diagram of an on-line tobacco quality detection system provided by an embodiment, and Figure 2 is a schematic diagram of the connection of the horizontal support rod shown in Figure 1 with the light source and the camera device. As shown in Figure 2, the
第一连接件12设置有第三螺孔13和弧形槽口14,在光源7一端设置有上下并列的第一螺孔和第二螺孔,第三螺孔13与光源7一端处于上方的第一螺孔通过螺栓对应连接,弧形槽口14与光源7一端处于下方的第二螺孔对应,通过螺栓进行固定。一方面可通过旋转光源7改变第二螺孔与弧线槽口14的固定位置,来调整光源7的角度和位置;另一方面可在水平支撑杆3上旋转第一T型夹11,来调整光源7的角度和位置。第一连接件12与第一T型夹11可以通过螺钉固定连接。The first connecting
若光源为条形光源,可参考图2所示,光源7的两端分别与水平支撑杆3连接,光源7的任意一端通过光源连接件6与水平支撑杆3连接。If the light source is a strip light source, as shown in FIG. 2 , both ends of the
可选地,摄像装置9通过摄像连接件与水平支撑杆3连接,所述摄像连接件包括第二T型夹和第二连接件,所述第二T型夹包括连接孔,所述水平支撑杆穿过该连接孔;所述第二连接件与所述第二T型夹连接,所述第二连接件包括用于安装所述摄像装置的槽。示例地可参考图1和图2所示,摄像装置9通过摄像连接件8与水平支撑杆3连接,摄像连接件8包括第二T型夹15和第二连接件16,第二T型夹15包括连接孔,使水平支撑杆3穿过该连接孔。第二连接件16包括槽,摄像装置9安装于槽内。摄像装置9可通过螺钉与第二连接件16固定连接。第二连接件16与第二T型夹15可以通过螺钉固定连接。Optionally, the camera device 9 is connected to the
优选地,第二T型夹15的连接孔可设置有断口,在该断口设置有从该断口一端贯通至另一端的螺孔,通过螺栓穿入螺孔以调节该连接孔的松紧度,也方便于将第二T型夹15拆下。可通过松紧第二T型夹15灵活调整摄像装置9的前后角度和左右位置。Preferably, the connecting hole of the second T-shaped
可选地,水平支撑杆3与竖直支撑杆2可通过十字连接夹5连接。可通过松紧十字连接夹5的螺栓灵活调整水平支撑杆3的高度,以调整光源7和摄像装置9的高度。进一步地可参考图1所示,安装架还可包括底座1,竖直支撑杆2固定于底座1上。底座1可以为重力底座,使安装架保持稳定。Optionally, the
优选地,光源7和摄像装置9可以位于传送带4的正上方,摄像装置9可以对应位于条形光源7的中间位置,这样光源7向传送带4发出照明光,摄像装置9获取的传送带图像光照均匀,有利于有效地识别出烟丝中杂物。Preferably, the
本实施例中,对控制装置的类型不做限定,控制装置可采用但不限于工控机。可选地,控制装置可设置于控制平台。在一些实施方式中,可参考图3,图3为一实施例的烟丝质量在线检测系统的控制平台的示意图,控制平台10还可包括光源控制器18,光源控制器18用于控制光源7开启、关闭以及控制光源7发出的照明光亮度。控制平台10还可包括与控制装置17通信连接的报警装置19,能够在控制装置17根据图像检测出烟丝中存在杂物时发出报警信号。控制平台10还可包括电源,用于向光源7、摄像装置9、控制装置17或者报警装置19供电。In this embodiment, the type of the control device is not limited, and the control device may be, but not limited to, an industrial computer. Optionally, the control device can be set on the control platform. In some implementations, refer to FIG. 3 , which is a schematic diagram of a control platform of an online shredded tobacco quality detection system according to an embodiment. The
在一些实施方式中,摄像装置9包括线扫描摄像装置。摄像装置9用于对所述传送带4进行行扫描,获得连续的多帧行图像,将连续的预设数量帧所述行图像依次拼接,得到所述传送带4的所述图像。传送带4的行对应于传送带4的宽度方向。摄像装置9实时地对传送带4行扫描,依次地获得每一帧行图像,每获得连续的预设数量帧行图像时将该连续的预设数量帧行图像拼接。本实施例中,对预设数量的取值不做限定,在实际应用中可以根据检测情况进行设置。示例地对传送带4行扫描获得的一帧行图像分辨率为2048*2,将连续的512帧行图像拼接,得到分辨率为2048*1024的图像。摄像装置9可以采用线阵相机。In some embodiments, the camera 9 comprises a line scan camera. The camera device 9 is used for line scanning the conveyor belt 4 to obtain continuous multi-frame line images, and sequentially splicing the line images of a predetermined number of consecutive frames to obtain the image of the conveyor belt 4 . The rows of the conveyor belts 4 correspond to the width direction of the conveyor belts 4 . The camera device 9 scans four lines of the conveyor belt in real time, sequentially obtains each frame and line of images, and stitches the continuous preset number of frames and lines of images each time a predetermined number of consecutive frames of lines of images are obtained. In this embodiment, there is no limitation on the value of the preset number, which can be set according to the detection situation in practical applications. As an example, the resolution of a frame of line images obtained by scanning 4 lines of the conveyor belt is 2048*2, and 512 consecutive frames of line images are spliced to obtain an image with a resolution of 2048*1024. The imaging device 9 may adopt a line scan camera.
在一些实施方式中,控制装置17对所述图像进行处理以识别烟丝中杂物包括所述控制装置17用于:将所述图像转化到预设颜色空间,筛选出所述图像中的异常像素,所述异常像素是指像素的第一分量值、第二分量值和第三分量值超出第一预设范围的像素,若多个所述异常像素构成连通域且该连通域包括的异常像素的数量大于第一预设值,则判定该连通域对应杂物。In some embodiments, the processing of the image by the
像素的第一分量值、第二分量值和第三分量值是指预设颜色空间中像素的第一分量值、第二分量值和第三分量值。The first component value, the second component value and the third component value of the pixel refer to the first component value, the second component value and the third component value of the pixel in the preset color space.
像素的第一分量值、第二分量值和第三分量值超出第一预设范围可以是像素的第一分量值超出第一分量预设范围且第二分量值超出第二分量预设范围且第三分量值超出第三分量预设范围。本实施例中,对第一分量预设范围、第二分量预设范围和第三分量预设范围分别不做具体限定,在实际应用中,可以通过实验或者根据基于烟丝图像的检测经验,确定出在预设颜色空间的图像中对应是烟丝的像素各个分量值的范围,设定各个分量预设范围,来检测异常像素。The first component value, the second component value, and the third component value of the pixel are out of the first preset range, which may be that the first component value of the pixel is out of the first component preset range and the second component value is out of the second component preset range. range and the value of the third component is outside the preset range of the third component. In this embodiment, there are no specific limitations on the preset range of the first component, the preset range of the second component, and the preset range of the third component. In practical applications, it can be determined through experiments or based on the detection experience based on shredded tobacco images. Find the range of each component value of the pixel corresponding to shredded tobacco in the image in the preset color space, and set the preset range of each component to detect abnormal pixels.
可选地,预设颜色空间可以是HSV颜色模型,HSV颜色模型的颜色参数分量包括色度(Hue)、饱和度(Saturation)和亮度(Value)。比如测试中发现,针对已固定的相机参数及光源亮度条件下采集的图像,实验表明超过99%的烟叶颜色位于0≤H≤45、10≤S≤130、60≤V≤255的范围内,将不在该范围内的像素筛选出。Optionally, the preset color space may be an HSV color model, and the color parameter components of the HSV color model include hue (Hue), saturation (Saturation) and brightness (Value). For example, in the test, it was found that for the images collected under fixed camera parameters and light source brightness conditions, the experiment showed that more than 99% of the tobacco leaf colors were within the range of 0≤H≤45, 10≤S≤130, 60≤V≤255, Pixels that are not within this range are filtered out.
本实施例中,对第一预设值的取值不做限定。在实际应用中可以结合对烟丝中杂物的检测精度、检测效率进行设置。示例地,将图像转化到HSV颜色模型,将图像中不在0≤H≤45、10≤S≤130、60≤V≤255范围的像素为异常像素,若异常像素构成的连通域面积大于200像素,将该区域设为异常区域。本实施例中基于烟丝颜色在图像中进行颜色筛选来识别烟丝中杂物,图像处理过程的计算量少。本实施方式中控制装置17对图像进行处理来识别烟丝中杂物的方法,可以应用于采用线扫描摄像装置通过行扫描采集的图像,也可以应用于相机进行一次曝光采集到一帧具有所需分辨率的图像。In this embodiment, the value of the first preset value is not limited. In practical applications, it can be set in combination with the detection accuracy and detection efficiency of impurities in shredded tobacco. For example, the image is converted to the HSV color model, and the pixels in the image that are not in the range of 0≤H≤45, 10≤S≤130, 60≤V≤255 are abnormal pixels, if the area of the connected domain formed by the abnormal pixels is greater than 200 pixels , and set the region as an exception region. In this embodiment, color screening is performed in the image based on the color of the shredded tobacco to identify impurities in the shredded tobacco, and the amount of calculation in the image processing process is small. In this embodiment, the method that the
在一些实施方式中,控制装置17还用于:获取所述图像的预设颜色通道图像,筛选出所述预设颜色通道图像中像素值处于第二预设范围的像素,若像素值处于所述第二预设范围的像素与所述图像的像素数量占比大于等于第二预设值,则判定所述传送带上无烟丝。In some implementations, the
像素值处于第二预设范围的像素与图像的像素数量占比是指像素值处于第二预设范围的像素数量与图像的像素总数量的比值。本实施例中,对预设颜色通道不做限定,在实际应用中可以根据皮带颜色、烟丝颜色选择。对第二预设范围不做限定,对第二预设值的取值不做限定。The ratio of pixels whose pixel values are in the second preset range to the number of pixels in the image refers to the ratio of the number of pixels whose pixel values are in the second preset range to the total number of pixels in the image. In this embodiment, the preset color channels are not limited, and can be selected according to the color of the belt and the color of shredded tobacco in practical applications. There is no limitation on the second preset range, and no limitation on the value of the second preset value.
可选地,对于图像的预设颜色通道图像,可以进行二值化处理,对二值化后的预设颜色通道图像,从图像中筛选像素。示例地,传送带4为白色皮带,烟丝为灰褐色,参考图4所示,图4为一实施例中传送带有烟丝且正常运行时的图像,传送带4无烟丝时只有皮带的白色。将图像的红色通道(R通道)图像进行二值化,在二值化后的R通道图像中,当像素值大于230的像素数量占比超过50%时,判断当前传送带4无烟丝。本实施方式中在根据图像检测烟丝中杂物时,先根据图像判断传送带4有无烟丝,若无烟丝可以停止检测,有助于降低计算量,降低系统功耗。本实施方式中控制装置17对图像进行处理来检测传送带4是否有烟丝的方法,可以应用于采用线扫描摄像装置通过行扫描采集的图像,也可以应用于相机进行一次曝光采集到一帧具有所需分辨率的图像。Optionally, binarization processing may be performed on the preset color channel image of the image, and the pixels of the binarized preset color channel image are screened from the image. For example, the conveyor belt 4 is a white belt, and the shredded tobacco is taupe, as shown in FIG. 4 . FIG. 4 is an image of conveying with shredded tobacco and running normally in one embodiment. When the conveyor belt 4 has no shredded tobacco, there is only the white color of the belt. Binarize the red channel (R channel) image of the image. In the binarized R channel image, when the number of pixels with a pixel value greater than 230 accounts for more than 50%, it is judged that the current conveyor belt 4 has no shredded tobacco. In this embodiment, when detecting debris in the shredded tobacco based on the image, first judge whether there is shredded tobacco on the conveyor belt 4 according to the image, and stop the detection if there is no shredded tobacco, which helps to reduce the amount of calculation and power consumption of the system. In this embodiment, the method that the
在一些实施方式中,控制装置17根据所述图像确定所述传送带4正常运行包括所述控制装置17用于:对所述图像二值化处理以及进行形态学开运算处理,得到二值图像,计算所述二值图像中像素值为非零的像素的总面积与所述二值图像的总面积的比值,若所述比值在第三预设范围内,则判定所述传送带上有烟丝且所述传送带停止运行。In some implementations, the
优选地,对所述图像二值化处理以及进行形态学开运算处理,得到二值图像包括:截取所述图像的中间区域,对所述图像的中间区域二值化处理以及进行形态学开运算处理,得到所述二值图像。在传送带4上烟丝主要分布于传送带4中间区域,截取采集到的图像的中间区域来检测传送带4是否运行,避免图像边缘漏出的白色皮带的影响,有助于提高准确性,也能提高检测效率。Preferably, binarizing the image and performing morphological opening processing to obtain a binary image includes: intercepting the middle region of the image, binarizing the middle region of the image and performing morphological opening operation processing to obtain the binary image. On the conveyor belt 4, shredded tobacco is mainly distributed in the middle area of the conveyor belt 4. Intercept the middle area of the collected image to detect whether the conveyor belt 4 is running, avoiding the influence of the white belt leaking from the edge of the image, which helps to improve accuracy and detection efficiency. .
可选地,对图像二值化处理可包括:将图像转化为灰度图,对灰度图二值化处理。对图像进行形态学开运算处理可包括以预设列矩阵对图像进行形态学开运算处理。对图像进行形态学开运算的操作是为了根据图像中的竖直条纹进行判断。Optionally, binarizing the image may include: converting the image into a grayscale image, and binarizing the grayscale image. Performing morphological opening processing on the image may include performing morphological opening processing on the image with a preset column matrix. The operation of morphological opening operation on the image is to judge according to the vertical stripes in the image.
二值图像中像素值为非零的像素的总面积是指二值图像中所有的像素值为非零的像素的面积之和。本实施例中,对第三预设范围不做限定,在实际应用中可以根据检测情况进行设置。具体地,第三预设范围可以为所述比值大于下阈值且小于上阈值,其中上阈值大于下阈值,下阈值大于0。在传送带4有烟丝且正常运行时图像中也会出现部分条纹,为了避免误判断,避免误将正常情况判定为传送带4停止,这里设置下阈值大于0,即只有图像中条纹数量大于一定值时,才判定停止。The total area of pixels with non-zero pixel values in the binary image refers to the sum of the areas of all pixels with non-zero pixel values in the binary image. In this embodiment, the third preset range is not limited, and may be set according to detection conditions in practical applications. Specifically, the third preset range may be that the ratio is greater than the lower threshold and smaller than the upper threshold, wherein the upper threshold is greater than the lower threshold, and the lower threshold is greater than zero. When the conveyor belt 4 has shredded tobacco and is running normally, some stripes will appear in the image. In order to avoid misjudgment and avoid mistakenly judging the normal situation as the stop of the conveyor belt 4, the lower threshold is set here to be greater than 0, that is, only when the number of stripes in the image is greater than a certain value , it is decided to stop.
示例地可参考图5-1,图5-1为一实施例中传送带有烟丝但停止运行时的图像。进一步可参考图5-2、图5-3、图5-4和图5-5,图5-2为对图5-1所示图像截取的中间区域,图5-3为对图5-2所示图像转化后的灰度图,图5-4为对图5-3所示图像进行二值化后的图像,图5-5为对图5-4所示图像进行形态学开运算后的图像。采集的图像为2048*1024,先截取其中间1024*1024区域,将截取图像转化为灰度图,再以160-255为限进行二值化转化为黑白图,然后以1*100的矩阵进行形态学开运算得到最终二值图。当最终二值图的白色区域大于0.3%且小于10%时,判定传送带4有烟丝但停止运行。若最终二值图的白色区域大于10%,说明传送带4上白色区域较多,可能没有烟丝。本实施方式中在根据图像检测烟丝中杂物时,根据图像判断传送带4是否正常运行,若传送带4停止运行可以停止检测,若传送带4正常运行则进行检测杂物,有助于降低计算量,降低系统功耗。As an example, reference can be made to Fig. 5-1, which is an image of conveying shredded tobacco but stopping operation in an embodiment. Further reference can be made to Figure 5-2, Figure 5-3, Figure 5-4 and Figure 5-5, Figure 5-2 is the middle area of the image shown in Figure 5-1, and Figure 5-3 is the image of Figure 5- The converted grayscale image of the image shown in Figure 2, Figure 5-4 is the image after binarization of the image shown in Figure 5-3, and Figure 5-5 is the morphological open operation of the image shown in Figure 5-4 after the image. The collected image is 2048*1024, first intercept the 1024*1024 area in the middle, convert the intercepted image into a grayscale image, then convert it into a black and white image with a limit of 160-255, and then use a matrix of 1*100 The morphological opening operation obtains the final binary image. When the white area of the final binary image is greater than 0.3% and less than 10%, it is determined that the conveyor belt 4 has shredded tobacco but stops running. If the white area of the final binary image is greater than 10%, it indicates that there are many white areas on the conveyor belt 4, and there may be no shredded tobacco. In this embodiment, when detecting debris in shredded tobacco based on the image, judge whether the conveyor belt 4 is running normally according to the image. If the conveyor belt 4 stops running, the detection can be stopped. If the conveyor belt 4 is running normally, the debris will be detected, which helps to reduce the amount of calculation. Reduce system power consumption.
优选地在一些实施方式中,控制装置17还用于:对所述图像进行双边滤波,对所述图像的低频部分进行模糊处理。双边滤波后的图像在低频部分进行了模糊处理,降低了图像噪声,同时保留了高频部分的图像细节。Preferably, in some implementations, the
控制装置17还用于:对所述图像去背景处理,具体包括对所述图像的左侧边缘区域、右侧边缘区域分别过滤背景,然后利用形态学闭运算对图像处理以扩大背景边缘。示例地,由于传送带4为皮带,颜色为白色,而杂物也包括白色,故应该去除白色背景对检测的影响,由于传送带4背景只出现在图像两侧,故对图像的左侧边缘区域、右侧边缘区域进行处理,对白色背景进行过滤,输出二值图,然后利用形态学闭运算扩大背景边缘,最后输出的二值图作为后续检测的掩膜。比如可以对图像的左侧1/4区域和右侧1/4区域进行过滤背景处理。The
在一些实施方式中,本烟丝质量在线检测系统中控制装置17还用于:对所述图像中判定对应杂物的区域进行标注,将经过标注的所述图像作为训练样本,使用训练样本对搭建的深度学习模型进行训练,得到用于检测传送带4上烟丝中杂物的模型,以使用该模型对采集的图像处理,识别烟丝中杂物。In some embodiments, the
本实施例的烟丝质量在线检测系统在系统运行前期使用机器视觉算法实现杂物和异常的检测与记录,运行过程中积累杂物数据集。在系统运行后期利用积累的杂物图片进行图像标注,从而构建烟丝杂物数据集,并搭建深度学习模型,利用烟丝杂物数据集作为训练样本进行训练,最后将训练好的模型部署到检测软件中,从而进行在线的烟丝质量智能检测。搭建的深度学习模型可以是但不限于YoloV5模型。The cut tobacco quality online inspection system of this embodiment uses machine vision algorithms to detect and record sundries and abnormalities in the early stage of system operation, and accumulates sundry data sets during operation. In the later stage of system operation, the accumulated sundries images are used for image annotation, so as to construct the shredded tobacco sundries data set, build a deep learning model, use the shredded tobacco sundries data set as training samples for training, and finally deploy the trained model to the detection software In order to carry out online intelligent detection of cut tobacco quality. The built deep learning model can be but not limited to the YoloV5 model.
本烟丝质量在线检测系统的检测算法采用前后期过渡的形式,前期采用机器视觉算法,实现简单,无需大量异常数据集,同时能在系统运行过程中积累数据集,但精度有限;后期采用深度学习模型,利用前期积累的数据集能快速学习部署,检测精度较高。前后快速衔接,能有效提高系统上线速度,降低时间成本。The detection algorithm of this cut tobacco quality online detection system adopts the form of transition between the front and the later stage. The machine vision algorithm is used in the early stage, which is simple to implement and does not require a large number of abnormal data sets. At the same time, the data sets can be accumulated during the system operation, but the accuracy is limited; the deep learning is used in the later stage The model can be quickly learned and deployed by using the data set accumulated in the early stage, and the detection accuracy is high. The fast connection between front and back can effectively improve the speed of system launch and reduce time cost.
可参考图6,图6为一实施例的烟丝质量在线检测系统的运行流程图,包括以下过程:Reference can be made to Fig. 6, Fig. 6 is an operation flowchart of an online shredded tobacco quality detection system of an embodiment, including the following processes:
S1系统启动后,连接工业相机并启动光源,进入S2;After the S1 system starts, connect the industrial camera and start the light source, and enter S2;
S2设置工业相机的相关参数和光源的亮度,进入S3;S2 sets the relevant parameters of the industrial camera and the brightness of the light source, and enters S3;
S3开始采集图像,进入S4;S3 starts to collect images and enters into S4;
S4将采集的图像由2048*2拼接为2048*1024得到一帧图像,进入S5;S4 stitches the collected image from 2048*2 to 2048*1024 to obtain a frame of image, and enters S5;
S5分析图像,判断传送带是否正在正常运行,是则进入S6,否则进入S4;S5 analyzes the image to determine whether the conveyor belt is running normally, if yes, enter S6, otherwise enter S4;
S6执行烟丝质量检测算法,根据返回结果判断是否存在杂物或异常,是则进入S7,否则进入S4;S6 executes the shredded tobacco quality detection algorithm, judges whether there are sundries or abnormalities according to the returned result, if yes, enters S7, otherwise enters S4;
S7工控机向报警装置输出报警信号,等待人工进行处理,进入S8,同时继续下一检测周期进入S4;The S7 industrial computer outputs an alarm signal to the alarm device, waits for manual processing, enters S8, and continues the next detection cycle to enter S4;
S8工作人员检查并处理报警信息,确实有杂物,则处理异常后,进行异常处理确认,系统存储异常图片和检测结果;如工作人员检查无杂物,则进行误检测处理确认,系统保存误检测图片,存储检测结果,然后将报警复位。S8 The staff checks and processes the alarm information. If there are indeed sundries, after the abnormality is handled, the abnormality processing confirmation is carried out, and the system stores the abnormal pictures and detection results; Detect pictures, store the detection results, and reset the alarm.
以上对本发明所提供的烟丝质量在线检测系统进行了详细介绍。本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以对本发明进行若干改进和修饰,这些改进和修饰也落入本发明权利要求的保护范围内。The online cut tobacco quality detection system provided by the present invention has been introduced in detail above. In this paper, specific examples are used to illustrate the principle and implementation of the present invention, and the descriptions of the above embodiments are only used to help understand the method and core idea of the present invention. It should be pointed out that for those skilled in the art, without departing from the principle of the present invention, some improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211564030.6A CN115791829A (en) | 2022-12-07 | 2022-12-07 | Tobacco shred quality online detection system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211564030.6A CN115791829A (en) | 2022-12-07 | 2022-12-07 | Tobacco shred quality online detection system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115791829A true CN115791829A (en) | 2023-03-14 |
Family
ID=85417642
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211564030.6A Pending CN115791829A (en) | 2022-12-07 | 2022-12-07 | Tobacco shred quality online detection system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115791829A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116965581A (en) * | 2023-08-18 | 2023-10-31 | 云南烟叶复烤有限责任公司师宗复烤厂 | Intelligent photoelectric impurity removal method based on broken tobacco treatment |
CN119417815A (en) * | 2024-12-30 | 2025-02-11 | 深圳华付技术股份有限公司 | Tobacco debris detection method, device, medium and equipment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1039409A2 (en) * | 1999-03-24 | 2000-09-27 | Symbol Technologies, Inc. | Retro-reflective scan module for electro-optical readers |
CN110648345A (en) * | 2019-09-24 | 2020-01-03 | 中国烟草总公司郑州烟草研究院 | Method and system for detecting flow of tobacco shred materials on conveying belt based on light field imaging |
CN112258466A (en) * | 2020-10-19 | 2021-01-22 | 燕山大学 | A system and method for on-line detection of cold-rolled strip vibration pattern based on grayscale processing |
CN215297166U (en) * | 2021-07-05 | 2021-12-24 | 上海汇扬智能科技有限公司 | Visual detection device with adjustable |
CN114271528A (en) * | 2021-12-09 | 2022-04-05 | 南京大树智能科技股份有限公司 | Secondary online removing device and method for impurities in tobacco shred production |
CN114778561A (en) * | 2022-03-21 | 2022-07-22 | 云南昆船设计研究院有限公司 | A method and system for quality traceability of cut tobacco based on machine vision |
CN219320122U (en) * | 2022-12-07 | 2023-07-07 | 吉林烟草工业有限责任公司 | Online tobacco shred quality detection system |
-
2022
- 2022-12-07 CN CN202211564030.6A patent/CN115791829A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1039409A2 (en) * | 1999-03-24 | 2000-09-27 | Symbol Technologies, Inc. | Retro-reflective scan module for electro-optical readers |
CN110648345A (en) * | 2019-09-24 | 2020-01-03 | 中国烟草总公司郑州烟草研究院 | Method and system for detecting flow of tobacco shred materials on conveying belt based on light field imaging |
CN112258466A (en) * | 2020-10-19 | 2021-01-22 | 燕山大学 | A system and method for on-line detection of cold-rolled strip vibration pattern based on grayscale processing |
CN215297166U (en) * | 2021-07-05 | 2021-12-24 | 上海汇扬智能科技有限公司 | Visual detection device with adjustable |
CN114271528A (en) * | 2021-12-09 | 2022-04-05 | 南京大树智能科技股份有限公司 | Secondary online removing device and method for impurities in tobacco shred production |
CN114778561A (en) * | 2022-03-21 | 2022-07-22 | 云南昆船设计研究院有限公司 | A method and system for quality traceability of cut tobacco based on machine vision |
CN219320122U (en) * | 2022-12-07 | 2023-07-07 | 吉林烟草工业有限责任公司 | Online tobacco shred quality detection system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116965581A (en) * | 2023-08-18 | 2023-10-31 | 云南烟叶复烤有限责任公司师宗复烤厂 | Intelligent photoelectric impurity removal method based on broken tobacco treatment |
CN119417815A (en) * | 2024-12-30 | 2025-02-11 | 深圳华付技术股份有限公司 | Tobacco debris detection method, device, medium and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109916910B (en) | Photovoltaic glass edge defect detection system and corresponding method | |
CN115791829A (en) | Tobacco shred quality online detection system | |
CN102305793A (en) | Method and equipment for detecting appearance quality of product | |
CN105911067A (en) | Cable protective jacket surface defect detector and detection method thereof | |
CN104809725A (en) | Cloth defect visual identify detecting device and method | |
JP2018179698A (en) | Sheet inspection device | |
JP4253527B2 (en) | Automatic discrimination device | |
CN115615998B (en) | Circular magnetic core side defect detection device and method | |
CN117670867A (en) | Industrial defect detection method, device, electronic equipment and storage medium | |
CN219320122U (en) | Online tobacco shred quality detection system | |
CN112683912A (en) | Cloth cover defect visual detection method and device | |
JP4580122B2 (en) | Detecting foreign matter in liquid | |
JP2014106141A (en) | Defect inspection device and defect inspection method | |
JPH04238592A (en) | Automatic bundled bar steel tally device | |
JP3015325B2 (en) | Streak inspection method and device | |
JPH0926400A (en) | Inspecting apparatus for woven fabric | |
CN212658633U (en) | Visual detection mechanism for defects of mask | |
KR101071144B1 (en) | Automatic grading method of lumber | |
JP2000266514A (en) | Metal plate inspection method and device | |
JP4135367B2 (en) | Defect detection method | |
JPH11337324A (en) | Flat glass inspection system | |
JPH0434067A (en) | Cloth inspecting machine | |
JPH06148094A (en) | Method for inspecting mixture of foreign matter of sheetlike product | |
JP7531823B2 (en) | Inspection device and inspection method | |
GB2408323A (en) | Training an image-based inspection system |
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 |