Cigarette section perimeter identification method, electronic equipment and program product
By acquiring laser positioning parameters and generating point cloud data, accurately measuring the perimeter of the cigarette post section is solved, and the problems of low efficiency and insufficient accuracy in the prior art are achieved, and more efficient and accurate cigarette post detection is achieved.
Patent Information
- Application Number
- CN202510359765.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-06-20
AI Technical Summary
The existing cigarette post detection methods are inefficient and insufficient in accuracy, making it difficult to accurately measure the circumference of the cigarette post section.
By acquiring laser positioning parameters, point cloud data representing the appearance characteristics of the cigarette branch are generated, and the cross-sectional perimeter of the cigarette branch is determined using the point cloud data.
The calculation speed and accuracy of the circumference of the cigarette post section are improved, and the problems of low efficiency and insufficient accuracy of traditional methods are solved.
Smart Images

Figure CN120176542A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cigarette detection, and in particular, to a method for identifying the cross-sectional perimeter of a cigarette, an electronic device, and a program product. Background Art
[0002] With the continuous development of industrial technology, intelligent and automated operations have become the mainstream of current industrial production.
[0003] In the field of cigarette production and manufacturing technology, the perimeter of a cigarette reflects the fullness of the tobacco in the cigarette. During the production process, due to reasons such as non-standard cigarette wrapping operations and unreasonable machine parameters, the tobacco content in the cigarette may be insufficient, or the wrapping tightness of the wrapping paper does not meet the quality requirements. However, usually, the appearance of the cigarette (especially for slender cigarettes) cannot significantly represent these defects.
[0004] Existing cigarette detection usually involves sampling from finished cigarettes and measuring the sample size using hand-held tools (such as calipers, etc.). Then, based on the diameter of the sample cigarette measured by the hand-held tool, the perimeter of the cigarette is roughly calculated to determine whether the quality of the cigarette sample meets the standard. Such a method has problems of low efficiency and insufficient accuracy. Summary of the Invention
[0005] In view of this, the purpose of the embodiments of the present application is to provide a method for identifying the cross-sectional perimeter of a cigarette, an electronic device, and a program product, which can improve the problems of low efficiency and insufficient accuracy in the traditional method for measuring the cigarette perimeter.
[0006] To achieve the above technical objectives, the technical solutions adopted in the present application are as follows:
[0007] In a first aspect, an embodiment of the present application provides a method for identifying the cross-sectional perimeter of a cigarette, the method comprising:
[0008] Obtaining laser positioning parameters, where the laser positioning parameters represent laser reception data collected after lasers are emitted to a target cigarette by a plurality of annularly arranged laser sensors;
[0009] Obtaining point cloud data representing the external shape characteristics of the target cigarette according to the laser positioning parameters;
[0010] Determining the cross-sectional perimeter of the target cigarette according to the point cloud data.
[0011] In combination with the first aspect, in some alternative embodiments, the laser positioning parameters include laser light speed, phase difference, laser wavelength, deflection angle of the scanning galvanometer of the laser sensor, laser emission angle, transmitter signal intensity, receiver signal intensity, and receiver sampling frequency;
[0012] Obtain point cloud data representing the external shape characteristics of the target cigarette according to the laser positioning parameters, including:
[0013] According to the laser positioning parameters, determine the distance from the laser sensor to the three-dimensional point cloud that constitutes the point cloud data:
[0014]
[0015] In the formula, d i represents the distance between the i-th three-dimensional point cloud and the laser sensor, c represents the speed of light, Δt represents the round-trip time required for the laser to reach the surface of the target cigarette from the transmitter of the laser sensor and return to the receiver of the laser sensor, φ represents the phase difference, λ represents the laser wavelength, f s represents the receiver sampling frequency;
[0016] According to the laser positioning parameters, determine the three-axis coordinates of the three-dimensional point cloud:
[0017] x i = d i cosθcosu i , y i = d i cosθsinv i , z i = d i sinθ
[0018] In the formula, (x i , y i , z i ) represents the three-axis coordinates of the i-th three-dimensional point cloud, θ represents the laser emission angle, u i 、v i respectively represent the deflection angles of the scanning galvanometer of the laser sensor in the horizontal and vertical directions;
[0019] According to the laser positioning parameters, determine the reflection intensity of the three-dimensional point cloud:
[0020]
[0021] In the formula, I i represents the reflection intensity, I rec represents the receiver signal intensity of the laser sensor, I emit represents the transmitter signal intensity of the laser sensor;
[0022] According to the three-axis coordinates and the reflection intensity of the three-dimensional point cloud, determine the point cloud data:
[0023]
[0024] In the formula, P idenotes the point cloud data corresponding to the i-th three-dimensional point cloud composed of three-axis coordinates and reflection intensity, and N denotes the number of three-dimensional point clouds.
[0025] Combined with the first aspect, in some alternative embodiments, according to the point cloud data, by means of a preset curve fitting strategy, determining the cross-sectional perimeter of the target cigarette includes:
[0026] According to the point cloud data, determining the contour curve of the target cross-section on the target cigarette;
[0027] According to the contour curve, determining the perimeter of the target cross-section as the cross-sectional perimeter.
[0028] Combined with the first aspect, in some alternative embodiments, according to the point cloud data, determining the contour curve of the target cross-section on the target cigarette includes:
[0029] According to the point cloud data, determining the set of closed contour points of the target cross-section, and the set of closed contour points represents the set of boundary points enclosing the target cross-section;
[0030] Performing chord length parameterization on each three-dimensional point cloud in the set of closed contour points to obtain a parameter sequence corresponding to each three-dimensional point cloud;
[0031] According to the parameter sequence, determining the knot vector corresponding to the parameter sequence by means of a preset average node strategy;
[0032] According to the parameter sequence corresponding to each three-dimensional point cloud and the knot vector, performing curve fitting on each three-dimensional point cloud in the set of closed contour points to obtain the contour curve.
[0033] Combined with the first aspect, in some alternative embodiments, according to the point cloud data, determining the set of closed contour points of the target cross-section includes:
[0034] Based on a preset Graham scan strategy, determining a plurality of convex hull vertices corresponding to the target cross-section from the point cloud data, and taking the set of the plurality of convex hull vertices as the convex point set;
[0035]
[0036] where S k denotes the set of three-dimensional point clouds in the point cloud data that constitute the target cross-section, α m denotes the convex point combination coefficient, denotes the convex hull vertex corresponding to the target cross-section, M denotes the number of convex hull vertices, and Q denotes the convex point set;
[0037] In the point cloud data, take the 3D point clouds that constitute the target cross-section as the target point cloud set, and determine the local curvature of each 3D point cloud in the target point cloud set:
[0038]
[0039] In the formula, k j represents the local curvature corresponding to the j-th 3D point cloud Q in the target point cloud set j , and t j represents the tangent vector at Q j ;
[0040] Determine that the set of multiple 3D point clouds in the target point cloud set with local curvature less than the preset concave point threshold is the concave point set;
[0041] Merge the convex point set and the concave point set to obtain the closed contour point set.
[0042] Combined with the first aspect, in some alternative embodiments, determining the perimeter of the target cross-section as the cross-section perimeter according to the contour curve includes:
[0043] Divide the contour curve into multiple segments of curves, and perform integral summation on the lengths corresponding to the multiple segments of curves to obtain the cross-section perimeter:
[0044]
[0045] In the formula, L represents the cross-section perimeter, S represents the number of curves included in the segmented contour curve, u s , w s respectively represent the preset integration points and preset weights, C(u) represents the contour curve, and x(u), y(u) represent the coordinate components of any point on the contour curve on the x and y axes.
[0046] Combined with the first aspect, in some alternative embodiments, the method further includes:
[0047] Determine the volume of the target cigarette according to the point cloud data.
[0048] Combined with the first aspect, in some alternative embodiments, the method further includes:
[0049] When the cross-section perimeter is in the first preset abnormal interval or the volume is in the second preset interval, send a prompt message indicating that the quality of the target cigarette is abnormal.
[0050] The invention adopting the above technical solution has the following advantages:
[0051] In the technical solution provided by this application, first, laser positioning parameters are obtained. Then, based on the laser positioning parameters, point cloud data representing the external shape characteristics of the target cigarette is obtained. Finally, based on the point cloud data, the cross-sectional perimeter of the target cigarette is determined. In this way, the point cloud data is sensed by a laser sensor, and the cross-sectional perimeter of the target cigarette is calculated based on the point cloud data, improving the calculation speed of the cigarette cross-sectional perimeter and improving the problems of low efficiency and insufficient accuracy in the traditional cigarette perimeter measurement method. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] This application can be further illustrated by the non-limiting embodiments given in the drawings. It should be understood that the following drawings only show some embodiments of this application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.
[0053] Figure 1 It is a schematic structural diagram of an electronic device provided by an embodiment of this application.
[0054] Figure 2 It is a schematic flowchart of a method for identifying the cross-sectional perimeter of a cigarette provided by an embodiment of this application.
[0055] Reference numerals: 100 - electronic device; 101 - processor; 102 - memory. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0056] The following will describe this application in detail with reference to the drawings and specific embodiments. It should be noted that in the drawings or the description, similar or identical parts are denoted by the same reference numerals, and the implementation manners not depicted or described in the drawings are in the forms known to those of ordinary skill in the art. In the description of this application, terms such as "first", "second", etc. are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.
[0057] Please refer to Figure 1 , an electronic device 100 provided by an embodiment of this application may include a processor 101 and a memory 102. A computer program is stored in the memory 102. When the computer program is executed by the processor 101, the electronic device 100 can execute the corresponding steps in the following method for identifying the cross-sectional perimeter of a cigarette.
[0058] In this embodiment, the electronic device 100 may be a personal computer, a laptop, a cloud server, etc. This embodiment takes a personal computer as an example. It can be understood that, for the convenience of implementing the above cigarette cross-section perimeter recognition method, the electronic device 100 may further include a plurality of annularly arranged laser sensors connected to the above personal computer, and the angular difference between adjacent laser sensors is equal. The electronic device 100 is used to obtain laser positioning parameters, and then according to the laser positioning parameters, obtain point cloud data representing the external shape characteristics of the target cigarette, and finally determine the cross-section perimeter of the target cigarette according to the point cloud data.
[0059] In this embodiment, the processor 101 may be an integrated circuit chip with signal processing capabilities. The above processor 101 may be a general-purpose processor. For example, the processor 101 may be a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
[0060] The memory 102 may be, but is not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc. In this embodiment, the memory 102 may be used to store laser positioning parameters, point cloud data, a preset curve fitting strategy, cross-section perimeter, preset height, volume, a first preset abnormal interval, a second preset abnormal interval, a prompt message, etc. Of course, the memory 102 may also be used to store a program, and the processor 101 executes the program after receiving an execution instruction.
[0061] It can be understood that Figure 1 the structure of the electronic device 100 shown in Figure 1 is only a schematic structural diagram, and the electronic device 100 may further include more components than Figure 1 shown.
[0062] Please refer to Figure 2 , the present application also provides a cigarette cross-section perimeter recognition method, which can be applied to the above electronic device 100 and executed or implemented by the electronic device 100 for each step of the method. Among them, the cigarette cross-section perimeter recognition method may include the following steps:
[0063] Step 210, obtain laser positioning parameters, where the laser positioning parameters represent laser reception data collected after emitting laser to a target cigarette through a plurality of annularly arranged laser sensors;
[0064] Step 220, according to the laser positioning parameters, obtain point cloud data characterizing the external shape features of the target cigarette;
[0065] Step 230, according to the point cloud data, determine the cross-sectional perimeter of the target cigarette.
[0066] In the above embodiment, first, laser positioning parameters are obtained, then according to the laser positioning parameters, point cloud data characterizing the external shape features of the target cigarette is obtained, and finally, according to the point cloud data, the cross-sectional perimeter of the target cigarette is determined. In this way, point cloud data is sensed by a laser sensor, and based on the point cloud data, the cross-sectional perimeter of the target cigarette is measured, improving the measurement speed of the cigarette cross-sectional perimeter and improving the problems of low efficiency and insufficient accuracy existing in the traditional cigarette perimeter measurement method.
[0067] The following will elaborate on each step of the cigarette cross-sectional perimeter recognition method in detail as follows:
[0068] In step 210, the laser positioning parameters may include laser light speed, phase difference, laser wavelength, deflection angle of the scanning galvanometer of the laser sensor, laser emission angle, transmitter signal intensity, receiver signal intensity, and receiver sampling frequency. In this embodiment, the acquisition of the laser positioning parameters can be through real-time acquisition by the laser sensor (or calibration parameters such as laser light speed and scanning mirror deflection angle included in the laser positioning parameters do not need to be acquired and are directly transmitted in real time) and sent to the processor 101 of the above electronic device 100 in real time for subsequent determination of point cloud data and calculation of the cross-sectional perimeter; or, the acquisition of the laser positioning parameters can also be in the pre-test stage, pre-inputting the laser positioning parameters into the memory 102 of the above electronic device 100, and during the subsequent acquisition of point cloud data and calculation of the cross-sectional perimeter, calling based on the instruction issued by the user through the processor 101.
[0069] In step 220, according to the laser positioning parameters, obtaining point cloud data characterizing the external shape features of the target cigarette may include:
[0070] According to the laser positioning parameters, determine the distance from the laser sensor to the three-dimensional point cloud constituting the point cloud data:
[0071]
[0072] In the formula, d iIndicates the distance between the \(i\)-th three-dimensional point cloud and the laser sensor, \(c\) represents the speed of light, \(\Delta t\) represents the round-trip time required for the laser to reach the surface of the target cigarette from the emitter of the laser sensor and return to the receiver of the laser sensor, \(\varphi\) represents the phase difference, \(\lambda\) represents the laser wavelength, and \(f\) s represents the receiver sampling frequency;
[0073] Determine the three-axis coordinates of the three-dimensional point cloud according to the laser positioning parameters:
[0074] x i = d i cosθcosu i , y i = d i cosθsinv i , z i = d i sinθ (2)
[0075] Wherein, \((x i , y i , z i ) represents the three-axis coordinates of the \(i\)-th three-dimensional point cloud, \(\theta\) represents the laser emission angle, and \(u i , v i respectively represent the deflection angles of the scanning galvanometer of the laser sensor in the horizontal and vertical directions;
[0076] Determine the reflection intensity of the three-dimensional point cloud according to the laser positioning parameters:
[0077]
[0078] Wherein, \(I i represents the reflection intensity, \(I rec represents the receiver signal intensity of the laser sensor, and \(I emit represents the emitter signal intensity of the laser sensor;
[0079] Determine the point cloud data according to the three-axis coordinates and the reflection intensity of the three-dimensional point cloud:
[0080]
[0081] Wherein, \(P i represents the point cloud data corresponding to the \(i\)-th three-dimensional point cloud composed of the three-axis coordinates and the reflection intensity, and \(N\) represents the number of three-dimensional point clouds.
[0082] In this embodiment, first, according to the time required for the laser of the laser sensor to reach the surface of the target cigarette and then return to the receiver, the distance between the three-dimensional point cloud constituting the three-dimensional image of the target cigarette's shape and the laser sensor is calculated. Then, based on this distance and some calibration parameters of the laser sensor, the three-axis coordinates of each three-dimensional point cloud constituting the point cloud data are determined. Then, according to the receiver signal intensity and transmitter signal intensity of the laser sensor corresponding to each three-dimensional point cloud, the ratio of the two is used as the reflection intensity of each three-dimensional point cloud, thereby normalizing the reflection intensity of each three-dimensional point cloud. Finally, the point cloud data of the three-dimensional point cloud is obtained according to the three-axis coordinates and reflection intensity of each three-dimensional point cloud.
[0083] In this way, on the basis of the traditional time-of-flight method for positioning three-dimensional point clouds, through the dynamic relationship between the phase difference and the sampling frequency, the problem of distance ambiguity caused by signal aliasing in the traditional time-of-flight method (TOF, Time of flight) is improved, and thus the accuracy of the coordinate calibration of each three-dimensional point cloud in the point cloud data is enhanced.
[0084] In step 230, according to the point cloud data, by means of a preset curve fitting strategy, determining the cross-sectional perimeter of the target cigarette may include:
[0085] According to the point cloud data, determining the contour curve of the target cross-section on the target cigarette;
[0086] According to the contour curve, determining the perimeter of the target cross-section as the cross-sectional perimeter.
[0087] It can be understood that the calculation of the perimeter of the cigarette cross-section first requires projecting the point cloud data obtained by each sampling scan in the point cloud data onto a two-dimensional plane (that is, the plane corresponding to z = 0 in the three-axis coordinates). Then, the outer contour of all three-dimensional point clouds in the point cloud data is extracted, and the contour curve is fitted according to the outer contour. Finally, the length of the contour curve is calculated to obtain the cross-sectional perimeter.
[0088] Specifically, in this embodiment, according to the point cloud data, determining the contour curve of the target cross-section on the target cigarette may include:
[0089] According to the point cloud data, determining the closed contour point set of the target cross-section, where the closed contour point set represents the set of boundary points enclosing the target cross-section;
[0090] Performing chord length parameterization on each three-dimensional point cloud in the closed contour point set to obtain the parameter sequence corresponding to each three-dimensional point cloud;
[0091] According to the parameter sequence, determining the node vector corresponding to the parameter sequence by means of a preset average node strategy;
[0092] Perform curve fitting on each three-dimensional point cloud in the closed contour point set according to the parameter sequence and the knot vector corresponding to each three-dimensional point cloud to obtain the contour curve.
[0093] In this embodiment, determining the closed contour point set of the target cross-section according to the point cloud data may include:
[0094] Based on a preset Graham scan strategy, determine multiple convex hull vertices corresponding to the target cross-section from the point cloud data, and use the set of the multiple convex hull vertices as the convex point set;
[0095]
[0096] In the formula, S k represents the set of three-dimensional point clouds that make up the target cross-section in the point cloud data, and α m represents the convex point combination coefficient, represents the convex hull vertex corresponding to the target cross-section, M represents the number of convex hull vertices, and Q represents the convex point set;
[0097] Use the three-dimensional point clouds that make up the target cross-section in the point cloud data as the target point cloud set, and determine the local curvature of each three-dimensional point cloud in the target point cloud set:
[0098]
[0099] In the formula, k j represents the local curvature of the j-th three-dimensional point cloud Q j in the target point cloud set, and t j represents the tangent vector at Q j ;
[0100] Determine that the set of multiple three-dimensional point clouds in the target point cloud set with local curvature less than a preset concave point threshold is the concave point set;
[0101] Merge the convex point set and the concave point set to obtain the closed contour point set.
[0102] In this embodiment, after determining the closed contour point set (where L represents the number of three-dimensional point clouds included in the contour point set), perform chord length parameterization on each three-dimensional point cloud in the closed contour point set to obtain a parameter sequence u l ∈[0,1] for each three-dimensional point cloud; then determine the knot vector U={u0,…,u M+d} corresponding to each three-dimensional point cloud by the average knot method. Then, according to the parameter sequence and the knot vector corresponding to each three-dimensional point cloud, solve the control point set {w m} by least squares fitting:
[0103]
[0104] In the formula, M represents the number of control points in the control point set, usually taken as half of the number of 3D point clouds in the contour point set, that is, L / 2, N m,d (u l ) is the B-spline basis function of degree d.
[0105] Then, based on the control point set obtained by the above fitting solution, a parametric B-spline curve is fitted to generate the contour curve:
[0106]
[0107] In this way, the convex and concave point joint detection mechanism ensures the topological structure integrity of the complex cross-section contour and improves the accuracy of subsequent cross-section perimeter calculation. It can be understood that in practical applications, the embodiments of the present application perform 3D point cloud extraction and subsequent cross-section perimeter calculation through multiple laser sensors. Therefore, after the 3D point clouds sensed by each laser sensor are spliced end to end to obtain complete point cloud data representing the shape characteristics of the cigarette rod, the subsequent identification and merging of convex and concave point sets are performed to ensure the integrity of the cross-section contour and the accuracy of subsequent perimeter calculation.
[0108] In this embodiment, determining the perimeter of the target cross-section according to the contour curve as the cross-section perimeter may include:
[0109] Dividing the contour curve into multiple curves, and integrating and summing the lengths corresponding to the multiple curves to obtain the cross-section perimeter:
[0110]
[0111] In the formula, L represents the cross-section perimeter, S represents the number of curves included in the segmented contour curve, u s , w s respectively represent the preset integration points and preset weights, C(u) represents the contour curve, and x(u), y(u) represent the coordinate components of any point on the contour curve on the x and y axes.
[0112] In this embodiment, the contour curve is divided into multiple curves, so that the perimeter calculation is transformed into the norm integration of the first derivative of the curve, strictly following the arc length definition, and avoiding the theoretical deviation of approximate algorithms (such as approximating the cross-section perimeter as the perimeter of a polygon).
[0113] In this way, the cross-section perimeter obtained by integrating and summing the lengths corresponding to multiple curves can adapt to cross-sections of irregular shapes and improve the accuracy of cigarette rod cross-section perimeter calculation.
[0114] As an alternative implementation, the method may further include:
[0115] Determine the volume of the target cigarette based on the point cloud data.
[0116] In this embodiment, based on the point cloud data, the polygon vertex integration is performed on the irregular cross-section through Green's formula:
[0117]
[0118] In the formula, S represents the actual area of the cross-section, R represents the number of vertices of the convex hull in the point cloud data, (x i , y i ) represents the two-dimensional coordinates of the i-th vertex of the convex hull, i represents the vertex index, and x R+i = x1, y R+i = y1, thus, the calculation of the closed area of the cross-section is completed.
[0119] After calculating the single-layer cross-sectional area of the cigarette, then based on the movement speed of the cigarette and the sampling frequency of the laser sensor, integrate and sum the multiple cross-sections that make up the entire cigarette to obtain the cigarette volume:
[0120]
[0121] In the formula, V represents the cigarette volume, H represents the total number of cross-section samplings along the length direction of the cigarette, S i , S i+1 represent the areas of the i-th and the (i + 1)-th cross-sections respectively, ΔL represents the spacing between adjacent cross-sections, ΔL = v / f, v represents the movement speed of the cigarette passing through the acquisition area of the laser sensor, and f represents the sampling frequency of the laser sensor.
[0122] As an alternative embodiment, the method may further include:
[0123] When the perimeter of the cross-section is in the first preset abnormal interval, or the volume is in the second preset interval, send a prompt message indicating that the quality of the target cigarette is abnormal.
[0124] It can be understood that the perimeter and volume of the cigarette cross-section reflect the filling fullness of the cut tobacco in the cigarette and the specification standards of the cigarette. The perimeter and volume of the cigarette cross-section are usually calibrated within a qualified numerical range in the production area. Other situations outside this qualified numerical range are abnormal intervals.
[0125] In this embodiment, when any one of the perimeter or volume data of the cigarette is abnormal, that is, in the abnormal interval, a prompt message indicating that the cigarette quality is abnormal is sent through a prompt module (such as a buzzer, an audible and visual alarm, a display, etc.) connected to the electronic device 100. This is convenient for the user to adjust the parameters of the production equipment in time and avoid large-scale production accidents.
[0126] It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the electronic device 100 described above can refer to the corresponding processes of the steps in the foregoing method, and will not be elaborated here.
[0127] The embodiment of the present application also provides a computer program product, including a computer program, and the computer program realizes the cigarette cross-section perimeter recognition method as described in the above embodiment when executed by the processor 101.
[0128] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by hardware or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, and the software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various implementation scenarios of the present application.
[0129] In summary, the embodiment of the present application provides a cigarette cross-section perimeter recognition method, an electronic device and a program product. In this technical solution, first, laser positioning parameters are obtained, then, according to the laser positioning parameters, point cloud data representing the external shape characteristics of the target cigarette is obtained, and finally, according to the point cloud data, the cross-section perimeter of the target cigarette is determined. In this way, the point cloud data is sensed by a laser sensor, and the cross-section perimeter of the target cigarette is calculated based on the point cloud data, improving the calculation speed of the cigarette cross-section perimeter and improving the problems of low efficiency and insufficient accuracy existing in the traditional cigarette perimeter measurement method.
[0130] In the embodiments provided by the present application, it should be understood that the disclosed method can also be implemented in other ways. The method embodiments described above are only illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the methods and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment or a part of code, and the module, the program segment or the part of code includes one or more executable instructions for implementing the specified logical function. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions. In addition, the functional modules in various embodiments of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0131] The above are only examples of the present application and are not intended to limit the protection scope of the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A method for identifying the circumference of a cigarette cross section, characterized in that: The method comprises: Acquiring laser positioning parameters, wherein the laser positioning parameters represent laser receiving data collected after a plurality of laser sensors arranged in a ring emit lasers to a target cigarette; According to the laser positioning parameters, point cloud data representing the shape features of the target cigarette is obtained; According to the point cloud data, the cross-sectional perimeter of the target cigarette is determined by a preset curve fitting strategy.
2. The method according to claim 1, characterized in that The laser positioning parameters include laser light speed, phase difference, laser wavelength, scanning galvanometer deflection angle of the laser sensor, laser emission angle, transmitter signal strength, receiver signal strength and receiver sampling frequency; According to the laser positioning parameters, point cloud data representing the shape features of the target cigarette is obtained, including: According to the laser positioning parameters, the distance from the laser sensor to the three-dimensional point cloud constituting the point cloud data is determined: Where, d i represents the distance between the i-th 3D point cloud and the laser sensor, c represents the speed of light, Δt represents the round-trip time required for the laser to travel from the laser sensor’s transmitter to the target cigarette surface and back to the laser sensor’s receiver, φ represents the phase difference, λ represents the laser wavelength, and f s represents the receiver sampling frequency; According to the laser positioning parameters, the three-axis coordinates of the three-dimensional point cloud are determined: x i =d i cosθcosu i ,y i =d i cosθsinv i ,z i =d i sinθ In the formula, (x i ,y i ,z i ) represents the three-axis coordinates of the i-th three-dimensional point cloud, θ represents the laser emission angle, u i 、v i Respectively represent the deflection angles of the scanning galvanometer of the laser sensor in the horizontal and vertical directions; According to the laser positioning parameters, the reflection intensity of the three-dimensional point cloud is determined: In the formula, I i Represents the reflection intensity, I rec Indicates the receiver signal strength of the laser sensor, I emit Indicates the transmitter signal strength of the laser sensor; Determine the point cloud data according to the three-axis coordinates and the reflection intensity of the three-dimensional point cloud: Where P i It represents the point cloud data corresponding to the i-th three-dimensional point cloud composed of three-axis coordinates and reflection intensity, and N represents the number of three-dimensional point clouds.
3. The method according to claim 1, characterized in that According to the point cloud data, the cross-sectional perimeter of the target cigarette is determined by a preset curve fitting strategy, including: Determining a contour curve of a target cross section on the target cigarette according to the point cloud data; According to the contour curve, the perimeter of the target section is determined as the section perimeter.
4. The method according to claim 3, characterized in that Determining a contour curve of a target cross section on the target cigarette according to the point cloud data includes: Determine a closed contour point set of the target cross section according to the point cloud data, wherein the closed contour point set represents a set of boundary points surrounding the target cross section; Performing chord length parameterization on each three-dimensional point cloud in the closed contour point set to obtain a parameter sequence corresponding to each three-dimensional point cloud; According to the parameter sequence, determining a node vector corresponding to the parameter sequence by a preset average node strategy; According to the parameter sequence and the node vector corresponding to each three-dimensional point cloud, curve fitting is performed on each three-dimensional point cloud in the closed contour point set to obtain the contour curve.
5. The method according to claim 4, characterized in that Determining a closed contour point set of the target cross section according to the point cloud data includes: Based on a preset Graham scanning strategy, a plurality of convex hull vertices corresponding to the target cross section are determined from the point cloud data, and a set of the plurality of convex hull vertices is used as a convex point set; In the formula, S k Represents the set of three-dimensional point clouds that constitute the target section in the point cloud data, α m represents the convex point combination coefficient, represents the convex hull vertex corresponding to the target cross section, M represents the number of convex hull vertices, and Q represents the convex point set; The three-dimensional point cloud constituting the target cross section in the point cloud data is used as a target point cloud set, and the local curvature of each three-dimensional point cloud in the target point cloud set is determined: In the formula, k j Represents the jth 3D point cloud Q in the target point cloud set j The corresponding local curvature, t j Indicates Q j The tangent vector at ; Determine in the target point cloud set that a set of multiple three-dimensional point clouds whose local curvature is less than a preset concave point threshold is a concave point set; The convex point set and the concave point set are merged to obtain the closed contour point set.
6. The method according to claim 3, characterized in that Determining the perimeter of the target cross section according to the contour curve as the cross section perimeter includes: The contour curve is divided into multiple curve segments, and the lengths corresponding to the multiple curve segments are integrated and summed to obtain the cross-sectional perimeter: Where L represents the perimeter of the section, S represents the number of curves contained in the segmented contour curve, and u s 、w s They represent the preset integration point and the preset weight respectively, C(u) represents the contour curve, and x(u) and y(u) represent the coordinate components of any point on the contour curve on the x and y axes.
7. The method according to claim 1, characterized in that The method further comprises: The volume of the target cigarette is determined based on the point cloud data.
8. The method according to claim 7, characterized in that The method further comprises: When the cross-sectional perimeter is within a first preset abnormal range, or the volume is within a second preset range, a prompt message indicating that the quality of the target cigarette is abnormal is issued.
9. An electronic device, characterized in that: The electronic device comprises a processor and a memory coupled to each other, wherein the memory stores a computer program. When the computer program is executed by the processor, the electronic device executes the method according to any one of claims 1 to 8.
10. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
On-line monitoring and adjusting system for circumference of formed cigarette bar
CN115451865A
Cigarette punching quality detection method based on laser scanning
CN117204602A
Handheld cigarette circumference detection device
CN117433428A
Method and system for detecting thickness of reconstituted tobacco
CN118463825A