A cigarette hollow end visual detection method based on structured light

CN117233165BActive Publication Date: 2026-09-29THE 41ST INST OF CHINA ELECTRONICS TECH GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311040806.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-18
Publication Date
2026-09-29
Estimated Expiration
2043-08-18

AI Technical Summary

Technical Problem

但在实际使用过程中,部分空头烟拍摄出的图像中烟支轮廓内全部填充了烟丝,且同一支空头烟当所处位置或旋转角度不同时,所拍摄出的图像烟支轮廓内烟丝像素数差距较大,故该类检测方式存在检测准确性不高的问题

Benefits of technology

[0025]本发明创新的利用条纹结构光投射的多条光线覆盖烟丝端面,可以克服常规视觉空头检测的检测准确度不高的弊端,间接将烟丝端部凹陷程度信息反馈到光线的连续性上,检测效率高,可以达到快速、准确的检测,保证烟支空头检测的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117233165B_ABST
    Figure CN117233165B_ABST
Patent Text Reader

Abstract

The application discloses a kind of visual empty head detection methods based on stripe structured light, belong to detection technical field.The application is by using special structured light auxiliary lighting cigarette tobacco end portion, and certain oblique angle industrial camera is adopted to collect image, finally through horizontal line detection, connected domain area characteristic filtering, region position filtering etc., the degree of fracture of light is indirectly represented to represent the size of tobacco depression, realize the accurate detection of visual empty head, belong to the new method of cigarette empty head detection.The application is innovated to use the plurality of light lines covered tobacco end surface projected by stripe structured light, can overcome the drawbacks that the detection accuracy of conventional visual empty head detection is not high, indirectly the depression degree information of tobacco end portion is fed back to the continuity of light, detection efficiency is high, can achieve fast, accurate detection, guarantee the accuracy of cigarette empty head detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of detection technology, specifically relating to a visual void detection method based on striped structured light. Background Technology

[0002] In the cigarette processing and production process, to ensure the quality of the cigarettes in the final pack, a cigarette empty-end detection device needs to be installed on the packaging line to detect whether there are empty-end defects in the cigarettes inside the mold box. With the continuous maturation of machine vision technology, cigarette empty-end detection methods based on machine vision technology are being used more and more widely.

[0003] In machine vision-based cigarette tip detection devices, a standard LED light source and camera illuminate and photograph the cigarette tip at a certain angle. Ideally, when a cigarette tip is missing, the image captured by the system will not show the cigarette tip completely filled with tobacco; a portion of the paper will remain. The system distinguishes between missing and full tip by counting the number of pixels in the tobacco. However, in actual use, some images of missing cigarette tips show the cigarette tip completely filled with tobacco. Furthermore, the number of pixels in the cigarette tip image varies significantly depending on the cigarette tip's position or rotation angle. Therefore, this detection method suffers from low accuracy. Summary of the Invention

[0004] In view of the above-mentioned technical problems in the prior art, the present invention proposes a visual void detection method based on striped structured light. The method is reasonably designed, overcomes the shortcomings of the prior art, and has good results.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] A visual method for detecting empty heads based on striped structured light, using an industrial camera, includes the following steps:

[0007] Step 1: The striped structured light is vertically shone onto the end of the tobacco shreds of the cigarette to be inspected, forming fine and bright stripes at the end of the tobacco shreds. The bright stripe image at the end of the tobacco shreds is captured by an industrial camera to form an image of the tobacco shred end.

[0008] Step 2: Convert the image of the tobacco tip to grayscale, and convolve the grayscale image using a horizontal line detection convolution kernel to obtain the line detection image;

[0009] Step 3: Perform thresholding on the line detection image to segment out the thresholded image containing structured rays;

[0010] Step 4: Filter the threshold-segmented image;

[0011] The discrete small lines and interfering lines are filtered out using the area feature of connected components to obtain the filtered image;

[0012] Step 5: Based on the detection area of ​​each cigarette and the experience of its location distribution, remove interfering lines other than the three main lines;

[0013] Step 6: By judging the continuity and degree of breakage of the three lines in each detection area, the degree of short selling can be indirectly determined.

[0014] Preferably, in step 3, the threshold segmentation uses the following formula:

[0015]

[0016] In the formula, g(x) is the threshold segmented image, and f(x) is the grayscale image.

[0017] Preferably, step 4 specifically includes the following steps:

[0018] Step 4.1: Separate different connected components in the thresholded segmentation image;

[0019] Step 4.2: Calculate the contour area value of each connected component. Connected components with smaller area values ​​are noise points or interference lines.

[0020] Step 4.3: For noise points or interfering lines, filter them by filling them with a grayscale value of 0.

[0021] Preferably, in step 6, the three light rays in each detection area are searched for breakage. When the breakage length exceeds a certain threshold, it is determined that there is a breakage in the light ray, which indicates that the tobacco shreds are uneven and have hollow areas. The following formula is used to determine the breakage of the line:

[0022]

[0023] In the formula, S x1 S represents the starting position of the fracture. x2 Let S be the end position of the broken section, t(x) be the number of pixels in the detection area after filtering out interference lines, and S be the number of pixels in the detection area. x1 With S x2 The difference between the two values, depth, is the fracture width. When the difference is greater than the set value of 50, it is determined that there is a dent or void. The judgment standard of 50 is an empirical value that can be adjusted according to the strictness of the inspection.

[0024] The beneficial technical effects of this invention are as follows:

[0025] This invention innovatively utilizes multiple light rays projected by striped structured light to cover the end face of the tobacco shreds, which can overcome the shortcomings of low detection accuracy of conventional visual hollow cigarette detection. It indirectly feeds back the information on the degree of concavity at the end of the tobacco shreds to the continuity of the light rays, resulting in high detection efficiency and achieving fast and accurate detection, thus ensuring the accuracy of hollow cigarette detection. Attached Figure Description

[0026] Figure 1 This is the optical path diagram of the present invention;

[0027] Figure 2 To acquire a grayscale image after converting a color source image to grayscale;

[0028] Figure 3 For line detection images;

[0029] Figure 4 Threshold the image segmentation;

[0030] Figure 5 For filtered images;

[0031] Figure 6 This is a schematic diagram showing the results of removing interference lines based on the detection area;

[0032] Figure 7 This is a schematic diagram of the detection results for defective cigarettes. Detailed Implementation

[0033] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0034] Figure 1 This diagram illustrates the positional relationship between the three objects—the striped structured light, the industrial camera, and the cigarette—in this method. The striped structured light shines perpendicularly onto the end of the cigarette shreds, forming fine, bright stripes. The perpendicular distance between the structured light and the end of the cigarette shreds should ensure that the light projected onto the end of the shreds is clear and appears as fine stripes. The industrial camera captures an image of the bright stripes at the end of the shreds at a certain tilt angle, forming an image of the shred end. This image is then converted to grayscale to obtain... Figure 2 The image shown. Figure 2 In the middle, each cigarette has three thin, bright rays at the end of the tobacco, with a small amount of interfering light around it.

[0035] Figure 3 This is the line detection image obtained by convolving the grayscale image with a horizontal line detection convolution kernel in this method. The horizontal line detection convolution kernel template is as follows:

[0036] 2 2 2 2 2 -1 -1 -1 -1 -1

[0037] By performing convolution operations on the grayscale image using the aforementioned convolution kernel template, the grayscale values ​​of the light rays in the image can be enhanced, while the grayscale values ​​of the background can be reduced, which is beneficial for subsequent extraction of light rays.

[0038] Figure 4 This is the image from which thresholding segmentation is performed on the line detection image in this method. The thresholding segmentation uses the following formula:

[0039]

[0040] In the formula, g(x) is the threshold segmented image and f(x) is the grayscale image. After threshold segmentation, the grayscale values ​​of light rays and other interference lines in the image all become 255, and the grayscale values ​​of black and background parts all become 0.

[0041] Figure 5 This image represents the threshold-segmented image processed in this method, primarily used to filter out discrete noise points or small interfering lines. Area features are mainly used for filtering. By separating different connected components in the threshold-segmented image and calculating the contour area value of each component, connected components with smaller area values ​​(i.e., noise points or interfering lines) are filtered by filling these components with grayscale values ​​of 0.

[0042] Figure 6 This diagram illustrates the result of further interference line removal in this method, combining the detection area of ​​each cigarette. This method primarily considers the location of the detection area and applies the following rules to each area:

[0043] A2 A3 A4 A5

[0044] Image analysis revealed that the lowest and smallest detection areas were due to interference at the junctions of cigarettes. Therefore, each cigarette detection area was divided into five equal regions based on height. The white lines within the highest and lowest regions A1 and A5 were removed, resulting in... Figure 6 As a result, only 3 relatively intact rays were retained in each detection area.

[0045] Figure 7 This is a schematic diagram of the final detection results of this method. For each detection area, three light rays are searched for breakage. When the breakage length exceeds a certain threshold, it is determined that a light ray is broken, indicating that the tobacco shreds are uneven and contain hollow areas. The following formula is used to determine line breakage:

[0046]

[0047] In the formula, S x1 S represents the starting position of the fracture. x2S represents the end position of the broken section, and t(x) represents the number of pixels within the detection area after filtering out interfering lines. x1 With S x2 The difference between the two values, depth, is the fracture width. When the difference is greater than the set value of 50, it is determined that there is a dent or void. The judgment standard of 50 is an empirical value and can be adjusted according to the strictness of the inspection.

[0048] This invention relates to a visual inspection method for detecting hollow ends in molded cigarettes. By using special structured light to illuminate the end of the cigarette tobacco, and using an industrial camera at a certain tilt angle to acquire images, the method calculates the degree of light breakage through methods such as horizontal line detection, connected region area feature filtering, and region position filtering to indirectly characterize the size of the tobacco indentation, thereby achieving accurate visual detection of hollow ends. This is a novel method for detecting hollow ends in cigarettes.

[0049] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A visual void detection method based on striped structured light, characterized in that: Using an industrial camera, the following steps are included: Step 1: The striped structured light is vertically shone onto the end of the tobacco shreds of the cigarette to be inspected, forming fine and bright stripes at the end of the tobacco shreds. The bright stripe image at the end of the tobacco shreds is captured by an industrial camera to form an image of the tobacco shred end. Step 2: Convert the image of the tobacco tip to grayscale, and convolve the grayscale image using a horizontal line detection convolution kernel to obtain the line detection image; Step 3: Perform thresholding on the line detection image to segment out the thresholded image containing structured rays; Step 4: Filter the thresholded segmentation image; The discrete small lines and interfering lines are filtered out using the area feature of connected components to obtain the filtered image; Step 5: Based on the detection area of ​​each cigarette and the experience of its location distribution, remove interfering lines other than the three main lines; Step 6: By judging the continuity and degree of breakage of the three lines in each detection area, the degree of short selling can be indirectly determined.

2. The visual void detection method based on striped structured light according to claim 1, characterized in that: In step 3, the threshold segmentation is performed using the following formula: In the formula, g(x) is the threshold segmented image, and f(x) is the grayscale image.

3. The visual gap detection method based on striped structured light according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step 4.1: Separate different connected components in the thresholded segmentation image; Step 4.2: Calculate the contour area value of each connected component. Connected components with smaller area values ​​are noise points or interference lines. Step 4.3: For noise points or interfering lines, filter them by filling them with a grayscale value of 0.

4. The visual gap detection method based on striped structured light according to claim 1, characterized in that: In step 6, the three light rays in each detection area are searched for breakage. When the breakage length exceeds a certain threshold, it is determined that there is a break in the light ray, which indicates that the tobacco shreds are uneven and have hollow areas. The following formula is used to determine the breakage of the line: In the formula, S x1 S represents the starting position of the fracture. x2 Let S be the end position of the broken section, t(x) be the number of pixels in the detection area after filtering out interference lines, and S be the number of pixels in the detection area. x1 With S x2 The difference between the two values, depth, is the fracture width. When the difference is greater than the set value of 50, it is determined that there is a dent or void. The judgment standard of 50 is an empirical value that can be adjusted according to the strictness of the inspection.

Citation Information

Patent Citations

  • Three-dimensional reconstruction technique based method for detecting loose ends of cigarettes

    CN105029691A

  • Cigarette loose end defect and missing detection device and method

    CN113830377A