Cigarette ash packing quality detection method and equipment based on machine vision
By using machine vision technology to perform grayscale image analysis on cigarette ash packaging, the objectivity problem of cigarette ash packaging evaluation in existing technologies has been solved, and automatic detection of multiple indicators of ash packaging performance has been achieved, improving the accuracy and comprehensiveness of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies lack objectivity in evaluating the performance of cigarette ash coating, making it difficult to comprehensively test key indicators such as burning rate, cracks, flash, and ash holding time, resulting in unstable evaluation results.
By employing machine vision technology, color images are acquired and converted into grayscale images for data analysis. This allows for the detection of performance indicators such as the burning rate, carbon lines, tilt angle, flash, cracks, and ash holding time of the ash coating, achieving automated, real-time dynamic detection.
It enables automatic detection of multiple indicators of cigarette ash performance, improving the objectivity and comprehensiveness of the evaluation and allowing for more accurate judgment of the quality of cigarette ash.
Smart Images

Figure CN121837101A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of cigarette ash detection, and particularly relates to a cigarette ash quality detection method and device based on machine vision. BACKGROUND
[0002] The demand for cigarette ash performance detection is gradually proposed by the industry after 2010. With the continuous improvement of the industry's requirements for cigarette quality, the industry first proposed the demand for improving the performance of cigarette ash, such as adding ash condensing agents in cigarette paper. Technical measures such as gradually being applied to high-end cigarettes in the early 21st century, and the subsequent demand is the evaluation means of cigarette ash performance.
[0003] The performance of cigarette ash is an important indicator for measuring cigarette quality and reflecting cigarette grade. If the performance of cigarette ash is good, the ash column after the cigarette is burned is compact and beautiful, and if the performance of cigarette ash is poor, the cigarette is easy to drop ash during smoking, which not only pollutes the environment but also affects the consumer experience. It is generally believed that the higher the grade of the cigarette, the whiter the ash color, the fewer the cracks and the ash.
[0004] The pursuit of cigarette quality by the industry promotes the research on the performance of cigarette ash, and various ash condensing agents are added to cigarette paper. However, the evaluation of the performance improvement of cigarette ash after adding ash condensing agents depends on the visual scoring of experts. This method is obviously subjective and the evaluation conclusion is unstable, which is not conducive to further improving product quality and developing other ash condensing methods. Therefore, the industry proposes the demand for more objective evaluation of the performance of cigarette ash, that is, using a simple camera and a general software evaluation method. The specific operation mode is to use a consumer-grade digital camera to take a picture of the cigarette ash after smoldering, and then use a general image processing software (such as PS) to evaluate the "whiteness" characteristics of the ash. This method has improved the objectivity of evaluation compared with pure visual judgment, but due to the limitation of general software, only part of the information of the ash image can be extracted, mainly the "whiteness", and the characteristics such as "cracks", "cracks", "burning time", "ash holding time" and the like cannot be obtained, so the industry needs a more perfect solution.
[0005] In view of this, the present application is proposed. SUMMARY
[0006] The main purpose of the present application is to solve the above technical problems, and provide a cigarette ash quality detection method and device based on machine vision. The detection device automatically detects the performance indicators of cigarette ash in real time, and can also automatically judge the good and bad of cigarette ash.
[0007] To achieve the above purpose, the technical scheme of the present application is:
[0008] The first technical solution of the application is a cigarette ash quality detection method based on machine vision, comprising: obtaining a color image of a target area through machine vision, processing the color image into a gray-scale image, when the gray-scale image meets a set condition, performing data analysis on the gray-scale image to obtain a plurality of ash performance indicators, and outputting the ash performance indicators after detection is completed.
[0009] The ash performance indicators include at least one of burning rate, carbon line, inclination angle, flash, crack, and ash holding time.
[0010] Further, the set condition is that the cigarette is completed burning, and the ash is not poured during the burning process.
[0011] Further, an image of the target area is obtained every first preset time interval, and it is determined whether the set condition is met, if yes, the detection is continued, and if no, the detection is ended.
[0012] Further, the average gray-scale of the root area of the combustible part of the cigarette in the gray-scale image is obtained, and if the average gray-scale is less than a first set value, it is determined that the cigarette is completed burning.
[0013] Preferably, when the cigarette is completed burning, the burning time is recorded.
[0014] Preferably, the burning rate is calculated according to the length of the combustible part of the cigarette and the burning time.
[0015] Further, the ash area in the gray-scale image is obtained, and if the ash area is greater than a first set value, it is determined that the ash is not poured.
[0016] Preferably, when the ash is poured, the ash holding time is recorded.
[0017] Further, the data analysis is performed on the gray-scale image to obtain an outer rectangle and an inner rectangle of the entire ash, and the inclination angle of the ash is obtained by subtracting the angles of the two rectangles.
[0018] Further, the data analysis is performed on the gray-scale image to obtain the region of the background by performing a NOT operation on the extracted ash, and the ash region without flash is obtained by performing a NOT operation on the ash region with flash after filling the ash region with flash.
[0019] Further, the data analysis is performed on the gray-scale image to obtain the approximate region of the crack by gray-scale screening, the crack is covered completely by using an inflation operator, and the number of cracks is counted.
[0020] Preferably, the entire crack region is obtained by combining all the crack regions, and the crack area and the area proportion of the crack are calculated.
[0021] Furthermore, data analysis is performed on the grayscale image. The carbon line region image is obtained by cropping the grayscale image. After grayscale filtering, the carbon line outline is selected, and the neatness of the carbon line is obtained by calculating the height difference of the carbon line region.
[0022] Preferably, the outline of the carbon line region is converted into coordinate form, the carbon line is extracted into a skeleton, the coordinates of all points on the skeleton are obtained, the set of minimum distances from the coordinates to the outline is obtained, the average value of the distance is obtained, and the average value is multiplied by 2 to obtain the width of the carbon line.
[0023] The second technical solution of the present invention is a machine vision-based cigarette ash quality detection device, which adopts the machine vision-based cigarette ash quality detection method described above.
[0024] Compared with the prior art, the present invention has the following advantages:
[0025] The present invention provides a machine vision-based method and equipment for detecting the quality of cigarette ash packaging. Through a pre-set program, a cigarette is lit to begin real-time dynamic detection of the ash packaging. The combination of equipment and program can detect performance indicators such as ash burning time, ash size, cracks, flash, ash holding time, and carbon lines, and output the results to the user. At the same time, it can also judge the quality of cigarette ash packaging based on the above multiple indicators. This ash packaging detection equipment can detect a large number of performance data indicators, integrating multiple indicators in the industry, and can comprehensively evaluate the performance of ash packaging. Attached Figure Description
[0026] The accompanying drawings, as part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention, but do not constitute an undue limitation of the invention. Obviously, the drawings described below are merely some embodiments, and those skilled in the art can obtain other drawings based on these drawings without creative effort. In the drawings:
[0027] Figure 1 This is a structural block diagram of the ash coating quality detection system of the present invention;
[0028] Figure 2 This is a functional block diagram of the ash-coating quality detection system of the present invention;
[0029] Figure 3 This is a flowchart of the horizontal direction detection method of the present invention;
[0030] Figure 4 This is a flowchart of the vertical direction detection method of the present invention;
[0031] Figure 5 This is a schematic diagram of the structure of the ash-coating quality testing equipment of the present invention.
[0032] Explanation of reference numerals in the attached figures:
[0033] 10. Detection cylinder; 101. Operating port; 102. Placement part; 103. Camera; 104. Lighting lamp;
[0034] 20. Base; 201. Touchscreen.
[0035] It should be noted that these accompanying drawings and textual descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art by referring to specific embodiments. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0037] [Example 1]
[0038] like Figure 1 As shown, this embodiment provides a cigarette pack ash quality detection system, including:
[0039] The execution module contains the cigarettes that burn, forming an ash column;
[0040] A vision module, located within the execution module, includes at least one camera for capturing raw images of the cigarette combustion process;
[0041] The preprocessing module preprocesses the original image and outputs a discrimination image;
[0042] The data processing module analyzes the original image or the discrimination image to obtain at least one evaluation feature, analyzes the evaluation feature and outputs the corresponding evaluation index and / or evaluation result.
[0043] Furthermore, the vision module includes three cameras arranged in a circle at 120° intervals on the same plane.
[0044] The system simultaneously detects grayscale using three cameras spaced 120° apart, evaluating the data from multiple angles. Ideally, LED strips are used around the cameras for uniform lighting, resulting in more objective data. The average grayscale is evaluated using a 360° omnidirectional method, a more scientific approach than the current manual single-sided photography.
[0045] Furthermore, the original image is a color image, and the discrimination image is a grayscale image. A color camera can obtain more image information. Directly judging the "whiteness" of a color image is too difficult due to color difference, while the "whiteness" of gray areas in a color image is directly related to the average grayscale of the gray area.
[0046] Furthermore, the evaluation features include at least one of horizontal evaluation features and vertical evaluation features. The horizontal evaluation features include at least one of the number of drops and the ash holding time. The vertical evaluation features include at least one of the following: burning rate, ash holding time, flash, tilt, ash size, cracks, and carbon lines.
[0047] The grayscale deviation is related to the color consistency of the coating, which in turn is related to the number and extent of cracks. If the grayscale deviation of the coating is small, it can be assumed that although the whiteness of the coating is not very white, the number of cracks is small, because the obvious characteristic of cracks is that they are different in color from the surrounding coating. Conversely, if the grayscale deviation of the coating is small, it means that the number of cracks should be small. Areas with cracks will appear differently in the image captured by the camera: black edges will appear, which will be represented by lower grayscale values in the grayscale image. Cracks can also be filtered out by selecting areas with lower grayscale values.
[0048] The falling of horizontal ash is manifested by a sudden decrease in the ash-covered area. Based on this principle, the ash-covered area is monitored in real time, and an area threshold is set. Each time the area suddenly decreases to the threshold, the number of times the ash falls and the holding time are recorded.
[0049] Furthermore, the cigarette pack ash quality detection system includes a motion mechanism, which controls the execution module to switch between at least a horizontal or vertical position, and the vision module moves together with the execution module;
[0050] When the execution module is in a horizontal position, the data processing module obtains the horizontal evaluation characteristics and outputs the horizontal evaluation index.
[0051] When the execution module is in the vertical position, the data processing module obtains the vertical evaluation features and outputs the vertical evaluation index.
[0052] This system can realize changes in horizontal and vertical positions. Users can detect both horizontal and vertical evaluation features through the same system as needed, eliminating the need for two sets of equipment and saving costs.
[0053] [Example 2]
[0054] This embodiment provides a method for detecting the quality of cigarette ash packaging. In this method, the detection equipment automatically acquires the evaluation characteristics of cigarette ash packaging through machine vision, and then evaluates the quality of cigarette ash packaging.
[0055] Furthermore, the collected raw images are analyzed to obtain at least one of the following: the number of times the ash falls and the ash holding time, and the corresponding evaluation index is output. When the ash falls, the length or area of the cigarette in the raw image will suddenly decrease, which can be used to determine whether the ash has fallen. At the same time, the number of falls can be counted, and the time of the ash falling can be timed. Generally, the time of the first ash fall is taken as the ash holding time.
[0056] Furthermore, the discrimination image is analyzed to obtain at least one of the following: flash, tilt, grayscale, crack, and carbon lines, and the corresponding evaluation index is output.
[0057] Furthermore, the detection equipment automatically analyzes the evaluation index corresponding to at least one evaluation feature of the obtained cigarette pack ash, outputs the evaluation index, and / or the evaluation result obtained based on the evaluation index.
[0058] The testing equipment can directly output the evaluation indicators required by the user. Users can also input the evaluation criteria corresponding to the evaluation indicators into the equipment, and the equipment will automatically judge and directly output the evaluation results. It is very convenient and efficient to use, and the judgment criteria are more objective and reliable than manual judgment.
[0059] [Example 3]
[0060] This embodiment provides a machine vision-based method for detecting the quality of cigarette ash packaging, including: acquiring a color image of a target area through machine vision, processing the color image into a grayscale image, performing data analysis on the grayscale image when the grayscale image meets set conditions to obtain multiple ash packaging performance indicators, and outputting the ash packaging performance indicators after the detection is completed.
[0061] The performance indicators of the ash coating include at least one of the following: combustion rate, carbon line, tilt angle, flash, cracks, and ash holding time.
[0062] In the raw image captured by the camera, it is necessary to remove the parts that interfere with the grayscale processing by cropping, resulting in an image containing only grayscale. For the convenience of subsequent grayscale image processing, the cropped image needs to be thresholded for grayscale to filter out noise such as background. Then, HALCON's fill_up operator is used to fill some incompletely closed areas in the grayscale, and the closing_rectangle1 operator is used to further close the grayscale region with rectangles, so that the entire grayscale can be selected, ensuring the integrity of the grayscale part. Then, the select_shape operator is used to select the grayscale again through the "area" feature, and finally, the reduce_domain operator is used to extract the entire grayscale for subsequent processing.
[0063] The `area_center` operator is used to obtain the overall area of the gray-covered area. Then, based on different gray-scale thresholds, the `area_center` operator is used to calculate the area of each individual gray-scale area. Dividing these areas by the overall area yields the proportion of each gray-scale area. The `intensity` operator is used to calculate the average gray-scale and gray-scale deviation of the entire gray-covered area. This allows for the determination of the "whiteness" of the gray-covered area.
[0064] Furthermore, the set conditions are that the cigarette is fully burned and the ash is not discarded during the burning process.
[0065] Furthermore, an image of the target area is acquired at a first preset time interval, and it is determined whether the set conditions are met. If so, the detection continues; otherwise, the detection ends.
[0066] Furthermore, the average gray level of the root region of the combustible part of the cigarette in the grayscale image is obtained. If the average gray level is less than a first set value, it is determined that the cigarette has completed combustion.
[0067] Preferably, the burning time is recorded when the cigarette has finished burning;
[0068] Preferably, the combustion rate is calculated based on the length of the combustible part of the cigarette and the burning time.
[0069] By capturing the root region of the combustible area of the cigarette in real time from the original image, the average gray level of the root region will decrease when the cigarette burns to the root. This principle is used as a marker for whether combustion is complete. When the average gray level of this region decreases below a first set value, the cigarette is determined to be burnt out. The combustion time can be obtained by the difference between the program start time and the combustion completion time. Then, the combustion rate of the cigarette can be calculated based on the length of the cigarette.
[0070] Furthermore, the gray area in the grayscale image is obtained. If the gray area is greater than a first set value, it is determined that the gray area has not been poured out.
[0071] Preferably, the holding time of the ash is recorded when the ash is poured out.
[0072] Furthermore, data analysis is performed on the grayscale image to obtain the outer and inner rectangles of the entire gray area. The angle difference between the two rectangles is used to obtain the tilt angle of the gray area.
[0073] The outer and inner rectangles of the entire enclosure are obtained using the smallest_rectangle2 and inner_rectangle1 operators. The inner rectangle is always vertical, while the outer rectangle is the rectangle that surrounds the enclosure and changes with the tilt of the enclosure. The tilt angle of the enclosure can be obtained by subtracting the angles of the two rectangles.
[0074] Furthermore, data analysis is performed on the grayscale image. The extracted gray area is inverted to obtain the background area. Areas with jagged edges in the background area are filled and then inverted to obtain gray areas without jagged edges. The difference between the gray areas and the background areas is calculated to obtain the jagged edge areas.
[0075] The burrs mainly exist on the outer edge of the gray area. First, the extracted gray area is inverted using the complement operator to obtain the background area. At this time, the background area is not smooth and contains the outline of the burrs. Then, the closing_rectangle1 fill operator is used to fill in the areas of the background area with burrs, making the background area smoother. Then, this area is inverted again to obtain the gray area without burrs. Finally, the difference operator is used to find the difference between the previously extracted gray area and this area to obtain the area containing only burrs.
[0076] Furthermore, data analysis is performed on the grayscale image. The approximate area of the crack is selected by grayscale filtering, and the expansion operator is used to expand it to cover the complete crack. The number of cracks is then counted.
[0077] Preferably, all crack regions are combined to obtain the overall crack region, and the area of the crack region and the area ratio of the crack are calculated.
[0078] Cracks are typically displayed as darker areas in an image. By filtering by grayscale and then using a dilation operator to appropriately expand the area to cover the entire crack, the number of cracks can be counted using the connect_and_holes operator. The union1 operator can then be used to combine all crack areas to obtain the overall crack area. The area is then calculated and divided by the total soot area to obtain the crack's area percentage.
[0079] Furthermore, data analysis is performed on the grayscale image. The carbon line region image is obtained by cropping the grayscale image. After grayscale filtering, the carbon line outline is selected, and the neatness of the carbon line is obtained by calculating the height difference of the carbon line region.
[0080] Preferably, the outline of the carbon line region is converted into coordinate form, the carbon line is extracted into a skeleton, the coordinates of all points on the skeleton are obtained, the set of minimum distances from the coordinates to the outline is obtained, the average value of the distance is obtained, and the average value is multiplied by 2 to obtain the width of the carbon line.
[0081] The carbon line image is obtained by cropping the image after preprocessing the soot. This is to eliminate background interference during carbon line extraction, making the extraction more accurate. Because carbon lines appear darker in grayscale images, this principle is used to perform grayscale thresholding. Then, the `select_shape` operator is used to select the carbon lines using the "area" feature, removing noise and other areas. The "height" feature of the `Region_features` operator is used to obtain the height difference of the carbon line regions, which represents the uniformity of the carbon lines. The "border" feature of the `gen_contour_region_xld` operator is used to obtain the outline of the carbon line regions, converting it into coordinate form. The `skeleton` operator is used to extract the skeleton of the carbon lines, obtaining the coordinates of all points on the skeleton. The set of minimum distances from these coordinates to the outline is calculated, and the average distance is multiplied by 2 to obtain the carbon line width.
[0082] It should be noted that the above-described data analysis of grayscale images to obtain multiple grayscale performance indicators is not performed in a specific order. Multiple performance indicators can be analyzed simultaneously or in any order. This is a choice that can be made by those skilled in the art, and no specific limitation is made here.
[0083] The following is an example of the process for inspecting the quality of ash packaging:
[0084] Leveling test: Refer to Figure 3 When a cigarette is lit, the program first initializes the area, time, and number of drops. Then, it enters a while loop, judging whether the area is greater than a threshold (i.e., the ash has not completely fallen off) or the time is less than a threshold (i.e., a given time limit). The camera is opened to capture an image, which is preprocessed to obtain the area of the ash (including the unburned cigarette and the ash after burning) and recorded. The area at this moment is subtracted from the area at the previous moment to obtain the difference. Then, an if statement is executed. If the difference is less than the threshold, the program returns to the while loop to capture the ash and obtain the area. If the difference is greater than the threshold, the number of drops is incremented by one. At the same time, when the number of drops is 1, the time is recorded, and the time held by the ash is obtained by subtracting the program's start time. When the area of the ash is less than the threshold or the time is greater than the threshold, the while loop is exited, the program ends, and the number of drops and the time held by the ash are displayed.
[0085] Numerical detection: Reference Figure 4The program first initializes the area, time, and average grayscale of the ash base when a cigarette is lit. Then, it enters a while loop, determining whether the area is greater than a threshold (i.e., whether the ash has tipped over) and whether the average grayscale of the ash base is greater than a threshold (i.e., the cigarette has not yet finished burning). It then opens the camera, captures an image, and starts timing. The ash image is preprocessed to calculate and record the area (including the unburned cigarette and the burned ash). An if statement checks if the ash area is greater than a threshold (i.e., whether the ash has tipped over). If it is, an if statement checks if the average grayscale of the ash base is greater than a threshold. If the average grayscale of the ash base is greater than a threshold (i.e., the cigarette has not yet finished burning), the program returns to the while loop, re-captures the ash base image, calculates the average grayscale, and then checks the updated average grayscale. If it is greater than a threshold, the program returns to the while loop. The loop continues to extract ash from the cigarette pack. If the ash area is less than the threshold, the cigarette is considered to have finished burning, and the time is recorded (the burning time is the time minus the program start time). The ash pack is then subjected to performance testing, including ash carbon line extraction and calculation, obtaining the tilt angle using the inscribed rectangle of the ash pack, the ash grayscale ratio of each interval, the average ash grayscale, the ash grayscale deviation, the number of ash flashes, the number of ash cracks, and the crack area ratio. After the ash performance testing is complete, the loop returns to continue extracting ash from the pack. The overall area of the ash pack is used to determine if the pack has tipped over. Simultaneously, an if statement is used to determine if the cigarette's burning time is less than the threshold (i.e., a given time limit). If the ash area is less than the threshold and the burning time is less than the given time limit, the ash pack is considered to have tipped over, the time is recorded (the holding time is the time minus the program start time), the loop exits, all parameters obtained from the ash performance testing are displayed, and the program terminates. If the burning time exceeds the given time limit and the ash area is still greater than the threshold, it is determined that the ash has not been tilted, and the ash holding time is the given time limit. The while loop is then exited, all parameters obtained from the ash performance detection are displayed, and the program ends. If the ash area is less than the threshold but the average ash level at the base of the ash is still greater than the threshold, it is determined that the cigarette has not burned completely and has been tilted, so further detection cannot continue. In this case, only the ash holding time is displayed, the while loop is exited, and the program ends.
[0086] For example, the testing equipment can output 10 sets of judgment data at once, including the ash tilt angle, the number of ash flashes, the number of ash cracks, the crack area ratio, the average ash color, the ash color deviation, the ash carbon line width, the ash carbon line height difference, the ash burning rate, and the ash holding time. Cigarettes that meet more than 8 of the judgment criteria are judged as good cigarettes, cigarettes that meet 5 to 8 of the judgment criteria are judged as medium cigarettes, and cigarettes that meet 5 or fewer of the judgment criteria are judged as poor cigarettes.
[0087] For example, the table below shows the ash-covering performance test results of different cigarettes after vertical burning.
[0088]
[0089]
[0090] The table below shows the test results of ash retention time and number of ash drops after different cigarette levels have been burned.
[0091]
[0092] [Example 4]
[0093] like Figure 5 As shown in the figure, this embodiment provides a cigarette pack ash quality testing device, including a testing cylinder 10 and a base 20. The base 20 is equipped with a touch screen 201 and a control unit (not shown in the figure) is provided inside the base.
[0094] The top of the detection cylinder 10 has an operation port 101, through which users can perform operations such as putting in, taking out, and cleaning cigarettes. At the same time, the operation port 101 also serves as a vent, providing the air necessary for cigarette combustion. The vent 101 is located at the top of the detection cylinder 10, which also prevents excessive airflow from affecting the detection results.
[0095] The bottom center of the detection cylinder 10 has a placement part 102 for holding cigarettes. Three sets of cameras 103 and lighting lamps 104 are symmetrically distributed on the inner wall of the detection cylinder 10. The height of the cameras 103 is adjustable, and preferably the three cameras 103 are set at the same height. The lighting lamps 104 use diffuse reflection LED adjustable light sources and are equipped with a light source scheme of 6 strip lights, all of which adopt a forward lighting method.
[0096] Compared with the prior art, the present invention has the following advantages:
[0097] The present invention provides a machine vision-based method and equipment for detecting the quality of cigarette ash packaging. Through a pre-set program, a cigarette is lit to begin real-time dynamic detection of the ash packaging. The combination of equipment and program can detect performance indicators such as ash burning time, ash size, cracks, flash, ash holding time, and carbon lines, and output the results to the user. At the same time, it can also judge the quality of cigarette ash packaging based on the above multiple indicators. This ash packaging detection equipment can detect a large number of performance data indicators, integrating multiple indicators in the industry, and can comprehensively evaluate the performance of ash packaging.
[0098] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0099] In the description of this invention, it should be noted that the terms "upper", "lower", "front", "rear", "left", "right", "inner", "outer", "top", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0100] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0101] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0102] As described above, similar technical solutions can be derived from the solutions presented in the accompanying drawings. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of this invention, without departing from the scope of the invention, shall still fall within the scope of this invention.
Claims
1. A method for detecting the quality of cigarette pack ash based on machine vision, characterized in that, include: The machine vision acquires a color image of the target area, processes the color image into a grayscale image, and performs data analysis on the grayscale image when the grayscale image meets the set conditions to obtain multiple grayscale performance indicators. After the detection is completed, the grayscale performance indicators are output. The performance indicators of the ash coating include at least one of the following: combustion rate, carbon line, tilt angle, flash, cracks, and ash holding time.
2. The method for detecting cigarette ash quality based on machine vision as described in claim 1, characterized in that: The set conditions are that the cigarette is fully burned and the ash is not emptied during the burning process.
3. The method for detecting cigarette ash quality based on machine vision as described in claim 2, characterized in that: Images of the target area are acquired at first preset time intervals, and it is determined whether the set conditions are met. If so, the detection continues; otherwise, the detection ends.
4. The method for detecting cigarette ash quality based on machine vision as described in claim 3, characterized in that: The average gray level of the root region of the combustible part of the cigarette in the grayscale image is obtained. If the average gray level is less than a first set value, it is determined that the cigarette has finished burning. Preferably, the burning time is recorded when the cigarette has finished burning; Preferably, the combustion rate is calculated based on the length of the combustible part of the cigarette and the burning time.
5. The method for detecting cigarette ash quality based on machine vision as described in claim 3, characterized in that: Obtain the gray area in the grayscale image. If the gray area is greater than a first set value, it is determined that the gray area has not been dumped. Preferably, the holding time of the ash is recorded when the ash is poured out.
6. The method for detecting cigarette ash quality based on machine vision as described in claim 1, characterized in that: Data analysis is performed on the grayscale image to obtain the outer and inner rectangles of the entire gray area. The angle of the gray area is obtained by subtracting the angles of the two rectangles.
7. The method for detecting cigarette ash quality based on machine vision as described in claim 1, characterized in that: Data analysis is performed on the grayscale image. The extracted gray area is inverted to obtain the background area. Areas with jagged edges in the background area are filled and then inverted to obtain the gray area without jagged edges. The difference between the gray area and the background area is calculated to obtain the jagged edge area.
8. The method for detecting cigarette ash quality based on machine vision as described in claim 1, characterized in that: Data analysis is performed on the grayscale image to filter out the approximate area of the crack, and the expansion operator is used to expand it to cover the complete crack. The number of cracks is then counted. Preferably, all crack regions are combined to obtain the overall crack region, and the area of the crack region and the area ratio of the crack are calculated.
9. The method for detecting cigarette ash quality based on machine vision as described in claim 1, characterized in that: Data analysis is performed on the grayscale image. The carbon line region image is obtained by cropping the grayscale image. After grayscale filtering, the carbon line outline is selected. The neatness of the carbon line is obtained by calculating the height difference of the carbon line region. Preferably, the outline of the carbon line region is converted into coordinate form, the carbon line is extracted into a skeleton, the coordinates of all points on the skeleton are obtained, the set of minimum distances from the coordinates to the outline is obtained, the average value of the distance is obtained, and the average value is multiplied by 2 to obtain the width of the carbon line.
10. A machine vision-based cigarette ash quality inspection device, characterized in that: The method for detecting the quality of cigarette pack ash based on machine vision, as described in any one of claims 1-9, is adopted.