Tobacco shred image processing and tobacco shred width measuring method based on image recognition

Through the image recognition method, using three-dimensional color histogram model and geometric information analysis, the existing tobacco width detection methods rely on manual operation and large errors, and achieve fast and accurate tobacco width measurement.

CN119693439APending Publication Date: 2025-03-25JIANGSU XINZHILIAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411773925.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing tobacco width detection methods rely on manual operations, resulting in complex measurement processes, large human errors and low efficiency.

Method used

Using an image recognition-based method, by establishing a three-dimensional color histogram model, filtering tobacco samples that meet the measurement conditions, performing binarized segmentation and geometric information analysis, and accurately tobacco width data are extracted.

Benefits of technology

It realizes fast and accurate measurement of tobacco width, reduces artificial errors, improves detection efficiency, and enhances the quality control ability of cut width.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693439A_ABST
    Figure CN119693439A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a tobacco shred image processing and tobacco shred width measuring method based on image recognition, and the method comprises the steps: screening tobacco shred samples meeting measurement conditions through a three-dimensional color histogram model; carrying out binarization segmentation to obtain a cut tobacco blob mask image for segmenting a foreground and a background, and taking the corresponding foreground color as a to-be-measured cut tobacco; analyzing the geometric information of the tobacco shreds to obtain a to-be-measured width set of each tobacco shred; the width set to be measured is comprehensively processed, and accurate width data is extracted, so that image processing can be quickly carried out, and tobacco shred width information in the production process can be identified; the tobacco shred width detection device can also record and store image data of each time of photographing to facilitate subsequent quality tracking and analysis, so that the efficiency of the whole production process and the quality control capability of the tobacco shred width are improved, and the technical problems that a tobacco shred width detection method in the prior art depends on manual operation, the measurement process is complicated, the personal error is large, and the efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for processing tobacco images and measuring tobacco width based on image recognition. Background Art

[0002] The shredded tobacco process is one of the key processes in the production of shredded tobacco, in which the shredded tobacco width has an important influence on the physical indexes and sensory quality of cigarettes, and is the main factor determining the filling value, tar content, and dust content of cigarettes. The accurate determination of this index is of great significance to strengthen the quality control of shredded tobacco, improve the physical properties of shredded tobacco, and reduce the consumption of raw materials.

[0003] In the prior art, the methods used for tobacco width detection mainly include the magnifying glass scale method and the tobacco digital projector measurement method. Both methods rely on manual operation, the measurement process is complicated, the human error is large, and the efficiency is low. Summary of the invention

[0004] The purpose of the present invention is to provide a tobacco image processing and tobacco width measurement method based on image recognition, aiming to solve the technical problems that the tobacco width detection method in the prior art relies on manual operation, has a complicated measurement process, large human errors and low efficiency.

[0005] To achieve the above object, the present invention adopts a tobacco image processing and tobacco width measurement method based on image recognition, comprising the following steps:

[0006] Step 1: First, establish a three-dimensional color histogram model;

[0007] Step 2: Using a three-dimensional color histogram model, select tobacco samples that meet the measurement conditions from the densely laid tobacco pile on the production line;

[0008] Step 3: Binarize and segment the three-dimensional color image of the tobacco sample to obtain a tobacco blob mask image for segmenting the foreground and background, where the corresponding foreground color is the tobacco to be measured;

[0009] Step 4: Analyze the geometric information of the tobacco shreds, and then obtain the set of widths to be measured for each tobacco shred;

[0010] Step 5: Based on the width set to be measured, perform comprehensive processing on it to extract accurate width data.

[0011] Among them, in step one, a three-dimensional color histogram model is established through training and labeling, and the three-dimensional color histogram model can identify and distinguish qualified tobacco.

[0012] In step 2, the conditions for screening the tobacco samples that meet the measurement conditions include color, length and shape.

[0013] Among them, in step three, the method for binary segmentation of the three-dimensional color image of the tobacco sample adopts the maximum variance method between classes.

[0014] In step 4, the geometric information of the tobacco is analyzed, and the specific method of obtaining the set of widths to be measured for each tobacco strand is as follows:

[0015] Firstly, edge image processing is performed on the blob mask image area to obtain the edge wheel library coordinate point information of the tobacco;

[0016] Then, the backbone network of a single tobacco strand is extracted through the skeleton algorithm, and the backbone of each tobacco strand can be obtained - for each point on the backbone;

[0017] All backbone points are traversed, and the normal lines of the points are used as directions to perform sub-pixel edge search on the original grayscale image, thereby obtaining a set of widths to be measured for each tobacco strand.

[0018] In step 4, the geometric information analyzed includes shape and direction.

[0019] Among them, in step 5, based on the width set to be measured, a comprehensive processing is performed on it, and the specific method of extracting accurate width data is as follows:

[0020] The Gaussian filter algorithm is used to filter the tobacco width set, and then the filtered width data is statistically analyzed, the head and tail data are removed, the middle 80% of the data is extracted, and the average value is calculated as the width value of the tobacco;

[0021] Calculate the width of the tobacco thread based on the conversion ratio of the image to the millisecond unit.

[0022] The present invention discloses a method for processing tobacco image and measuring tobacco width based on image recognition. First, a three-dimensional color histogram model is established; a three-dimensional color histogram model is used to select tobacco samples that meet the measurement conditions from the densely laid tobacco piles on the assembly line; a three-dimensional color image of the tobacco sample is binarized and segmented to obtain a tobacco blob mask image that segments the foreground and background, and the corresponding foreground color is the tobacco to be measured; the geometric information of the tobacco is analyzed to obtain a set of widths to be measured for each tobacco; based on the set of widths to be measured, a comprehensive processing is performed on it to extract accurate width data, so that image processing can be performed quickly to identify tobacco width information in the production process. The image data of each photo can also be recorded and stored to facilitate subsequent quality tracking and analysis, thereby improving the efficiency of the entire production process and the quality control capability of the cut width, and solving the technical problems that the tobacco width detection method in the prior art relies on manual operation, has a complicated measurement process, large human errors, and low efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1 It is a flowchart of the steps of the tobacco image processing and tobacco width measurement method based on image recognition of the present invention.

[0025] Figure 2 It is a schematic diagram of the width data of a single tobacco strand.

[0026] Figure 3 It is a schematic diagram of the collected shredded tobacco of the present invention.

[0027] Figure 4 It is a schematic diagram of the regional outline after tobacco shreds are extracted according to the present invention.

[0028] Figure 5 It is a schematic diagram of the skeleton recognition effect of tobacco shreds of the present invention.

[0029] Figure 6 It is a schematic diagram of the tobacco shred width recognition result using the skeleton method of the present invention. DETAILED DESCRIPTION

[0030] Embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, but should not be construed as limiting the present invention.

[0031] See also Figures 1 to 6 , Figure 1 is a flowchart of the steps of the tobacco image processing and tobacco width measurement method based on image recognition of the present invention, Figure 2 This is a schematic diagram of the width of a single tobacco strand. Figure 3 is a schematic diagram of the collected tobacco shreds of the present invention, Figure 4 is a schematic diagram of the area profile after tobacco shreds are extracted according to the present invention, Figure 5 is a schematic diagram of the skeleton recognition effect of tobacco shreds of the present invention, Figure 6 It is a schematic diagram of the tobacco shred width recognition result using the skeleton method of the present invention.

[0032] The present invention provides a method for processing tobacco images and measuring tobacco width based on image recognition, comprising the following steps:

[0033] S101, firstly establish a three-dimensional color histogram model;

[0034] According to this specific implementation, a three-dimensional color histogram model is established through training and labeling, and the three-dimensional color histogram model can identify and distinguish qualified shredded tobacco.

[0035] S102, using a three-dimensional color histogram model to select tobacco samples that meet measurement conditions from the densely laid tobacco pile on the production line;

[0036] According to this specific embodiment, the conditions for screening the tobacco samples that meet the measurement conditions include color, length and shape.

[0037] S103, performing binary segmentation on the three-dimensional color image of the tobacco sample to obtain a tobacco blob mask image for segmenting the foreground and background, wherein the corresponding foreground color is the tobacco to be measured;

[0038] According to this specific implementation, the method for performing binary segmentation on the three-dimensional color image of the tobacco sample adopts the inter-class maximum variance method.

[0039] S104, analyzing geometric information of the tobacco shreds, and then obtaining a set of widths to be measured for each tobacco shred;

[0040] According to this specific implementation method, edge image processing is first performed on the blob mask image area to obtain the edge wheel library coordinate point information of the tobacco;

[0041] Then, the backbone network of a single tobacco strand is extracted through the skeleton algorithm, and the backbone of each tobacco strand can be obtained - for each point on the backbone;

[0042] All backbone points are traversed, and the normal lines of the points are used as directions to perform sub-pixel edge search on the original grayscale image, thereby obtaining a set of widths to be measured for each tobacco strand.

[0043] The geometric information analyzed includes shape as well as orientation.

[0044] S105 , based on the width set to be measured, perform comprehensive processing on it to extract accurate width data.

[0045] For this specific implementation, please refer to Figure 2 , Figure 2 It is a schematic diagram of the width data of a single tobacco strand.

[0046] The Gaussian filtering algorithm is used to filter the tobacco width set, and then the filtered width data is statistically analyzed. Figure 2 In the figure, line 1 represents the original tobacco width, and line 2 represents the filtered data. The head and tail data are removed, and the middle 80% of the data is extracted, and the average value is calculated as the width value of the tobacco.

[0047] The width of the tobacco is calculated according to the conversion ratio between the image and the millisecond unit, and the tobacco that exceeds the width value and the normal width range is marked separately.

[0048] A tobacco image processing and tobacco width measurement method based on image recognition of the present embodiment is used. First, a three-dimensional color histogram model is established; the three-dimensional color histogram model is used to select tobacco samples that meet the measurement conditions from the densely laid tobacco piles on the assembly line; the three-dimensional color image of the tobacco sample is binarized and segmented to obtain a tobacco blob mask image that separates the foreground and background, and the corresponding foreground color is the tobacco to be measured; the geometric information of the tobacco is analyzed to obtain a set of widths to be measured for each tobacco; based on the set of widths to be measured, it is comprehensively processed to extract accurate width data, so that image processing can be performed quickly to identify tobacco width information during the production process. The image data of each photo can also be recorded and stored to facilitate subsequent quality tracking and analysis, thereby improving the efficiency of the entire production process and the quality control capability of the cut width, solving the technical problems that the tobacco width detection method in the prior art relies on manual operation, has a complicated measurement process, large human errors, and low efficiency.

[0049] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.

Claims

1. A method for tobacco image processing and tobacco width measurement based on image recognition, characterized in that: The following steps are involved: Step 1: First, establish a three-dimensional color histogram model; Step 2: Using a three-dimensional color histogram model, select tobacco samples that meet the measurement conditions from the densely laid tobacco pile on the production line; Step 3: Binarize and segment the three-dimensional color image of the tobacco sample to obtain a tobacco blob mask image for segmenting the foreground and background, where the corresponding foreground color is the tobacco to be measured; Step 4: Analyze the geometric information of the tobacco shreds, and then obtain the set of widths to be measured for each tobacco shred; Step 5: Based on the width set to be measured, perform comprehensive processing on it to extract accurate width data.

2. The method for tobacco image processing and tobacco width measurement based on image recognition according to claim 1, characterized in that: In step one, a three-dimensional color histogram model is established through training and labeling, and the three-dimensional color histogram model can identify and distinguish qualified tobacco.

3. The method for tobacco image processing and tobacco width measurement based on image recognition according to claim 2, characterized in that: In step 2, the tobacco samples meeting the measurement conditions are screened, and the conditions include color, length and shape.

4. The method for tobacco image processing and tobacco width measurement based on image recognition according to claim 3, characterized in that: In step three, the method for binary segmentation of the three-dimensional color image of the tobacco sample adopts the maximum variance method between classes.

5. The method for tobacco image processing and tobacco width measurement based on image recognition according to claim 4, characterized in that: In step 4, the geometric information of the tobacco is analyzed, and the specific method of obtaining the set of widths to be measured for each tobacco strand is as follows: Firstly, edge image processing is performed on the blob mask image area to obtain the edge wheel library coordinate point information of the tobacco; Then, the backbone network of a single tobacco strand is extracted through the skeleton algorithm, and the backbone of each tobacco strand can be obtained - for each point on the backbone; All backbone points are traversed, and the normal lines of the points are used as directions to perform sub-pixel edge search on the original grayscale image, thereby obtaining a set of widths to be measured for each tobacco strand.

6. The method for tobacco image processing and tobacco width measurement based on image recognition according to claim 5, characterized in that: In step 4, the geometric information analyzed includes shape and direction.

7. The method for tobacco image processing and tobacco width measurement based on image recognition according to claim 6, characterized in that: In step 5, based on the width set to be measured, comprehensive processing is performed on it to extract accurate width data in the following specific manner: The Gaussian filter algorithm is used to filter the tobacco width set, and then the filtered width data is statistically analyzed, the head and tail data are removed, the middle 80% of the data is extracted, and the average value is calculated as the width value of the tobacco; Calculate the width of the tobacco thread based on the conversion ratio of the image to the millisecond unit.