Cigarette packet appearance detection system, method, equipment and medium

The automatic detection of cigarette pack appearance defects by image acquisition and processing devices solves the problems of slow manual inspection and missed detection, achieving efficient and accurate cigarette pack appearance inspection and ensuring product quality.

CN120964159APending Publication Date: 2025-11-18HONGYUN HONGHE TOBACCO (GRP) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511088335.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In the existing technology, when staff randomly select cigarette packs from multiple packs to inspect their appearance, the low speed of manual inspection leads to low inspection efficiency and a high risk of missed inspections, which affects product quality and user experience.

Method used

Using an image acquisition device and an image processing device, the device automatically detects defects in the appearance of cigarette packs through image acquisition, preprocessing, feature extraction and recognition. When the recognition result is a defect, it is sent to the control device for processing, including automatic rejection of defective cigarette packs and alarm function.

Benefits of technology

This improved the efficiency and accuracy of cigarette pack appearance inspection, reduced missed and false detections, ensured the reliability and consistency of product quality, and enabled timely handling of defective products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120964159A_ABST
    Figure CN120964159A_ABST
Patent Text Reader

Abstract

The invention discloses a cigarette packet appearance detection system, method and equipment and a medium. The system comprises an image acquisition device, a control device and an image processing device, the image acquisition device is mounted on the mounting frame, and the mounting frame is mounted right above the tobacco bale group mold box in parallel; the image acquisition device comprises an image acquisition unit and an illumination unit, the illumination unit is used for irradiating the cigarette packet group, and the image acquisition unit is used for acquiring an acquisition image of a detection surface of the cigarette packet group; the image processing device is used for preprocessing the acquired image to obtain a preprocessed image; the image processing device is also used for performing feature extraction on the preprocessed image to obtain data features, performing image recognition to obtain a recognition result, and sending the recognition result to the control device; and the control device is used for sending the collected image corresponding to the identification result to the target user equipment when the identification result is the appearance defect of the cigarette packet. According to the scheme, missing detection and false detection caused by manual detection are reduced, and the detection efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of cigarette packet appearance detection, and particularly relates to a cigarette packet appearance detection system, method, device and medium. BACKGROUND

[0002] The production process of a cigarette carton package refers to a production process that first performs the packaging of a cigarette through a packaging machine to form a cigarette packet by using inner liner paper, trademark paper, card paper and a seal, then performs transparent paper packaging of the cigarette packet, and then fills the cigarette packet into a prefabricated carton package to form a carton cigarette. During the transportation and track changing of a cigarette packet group with five packets of cigarettes as a group, the cigarette packet is easily pressed by a push head or a baffle by accident, so that the cigarette packet is wrinkled or damaged.

[0003] At present, a worker randomly selects a cigarette packet from multiple cigarette packets after the cigarette packet group passes through a packaging machine to fill a prefabricated carton, and then detects the appearance of the cigarette packet.

[0004] However, when the worker randomly selects a cigarette packet from multiple cigarette packets to detect the appearance of the cigarette packet, the detection speed is low during manual detection, so that the detection efficiency is not high, and the defective products flow into the market during manual detection, which affects the user experience. SUMMARY

[0005] The present application provides a cigarette packet appearance detection system, method, device and medium to solve the problem that the detection speed is low during manual detection when a worker randomly selects a cigarette packet from multiple cigarette packets to detect the appearance of the cigarette packet in the prior art, so that the detection efficiency is not high, and the defective products flow into the market during manual detection, which affects the user experience.

[0006] In a first aspect, the present application provides a cigarette packet appearance detection system, which comprises an image acquisition device, a control device and an image processing device; wherein the image processing device is electrically connected with the image acquisition device, and the image acquisition device and the image processing device are both electrically connected with the control device, the image acquisition device is installed on a mounting rack, and the mounting rack is installed in parallel above a cigarette packet group mold box.

[0007] The image acquisition device comprises an image acquisition unit and an illumination unit, the illumination unit is used to irradiate a cigarette packet group after receiving an acquisition instruction sent by the control device, and the image acquisition unit is used to acquire an acquisition image of a detection surface of the cigarette packet group after receiving an acquisition instruction sent by the control device.

[0008] The image processing device is used to receive the acquisition image sent by the image acquisition device, and to pre-process the acquisition image to obtain a pre-processed image.

[0009] The image processing apparatus is further configured to perform feature extraction on the preprocessed image to obtain data features of the preprocessed image, perform image recognition according to the data features of the preprocessed image to obtain a recognition result, and send the recognition result to the control apparatus; wherein the recognition result includes normal appearance of the cigarette packet and appearance defects of the cigarette packet.

[0010] The control apparatus is configured to send the captured image corresponding to the recognition result to a target user device when the recognition result is an appearance defect of the cigarette packet.

[0011] In a second aspect, the present application provides a cigarette packet appearance detection method applied to an image processing apparatus of a cigarette packet appearance detection system, and the method comprises the following steps:

[0012] receiving a captured image sent by an image capturing apparatus, and preprocessing the captured image to obtain a preprocessed image;

[0013] performing feature extraction on the preprocessed image to obtain data features of the preprocessed image, performing image recognition according to the data features of the preprocessed image to obtain a recognition result, and sending the recognition result to a control apparatus, so that the control apparatus sends the captured image corresponding to the recognition result to a target user device when the recognition result is an appearance defect of the cigarette packet; wherein the recognition result includes normal appearance of the cigarette packet and appearance defects of the cigarette packet.

[0014] In a third aspect, the present application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the program to realize the cigarette packet appearance detection method according to the second aspect of the present application.

[0015] In a fourth aspect, the present application further provides a computer readable storage medium, which stores a computer program executable by a processor to realize the cigarette packet appearance detection method according to the second aspect of the present application.

[0016] In a fifth aspect, the present application provides a computer program product comprising a computer program executable by a processor to realize the cigarette packet appearance detection method according to the second aspect of the present application.

[0017] The scheme of the present application, the cigarette packet appearance detection system comprises an image acquisition device, a control device and an image processing device; wherein the image processing device is electrically connected with the image acquisition device, and the image acquisition device and the image processing device are both electrically connected with the control device; the image acquisition device is installed on a mounting rack, and the mounting rack is installed in parallel above the cigarette packet group mold box; the image acquisition device comprises an image acquisition unit and an illumination unit; the illumination unit is used for irradiating the cigarette packet group after receiving the acquisition instruction sent by the control device; the image acquisition unit is used for acquiring the acquisition image of the detection surface of the cigarette packet group after receiving the acquisition instruction sent by the control device; the image processing device is used for receiving the acquisition image sent by the image acquisition device, and pre-processing the acquisition image to obtain a pre-processed image; the image processing device is also used for extracting the data features of the pre-processed image to obtain the recognition result, and sending the recognition result to the control device; wherein the recognition result comprises the normal appearance of the cigarette packet and the appearance defect of the cigarette packet; the control device is used for sending the acquisition image corresponding to the recognition result to the target user equipment when the recognition result is the appearance defect of the cigarette packet. That is, the scheme of the present application acquires the image of the cigarette packet through the image acquisition device, realizes the detection of the appearance defect of the cigarette packet through the image processing device, obtains the recognition result of determining whether the appearance of the cigarette packet has defects, avoids the situation that the detection speed is low and the detection efficiency is not high when artificial detection, reduces the missed detection and the false detection caused by artificial detection, improves the detection efficiency and the detection accuracy, and can feed back the detection result to the staff, so as to facilitate the timely processing of defective products. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0019] Figure 1 is a structural schematic diagram of the cigarette packet appearance detection system provided by the present application;

[0020] Figure 2a is another structural schematic diagram of the cigarette packet appearance detection system provided by the present application;

[0021] Figure 2b is an exemplary structural schematic diagram of the image acquisition device of the cigarette packet appearance detection system provided by the present application;

[0022] Figure 3 is a flow schematic diagram of the cigarette packet appearance detection method provided by the present application;

[0023] Figure 4is a structural schematic diagram of an electronic device provided by the present application;

[0024] Reference signs:

[0025] 1-industrial camera; 2-light emitting diode light source; 3-tobacco packet group mold box; 4-lens; 5-push head; 6-tobacco packet group; 7-baffle. DETAILED DESCRIPTION

[0026] In order for those skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.

[0027] Figure 1 is a structural schematic diagram of a tobacco packet appearance detection system 01 provided by the present application, which can be applied to detecting the appearance defects of tobacco packets when the packaging machine for packaging the tobacco packets is running. As shown in Figure 1 , the tobacco packet appearance detection system 01 comprises an image acquisition device 102, a control device 101 and an image processing device 103.

[0028] Among them, the image processing device 103 is electrically connected with the image acquisition device 102, and the image acquisition device 102 and the image processing device 103 are both electrically connected with the control device 101, the image acquisition device 102 is installed on the mounting bracket, and the mounting bracket is installed in parallel above the tobacco packet group mold box.

[0029] The image acquisition device 102 comprises an image acquisition unit 1201 and an illumination unit 1202, the illumination unit 1202 is used for irradiating the tobacco packet group after receiving the acquisition instruction sent by the control device 101, and the image acquisition unit 1201 is used for acquiring the acquisition image of the detection surface of the tobacco packet group after receiving the acquisition instruction sent by the control device 101.

[0030] The image processing device 103 is used for receiving the acquisition image sent by the image acquisition device 102, and pre-processing the acquisition image to obtain a pre-processed image.

[0031] The image processing device 103 is also used for extracting the data features of the pre-processed image to obtain the data features of the pre-processed image, and performing image recognition according to the data features of the pre-processed image to obtain a recognition result, and sending the recognition result to the control device 101. Among them, the recognition result includes normal appearance of tobacco packet and appearance defect of tobacco packet.

[0032] The control device 101 is configured to send the captured image corresponding to the identification result to a target user equipment when the identification result is a cigarette package appearance defect.

[0033] Specifically, the captured instruction sent by the control device 101 is an instruction sent by the control device 101 to the image capturing device 102 after the cigarette package appearance detection system 01 starts running. The cigarette package appearance detection system 01 can start running after the control device 101 receives a running start instruction sent by a user to the control device 101 through an interactive device such as a touch screen. The image capturing device 102 includes an image capturing unit 1201 and an illumination unit 1202, and is installed on a mounting rack parallel to the top of the cigarette package group mold box. Therefore, the image captured by the image capturing device 102 is an image of the top of the cigarette package. After receiving the captured instruction sent by the control device 101, the illumination unit 1202 irradiates the cigarette package group to improve the quality of image capturing by a bright light source. The image capturing unit 1201 is configured to capture the captured image of the detection surface of the cigarette package group.

[0034] The image processing device 103 receives the captured image sent by the image capturing device 102 and pre-processes the captured image to obtain a pre-processed image. For example, the pre-processing process can include data screening, gray scale conversion, filter denoising, and enhancement of the range of surface defects of the captured image, so as to facilitate faster extraction of defect features. The image processing device 103 is also configured to extract features from the pre-processed image to obtain data features of the pre-processed image. The feature extraction method can use various image processing techniques, such as edge detection, texture analysis, feature extraction, etc. to obtain the data features of the pre-processed image.

[0035] The image processing device 103 also performs image recognition according to the data features of the pre-processed image to obtain an identification result, and sends the identification result to the control device 101. For example, the data features of the pre-processed image are extracted to obtain the data features of the pre-processed image, and then the data features of the pre-processed image are sent to a pre-trained image recognition model to obtain the identification result. The image recognition model can be a model obtained by training various cigarette package defect images in a database. The identification result includes a normal cigarette package appearance and a cigarette package appearance defect. When the identification result is a cigarette package appearance defect, the control device 101 sends the captured image corresponding to the identification result to a target user equipment for staff to view.

[0036] Optionally, the image processing device 103 is configured to perform gray scale conversion on the captured image to obtain a pre-processed image.

[0037] The image processing device 103 is configured to extract features from the pre-processed image to obtain data features of the pre-processed image, and obtain an identification result according to the data features of the pre-processed image and an identification model in a pre-set model library.

[0038] Specifically, the gray scale transformation is to convert the collected color image into a gray scale image to reduce the data amount and highlight the features of the image. The gray scale transformation is first performed by using a power transformation to expand the gray scale value range of the image to improve the contrast of the image, which can be implemented by formula 1.

[0039] s = c x r γ Formula 1

[0040] Wherein, s is the pixel gray scale value of the output image, r is the pixel gray scale value of the input image, c is a constant for adjusting the gray scale range, and γ is the power for adjusting the contrast of the image.

[0041] After the gray scale transformation, a preprocessed image can be obtained, or the image after the gray scale transformation is subjected to Gaussian filter denoising to obtain a preprocessed image. The Gaussian filter denoising can be implemented by formula 2.

[0042]

[0043] Wherein, δ is the standard deviation, x is a one-dimensional image signal, and G(x, y) represents the Gaussian filter denoising result value of the image after the gray scale transformation at the point (x, y).

[0044] Then, the preprocessed image is subjected to feature extraction to obtain features that can represent the texture, edge, shape and other information of the image. Support vector machine can be used for feature extraction to establish a data group model, and then the image signal of the data group model established after feature extraction is decomposed using the variational mode decomposition method to extract the feature information of each mode component, and then the data features of the preprocessed image are obtained. Support vector machine is a supervised learning model for classification and regression analysis, and is widely used in feature extraction and classification tasks in image processing. The variational mode decomposition method is a signal processing method for decomposing complex signals into multiple mode components. The variational mode decomposition method first decomposes the signal into k mode function analytical signals using Hilbert transform. It can be considered that the limited bandwidth of each mode signal has a center frequency, so it can be seen that each mode has its own center frequency and limited bandwidth, and the sum of the estimated bandwidth of each mode is minimized. The calculation formula of the variational mode decomposition method is shown in formula 3.

[0045]

[0046] Wherein, ω is the normal vector of the hyperplane, α * is the optimal solution, ω * represents the optimal solution of the normal vector of the hyperplane, b represents the constant of the hyperplane, and b * is the optimal solution of the constant of the hyperplane, and x and y represent a point on the line.

[0047] The image processing apparatus 103 obtains the recognition result according to the data feature of the preprocessed image and the recognition model in the preset model library. The preset model library is a model library for recognizing the appearance defects of the cigarette packets pre-stored in the system, and the recognition model in the model library contains the image feature information of the cigarette packets with normal appearance and the cigarette packets with defect appearance. The image processing apparatus 103 matches the extracted data feature with the recognition model in the preset model library to determine the category of the image, wherein the category of the image includes the normal appearance of the cigarette packet or the appearance defect of the cigarette packet. According to the matching result, the image processing apparatus 103 obtains the recognition result. Through the gray scale transformation and the data feature extraction, the image can be quickly processed and the appearance defects of the cigarette packets can be recognized, and the matching with the preset model library further improves the accuracy and reliability of the recognition.

[0048] The scheme provided in the present application, the cigarette packet appearance detection system includes an image acquisition apparatus, a control apparatus and an image processing apparatus; wherein the image processing apparatus is electrically connected with the image acquisition apparatus, and the image acquisition apparatus and the image processing apparatus are both electrically connected with the control apparatus; the image acquisition apparatus is installed on a mounting rack, and the mounting rack is installed in parallel above the cigarette packet group mold box; the image acquisition apparatus includes an image acquisition unit and an illumination unit; the illumination unit is used for irradiating the cigarette packet group after receiving the acquisition instruction sent by the control apparatus; the image acquisition unit is used for acquiring the acquisition image of the detection surface of the cigarette packet group after receiving the acquisition instruction sent by the control apparatus; the image processing apparatus is used for receiving the acquisition image sent by the image acquisition apparatus, and pre-processing the acquisition image to obtain a preprocessed image; the image processing apparatus is also used for extracting the feature of the preprocessed image to obtain the data feature of the preprocessed image, and performing image recognition according to the data feature of the preprocessed image to obtain a recognition result, and sending the recognition result to the control apparatus; wherein the recognition result includes the normal appearance of the cigarette packet and the appearance defect of the cigarette packet; the control apparatus is used for sending the acquisition image corresponding to the recognition result to the target user equipment when the recognition result is the appearance defect of the cigarette packet. That is, the scheme provided in the present application acquires the image of the cigarette packet through the image acquisition apparatus, realizes the detection of the appearance defect of the cigarette packet through the image processing apparatus, obtains the recognition result of determining whether the appearance of the cigarette packet has defects, avoids the situation that the detection efficiency is not high due to the low detection speed in manual detection, reduces the missed detection and the false detection caused by manual detection, improves the detection efficiency and the detection accuracy, and can feed back the detection result to the staff, so as to facilitate the timely processing of the defective products.

[0049] Figure 2a is another structural schematic view of the cigarette packet appearance detection system 01 provided in the present application. On the basis of the above-mentioned embodiments, as shown in Figure 2a , the description of other modules in the cigarette packet appearance detection system 01 is added.

[0050] Optionally, the cigarette packet appearance detection system 01 further comprises a rejection device 104, wherein the rejection device 104 is electrically connected with the control device 101.

[0051] The control device 101 is further configured to send a rejection instruction to the rejection device 104 when the identification result is a cigarette packet appearance defect.

[0052] The rejection device 104 is configured to reject the cigarette packet corresponding to the identification result after receiving the rejection instruction sent by the control device 101.

[0053] Specifically, if the identification result is that the cigarette packet appearance is normal, the system continues to detect the appearance of the next cigarette packet. If the identification result is that the cigarette packet appearance is defective, the control device 101 not only sends the collection image corresponding to the identification result to the target user equipment, but also sends a rejection instruction to the rejection device 104. The rejection device 104 rejects the cigarette packet corresponding to the identification result after receiving the rejection instruction sent by the control device 101, so that the defective cigarette packet does not flow out of the production process. Through the rejection device 104, automatic rejection of defective cigarette packets is realized, reducing manual intervention and improving production efficiency. The rejection instruction is sent immediately after the defective cigarette packet is detected, ensuring that defective products do not flow into subsequent production links, thereby improving the reliability and consistency of product quality control.

[0054] Optionally, the cigarette packet appearance detection system 01 further comprises a counting device 105 and an alarm device 106. The counting device 105 and the alarm device 106 are both electrically connected with the control device 101.

[0055] The control device 101 is further configured to send a counting instruction to the counting device 105 when the identification result is a cigarette packet appearance defect.

[0056] The control device 101 is further configured to send a clear instruction to the counting device 105 when the identification result is a cigarette packet appearance defect and after the detection of the cigarette packet group corresponding to the identification result is completed.

[0057] The counting device 105 is configured to count when receiving the counting instruction and clear the count when receiving the clear instruction.

[0058] The counting device 105 is further configured to send appearance abnormality information to the control device 101 when the count is greater than a preset value.

[0059] The control device 101 is further configured to send an alarm signal to the alarm device 106 after receiving the appearance abnormality information.

[0060] The alarm device 106 is configured to alarm when receiving the alarm signal.

[0061] Specifically, the control device 101 sends a counting instruction to the counting device 105 when the identification result is the appearance defect of the cigarette packet, and the counting device 105 counts when receiving the counting instruction. Since the cigarette packets are usually detected in groups of five, the control device 101 sends a clear instruction to the counting device 105 when the identification result is the appearance defect of the cigarette packet and after the detection of the cigarette packet group corresponding to the identification result is completed, that is, after the detection of the cigarette packet group in which the defective cigarette packet is located is completed, so as to clear the count of the counting device 105 and start counting the defects of the next group of cigarette packets.

[0062] During the detection of a group of cigarette packets, if the number of defective cigarette packets is greater than a preset value, the counting device 105 sends appearance abnormality information to the control device 101. For example, the preset value can be 3. When the number of defective cigarette packets is greater than 3, the counting device 105 sends appearance abnormality information to the control device 101 to indicate that the push head and the baffle of the packaging machine may be malfunctioning, resulting in appearance defects of most cigarette packets in a group. Therefore, the control device 101 sends an alarm signal to the alarm device 106 after receiving the appearance abnormality information. The alarm device 106 alarms when receiving the alarm signal to remind the staff to check. The alarm device 106 can include any one of the following: an indicator light, a buzzer, and a sound and light alarm. Through the counting device 105 and the alarm device 106, the system can automatically detect the continuous appearance defects and timely alarm, improving the reliability and consistency of product quality control and reducing the batch quality problems caused by continuous defects.

[0063] Optionally, the cigarette packet appearance detection system 01 further comprises an incremental encoding device 107, which is arranged on the main shaft of the cigarette packet group push head driving motor. The incremental encoding device 107 comprises a position detection unit 1071 and a pulse triggering unit 1072 which are electrically connected to each other, and the pulse triggering unit 1072 is further electrically connected to the control device 101.

[0064] The position detection unit 1071 is used to detect the running position of the cigarette packet group and send the running position to the pulse triggering unit 1072.

[0065] The pulse triggering unit 1072 is used to receive the running position and send an illumination signal and a photographing signal to the control device 101 when the running position corresponds to the working phase of the push head motor rotation phase.

[0066] The control device 101 is further used to send an acquisition instruction to the image acquisition device 102 after receiving the illumination signal and the photographing signal.

[0067] Specifically, the incremental encoding device 107 is mounted on the main shaft of the cigarette pack pusher drive motor, and includes a position detection unit 1071 and a pulse triggering unit 1072 electrically connected to each other. The position detection unit 1071 detects the running position of the cigarette pack, and the pulse triggering unit 1072 sends a lighting signal and a photographing signal to the control device 101 when the rotation phase of the pusher motor corresponding to the running position reaches the working phase. After receiving the lighting signal and the photographing signal, the control device 101 sends an acquisition command to the image acquisition device 102. Through the incremental encoding device 107, the system can precisely control the timing of image acquisition, ensuring that image acquisition is performed when the cigarette pack reaches the designated position, thus improving the accuracy and reliability of detection.

[0068] Optionally, the cigarette pack appearance inspection system 01 also includes a human-computer interaction device 108. The human-computer interaction device 108 is electrically connected to the image acquisition device 102 and the control device 101.

[0069] Image acquisition device 102 is also used to send the acquired images to human-computer interaction device 108.

[0070] The human-computer interaction device 108 is used to display the acquired images on the display interface.

[0071] The human-computer interaction device 108 is also used to receive appearance inspection instructions sent by the target user and send the appearance inspection instructions to the control device 101.

[0072] The control device 101 is also used to send the appearance inspection command to the incremental encoding device 107 after receiving the appearance inspection command, and the incremental encoding device 107 is also used to run after receiving the appearance inspection command.

[0073] Specifically, the staff sends an appearance inspection command through the human-machine interface 108. Upon receiving the command, the human-machine interface 108 forwards it to the control device 101. The control device 101 then forwards the command to the incremental encoding device 107. Upon receiving the command, the incremental encoding device 107 begins operation, preparing to trigger the image acquisition device 102. When the incremental encoding device 107 detects that the tobacco pack group has reached the designated position, it sends an illumination signal and a photographing signal to the control device 101 via the pulse triggering unit 1072. Upon receiving these signals, the control device 101 sends an acquisition command to the image acquisition device 102. The illumination unit 1202 of the image acquisition device 102 then illuminates the tobacco pack group. The image acquisition unit 1201 acquires an image of the tobacco pack group and sends it to the image processing device 103 and the human-machine interface 108. The human-machine interface 108 displays the acquired image on a screen for easy viewing by the staff. The staff can start or stop the inspection process at any time through the human-machine interface 108, improving the system's flexibility.

[0074] Users can also maintain or upgrade the model library through the human-machine interface device 108, thereby adding and expanding models to identify problems, and can also control the upgrade of other hardware processors. The display pages of the human-machine interface device 108 may include a basic user operation page, a defect display page, a system parameter setting page, and a page displaying the appearance quality of the cigarette packs. Users can also check various indicators of the equipment by viewing the pages of the human-machine interface device 108 when abnormalities occur, find the root cause of the cigarette pack appearance defects, and provide important information for subsequent maintenance and handling.

[0075] Optionally, the lighting unit 1202 includes two light-emitting diode light sources, and the image acquisition unit 1201 includes an industrial camera.

[0076] Two LED light sources are tilted and positioned directly above the cigarette pack assembly module, and an industrial camera is positioned in the center between the two LED light sources so that the lens of the industrial camera is aligned with the cigarette pack assembly module.

[0077] Specifically, the illumination unit 1202 includes two light-emitting diode (LED) light sources, which are obliquely positioned directly above the tobacco package module. This oblique positioning better illuminates the surface of the tobacco package, reducing shadows and reflections, and improving the quality of image acquisition. The image acquisition unit 1201 includes an industrial camera, which is positioned centrally between the two LED light sources, ensuring its lens is aligned with the tobacco package module. The industrial camera is used to acquire images of the tobacco package, and its positioning ensures clear and complete images. After the control device 101 sends an acquisition command, the two LED light sources are triggered and begin illuminating the tobacco package module. Because the light sources are obliquely positioned, they provide uniform illumination, reducing reflections and shadows that may occur from direct illumination, thereby improving image quality. Upon receiving the acquisition command, the industrial camera begins acquiring images of the tobacco package. The obliquely positioned LED light sources and the industrial camera aligned with the tobacco package module effectively reduce reflections and shadows, resulting in clearer images and high-quality images. This facilitates subsequent image processing and recognition, thereby improving detection accuracy.

[0078] For example, Figure 2b This is an exemplary structural diagram of the image acquisition device 102 of the cigarette pack appearance inspection system 01 provided in this application. The positions of the pusher 5, baffle 7, cigarette pack assembly mold 3, and cigarette pack assembly 6 of the packaging machine are shown below. Figure 2b As shown, the two LED light sources 2 of the image acquisition device 102 are tilted and positioned directly above the cigarette pack assembly module 3, which can better illuminate the surface of the cigarette pack assembly 6, reduce shadows and reflections, and improve the quality of image acquisition. The industrial camera 1 is positioned at the center between the two LED light sources 2, and the lens 4 of the industrial camera 1 is aligned with the cigarette pack assembly module 3 for easy image acquisition.

[0079] This system automatically rejects defective cigarette packs using a rejection device, reducing manual intervention and improving production efficiency. Upon detecting a defective pack, a rejection command is immediately issued to ensure that defective products do not flow into subsequent production stages. Through a counting and alarm device, the system can automatically detect consecutive appearance defects and issue timely alarms, reducing batch quality problems caused by continuous defects and thus improving the reliability and consistency of product quality control. An incremental coding device allows for precise control of image acquisition timing, ensuring image acquisition occurs when the cigarette pack group reaches the designated position, improving detection accuracy and reliability. Operators can start or stop the detection process at any time via a human-machine interface, increasing system flexibility. The tilted LED light source and the industrial camera aligned with the cigarette pack module effectively reduce reflections and shadows, resulting in clearer images and high-quality image acquisition, facilitating subsequent image processing and recognition, thereby improving detection accuracy.

[0080] Figure 3 This is a flowchart illustrating a cigarette pack appearance inspection method provided in this application. This method can be executed by a device integrating an image processing unit with a cigarette pack appearance inspection system. This device can be implemented using software and / or hardware. In one specific embodiment, the device can be integrated into an electronic device; for example, the electronic device can be a computer. The following embodiments will illustrate this using the integration of the device into an electronic device as an example. Figure 3 The method may specifically include the following steps:

[0081] Step 301: Receive the acquired image sent by the image acquisition device, and preprocess the acquired image to obtain a preprocessed image.

[0082] Specifically, the system receives images sent by an image acquisition device and preprocesses the images to obtain preprocessed images. For example, the preprocessing process may include data filtering, grayscale conversion, filtering and noise reduction, and enhancing the range of surface defects in the acquired images, thereby facilitating faster extraction of defect features.

[0083] Step 302: Extract features from the preprocessed image to obtain the data features of the preprocessed image, perform image recognition based on the data features of the preprocessed image to obtain the recognition result, and send the recognition result to the control device so that when the recognition result is a defect in the appearance of the cigarette pack, the control device sends the acquired image corresponding to the recognition result to the target user equipment.

[0084] The identification results include cigarette packs with normal appearance and cigarette packs with appearance defects.

[0085] Specifically, feature extraction is performed on the preprocessed image to obtain its data features. Feature extraction can be achieved using various image processing techniques, such as edge detection, texture analysis, and feature extraction. Image recognition is then performed based on these preprocessed image data features to obtain the recognition result, which is then sent to the control device. For example, feature extraction is performed on the preprocessed image to obtain its data features, which are then sent to a pre-trained image recognition model to obtain the recognition result. This image recognition model can be trained using various defective cigarette pack images from a training database. The recognition results include whether the cigarette pack has a normal appearance or a defective appearance. When the recognition result indicates a defective appearance, the control device sends the corresponding acquired image to the target user device for staff to view.

[0086] The specific implementation process and other optional implementation methods of this embodiment are the same as the optional implementation methods of the image processing device in any of the above embodiments, and will not be repeated here.

[0087] The solution of this application receives images sent by an image acquisition device, preprocesses the images to obtain a preprocessed image, extracts features from the preprocessed image to obtain data features, performs image recognition based on the data features to obtain a recognition result, and sends the recognition result to a control device. When the recognition result indicates a defect in the appearance of the cigarette pack, the control device sends the corresponding acquired image to the target user equipment. The recognition result includes both normal and defective cigarette pack appearances. In other words, the solution of this application uses an image processing device to detect defects in the appearance of cigarette packs, obtaining a recognition result that determines whether a defect exists. This avoids the low detection speed and efficiency associated with manual inspection, reduces missed and false detections caused by manual inspection, and improves detection efficiency and accuracy.

[0088] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the cigarette pack appearance detection method provided in any of the above embodiments.

[0089] This application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the cigarette pack appearance detection method provided in any of the above embodiments.

[0090] The following is for reference. Figure 4 It shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the present application. Figure 4 The electronic device shown is merely an example and should not impose any limitations on the functionality and scope of this application.

[0091] like Figure 4 As shown, the electronic device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage section 408 into a random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device 400. The CPU 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0092] The following components are connected to I / O interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to I / O interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 410 as needed so that computer programs read from it can be installed into storage section 408 as needed.

[0093] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by central processing unit (CPU) 401, it performs the functions defined above in the system of this application.

[0094] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0095] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0096] The modules and / or units described in this application can be implemented in software or hardware. The described modules and / or units can also be located in a processor.

[0097] In another aspect, this application also provides a computer-readable medium, which may be included in the device described in the above embodiments; or it may exist independently and not assembled into the device. The computer-readable medium carries one or more programs that, when executed by the device, cause the device to perform the following operations:

[0098] The system receives images from an image acquisition device and preprocesses them to obtain a preprocessed image. It then extracts features from the preprocessed image to obtain its data features and performs image recognition based on these features to obtain a recognition result. The recognition result is then sent to a control device so that when the recognition result indicates a defect in the appearance of the cigarette pack, the control device sends the corresponding image to the target user device. The recognition result includes both normal and defective cigarette pack appearances.

[0099] According to the technical solution of this application, an image is received from an image acquisition device, and the acquired image is preprocessed to obtain a preprocessed image. Feature extraction is performed on the preprocessed image to obtain its data features, and image recognition is performed based on these data features to obtain a recognition result. The recognition result is then sent to a control device, so that when the recognition result indicates a defect in the appearance of the cigarette pack, the control device sends the corresponding acquired image to the target user equipment. The recognition result includes both normal and defective cigarette pack appearances. In other words, the solution of this application uses an image processing device to detect defects in the appearance of cigarette packs, obtaining a recognition result that determines whether a defect exists. This avoids the low detection speed and efficiency associated with manual inspection, reduces missed and false detections caused by manual inspection, and improves detection efficiency and accuracy.

[0100] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the cigarette pack appearance detection method provided in any embodiment of this application.

[0101] In the implementation of the computer program product, computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0102] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

[0103] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A cigarette pack appearance inspection system, characterized in that, The cigarette pack appearance inspection system includes an image acquisition device, a control device, and an image processing device; wherein, the image processing device is electrically connected to the image acquisition device, and both the image acquisition device and the image processing device are electrically connected to the control device; the image acquisition device is mounted on a mounting frame, and the mounting frame is mounted parallel to the top of the cigarette pack assembly mold box. The image acquisition device includes an image acquisition unit and an illumination unit. The illumination unit is used to illuminate the tobacco pack group after receiving the acquisition command sent by the control device. The image acquisition unit is used to acquire the acquisition image of the detection surface of the tobacco pack group after receiving the acquisition command sent by the control device. The image processing device is used to receive the acquired image sent by the image acquisition device, and to preprocess the acquired image to obtain a preprocessed image; The image processing device is further configured to extract features from the preprocessed image to obtain data features of the preprocessed image, perform image recognition based on the data features of the preprocessed image to obtain recognition results, and send the recognition results to the control device; wherein, the recognition results include cigarette packs with normal appearance and cigarette packs with appearance defects; The control device is used to send the acquired image corresponding to the identification result to the target user equipment when the identification result is a defect in the appearance of the cigarette pack.

2. The cigarette pack appearance inspection system according to claim 1, characterized in that, The image processing device is used to perform grayscale transformation on the acquired image to obtain the preprocessed image; The image processing device is used to extract features from the preprocessed image to obtain the data features of the preprocessed image, and to obtain the recognition result based on the data features of the preprocessed image and the recognition model in the preset model library.

3. The cigarette pack appearance inspection system according to claim 1, characterized in that, The cigarette pack appearance inspection system also includes a rejection device; wherein the rejection device is electrically connected to the control device; The control device is also used to send a rejection instruction to the rejection device when the identification result is that the cigarette pack has an appearance defect; The rejection device is used to reject the cigarette pack corresponding to the identification result after receiving the rejection instruction sent by the control device.

4. The cigarette pack appearance inspection system according to claim 1, characterized in that, The cigarette pack appearance inspection system also includes a counting device and an alarm device; wherein, the counting device and the alarm device are both electrically connected to the control device; The control device is also used to send a counting command to the counting device when the identification result is that the cigarette pack has an appearance defect; The control device is also used to send a zeroing command to the counting device when the identification result is that the cigarette pack has an appearance defect, and after the detection of the cigarette pack group corresponding to the identification result is completed; The counting device is used to count when the counting instruction is received, and to clear the count when the clear instruction is received; The counting device is also used to send appearance abnormality information to the control device when the count exceeds a preset value; The control device is also used to send an alarm signal to the alarm device after receiving the abnormal appearance information; The alarm device is used to sound an alarm when it receives the alarm signal.

5. The cigarette pack appearance inspection system according to claim 1, characterized in that, The cigarette pack appearance inspection system also includes an incremental coding device, which is mounted on the main shaft of the cigarette pack pusher drive motor; wherein, the incremental coding device includes a position detection unit and a pulse triggering unit that are electrically connected to each other, and the pulse triggering unit is also electrically connected to the control device; The position detection unit is used to detect the running position of the tobacco pack group and send the running position to the pulse triggering unit; The pulse triggering unit is used to receive the running position and send a lighting signal and a photo signal to the control device when the rotation phase of the pusher motor corresponding to the running position reaches the working phase. The control device is also used to send the acquisition command to the image acquisition device after receiving the lighting signal and the photographing signal.

6. The cigarette pack appearance inspection system according to claim 5, characterized in that, The cigarette pack appearance inspection system also includes a human-computer interaction device; wherein, the human-computer interaction device is electrically connected to the image acquisition device and the control device; The image acquisition device is also used to send the acquired image to the human-computer interaction device; The human-computer interaction device is used to display the acquired images on the display interface; The human-computer interaction device is also used to receive appearance detection instructions sent by the target user and send the appearance detection instructions to the control device; The control device is further configured to send the appearance inspection instruction to the incremental encoding device after receiving the appearance inspection instruction, and the incremental encoding device is further configured to run after receiving the appearance inspection instruction.

7. The cigarette pack appearance inspection system according to claim 1, characterized in that, The lighting unit includes two light-emitting diode light sources, and the image acquisition unit includes an industrial camera; The two light-emitting diode (LED) light sources are tilted and positioned directly above the cigarette pack assembly module, and the industrial camera is positioned at the center between the two LED light sources so that the lens of the industrial camera is aligned with the cigarette pack assembly module.

8. A method for inspecting the appearance of cigarette packs, characterized in that, An image processing device applied to a cigarette pack appearance inspection system, the method comprising: Receive the acquired image sent by the image acquisition device, and preprocess the acquired image to obtain a preprocessed image; Feature extraction is performed on the preprocessed image to obtain the data features of the preprocessed image, and image recognition is performed based on the data features of the preprocessed image to obtain the recognition result. The recognition result is sent to the control device so that when the recognition result is a defect in the appearance of the cigarette pack, the control device sends the acquired image corresponding to the recognition result to the target user equipment; wherein, the recognition result includes the cigarette pack having a normal appearance and the cigarette pack having a defect in appearance.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the cigarette pack appearance detection method as described in claim 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the cigarette pack appearance inspection method as described in claim 8.