Packing machine cigarette packet inner frame paper quality detection method, device, storage medium and system

By using the methods of cigarette pack image acquisition, preprocessing and deep learning recognition in the FX2 packaging machine, the problem of quality defect detection of the inside of the cigarette pack is solved, and fast and accurate defect recognition is achieved, and production efficiency and product quality are improved.

CN119850561APending Publication Date: 2025-04-18HONGYUN HONGHE TOBACCO (GRP) CO LTD

Patent Information

Application Number
CN202411929637.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

The prior art cannot effectively detect the quality defects of the inner frame paper in the cigarette bag in the FX2 packaging machine, especially during high-speed operation, resulting in the defects such as missing, shifting, and breaking of the inner frame paper in a timely manner, affecting the product quality.

Method used

A method of quality detection of the inside frame paper of cigarette bags by packaging machine, including cigarette bag image acquisition, image preprocessing, feature extraction and deep learning recognition. Images are collected through high-sensitivity CMOS cameras, and preprocessing such as grayscale, binarization, denoising and contrast enhancement are performed to extract texture and edge features, and defect recognition and classification are used using deep learning algorithms.

Benefits of technology

It realizes rapid and accurate detection of quality defects in the cigarette pack inner frame paper, improves detection accuracy and robustness, can effectively identify the displacement, skew, damage, missing and stain defects of the inner frame paper, and improves the automation level and production efficiency of the cigarette packaging production line.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850561A_ABST
    Figure CN119850561A_ABST
Patent Text Reader

Abstract

The invention discloses a method, a device, a storage medium and a system for detecting the quality of inner frame paper of a cigarette packet of a packaging machine, and belongs to the field of machine visual defect detection and cigarette packet packaging. Comprising the steps of collecting a real-time image; a histogram equalization method is adopted to adjust the gray scale range of the characteristics of inner frame paper displacement, skew, damage, missing and inner frame paper stain images, so that the brightness difference of different areas in the images is more obvious; feature extraction: extracting features related to the detection task, the features including texture features and edge features; and image analysis and identification: analyzing and comparing the extracted features by using a support vector machine, and performing template matching with a preset standard or template to determine whether the inner frame paper of the cigarette packet meets the requirement or identify the category and state of the object, thereby completing the quality detection of the inner frame paper. The problems that the detection process of the inner frame paper of the cigarette packet depends on manual factors too much and the detection accuracy is low are solved, and the automatic operation efficiency of a cigarette packet packaging production line is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of quality detection of inner frame paper of cigarette packs of cigarette packaging machines, and in particular to a method, device, storage medium and system for quality detection of inner frame paper of cigarette packs of packaging machines. Background Art

[0002] The FX2 packaging machine is a high-speed hard box packaging machine from the German FOCKE company, with a production speed of 700 packs / min. This packaging machine is a double-track conveyor cigarette pack type. The production process is that the pusher pushes the cigarettes in the cigarette bin to the mold box, and the cutter cuts the aluminum foil and the inner frame paper and wraps them on the outer ends of the cigarettes respectively, then folds and sticks the trademark paper, and finally wraps them with transparent cellophane. The inner frame paper of the cigarette pack is one of the key quality control points in the packaging process. It mainly plays the role of fixing the orderly arrangement of cigarettes in the cigarette pack, consolidating and supporting the outer packaging of the cigarette pack, so that the cigarette pack has a better appearance. The inner frame paper of the cigarette pack involves the processes of cutting, separation, wrapping, folding, and transmission. The friction between the various parts of the equipment, the execution of the cutting action of the cutter, the integrity and cleanliness of the equipment, and the properties of the white cardboard itself will all lead to deviations in high-speed operation, which may cause defective cigarette packs such as missing, shifting, and damage of the inner frame paper, and burrs on the cutting edge of the inner frame paper. Once defective cigarette packs enter the market, they will cause quality accidents and affect the corporate image. Therefore, in order to improve product quality, it is particularly important to develop an efficient and accurate cigarette pack inner frame paper quality inspection system for such defects.

[0003] The original manufacturer of the FX2 packaging machine mentioned above does not have a detection for paper jams in cigarette packs. Instead, it uses manual sampling to detect the inner frame paper of cigarette packs. The probability of human error is high, and during the high-speed operation of the machine, it cannot be guaranteed that the sampling represents the full inspection. It is impossible to manually detect quality defects too quickly, which poses a serious quality risk. If there is no reliable detection device, the next step will be entered, and defective cigarette packs may be shipped out. Moreover, manual detection lacks flexibility and is difficult to adapt to packaging production lines of different types and speeds.

[0004] CN117630009A discloses a method and device for detecting inner frame paper defects, which is used for the FOCKE350 type packaging machine with a relatively slow running speed. It is relatively easy to control and implement. It is a method using image texture features. Although this method is fast and effective, it can only detect the presence or absence of inner frame paper and scratch defects, and cannot detect defects such as frame paper displacement, skewness, corner folding, and inner frame paper stains caused by the pasting of the inner frame paper of the cigarette package. Moreover, the FOCKE350 type packaging machine is a single-track conveying cigarette type, and the FX2 packaging machine is a double-track conveying cigarette package type. This method cannot meet the requirements of detecting the quality defects of the inner frame paper of the cigarette package of the double-track conveying cigarette package type.

[0005] CN103512888A discloses a cigarette pack seal defect detection system based on image recognition technology. The system adopts a CCD image sensor. For a relatively slow carton sealing machine, the camera speed requirement is relatively low. Although the system can detect errors such as skewness and folded corners caused by seal pasting, it cannot meet the requirements of high-speed operation for detecting various defects of the inner frame paper of the cigarette pack. Moreover, the system only adopts filtering methods and feature recognition of edge detection to identify seal defects. By judging the position angle information of the feature straight line, this cannot meet the needs of more complex inner frame paper defect detection. It also needs to be combined with image preprocessing and multiple feature recognition to realize the recognition and classification of various complex defects of the inner frame paper of the cigarette pack, and provide information to operators for rapid troubleshooting and restoration of normal and stable operation of the machine. Summary of the invention

[0006] The purpose of the present invention is to provide a method, device, system and storage medium for detecting the quality of the inner frame paper of cigarette packs of an FX2 hard box packaging machine, so as to solve the problems in the above-mentioned prior art, realize the detection of quality defects of the inner frame paper of cigarette packs, and improve the packaging quality of cigarette packs.

[0007] In a first aspect, the present invention provides a method for detecting the quality of inner frame paper of cigarette packs by a packaging machine, which is used for detecting the quality of inner frame paper of cigarette packs, and comprises the following steps:

[0008] In the cigarette pack image acquisition module, when the inner frame paper reaches a fixed position, the inner frame paper receives the encoder shift trigger signal, takes pictures of the two mold boxes of FX2, acquires the real-time image of the cigarette pack inner frame paper, and sends it to the image preprocessing module.

[0009] The image preprocessing is to preprocess the collected data of the displacement, skew, damage, missing, stains on the inner frame paper of the cigarette package, including graying, binarization, denoising, contrast enhancement and distortion correction, etc., to improve the quality of the images of the displacement, skew, damage, missing, stains on the inner frame paper of the cigarette package to improve the efficiency and accuracy of subsequent processing, and to prepare for feature extraction. According to the feature extraction, the features related to the detection task are extracted from the displacement, skew, damage, missing, stains on the inner frame paper of the cigarette package after preprocessing, and these features include texture and edge detection, and the bright features of the image are extracted and put into the comparison library for real-time image comparison.

[0010] The edge detection uses the edge detection algorithm Canny operator to find the edge contour of the object in the image of the inner frame paper displacement, skew, damage, and missing. The edge contains important shape information of the inner frame paper displacement, skew, damage, and missing image to ensure the accuracy and robustness of edge detection. In this way, the Canny operator can effectively extract real and clear edge information from the image while suppressing noise and false edges.

[0011] Gradient amplitude calculation, by solving the gradient amplitude and direction through partial derivatives, and then using the finite difference of the first-order partial derivative in the neighborhood to calculate the gradient amplitude and direction of the inner frame paper displacement, skew, damage, and missing. The change of grayscale value in the neighborhood around the pixel point is represented by the gradient amplitude, and the gradient direction represents the grayscale value.

[0012]

[0013] Where: x is the horizontal coordinate of the pixel, y is the vertical coordinate of the pixel; x (x, y) is the horizontal gradient, reflecting the change in the horizontal direction; p y (x, y) is the vertical gradient, reflecting the change in the vertical direction; P(x, y) is the gradient amplitude, and θ(x, y) is the gradient direction;

[0014] Non-maximum suppression: for each pixel, the two neighborhood gradient amplitudes along the gradient direction in the surrounding neighborhood are calculated, and then compared with the gradient amplitude of the pixel point;

[0015] Dual threshold detection, comparing the inner frame paper shift, skew, damage, missing pixels with the threshold;

[0016] Texture feature extraction, using the inner frame paper stain texture to analyze the grayscale co-occurrence matrix, constructing the matrix by calculating the co-occurrence frequency of the grayscale values ​​of the inner frame paper stain pixel pairs in the image, and then extracting a variety of statistical features from this matrix;

[0017] The gray-level co-occurrence matrix normalizes the gray-level value and gradient value of each pixel of the inner frame paper stain image;

[0018]

[0019]

[0020] In the formula, p x is the maximum grayscale value of the image, p(x, y) is the grayscale value of the current pixel (x, y), t x is the maximum gradient value of the image, and t(x, y) is the gradient value of the current pixel (x, y);

[0021] Feature extraction: extract the features of the inner frame paper displacement, skew, damage, missing, and stain image, store the bright information in the comparison library, and wait for real-time image analysis and recognition;

[0022] Image analysis and recognition: Use deep learning algorithms to analyze and compare the features of the extracted images of inner frame paper displacement, skew, damage, missing, and inner frame paper stains, and match them with pre-set standards or templates to determine whether the cigarette package inner frame paper meets the requirements or identify the category and status of the object;

[0023] The template matching compares the extracted features with the known standard template, calculates the similarity based on the support vector machine, and determines whether there is a match based on the similarity.

[0024] The support vector machine combines texture edge features with edge features to provide a more comprehensive image description and improve the performance of image processing tasks, thereby determining the category to which the object belongs;

[0025] The judgment and output module makes corresponding judgments based on the results of image analysis and recognition, such as judging whether the inner frame paper of the cigarette package has defects such as displacement, skewness, damage, missing, or stains on the inner frame paper, and outputs the results. The detection results are transmitted to the main program in the form of signals so that the main program controls the user interface to display the detection results. When a defect in the inner frame paper of the cigarette package is detected, the main program controls the equipment action on site, and the system automatically issues a prompt message or sends a rejection instruction to the preset rejection mechanism after determining the defect point. The rejection instruction is used to reject the cigarette package through the rejection mechanism.

[0026] Preferably, the results of real-time detection are used to continuously collect new data and relearn the training model, reload new defect types, and update the defect types in the learner to adapt to new situations and new defect types that may arise in the production process.

[0027] In a second aspect, in order to achieve the above-mentioned purpose, the present invention further provides a device for detecting the quality of inner frame paper of cigarette packs of a packaging machine, which is used to implement the method for detecting the quality of inner frame paper of cigarette packs of a packaging machine described in the present invention, and the detection device comprises:

[0028] The IPC control module includes a PLC controller, an industrial computer and an encoder. The PIC controller is connected to the industrial computer and the encoder signal respectively. The encoder is arranged on the main shaft of the packaging machine and is used to detect the rotation phase of the packaging machine in real time.

[0029] The cigarette pack image acquisition and receiving module is used to receive the detection signal for the inner frame paper of the cigarette pack; it includes using 2 high-sensitivity CMOS cameras, 2 lenses, and 8 LED light sources to detect the inner frame paper of the small box hard packs in the two mold boxes. The high-sensitivity CMOS camera is installed 15 cm above the 703 folding turret track and close to the paper conveying side (machine phase 120°), and is installed and fixed at a downward tilt of 45°; when the two cigarette packs are shifted to the corresponding photo taking position of the high-sensitivity CMOS camera, the high-sensitivity CMOS camera receives the encoder shift trigger signal to take pictures, including real-time capture of image data of the inner frame paper of the cigarette pack.

[0030] The image preprocessing module preprocesses the collected image data, including image cropping, scaling, normalization and other operations, for subsequent feature extraction and model detection.

[0031] The quality defect recognition and classification module deploys a trained deep learning model to perform quality inspection on processed images. This module can automatically analyze image features and determine whether there are defects in the inner frame paper of the cigarette package and the type of defects.

[0032] Alarm and processing module: When a defect is detected, the module will send out an alarm signal and may trigger corresponding processing measures, such as stopping the production line, marking defective products and removing them.

[0033] The data storage and transmission module is used to store image data and results during the detection process, and supports remote transmission and sharing of data. This helps with subsequent data analysis and model optimization.

[0034] In summary, the device realizes rapid and accurate detection of the quality of the inner frame paper of cigarette packs through functional modules such as IPC control module, receiving module, cigarette pack image acquisition module, image preprocessing, quality defect identification and classification module, alarm and processing, and data storage and transmission.

[0035] In a third aspect, in order to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the method for detecting the quality of the inner frame paper of a cigarette pack of a packaging machine described in the present invention are implemented.

[0036] In a fourth aspect, in order to achieve the above-mentioned purpose, the present invention also provides a system for detecting the quality of inner frame paper of cigarette packs, the detection system comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the method for detecting the quality of inner frame paper of cigarette packs of a packaging machine described in the present invention are implemented.

[0037] Since the detection device, storage medium and detection system of the present invention can execute or realize the above-mentioned detection method of the inner frame paper quality of the cigarette pack, they have the same technical effects as the above-mentioned detection method of the inner frame paper quality of the cigarette pack, and will not be described in detail here.

[0038] The present invention adopts the above technical solution to have the following advantages:

[0039] In the technical solution provided by the present invention, when the inner frame paper cigarette pack arrives at the preset station, the cigarette pack image acquisition device obtains the cigarette pack inner frame paper image, and then pre-processes the cigarette pack inner frame paper image according to the preset image pre-processing strategy to obtain image parameters characterizing the cigarette pack inner frame paper, deploys the trained deep learning model, and performs quality judgment on the processed image. This module can automatically analyze image features and determine whether there are defects in the cigarette pack inner frame paper to obtain the cigarette pack inner frame paper defect result. Compared with traditional machine vision methods, the present invention improves recognition accuracy by extracting texture features to detect stains on the inner frame paper, combining texture edge features and edge features, and using deep learning technology, etc., and suggests better robustness, which can effectively improve the automation level and production efficiency of the cigarette packaging production line.

[0040] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, other features and advantages of the present invention will become clear through the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 The figure is a flow chart of the cigarette pack inner frame paper quality detection method of the present invention.

[0042] Figure 2 It is a structural block diagram of the cigarette pack inner frame paper quality detection device of the present invention.

[0043] Figure 3 The present invention discloses a schematic diagram of the structure of a cigarette pack inner frame paper image acquisition device in some embodiments.

[0044] Figure 4 This is the location where the on-site installation of the cigarette pack inner frame paper image acquisition device in the embodiment is located.

[0045] Figure 5 These are images of quality defects of inner frame paper of some cigarette packages collected at industrial sites in the embodiment, where: a is an inner frame paper displacement defect, b is an inner frame paper stain defect, and c is an inner frame paper damage defect. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] according to Figure 1-5, the following is a specific embodiment, which describes in detail the various steps of the present invention:

[0048] according to Figure 1 , the present invention provides a method for detecting inner frame paper of cigarette packs, which is used for quality detection of inner frame paper of cigarette packs. When a detection signal of the inner frame paper of a cigarette pack to be detected is received, a cigarette pack image acquisition signal is sent; when the cigarette pack image acquisition signal is sent, the cigarette pack image acquisition module is started at this time to acquire a real-time image of the inner frame paper of the cigarette pack and send it to an image preprocessing module. The module includes a high-resolution and high-sensitivity CMOS camera, an adapter lens, and a stable light source. When the main shaft of the equipment rotates in a preset workstation phase interval, the encoder sends an instruction, and the high-sensitivity CMOS camera receives the instruction to capture the image at a predetermined workstation of the folding turret to acquire the current image of the inner frame paper of the cigarette pack; image preprocessing, preprocessing the collected image data of the inner frame paper of the cigarette pack, including steps such as graying, binarization, denoising, contrast enhancement, and distortion correction, to improve the quality of the image to improve the efficiency and accuracy of subsequent processing, and to prepare for feature extraction. The preprocessing method adopted by the present invention includes:

[0049] Step 1: Grayscale Convert the color image to a grayscale image to simplify data processing. Set 0-255 as the grayscale interval, and each color pixel P(x, y) will be converted to a value between 0 and 255. If there is any stain, it will be displayed on the gray image.

[0050] Step 2: Binarization: Convert the grayscale image into a binary image, highlighting the areas with features of the cigarette pack inner frame paper displacement, skew, damage, missing, and stains. The selection method is the double fixed threshold method. Here, the binarization threshold T1 is set to 60, and the threshold T2 is set to 150. When the grayscale pixel of the cigarette pack inner frame paper is greater than or equal to 150, it is directly set to 0; when the grayscale pixel is less than or equal to 60, it is directly set to 0; when the grayscale pixel is greater than 60 and less than 150, it is defined as 255; after binarization, the final result is a binary processed image;

[0051]

[0052] Step 3: De-noising uses a median filter to remove noise points in the image, retaining the edge information of the inner frame paper displacement, skew, damage, missing, and inner frame paper stains. If a binary image sequence p of the inner frame paper of a cigarette package is filtered, a long window L with an odd length must first be defined, L = 2N + 1, N is a positive integer. Suppose at a certain time i, the signal samples in the window are p(iN), ..., p(i), ..., p(i+N), where p(i) is the signal sample value at the center of the window. After arranging these L signal sample values ​​in order from small to large, the median value, the sample value at i, is defined as the output value X of the median filter.

[0053] X(i)=Med+(p(iN),...p(i),...p(i+N))

[0054] Step 4: Enhance contrast Use the histogram equalization method to adjust the grayscale range of the features of the inner frame paper displacement, skew, damage, missing, and inner frame paper stain image, so that the brightness difference between different areas in the image is more obvious, which is convenient for subsequent feature extraction. First, consider a continuous function and let the variable X represent the grayscale of the features of the inner frame paper displacement, skew, damage, missing, and inner frame paper stain image to be enhanced. Assume that it is normalized to the interval [0, 1], and r = 0 represents black and r = 1 represents white. Then consider a discrete formula and allow the pixel value to be in the interval [0, L-1]. For a continuous function, assume that its transformation function is:

[0055] s=T(r), 0=<r<=1

[0056] In the original image, a gray value s is generated for each pixel value X. The number of pixels at each gray level in the original input image is counted as X i , i = 0, 1, ... L-1, where L is the total number of gray levels; calculate the histogram of the original image, that is, the probability density ρ of each gray level i (r i )=n i / n, n is the total number of pixels in the original image; calculate the cumulative distribution function Calculate the final output grayscale:

[0057] g k =INT[(g max -g min )s k (r k )+g min +0.5] / (L-1)

[0058] Where INT[] is the integer operator, where k = 0, 1..., L-1. Let g min =0,g max =L-1, the calculation formula is simplified to:

[0059] g k =INT[(L-1)s k (r k )+0.5] / (L-1)

[0060] Using the mapping relationship between fk (grayscale function of the original image) and gk, the grayscale of the original image is modified to obtain an output image whose histogram is approximately uniformly distributed.

[0061] Step 5: Correct distortion. Correct the texture and pattern image distortion caused by factors such as high-sensitivity CMOS camera lenses, such as distortion and perspective distortion. Given the inner frame paper texture and pattern distortion image g(x', y'), find the original inner frame paper texture and pattern f(x, y), satisfying the relationship:

[0062]

[0063] Among them, h1(x, y) and h2(x, y) can be approximated by polynomials as Where N is the degree of the polynomial, a ij , b ij are the unknown coefficients of the respective terms. When N = 1, x' = ax + by + c, y' = dx + ey + f.

[0064] Step 6: Feature extraction: extract features related to the detection task from the preprocessed cigarette package inner frame paper image. These features include texture and edge detection. The bright features of the image are extracted and put into the comparison library for real-time image comparison.

[0065] The edge detection uses the edge detection algorithm Canny operator to find the edge contour of the inner frame paper displacement, skew, damage, and missing features. The edge contains important shape information of the inner frame paper displacement to ensure the accuracy and robustness of edge detection. Through this method, the Canny operator performs Gaussian filtering, gradient amplitude calculation, non-maximum will and double threshold processing on the inner frame paper displacement, skew, damage, and missing images to obtain edge results. The gradient amplitude calculation solves the gradient amplitude and direction by taking partial derivatives, and then uses the finite difference of the first-order partial derivative in the neighborhood of the image where the inner frame paper is displaced, skewed, damaged, missing, and stained to calculate the gradient amplitude and direction. The grayscale value changes in the neighborhood around the pixel points where the inner frame paper is displaced, skewed, damaged, and missing are represented by the gradient amplitude, and the gradient direction represents the grayscale value.

[0066]

[0067] Where: x is the horizontal coordinate of the pixel, y is the vertical coordinate of the pixel; x (x, y) is the horizontal gradient, reflecting the change in the horizontal direction; p y (x, y) is the vertical gradient, reflecting the change in the vertical direction; P(x, y) is the gradient amplitude, and θ(x, y) is the gradient direction;

[0068] For non-maximum suppression, it is necessary to perform it on each inner frame paper shift pixel in the gradient amplitude matrix P(x, y), calculate the two neighborhood gradient amplitudes along the gradient direction in the surrounding neighborhood, and compare them with the gradient amplitudes of the inner frame paper shift, skew, damage, missing, and stain pixels. If the inner frame paper shift pixel has the largest gradient amplitude, it is retained as an edge point, otherwise the gradient amplitude of the pixel is set to 0;

[0069] For dual threshold detection, the pixel points in the inner frame paper P(x, y) are compared with the threshold. If the pixel point is greater than Th, it is marked as a strong edge point. If the inner frame paper pixel point is less than Th, it is marked as a non-edge point. If the inner frame paper pixel point is between the two thresholds, it is marked as a weak edge point. For all weak edge points, if there is any strong edge point in the 8 surrounding neighborhoods, it will be re-marked as a strong edge point; otherwise, it will be marked as a non-edge point. Finally, all inner frame paper pixels marked as strong edge points are considered to be edge points in the image and are detected as key points.

[0070] When there are stains on the inner frame paper, the above two feature recognitions have little effect on its detection. By adding texture feature extraction, the stains on the inner frame paper can be detected and removed.

[0071] The texture feature extraction utilizes texture analysis of the grayscale co-occurrence matrix, wherein the matrix is ​​constructed by calculating the co-occurrence frequency of the grayscale values ​​of pixel pairs in the image of the inner frame paper stain, and then a variety of statistical features are extracted from the matrix of the inner frame paper stain, such as inner frame paper energy, inner frame paper entropy, inner frame paper contrast, inner frame paper correlation, inner frame paper local stationarity, inner frame paper differential moment, inner frame paper sum average, inner frame paper sum variance, inner frame paper sum entropy, inner frame paper difference variance and inner frame paper difference entropy, a total of 14 feature quantities, at this time, the texture features of the inner frame paper stain image are extracted to describe the spatial distribution law of the grayscale of the inner frame paper stain pixels in the image.

[0072] The grayscale co-occurrence matrix normalizes the grayscale value and gradient value of each pixel of the inner frame paper of the image, counts the number of pixels m=P(x, y) and n=T(x, y) in the normalized grayscale matrix P(x, y) and the normalized gradient matrix T(x, y), fills the corresponding number of inner frame paper pixels with m and n as the rows and columns of the matrix, and obtains the grayscale gradient co-occurrence matrix h(m, n), and normalizes the grayscale gradient co-occurrence matrix so that the sum of its elements is 1;

[0073]

[0074] In the formula, p x is the maximum grayscale value of the image, p(x, y) is the grayscale value of the current pixel (x, y), t xis the maximum gradient value of the image, and t(x, y) is the gradient value of the current pixel (x, y). Different distances and directions can be selected to obtain multiple gray-level co-occurrence matrices.

[0075] The gray-level co-occurrence matrix is ​​a symmetric matrix. If the texture is rough, the non-zero elements of the gray-level co-occurrence matrix will be concentrated near the main diagonal; if the texture is fine, the gray-level co-occurrence matrix is ​​more dispersed. Based on this, if there is stain on the inner frame paper, the gray-level co-occurrence matrix will have non-zero elements concentrated near the main diagonal.

[0076] Step 7: Image analysis and recognition, using deep learning algorithms to analyze and compare the extracted features, and match them with pre-set standards or templates to determine whether the inner frame paper of the cigarette package meets the requirements or identify the category, state, etc. of the object; according to the support vector machine, the displacement, skew, and damaged edge features of the inner frame paper and the texture features of the inner frame paper are combined to provide a more comprehensive image description and improve the performance of the image processing task, so as to determine the category to which the object belongs. It maps the data to a high-dimensional space and finds a hyperplane with the largest interval in the space, that is, to separate the positive and negative samples as much as possible, to maximize the distance between the distributions of the samples, to ensure the difference between the positive and negative samples, and to reduce the classification error. The image is divided into a training set and a validation set and marked as qualified as a data set. The trained model is used to detect defective products on the test set, and finally the classification accuracy and precision are obtained.

[0077] Specifically, the extracted stains and displacement, skew and damage features of the inner frame paper are compared with the known established sample templates, and the accuracy is set to 0.00001. When the accuracy requirement is not met, a sample library is generated after multiple iterations. When the satisfactory accuracy requirement is met after multiple iterations, the sample library is retained at this time; when the inner frame paper passes through the set phase during machine operation, the sample library is matched according to the support vector machine deep learning. When the inner frame paper is identified as consistent with the qualified product, that is, when the feature points are all consistent, it is judged as a qualified product; when the identified inner frame paper is consistent with the defect type in the sample library, it is determined to be an unqualified product. At this time, the inner frame paper quality defect type is output, and an alarm is sent and a rejection signal is generated to the judgment output module. The judgment and output module makes corresponding judgments, such as judging whether there is a defect in the inner frame paper of the cigarette package, and outputs the result. The detection result is transmitted to the main program in the form of a signal, so that the main program controls the user interface to display the detection result. When a defect in the inner frame paper of the cigarette package is detected, the main program controls the equipment action on site, and the system automatically issues a prompt message or sends a rejection instruction to the preset rejection mechanism after determining the defect point. According to the rejection instruction, the cigarette pack is rejected by the rejection mechanism.

[0078] Preferably, according to the results of real-time detection, when the rejected defective products do not belong to the defect type, or are null, the image is retained and stored in the cigarette pack image storage block, and the staff is reminded to update the cigarette pack sample set, retrain, and update the sample set stored in the initial sample library for inner frame paper quality defect detection. In this way, new data can be continuously collected and the training model can be relearned, new defect types can be reloaded, and the defect types in the learner can be updated to adapt to new situations and new defect types that may occur in the production process.

[0079] according to Figure 2 The present invention provides a device for detecting the quality of inner frame paper of a cigarette pack, which is used to perform any one of the above-mentioned methods for detecting the quality of inner frame paper of a cigarette pack, and the detection device comprises:

[0080] 1. IPC control module: The core of this module is the programmable logic controller (PLC), which is responsible for the logic control and data processing of the entire detection system. The PLC controller is connected to the industrial computer and the encoder signal respectively. The encoder is set on the main shaft of the packaging machine and is used to detect the rotation phase of the packaging machine in real time; the position information provided by the encoder is used to trigger the high-sensitivity CMOS camera to capture the image at the right time to achieve accurate online detection. Specifically: when the inner frame cigarette pack passes through the high-sensitivity CMOS camera, the encoder sends a trigger signal to the high-sensitivity CMOS camera at a predetermined phase angle (80-120 degrees). After receiving the trigger signal, the high-sensitivity CMOS camera can respond in time and capture the inner frame paper image; at this time, the A / B phase pulse signal of the encoder is stably and undisturbedly transmitted to the PLC, and the high-speed counter of the PLC is correctly configured to read the pulse signal of the encoder to control the industrial computer to receive the inner frame paper image.

[0081] 2. Receiving module: When the production line or operator presses the start button, the machine starts running and the detection starts working. The receiving module can stably receive the detection signal from the production line or operator through the physical interface under the electromagnetic interference that may exist in the industrial environment. After receiving the valid detection signal, the system can automatically start the quality inspection process of the inner frame paper of the cigarette package.

[0082] 3. Cigarette pack image acquisition module: The inner frame paper detection uses 2 high-sensitivity CMOS cameras, 2 lenses, and 8 LED light sources. When the two cigarette packs are shifted to the corresponding shooting position of the high-sensitivity CMOS camera, the high-sensitivity CMOS camera receives the encoder shift trigger signal, and the two CCD high-sensitivity CMOS cameras synchronously collect the inner frame paper image when receiving the signal. The synchronization is due to the high-sensitivity CMOS camera accurately triggering when the cigarette pack is shifted to the corresponding shooting position, and the two lenses are activated to enlarge the inner frame paper to collect the image; at this time, in order to ensure uniform lighting, the two high-sensitivity CMOS cameras are equipped with 8 LED light sources to detect the inner frame paper of the small box hard pack in the two mold boxes, and then capture the image data of the inner frame paper of the cigarette pack in real time. The setting of the LED light source should avoid the mirror reflection light that causes halo, and at the same time be able to highlight the edge and characteristics of the inner frame paper. Therefore, the high-sensitivity CMOS camera is installed 15cm above the 703 folding turret track and close to the side of the cardboard conveying (machine phase 120°), and is installed and fixed at a downward tilt of 45 degrees.

[0083] 4. Image preprocessing module: preprocess the collected inner frame paper image data through grayscale, binarization, denoising, contrast enhancement and distortion correction steps to improve the image quality to improve the efficiency and accuracy of subsequent processing for subsequent feature extraction and model detection.

[0084] Step 1: Grayscale conversion converts the color image into a grayscale image to simplify data processing, where 0-255 is set as the grayscale interval, and each color pixel P (x, y) will be converted to a value between 0-255.

[0085] Step 2: Binarization converts the grayscale image into a binary image to highlight the area of ​​interest. The selection method is the double fixed threshold method. The threshold T1 of the binarization is set to 60 and the threshold T2 is set to 150. When the grayscale pixel is greater than or equal to 150, it is directly set to 0; when the grayscale pixel is less than or equal to 60, it is directly set to 0; when the grayscale pixel is greater than 60 and less than 150, it is defined as 255; after binarization, the final result is a binary image;

[0086]

[0087] Step 3: De-noising uses a median filter to remove noise from the image and retain edge information. When filtering a binary sequence p, we must first define an odd-length L-long window, L=2N+1, where N is a positive integer. Suppose at a certain moment, the signal samples in the window are p(iN), ..., p(i), ..., p(i+N), where p(i) is the signal sample value at the center of the window. After arranging these L signal sample values ​​in ascending order, the median value, the sample value at i, is defined as the output value X of the median filter:

[0088] X(i)=Med+(p(iN),…p(i),…p(i+N)).

[0089] Step 4: Enhance contrast Use the histogram equalization method to adjust the grayscale range of the image so that the brightness difference between different areas in the image is more obvious, which is convenient for subsequent feature extraction. First, consider a continuous function and let the variable X represent the grayscale of the image to be enhanced. Assume that it is normalized to the interval [0, 1], and r = 0 represents black and r = 1 represents white. Then consider a discrete formula and allow the pixel value to be in the interval [0, L-1]. For a continuous function, assume that its transformation function is:

[0090] s=T(r), 0=<r<=1

[0091] In the original image, a gray value s is generated for each pixel value X. The number of pixels at each gray level in the original input image is counted as X i , i = 0, 1, ... L-1, where L is the total number of gray levels; calculate the histogram of the original image, that is, the probability density p of each gray level i (r i )=n i / n, n is the total number of pixels in the original image; calculate the cumulative distribution function Calculate the final output grayscale:

[0092] g k =INT[(g max -g min )s k (r k )+g min +0.5] / (L-1)

[0093] Where INT[] is the integer operator, where k = 0, 1..., L-1. Let g min =0,g max =L-1, the calculation formula is simplified to:

[0094] g k =INT[(L-1)s k (r k)+0.5] / (L-1)

[0095] Using the mapping relationship between fk (grayscale function of the original image) and gk, the grayscale of the original image is modified to obtain an output image whose histogram is approximately uniformly distributed.

[0096] Step 5: Correct distortion. Correct image distortion caused by factors such as high-sensitivity CMOS camera lenses, such as distortion and perspective distortion. Given the distorted image g(x', y'), find the original image f(x, y) to satisfy the relationship:

[0097]

[0098] Among them, h1(x, y) and h2(x, y) can be approximated by polynomials as Where N is the degree of the polynomial, a ij , b ij are the unknown coefficients of the respective terms. When N = 1, x' = ax + by + c, y' = dx + ey + f.

[0099] 5. Quality defect identification and classification module: Deploy the trained deep learning model to perform quality inspection on the processed images. This module can automatically analyze the image features and determine whether there are defects in the inner frame paper of the cigarette package and the type of defects such as displacement, skew, damage, missing inner frame paper, stains, etc.

[0100] Feature extraction includes edge detection and texture features. The Canny operator of the edge detection algorithm is used to find the edge contours of objects in the image with inner frame paper displacement, skewness, and damage. The image is subjected to Gaussian filtering, gradient amplitude calculation, non-maximum will and double threshold processing to obtain edge results. The gradient amplitude calculation solves the gradient amplitude and direction by taking partial derivatives, and then uses the finite difference of the first-order partial derivative in the neighborhood to calculate the gradient amplitude and direction. The change of grayscale value in the neighborhood around the pixel point is represented by the gradient amplitude, and the gradient direction represents the grayscale value, where θ(x, y) represents the gradient direction.

[0101]

[0102]

[0103] Where: x is the horizontal coordinate of the pixel, y is the vertical coordinate of the pixel; x (x, y) is the horizontal gradient, reflecting the change in the horizontal direction; p y (x, y) is the vertical gradient, reflecting the change in the vertical direction; P(x, y) is the gradient amplitude, and θ(x, y) is the gradient direction;

[0104] For non-maximum suppression, it is necessary to perform it for each pixel in the gradient magnitude matrix P(x, y), calculate the two neighborhood gradient magnitudes along the gradient direction in the surrounding neighborhood, and compare them with the gradient magnitude of the pixel point. If the pixel point has the largest gradient magnitude, it is retained as an edge point, otherwise the gradient magnitude of the pixel point is set to 0;

[0105] For dual threshold detection, the pixel in P(x, y) is compared with the threshold. If the pixel is greater than Th, it is marked as a strong edge point. If the pixel is less than Th, it is marked as a non-edge point. If the pixel is between the two thresholds, it is marked as a weak edge point. For all weak edge points, if there is any strong edge point in the 8 surrounding neighborhoods, it will be re-marked as a strong edge point; otherwise, it will be marked as a non-edge point. Finally, all pixels marked as strong edge points are considered to be edge points in the image.

[0106] The texture feature extraction uses the inner frame paper stain texture to analyze the grayscale co-occurrence matrix, and constructs a matrix by calculating the co-occurrence frequency of the grayscale values ​​of the pixel pairs in the image. Then, a variety of statistical features are extracted from this matrix, such as energy, entropy, contrast, uniformity, and correlation, etc., to extract the texture features of the image and describe the spatial distribution law of the pixel grayscale in the image. The grayscale co-occurrence matrix normalizes the grayscale value and gradient value of each pixel point in the image, and counts the number of pixels m=P(x, y) and n=T(x, y) in the normalized grayscale matrix P(x, y) and the normalized gradient matrix T(x, y). The corresponding number of pixels is filled in with m and n as the rows and columns of the matrix, and the grayscale gradient co-occurrence matrix h(m, n) is obtained. The grayscale gradient co-occurrence matrix is ​​normalized so that the sum of its elements is 1;

[0107]

[0108] In the formula, p X is the maximum grayscale value of the image, p(x, y) is the grayscale value of the current pixel (x, y), t X is the maximum gradient value of the image, and t(x, y) is the gradient value of the current pixel (x, y). Different distances and directions can be selected to obtain multiple gray-level co-occurrence matrices.

[0109] The gray-level co-occurrence matrix is ​​a symmetric matrix. If the texture is rough, the non-zero elements of the gray-level co-occurrence matrix will be concentrated near the main diagonal; if the texture is fine, the gray-level co-occurrence matrix is ​​more dispersed. Based on this, if there is stain on the inner frame paper, the gray-level co-occurrence matrix will have non-zero elements concentrated near the main diagonal.

[0110] Identification and classification: compare the extracted features with the known standard template, set the accuracy to 0.00001, and generate a sample library after multiple iterations when the accuracy requirement is not met. When the satisfactory accuracy requirement is met after multiple iterations, the sample library is retained at this time; when the inner frame paper passes through the set phase during machine operation, the sample library is matched according to the support vector machine deep learning. When the inner frame paper is identified as consistent with the qualified product, that is, when the feature points are all in line, it is judged as a qualified product; when the identified inner frame paper is consistent with the defect type in the sample library, it is determined to be an unqualified product. At this time, the inner frame paper quality defect type is output, and an alarm is sent and a rejection signal is generated to the judgment output module. The judgment and output module makes corresponding judgments, such as judging whether there is a defect in the inner frame paper of the cigarette package, and outputs the result. The detection result is transmitted to the main program in the form of a signal, so that the main program controls the user interface to display the detection result. When a defect in the inner frame paper of the cigarette package is detected, the main program controls the equipment action on site, and the system automatically issues a prompt message or sends a rejection instruction to the preset rejection mechanism after determining the defect point. According to the rejection instruction, the cigarette package is rejected by the rejection mechanism.

[0111] 6. Alarm and processing module: When the inner frame paper is detected to be displaced, skewed, missing, or stained, the module will send out an alarm signal to notify the operator or automatic control system to intervene and may trigger corresponding processing measures. The processing measures that may be triggered include stopping the production line, marking defective products and removing them, etc., to ensure product quality.

[0112] 7. Data storage and transmission module: used to store image data and results during the detection process, including original images, processed images and detection results, and supports remote transmission and sharing of data. This helps with subsequent data analysis and model optimization, and may include database interfaces, network interfaces, etc. to meet different data management and analysis needs.

[0113] In summary, the device realizes rapid and accurate detection of the quality of the inner frame paper of cigarette packs through IPC control module, receiving module, high-sensitivity CMOS camera acquisition module, image preprocessing, quality defect recognition and classification module, alarm and processing, data storage and transmission and other functional modules, and each module is electrically connected. This integrated solution not only improves the detection efficiency, but also enhances the flexibility and scalability of the system, providing a strong quality assurance for the production of tobacco products.

[0114] According to the above-mentioned embodiments of the present invention, the present invention provides a system for detecting the quality of inner frame paper of cigarette packs, the detection system comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for detecting the quality of inner frame paper of cigarette packs described in any one of the above-mentioned methods is implemented.

[0115] The present invention also provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the detection method for the inner frame paper of a cigarette package described in any one of the above is implemented. The detection process and result data of the device can be stored through an internal storage medium. These storage media may include a hard disk, a solid-state drive (SSD) or other forms of non-volatile memory. The stored data may include original images, processed images, defect identification results, and operation logs. These data are of great significance for subsequent cigarette package production quality control, product traceability, and equipment maintenance. In addition, in order to ensure the security and integrity of the data, the device can also provide data backup and recovery functions.

[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0117] It should be understood that the above is only an example and does not constitute any limitation on the technical solution of the present invention. In specific applications, technicians in this field can make settings as needed, and the present invention does not limit this.

[0118] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of the present invention. In practical applications, technicians in this field can select part or all of them according to actual needs to achieve the purpose of the present embodiment, and no limitation is made here.

[0119] In addition, for technical details not fully described in this embodiment, reference can be made to the method for detecting the inner frame paper of a cigarette package provided in any embodiment of the present invention, and will not be repeated here.

[0120] In addition, it should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0121] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0122] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for detecting the quality of inner frame paper of cigarette packs of a packaging machine, characterized in that: The following steps are involved: Step 1, after receiving the start of the inner frame paper quality detection system of the packaging machine to be detected, when the 16 mold boxes of the high-speed hard box packaging machine start to rotate to a fixed angle, triggering the detection signal of the inner frame paper of the small package, collect, obtain and grayscale the real-time image of the inner frame paper of the cigarette package; Step 2: Binarization converts the grayscale image into a binary image, highlighting the areas where the inner frame paper of the cigarette package is displaced, skewed, damaged, missing, or stained; Step 3, using a median filter to remove noise in the image, retaining edge information of the image where the inner frame paper is shifted, skewed, damaged, missing, or stained; Step 4, contrast enhancement: using a histogram equalization method to adjust the grayscale range of the features of the inner frame paper displacement, skew, damage, missing, and inner frame paper stains image, so that the brightness difference between different areas in the image is more obvious, which is convenient for subsequent feature extraction; Step 5, feature extraction, extracting texture features from the preprocessed cigarette pack inner frame paper image and performing edge detection, and putting the bright features of the image into a comparison library for real-time image comparison; Step 6, image analysis and recognition, uses deep learning algorithms to analyze and compare the extracted features, and matches them with pre-set templates to determine whether the inner frame paper of the cigarette package meets the requirements or identify the category and state of the object; according to the support vector machine, the displacement, skew, and damaged edge features of the inner frame paper and the texture features of the inner frame paper are combined to provide a more comprehensive image description and improve the performance of image processing tasks, thereby determining the category to which the object belongs. It maps the data to a high-dimensional space and finds a hyperplane with the largest interval in the space to separate positive and negative samples, maximize the distance between sample distributions, ensure the difference between positive and negative samples, and reduce classification errors; the images are divided into training sets and validation sets and marked as qualified as data sets, and the trained model is used to detect unqualified products on the test set, and finally the classification accuracy and precision are obtained.

2. The method according to claim 1, characterized in that Step 2 also includes: Step 2.1, convert the color image into a grayscale image; Step 2.2, convert the grayscale image into a binary image to highlight the area of ​​interest. The selection method is the double fixed threshold method. Set the binarization threshold T1 to 60 and the threshold T2 to 150. When the grayscale pixel is greater than or equal to 150, it is directly set to 0; when the grayscale pixel is less than or equal to 60, it is directly set to 0; when the grayscale pixel is greater than 60 and less than 150, it is defined as 255; after binarization, the final result is a binary image; Step 2.3: Use a median filter to remove noise from the image and retain edge information.

3. The method according to claim 1, characterized in that Step 4 also includes: First, consider a continuous function and let the variable X represent the gray level of the features of the image of the inner frame paper displacement, skew, damage, missing, and inner frame paper stains to be enhanced, assuming that it is normalized to the interval [0,1], and r=0 represents black and r=1 represents white; Then consider a discrete formula and allow the pixel value to be in the interval [0, L-1]. For the continuous function, assume that its transformation function is: s=T(r),0= <r<=1 In the original image, a gray value s is generated for each pixel value X; Count the number of pixels at each gray level of the original input image as X i , i=0,1,...L-1, where L is the total number of gray levels; Calculate the probability density ρ of each gray level of the original image i (r i )=n i / n, n is the total number of pixels in the original image; calculate the cumulative distribution function Calculate the final output gray level g k : g k =INT[(g max -g min )s k (r k )+g min +0.5] / (L-1) Where INT[] is the integer operator, k = 0, 1..., L-1; let g min =0,g max =L-1, the calculation formula is simplified to: g k =INT[(L-1)s k (r k )+0.5] / (L-1) Use the grayscale function of the original image and g k The mapping relationship is used to modify the grayscale of the original image and obtain an output image whose histogram is approximately uniformly distributed.

4. The method according to claim 1, characterized in that: In step 5, edge detection includes: The edge detection algorithm Canny operator is used to perform Gaussian filtering, gradient amplitude calculation, non-maximum will and double threshold processing on the image to obtain the edge result; The gradient amplitude calculation includes solving the gradient amplitude and direction by taking partial derivatives, and then calculating the gradient amplitude and direction by using the finite difference of the first-order partial derivative in the neighborhood, the grayscale value change in the neighborhood around the pixel point is represented by the gradient amplitude, and the gradient direction represents the grayscale value; Where: x is the horizontal coordinate of the pixel, y is the vertical coordinate of the pixel; x (x, y) is the horizontal gradient, reflecting the change in the horizontal direction; p y (x, y) is the vertical gradient, reflecting the change in the vertical direction; P(x, y) is the gradient amplitude, and θ(x, y) is the gradient direction; For non-maximum suppression, it is necessary to perform it for each pixel in the gradient magnitude matrix P(x, y), calculate the two neighborhood gradient magnitudes along the gradient direction in the surrounding neighborhood, and compare them with the gradient magnitude of the pixel point. If the gradient magnitude of the pixel point is the largest, it is retained as an edge point, otherwise the gradient magnitude of the pixel point is set to 0; The dual threshold detection includes comparing the pixel point in P(x, y) with the threshold Th. If the pixel point is greater than Th, it is marked as a strong edge point; if the pixel point is less than Th, it is marked as a non-edge point; if the pixel point is between the two thresholds, it is marked as a weak edge point; for all weak edge points, if there is any strong edge point in the 8 neighborhoods around it, it is re-marked as a strong edge point; otherwise, it is marked as a non-edge point; finally, all pixel points marked as strong edge points are considered to be edge points in the image.

5. The method according to claim 1, characterized in that In step 5, extracting texture features includes: Using texture analysis grayscale co-occurrence matrix, the matrix is ​​constructed by calculating the co-occurrence frequency of the grayscale values ​​of pixel pairs in the image, and then energy, entropy, contrast, uniformity and correlation are extracted from this matrix to extract the texture features of the image; The gray level co-occurrence matrix includes: Normalize the grayscale value and gradient value of each pixel in the image, count the number of pixels with m = P(x, y) and n = T(x, y) in the normalized grayscale matrix P(x, y) and normalized gradient matrix T(x, y), fill the corresponding number of pixels with m and n as the rows and columns of the matrix, and obtain the grayscale gradient co-occurrence matrix h(m, n), and normalize the grayscale gradient co-occurrence matrix so that the sum of its elements is 1; In the formula, p X is the maximum gray value of the image, p(x,y) is the gray value of the current pixel (x,y), t X is the maximum gradient value of the image, and t(x,y) is the gradient value of the current pixel (x,y).

6. The method according to claim 1, characterized in that In step 6, template matching includes calculating similarity based on a support vector machine and determining whether there is a match based on the similarity.

7. The method according to any one of claims 1 to 6, characterized in that: Also includes: Step 7, judgment and output, judging whether there is a defect in the inner frame paper of the cigarette pack according to the results of image analysis and recognition, and outputting the result, and transmitting the detection result to the main program in the form of a signal, so that the main program controls the user interface to display the detection result; when a defect in the inner frame paper of the cigarette pack is detected, the main program controls the equipment action on site, and the system automatically issues a prompt message or sends a rejection instruction to the preset rejection mechanism after determining the defect point; according to the rejection instruction, the cigarette pack is rejected by the rejection mechanism; Based on the results of real-time detection, new data is continuously collected and the training model is relearned, new defect types are reloaded, and the defect types in the learner are updated.

8. A device for detecting the quality of inner frame paper of cigarette packs of a packaging machine, used to implement the method for detecting the quality of inner frame paper of cigarette packs of a packaging machine according to any one of claims 1 to 7, the detection device comprising: The IPC control module includes a PLC controller, an industrial computer and an encoder. The PLC controller is respectively connected to the industrial computer and the encoder signal. The encoder is arranged on the main shaft of the packaging machine and is used to detect the rotation phase of the packaging machine in real time. A receiving module, used for receiving a detection signal for the inner frame paper of the cigarette pack; Cigarette pack image acquisition module: when the inner frame paper reaches a fixed position, the inner frame paper receives the encoder shift trigger signal and takes pictures of the two mold boxes of the packaging machine to capture the image data of the inner frame paper of the cigarette pack in real time; The image preprocessing module is used to preprocess the collected image data to make the original image information more prominent; The quality defect recognition and classification module uses edge features and texture features to build a sample library of inner frame paper displacement, skew, damage, missing, and inner frame paper stain defects, deploys a trained deep learning model, and performs quality inspection on processed images; An alarm and processing module, used to send out an alarm signal when a defect is detected; The data storage and transmission module is used to store image data and results during the detection process, and supports remote transmission and sharing of data.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting the quality of the inner frame paper of a cigarette pack of a packaging machine as described in any one of claims 1 to 7 are implemented.

10. A cigarette pack inner frame paper quality detection system for a packaging machine, comprising a processor and a computer-readable storage medium as claimed in claim 9.

Citation Information

Patent Citations

  • Cigarette packet seal defect detecting system based on image identification technology

    CN103512888A

Cited By

  • Thermosensitive label paper cutting quality identification method, system and equipment and medium

    CN120526195A