A machine vision-based intelligent identification method for foreign matters in cut tobacco
By using machine vision-based methods combined with high-exposure and low-exposure image processing techniques, the problem of missed detection of debris in tobacco shreds after cutting was solved, achieving efficient and accurate debris identification and protecting the health of staff.
Patent Information
- Application Number
- CN202211726465.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing technologies pose a risk of missed detections in the detection of impurities in shredded tobacco, and manual inspection is harmful to the eyesight and eye health of workers.
A machine vision-based approach is adopted, which involves acquiring images of the cigarette pack area, performing mean filtering, using a color channel separation and conversion algorithm and deep learning detection, and combining high-exposure and low-exposure images for debris recognition, thereby achieving accurate detection of both dark and light-colored debris.
It improves the accuracy of tobacco debris detection, reduces the risk of missed detection, and lowers the health hazards to staff.
Smart Images

Figure CN116129099B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a machine vision-based intelligent identification method for foreign objects in tobacco shreds after shredding, belonging to the field of tobacco shred debris detection technology. Background Technology
[0002] Currently, the process for removing foreign matter from tobacco shreds is relatively simple, involving only automated optical detection and removal before shredding, and manual inspection and removal by one worker on each production line after shredding. This presents a significant risk of missed detections. Manual inspection has two problems: first, the high vibration frequency of the vibrating trough can easily damage the eyesight of production line workers during prolonged observation; second, the high vibration frequency after shredding causes eye fatigue for workers, increasing the risk of missed detections. Therefore, it is essential to install foreign matter monitoring points at appropriate locations on the production line to accurately identify tobacco shreds in real time. Summary of the Invention
[0003] The purpose of this invention is to provide a machine vision-based intelligent foreign object identification method for shredded filaments, so as to solve the defects of low efficiency and missed detection in the existing technology of manual foreign object detection.
[0004] A machine vision-based intelligent foreign object recognition method for shredded filaments, the method comprising:
[0005] The image of the cigarette pack region is obtained, and the region is subjected to mean filtering to obtain the preprocessed image;
[0006] Based on the color channel separation and conversion algorithm, the preprocessed image is decomposed into channels, and the RGB color channel is decomposed into multiple color spaces to obtain images with multiple channels. The multiple channel images are added and subtracted to obtain high-exposure and low-exposure effect images with obvious defect characteristics.
[0007] The high-exposure image is processed to obtain images of dark-colored defect areas and suspected light-colored defect areas. If the dark-colored defect area is a foreign object, an alarm is triggered and the image is saved.
[0008] For suspected light-colored defect areas, the area is mapped onto a low-exposure image for defect verification. If it is not debris, deep learning detection is performed.
[0009] Images of tobacco shreds that were not detected after testing are input into the tobacco shreds debris detection model, and the real-time image debris detection results are output.
[0010] If the detected object is debris, an alarm will be triggered or the image will be saved; if it is not debris, the next frame of tobacco image will be detected.
[0011] Furthermore, the method for constructing the tobacco debris detection model includes:
[0012] Obtain the original image of the tobacco shreds, filter the original image of the tobacco shreds, and obtain the processed image;
[0013] The processed image is inspected to determine whether it contains debris. If not, the debris in the undetected tobacco image is labeled and divided into a training set and a validation set. The data is then input into the training set to obtain an online tobacco debris detection model.
[0014] Furthermore, the detection of the processed image includes:
[0015] The preprocessed image is decomposed into three channels, resulting in an RGB image; color channel conversion is then used to convert the RGB image into an HSI channel image.
[0016] Global thresholding is applied to the color channel image to segment the H channel and extract blue-tinted artifacts.
[0017] The segmented regions are eroded and expanded to fill the holes in the bright parts of the bright tobacco and remove the burrs from the dark tobacco, thus obtaining the eroded and expanded image.
[0018] Based on the shape characteristics of tobacco debris, the image after corrosion and expansion is determined to determine whether the detected image contains debris.
[0019] Furthermore, the mean filtering algorithm is used for filtering the original tobacco image.
[0020] Furthermore, the processing of the high-exposure effect image includes: threshold segmentation, morphological analysis, and feature selection operations.
[0021] Furthermore, the mean filtering process uses a low-pass filter, and the gray value calculated from the obtained gray value and the original gray value is as follows:
[0022] res:=round((orig-mean)*Favctor+orig
[0023] The size of the mean filter template is controlled by the parameters MaskkWidth and MaskHeight. The larger the value, the stronger the image contrast.
[0024] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0025] This invention proposes a rule-based detection method that uses a single camera to capture two images with different imaging characteristics. This saves costs and improves the accuracy of debris detection by performing a verification method on different images. Dark-colored debris features are more obvious in the high-exposure image, thus improving the detection accuracy of dark-colored debris. Light-colored debris is initially located on the high-exposure image because it appears similar to items like tobacco stems and conveyor belts. Further verification by mapping this image onto the low-exposure image further improves the detection accuracy of light-colored debris.
[0026] The detection method proposed in this invention can improve the efficiency of debris detection and reduce the risk of missed detection. Attached Figure Description
[0027] Figure 1 This is the overall process for debris detection in this invention;
[0028] Figure 2 This refers to the grayscale data of light-colored impurities in the high-exposure image of the present invention.
[0029] Figure 3 This refers to the grayscale data of the tobacco stem in the high-exposure image of the present invention.
[0030] Figure 4 This refers to the grayscale data of light-colored impurities in the low-exposure image of the present invention.
[0031] Figure 5 This is the grayscale data of the tobacco stem in the low-exposure image of the present invention. Detailed Implementation
[0032] To make the technical means, creative features, objectives and effects of this invention easier to understand, the invention will be further described below in conjunction with specific embodiments.
[0033] A machine vision-based intelligent foreign object recognition method for shredded filaments, such as... Figure 1 It includes the following steps:
[0034] 1) A 2D camera is used to acquire two images: one high-exposure and one low-exposure. Using the same camera with two sets of inconsistent camera parameters, two images with different imaging characteristics are acquired. Dark-colored debris, such as dark red or black debris, is detected in the high-exposure image, while light-colored debris, such as white debris, is initially located in the high-exposure image and then mapped to the low-exposure image for verification. This method of detecting clearly characteristic debris in different images and verifying defect regions in different images improves the algorithm's detection accuracy.
[0035] (2) Open the original high and low exposure images of the tobacco shreds. Based on the mean filtering algorithm, obtain the image of the tobacco pack area and perform mean filtering on this area to obtain the preprocessed image. Mean filtering can effectively remove noise and blurry images within the image. Mean filtering is a linear filter that calculates the average value of pixels in a window area and then sets the calculated average value in the window as the pixel value at the anchor point. Mean filtering linearly smooths the gray values of all input images. The filter matrix consists of 1 (calculated as equal) and size Mask Height x Mask Width. The result of the convolution is divided by the mask height x mask width. For boundary processing, the gray values are reflected to the image edges. The pixel value at any point in the mean filtering is the average value of the surrounding N / times M pixels.
[0036]
[0037] (3) Based on the color channel separation and conversion algorithm, the preprocessed image is decomposed into multiple color spaces to obtain multiple channel images. The multiple channel images are added, differencing and other operations to obtain high exposure effect images and low exposure effect images with obvious defect characteristics.
[0038] (4) Perform threshold segmentation, morphological analysis, and feature filtering on the high-exposure effect image to obtain dark-colored defect areas and suspected light-colored defect areas.
[0039] (5) Analyze the results of the high-exposure effect image. If it is a dark-colored object, the image will display the object's attribute information, trigger an alarm, and save the image. If it is a suspected light-colored defect area, map the area onto the low-exposure effect image and perform defect verification. Verification methods include, but are not limited to, comparing the average gray level and gray level variance of the area. If it is not an object, perform deep learning detection.
[0040] (6) Label the debris in the tobacco images that are not detected after rule detection, divide them into training set and validation set, input them into training, and obtain the online tobacco debris detection model.
[0041] (7) Input the real-time acquired tobacco images into the tobacco debris detection model, and output the real-time image debris detection results. The real-time image debris detection results provide the attribute information of the debris. If it is debris, an alarm will be triggered or the image will be stored; if it is not debris, the next frame of tobacco images will be detected.
[0042] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A machine vision-based intelligent foreign object recognition method for shredded filaments, characterized in that, The method includes: The image of the cigarette pack region is obtained, and the region is subjected to mean filtering to obtain the preprocessed image; Based on the color channel separation and conversion algorithm, the preprocessed image is decomposed into channels, and the RGB color channel is decomposed into multiple color spaces to obtain images with multiple channels. The multiple channel images are added and differencing to obtain high-exposure and low-exposure effect images with obvious defect characteristics. The high-exposure image is processed to obtain images of dark-colored defect areas and suspected light-colored defect areas. If the dark-colored defect area is a foreign object, an alarm is triggered and the image is saved. For suspected light-colored defect areas, the area is mapped onto a low-exposure image for defect verification. If it is not debris, deep learning detection is performed. Images of tobacco shreds that were not detected after testing are input into the tobacco shreds debris detection model, and the real-time image debris detection results are output. If the detected object is debris, an alarm will be triggered or the image will be saved; if it is not debris, the next frame of tobacco image will be detected.
2. The intelligent foreign object identification method for shredded filaments based on machine vision according to claim 1, characterized in that, The method for constructing the tobacco debris detection model includes: Obtain the original image of the tobacco shreds, filter the original image of the tobacco shreds, and obtain the processed image; The processed image is inspected to determine whether it contains debris. If not, the debris in the undetected tobacco image is labeled and divided into a training set and a validation set. The data is then input into the training set to obtain an online tobacco debris detection model.
3. The intelligent foreign object identification method for shredded filaments based on machine vision according to claim 2, characterized in that, The detection of the processed image includes: The preprocessed image is decomposed into three channels, resulting in an RGB image; color channel conversion is then used to convert the RGB image into an HSI channel image. Global thresholding is applied to the color channel image to segment the H channel and extract blue-tinted artifacts. The segmented regions are eroded and expanded to fill the holes in the bright parts of the bright tobacco and remove the burrs from the dark tobacco, thus obtaining the eroded and expanded image. Based on the shape characteristics of tobacco debris, the image after corrosion and expansion is determined to determine whether the detected image contains debris.
4. The intelligent foreign object identification method for shredded filaments based on machine vision according to claim 2, characterized in that, The mean filtering algorithm is used for filtering the original image of tobacco.
5. The intelligent foreign object identification method for shredded filaments based on machine vision according to claim 1, characterized in that, The processing of the high-exposure effect image includes: threshold segmentation, morphological analysis, and feature selection operations.
6. The intelligent foreign object identification method for shredded filaments based on machine vision according to claim 1, characterized in that, The mean filtering process uses a low-pass filter, and the grayscale value calculated from the obtained grayscale value and the original grayscale value is as follows: res:=round((orig - mean)*Favctor + orig The size of the mean filter template is controlled by the parameters MaskkWidth and MaskHeight. The larger the value, the stronger the image contrast.
Citation Information
Patent Citations
Packaging miscellaneous item detection method based on neural network segmentation
CN110349139A
Apparatus for analysing a rod-shaped smoking article
US20210235745A1