Filter rod detection method and system

Through transmission imaging and image processing technology, the problems of phase and rod jumping defects in filter rod detection are solved, and efficient and accurate detection of transparent visual filter rods is achieved, especially defect identification in high-transmittance sections.

CN115170532BActive Publication Date: 2025-09-16HUBEI CHINA TOBACCO INDUSTRY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210857475.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-20
Publication Date
2025-09-16
Estimated Expiration
2042-07-20

AI Technical Summary

Technical Problem

During the filter rod production process, it is difficult to effectively detect internal and surface defects of transparent visible filter rods, such as phase deviation, rod jumping, dirt, cracks and fissures.

Method used

Transmission imaging technology is used to obtain filter rod images. Through binary segmentation, contour search and feature data comparison, combined with polynomial fitting and difference map segmentation, accurate detection of the transparent and high-transparency sections of the filter rod can be achieved.

Benefits of technology

It realizes the precise detection of filter rod phase and rod jumping, and can identify defects such as dirt, cracks and fissures in the high-transmittance section, thus improving the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170532B_ABST
    Figure CN115170532B_ABST
Patent Text Reader

Abstract

The present application relates to the field of filter rod detection technology, and in particular to a filter rod detection method and system. The filter rod detection method of the present application is based on the characteristics of the filter rod having a transparent section and a high-transmittance section. The phase and rod jump detection of the filter rod can be completed by binary segmentation of the transmission imaging image, contour search of the segmented image, and extraction of feature data of the image after contour search, and comparison with the feature data of the standard image. The feature data includes the length and diameter size data of each section in the filter rod. The fitted grayscale mean corresponding to the pixel points in the image column is obtained by extracting the grayscale average value of the pixel points in the high-transmittance section filter rod image and fitting an N-order polynomial. Then, the grayscale value of the pixel points in the original high-transmittance section filter rod image column is subtracted from the fitted grayscale mean and the absolute value is taken to obtain a difference map corresponding to the original high-transmittance section filter rod image. The difference map is further binary segmented to determine whether the high-transmittance section of the filter rod has defects such as dirt, cracks, and fissures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of filter rod detection, and in particular to a filter rod detection method and system. Background Art

[0002] Transparent visual filter rods include transparent sections and high-transparency sections; transparent visual filter rods are often used in the tobacco field as cigarette filter rods; in the filter rod production process, some unqualified filter rod products are inevitable. The defects of transparent visual filter rods can be mainly divided into internal defects and surface defects. Internal defects include phase and rod jumping, etc. Surface defects include dirt, cracks and cracks on the filter rod surface; among them, phase refers to the fact that theoretically the length of each section of the filter rod is fixed, but due to the influence of production equipment, it may be too long or too short, resulting in phase deviation defects; rod jumping refers to the fact that the high-transparency section and transparent section of the transparent visual filter rod are alternately compounded. If the same material is continuously compounded, rod jumping will form.

[0003] Therefore, how to realize the detection of filter rods has become a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention

[0004] The present invention provides a filter rod detection method and system to solve the problem of detecting filter rod defects.

[0005] The technical solutions provided by the present invention are as follows:

[0006] The present invention provides a filter rod detection method, comprising the following steps:

[0007] Obtain the filter rod image after transmission imaging;

[0008] Performing binary segmentation on the filter rod image to obtain a filter rod image segmented into a transparent segment and a highly transparent segment of the filter rod;

[0009] Performing contour search on the image of the filter rod transparent segment and the high-transparency segment to obtain a filter rod image after corresponding contour search;

[0010] Extracting characteristic data from the filter rod image after the contour search, and comparing it with the characteristic data values ​​extracted from the standard filter rod image to determine whether the filter rod has phase and rod jump defects;

[0011] Extracting a high-transmittance segment image from the filter rod image after binary segmentation, and calculating the grayscale average value of each column of pixels in the high-transmittance segment image to obtain a corresponding column pixel grayscale average value distribution image;

[0012] Performing N-order polynomial fitting on the grayscale average distribution image of the column of pixels to obtain a corresponding polynomial fitting image; N is a positive integer;

[0013] Extracting the grayscale mean corresponding to each column of pixels in the polynomial fitting image, subtracting the grayscale mean of each pixel in the high-transmittance segment image from the grayscale mean in the fitting image corresponding to the column and taking the absolute value, and forming a difference map corresponding to the high-transmittance image based on the absolute value difference;

[0014] The difference image is subjected to binary segmentation to determine whether the high-transmittance filter rod has defects.

[0015] Furthermore, before the binary segmentation of the filter stick image is performed, image cropping is also included; the image cropping specifically includes: setting boundaries for the acquired filter stick image, cropping the background portion of the filter stick image, and obtaining the filter stick image with the background portion cropped.

[0016] Furthermore, before performing contour search on the images of the segmented filter rod transparent segment and high-transparency segment, image inversion is also included. The image inversion specifically includes: inverting the images of the rod transparent segment and high-transparency segment obtained by binary segmentation to obtain corresponding inverted images.

[0017] Furthermore, the objects of the contour search processing include the images of the filter rod transparent segment and the high-transparency segment obtained by binary segmentation, and the inverted image.

[0018] Furthermore, the Nth-order polynomial is a sixth-order polynomial.

[0019] Furthermore, the binary segmentation adopts OTSU threshold segmentation.

[0020] Furthermore, the difference Figure 2 The threshold range in the valued segmentation is 15-30.

[0021] The present invention also provides a filter rod detection system, comprising:

[0022] a transmission unit, the transmission unit comprising a first light source and a second light source, the first light source and the second light source being respectively located on either side of the filter rod detection channel, the first light source and the second light source being used to illuminate the filter rod in the filter rod detection channel so as to perform transmission imaging of the filter rod cavity;

[0023] An imaging unit, comprising a first photographing member and a second photographing member, the first photographing member and the second photographing member being respectively located on either side of the filter rod detection channel, and being used to photograph the filter rod after transmission imaging;

[0024] a first segmentation unit, configured to perform binary segmentation on the filter rod image after transmission imaging captured by the imaging unit, to obtain a filter rod image segmented into a transparent segment and a highly transparent segment of the filter rod;

[0025] A contour search unit, configured to perform contour search on the image obtained by segmenting the filter rod transparent segment and the high-transparency segment to obtain a corresponding contour-searched filter rod image;

[0026] a judgment processing unit, configured to extract feature data from the filter rod image after the contour search and compare the feature data values ​​extracted from the standard filter rod image to determine whether the filter rod has phase and rod jump defects;

[0027] A distribution image processing unit, the distribution image processing unit is used to extract a high-transmittance segment image from the filter rod image after binary segmentation, and calculate the grayscale average value of each column of pixels in the high-transmittance segment image to obtain a corresponding column pixel grayscale average distribution image;

[0028] A polynomial fitting unit, configured to perform N-order polynomial fitting on the grayscale average distribution image of the column of pixels to obtain a corresponding polynomial fitting image;

[0029] a difference map processing unit, configured to extract a grayscale mean corresponding to each column of pixels in the polynomial fitting image, calculate the difference between each pixel in the high-transmittance image and the grayscale mean in the fitting image corresponding to the column, and obtain an absolute value to obtain a difference map corresponding to the high-transmittance image;

[0030] The second segmentation unit is used to perform binary segmentation on the difference map.

[0031] Furthermore, the first segmentation unit and the second segmentation unit are both segmentation units processed using an OTSU threshold algorithm.

[0032] Furthermore, the detection system of the present application also includes a cropping unit, which is used to set boundaries for the filter rod image after transmission imaging to crop the background portion of the filter rod image to obtain the filter rod image with the background portion cropped.

[0033] Furthermore, the detection system of the present application includes a negation unit, which is used to perform negation processing on the images of the rod transparent segment and the high-transparency segment obtained by the first segmentation unit to obtain corresponding negated images.

[0034] Furthermore, the detection system of the present application also includes a rejection unit arranged on the side of the filter rod detection channel, the rejection unit includes a power unit and a rejection head connected to the output end of the power unit. Under the drive of the power unit, the rejection head rejects defective filter rods after detection.

[0035] The present invention also provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the above-mentioned filter rod detection method.

[0036] Beneficial effects:

[0037] The filter rod detection method of the present application, based on the characteristics of the filter rod having a transparent section and a high-transmittance section, can complete the phase and rod jump detection of the filter rod by binary segmentation of the transmission imaging image, searching for the contour of the segmented image, extracting the feature data of the image after the contour search, and comparing it with the feature data of the standard image; the feature data includes the length and diameter size data of each segment in the filter rod. The fitted grayscale mean corresponding to the image column pixel points is obtained by extracting the grayscale average of the column pixel points in the high-transmittance section filter rod image and fitting an Nth-order polynomial; then, the grayscale value of the original high-transmittance section filter rod image column pixel points is taken as the difference between the fitted grayscale mean and the absolute value, obtaining a difference map corresponding to the original high-transmittance section filter rod image. The difference map is further binary segmented to determine whether the high-transmittance section of the filter rod has defects such as dirt, cracks, and fissures. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 This is a flowchart of a filter rod detection method for this application;

[0040] Figure 2 This is a schematic diagram of the filter rod structure for transmission imaging in this application;

[0041] Figure 3 Schematic diagram of image transformation for binary segmentation, inversion and contour search of transmission imaging filter rod images in the present application method,

[0042] Figure 4 for Figure 3 Schematic diagram of the high-transmittance filter rod image extracted from ;

[0043] Figure 5 This is the grayscale average distribution diagram of the pixels in the high-transmittance column of the filter rod in the method of this application (the horizontal axis is the column number, and the vertical axis is the grayscale average);

[0044] Figure 6This is a diagram showing the fitting effect of the fitting curve formed by the N-order polynomial fitting method of this application and the grayscale average value distribution diagram of the high-transmittance column pixel points;

[0045] Figure 7 The original image, difference image and difference image of the transmission imaging filter rod in the present application method are Figure 2 The effect of value segmentation is shown in the figure.

[0046] Figure 8 This is a schematic diagram of the distribution structure of the transmission unit and the image unit in a filter rod detection system of the present application;

[0047] Reference numerals: 10, filter rod, 11, transparent section, 12, high-transparency section, 13, first camera, 14, first light source, 15, second light source, 16, second camera, 17, detection channel. DETAILED DESCRIPTION

[0048] In order to help those skilled in the art better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of this application.

[0049] It should be noted that when an element is referred to as being “fixed on” or “set on” another element, it can be directly on the other element or indirectly set on the other element; when an element is referred to as being “connected to” another element, it can be directly connected to the other element or indirectly connected to the other element.

[0050] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0051] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.

[0052] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the efficacy and purpose that can be achieved by this application.

[0053] like Figure 1-8 As shown, Figure 1 The flowchart of a filter rod detection method of the present invention includes the following steps:

[0054] Obtain the filter rod image after transmission imaging;

[0055] Performing binary segmentation on the filter rod image to obtain a filter rod image segmented into a transparent segment and a highly transparent segment of the filter rod;

[0056] Performing contour search on the image of the filter rod transparent segment and the high-transparency segment to obtain a filter rod image after corresponding contour search;

[0057] Extracting characteristic data from the filter rod image after the contour search, and comparing it with the characteristic data values ​​extracted from the standard filter rod image to determine whether the filter rod has phase and rod jump defects;

[0058] Extracting a high-transmittance segment image from the filter rod image after binary segmentation, and calculating the grayscale average value of each column of pixels in the high-transmittance segment image to obtain a corresponding column pixel grayscale average value distribution image;

[0059] Performing N-order polynomial fitting on the grayscale average distribution image of the column of pixels to obtain a corresponding polynomial fitting image; N is a positive integer;

[0060] Extracting the grayscale mean corresponding to each column of pixels in the polynomial fitting image, subtracting the grayscale mean of each pixel in the high-transmittance segment image from the grayscale mean in the fitting image corresponding to the column and taking the absolute value, and forming a difference map corresponding to the high-transmittance image based on the absolute value difference;

[0061] The difference image is subjected to binary segmentation to determine whether the high-transmittance filter rod has defects.

[0062] In the above scheme, based on the characteristics of the filter rod having a transparent section and a high-transmittance section, the phase and rod jump detection of the filter rod can be completed by binary segmentation of the transmission imaging image, searching for the contour of the segmented image, and extracting the feature data of the image after the contour search and comparing it with the feature data of the standard image; the feature data includes the length and diameter size data of each section in the filter rod. The fitted grayscale mean corresponding to the image column pixel points is obtained by extracting the grayscale average value of the column pixel points in the high-transmittance section filter rod image and fitting an N-order polynomial; then, the grayscale value of the original high-transmittance section filter rod image column pixel points is taken as the difference between the fitted grayscale mean and the absolute value, and a difference map corresponding to the original high-transmittance section filter rod image is obtained. The difference map is further binary segmented to determine whether the high-transmittance section of the filter rod has defects such as dirt, cracks and fissures; the entire filter rod defect detection is accurate.

[0063] It should be noted that the above mainly calculates the grayscale mean of the pixel points and fits to form a difference map detection for the high-transmittance segment in the filter rod, and does not perform corresponding processing on the transparent segment in the filter rod. This is because once the above-mentioned surface defects exist in the transparent segment, they will be very obvious in the image of the above-mentioned phase and rod jumping detection process.

[0064] As a preferred embodiment, the filter rod image further includes image cropping before binary segmentation is performed on the filter rod image; the image cropping specifically includes: setting boundaries for the acquired filter rod image, cropping the background portion of the filter rod image, and obtaining a filter rod image with the background portion cropped; the filter rod image subjected to subsequent binary segmentation processing is the filter rod image with the background portion cropped; by setting and cropping the boundaries of the transmission imaging filter rod image, interference from the background portion in the transmission imaging filter rod image is avoided, and the specifications of the transmission filter rod image are unified.

[0065] As a preferred method, before performing contour search on the images of the segmented filter rod transparent segment and high-transmittance segment, image inversion is also included. The image inversion specifically includes: inverting the images of the rod transparent segment and high-transmittance segment obtained by binary segmentation to obtain corresponding inverted images.

[0066] More preferably, the objects of contour search processing include the binary segmented transparent segment and high-transparency segment images of the filter rod and the inverted image contour search; the objects of subsequent extraction and comparison include the feature data extraction and comparison of the image after the binary segmented transparent segment and high-transparency segment image contour search, and the feature data extraction and comparison of the image after the inverted image contour search. Figure 3 .

[0067] By adding inversion processing and searching the outline of the binary segmentation image and the reverse binary segmentation image, the transparent section and the high-transparency end of the filter rod can be further segmented. By adding the inverted image outline search and extracting and comparing the image feature data, the filter rod phase and rod jumping detection can be achieved more accurately.

[0068] As a preferred embodiment, the N-order polynomial is a sextic polynomial; the general formula of the N-order polynomial used for fitting in this application is specifically:

[0069]

[0070] This application uses quadratic, cubic, quartic, quintic, sextic and septic polynomial fitting respectively. Figure 6 As shown, the larger N is, the better the fitting effect is. However, the larger N is, the more calculation amount and time are involved. Therefore, this application prefers N=6, which can achieve better fitting effect and meet the comprehensive balance of calculation amount, calculation time and fitting effect.

[0071] The binary segmentation adopts OTSU threshold segmentation. The filter rod image of the transmission imaging is segmented by OTSU threshold. Its advantage is that it can adaptively segment the threshold. For the OTSU threshold segmentation in the difference image, its threshold needs to be learned and adjusted. The learning and adjustment output shows that when the threshold range of the OTSU threshold segmentation in the difference image is 15-30, the segmented image is accurate and clear, which is convenient for identifying filter rod defects. Figure 7 As shown, from left to right are the original image of the high-transmittance filter rod of the transmission imaging, the difference image formed after fitting, and the effect image of OTSU threshold segmentation on the difference image. In the effect image, the first one is the effect image of the adaptive threshold, the second one is the effect image of the threshold of 15, the third one is the effect image of the threshold of 20, the fourth one is the effect image of the threshold of 25, and the fifth one is the effect image of the threshold of 30.

[0072] The present invention also provides a filter rod detection system, comprising:

[0073] A transmission unit, wherein the transmission unit includes a first light source 14 and a second light source 15, and the first light source and the second light source are respectively located on both sides of the filter rod detection channel 17, and the first light source and the second light source are used to illuminate the filter rod 10 in the filter rod detection channel, so that the filter rod cavity is transmitted and imaged; preferably, the first light source is a coaxial light source, and the second light source is a point light source, the point light source serves as backlight, and the coaxial light source is used for front lighting, and the two light sources together illuminate the filter rod in the detection channel, and the brightness of the first light source and the second light source is adjusted so that the filter rod cavity is transmitted and imaged under the light and dark contrast of the first light source and the second light source, and the transparent section 11 and the high-transmittance section 12 of the filter rod are clearly displayed, so as to observe the situation inside the filter rod cavity.

[0074] The imaging unit includes a first photographing member and a second photographing member, which are respectively located on both sides of the filter rod detection channel, and are used to photograph the filter rod after transmission imaging; the first photographing member and the second photographing member are divided into a first camera 13 and a second camera 16. In the present application, a dual camera is used to photograph both sides of the filter rod to complete the sampling of images on both sides of the filter rod; more preferably, the paired first light source and the second light source in the present application also adopt two groups, and the first camera and the second camera are corresponding to the two groups of paired dual light sources; the first camera and the second camera are imaged and detected in an opposing manner on the left and right / upper and lower sides of the filter rod, and each camera corresponds to a dual light source, namely a front coaxial light source and a back point light source; the coaxial light source and the camera are on the same side of the filter rod, and illuminate from the front of the filter rod. The stronger the reflectivity of the filter rod, the brighter the image, and the weaker the reflectivity of the filter rod, the darker the image; the backlight is mainly used to detect defects inside the filter rod, and the coaxial light is mainly used to detect defects on the surface of the filter rod. The two groups of camera light sources are respectively located on both sides of the filter rod and slightly staggered; see for details Figure 8 .

[0075] The transparent and high-transmittance sections of a transparent visual filter rod are affected by backlighting and direct light, respectively. The brightness of these two materials in the image can be controlled by adjusting the light intensity. To facilitate image segmentation, a certain brightness difference is generally created between the transparent and high-transmittance sections. This system adopts a strategy of brightening the transparent section and dimming the high-transmittance section. Since the transparent section generally has strong light transmission, it is difficult to adjust the light source controller to achieve a low but appropriate brightness. On the other hand, a strong backlight facilitates imaging the interior of the transparent cavity, preserving the conditions for detecting defects within the filter rod's transparent cavity.

[0076] a first segmentation unit, configured to perform binary segmentation on the filter rod image after transmission imaging captured by the imaging unit, to obtain a filter rod image segmented into a transparent segment and a highly transparent segment of the filter rod;

[0077] A contour search unit, configured to perform contour search on the image obtained by segmenting the filter rod transparent segment and the high-transparency segment to obtain a corresponding contour-searched filter rod image;

[0078] a judgment processing unit, configured to extract feature data from the filter rod image after the contour search and compare the feature data values ​​extracted from the standard filter rod image to determine whether the filter rod has phase and rod jump defects;

[0079] A distribution image processing unit, the distribution image processing unit is used to extract a high-transmittance segment image from the filter rod image after binary segmentation, and calculate the grayscale average value of each column of pixels in the high-transmittance segment image to obtain a corresponding column pixel grayscale average distribution image;

[0080] A polynomial fitting unit, configured to perform N-order polynomial fitting on the grayscale average distribution image of the column of pixels to obtain a corresponding polynomial fitting image;

[0081] a difference map processing unit, configured to extract a grayscale mean corresponding to each column of pixels in the polynomial fitting image, calculate the difference between each pixel in the high-transmittance image and the grayscale mean in the fitting image corresponding to the column, and obtain an absolute value to obtain a difference map corresponding to the high-transmittance image;

[0082] The second segmentation unit is used to perform binary segmentation on the difference image, and then clearly display whether the filter rod has defects based on the binary segmentation image of the difference image, thereby completing the defect detection of the high-transmittance section of the filter rod.

[0083] As a preferred embodiment, both the first segmentation unit and the second segmentation unit are segmentation units processed by the OTSU threshold algorithm; the threshold value range of the second segmentation unit is 15-30.

[0084] The detection system of the present application also includes a cropping unit for setting boundaries on the filter rod image after transmission imaging to crop the background portion of the filter rod image, thereby obtaining a filter rod image with the background portion cropped. This not only eliminates interference from the background portion of the transmission imaging filter rod image, but also achieves uniform specifications for the transmission filter rod image.

[0085] The detection system of the present application includes a negation unit, which is used to perform negation processing on the images of the rod transparent segment and the high-transparency segment obtained by the first segmentation unit to obtain corresponding negated images.

[0086] As a preferred embodiment, the detection system of the present application further includes a rejection unit arranged on the side of the filter rod detection channel, the rejection unit including a power unit and a rejection head connected to the output end of the power unit. The rejection head is driven by the power unit to reject defective filter rods after detection. The power unit is preferably a cylinder or oil cylinder element. The power element can also adopt a negative pressure adsorption device. The rejection head is provided with an adsorption hole. The rejection head is aligned with and close to the filter rod of the detection channel. The adsorption hole of the rejection head is connected to the negative pressure adsorption device through a pipeline. The negative pressure adsorption device provides negative pressure adsorption power, and the rejection head adsorbs and rejects defective products.

[0087] The present invention also provides an electronic device comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the above-mentioned filter rod detection method.

[0088] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A filter rod detection method, characterized in that: The following steps are involved: Obtain the filter rod image after transmission imaging; Performing binary segmentation on the filter rod image to obtain a filter rod image segmented into a transparent segment and a highly transparent segment of the filter rod; Performing contour search on the image of the filter rod transparent segment and the high-transparency segment to obtain a filter rod image after corresponding contour search; Extracting characteristic data from the filter rod image after the contour search, and comparing it with the characteristic data values ​​extracted from the standard filter rod image to determine whether the filter rod has phase and rod jump defects; Extracting a high-transmittance segment image from the filter rod image after binary segmentation, and calculating the grayscale average value of each column of pixels in the high-transmittance segment image to obtain a corresponding column pixel grayscale average value distribution image; Performing N-order polynomial fitting on the grayscale average distribution image of the column of pixels to obtain a corresponding polynomial fitting image; N is a positive integer; Extracting the grayscale mean corresponding to each column of pixels in the polynomial fitting image, subtracting the grayscale mean of each pixel in the high-transmittance segment image from the grayscale mean in the fitting image corresponding to the column and taking the absolute value, and forming a difference map corresponding to the high-transmittance image based on the absolute value difference; The difference image is subjected to binary segmentation to determine whether the high-transmittance filter rod has defects.

2. The filter rod detection method according to claim 1, characterized in that: Before the binary segmentation of the filter stick image is performed, image cropping is also included; the image cropping specifically includes: setting boundaries for the acquired filter stick image, cropping the background portion of the filter stick image, and obtaining the filter stick image with the background portion cropped.

3. The filter rod detection method according to claim 1, characterized in that: Before performing contour search on the segmented filter rod transparent segment and high-transparency segment images, image inversion is also included. The image inversion specifically includes: inverting the images of the filter rod transparent segment and high-transparency segment obtained by binary segmentation to obtain corresponding inverted images.

4. The filter rod detection method according to claim 1, characterized in that: The objects of contour search processing include the images of the transparent segment and the high-transparency segment of the filter rod obtained by binary segmentation, as well as the inverted image.

5. The filter rod detection method according to any one of claims 1 to 4, characterized in that: The Nth-order polynomial is a sixth-order polynomial.

6. The filter rod detection method according to any one of claims 1 to 4, characterized in that: The binary segmentation adopts OTSU threshold segmentation.

7. The filter rod detection method according to claim 6, characterized in that: The threshold value range in the binary segmentation of the difference image is 15-30.

8. A filter rod detection system, characterized in that: include: a transmission unit, the transmission unit comprising a first light source and a second light source, the first light source and the second light source being respectively located on either side of the filter rod detection channel, the first light source and the second light source being used to illuminate the filter rod in the filter rod detection channel so as to perform transmission imaging of the filter rod cavity; An imaging unit, comprising a first photographing member and a second photographing member, the first photographing member and the second photographing member being respectively located on either side of the filter rod detection channel, and being used to photograph the filter rod after transmission imaging; a first segmentation unit, configured to perform binary segmentation on the filter rod image after transmission imaging captured by the imaging unit, to obtain a filter rod image segmented into a transparent segment and a highly transparent segment of the filter rod; A contour search unit, configured to perform contour search on the image obtained by segmenting the filter rod transparent segment and the high-transparency segment to obtain a corresponding contour-searched filter rod image; a judgment processing unit, configured to extract feature data from the filter rod image after the contour search and compare the feature data values ​​extracted from the standard filter rod image to determine whether the filter rod has phase and rod jump defects; A distribution image processing unit, the distribution image processing unit is used to extract a high-transmittance segment image from the filter rod image after binary segmentation, and calculate the grayscale average value of each column of pixels in the high-transmittance segment image to obtain a corresponding column pixel grayscale average distribution image; A polynomial fitting unit, configured to perform N-order polynomial fitting on the grayscale average distribution image of the column of pixels to obtain a corresponding polynomial fitting image; a difference map processing unit, configured to extract a grayscale mean corresponding to each column of pixels in the polynomial fitting image, calculate the difference between each pixel in the high-transmittance image and the grayscale mean in the fitting image corresponding to the column, and obtain an absolute value to obtain a difference map corresponding to the high-transmittance image; The second segmentation unit is used to perform binary segmentation on the difference map.

9. The filter rod detection system according to claim 8, characterized in that: The first segmentation unit and the second segmentation unit are both segmentation units processed by the OTSU threshold algorithm.

10. The filter rod detection system according to claim 9, characterized in that: The system further comprises a cutting unit, which is used to set a boundary for the filter rod image after transmission imaging, so as to cut off the background part in the filter rod image and obtain the filter rod image with the background part cut off.

11. The filter rod detection system according to claim 9, characterized in that: The invention comprises a negation unit, which is used for performing negation processing on the images of the rod transparent segment and the high-transparency segment obtained by the first segmentation unit to obtain corresponding negated images.

12. The filter rod detection system according to any one of claims 8 to 11, characterized in that: It includes a rejection unit arranged on the side of the filter rod detection channel, the rejection unit includes a power unit and a rejection head connected to the output end of the power unit. Under the drive of the power unit, the rejection head rejects defective filter rods after detection.

13. An electronic device, characterized in that: It comprises a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, and the programs include instructions for executing the steps in the filter rod detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Detection device and detection method for defects of filter rods of cigarette making machine roll wheels

    CN109187545A

  • Cigarette quality detection method based on two-stage algorithm

    CN110403232A