Cigarette box label visual detection method and system

By automatically comparing the dispatching order information and label image information of cigarette boxes, the problem of complex and time-consuming detection of existing cigarette boxes is solved, and efficient and accurate label detection is achieved.

CN120373328APending Publication Date: 2025-07-25GUANGDONG SHAOGUAN TOBACCO REDRYING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510431468.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing cigarette box label inspection adopts sampling inspection, which is complex, time-consuming, and has low detection speed. It is impossible to detect wrong labels in time, affecting production efficiency.

Method used

By automatically reading the dispatching order information and production information from the electronic version of the cigarette box and the production system, and combining the cigarette box label image recognition and analysis, the tag information is automatically compared to determine the error.

Benefits of technology

Automatic detection of cigarette box labels is realized, manual participation is reduced, and detection efficiency and accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373328A_ABST
    Figure CN120373328A_ABST
Patent Text Reader

Abstract

The invention discloses a cigarette box label visual detection method and system. The method comprises the steps that first information corresponding to a target cigarette box is determined, the first information is obtained through automatic reading from an electronic edition scheduling list of the target cigarette box and a preset cigarette box production system, and the first information is scheduling list information and production information of the target cigarette box; second information corresponding to the target cigarette box is determined, the second information is obtained by identifying and analyzing the cigarette box label image of the target cigarette box, and the second information is scheduling list information and production information of the cigarette box to which the label pasted on the expected target cigarette box is pasted; and determining a first detection result of the target cigarette box based on the first information and the second information, wherein the first detection result is used for indicating whether the label pasted on the target cigarette box has an error or not. And the first independent right is achieved. According to the scheme, automatic detection of the cigarette box labels is achieved, manual participation is reduced, and the cigarette box label detection efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cigarette case identification detection, and in particular to a visual detection method and system for cigarette case labels. Background Art

[0002] In the production process of threshed and redried finished products, the threshed and redried finished products are generally packed in boxes. Moreover, in order to facilitate subsequent processing and distinguish the types and specifications of the finished tobacco leaves in the cigarette case, industry standard labels and industrial customer specific labels are pasted on the two narrower sides of the cigarette case on the vertical side of the box body as the only identification of the threshed and redried finished products.

[0003] However, the existing cigarette case label detection adopts sampling detection, which involves multiple operation steps and requires the cooperation of multiple parties and data support, making the detection process complex, time-consuming, and the detection speed far lower than the output speed of the cigarette case production line, resulting in the inability to detect wrong labels in time for the detection of cigarette case labels. At the same time, the remedial measures for wrong labels are time-consuming, bringing an additional workload to production personnel and affecting work efficiency. Summary of the Invention

[0004] The present invention provides a visual detection method and system for cigarette case labels to solve the problems of complex detection process, long time consumption, and low detection speed when manually detecting the labels pasted on cigarette cases.

[0005] According to one aspect of the present invention, a visual detection method for cigarette case labels is provided. The method includes:

[0006] Determine the first information corresponding to the target cigarette case, which is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system. The first information is the dispatch list information and production information of the target cigarette case, and the cigarette case production system is used to manage the production process of the target cigarette case;

[0007] Determine the second information corresponding to the target cigarette case, which is obtained by identifying and analyzing the cigarette case label image of the target cigarette case. The second information is the dispatch list information and production information of the cigarette case on which the label expected to be pasted on the target cigarette case is pasted, and the cigarette case label image contains the label pasted on the target cigarette case;

[0008] Based on the first information and the second information, determine the first detection result of the target cigarette case, and the first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case.

[0009] According to another aspect of the present invention, a visual detection system for cigarette case labels is provided. The system includes:

[0010] An information collection module, configured to determine first information corresponding to a target cigarette case. The first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system. The first information is the dispatch list information and production information of the target cigarette case. The cigarette case production system is used to manage the production process of the target cigarette case;

[0011] An image recognition module, configured to determine second information corresponding to the target cigarette case. The second information is obtained by recognizing and analyzing the cigarette case label image of the target cigarette case. The second information is the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted. The cigarette case label image contains the label pasted on the target cigarette case;

[0012] An information verification module, configured to determine a first detection result of the target cigarette case based on the first information and the second information. The first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case.

[0013] The technical solution of the embodiment of the present invention realizes matching and comparing the dispatch list information and production information of the target cigarette case automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system with the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted, which is obtained by recognizing and analyzing the cigarette case label image of the target cigarette case, and determining whether there is an error in the label pasted on the target cigarette case, so as to realize the automatic detection of the cigarette case label, reduce manual participation, and improve the detection efficiency and accuracy of the cigarette case label. By determining the first information corresponding to the target cigarette case, the first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system, and the first information is the dispatch list information and production information of the target cigarette case; determining the second information corresponding to the target cigarette case, the second information is obtained by recognizing and analyzing the cigarette case label image of the target cigarette case, and the second information is the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted; and determining the first detection result of the target cigarette case based on the first information and the second information, where the first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case.

[0014] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0016] Figure 1 The flowchart of a visual inspection method for cigarette box labels provided by an embodiment of the present invention;

[0017] Figure 2 The structural schematic diagram of a visual inspection system for cigarette box labels provided by an embodiment of the present invention;

[0018] Figure 3 The flowchart of another visual inspection method for cigarette box labels provided by an embodiment of the present invention;

[0019] Figure 4 The structural schematic diagram of another visual inspection system for cigarette box labels provided by an embodiment of the present invention. Detailed implementation manners

[0020] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0021] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0022] Figure 1 The flowchart of a visual inspection method for cigarette box labels provided by an embodiment of the present invention. The embodiments of the present invention are applicable to the situation of automatically inspecting the labels pasted on cigarette boxes. This method can be executed by a visual inspection system for cigarette box labels, and the visual inspection system for cigarette box labels can be implemented in the form of hardware and / or software. As Figure 1 shown, this method includes:

[0023] S101. Determine the first information corresponding to the target cigarette case. The first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system. The first information is the dispatch list information and production information of the target cigarette case, and the cigarette case production system is used to manage the production process of the target cigarette case.

[0024] In the embodiment of the present invention, the target cigarette case may refer to the outer packaging box for packaging the finished tobacco leaves. Exemplarily, the finished tobacco leaves may be redried and threshed finished products, and the target cigarette case may be the outer packaging box for packaging the redried and threshed finished products. The electronic dispatch list of the target cigarette case may refer to a digital document used to record the transportation, storage, and production processes of the target cigarette case. The electronic dispatch list of the target cigarette case contains data involved in the production process of the target cigarette case.

[0025] The dispatch list information of the target cigarette case at least includes: the entrusted processing party, the place of origin, the year, the grade, and the production batch. The production information of the target cigarette case at least includes: the batch number, the gross weight, the shift, the production date, and the roasting season year. Specifically, the dispatch list information of the target cigarette case can be automatically read from the electronic dispatch list of the target cigarette case, and the production information of the target cigarette case can be automatically read from the preset cigarette case production system, so as to use the dispatch list information and production information of the target cigarette case as the first information corresponding to the target cigarette case.

[0026] As an optional implementation manner of the embodiment of the present invention, determining the first information corresponding to the target cigarette case includes the following steps A1 - A3:

[0027] Step A1. Automatically read the dispatch list information of the target cigarette case from a preset keyword list. The preset keyword list includes the dispatch list information read from all electronic dispatch lists involved in the cigarette case production task.

[0028] Step A2. Automatically read the production information of the target cigarette case from the cigarette case production system.

[0029] Step A3. Use the dispatch list information and production information of the target cigarette case as the first information.

[0030] In the embodiment of the present invention, the preset keyword list stores the dispatch list information read from several electronic dispatch lists. The several electronic dispatch lists may refer to all electronic dispatch lists involved in the cigarette case production task. The cigarette case production task may refer to the task for producing all cigarette cases. Furthermore, the dispatch list information of the target cigarette case can be read from the preset keyword list based on the unique identifier of the target cigarette case. The unique identifier may be the production batch or preset information, where the preset information may refer to the unique information of the target cigarette case set in advance.

[0031] Optionally, before automatically reading the production information of the target carton from the carton production system, determine the production information of the target carton based on the production task of the target carton, and update the production information of the target carton to the carton production system to ensure the accuracy and real-time nature of the production information of the target carton. Specifically, the batch number, gross weight, and shift of the target carton can be updated in the carton production system. The batch number, gross weight, and shift of the target carton can be used to determine the production batch of the target carton; automatically update the curing season year of the target carton in the carton production system based on the characteristics of the curing season year; read the year, month, and date of the current system time through the carton production system, and automatically update the production date of the target carton.

[0032] As an optional implementation manner of the embodiment of the present invention, the determination process of the preset keyword list includes the following steps B1-B2:

[0033] Step B1, determine the keywords corresponding to the third information. The third information is the dispatching order information read from all electronic dispatching orders involved in the carton production task. The keywords corresponding to the third information are used to describe the similarities and differences between different electronic dispatching orders among all electronic dispatching orders involved in the carton production task.

[0034] Step B2, establish an initial keyword list based on the keywords corresponding to the third information, and fill the initial keyword list with the third information to obtain the preset keyword list.

[0035] In the embodiment of the present invention, there are differences in the formats of different electronic dispatching orders among all electronic dispatching orders involved in the carton production task, and there are similarities and differences between different formats of electronic dispatching orders. Among them, the similarities between different formats of electronic dispatching orders can be the basic information included in the electronic dispatching order; the differences between different formats of electronic dispatching orders can be the unique information included in the electronic dispatching order, such as the supervisor information or special label information. Among them, the special label information can be the custom information included in the electronic dispatching order. Even if the formats of the electronic dispatching orders corresponding to different production batches are the same, the dispatching order information read from the electronic dispatching orders corresponding to different production batches is different. Optionally, the dispatching order information read from all electronic dispatching orders involved in the carton production task is formatted and used as the third information, and is saved in the database.

[0036] Specifically, all electronic dispatching orders involved in the carton production task can be analyzed, and then the similarities and differences between different formats of electronic dispatching orders among all electronic dispatching orders can be determined according to the analysis results, so as to construct the keywords corresponding to the third information based on the similarities and differences between different formats of electronic dispatching orders. Exemplarily, all electronic dispatching orders can be analyzed in detail using a multi-bubble chart.

[0037] Furthermore, an initial keyword list is established based on the keywords corresponding to the third information. By comparing the third information with the keywords corresponding to the third information, the information in the third information that matches the keywords corresponding to the third information is filled into the initial keyword list to obtain a preset keyword list. During the process of processing the initial keyword list, for the information in the third information that does not match the keywords corresponding to the third information or has a format error, it is marked as abnormal information, and a prompt for review and correction is given to ensure the accuracy and integrity of the preset keyword list and avoid affecting the detection result of the target cigarette case.

[0038] S102. Determine the second information corresponding to the target cigarette case. The second information is obtained by identifying and analyzing the cigarette case label image of the target cigarette case. The second information is the dispatching order information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted. The cigarette case label image contains the label pasted on the target cigarette case.

[0039] In the embodiment of the present invention, in order to facilitate subsequent processing of the tobacco leaf products contained in the target cigarette case and identify information such as the types and specifications of the tobacco leaf products contained, labels are pasted on the vertical sides of the target cigarette case as the unique identifier of the tobacco leaf products contained. Exemplarily, an industry standard label and a cigarette case specific label are pasted on each of the two narrow sides of the vertical side of the target cigarette case. The dispatching order information identified and analyzed from the cigarette case label image on the target cigarette case is derived from the electronic dispatching order of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted.

[0040] Specifically, by collecting images of the labels pasted on the target cigarette case, the cigarette case label image of the target cigarette case can be obtained. Furthermore, by identifying and analyzing the cigarette case label image, the dispatching order information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted can be obtained as the second information corresponding to the target cigarette case.

[0041] Optionally, a preset area on the label pasted on the target cigarette case may be covered with a preset identification code, and the preset identification code is associated with the second information corresponding to the target cigarette case, so that the second information corresponding to the target cigarette case can be obtained by identifying and analyzing the preset identification code. The preset identification code may belong to at least one of a bar code, a two-dimensional code, and a radio frequency identification (RFID) code.

[0042] Exemplarily, for the collected cigarette box label image, first, the noise in the cigarette box label image is removed through a filtering algorithm; then, based on a preset character recognition model, character detection is performed on the denoised cigarette box label image to obtain the text area in the cigarette box label image. The preset character recognition model can be an Optical Character Recognition (OCR) model trained based on deep learning; furthermore, the detected text area is converted into readable first text information, and the second information corresponding to the target cigarette box is extracted from the first text information.

[0043] S103. Determine the first detection result of the target cigarette box based on the first information and the second information. The first detection result is used to indicate whether there is an error in the label pasted on the target cigarette box.

[0044] Specifically, by comparing the first information corresponding to the target cigarette box with the second information, if the second information is the same as the first information, it means that the target cigarette box is the cigarette box on which the label of the expected target cigarette box is pasted and there is no error information in the second information. Thus, the first detection result indicates that the label pasted on the target cigarette box is correct. If the second information is different from the first information, it means that the target cigarette box is not the cigarette box on which the label of the expected target cigarette box is pasted, or there is error information in the second information when the target cigarette box is the cigarette box on which the label of the expected target cigarette box is pasted. Thus, the first detection result indicates that there is an error in the label pasted on the target cigarette box.

[0045] As an optional implementation manner of the embodiment of the present invention, determining the first detection result of the target cigarette box based on the first information and the second information includes: determining the matching identical information in the first information and the second information, and counting the number of identical information; determining the first detection result based on the comparison result between the number of identical information and a preset number.

[0046] Specifically, in the process of comparing the first information corresponding to the target cigarette box and the second information, the information included in the first information and the second information can be compared one by one to determine the identical information in the first information and the second information. Furthermore, when the number of identical information in the first information and the second information exceeds the preset number, the first detection result indicates that the label pasted on the target cigarette box is correct; when the number of identical information in the first information and the second information does not exceed the preset number, the first detection result indicates that there is an error in the label pasted on the target cigarette box.

[0047] Optionally, when the number of identical information in the first information and the second information exceeds a preset number, two pieces of second information corresponding to the target cigarette case are respectively identified from the cigarette case label images corresponding to the labels pasted on both sides of the target cigarette case, and two case number information corresponding to the target cigarette case are respectively extracted from the two pieces of second information. Furthermore, if the two pieces of case number information are different, the first detection result indicates that the label pasted on the target cigarette case is incorrect, and the label error type of the target cigarette case is recorded as "case number error". If the two pieces of case number information are the same, the case number information corresponding to the target cigarette case is recorded and compared with the previously recorded case number information. If the previously recorded case number information contains the case number information corresponding to the target cigarette case, the first detection result indicates that the label pasted on the target cigarette case is incorrect, and the label error type of the target cigarette case is recorded as "duplicate case number error"; if the previously recorded case number information does not contain the case number information corresponding to the target cigarette case, it is confirmed that the case number information corresponding to the target cigarette case is unique, and the first detection result indicates that the target cigarette case is pasted with a correct label.

[0048] Optionally, when the first detection result indicates that the label pasted on the target cigarette case is incorrect, an exception prompt message is generated and displayed. The exception prompt message may include the case number information of the target cigarette case and the label error type, so as to quickly locate the problematic cigarette case and take corresponding handling measures. Exemplarily, referring to Figure 2 , the exception prompt message can be displayed through an alarm prompt module. The alarm prompt module includes a display interface and an audible and visual alarm lamp. The display interface is used to display the exception prompt message, and the audible and visual alarm lamp gives prompts through sound and light flashing.

[0049] Optionally, referring to Figure 2 , the first information, the second information, the first detection result, and the exception prompt message corresponding to the target cigarette case can be stored in a database through a data management module to ensure the integrity and traceability of the information, which is convenient for subsequent quality traceability and problem analysis.

[0050] In the technical solution of the embodiment of the present invention, by determining the first information corresponding to the target cigarette case, the first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system, and the first information is the dispatch list information and production information of the target cigarette case; determining the second information corresponding to the target cigarette case, the second information is obtained by identifying and analyzing the cigarette case label image of the target cigarette case, and the second information is the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted; determining the first detection result of the target cigarette case based on the first information and the second information, and the first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case, realizing the matching and comparison of the dispatch list information and production information of the target cigarette case automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system with the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted by identifying and analyzing the cigarette case label image of the target cigarette case, determining whether there is an error in the label pasted on the target cigarette case, thereby realizing the automatic detection of the cigarette case label, reducing manual participation, and improving the detection efficiency and accuracy of the cigarette case label.

[0051] Figure 3 It is a flowchart of another cigarette case label vision detection method provided by the embodiment of the present invention. The technical solution of this embodiment further optimizes the process before determining the second information corresponding to the target cigarette case in the technical solution of the foregoing embodiment. The solutions not described in detail in this embodiment can be seen in the foregoing embodiment, and this embodiment can be combined with various optional solutions in the foregoing one or more embodiments. As Figure 3 shown, the method includes:

[0052] S201. Determine the first information corresponding to the target cigarette case. The first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system. The first information is the dispatch list information and production information of the target cigarette case, and the cigarette case production system is used to manage the production process of the target cigarette case.

[0053] S202. Convey the target cigarette case to a preset detection position through a cigarette case conveying module, and the preset detection position is within the detection area of the target cigarette case.

[0054] In the embodiment of the present invention, the detection area of the target cigarette case may refer to the area for detecting the label pasted on the target cigarette case. Specifically, the target cigarette case can be conveyed from the packing area to a preset detection position within the detection area through a cigarette case conveying module, and the target cigarette case is conveyed to the storage area after the detection of the target cigarette case is completed.

[0055] Exemplarily, refer to Figure 2, the cigarette case conveying module can be composed of a roller conveyor, a motor, a diffuse reflection sensor, and a motor controller. Among them, the roller conveyor can be composed of a series of rollers on the same horizontal plane. The rollers are driven and controlled by the motor and chain to achieve stable transportation of the cigarette case, ensuring the stability of the cigarette case during transportation. At the same time, it can also flexibly adjust the conveying speed according to production requirements to adapt to different production rhythm requirements, providing a basis for the box-by-box inspection of cigarette cases. To improve the adaptability of the roller conveyor to cigarette cases, the width of the rollers can be set based on the specifications of the cigarette cases. For example, when the specifications of the cigarette cases include 1136mm×720mm×725mm and 1115mm×690mm×725mm, the width of the rollers can be set to 800mm - 900mm.

[0056] When the target cigarette case is transported to the preset detection position, the target cigarette case will block the diffuse reflection sensor, and the reflection signal received by the diffuse reflection sensor will change. Then, the diffuse reflection sensor will immediately send a detection signal to the motor controller, and the motor controller will control the motor to stop running, so that the roller conveyor stops running, ensuring that the cigarette case can be stably docked at the preset detection position. The detection accuracy range of the diffuse reflection sensor can be set to 5 - 30mm to accurately identify the target cigarette case.

[0057] S203. The image acquisition module acquires an image of the target cigarette case located at the preset detection position to obtain the cigarette case label image.

[0058] Specifically, when the target cigarette case is transported to the preset detection position, the image acquisition module can acquire an image of the label pasted on the target cigarette case to obtain the cigarette case label image of the target cigarette case.

[0059] Exemplarily, the detection signal sent by the diffuse reflection sensor will also be synchronized to the image acquisition module and the cigarette case weighing module after a preset delay to ensure that the image acquisition module and the cigarette case weighing module can start working after the target cigarette case is completely stable, thus ensuring the accuracy and stability of weight and image acquisition. Refer to Figure 2 , the image acquisition module can be composed of a camera, a lens, a signal line, and a data transmission line. Among them, the camera is fixed in the form of a gantry, used to capture the label details of the target cigarette case, and complete image acquisition when the target cigarette case is located at the preset detection position; the signal line is connected to the diffuse reflection sensor, used to receive the detection signal sent by the diffuse reflection sensor; the data transmission line is used to transmit the cigarette case label image of the target cigarette case.

[0060] The focal length of the lens of the image acquisition module can be determined based on the horizontal field of view angle and the vertical field of view angle of the lens, so that the label pasted on the target cigarette box can be completely and clearly presented within the field of view of the camera, ensuring the integrity and clarity of the cigarette box label image. The relationship between the horizontal field of view angle and the vertical field of view angle of the lens and the focal length of the lens is as follows:

[0061]

[0062] Wherein, f represents the focal length of the lens; the horizontal sensor size is half of the width of the camera sensor; the vertical sensor size is half of the height of the camera sensor.

[0063] As an optional implementation manner of the embodiment of the present invention, the process of determining the shooting position of the image acquisition module includes: determining a target surface model corresponding to the shooting position of the image acquisition module, where the target surface model is used to describe the relationship between the first distance and the target recognition rate corresponding to the first distance, the first distance is the distance between the shooting position and the first position, the first position is the position where the center point of the label pasted on the reference cigarette box is located, the reference cigarette box is a cigarette box located at a preset detection position determined before detecting the target cigarette box, the target recognition rate is the image recognition rate determined by the image acquisition module located at the shooting position for the label pasted on the reference cigarette box, the shooting position faces the label pasted on the reference cigarette box, and there is a preset angle between the connection line between the shooting position and the first position and the perpendicular line of the horizontal plane at the first position, and the preset angle belongs to an acute angle; determining the shooting position of the image acquisition module based on the target surface model.

[0064] In the embodiment of the present invention, the reference cigarette box may refer to a cigarette box pre-placed at a preset detection position before detecting the label pasted on the target cigarette box. The specifications of the reference cigarette box may be the same as those of the target cigarette box. The first position may refer to any position within the reference range included in the label pasted on the reference cigarette box. Wherein, the reference range is a preset range centered on the position where the center point of the label is located. Exemplarily, the reference range may be circular or square. The image recognition rate may refer to the probability of accurately recognizing the label in the reference cigarette box image. The reference cigarette box image is obtained by the image acquisition module located at the shooting position for the label pasted on the reference cigarette box. The image acquisition module located at the shooting position faces the label pasted on the reference cigarette box.

[0065] The first distance can be represented by the horizontal distance and the vertical distance between the shooting position of the image acquisition module and the first position. Furthermore, the target surface model can be used to describe the relationship between the horizontal distance and the vertical distance between the shooting position and the first position and the corresponding target recognition rate. Exemplarily, the target surface model may be a two-factor model, that is:

[0066] ρ = a + bx + cy + dxy;

[0067] Among them, ρ represents the target recognition rate; x represents the horizontal distance between the shooting position and the first position, y represents the vertical distance between the shooting position and the first position; a represents a constant factor; b represents a horizontal distance influence factor; c represents a vertical distance influence factor; d represents a horizontal and vertical distance influence factor.

[0068] Specifically, the image acquisition module can be set at several shooting positions, and the first distance between each shooting position and the first position is calculated. The image recognition rate of the reference cigarette box when the image acquisition module is located at each shooting position is determined as the target recognition rate corresponding to each shooting position. Then, a target surface model corresponding to the shooting position of the image acquisition module can be established based on the first distance and the target recognition rate corresponding to each shooting position. Furthermore, a response surface is established based on the target surface model corresponding to the shooting position of the image acquisition module, and the change trend of the target recognition rate corresponding to different first distances is intuitively displayed through the response surface, so as to determine the shooting position of the image acquisition module based on the change trend.

[0069] As an alternative implementation manner of the embodiment of the present invention, determining the target surface model corresponding to the shooting position includes the following steps C1 - C4:

[0070] Step C1, determine the first distance range and the second distance range corresponding to the shooting position. The first distance range is the horizontal distance range from the first position, and the second distance range is the vertical distance range from the first position.

[0071] Step C2, determine at least two first coordinates corresponding to the first distance range and at least two second coordinates corresponding to the second distance range, and determine a plurality of second positions based on the first position, at least two first coordinates, and at least two second coordinates.

[0072] Step C3, sequentially locate the image acquisition module at each second position to perform image acquisition on the label pasted on the reference cigarette box, and determine the image recognition rate corresponding to each second position.

[0073] Step C4, establish a target surface model based on the plurality of second positions and the image recognition rate corresponding to each second position.

[0074] In an embodiment of the present invention, the first distance range may refer to a pre-set distance range from the first position on the horizontal plane of the first position. The second distance range may refer to a pre-set distance range from the first position on the vertical plane of the first position. The first distance range and the second distance range may be pre-set based on the lens focal length of the image acquisition module. Exemplarily, the first distance range may be 6000mm - 10000mm, and the second distance range may be 725mm - 900mm. By evenly dividing the first distance range into at least two third distance ranges, the center point within each third distance range may be used as at least two first coordinates, or the division points of the first distance range combined with the two endpoints of the first distance range may be used as at least two first coordinates. Performing a similar process on the second distance range may obtain at least two second coordinates.

[0075] By pairwise combining each first coordinate with each second coordinate to form a plurality of coordinate pairs, furthermore, the position that is at a first coordinate distance from the first position horizontally and at a second coordinate distance from the first position vertically may be used as the second position. Thus, under each coordinate pair formed by each first coordinate and each second coordinate, a plurality of second positions from the first position may be obtained. By sequentially placing the image acquisition module at each second position to acquire images of the labels pasted on the reference cigarette box, the image recognition rate corresponding to each second position may be determined based on the cigarette box images acquired at each second position. Furthermore, a target surface model corresponding to the shooting position of the image acquisition module may be established based on the first coordinate, the second coordinate, and the image recognition rate corresponding to each second position.

[0076] As an alternative implementation manner of an embodiment of the present invention, determining the shooting position of the image acquisition module based on the target surface model includes the following steps D1 - D4:

[0077] Step D1: Determine the objective function, the second distance, and the third distance corresponding to the target surface model. The second distance is a pre-set horizontal distance from the first position, and the third distance is a pre-set vertical distance from the first position.

[0078] Step D2: Determine the gradient of the objective function at the second distance and the third distance.

[0079] Step D3: Update the second distance based on the gradient to obtain the fourth distance, and update the third distance based on the gradient to obtain the fifth distance.

[0080] Step D4: Take the fourth distance as the second distance, the fifth distance as the third distance, and return to perform the operation of determining the gradient of the objective function at the second distance and the third distance. After repeating the preset number of times, determine the shooting position based on the first position, the second distance, and the third distance.

[0081] In an embodiment of the present invention, based on the target surface model, the shooting position of the image acquisition module can be determined by the gradient descent algorithm. Specifically, the objective function of the target surface model can be set as ρ(θ x , θ y ), where θ x represents the distance from the first position on the horizontal plane to the first position, and θ y represents the distance from the first position on the vertical plane to the first position. Furthermore, the second distance can be represented by , and the third distance can be represented by . And are within the value range of the objective function. Exemplarily, can be set to 6000 mm, and can be set to 725 mm.

[0082] The gradient of the objective function at the second distance and the third distance can include and Therefore, the update of the second distance and the third distance based on the gradient can be expressed as:

[0083]

[0084] where represents the fourth distance; represents the fifth distance; α represents the step size, which is used to control the amplitude of each update, and the value range can be 0.01 - 1. Finally, taking the fourth distance as the second distance and the fifth distance as the third distance, after repeating the steps of determining the gradient of the objective function at the second distance and the third distance and updating the second distance and the third distance based on the gradient for a preset number of times, the position that is at a horizontal distance of the second distance and a vertical distance of the third distance from the first position can be used as the shooting position of the image acquisition module.

[0085] S204. Determine the second information corresponding to the target cigarette case. The second information is obtained by identifying and parsing the cigarette case label image of the target cigarette case, and the second information is the dispatching order information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted. The cigarette case label image contains the label pasted on the target cigarette case.

[0086] As an alternative implementation manner of an embodiment of the present invention, the cigarette case label visual detection method further includes the following steps E1 - E3:

[0087] Step E1. When the target cigarette case is conveyed to the preset detection position, determine the first weight of the target cigarette case.

[0088] Step E2. Obtain the second weight of the target cigarette case included in the second information.

[0089] Step E3: Determine the second detection result of the target cigarette case based on the first weight and the second weight. The second detection result is used to indicate whether the deviation amount between the first weight and the second weight exceeds a preset weight deviation amount.

[0090] In the embodiments of the present invention, the first weight may refer to the actual weight of the target cigarette case. The second weight may refer to the weight recorded in the second information corresponding to the target cigarette case. The deviation amount between the first weight and the second weight may refer to the difference or ratio between the first weight and the second weight. Specifically, when the target cigarette case is transported to a preset detection position, the first weight of the target cigarette case can be collected by a cigarette case weighing module. Furthermore, the deviation amount between the first weight and the second weight of the target cigarette case can be calculated and compared with the preset weight deviation amount, so as to determine the second detection result of the target cigarette case according to the comparison result between the deviation amount between the first weight and the second weight and the preset weight deviation amount.

[0091] Exemplarily, referring to Figure 2 , the cigarette case weighing module may be composed of an electronic scale and an intelligent controller. When the electronic scale receives the detection signal sent by the diffuse reflection sensor, it starts to measure the weight of the cigarette case in real time, and the first weight of the target cigarette case is obtained through the intelligent controller processing and calibrating the weight measured by the electronic scale, so as to ensure the reliability and accuracy of the first weight.

[0092] S205: Determine the first detection result of the target cigarette case based on the first information and the second information. The first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case.

[0093] The technical solution of the embodiments of the present invention determines the first information corresponding to the target cigarette case, and the first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system; the target cigarette case is transported to a preset detection position through a cigarette case transportation module, and the preset detection position is within the detection area of the target cigarette case; the image acquisition module acquires an image of the cigarette case label of the target cigarette case located at the preset detection position to obtain the cigarette case label image, realizing the acquisition of the cigarette case label image of the target cigarette case through the image acquisition module to ensure the integrity and clarity of the cigarette case label image; determine the second information corresponding to the target cigarette case, and the second information is obtained by identifying and parsing the cigarette case label image of the target cigarette case; determine the first detection result of the target cigarette case based on the first information and the second information, and the first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case, realizing the automatic detection of the cigarette case label, reducing manual participation, and improving the detection efficiency and accuracy of the cigarette case label.

[0094] Figure 4Schematic diagram of another visual inspection system for cigarette box labels provided by an embodiment of the present invention. The embodiment of the present invention is applicable to the situation of automatically inspecting the labels pasted on cigarette boxes, and the system can be implemented in the form of hardware and / or software. As Figure 4 shown, the system includes:

[0095] An information acquisition module 301, configured to determine first information corresponding to a target cigarette box. The first information is automatically read from an electronic dispatch list of the target cigarette box and a preset cigarette box production system. The first information is the dispatch list information and production information of the target cigarette box, and the cigarette box production system is used to manage the production process of the target cigarette box;

[0096] An image recognition module 302, configured to determine second information corresponding to the target cigarette box. The second information is obtained by recognizing and analyzing the cigarette box label image of the target cigarette box. The second information is the dispatch list information and production information of the cigarette box to which the label expected to be pasted on the target cigarette box is pasted. The cigarette box label image includes the label pasted on the target cigarette box;

[0097] An information verification module 303, configured to determine a first detection result of the target cigarette box based on the first information and the second information. The first detection result is used to indicate whether there is an error in the label pasted on the target cigarette box.

[0098] Based on any of the above optional technical solutions, optionally, the information acquisition module 301 includes: a dispatch list information reading unit, a production information reading unit, and a first information obtaining unit. Among them, the dispatch list information reading unit is configured to automatically read the dispatch list information of the target cigarette box from a preset keyword list, and the preset keyword list includes the dispatch list information read from all electronic dispatch lists involved in the cigarette box production task; the production information reading unit is configured to automatically read the production information of the target cigarette box from the cigarette box production system; the first information obtaining unit is configured to use the dispatch list information and production information of the target cigarette box as the first information.

[0099] Based on any of the above optional technical solutions, optionally, the process of determining the preset keyword list includes: determining keywords corresponding to third information, where the third information is the dispatch list information read from all electronic dispatch lists involved in the cigarette box production task, and the keywords corresponding to the third information are used to describe the similarities and differences between different electronic dispatch lists among all electronic dispatch lists involved in the cigarette box production task; establishing an initial keyword list based on the keywords corresponding to the third information, and filling the initial keyword list with the third information to obtain the preset keyword list.

[0100] Based on any of the above optional technical solutions, optionally, the cigarette case label vision detection system further includes: a cigarette case conveying module and an image acquisition module. Among them, the cigarette case conveying module is used to convey the target cigarette case to a preset detection position before determining the second information corresponding to the target cigarette case, and the preset detection position is within the detection area of the target cigarette case; the image acquisition module is used to acquire an image of the cigarette case label by acquiring an image of the target cigarette case located at the preset detection position.

[0101] Based on any of the above optional technical solutions, optionally, the process of determining the shooting position of the image acquisition module includes: determining a target surface model corresponding to the shooting position of the image acquisition module, where the target surface model is used to describe the relationship between the first distance and the target recognition rate corresponding to the first distance. The first distance is the distance between the shooting position and the first position, and the first position is the position of the center point of the label pasted on the reference cigarette case. The reference cigarette case is the cigarette case located at the preset detection position determined before detecting the target cigarette case. The target recognition rate is the image recognition rate determined by acquiring an image of the label pasted on the reference cigarette case when the image acquisition module is located at the shooting position. The shooting position faces the label pasted on the reference cigarette case, and there is a preset angle between the line connecting the shooting position and the first position and the vertical line of the horizontal plane at the first position, and the preset angle belongs to an acute angle; determining the shooting position of the image acquisition module based on the target surface model.

[0102] Based on any of the above optional technical solutions, optionally, determining the target surface model corresponding to the shooting position includes: determining the first distance range and the second distance range corresponding to the shooting position. The first distance range is the horizontal distance range from the first position, and the second distance range is the vertical distance range from the first position; determining at least two first coordinates corresponding to the first distance range and at least two second coordinates corresponding to the second distance range, and determining multiple second positions based on the first position, at least two first coordinates, and at least two second coordinates; sequentially locating the image acquisition module at each second position to acquire an image of the label pasted on the reference cigarette case, and determining the image recognition rate corresponding to each second position; establishing a target surface model based on the multiple second positions and the image recognition rate corresponding to each second position.

[0103] Based on any of the above optional technical solutions, optionally, determining the shooting position of the image acquisition module based on the target surface model includes: determining the objective function, the second distance, and the third distance corresponding to the target surface model, where the second distance is the preset horizontal distance from the first position, and the third distance is the preset vertical distance from the first position; determining the gradient of the objective function at the second distance and the third distance; updating the second distance based on the gradient to obtain the fourth distance, and updating the third distance based on the gradient to obtain the fifth distance; taking the fourth distance as the second distance and the fifth distance as the third distance, and returning to perform the operation of determining the gradient of the objective function at the second distance and the third distance. After repeating the preset number of times, the shooting position is determined based on the first position, the second distance, and the third distance.

[0104] Based on any of the above optional technical solutions, optionally, the cigarette case label vision detection system further includes: a cigarette case weighing module. The cigarette case weighing module is configured to determine the first weight of the target cigarette case when the target cigarette case is conveyed to the preset detection position; the image recognition module 302 is further configured to obtain the second weight of the target cigarette case included in the second information; the information verification module 303 is further configured to determine the second detection result of the target cigarette case based on the first weight and the second weight, and the second detection result is used to indicate whether the deviation amount between the first weight and the second weight exceeds the preset weight deviation amount.

[0105] Based on any of the above optional technical solutions, optionally, the information verification module 303 includes: a first determination unit and a second determination unit. The first determination unit is configured to determine the same information that matches in the first information and the second information, and count the number of the same information; the second determination unit is configured to determine the first detection result based on the comparison result between the number of the same information and the preset number.

[0106] In the technical solution of the embodiment of the present invention, the first information corresponding to the target cigarette case is determined by the information acquisition module 301. The first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system, and the first information is the dispatch list information and production information of the target cigarette case. The second information corresponding to the target cigarette case is determined by the image recognition module 302. The second information is obtained by recognizing and analyzing the cigarette case label image of the target cigarette case, and the second information is the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted. The first detection result of the target cigarette case is determined by the information verification module 303 based on the first information and the second information. The first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case, realizing the matching and comparison of the dispatch list information and production information of the target cigarette case automatically read from the electronic dispatch list of the target cigarette case and the preset cigarette case production system with the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted and recognized and analyzed from the cigarette case label image of the target cigarette case, and determining whether there is an error in the label pasted on the target cigarette case, so as to realize the automatic detection of the cigarette case label, reduce the manual participation, and improve the detection efficiency and accuracy of the cigarette case label.

[0107] The cigarette case label vision detection system provided by the embodiment of the present invention can execute the cigarette case label vision detection method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.

[0108] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0109] The above specific embodiments do not constitute a limitation to the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub - combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A visual inspection method for cigarette box labels, characterized in that, The method includes: Determine the first information corresponding to the target cigarette case, where the first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system. The first information is the dispatch list information and production information of the target cigarette case, and the cigarette case production system is used to manage the production process of the target cigarette case; Determine the second information corresponding to the target cigarette case, where the second information is obtained by identifying and analyzing the cigarette case label image of the target cigarette case. The second information is the dispatch list information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted, and the cigarette case label image contains the label pasted on the target cigarette case; Based on the first information and the second information, determine the first detection result of the target cigarette case, where the first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case.

2. The method according to claim 1, wherein Determining the first information corresponding to the target cigarette case includes: Automatically read the dispatch list information of the target cigarette case from a preset keyword list, where the preset keyword list includes the dispatch list information read from all electronic dispatch lists involved in the cigarette case production task; Automatically read the production information of the target cigarette case from the cigarette case production system; Use the dispatch list information and production information of the target cigarette case as the first information.

3. The method according to claim 2, characterized in that, The determination process of the preset keyword list includes: Determine the keywords corresponding to the third information, where the third information is the dispatch list information read from all electronic dispatch lists involved in the cigarette case production task, and the keywords corresponding to the third information are used to describe the similarities and differences between different electronic dispatch lists among all electronic dispatch lists involved in the cigarette case production task; Based on the keywords corresponding to the third information, establish an initial keyword list, and fill the initial keyword list with the third information to obtain the preset keyword list.

4. The method according to claim 1, wherein Before determining the second information corresponding to the target cigarette case, it includes: Transport the target cigarette case to a preset detection position through a cigarette case conveying module, and the preset detection position is within the detection area range of the target cigarette case; Collect an image of the target cigarette case located at the preset detection position through an image acquisition module to obtain the cigarette case label image.

5. The method according to claim 4, characterized in that The determination process of the shooting position of the image acquisition module includes: Determine the target surface model corresponding to the shooting position of the image acquisition module, where the target surface model is used to describe the relationship between the first distance and the target recognition rate corresponding to the first distance. The first distance is the distance between the shooting position and the first position, and the first position is the position where the center point of the label pasted on the reference cigarette case is located. The reference cigarette case is the cigarette case located at the preset detection position determined before detecting the target cigarette case. The target recognition rate is the image recognition rate determined by collecting an image of the label pasted on the reference cigarette case when the image acquisition module is located at the shooting position. The shooting position faces the label pasted on the reference cigarette case, and there is a preset angle between the connection line between the shooting position and the first position and the vertical line of the horizontal plane at the first position, and the preset angle belongs to an acute angle; Determine the shooting position of the image acquisition module based on the target surface model.

6. The method according to claim 5, characterized in that, Determining the target surface model corresponding to the shooting position includes: Determine the first distance range and the second distance range corresponding to the shooting position, where the first distance range is the horizontal distance range from the first position, and the second distance range is the vertical distance range from the first position; Determine at least two first coordinates corresponding to the first distance range and at least two second coordinates corresponding to the second distance range, and determine a plurality of second positions based on the first position, the at least two first coordinates, and the at least two second coordinates; Image acquisition of the labels pasted on the reference cigarette case is performed by sequentially placing the image acquisition module at each second position, and determine the image recognition rate corresponding to each second position; Establish the target surface model based on the plurality of second positions and the image recognition rate corresponding to each second position.

7. The method according to claim 5, wherein Determining the shooting position of the image acquisition module based on the target surface model includes: Determine the objective function, the second distance, and the third distance corresponding to the target surface model, where the second distance is the preset horizontal distance from the first position, and the third distance is the preset vertical distance from the first position; Determine the gradient of the objective function at the second distance and the third distance; Update the second distance based on the gradient to obtain the fourth distance, and update the third distance based on the gradient to obtain the fifth distance; Take the fourth distance as the second distance and the fifth distance as the third distance, and return to perform the operation of determining the gradient of the objective function at the second distance and the third distance. After repeating the preset number of times, determine the shooting position based on the first position, the second distance, and the third distance.

8. The method according to claim 4, wherein The method further includes: When the target cigarette case is transported to the preset detection position, determine the first weight of the target cigarette case; Obtain the second weight of the target cigarette case included in the second information; Determine the second detection result of the target cigarette case based on the first weight and the second weight, where the second detection result is used to indicate whether the deviation amount between the first weight and the second weight exceeds the preset weight deviation amount.

9. The method according to claim 1, characterized in that, Determining the first detection result of the target cigarette case based on the first information and the second information includes: Determine the matching identical information in the first information and the second information, and count the number of the identical information; Determine the first detection result based on the comparison result between the number of the identical information and the preset number.

10. A visual inspection system for cigarette box labels, characterized in that, The system includes: An information acquisition module, configured to determine the first information corresponding to the target cigarette case, where the first information is automatically read from the electronic dispatch list of the target cigarette case and a preset cigarette case production system, and the first information is the dispatch list information and production information of the target cigarette case, and the cigarette case production system is used to manage the production process of the target cigarette case; An image recognition module, configured to determine second information corresponding to a target cigarette case, where the second information is obtained by recognizing and analyzing a cigarette case label image of the target cigarette case, and the second information is dispatch order information and production information of the cigarette case to which the label expected to be pasted on the target cigarette case is pasted, and the cigarette case label image contains the label pasted on the target cigarette case; An information verification module, configured to determine a first detection result of the target cigarette case based on the first information and the second information, where the first detection result is used to indicate whether there is an error in the label pasted on the target cigarette case.