Cigar tobacco leaf flattening degree detection method based on 3d structured light

By employing a 3D structured light-based detection method, dual cameras and the least squares method are used to accurately solve the three-dimensional coordinates of the tobacco leaf surface, automatically identifying and analyzing the flatness of the tobacco leaves. This solves the problem of large errors in manual judgment in existing technologies, and achieves efficient and accurate detection and quality control of tobacco leaf flatness.

CN119509421APending Publication Date: 2025-02-25CHINA NAT TOBACCO CORP HAINAN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411682831.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-22
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In existing technologies, the methods for determining the flatness of cigar tobacco leaves mainly rely on manual observation, which suffers from large subjective errors and poor accuracy, making it difficult to quickly and accurately identify and analyze the flatness of tobacco leaves from different parts and of different qualities.

Method used

A 3D structured light-based detection method is adopted, which uses dual cameras to acquire grid light reflection images from different angles. The least squares method is used to accurately solve the three-dimensional coordinates of each point on the tobacco leaf surface. The grid intersections are automatically extracted by combining edge detection and Hough linear transformation. The tobacco leaf surface equation is fitted and the flatness is calculated to achieve accurate three-dimensional reconstruction and quantitative evaluation of the tobacco leaf surface.

Benefits of technology

It achieves high-precision detection of tobacco leaf flatness, reduces human intervention, improves detection efficiency, ensures the objectivity and consistency of results, provides repeatable and comparable detection indicators, and can analyze the flatness changes at different locations on the tobacco leaf surface, providing a dynamic monitoring method for quality control in the tobacco processing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119509421A_ABST
    Figure CN119509421A_ABST
Patent Text Reader

Abstract

The invention discloses a cigar tobacco leaf flattening degree detection method based on 3d structured light. The cigar tobacco leaf flattening degree detection method comprises the following steps: fixing a cigar tobacco leaf to be detected on a measuring table; transmitting latticed infrared light to each measurement sample; two infrared cameras installed at different angles are used for receiving infrared light reflected by the sample, and images A1 and A2 are obtained; pixel coordinates of grid intersection points in the image A1 and the image A2 are extracted through an image processing technology, and a corresponding relation is established; calculating a three-dimensional coordinate of each grid intersection point by adopting a least square method; fitting a tobacco leaf curved surface equation based on the three-dimensional coordinates; integral analysis is conducted on the fitted curved surface equation, and the flatness index of the tobacco leaves is calculated. According to the method, high-precision and automatic detection of the flattening degree of the surface of the cigar tobacco is realized. Meanwhile, the method can be used for rapidly treating a large batch of tobacco leaves, efficient production detection is achieved, and the method is suitable for the requirements of different production environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for detecting the flatness of cigar tobacco leaves based on 3D structured light, and belongs to the technical field of 3D structured light. Background Art

[0002] A cigar consists of a wrapper, a binder and a core from the outside to the inside. The wrapper can be directly viewed by consumers, and its appearance quality is an important indicator for evaluating the quality and grade of cigars. The appearance quality of high-quality wrapper tobacco leaves is characterized by thin leaves, fine veins and uniform color. Thinner wrapper tobacco leaves with thinner veins and flat and unobtrusive veins have good leaf flatness. After rolling and forming, the appearance of the cigarette will appear smoother and more even in color, and the burning and ash properties will be better. For a long time, domestic cigar tobacco leaves, especially wrapper tobacco leaves, have had problems such as thicker leaves, poor flexibility, and poor flatness due to thick veins, resulting in a lack of raw materials for wrapper and wrapper tobacco leaves, which greatly restricted the development of domestic cigars. For this reason, in recent years, through the implementation of major projects for the development and application of domestic cigar tobacco leaves, the number of wrapper tobacco leaves has increased, but it still cannot meet the demand well. The reason for this is that, although it is related to the slow improvement of cigar tobacco production technology, the lack of research on the appearance quality of cigar wrapper tobacco leaves, especially the degree of flatness, has led to insufficient identification of cigar wrapper tobacco leaves, which is also an important reason. At present, the production of cigar tobacco leaves mostly uses the method of manually judging the degree of flatness of tobacco leaves, which has large subjective errors and poor accuracy. There are few research methods for accurately identifying the degree of flatness of tobacco leaves, which are mainly concentrated in the fields of screening during the breeding period and artificial flattening after modulation. In addition, the methods for measuring the degree of flatness mostly use methods such as marking points on the tobacco leaves to measure displacement and the rate of change of natural shrinkage of tobacco leaves. Traditional measurement methods can only indirectly estimate the overall flatness of tobacco leaves, and cannot achieve rapid and accurate identification and analysis of changes in the degree of flatness of tobacco leaves in different parts and qualities. Summary of the invention

[0003] The present invention proposes a method for detecting the flatness of cigar tobacco leaves based on 3D structured light to overcome the shortcomings of the prior art.

[0004] The technical solution of the present invention is: a method for detecting the flatness of cigar tobacco leaves based on 3D structured light, the method comprising the following steps:

[0005] S01. Fix the measurement sample on the sample measurement table;

[0006] S02, emitting grid infrared light to each measurement sample;

[0007] S03, using two infrared cameras to receive infrared light reflected from samples at different angles to obtain images A1 and A2;

[0008] S04, extract the pixel coordinates of the grid intersection points in images A1 and A2, where the pixel coordinates of the grid intersection points in A1 are (u1 ij ,v1 ij ), the pixel coordinates of the grid intersection in A2 in the image are (u2 ij ,v2 ij ), where i represents the arrangement number of the grid intersection in the horizontal direction, and j represents the arrangement number of the grid intersection in the vertical direction;

[0009] S05, establishing a correspondence between grid intersections in images A1 and A2;

[0010] S06, solve the following equation by the least square method to obtain the three-dimensional coordinates (X ij ,Y ij ,Z ij ),

[0011]

[0012] Among them, s1 and s2 represent the scaling factors of the two infrared cameras, and P1 and P2 represent the projection matrices of the two infrared cameras;

[0013] S7, based on the position vector (X ij ,Y ij ,Z ij ) Fitting the tobacco leaf surface equation;

[0014] S8. Integrate the tobacco leaf surface equation, and use the integral structure to divide it by the area of ​​the tobacco leaf surface on the sample measuring table to obtain the tobacco leaf flatness E.

[0015] Furthermore, P1=K1[I|0], P2=K2[R|t], I represents the unit matrix, R represents the rotation of the camera corresponding to P2 relative to the camera corresponding to P1, and t represents the translation of the camera corresponding to P2 relative to the camera corresponding to P1.

[0016]

[0017] Among them, f 1x and f 1y represents the focal length of the camera corresponding to P1 on the x-axis and y-axis, c 1x and c 1y Respectively represent the positions of the intersection of the camera optical axis and the image plane on the x-axis and y-axis.

[0018] Furthermore, the position vector (X ij ,Y ij ,Zij )The method for fitting the tobacco leaf surface equation is:

[0019] Assume that the z-axis coordinate of the sample measuring platform plane is 0;

[0020] Establish the tobacco leaf surface equation,

[0021]

[0022] Solving for the coefficient vector β,

[0023] β=(A T A) -1 A T Z

[0024] in,

[0025]

[0026] Among them, m represents the maximum arrangement number of the grid intersection in the horizontal coordinate direction, and j represents the maximum arrangement number of the grid intersection in the vertical coordinate direction.

[0027] Furthermore, the method for obtaining the pixel coordinates of the grid intersection points in the images A1 and A2 in the images is:

[0028] Read the image A1 or A2 to be processed into the computer memory;

[0029] Convert color images to grayscale images;

[0030] Apply Gaussian filtering or median filtering to the grayscale image to smooth the image;

[0031] Use edge detection algorithms to identify edges in images;

[0032] Apply Hough Line Transform to detect lines in edge images;

[0033] The detected straight lines are classified according to their angles: horizontal lines are straight lines with angles of 0° or 180°, and vertical lines are straight lines with angles of 90° or -90°;

[0034] Each detected straight line is represented as a general equation Ax+By+C=0, where A, B, and C are the coefficients of the line;

[0035] For each pair of horizontal and vertical lines, calculate the coordinates (x,y) of their intersection point

[0036]

[0037] Among them, (A1, B1, C1) and (A2, B2, C2) represent the coefficients of any two straight lines respectively.

[0038] Further, the images A1 and A2 captured in step S03 are a sequence of images captured within a set time period at a set time interval;

[0039] The images captured at each moment are A1(t) and A2(t);

[0040] The method of step S06 is used to calculate the three-dimensional coordinates (X) of the grid intersection points in images A1 and A2 at each moment. ij (t),Y ij (t),Z ij (t));

[0041] According to (X ij (t),Y ij (t),Z ij (t)) is used to solve the vector β(t) of the tobacco leaf surface equation to obtain a model of the tobacco leaf surface changing with time.

[0042] Beneficial Effects

[0043] The beneficial effects of the present invention are as follows: compared with the prior art, the technical solution of the present invention is adopted.

[0044] 1) This solution uses dual cameras to obtain grid light reflection images from different angles, and uses the least squares method to accurately solve the three-dimensional coordinates of each point on the tobacco leaf surface, thereby achieving accurate three-dimensional reconstruction of the tobacco leaf surface. The tobacco leaf surface equation is fitted based on the position vector of each corresponding point, which can accurately describe the geometric shape of the tobacco leaf and provide more detailed and accurate flatness information than two-dimensional images, thereby achieving high-precision detection of flatness information at any tobacco leaf point;

[0045] 2) The present invention uses edge detection and Hough linear transformation to automatically extract grid intersections, which reduces human intervention and improves detection efficiency. It can quickly acquire image sequences within a set time interval and perform real-time analysis. It is suitable for rapid detection of large quantities of tobacco leaves and significantly improves the detection efficiency of the production line.

[0046] 3) The present invention is different from the traditional method that relies on manual observation. The present invention uses computer automatic identification and analysis to avoid subjective errors caused by human judgment, ensure the objectivity and consistency of the test results, calculate the flatness E through the integral structure, realize the quantitative evaluation of the flatness of tobacco leaves, and provide repeatable and comparable test indicators;

[0047] 4) The present invention can perform detailed analysis on the flatness of different positions on the tobacco leaf surface, which helps to identify and improve the unevenness of tobacco leaf quality;

[0048] 5) The present invention can analyze the changing trend of tobacco leaf flatness over time by processing the image sequence, and provide a dynamic monitoring method for quality control in the tobacco leaf processing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A flow chart of the present disclosure. DETAILED DESCRIPTION

[0050] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings of this specification.

[0051] Embodiment 1: As attached Figure 1 As shown, a method for detecting the flatness of cigar tobacco leaves based on 3D structured light comprises the following steps:

[0052] S01. Fix the measurement sample on the sample measurement table;

[0053] S02, emitting grid infrared light to each measurement sample;

[0054] S03, using two infrared cameras to receive infrared light reflected from samples at different angles to obtain images A1 and A2;

[0055] S04, extract the pixel coordinates of the grid intersection points in images A1 and A2, where the pixel coordinates of the grid intersection points in A1 are (u1 ij ,v1 ij ), the pixel coordinates of the grid intersection in A2 in the image are (u2 ij ,v2 ij ), where i represents the arrangement number of the grid intersection in the horizontal direction, and j represents the arrangement number of the grid intersection in the vertical direction;

[0056] S05, establishing a correspondence between grid intersections in images A1 and A2;

[0057] S06, solve the following equation by the least square method to obtain the three-dimensional coordinates (X ij ,Y ij ,Z ij ),

[0058]

[0059] Among them, s1 and s2 represent the scaling factors of the two infrared cameras, and P1 and P2 represent the projection matrices of the two infrared cameras;

[0060] S7, based on the position vector (X ij ,Y ij ,Z ij ) Fitting the tobacco leaf surface equation;

[0061] S8. Integrate the tobacco leaf surface equation, and use the integral structure to divide it by the area of ​​the tobacco leaf surface on the sample measuring table to obtain the tobacco leaf flatness E.

[0062] Furthermore, P1=K1[I|0], P2=K2[R|t], I represents the unit matrix, R represents the rotation of the camera corresponding to P2 relative to the camera corresponding to P1, and t represents the translation of the camera corresponding to P2 relative to the camera corresponding to P1.

[0063]

[0064] Among them, f 1x and f 1y represents the focal length of the camera corresponding to P1 on the x-axis and y-axis, c 1x and c 1y Respectively represent the positions of the intersection of the camera optical axis and the image plane on the x-axis and y-axis.

[0065] Furthermore, the position vector (X ij ,Y ij ,Z ij )The method for fitting the tobacco leaf surface equation is:

[0066] Assume that the z-axis coordinate of the sample measuring platform plane is 0;

[0067] Establish the tobacco leaf surface equation,

[0068]

[0069] Solving for the coefficient vector β,

[0070] β=(A T A) -1 A T Z

[0071] in,

[0072]

[0073]

[0074] Among them, m represents the maximum arrangement number of the grid intersection in the horizontal coordinate direction, and q represents the maximum arrangement number of the grid intersection in the vertical coordinate direction.

[0075] Furthermore, the method for obtaining the pixel coordinates of the grid intersection points in the images A1 and A2 in the images is:

[0076] Read the image A1 or A2 to be processed into the computer memory;

[0077] Convert color images to grayscale images;

[0078] Apply Gaussian filtering or median filtering to the grayscale image to smooth the image;

[0079] Use edge detection algorithms to identify edges in images;

[0080] Apply Hough Line Transform to detect lines in edge images;

[0081] The detected straight lines are classified according to their angles: horizontal lines are straight lines with angles of 0° or 180°, and vertical lines are straight lines with angles of 90° or -90°;

[0082] Each detected straight line is represented as a general equation Ax+By+C=0, where A, B, and C are the coefficients of the line;

[0083] For each pair of horizontal and vertical lines, calculate the coordinates (x,y) of their intersection point

[0084]

[0085] Among them, (A1, B1, C1) and (A2, B2, C2) represent the coefficients of any two straight lines respectively.

[0086] Further, the images A1 and A2 captured in step S03 are a sequence of images captured within a set time period at a set time interval;

[0087] The images captured at each moment are A1(t) and A2(t);

[0088] The method of step S06 is used to calculate the three-dimensional coordinates (X) of the grid intersection points in images A1 and A2 at each moment. ij (t),Y ij (t),Z ij (t));

[0089] According to (X ij (t),Y ij (t),Z ij (t)) is used to solve the tobacco leaf surface equation by vector β(t) to obtain a model of the tobacco leaf surface changing with time.

[0090] The parts not described in detail in the present invention are all known technologies to those skilled in the art. Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention is described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A method for detecting the flatness of cigar tobacco leaves based on 3D structured light, characterized in that: The method comprises the following steps: S01. Fix the measurement sample on the sample measurement table; S02, emitting grid infrared light to each measurement sample; S03, using two infrared cameras to receive images A1 and A2 of infrared light reflected from samples at different angles; S04, extract the pixel coordinates of the grid intersection points in images A1 and A2, where the pixel coordinates of the grid intersection points in A1 are (u1 ij ,v1 ij ), the pixel coordinates of the grid intersection in A2 in the image are (u2 ij ,v2 ij ), where i represents the arrangement number of the grid intersection in the horizontal direction, and j represents the arrangement number of the grid intersection in the vertical direction; S05, establishing a correspondence between grid intersections in images A1 and A2; S06, solve the following equation by the least square method to obtain the three-dimensional coordinates (X ij ,Y ij ,Z ij ), Among them, s1 and s2 represent the scaling factors of the two infrared cameras, and P1 and P2 represent the projection matrices of the two infrared cameras; S7, based on the position vector (X ij ,Y ij ,Z ij ) Fitting the tobacco leaf surface equation; S8. Integrate the tobacco leaf surface equation, and use the integral structure to divide it by the area of ​​the tobacco leaf surface on the sample measuring table to obtain the tobacco leaf flatness E.

2. The method for detecting the flatness of cigar tobacco leaves based on 3D structured light according to claim 1, characterized in that: P1=K1[I|0], P2=K2[R|t], I represents the unit matrix, R represents the rotation of the camera corresponding to P2 relative to the camera corresponding to P1, and t represents the translation of the camera corresponding to P2 relative to the camera corresponding to P1. Among them, f 1x and f 1y represents the focal length of the camera corresponding to P1 on the x-axis and y-axis, c 1x and c 1y Respectively represent the positions of the intersection of the camera optical axis and the image plane on the x-axis and y-axis.

3. The method for detecting the flatness of cigar tobacco leaves based on 3D structured light according to claim 1, characterized in that: The position vector (X) of each corresponding point on the tobacco leaf surface is ij ,Y ij ,Z ij )The method for fitting the tobacco leaf surface equation is: Assume that the z-axis coordinate of the sample measuring platform plane is 0; Establish the tobacco leaf surface equation, Solving for the coefficient vector β, β=(A T A) -1 A T Z in, Among them, m represents the maximum arrangement number of the grid intersection in the horizontal coordinate direction, and q represents the maximum arrangement number of the grid intersection in the vertical coordinate direction.

4. The method for detecting the flatness of cigar tobacco leaves based on 3D structured light according to claim 1, characterized in that: The method for obtaining the pixel coordinates of the grid intersection points in images A1 and A2 in the images is: Read the image A1 or A2 to be processed into the computer memory; Convert color images to grayscale images; Apply Gaussian filtering or median filtering to the grayscale image to smooth the image; Use edge detection algorithms to identify edges in images; Apply Hough Line Transform to detect lines in edge images; The detected straight lines are classified according to their angles. Horizontal lines are straight lines with angles of 0° or 180°, and vertical lines are straight lines with angles of 90° or -90°. Each detected straight line is represented as a general equation Ax+By+C=0, where A, B, and C are the coefficients of the line; For each pair of horizontal and vertical lines, calculate the coordinates (x,y) of their intersection point Among them, (A1, B1, C1) and (A2, B2, C2) represent the coefficients of any two straight lines respectively.

5. The method for detecting the flatness of cigar tobacco leaves based on 3D structured light according to claim 3, characterized in that: The images A1 and A2 captured in step S03 are a sequence of images captured within a set time period at a set time interval; The images captured at each moment are A1(t) and A2(t); The method of step S06 is used to calculate the three-dimensional coordinates (X) of the grid intersection points in images A1 and A2 at each moment. ij (t),Y ij (t),Z ij (t)); According to (X ij (t),Y ij (t),Z ij (t)) is used to solve the tobacco leaf surface equation by vector β(t) to obtain a model of the tobacco leaf surface changing with time.