Method and device for measuring continuous combustion length of cigarette and electronic equipment
Through computer vision technology, the combustion line center line is extracted, and the combustion length of cigarette posts is calculated, which solves the problem of large manual detection errors in the prior art and improves the accuracy and authenticity of the detection.
Patent Information
- Application Number
- CN202411043015.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art has problems such as large manual detection errors and difficult to guarantee experimental accuracy in determining the continuous combustion performance of cigarettes.
By obtaining the image of the entire process of extinguishing the cigarette stick from ignition combustion, using pixel differences to identify the cigarette stick section and combustion line, extracting the combustion line center line, and calculating the combustion length value of the cigarette stick, realizing computer vision to detect the continuous combustion state of the cigarette.
It improves the accuracy and authenticity of cigarette continuous combustion detection, provides reliable technical support, and reduces the error of manual detection.
Smart Images

Figure CN118960577A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cigarette detection, and in particular to a method, a device and an electronic device for measuring the continuous burning length of a cigarette. Background Art
[0002] The continuous burning performance of cigarettes is an important indicator for cigarette evaluation. The continuity of burning and the speed of burning have an important impact on the evaluation indicators of cigarette flameout, tar detection and nicotine detection. In particular, flameout is a key defect item in the industry standard, an important indicator item for factory inspection, and an item that consumers pay close attention to. Therefore, the determination and evaluation of continuous burning plays an important role in the quality control of cigarettes.
[0003] At present, the commonly used method in the industry is to light the cigarette manually, continuously record the burning time and the continuous burning length, and calculate the burning rate. As an industry standard requirement, the flameout project has requirements for the deviation angle and burning length of the cigarette. Relying solely on manual detection will result in large errors and it is difficult to ensure the accuracy of the experiment. Summary of the invention
[0004] In view of the above, the present invention aims to provide a method, device and electronic device for measuring the continuous burning length of a cigarette stalk, so as to solve the above-mentioned technical problems.
[0005] The technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for measuring the continuous burning length of a cigarette, comprising:
[0007] Acquire several images of the whole process of the cigarette from ignition to combustion and extinguishing;
[0008] Identifying cigarette segments from the detected image according to pixel differences, and identifying a burning line based on the identified cigarette segments;
[0009] Using the extracted combustion line, the ash column is identified in the cigarette segment, and the combustion line center line is obtained; wherein the combustion line center line is composed of the combustion line center points in each combustion image of the cigarette;
[0010] Based on the cigarette segments extracted from each measured image and combined with the center line of the burning line, the burning length value of the cigarette is calculated.
[0011] In at least one possible implementation, obtaining the combustion line center line includes:
[0012] Adaptive threshold segmentation algorithm is used to perform binary segmentation and connected domain scanning on the acquired burning line image;
[0013] After filtering out the noise points, the connected domain of the continuous combustion line is obtained;
[0014] The connected domain image of the burning line is scanned row by row, and the center point of the burning line is determined by using the horizontal coordinates of the pixels in each row of the burning line area and the number of pixels belonging to the gray column in each row;
[0015] The combustion line center line is obtained by curve fitting using the combustion line center points in all images.
[0016] In at least one possible implementation, identifying the burning line includes:
[0017] Based on the extraction results of cigarette segments, separate cigarette segment images from each cigarette image and scan them by column;
[0018] The darkest pixel in the column is taken as the burning line pixel;
[0019] Assign the burning line pixels a grayscale of 255, and the remaining pixels a grayscale of 0;
[0020] After fully scanning all the images under test, the carbon line binary image is obtained, and the opening and closing operations are performed on it to extract the continuous combustion lines.
[0021] In at least one possible implementation, the step of obtaining the burning length value of the cigarette includes:
[0022] Obtain the starting point and end point position information of the cigarette segment;
[0023] Extracting the position information of the burning line in the measured image of the burning process of each cigarette from the center line of the burning line;
[0024] Calculate the deviation using the starting point and end point position information of the cigarette segment and the burning line position information;
[0025] The deviation is used as a coefficient and combined with the preset length value to calculate the burning length value of the cigarette.
[0026] In at least one possible implementation, identifying the cigarette segment includes:
[0027] Scan the initial image to be tested by column, and take the darkest pixel in the column as the filter tip pixel;
[0028] The filter area is determined by the filter pixel points;
[0029] The filter area is removed from the cigarette image to obtain the cigarette segment.
[0030] In at least one possible implementation, the measuring method further comprises: based on the extraction result of the burning line, re-scanning the initial measured image by column, and assigning a grayscale of 0 to pixels whose ordinates are smaller than the burning line pixels, and keeping the values of the remaining pixels unchanged;
[0031] After fully scanning all the images to be tested, the burned portion of the cigarette segment in each image is filtered out to obtain the unburned cigarette segment of the cigarette.
[0032] In a second aspect, the present invention provides a device for measuring the continuous burning length of a cigarette, comprising:
[0033] The cigarette burning image acquisition module is used to acquire a number of images of the whole process of the cigarette from ignition to combustion and extinguishing;
[0034] A cigarette segment extraction module, used to identify cigarette segments from the detected image according to pixel differences, and identify a burning line based on the identified cigarette segments;
[0035] A combustion line centerline extraction module is used to identify ash columns in the cigarette segment using the extracted combustion line and obtain the combustion line centerline; wherein the combustion line centerline is composed of the combustion line center points in each combustion image of the cigarette;
[0036] The cigarette burning length measurement module is used to obtain the cigarette burning length value based on the cigarette segments extracted from each measured image and combined with the center line of the burning line.
[0037] In a third aspect, the present invention provides an electronic device, comprising: one or more processors, a memory and one or more computer programs, wherein the memory may adopt a non-volatile storage medium, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the device, the electronic device performs the method as described in the first aspect or any possible implementation manner of the first aspect.
[0038] In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, which, when executed on a computer, enables the computer to execute the method as described in the first aspect or any possible implementation of the first aspect.
[0039] In a fifth aspect, the present invention further provides a computer program product, which, when executed by a computer, is used to execute the method in the first aspect or any possible implementation of the first aspect. In a possible design of the fifth aspect, the relevant programs involved in the product may be stored in whole or in part on a memory packaged with the processor, or may be stored in whole or in part on a storage medium not packaged with the processor.
[0040] Compared with the prior art, the main design concept of the present invention is to obtain several images of the whole process of a cigarette from ignition to combustion and extinction; identify the cigarette segment from the image according to the pixel difference, and identify the burning line based on the identified cigarette segment; use the extracted burning line to identify the ash column in the cigarette segment, and obtain the center line of the burning line; wherein the center line of the burning line is composed of the center point of the burning line in each burning image of the cigarette; based on the cigarette segment extracted from each measured image, and combined with the center line of the burning line, the burning length value of the cigarette is obtained. The present invention detects the continuous burning state of the cigarette through computer vision, accurately judges the burning process of the cigarette and calculates the continuous burning length of the cigarette, providing reliable technical support for the accuracy and authenticity of the continuous burning detection of the cigarette. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described below with reference to the accompanying drawings, in which:
[0042] Figure 1 A flow chart of a method for measuring the continuous burning length of a cigarette provided by an embodiment of the present invention;
[0043] Figure 2 A reference schematic diagram of a continuous combustion length measurement algorithm provided by an embodiment of the present invention;
[0044] Figure 3 A schematic diagram of a device for measuring the continuous burning length of a cigarette provided by an embodiment of the present invention;
[0045] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0047] The present invention provides an embodiment of a method for measuring the continuous burning length of a cigarette. Specifically, Figure 1 shown, including:
[0048] Step S1, obtaining a plurality of images of the whole process of the cigarette from lighting, burning to extinguishing;
[0049] Step S2, identifying cigarette segments from the detected image according to pixel differences, and identifying burning lines based on the identified cigarette segments;
[0050] Step S3, using the extracted combustion line, identifying the ash column in the cigarette segment, and obtaining the combustion line center line; wherein the combustion line center line is composed of the combustion line center points in each combustion image of the cigarette;
[0051] Step S4: based on the cigarette segments extracted from each measured image and in combination with the center line of the burning line, the burning length value of the cigarette is obtained.
[0052] Based on the above embodiment, each link is described in detail as follows:
[0053] 1) Obtaining images taken by a camera on the measuring device from the time when the cigarette is lit to the time when the cigarette burns out;
[0054] 2) Cigarette segment recognition algorithm: Scan the initial image by column, and take the darkest pixel in the column as the filter pixel. Based on this, the remaining pixels in the cigarette image can represent the cigarette segment;
[0055] 3) Burning line recognition algorithm: Based on the extraction results of cigarette segments, separate the cigarette segment images from the images of the cigarettes at the beginning of lighting and after burning, and scan them by column, and use the darkest pixel points in the column as the burning line pixels; assign the burning line pixels to 255 grayscale, and the remaining pixels to 0 grayscale; after scanning the entire image, obtain the carbon line binary image with only 255 grayscale and 0 grayscale, perform opening and closing operations on it, and extract the continuous burning line;
[0056] 4) In some other embodiments, preferably, an algorithm for extracting the remaining cigarette segments is further included: based on the extraction result of the burning line, the initial image is re-scanned by column, and the pixels whose ordinates are smaller than the pixels of the burning line are assigned a grayscale of 0, and the rest remain unchanged; after scanning the entire image, the burned parts are filtered out, and the unburned cigarette segments of the cigarette are extracted;
[0057] 5) Use the adaptive threshold segmentation algorithm to perform binary segmentation and connected domain scanning on the acquired combustion line image, filter out small noise points, and retain the continuous combustion line connected domain; scan the combustion line connected domain image row by row, and obtain the central pixel point of each row according to the following formula:
[0058]
[0059] In the formula, O i is the horizontal coordinate of the center point of the i-th row of the burning line area in the image, H ij is the horizontal coordinate of the jth pixel in the i-th row, n i is the number of pixels in the i-th row belonging to the gray column area;
[0060] 6) After scanning multiple full images, obtain the center point of each line of the combustion line, and use the second-order polynomial fitting to perform curve fitting on these center points to obtain the center line of the combustion line;
[0061] 7) Continuous combustion length measurement algorithm: combined Figure 2 First, obtain the starting point O0 and the end point O0 of the cigarette segment. n Secondly, obtain the coordinates of the center point of the burning line in each image. i , the deviation of the burning line in each cigarette burning process image is calculated according to the following formula:
[0062]
[0063] Finally, the deviation is combined with the input cigarette length setting value L1 to calculate the cigarette burning length value L2:
[0064]
[0065] As an implementation example, the adaptive threshold segmentation algorithm mentioned in step 5) can refer to the following specific steps:
[0066] 5.1) Select a window size blockSize;
[0067] 5.2) Select the adaptive threshold type as average method or Gaussian method;
[0068] 5.3) For each pixel point, take it as the center and calculate the local threshold T(x,y) in the neighborhood block;
[0069] 5.4) Compare each pixel with its local threshold and apply binarization to obtain the output image B(x,y):
[0070]
[0071] Among them, B(x,y) is the pixel value of the output binary image at position (x,y), I(x,y) is the pixel value of the original image at position (x,y), T(x,y) is the local threshold, and C is a constant used to fine-tune the threshold.
[0072] Preferably, the average value method is as follows:
[0073]
[0074] Among them, T(x,y) is the local threshold of pixel (x,y), I(i,j) is the grayscale value of pixel (i,j) in the neighborhood block, and N is the total number of pixels in the neighborhood block.
[0075] Preferably, the Gaussian method is as follows:
[0076]
[0077] Among them, G(ix,jy)) is the Gaussian weight centered at (x,y), and the weight is calculated by the Gaussian function:
[0078]
[0079] σ is the standard deviation of the Gaussian function and determines the extent of the weight distribution.
[0080] As a further improvement, the method for performing curve fitting on the center point using a second-order polynomial fitting in step 6) can refer to the following steps:
[0081] 6.1) Get the coordinates of the center point of the combustion line (x i ,y i );
[0082] 6.2) Constructing a polynomial equation: The fitted second-order polynomial equation is y=a0+a1x+a2x 2 ;
[0083] 6.3) Solve the coefficients by the least squares method;
[0084] Among them, the objective function of the least squares method is as follows:
[0085]
[0086] Where n is the number of data points;
[0087] 6.4) Convert the least squares problem into a system of linear equations;
[0088] Preferably, a linear system of equations can be obtained by taking partial derivatives of the objective function S with respect to a0, a1, and a2 and setting them to zero:
[0089]
[0090] Expanding the above equations, we get:
[0091]
[0092] 6.5) Use matrix form to represent the linear equations and solve for the coefficients a0, a1, and a2.
[0093] Furthermore, the above equations are written in matrix form:
[0094]
[0095] By solving the above linear equations, the coefficients a0, a1, and a2 are obtained.
[0096] In summary, the main design concept of the present invention is to obtain several images of the whole process of a cigarette from ignition to combustion and extinction; identify cigarette segments from the image according to pixel differences, and identify the burning line based on the identified cigarette segments; use the extracted burning lines to identify ash columns in the cigarette segments, and obtain the center line of the burning line; wherein the center line of the burning line is composed of the center points of the burning lines in each burning image of the cigarette; based on the cigarette segments extracted from each measured image, and combined with the center line of the burning line, the burning length value of the cigarette is obtained. The present invention detects the continuous burning state of cigarettes through computer vision, accurately judges the burning process of cigarettes and calculates the continuous burning length of cigarettes, providing reliable technical support for the accuracy and authenticity of continuous burning detection of cigarettes.
[0097] Corresponding to the above-mentioned embodiments and preferred solutions, the present invention also provides an embodiment of a cigarette stub continuous burning length measuring device 300, as shown in FIG. Figure 3 As shown, it may specifically include the following components:
[0098] The cigarette burning image acquisition module 301 is used to acquire a plurality of images of the whole process of the cigarette from ignition to combustion and extinguishing;
[0099] A cigarette segment extraction module 302, configured to identify cigarette segments from the detected image according to pixel differences, and identify a burning line based on the identified cigarette segments;
[0100] The combustion line centerline extraction module 303 is used to identify the ash column in the cigarette segment using the extracted combustion line and obtain the combustion line centerline; wherein the combustion line centerline is composed of the combustion line center points in each combustion image of the cigarette;
[0101] The cigarette burning length measurement module 304 is used to obtain the cigarette burning length value based on the cigarette segments extracted from each measured image and in combination with the center line of the burning line.
[0102] It should be understood that the above Figure 3 The division of the various components in the cigarette support continuous burning length measuring device shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or they can be physically separated. And these components can all be implemented in the form of software calling through processing elements; some components can also be implemented in the form of software calling through processing elements, and some components can be implemented in the form of hardware. For example, one of the above modules can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other components is similar. In addition, all or part of these components can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or the above components can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0103] For example, the above components may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these components may be integrated together to be implemented in the form of a system-on-a-chip (SOC).
[0104] Based on the above embodiments and their preferred solutions, those skilled in the art can understand that, in actual operation, the technical concept involved in the present invention can be applied to a variety of implementations. The present invention uses the following carrier as a schematic illustration:
[0105] (1) An electronic device. The device may specifically include: one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, and when the instructions are executed by the device, the device performs the steps / functions of the aforementioned embodiment or an equivalent implementation.
[0106] The electronic device may specifically be electronic device related to computers, such as but not limited to various computing terminals and electronic products.
[0107] Specifically, the processor, the communication interface, and the memory can all communicate with each other through the communication bus. Among them, the processor may be a central processing unit CPU, DSP, microcontroller or digital signal processor, and may also include GPU, embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and image signal processor (Image Signal Processor; hereinafter referred to as: ISP), the processor may also include a specific integrated circuit ASIC, or one or more integrated circuits configured to implement the embodiment of the present invention, etc. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium such as a memory; and the aforementioned memory / storage medium may include: non-volatile memory (Non-Volatile Memory), such as a non-removable disk, a U disk, a mobile hard disk, an optical disk, etc., as well as read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (RandomAccess Memory; hereinafter referred to as: RAM), etc.
[0108] Although the present invention does not limit the specific form of the electronic device, for the purpose of illustrative introduction, Figure 4 As shown, the present invention provides a schematic diagram of the structure of an embodiment of a device for measuring the length of continuous burning of a cigarette. Specifically, the device 900 for measuring the length of continuous burning of a cigarette includes a processor 910 and a memory 930. The processor 910 and the memory 930 can communicate with each other through an internal connection path to transmit control and / or data signals. The memory 930 is used to store a computer program, and the processor 910 is used to call and run the computer program from the memory 930. The processor 910 and the memory 930 can be combined into a processing device, or more commonly, they are independent components. The processor 910 is used to execute the program code stored in the memory 930 to implement the above functions. In specific implementation, the memory 930 can also be integrated in the processor 910, or independent of the processor 910.
[0109] In addition, in order to make the function of the cigarette support continuous burning length measuring device 900 more complete, the cigarette support continuous burning length measuring device 900 may also include one or more of an input unit 960, a display unit 970, an audio circuit 980, a camera 990 and a sensor 901, etc. The audio circuit may also include a speaker 982, a microphone 984, etc. Among them, the display unit 970 may include a display screen.
[0110] Furthermore, the above-mentioned cigarette continued burning length measuring device 900 may also include a power supply 950 for providing electric energy to various devices or circuits in the cigarette continued burning length measuring device 900 .
[0111] It should be understood that Figure 4 The cigarette support continuous burning length measuring device 900 shown can implement each process of the method provided in the above-mentioned embodiment. The operation and / or function of each component in the cigarette support continuous burning length measuring device 900 can be respectively used to implement the corresponding process in the above-mentioned method embodiment. For details, please refer to the description of the embodiments of the method, device, etc. in the above text. To avoid repetition, the detailed description is appropriately omitted here.
[0112] It should be understood that Figure 4 The processor 910 in the cigarette stick continuous burning length measuring device 900 shown can be a system on chip SOC, and the processor 910 can include a central processing unit (Central Processing Unit; hereinafter referred to as: CPU), and can further include other types of processors, such as: a graphics processing unit (Graphics Processing Unit; hereinafter referred to as: GPU), etc., which will be described in detail below.
[0113] In summary, the various processors or processing units within the processor 910 can work together to implement the previous method flow, and the corresponding software programs of the various processors or processing units can be stored in the memory 930.
[0114] (2) A computer data storage medium on which a computer program or the above-mentioned device is stored, when the computer program or the above-mentioned device is executed, the computer executes the steps / functions of the above-mentioned embodiment or equivalent implementation mode.
[0115] In several embodiments provided by the present invention, any function, if implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a computer data storage medium. Based on this understanding, some technical solutions of the present invention are essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of the software product described below.
[0116] It should be particularly pointed out that the storage medium may refer to a server or a similar computer device, specifically, a storage device in a server or a similar computer device storing the aforementioned computer program or the aforementioned apparatus.
[0117] (3) A computer program product (the product may include the above-mentioned apparatus), which, when running on a terminal device, enables the terminal device to execute the cigarette stump continuous burning length measuring method of the above-mentioned embodiment or an equivalent implementation manner.
[0118] It can be seen from the above description of the implementation method that those skilled in the art can clearly understand that all or part of the steps in the above implementation method can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the above computer program product may include but is not limited to APP.
[0119] If the expressions expressing orientation are mentioned in the embodiments of the present invention, they are relative concepts based on the embodiments. In addition, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, wherein a, b, c can be single or multiple.
[0120] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings, but the above is only a preferred embodiment of the present invention. It should be noted that the technical features involved in the above embodiments and their preferred methods can be reasonably combined and matched into a variety of equivalent schemes by those skilled in the art without departing from or changing the design ideas and technical effects of the present invention; therefore, the present invention is not limited to the scope of implementation shown in the drawings, and all changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which still do not exceed the spirit covered by the specification and drawings, should be within the protection scope of the present invention.
Claims
1. A method for measuring the continuous burning length of a cigarette, characterized in that: include: Acquire several images of the whole process of the cigarette from ignition to combustion and extinguishing; Identifying cigarette segments from the detected image according to pixel differences, and identifying a burning line based on the identified cigarette segments; Using the extracted combustion line, the ash column is identified in the cigarette segment, and the combustion line center line is obtained; wherein the combustion line center line is composed of the combustion line center points in each combustion image of the cigarette; Based on the cigarette segments extracted from each measured image and combined with the center line of the burning line, the burning length value of the cigarette is calculated.
2. The method for measuring the continuous burning length of a cigarette according to claim 1, characterized in that: The obtaining of the combustion line center line comprises: Adaptive threshold segmentation algorithm is used to perform binary segmentation and connected domain scanning on the acquired burning line image; After filtering out the noise points, the connected domain of the continuous combustion line is obtained; The connected domain image of the burning line is scanned row by row, and the center point of the burning line is determined by using the horizontal coordinates of the pixels in each row of the burning line area and the number of pixels belonging to the gray column in each row; The combustion line center line is obtained by curve fitting using the combustion line center points in all images.
3. The method for measuring the continuous burning length of a cigarette according to claim 1, characterized in that: The identifying of the burning line comprises: Based on the extraction results of cigarette segments, separate cigarette segment images from each cigarette image and scan them by column; The darkest pixel in the column is taken as the burning line pixel; Assign the burning line pixels a grayscale of 255, and the remaining pixels a grayscale of 0; After fully scanning all the images under test, the carbon line binary image is obtained, and the opening and closing operations are performed on it to extract the continuous combustion lines.
4. The method for measuring the continuous burning length of a cigarette according to claim 1, characterized in that: The method of obtaining the burning length value of the cigarette comprises: Obtain the starting point and end point position information of the cigarette segment; Extracting the position information of the burning line in the measured image of the burning process of each cigarette from the center line of the burning line; Calculate the deviation using the starting point and end point position information of the cigarette segment and the burning line position information; The deviation is used as a coefficient and combined with the preset length value to calculate the burning length value of the cigarette.
5. The method for measuring the continuous burning length of a cigarette according to claim 1, characterized in that: The identifying of cigarette segments comprises: Scan the initial image to be tested by column, and take the darkest pixel in the column as the filter tip pixel; The filter area is determined by the filter pixel points; The filter area is removed from the cigarette image to obtain the cigarette segment.
6. The method for measuring the continuous burning length of a cigarette according to any one of claims 1 to 5, characterized in that: The measuring method further comprises: based on the extraction result of the burning line, re-scanning the initial measured image by column, and assigning a grayscale of 0 to pixels whose ordinates are smaller than the burning line pixels, while keeping the values of the other pixels unchanged; After fully scanning all the images to be tested, the burned portion of the cigarette segment in each image is filtered out to obtain the unburned cigarette segment of the cigarette.
7. A device for measuring the continuous burning length of a cigarette, characterized in that: include: The cigarette burning image acquisition module is used to acquire a number of images of the whole process of the cigarette from ignition to combustion and extinguishing; A cigarette segment extraction module, used to identify cigarette segments from the detected image according to pixel differences, and identify a burning line based on the identified cigarette segments; A combustion line centerline extraction module is used to identify ash columns in the cigarette segment using the extracted combustion line and obtain the combustion line centerline; wherein the combustion line centerline is composed of the combustion line center points in each combustion image of the cigarette; The cigarette burning length measurement module is used to obtain the cigarette burning length value based on the cigarette segments extracted from each measured image and combined with the center line of the burning line.
8. An electronic device, characterized in that: include: One or more processors, a memory and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the method for measuring the continuous burning length of a cigarette as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for measuring the continuous burning length of a cigarette as claimed in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for measuring the continuous burning length of a cigarette as claimed in any one of claims 1 to 6 is implemented.
