A method for monitoring the amount of tobacco stems in a silk machine
By installing a camera on the tobacco feeder, defining the region of interest, setting the image acquisition frequency and time sequence, performing image preprocessing, extracting tobacco stem features, counting the number of tobacco stems and calculating the density per unit area, setting a tobacco stem quantity threshold, and introducing the sliding window method and continuous judgment, the problems of low tobacco stem detection accuracy and frequent alarms in the tobacco feeder are solved, and high-precision and stable tobacco stem quantity monitoring is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HONGYUN HONGHE TOBACCO (GRP) CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, tobacco stem detection in tobacco feeders suffers from low detection accuracy, frequent alarms, and time-consuming and labor-intensive manual inspections, especially on dynamic conveyor belts where it is difficult to accurately count the number and density of tobacco stems.
By installing a camera, defining the region of interest, setting the image acquisition frequency and time sequence, performing image preprocessing, extracting tobacco stem features, counting the number of tobacco stems and calculating the density per unit area, setting a tobacco stem quantity threshold, and introducing the sliding window method and persistence determination algorithm to improve detection accuracy and stability.
It achieves high-precision monitoring of the amount of tobacco stems in the tobacco feeder, avoids frequent alarms, improves the continuity and robustness of detection, reduces the false alarm rate, and ensures the stability and reliability of the production process.
Smart Images

Figure CN122199496A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tobacco stem detection technology, specifically to a method for monitoring the amount of tobacco stems in a tobacco feeder. Background Technology
[0002] Modern cigarette production lines employ high-speed automated cigarette rolling machines to improve production efficiency and product quality. Newer models like the ZJ118 integrate stem separation and recycling into the enclosed bottom area of the VE section of the cigarette rolling machine's feeder. While this design enhances the compactness and automation of the equipment, it also presents technical challenges for stem monitoring.
[0003] During the tobacco supply process, the size and quantity of tobacco stems directly affect the quality of cigarette forming. Too many tobacco stems can lead to the following problems: First, the hard physical properties of tobacco stems make them prone to puncturing cigarette paper, causing puncture defects; second, the increased puncture defect rate leads to a higher scrap rate, resulting in a large consumption of raw materials and energy; third, unstable product quality affects overall production efficiency.
[0004] Because the stem separation and recycling is located in the enclosed space at the bottom of the VE (vessel enclosure), operators cannot directly observe the status of the stem return conveying. Traditional manual inspection methods are difficult to detect abnormalities in the amount of stem return in a timely manner and require a lot of manpower and time. Currently, visual inspection has been introduced into detection technology, but the following problems exist: Since the tobacco is dynamic on the conveyor belt, the captured images are also a dynamic process. Existing visual inspection methods do not set the acquisition frequency according to the speed of the conveyor belt, and the number of stems is counted by counting the data of each single frame image. This results in image ghosting, repeated capture of stems, and frequent alarms, thus affecting the accuracy of detection.
[0005] To overcome this technical problem, the present invention provides a method for monitoring the amount of tobacco stems in a tobacco feeder. Summary of the Invention
[0006] The purpose of this invention is to provide a method for monitoring the amount of tobacco stems in a tobacco feeder, which can improve the accuracy of detection and avoid the effects of mismatch between conveyor belt speed and acquisition frequency, repeated capture of tobacco stems, and frequent alarms.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0008] A method for monitoring the amount of tobacco stems in a tobacco feeder, comprising:
[0009] S1. Install the camera according to the parameters of the wire feeder outlet conveyor belt;
[0010] S2. Define the region of interest (ROI) in the image coordinate system and establish the mapping relationship between pixel coordinates and physical coordinates;
[0011] S3. Determine the image acquisition frequency and image acquisition time sequence to obtain dynamic images;
[0012] S4. Preprocess the acquired images;
[0013] S5. Extract and detect tobacco stem features in the image;
[0014] S6. Count the number of tobacco stems and calculate the tobacco stem density per unit area;
[0015] S7. The amount of tobacco stems is evaluated by setting a threshold for the amount of tobacco stems.
[0016] S8. Trigger an alarm based on the assessed structure and record relevant data.
[0017] Furthermore, in step S1, the parameters of the wire feeder outlet conveyor belt include the conveyor belt width and conveying speed, and the camera installation position satisfies:
[0018] A_camera = (W·L_field) / cos(θ);
[0019] In the formula, W is the width of the conveyor belt, L_field is the field of view length along the conveying direction, θ is the angle between the camera and the surface of the conveyor belt, and A_camera is the effective imaging area of the camera.
[0020] Furthermore, in step S2, the region of interest (ROI) is defined in the image coordinate system and a mapping relationship between pixel coordinates and physical coordinates is established. The ROI is defined as follows:
[0021] ROI={(x,y)|x1≤x≤x2, y1≤y≤y2};
[0022] The area of the region of interest (ROI) is:
[0023] A_ROI=(x2-x1)(y2-y1);
[0024] In the formula, A_ROI is the area of the region of interest (ROI), x1 and x2 are the horizontal coordinates of the left and right sides of the ROI, and y1 and y2 are the vertical coordinates of the top and bottom sides of the ROI.
[0025] The mapping relationship between pixel coordinates and physical coordinates is as follows:
[0026] X_physical = (x - x0) / f_x · H;
[0027] Y_physical = (y - y0) / f_y · H;
[0028] In the formula, (x0, y0) are the principal points of the image, f_x and f_y are the pixel equivalent values of the camera focal length in the x and y directions, and H is the vertical pixel degree of the image resolution W×H.
[0029] Furthermore, in step S3, determining the image acquisition frequency and the image acquisition time sequence to obtain the dynamic image specifically includes:
[0030] The image acquisition frequency is determined based on the conveyor belt speed and detection accuracy requirements.
[0031] f_capture = (v·α) / L_overlap;
[0032] Where α is the overlap coefficient, L_overlap is the overlap length between two adjacent frames, v is the conveyor belt speed, and f_capture is the image acquisition frequency;
[0033] The image acquisition time sequence is as follows:
[0034] t_n=n / f_capture, n=0,1,2,... ;
[0035] The image acquired at time t_n is denoted as I_n(x,y).
[0036] Furthermore, in step S4, the acquired image is preprocessed, including grayscale conversion, Gaussian filtering, and histogram equalization.
[0037] Furthermore, during image preprocessing, grayscale conversion is performed first:
[0038] I_gray^n(x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y);
[0039] Then, Gaussian filtering is applied to remove noise:
[0040] I_filtered^n(x,y) = I_gray^n(x,y) * G_σ(x,y);
[0041] In the formula, G_σ(x,y) is the Gaussian kernel, which is defined as: G_σ(x,y) = [1 / (2πσ²)] exp(-(x²+y²) / (2σ²));
[0042] Finally, histogram equalization is applied to enhance contrast:
[0043] I_enhanced^n(x,y) = [(L-1) / (M·N)] Σ h(i);
[0044] In the formula, L is the number of gray levels, M × N is the image size, h(i) is the gray level histogram, and I_enhanced^n(x,y) is the enhanced gray level value.
[0045] Furthermore, in step S5, the extraction and detection of tobacco stem features in the image specifically includes:
[0046] Candidate regions for tobacco stems were extracted using an adaptive threshold segmentation method.
[0047] B^n(x,y)= ;
[0048] The local threshold T_local(x,y) is calculated using a local window:
[0049] T_local(x,y) = μ_local(x,y) + k·σ_local(x,y);
[0050] In the formula, μ_local is the local mean, σ_local is the local standard deviation, and k is the adjustment coefficient;
[0051] Perform connected component analysis on the binary image B^n(x,y) and mark all connected components C_i;
[0052] Calculate the area A_i of each connected component C_i, where the area is defined as the total number of pixels within that connected component:
[0053] A_i= ;
[0054] Selection of tobacco stems based on morphological characteristics:
[0055] S_i = {C_i | A_min≤A_i≤A_max, λ_min≤λ_i≤λ_max};
[0056] Where λ_i is the aspect ratio, which is obtained by the following formula:
[0057] λ_i = L_i / W_i;
[0058] In the formula, L_i and W_i are the length and width of the connected region, respectively.
[0059] Furthermore, in step S6, the counting of tobacco stems and calculation of tobacco stem density per unit area specifically includes:
[0060] Calculate the number of tobacco stems detected in the nth frame image:
[0061] N_n = |S_n|;
[0062] The number of tobacco stems per unit time was calculated using the sliding window method:
[0063] N_avg(t) = (1 / W_time) Σ N_i;
[0064] In the formula, W_time is the width of the time window;
[0065] Calculate the density of tobacco stems per unit area:
[0066] ρ_n = N_n / (A_ROI · β);
[0067] In the formula, β is the conversion coefficient from pixel to physical area, which is obtained by the following formula: β=(H / f_x)·(H / f_y).
[0068] Furthermore, in step S7, the assessment of the amount of tobacco stems by setting a threshold value specifically includes:
[0069] Establish indicators for assessing tobacco stem quantity:
[0070] Q_n = ω1·N_avg(n) + ω2·ρ_n + ω3·max(N_i);
[0071] In the formula, ω1, ω2, ω3 are weight coefficients, satisfying ω1 + ω2 + ω3 = 1;
[0072] Set judgment criteria:
[0073] Alert n = ;
[0074] In the formula, Q_threshold is the preset threshold for the amount of tobacco stems;
[0075] Introducing persistence determination:
[0076] Alert_final n = ;
[0077] In the formula, M is the number of confirmation window frames, r_confirm is the confirmation ratio, r_confirm takes a value of 0.7-0.8, and K is the starting window, K=n-M+1.
[0078] Furthermore, in step S8, when Alert_final n When =1, the system triggers an alarm and records relevant data, including:
[0079] Alarm time: t_alarm = t_n
[0080] Number of tobacco stems: N_alarm = N_n
[0081] Evaluation metric: Q_alarm = Q_n
[0082] Image snapshot: I_alarm = I_n;
[0083] Simultaneously, based on relevant data, a trend indicator for tobacco stem quantity was calculated:
[0084] T_trend = (Q_n - Q_(n-W_trend)) / Δt;
[0085] In the formula, W_trend is the trend calculation window, and Δt is the time interval.
[0086] Compared with the prior art, the beneficial effects of the present invention are:
[0087] In this invention, when installing and configuring the camera, the camera position is set according to parameters such as the width of the conveyor belt, the field of view in the conveying direction, and the angle between the camera and the surface of the conveyor belt, thereby ensuring the effective imaging area of the camera.
[0088] During image acquisition, the image acquisition frequency is determined based on the conveyor belt speed and detection accuracy requirements, so that the acquisition frequency can be correlated and adapted with the conveyor belt speed, ensuring the continuity of detection and preventing large overlap between adjacent frames, thereby improving the quality of image acquisition.
[0089] During movement, the same tobacco stem may be captured in multiple consecutive frames. If coordinate matching or deduplication is not performed in conjunction with velocity, the system may mistakenly identify the appearance of the same tobacco stem in different frames as a new tobacco stem, leading to an exponential exaggeration of the number and frequent alarms. To solve this technical problem, when calculating the number and density of tobacco stems, a sliding window method and a persistence determination algorithm are introduced to avoid frequent alarms, which effectively reduces the false alarm rate and improves the reliability of the alarm. Attached Figure Description
[0090] Figure 1 This is a schematic diagram of the tobacco stem quantity monitoring method described in this invention.
[0091] Figure 2 This is a structural block diagram of the visual monitoring device described in Example 2.
[0092] Figure 3 This is a schematic diagram of the calibration of the Region of Interest (ROI) in Example 3.
[0093] Figure 4 This is a schematic diagram of tobacco stem feature extraction.
[0094] Figure 5A schematic diagram showing the installation location of the image acquisition module. Detailed Implementation
[0095] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0096] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0097] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0098] Example 1:
[0099] refer to Figure 1 As shown, the present invention provides a method for monitoring the amount of tobacco stems in a tobacco feeder, comprising:
[0100] S1. Install the camera according to the parameters of the wire feeder outlet conveyor belt;
[0101] Specifically, the parameters of the wire feeder outlet conveyor belt include the conveyor belt width and conveying speed, and the camera installation position meets the following requirements:
[0102] A_camera = (W·L_field) / cos(θ);
[0103] In the formula, W is the width of the conveyor belt, L_field is the field of view length along the conveying direction, θ is the angle between the camera and the surface of the conveyor belt, and A_camera is the effective imaging area of the camera.
[0104] In addition, two sets of LED strip light sources are installed on both sides of the conveyor belt, and the light intensity distribution of these light sources must meet the requirement of uniformity.
[0105] [max(I(x,y))-min(I(x,y))] / Ī ≤δlight;
[0106] Where I(x,y) is the light intensity at position (x,y), Ī is the average light intensity, and δ_light is the allowable illumination non-uniformity threshold, which is usually taken as δ_light ≤ 0.15.
[0107] S2. Define the region of interest (ROI) in the image coordinate system and establish the mapping relationship between pixel coordinates and physical coordinates;
[0108] Specifically, the Region of Interest (ROI) is defined as:
[0109] ROI={(x,y)|x1≤x≤x2, y1≤y≤y2};
[0110] The area of the region of interest (ROI) is:
[0111] A_ROI=(x2-x1)(y2-y1);
[0112] In the formula, A_ROI is the area of the region of interest (ROI), x1 and x2 are the horizontal coordinates of the left and right sides of the ROI, and y1 and y2 are the vertical coordinates of the top and bottom sides of the ROI.
[0113] The mapping relationship between pixel coordinates and physical coordinates is as follows:
[0114] X_physical = (x - x0) / f_x · H;
[0115] Y_physical = (y - y0) / f_y · H;
[0116] In the formula, (x0, y0) are the principal points of the image, f_x and f_y are the pixel equivalent values of the camera focal length in the x and y directions, and H is the vertical pixel degree of the image resolution W×H.
[0117] By defining a Region of Interest (ROI), it is possible to focus on a specific area in the image, reduce the amount of data computation, improve processing speed, and eliminate interference from irrelevant backgrounds. By mapping pixel coordinates to physical coordinates, the image is given a sense of scale, allowing the conversion between pixel units and physical units.
[0118] S3. Determine the image acquisition frequency and image acquisition time sequence to obtain dynamic images;
[0119] In practice, the image acquisition frequency is determined based on the conveyor belt speed and detection accuracy requirements.
[0120] f_capture = (v·α) / L_overlap;
[0121] Where α is the overlap coefficient, and α takes a value of 1.2 - 1.5 to ensure detection continuity; L_overlap is the overlap length between two adjacent frames; v is the conveyor belt speed; and f_capture is the image acquisition frequency.
[0122] This links the acquisition frequency, conveyor belt speed, and accuracy, ensuring continuous detection and preventing significant overlap between adjacent frames, thereby improving image acquisition quality.
[0123] The image acquisition time sequence is as follows:
[0124] t_n=n / f_capture, n=0,1,2,... ;
[0125] The image acquired at time t_n is denoted as I_n(x,y).
[0126] S4. Preprocess the acquired images;
[0127] Specifically, the preprocessing of the acquired image includes grayscale conversion, Gaussian filtering, and histogram equalization.
[0128] More specifically, during image preprocessing, grayscale conversion is performed first:
[0129] I_gray^n(x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y);
[0130] Grayscale conversion converts color images (such as RGB three-channel images) into single-channel grayscale images, where each pixel is represented by only one intensity value, thereby reducing data dimensionality and removing redundant colors.
[0131] Then, Gaussian filtering is applied to remove noise:
[0132] I_filtered^n(x,y) = I_gray^n(x,y) * G_σ(x,y);
[0133] In the formula, G_σ(x,y) is the Gaussian kernel, which is defined as: G_σ(x,y) = [1 / (2πσ²)] exp(-(x²+y²) / (2σ²));
[0134] In the formula, σ is the standard deviation parameter. By convolving the image with a Gaussian kernel, the weighted average value of the neighboring pixels is used to replace the center pixel value, thereby effectively removing Gaussian noise, making the image smoother, and reducing the interference of small textures or noise on subsequent analysis.
[0135] Finally, histogram equalization is applied to enhance contrast:
[0136] I_enhanced^n(x,y) = [(L-1) / (M·N)] Σ h(i);
[0137] In the formula, L is the number of gray levels, M × N is the image size, h(i) is the gray level histogram, and I_enhanced^n(x,y) is the enhanced gray level value.
[0138] Histogram equalization redistributes the gray levels of an image, making the histogram of the output image as flat as possible, thereby enhancing global contrast and improving image quality.
[0139] S5. Extract and detect tobacco stem features in the image;
[0140] refer to Figure 4 As shown, it specifically includes:
[0141] Candidate regions for tobacco stems were extracted using an adaptive threshold segmentation method.
[0142] B^n(x,y)= ;
[0143] This allows the enhanced image to be converted into a binary image B^n(x,y) based on a local threshold T_local(x,y), where the local threshold T_local(x,y) is calculated through a local window.
[0144] T_local(x,y) = μ_local(x,y) + k·σ_local(x,y);
[0145] In the formula, μ_local is the local mean, σ_local is the local standard deviation, and k is the adjustment coefficient;
[0146] Perform connected component analysis on the binary image B^n(x,y) and mark all connected components C_i, where i is the index of the connected component;
[0147] Calculate the area A_i of each connected component C_i, where the area is defined as the total number of pixels within that connected component:
[0148] A_i= ;
[0149] Selection of tobacco stems based on morphological characteristics:
[0150] S_i = {C_i | A_min≤A_i≤A_max, λ_min≤λ_i≤λ_max};
[0151] Where λ_i is the aspect ratio, which is obtained by the following formula:
[0152] λ_i = L_i / W_i;
[0153] In the formula, L_i and W_i are the length and width of the connected region, respectively.
[0154] S6. Count the number of tobacco stems and calculate the tobacco stem density per unit area;
[0155] This step specifically includes:
[0156] Calculate the number of tobacco stems detected in the nth frame image:
[0157] N_n = |S_n|;
[0158] Considering the movement of the conveyor belt, the sliding window method is used to calculate the number of tobacco stems per unit time:
[0159] N_avg(t) = (1 / W_time) Σ N_i;
[0160] In the formula, W_time is the width of the time window;
[0161] Calculate the density of tobacco stems per unit area:
[0162] ρ_n = N_n / (A_ROI · β)
[0163] In the formula, β is the conversion coefficient from pixel to physical area, which is obtained by the following formula: β=(H / f_x)·(H / f_y).
[0164] In this step, the number of tobacco stems per unit time is calculated using the sliding window method, shifting the focus from "whether there are tobacco stems at a certain moment" to "how many tobacco stems pass through within a certain period of time." This effectively improves the system's robustness (anti-interference) and accuracy (focusing on major issues while ignoring minor ones), and is a key step in achieving stable alarms and production process monitoring.
[0165] S7. The amount of tobacco stems is evaluated by setting a threshold for the amount of tobacco stems.
[0166] Specifically, this step includes: establishing an assessment index for tobacco stem quantity:
[0167] Q_n = ω1·N_avg(n) + ω2·ρ_n + ω3·max(N_i);
[0168] In the formula, ω1, ω2, ω3 are weight coefficients, satisfying ω1 + ω2 + ω3 = 1;
[0169] Set judgment criteria:
[0170] Alert n = ;
[0171] In the formula, Q_threshold is the preset threshold for the amount of tobacco stems;
[0172] To avoid frequent alarms, a continuous determination is introduced:
[0173] Alert_final n = ;
[0174] In the formula, M is the number of confirmation window frames, r_confirm is the confirmation ratio, r_confirm takes a value of 0.7-0.8, and K is the starting window, K=n-M+1.
[0175] By using the sliding window method and introducing a persistent decision mechanism, the stability of the detection can be improved, frequent alarms can be prevented, and the robustness of the detection can be enhanced.
[0176] S8. Trigger an alarm based on the assessed structure and record relevant data;
[0177] Specifically, when Alert_final n When =1, the system triggers an alarm and records relevant data, including:
[0178] Alarm time: t_alarm = t_n
[0179] Number of tobacco stems: N_alarm = N_n
[0180] Evaluation metric: Q_alarm = Q_n
[0181] Image snapshot: I_alarm = I_n;
[0182] Simultaneously, based on relevant data, the trend indicator of tobacco stem quantity was calculated:
[0183] T_trend = (Q_n - Q_(n-W_trend)) / Δt;
[0184] In the formula, W_trend is the trend calculation window, and Δt is the time interval.
[0185] Example 2:
[0186] Based on Example 1, in order to implement the monitoring method described in this invention, this example provides a visual monitoring device for the amount of tobacco stems in a cigarette rolling machine, referring to... Figure 2 As shown, the device includes:
[0187] Image acquisition module: includes an industrial camera and lighting device. The industrial camera has a resolution of no less than 1920 × 1200 pixels, a frame rate of no less than 30fps, and supports hardware ROI. The lighting device uses an LED light source with a color temperature of 5000K ± 500K.
[0188] Image processing module: Equipped with an image processing unit, with a computing power of no less than 4 TFLOPS and a memory of no less than 8 GB, supporting the operation of real-time image processing algorithms.
[0189] Data storage module: includes local storage units and cloud storage interfaces, with a local storage capacity of no less than 512GB, supporting at least 30 days of historical data storage.
[0190] Alarm output module: includes an audible and visual alarm and a network communication interface, supports multi-level alarm output, and has a response time of no more than 100ms.
[0191] Human-computer interaction module: Provides a touch screen and operation interface to display monitoring data, tobacco stem quantity curves and alarm information in real time.
[0192] Example 3:
[0193] Based on Example 1, a cigarette factory applied the method to the ZJ118 cigarette making machine, which has a feed belt width W = 600mm and a conveying speed v = 1.2m / s.
[0194] refer to Figure 5 As shown, an image acquisition module is installed at the outlet of the wire feeding conveyor belt. An industrial camera with a resolution of W_img × H_img = 2048 × 1536 pixels and a frame rate of 60fps is selected. The camera is installed at a height of H = 800mm and an angle of θ = 45°.
[0195] The lighting system uses two sets of LED strip light sources, installed on both sides of the conveyor belt, with a color temperature of 5000K and a total power of 80W. Illuminance testing showed that the ROI area's light uniformity δ_light = 0.12 < 0.15, meeting the requirements.
[0196] refer to Figure 3 As shown, the ROI region is set as the center region of the image, with coordinates x1 = 256, x2 = 1792, y1 = 384, y2 = 1152, corresponding to a physical size of approximately 540mm × 270mm.
[0197] Based on the requirements of conveying speed and detection accuracy, the overlap coefficient α = 1.3 and the overlap length L_overlap = 50mm are set. The image acquisition frequency is then calculated as follows:
[0198] f_capture = (1.2 × 1.3) / 0.05 = 31.2fps
[0199] The actual setting is f_capture = 30fps.
[0200] Image preprocessing parameter settings: Gaussian filter standard deviation σ = 2.0, adaptive threshold window size 15 × 15 pixels, adjustment coefficient k = 0.1.
[0201] Tobacco stem feature selection parameters: area range A_min = 50 pixels, A_max = 5000 pixels; aspect ratio range λ_min = 2.0, λ_max = 15.0.
[0202] The sliding window width W_time = 30 frames, corresponding to a time of approximately 1 second.
[0203] The weighting of the tobacco stem quantity assessment index is set as follows: ω1 = 0.5, ω2 = 0.3, ω3 = 0.2.
[0204] Based on historical data, the average number of tobacco stems during normal production is N_normal = 8 ± 3 per frame. A threshold Q_threshold is set such that the probability of Q_n < Q_threshold under normal conditions is greater than 95%, thus determining Q_threshold = 15.6.
[0205] Confirmation window M = 10 frames, confirmation ratio r_confirm = 0.8.
[0206] Although the invention has been described herein with reference to several illustrative embodiments, it should be understood that many other modifications and implementations can be devised by those skilled in the art, which will fall within the scope and spirit of the principles disclosed herein. More specifically, various modifications and improvements can be made to the components or layout of the subject matter arrangement within the scope of the disclosure, drawings, and claims. Besides modifications and improvements to the components or layout, other uses will be apparent to those skilled in the art.
Claims
1. A method for monitoring the amount of tobacco stems in a tobacco feeder, characterized in that, include: S1. Install the camera according to the parameters of the wire feeder outlet conveyor belt; S2. Define the region of interest (ROI) in the image coordinate system and establish the mapping relationship between pixel coordinates and physical coordinates; S3. Determine the image acquisition frequency and image acquisition time sequence to obtain dynamic images; S4. Preprocess the acquired images; S5. Extract and detect tobacco stem features in the image; S6. Count the number of tobacco stems and calculate the tobacco stem density per unit area; S7. The amount of tobacco stems is evaluated by setting a threshold for the amount of tobacco stems. S8. Trigger an alarm based on the assessed structure and record relevant data.
2. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S1, the parameters of the wire feeder outlet conveyor belt include the conveyor belt width and conveying speed, and the camera installation position satisfies: A_camera = (W·L_field) / cos(θ); In the formula, W is the width of the conveyor belt, L_field is the field of view length along the conveying direction, θ is the angle between the camera and the surface of the conveyor belt, and A_camera is the effective imaging area of the camera.
3. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S2, the region of interest (ROI) is defined in the image coordinate system and a mapping relationship between pixel coordinates and physical coordinates is established. The ROI is defined as follows: ROI={(x,y)|x1≤x≤x2, y1≤y≤y2}; The area of the region of interest (ROI) is: A_ROI=(x2-x1)(y2-y1); In the formula, A_ROI is the area of the region of interest (ROI), x1 and x2 are the horizontal coordinates of the left and right sides of the ROI, and y1 and y2 are the vertical coordinates of the top and bottom sides of the ROI. The mapping relationship between pixel coordinates and physical coordinates is as follows: X_physical = (x - x0) / f_x · H; Y_physical = (y - y0) / f_y · H; In the formula, (x0, y0) are the principal points of the image, f_x and f_y are the pixel equivalent values of the camera focal length in the x and y directions, and H is the vertical pixel degree of the image resolution W×H.
4. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S3, determining the image acquisition frequency and the image acquisition time sequence to obtain the dynamic image specifically includes: The image acquisition frequency is determined based on the conveyor belt speed and detection accuracy requirements. f_capture = (v·α) / L_overlap; Where α is the overlap coefficient, L_overlap is the overlap length between two adjacent frames, v is the conveyor belt speed, and f_capture is the image acquisition frequency; The image acquisition time sequence is as follows: t_n=n / f_capture, n=0,1,2,... ; The image acquired at time t_n is denoted as I_n(x,y).
5. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S4, the acquired image is preprocessed, including grayscale conversion, Gaussian filtering, and histogram equalization.
6. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 5, characterized in that: When preprocessing images, grayscale conversion is performed first: I_gray^n(x,y)=0.299R(x,y)+0.587G(x,y)+0.114B(x,y); Then, Gaussian filtering is applied to remove noise: I_filtered^n(x,y) = I_gray^n(x,y) * G_σ(x,y); In the formula, G_σ(x,y) is the Gaussian kernel, and its definition is as follows: G_σ(x,y) = [1 / (2πσ²)] exp(-(x²+y²) / (2σ²)); Finally, histogram equalization is applied to enhance contrast: I_enhanced^n(x,y) = [(L-1) / (M·N)] Σ h(i); In the formula, L is the number of gray levels, M × N is the image size, h(i) is the gray level histogram, and I_enhanced^n(x,y) is the enhanced gray level value.
7. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S5, the extraction and detection of tobacco stem features in the image specifically includes: Candidate regions for tobacco stems were extracted using an adaptive threshold segmentation method. B^n(x,y)= ; The local threshold T_local(x,y) is calculated using a local window: T_local(x,y) = μ_local(x,y) + k·σ_local(x,y); In the formula, μ_local is the local mean, σ_local is the local standard deviation, and k is the adjustment coefficient; Perform connected component analysis on the binary image B^n(x,y) and mark all connected components C_i; Calculate the area A_i of each connected component C_i, where the area is defined as the total number of pixels within that connected component: A_i= ; Selection of tobacco stems based on morphological characteristics: S_i = {C_i | A_min≤A_i≤A_max, λ_min≤λ_i≤λ_max}; Where λ_i is the aspect ratio, which is obtained by the following formula: λ_i = L_i / W_i; In the formula, L_i and W_i are the length and width of the connected region, respectively.
8. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S6, the counting of tobacco stems and the calculation of tobacco stem density per unit area specifically include: Calculate the number of tobacco stems detected in the nth frame image: N_n = |S_n|; The number of tobacco stems per unit time was calculated using the sliding window method: N_avg(t) = (1 / W_time) Σ N_i; In the formula, W_time is the width of the time window; Calculate the density of tobacco stems per unit area: ρ_n = N_n / (A_ROI · β); In the formula, β is the conversion coefficient from pixel to physical area, which is obtained by the following formula: β=(H / f_x)·(H / f_y).
9. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S7, the assessment of the amount of tobacco stems by setting a threshold value specifically includes: Establish indicators for assessing tobacco stem quantity: Q_n = ω1·N_avg(n) + ω2·ρ_n + ω3·max(N_i); In the formula, ω1, ω2, ω3 are weight coefficients, satisfying ω1 + ω2 + ω3 = 1; Set judgment criteria: Alert n = ; In the formula, Q_threshold is the preset threshold for the amount of tobacco stems; Introducing persistence determination: Alert_final n = ; In the formula, M is the number of confirmation window frames, r_confirm is the confirmation ratio, r_confirm takes a value of 0.7-0.8, and K is the starting window, K=n-M+1.
10. The method for monitoring the amount of tobacco stems in a tobacco feeder according to claim 1, characterized in that: In step S8, when Alert_final n When =1, the system triggers an alarm and records relevant data, including: Alarm time: t_alarm = t_n Number of tobacco stems: N_alarm = N_n Evaluation metric: Q_alarm = Q_n Image snapshot: I_alarm = I_n; Simultaneously, based on relevant data, a trend indicator for tobacco stem quantity was calculated: T_trend = (Q_n - Q_(n-W_trend)) / Δt; In the formula, W_trend is the trend calculation window, and Δt is the time interval.