A cigarette band die-cut indentation detection device and method
By designing a cigarette label die-cutting dent detection device, which combines a robotic arm and a camera with a die-cutting vision algorithm, the problem of easy omissions in manual inspection during the cigarette label die-cutting process is solved. This achieves automated inspection and timely alarm, reducing product scrap rate and labor costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG YIXING PACKAGING TECH CO LTD
- Filing Date
- 2022-12-27
- Publication Date
- 2026-06-23
AI Technical Summary
The current cigarette label die-cutting process lacks automated inspection methods, which makes it easy for manual inspection to miss defects and fail to detect them in time, resulting in product scrap. Furthermore, different cigarette label shapes and low image contrast make it difficult to conduct stable inspections.
Design a device for detecting die-cut dents on cigarette labels. Combining a robotic arm and a camera, it uses a die-cutting vision algorithm for automatic detection. Through offline template training and online differential detection, it achieves automated identification and alarm for die-cutting dents.
The system automates the detection of cigarette label die-cutting process, reduces human error detection, provides timely alarms, lowers product scrap rate, and saves system resources and labor costs.
Smart Images

Figure CN116026852B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of printing die-cutting inspection technology, and particularly relates to a device and method for detecting die-cutting indentations on cigarette labels. Background Technology
[0002] In the die-cutting process of cigarette labels, one step involves die-cutting the folded edges of the label. During this process, the cut lines need to be inspected to determine if they are properly positioned or if the cuts are flawed. Current monitoring methods typically rely on manual visual inspection, which often misses detections and lacks timely warnings. If flawed die-cutting cannot be identified in time, all cigarette labels produced during that period will be scrapped, resulting in significant losses. Therefore, printing manufacturers urgently need automated inspection equipment for the mid-stage of cigarette label die-cutting.
[0003] Because there are many types of cigarette label paper, cigarette label shapes vary, and die-cutting and creasing production shapes vary, ordinary methods are difficult to flexibly distinguish between defective and normal die-cut cigarette labels. In general, defective images have very low contrast, making it difficult to reliably detect them through edge detection and grayscale values, resulting in detection failures and false detections, thus causing low reliability. Summary of the Invention
[0004] The purpose of this invention is to provide a device and method for detecting die-cut dents in cigarette labels, so as to solve the above-mentioned technical problems.
[0005] To solve the above-mentioned technical problems, the specific technical solution of the cigarette label die-cutting indentation detection device and method of the present invention is as follows:
[0006] A device for detecting die-cut dents on cigarette labels includes a testing box containing a testing platform. The testing platform includes a robotic arm, a sample placement area, a testing area, an acrylic plate placement area, and a sample removal area. The sample placement area holds samples to be tested. The testing area inspects the die-cutting of the samples. The acrylic plate placement area holds an acrylic plate that covers the sample in the testing area. The sample removal area holds the inspected sample. The robotic arm retrieves a sample from the sample placement area, places it in the testing area, and then covers the sample in the testing area with the acrylic plate for inspection. After inspection, the acrylic plate is returned to its original position, and the sample is placed in the sample removal area.
[0007] Furthermore, the sample placement area and sample removal area have the same structure, with multiple upward-protruding baffles arranged to fit the size of the sample for placement. The acrylic sheet placement area also has multiple baffles arranged to fit the size of the acrylic sheet for placement. The acrylic sheet is transparent and its area is larger than the sample. Furthermore, the detection area includes a sample placement platform placed on the detection platform. The sample placement platform is made of frosted acrylic, which is translucent but not transparent. A light source is located within the sample placement platform. The sample is placed on the platform, and the light source shines through the die-cutting marks on the sample from the bottom. A camera is fixed above the sample placement platform.
[0008] Furthermore, the detection platform has a controller in the middle, the upper end of which is fixedly connected to the robotic arm. The robotic arm is electrically connected to the controller, and the controller controls the rotation of the robotic arm to complete the movement of the robotic arm in each direction. The end of the robotic arm has a motor, a transmission screw, and a slider. The motor shaft of the motor is fixedly connected to the transmission screw, and the slider is threadedly connected to the transmission screw. The suction cup is fixedly connected to the slider through a connector, and the suction cup is electrically connected to the controller. The motor is also electrically connected to the controller. The controller controls the motor to rotate, which drives the transmission screw to rotate, thereby driving the slider to move up and down, thus controlling the suction cup to pick up the sample.
[0009] Furthermore, the detection box has an alarm light and a start / stop button. The alarm light and start / stop button are electrically connected to the controller. The start / stop button is used to start the entire detection device, and the alarm light is used to detect abnormalities and trigger an alarm.
[0010] This invention also discloses a method for detecting die-cutting indentations on cigarette labels, comprising the following steps:
[0011] Step 1: Press the start / stop button on the testing box to start the testing device;
[0012] Step 2: The robotic arm picks up the cigarette label sample from the sample placement area and places it directly above the bottom surface light source in the detection area. The robotic arm then picks up the transparent semi-chocolate plate and presses it onto the cigarette label sample in the detection area; the robotic arm then resets. Step 3: The camera takes a picture of the cigarette label sample and matches it with the cut detection algorithm using a die-cutting visual algorithm. If the detection result is normal, the sample passes; if an abnormal matching calculation occurs, an error message will be displayed on the computer software interface and an alarm light will be activated.
[0013] Step 4: Start the robotic arm, pick up the acrylic plate and put it back in its original position; then pick up the tested cigarette label sample and put it into the sample take-out area.
[0014] Step 5: Repeat steps 2-4 to test the next sample.
[0015] Furthermore, the die-cutting vision algorithm in step 3 includes an offline template training algorithm and an online differential detection algorithm. The offline template training algorithm first sets the template offline, that is, the worker uses an industrial camera to collect images of the standard cigarette label die-cutting area, and then sends them to the host computer to extract the ROI image and generate a registration template. The online differential detection algorithm performs online detection during the production process. Each time the robotic arm returns to its position, the sensor triggers the camera to collect an image, which is then transmitted to the host computer and compared with the template image. If the judgment result is that there is a defect, the machine stops and an alarm is triggered to remind the worker to handle it.
[0016] Furthermore, the offline template training algorithm includes the following specific steps:
[0017] Step A1: Using a shape-based template matching method, a standard cigarette label die-cutting template sample is placed on a surface light source. An industrial camera is used to acquire a standard cigarette label die-cutting image. First, the acquired image is processed in grayscale to remove factors outside the light source environment. Then, grayscale thresholding is used for segmentation. A suitable area is selected by using the shape feature pixel area region. The image is then processed by erosion operation dilation_rectangle1, with both the height and width pixels eroded by 15, to remove burrs and black edges, thus obtaining the cigarette label area image.
[0018] Step A2: Use the image of the segmented ROI region as the template image, set the brightness of the light source controller to 2000, detect the light transmittance at the cut position, and use the create_shape_model operator to convolve the template image to calculate the gradient of each pixel to obtain the shape template image;
[0019] Step A3: When the average gray threshold of the template image does not change much, that is, when the cigarette label image is dark, the threshold of the template contrast parameter used for training is set to 20-30. When the average gray threshold of the template image changes significantly, that is, when the cigarette label image is bright, the threshold of the template contrast parameter used for training is set to 50, and the minimum gray threshold contrast of template matching is set to 10, thus obtaining the light-transmitting part cut template.
[0020] Furthermore, the create_shape_model operator includes the following steps:
[0021] S1. Set the template image;
[0022] S2. Set the number of pyramid levels, either to "auto" or an integer from 0 to 10. The larger the number of pyramid levels, the less time it takes to find a match, and the less likely the template will be to be recognized.
[0023] S3. Set the starting angle of template rotation, the range of template rotation angles, and the step size of the rotation angle;
[0024] S4. Configure template optimization and template creation methods;
[0025] S5. Matching method settings: If the matching method is set to ignore global polarization contrast, the target can be found even when the two contrasts are completely opposite.
[0026] S6. Set contrast, minimum contrast;
[0027] S7. Output template handle.
[0028] Furthermore, the online differential detection algorithm includes the following steps:
[0029] Step B1: Create a difference model using the create_variation_model operator. The difference model consists of two parts: the first part is an ideal standard image, used for comparison by the compare_variation_model operator; the second part is an image containing the difference information between or averaged among the training images. The difference model compares the image to be detected with a standard image to find the obvious differences between the image to be detected and the standard image. After training, a standard image and a variation image are obtained. The variation image contains the range of allowable variations in the grayscale value of each pixel in the image.
[0030] Step B2: Identify defects based on the difference template: By cyclically reading the standard image, performing template matching based on the template image to obtain the matching value, and performing an affine rotation transformation on the standard image to translate and rotate the current image to coincide with the template image, thereby training the difference model;
[0031] Step B3: By reading the difference model, a pre-prepared difference model is built using the `prepare_variation_model` operator. The absolute minimum threshold of the difference must be the same as the contrast during template training. The `find_shape_model` operator is used to compare the image template with the standard image, and template matching is performed on the detected object to obtain the rotation angle. The rotation angle is then subjected to affine transformation rotation, and finally, the `compare_variation_model` operator is used to calculate the difference set based on the difference model.
[0032] The `compare_variation_model(Image:Region:ModelID:)` method takes an input image `Image` and two threshold images `C(x,y)` as its base case. The output region `Region` contains points that satisfy the following condition: `C(x,y)` > t. u (x,y)Vc(x,y) <t l(x,y) compares the Image with the prepared variation model ModelID. The two thresholds obtained in the comparison step are used to determine a region containing all anomalies in the image and points of the model. The area and matching degree of the difference set are used to determine whether the cigarette label is defective and whether the crease matches.
[0033] Step B4: If the area of the matched incorrect line segment is less than 50 pixels, it indicates that the die-cutting marks are normal, and the message "ClipOK" will be displayed.
[0034] Step B5: If the area of the matched incorrect line segment is greater than 50 pixels, it indicates an abnormal die-cutting mark.
[0035] The message "Clip not OK" appears.
[0036] The present invention provides a device and method for detecting die-cut dents in cigarette labels, which has the following advantages: The present invention utilizes a device for automatic sampling and detection of die-cut dents in cigarette labels, employs machine learning intelligent algorithms for offline template training, and performs online differential detection, thus saving system resources. This method can automatically detect die-cut dents, identify die-cut defects, and issue timely alarms, reducing the scrapping of large batches of products in the die-cutting process due to human error and oversight, and reducing labor inspection costs. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the overall structure of the cigarette label die-cutting indentation detection device of the present invention;
[0038] Figure 2 This is a schematic diagram of the detection platform structure of the cigarette label die-cutting indentation detection device of the present invention;
[0039] Figure 3 This is a schematic diagram of the cigarette label area of the present invention;
[0040] Figure 4 This is a schematic diagram of the cutting template for the light-transmitting portion of the cigarette label according to the present invention;
[0041] Figure 5 This is an example diagram of template matching according to the present invention;
[0042] Figure 6 This is a schematic diagram of the difference model of the present invention;
[0043] Figure 7 This is a schematic diagram of normal die-cutting marks;
[0044] Figure 8 This is a schematic diagram of die-cutting mark abnormalities.
[0045] The markings in the diagram are as follows: 1. Testing box; 2. Alarm light; 3. Start / stop button; 4. Testing platform; 41. Sample placement table; 42. Camera; 5. Robotic arm; 51. Controller; 52. Motor; 53. Drive screw; 54. Slider; 55. Suction cup; 56. Connector; 6. Sample placement area; 61. Baffle; 7. Testing area; 8. Acrylic sheet placement area; 9. Sample removal area; 10. Cabinet door. Detailed Implementation
[0046] To better understand the purpose, structure, and function of this invention, the following detailed description of a cigarette label die-cutting indentation detection device and method, in conjunction with the accompanying drawings, is provided.
[0047] like Figure 1 As shown, a device for detecting die-cut dents on cigarette labels includes a detection box 1, which has an alarm light 2 and a start / stop button 3. Inside the detection box 1 is a detection platform 4, which has a robotic arm 5, a sample placement area 6, a detection area 7, an acrylic plate placement area 8, and a sample removal area 9. The sample placement area 6 is used to place the sample to be tested. The detection area 7 is used to detect the die-cutting of the sample. The acrylic plate placement area 8 is used to place an acrylic plate, which covers the sample in the detection area. The sample removal area 9 is used to place the tested sample. The robotic arm 5 retrieves the sample from the sample placement area 6, places the sample in the detection area 7, and then covers the sample in the detection area with the acrylic plate for testing. After testing, the acrylic plate is returned to its original position, and then the sample is placed in the sample removal area 9.
[0048] like Figure 2As shown, the robotic arm 5 is positioned in the middle of the inspection platform 4. The sample placement area 6 and sample removal area 9 are respectively located on the left and right sides of the robotic arm 5. The inspection area 7 and acrylic plate placement area 8 are respectively located on the upper and lower sides of the robotic arm 5. The sample placement area 6 and sample removal area 9 have the same structure, with multiple upward-protruding baffles 61. The baffles 61 form a size suitable for the sample size for placing the sample. Preferably, the height of the baffles 61 is greater than 10mm, and it can accommodate at least 18 samples stacked together. The acrylic plate placement area 8 also has multiple baffles 61, which form a size suitable for the acrylic plate for placing the acrylic plate. The acrylic plate is a transparent acrylic plate with an area larger than the sample, used to cover the sample in the inspection area. The inspection area 7 includes a sample placement table 41 placed on the inspection platform 4. The sample placement table 41 is made of frosted acrylic sheet, which is translucent but not transparent. A light source is located inside the sample placement table 41. The sample is placed on the sample placement table 41, and the light source shines through the die-cutting marks on the sample from the bottom. A camera 42 is mounted on the sample placement table 41 and is fixed by a camera mounting bracket 43. The camera mounting bracket is fixedly connected to the inspection platform 4. A controller 51 is located in the middle of the inspection platform 4. The upper end of the controller 51 is fixedly connected to a robotic arm 5. The robotic arm 5 is electrically connected to the controller 51, and the controller 51 controls the rotation of the robotic arm 5, enabling movement of the robotic arm 5 in each direction. The end of the robotic arm 5 has a motor 52, a transmission screw 53, and a slider 54. The motor shaft of the motor 52 is fixedly connected to the transmission screw 53, and the slider 54 is threadedly connected to the transmission screw 53. The suction cup 55 is fixedly connected to the slider 54 through a connector 56. The suction cup 55 is electrically connected to the controller 51, and the motor 54 is electrically connected to the controller 51. The controller 51 controls the motor 54 to rotate, which drives the transmission screw 53 to rotate, thereby driving the slider 54 to move up and down, thus controlling the suction cup 55 to pick up the sample.
[0049] The testing box 1 has a cabinet door 10 near the sample placement area 6 and the sample removal area 9 for placing and removing samples. The alarm light 2 and the start / stop button 3 are electrically connected to the controller 51. The start / stop button 3 is used to start the entire testing device, and the alarm light 2 is used to detect abnormalities.
[0050] The method for detecting die-cutting indentations on cigarette labels according to the present invention includes the following steps:
[0051] Step 1: Press the start / stop button 3 on the test box 1 to start the test device;
[0052] Step 2: The robotic arm 5 picks up the cigarette label sample from the sample placement area 6 and places it directly above the bottom surface light source of the detection area 7. The robotic arm 5 then picks up the transparent semi-chocolate plate and presses it onto the cigarette label sample in the detection area 7; the robotic arm 5 then resets.
[0053] Step 3: Camera 42 takes a photo of the cigarette label sample and matches it with the die-cutting visual algorithm for the cut detection algorithm. If the detection result is normal, it passes; if the matching calculation is abnormal, the computer software interface will display an error message and alarm light 2 will sound.
[0054] Step 4: Start the robotic arm 5, pick up the acrylic plate and put it back in its original position; then pick up the tested cigarette label sample and put it into the sample removal area 9;
[0055] Step 5: Repeat steps 2-4 to test the next sample.
[0056] Specifically, the die-cutting vision algorithm in step 3 includes an offline template training algorithm and an online difference detection algorithm. The offline template training algorithm first sets up the template offline; that is, workers acquire images of the standard cigarette label die-cutting area using an industrial camera, and then send them to the host computer to extract the ROI image and generate a registration template. The online difference detection algorithm performs online detection during production. Each time the robotic arm returns to its position, the sensor triggers the camera 42 to acquire an image. The area array camera has a resolution of 3072x2048, and the image is transmitted to the host computer for registration and comparison with the template image. If the result indicates a defect, the machine stops and an alarm is triggered to alert workers to take action.
[0057] The offline template training algorithm includes the following specific steps:
[0058] Using a shape-based template matching method, workers place a standard cigarette label die-cutting template sample on a surface light source and acquire the standard cigarette label die-cutting image using an industrial camera. First, the acquired image undergoes grayscale processing to remove factors outside the light source environment. Then, grayscale thresholding is used for segmentation. A suitable region is selected by utilizing the pixel area of shape features. Finally, an erosion operation (dilation_rectangle1) is performed, with both height and width pixels eroded by 15%, to remove burrs and black edges, resulting in the cigarette label area image as shown below. Figure 3 As shown,
[0059] The image of the segmented ROI region is used as the template image. The cut detection mainly detects the light transmittance at the cut position. When the brightness of the light source controller is set to 2000, the recognition effect of the die-cut cut is better. When the brightness is 1000, the light source effect is poor when illuminating thicker cigarette label paper. The create_shape_model operator is used to convolve the template image to calculate the gradient of each pixel to obtain the shape template image.
[0060] The create_shape_model operator includes the following steps:
[0061] 1. Set the template image;
[0062] 2. Set the number of pyramid levels. You can set it to "auto" or an integer from 0 to 10. The larger the number of pyramid levels, the less time it takes to find a match, and the less likely the template will be to be recognized.
[0063] 3. Set the starting angle of template rotation, the range of template rotation angle (>0), and the step size of rotation angle (>=0 and <=pi / 16);
[0064] 4. Configure template optimization and template creation methods;
[0065] 5. Matching method settings: If the matching method is set to ignore global polarization contrast, the target can be found even when the contrast of the two polarizations is completely opposite.
[0066] 6. Adjust contrast and minimum contrast;
[0067] 7. Output template handle.
[0068] When the average grayscale threshold of the template image does not change significantly (the cigarette label image is relatively dark), the contrast parameter threshold for training is set to 20-30. When the average grayscale threshold of the template image changes significantly (the cigarette label image is relatively bright), the contrast parameter threshold for training is set to 50, and the minimum grayscale threshold contrast for template matching is set to 10. The effect is as follows... Figure 4 As shown, a template for the light-transmitting portion is obtained; an example of template matching is shown below. Figure 5 As shown.
[0069] The online differential detection algorithm includes the following steps:
[0070] The `create_variation_model` operator creates a variation model, which consists of two parts: the first part is an ideal standard image (used for comparison by the `compare_variation_model` operator later), and the second part is an image containing the differences between or averaged across the training images. The main principle of the variation model is to compare the image to be detected with a standard image to identify significant differences (i.e., defects) between the two. After training, a standard image and a variation image are obtained. The variation image contains the allowed range of grayscale values for each pixel in the image.
[0071] Defects are identified based on a difference template. This is achieved by iteratively reading a standard image, performing template matching to obtain matching values, and then applying an affine rotation transformation to the standard image to translate and rotate the current image until it coincides with the template image. This process trains a difference model, as shown below. Figure 6 As shown (the contrast is relatively dark and the image is not very clear).
[0072] By reading the difference model, the `prepare_variation_model` operator is used to build a pre-prepared difference model. The operator parameters need to be automatically matched and adjusted according to the light source and the light transmittance of the cigarette label. `ModelID` is the model trained by `create_variation_model`. The absolute minimum threshold of the difference, `AbsThreshold`, needs to be the same as the contrast during template training. Using the `find_shape_model` operator, the image template is compared to a standard image, and template matching is performed on the detected object to obtain the rotation angle. An affine transformation is then applied to the rotation angle. shape_model(Image::ModelID,AngleStart,AngleExtent,MinScore,NumMatches,MaxOverlap,SubPixel,NumLevels,Greediness:Row,Column,Angle,Score), Image is the original image, ModelID is the trained matching template, AngleStart (starting angle), AngleExtent (matchable rotation angle) are set to rad(-20), rad(40) respectively, NumMatches is set to 1, NumLevels is set to 1, and Greediness is set to 1. Then, the difference set is calculated according to the difference model by the compare_variation_model operator, compare_variation_model(Image:Region:ModelID:), let c(x,y) represent the input image Image and represent two threshold images. Then the output region Region contains the model, that is, the points that satisfy the following condition: c(x,y))>t u (x,y)Vc(x,y) <t l (x,y) compares the Image with the prepared variation model ModelID. The two thresholds obtained in the comparison step (stored in the variation model) are used to determine a region containing all anomalies in the image and points in the model. The area and matching degree of the difference set are used to determine whether the cigarette label is defective and whether the crease matches.
[0073] like Figure 7 As shown, if the area of the matched incorrect line segment is less than 50 pixels, it indicates that the die-cutting marks are normal, and the message "Clip OK" is displayed.
[0074] If the area of the matched erroneous line segment is greater than 50 pixels, it indicates an abnormal die-cutting edge, prompting "Clip notOK," and is marked as a gray erroneous line segment. Figure 8 The text appears to be a mix of Chinese characters and symbols, possibly representing a corrupted or incomplete document. A direct translation wouldn't be meaningful without further context or clarification.
[0075] It is understood that the present invention has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.
Claims
1. A device for detecting die-cut dents on cigarette labels, comprising a detection box (1), wherein the detection box (1) has a detection platform (4), characterized in that, The testing platform (4) has a robotic arm (5), a sample placement area (6), a testing area (7), an acrylic plate placement area (8), and a sample removal area (9). The sample placement area (6) is used to place the sample to be tested. The testing area (7) is used to test the die-cut sample. The acrylic plate placement area (8) is used to place the acrylic plate, which is used to cover the sample in the testing area. The sample removal area (9) is used to place the tested sample. The robotic arm (5) is used to retrieve the sample from the sample placement area (6), place the sample in the testing area (7), and then place the acrylic plate over the sample in the testing area for testing. After testing, the acrylic plate is returned to its original position, and then the sample is placed in the sample removal area (9). The sample placement area (6) and the sample removal area (9) are... The structure is the same, with multiple upward-protruding baffles (61). The baffles (61) form a size suitable for the sample size and are used to place the sample. The acrylic plate placement area (8) has multiple baffles (61). The multiple baffles (61) form a size suitable for the acrylic plate size and are used to place the acrylic plate. The acrylic plate is a transparent acrylic plate and the area of the acrylic plate is larger than that of the sample. The detection area (7) includes a sample placement platform (41) placed on the detection platform (4). The sample placement platform (41) is a frosted acrylic plate that is light-transmitting but not transparent. The sample placement platform (41) has a light source inside. The sample is placed on the sample placement platform (41). The light source passes through the die-cutting marks of the sample from the bottom of the sample. A camera (42) is fixed above the sample placement platform (41).
2. The cigarette label die-cutting indentation detection device according to claim 1, characterized in that, The detection platform (4) has a controller (51) in the middle. The upper end of the controller (51) is fixedly connected to the robotic arm (5). The robotic arm (5) is electrically connected to the controller (51). The controller (51) controls the robotic arm (5) to rotate and complete the movement of the robotic arm (5) in each direction. The end of the robotic arm (5) has a motor (52), a transmission screw (53) and a slider (54). The motor shaft of the motor (52) is fixedly connected to the transmission screw (53). The slider (54) is threadedly connected to the transmission screw (53). The suction cup (55) is fixedly connected to the slider (54) through a connector (56). The suction cup (55) is electrically connected to the controller (51). The motor (52) is electrically connected to the controller (51). The controller (51) controls the motor (52) to rotate and drive the transmission screw (53) to rotate, thereby driving the slider (54) to move up and down, thereby controlling the suction cup (55) to pick up the sample.
3. The cigarette label die-cutting indentation detection device according to claim 2, characterized in that, The detection box (1) has an alarm light (2) and a start / stop button (3). The alarm light (2) and the start / stop button (3) are electrically connected to the controller (51). The start / stop button (3) is used to start the entire detection device, and the alarm light (2) is used to detect abnormal alarms.
4. A method for detecting die-cutting dents in cigarette labels using a device for detecting die-cutting dents as described in any one of claims 1-3, characterized in that, Includes the following steps: Step 1: Press the start / stop button (3) on the test box (1) to start the test device; Step 2: The robotic arm (5) picks up the cigarette label sample from the sample placement area (6) and places it directly above the bottom surface light source of the detection area (7). The robotic arm (5) picks up the transparent sub-chocolate plate and presses it onto the cigarette label sample in the detection area (7). The robotic arm (5) then resets. Step 3: The camera (42) takes a photo of the cigarette label sample and matches the cut detection algorithm through the die-cutting visual algorithm. If the detection result is normal, it passes. If the matching calculation is abnormal, the computer software interface will display an error message and the alarm light (2) will be activated. Step 4: Start the robotic arm (5) to pick up the acrylic plate and put it back in its original position; then pick up the tested cigarette label sample and put it into the sample take-out area (9). Step 5: Repeat steps 2-4 to test the next sample.
5. The method for detecting die-cutting indentations on cigarette labels according to claim 4, characterized in that, Step 3 describes a die-cutting vision algorithm that includes an offline template training algorithm and an online differential detection algorithm. The offline template training algorithm first sets up the template offline, that is, the staff collects the image of the standard cigarette label die-cutting area through an industrial camera, and then sends it to the host computer to extract the ROI image and generate a registration template. The online differential detection algorithm performs online detection during the production process. Each time the robotic arm returns to its original position, the sensor triggers the camera (42) to collect the image, and sends it to the host computer for registration with the template image for comparison. If the judgment result is that there is a defect, the machine will stop and alarm to remind the staff to handle it.
6. The method for detecting die-cutting indentations on cigarette labels according to claim 5, characterized in that, The offline template training algorithm includes the following specific steps: Step A1: Using a shape-based template matching method, a standard cigarette label die-cutting template sample is placed on a surface light source. An industrial camera is used to acquire a standard cigarette label die-cutting image. First, the acquired image is processed in grayscale to remove factors outside the light source environment. Then, grayscale thresholding is used for segmentation. A suitable area is selected by using the shape feature pixel area region. The image is then processed by erosion operation dilation_rectangle1, with both the height and width pixels eroded by 15, to remove burrs and black edges, thus obtaining the cigarette label area image. Step A2: Use the image of the segmented ROI region as the template image, set the brightness of the light source controller to 2000, detect the light transmittance at the cut position, and use the create_shape_model operator to convolve the template image to calculate the gradient of each pixel to obtain the shape template image; Step A3: When the average gray threshold of the template image does not change much, that is, when the cigarette label image is dark, the threshold of the template contrast parameter is set to 20~30. When the average gray threshold of the template image changes significantly, that is, when the cigarette label image is bright, the threshold of the template contrast parameter is set to 50. The minimum gray threshold contrast of the template matching is set to 10 to obtain the light-transmitting part cut template.
7. The method for detecting die-cutting indentations on cigarette labels according to claim 6, characterized in that, The create_shape_model operator includes the following steps: S1. Set the template image; S2. Set the number of pyramid levels, either to "auto" or an integer from 0 to 10. The larger the number of pyramid levels, the less time it takes to find a match, and the less likely the template will be to be recognized. S3. Set the starting angle of template rotation, the range of template rotation angles, and the step size of the rotation angle; S4. Configure template optimization and template creation methods; S5. Matching method settings: If the matching method is set to ignore global polarization contrast, the target can be found even when the two contrasts are completely opposite. S6. Set contrast, minimum contrast; S7. Output template handle.
8. The method for detecting die-cutting indentations on cigarette labels according to claim 5, characterized in that, The online differential detection algorithm includes the following steps: Step B1: Create a difference model using the create_variation_model operator. The difference model consists of two parts: the first part is an ideal standard image, used for comparison by the compare_variation_model operator; the second part is an image containing the difference information between or averaged among the training images. The difference model compares the image to be detected with a standard image to find the obvious differences between the image to be detected and the standard image. After training, a standard image and a variation image are obtained. The variation image contains the range of allowable variations in the grayscale value of each pixel in the image. Step B2: Identify defects based on the difference template: By cyclically reading the standard image, performing template matching based on the template image to obtain the matching value, and performing an affine rotation transformation on the standard image to translate and rotate the current image to coincide with the template image, thereby training the difference model; Step B3: By reading the difference model, a pre-defined difference model is established using the `prepare_variation_model` operator. The absolute minimum threshold of the difference must be the same as the contrast during template training. The `find_shape_model` operator is used to compare the image template with the standard image, and template matching is performed on the detected object to obtain the rotation angle. The rotation angle is then subjected to an affine transformation. Finally, the `compare_variation_model` operator is used to calculate the difference set based on the difference model: `compare_variation_model(Image : Region : ModelID : )`. Let c(x, y) represent the input image Image and two threshold images. The output region Region contains the model, i.e., points that satisfy the following condition: c(x, y) > (x,y)Vc(x,y) < (x,y) compares the Image with the prepared variation model ModelID. The two thresholds obtained in the comparison step are used to determine a region containing all anomalies in the image and points of the model. The area and matching degree of the difference set are used to determine whether the cigarette label is defective and whether the crease matches. Step B4: If the area of the matched incorrect line segment is less than 50 pixels, it means that the die-cutting is normal and the message "Clip OK" is displayed. Step B5: If the area of the matched incorrect line segment is greater than 50 pixels, it indicates that the die-cutting crease is abnormal, and the message "Clip notOK" will be displayed.