A method and device for automatically identifying the direction of a cigarette packet

By combining optical non-contact detection technology with position triggering and color recognition sensing, the automation problem of detecting abnormal cigarette pack orientation has been solved, achieving efficient and accurate cigarette pack orientation detection, and improving cigarette pack packaging quality and production efficiency.

CN122166388APending Publication Date: 2026-06-09SHANGHAI TOBACCO GROUP CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI TOBACCO GROUP CO LTD
Filing Date
2026-04-08
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing cigarette packaging equipment lacks automatic detection functions, making it difficult to effectively detect abnormal cigarette pack orientations (such as reversed front/back, upside down, or reversed left/right), resulting in quality defects and low production efficiency. Manual inspection is inefficient and prone to missed detections.

Method used

Using optical non-contact detection technology, combined with cigarette pack position triggering sensing and color recognition sensing, the real-time color information of the cigarette pack is obtained through the color sensor. The RGB three primary colors and infrared light are synchronously illuminated by four channels and converted into HSI color space values ​​to determine whether the orientation of the cigarette pack meets the standard threshold, thus realizing automatic detection of cigarette pack rotation, up-down reversal, and left-right reversal.

Benefits of technology

It enables real-time online automatic non-contact inspection of cigarette packs, improving inspection efficiency and accuracy, reducing missed and false detections, supporting rapid production changeover, and enhancing the quality and efficiency of cigarette pack packaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
Patent Text Reader

Abstract

This invention provides an automatic detection method and apparatus for identifying the orientation of cigarette packs, relating to the field of cigarette pack packaging technology. The method includes the following steps: S1: Acquire cigarette pack data; S2: Determine whether the cigarette pack has reached a preset detection position; if so, proceed to S3; otherwise, do not perform the operation; S3: Acquire real-time color information of at least one detection area of ​​the cigarette pack using at least one color sensor; S4: Determine whether the real-time color information falls within a standard color threshold range; if so, the cigarette pack orientation is correct and normal conveying is performed; otherwise, the cigarette pack orientation is abnormal and abnormal handling is performed. This invention, through optical non-contact detection technology combined with position sensing and color sensing, can effectively and automatically detect the rotation, vertical reversal, and horizontal reversal of cigarette packs. It allows for rapid production changeover, high detection efficiency, high accuracy, and low risk of missed or false detections. It enables real-time online automatic non-contact detection of cigarette pack orientation, effectively improving the quality and efficiency of cigarette pack packaging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cigarette packaging technology, and in particular, to a detection method and apparatus for automatically identifying the orientation of cigarette packs. Background Technology

[0002] In the automated cigarette packaging process, cigarette packs (i.e., individual boxes of cigarettes) undergo multiple conveying, filling, and packaging stages. During these stages, the packs typically move at high speeds (e.g., over 600 packs per minute) on conveyor belts or channels. Due to mechanical vibration, guide mechanism deviations, or errors in previous processes, the packs may flip or twist during transport, resulting in three types of directional abnormalities: front / back reversed (180° rotation), upside down (pack inverted), and left / right reversed (mirror image error). If these incorrectly oriented packs (commonly known as "reverse packs") flow into subsequent processes such as translucent wrapping and carton packaging, they will cause serious quality defects. For example, reversed packs can lead to inconsistent carton appearances, damaging the brand image; in the translucent wrapping stage, reversed packs may cause tearing of the packaging film or poor sealing, leading to equipment jams or even shutdowns.

[0003] Currently, most tobacco manufacturers lack automated inspection capabilities in their cigarette packaging equipment. They still primarily rely on manual inspection, specifically a two-person collaborative visual inspection mode for pack orientation detection. The process involves two operators positioned on either side of the conveyor belt, using printed patterns, brand logos, and barcodes as directional references to check each pack's front, back, top, bottom, and left / right orientation to ensure compliance with packaging standards. This mode suffers from limitations: low efficiency, limited manual inspection speed (≤200 packs / minute), high-speed operation leading to missed inspections requiring slower speeds to match the operator's pace, impacting overall production efficiency, high quality risk, and long working hours causing visual fatigue. The missed inspection rate can reach 3%–5%. Reversed packs flowing into subsequent packaging processes cause errors in the transparent packaging, requiring disassembly and rework, increasing quality costs, wasting labor, and raising concerns about inconsistent human judgment standards. The risk of reversed packs entering the market is high, making 100% accurate control difficult.

[0004] Currently, most enterprises are increasingly focusing on the development of automatic detection for abnormal cigarette pack orientation. For example, Chinese invention patent CN115258303A discloses a device for detecting the reversibility of irregularly shaped cigarette packs. A top plate, bottom plate, outer side plate, and inner side plate are fixedly connected to form an installation cavity. A swing arm support frame is provided within the installation cavity, and a support guide rod and a support adjustment rod are mounted on the swing arm support frame. The two ends of the support guide rod and the support adjustment rod are inserted into mounting holes on the outer side plate and the inner side plate, respectively. The lower ends of two vertical height adjustment rods are fixedly connected to the swing arm support frame, and the upper ends pass through the top plate and are limited by nuts. Springs are fitted on both the height adjustment rod and the support guide rod. A swing arm is movably mounted on the support adjustment rod, with a swing light-blocking plate fixed to the upper end and a detection rod fixed to the lower end. A detection opening is provided on the bottom plate, and the detection rod is located within the detection opening. Fiber optic heads are respectively installed on the inner side plate and the outer side plate, with the swing light-blocking plate located between the two fiber optic heads. This invention can detect innovative reversible cigarette packs with high sensitivity and without damaging the surface of the cigarette pack.

[0005] However, the aforementioned cigarette pack reversal detection device still has the following drawbacks: it can only detect the orientation of irregularly shaped cigarette packs, and it can only detect those that are obviously reversed (i.e., upside down). It is not sensitive to cigarette packs that are reversed (180° rotation) or reversed (mirror image error). The detection dimension is limited, and the mechanical triggering scheme requires manual adjustment of the height adjustment rod and support guide rod when changing the cigarette pack specifications (taking ≥10 minutes), which makes it impossible to quickly change production. Furthermore, vibration or slight displacement of the cigarette pack may cause false alarms, which severely limits the accuracy and efficiency of the entire cigarette pack orientation detection.

[0006] Therefore, in order to solve the above problems, it is necessary for us to design an automatic detection method for identifying the direction of cigarette packs. Summary of the Invention

[0007] The purpose of this invention is to provide an automatic detection method for identifying the orientation of cigarette packs. By using optical non-contact detection technology, combined with cigarette pack position triggering sensing and color recognition sensing, it can effectively and automatically detect the rotation, up-down reversal, and left-right reversal of cigarette packs. It allows for rapid production changeover, high detection efficiency, high accuracy, and low risk of missed or false detections. It can achieve real-time online automatic non-contact detection of cigarette pack orientation, effectively improving the quality and efficiency of cigarette pack packaging.

[0008] To achieve the above objectives, the present invention employs the following technical solution:

[0009] In a first aspect, this application provides a detection method for automatically identifying the orientation of a cigarette pack, the method comprising the following steps:

[0010] S1: Obtain cigarette pack data;

[0011] S2: Determine whether the cigarette pack has reached the preset detection position. If yes, proceed to step S3; otherwise, do not perform the operation.

[0012] S3: Obtain real-time color information of at least one detection area of ​​the cigarette pack in a non-contact manner using at least one color sensor;

[0013] S4: Determine whether the real-time color information acquired by all color sensors falls within their pre-stored standard color threshold range; if so, the tobacco pack is in the correct direction and is normally conveyed to the next process; otherwise, the tobacco pack is in the wrong direction and the predetermined abnormal handling operation is executed.

[0014] As a preferred embodiment of the present invention, when performing step S1, the cigarette pack specification parameters are obtained as preset specification parameters;

[0015] When performing step S2, the specific steps include:

[0016] S21: Determine if a cigarette pack has reached the preset detection position. If yes, proceed to step S22; otherwise, do not perform the operation.

[0017] S22: Determine whether the specifications of the cigarette pack that has reached the preset detection position are equal to the preset specifications; if yes, proceed to step S3; otherwise, issue an alarm.

[0018] As a preferred embodiment of the present invention, in step S2, a fiber optic sensor is used to detect the position of the cigarette pack in the cigarette pack conveying channel using a red laser light source with a wavelength of 660nm; and when the fiber optic sensor receives reflected light, a polarizing filter is installed on the fiber optic probe to suppress the interference signal of specular reflection light caused by the transparent film of the cigarette pack.

[0019] As a preferred embodiment of the present invention, step S3 specifically includes:

[0020] S31: Using a color sensor, the detection area of ​​the cigarette pack is synchronously illuminated with four channels of RGB three primary colors and infrared light, and the reflected light is received;

[0021] S32: Converts the reflected light signal into digital color values ​​using a 16-bit analog-to-digital converter;

[0022] S33: Convert the digital color values ​​based on the RGB color space into HSI color space values ​​as real-time color information.

[0023] As a preferred embodiment of the present invention, when performing step S1, the HSI standard color threshold of the corresponding detection area of ​​the cigarette pack is obtained based on the high-definition image of the cigarette pack and the setting position of the color sensor, and is denoted as the standard color threshold.

[0024] During step S4, it is determined whether the HSI color space values ​​acquired by each color sensor fall within its pre-stored HSI standard color threshold range; if so, the tobacco pack is in the correct orientation and is conveyed normally to the next process; otherwise, an alarm is issued.

[0025] As a preferred embodiment of the present invention, when performing step S3, at least two detection areas are located on different sides of the cigarette pack;

[0026] When performing step S4, the real-time color information of all detection areas is compared with their respective standard color thresholds to comprehensively determine the front and back, up and down and / or left and right directions of the cigarette pack.

[0027] As a preferred embodiment of the present invention, when performing step S4, performing a predetermined exception handling operation includes at least one of the following:

[0028] S41: Send a stop command to the drive controller of the cigarette pack transportation equipment to stop the transportation equipment from running;

[0029] S42: Trigger an audible and / or visual alarm to alert the operator to remove a cigarette pack that is oriented incorrectly.

[0030] As a preferred embodiment of the present invention, the method further includes step S5: recording the occurrence event of the directional abnormal cigarette pack, the event including at least the occurrence time and / or error type, and updating the error count; generating a quality statistics report based on the recorded data.

[0031] Secondly, this application provides a detection device for automatically identifying the orientation of a cigarette pack, the device comprising:

[0032] The data acquisition module is used to acquire data from cigarette packs.

[0033] The position determination module determines whether the cigarette pack has reached the preset detection position. If it has, the color sensing module is activated; otherwise, no operation is performed.

[0034] A color sensing module is used to acquire real-time color information of at least one detection area of ​​the cigarette pack in a non-contact manner through at least one color sensor;

[0035] The judgment and execution module is used to determine whether the real-time color information acquired by all color sensors falls within the range of their pre-stored standard color thresholds; if so, the tobacco pack is in the correct direction and is normally transported to the next process; otherwise, the tobacco pack is in the wrong direction and the predetermined abnormal handling operation is executed.

[0036] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method provided by any possible implementation of the first aspect.

[0037] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided by any possible implementation of the first aspect.

[0038] The beneficial effects of the automatic identification method and device for cigarette pack orientation of the present invention are as follows: by using optical non-contact detection technology, combined with cigarette pack position triggering sensing and color recognition sensing, the rotation, up-down reversal, and left-right reversal of cigarette packs can be effectively and automatically detected. It can quickly change production, has high detection efficiency, high accuracy, and is not prone to missed or false detections. It can realize real-time online automatic non-contact detection of cigarette pack orientation, effectively improving the quality and efficiency of cigarette pack packaging. Attached Figure Description

[0039] Figure 1 This is a flowchart illustrating the detection method for automatically identifying the orientation of a cigarette pack according to the present invention. Detailed Implementation

[0040] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.

[0041] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.

[0042] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.

[0043] Example 1: As Figure 1 As shown, Figure 1 This is a flowchart illustrating a detection method for automatically identifying the orientation of a cigarette pack according to the present invention. It is merely one embodiment of the present invention. The method for automatically identifying the orientation of a cigarette pack includes the following steps:

[0044] S1: Obtain cigarette pack data;

[0045] To perform orientation detection on a type of cigarette pack, it is necessary to know the parameter data of that type of cigarette pack in advance, such as the specification parameters of the cigarette pack and the pattern parameters of its various surfaces, so as to facilitate the orientation detection of the cigarette pack later.

[0046] The parameters of the cigarette packs can be pre-stored in the control terminal or measured and identified on-site. Generally, in order not to affect the efficiency of the cigarette pack packaging and transportation line, the parameters of all cigarette packs in the factory are measured in advance and stored in the control terminal. Whenever a certain type of cigarette pack needs to be oriented, the parameter data of that cigarette pack can be retrieved with one click.

[0047] When measuring the parameters of all cigarette packs in the factory in advance, repeating the measurement and sampling multiple times for each pack can effectively eliminate errors and ensure that the parameters of the cigarette packs are accurate.

[0048] S2: Determine whether the cigarette pack has reached the preset detection position. If yes, proceed to step S3; otherwise, do not perform the operation.

[0049] Here, it is to determine whether the cigarette pack has reached the cigarette pack direction detection position. Once the cigarette pack reaches the cigarette pack direction detection position, the detection is triggered and a cigarette pack arrival signal is sent.

[0050] This step aims to provide precise timing control for color detection; during step S2, a fiber optic sensor is used to detect the position of the cigarette pack in the cigarette pack conveying channel using a red laser light source with a wavelength of 660nm; and when the fiber optic sensor receives reflected light, a polarizing filter is installed on the fiber optic probe to suppress the interference signal of specular reflection light caused by the transparent film of the cigarette pack.

[0051] A fiber optic sensor uses a 660nm red laser as the detection light source to detect the position of cigarette packs in the cigarette pack conveying channel. This specific wavelength was chosen to avoid peak interference from the white LED lighting spectrum commonly found in the workshop, thus reducing ambient light interference at the source. When a cigarette pack reaches the preset detection position, it will block or reflect the laser, which will be detected by the fiber optic sensor. To further improve the signal-to-noise ratio, a polarization filter is installed at the sensor receiver. This filter can effectively filter out specular reflections (glare) with a specific polarization direction generated by the transparent packaging film of the cigarette pack, avoiding false interference signals and ensuring that the detected signal is a valid diffuse reflection signal. Once the cigarette pack is confirmed to be in place, the sensor immediately generates a high-level trigger signal.

[0052] The fiber optic sensor has high sensitivity and anti-interference capabilities, and can be stably triggered during high-speed operation. When the cigarette pack reaches the detection position, it triggers the "cigarette pack in position signal" to start the color sensor to detect the direction of the cigarette pack.

[0053] S3: Obtain real-time color information of at least one detection area of ​​the cigarette pack in a non-contact manner using at least one color sensor;

[0054] This step is the core detection step of the method. After receiving the trigger "cigarette pack in position signal" from step S2, ensure that the cigarette pack has reached the detection position in the cigarette pack direction, and immediately start one or more high-precision color sensors to acquire color information of the cigarette pack at the detection position.

[0055] When performing step S3, the specific steps include:

[0056] S31: Using a color sensor, the detection area of ​​the cigarette pack is synchronously illuminated with four channels of RGB three primary colors and infrared light, and the reflected light is received;

[0057] S32: Converts the reflected light signal into digital color values ​​using a 16-bit analog-to-digital converter;

[0058] S33: Convert the digital color values ​​based on the RGB color space into HSI color space values ​​as real-time color information.

[0059] Specifically, a four-channel light source, consisting of RGB primary colors and infrared (IR) light, synchronously illuminates the area to be detected on the cigarette pack (such as the front logo area and the side color mark area). The reflected light is received by the sensor and converted into a digital signal by a 16-bit high-precision analog-to-digital converter (ADC), thus obtaining the original RGB-IR digital color values. This process provides a color resolution of up to 0.1%, capable of capturing subtle color differences imperceptible to the human eye. To further enhance the robustness of color judgment, the acquired RGB color space values ​​are converted into HSI color space values ​​in real time using a built-in algorithm. The HSI model decomposes color information into hue, saturation, and lightness. Hue (H) and saturation (S) are largely independent of light intensity (I), making this method highly tolerant of changes in lighting and shadows, resulting in more stable judgment criteria.

[0060] Moreover, the color sensor features high precision and fast response, making it suitable for high-speed packaging machines (detection speed ≥ 600 boxes / minute).

[0061] S4: Determine whether the real-time color information acquired by all color sensors falls within their pre-stored standard color threshold range; if so, the tobacco pack is in the correct direction and is normally conveyed to the next process; otherwise, the tobacco pack is in the wrong direction and the predetermined abnormal handling operation is executed.

[0062] In other words, the comparison and judgment of color information is carried out. This step compares the real-time color information obtained in step S3 with the preset standard threshold range one by one. If all the real-time color information falls within the corresponding standard threshold range, the direction of the cigarette pack is determined to be correct and the cigarette pack can be transported to the next packaging process normally. Conversely, if the real-time color information of any detection point exceeds its standard threshold range, the direction of the cigarette pack is determined to be abnormal and a predetermined abnormal handling operation needs to be performed.

[0063] This invention provides an automatic detection method for identifying the orientation of cigarette packs. By using optical non-contact detection technology, combined with cigarette pack position triggering sensing and color recognition sensing, it can effectively and automatically detect the rotation, vertical reversal, and horizontal reversal of cigarette packs. It allows for rapid production changeover, high detection efficiency, high accuracy, and low risk of missed or false detections. It enables real-time online automatic non-contact detection of cigarette pack orientation, effectively improving the quality and efficiency of cigarette pack packaging.

[0064] Example 2, still as Figure 1 As shown, this is only one embodiment of the present invention. Based on the first embodiment, in the detection method for automatically identifying the direction of a cigarette pack of the present invention, when performing step S1, the cigarette pack specification parameters are obtained as preset specification parameters.

[0065] Meanwhile, when performing step S2, the specific steps include:

[0066] S21: Determine if a cigarette pack has reached the preset detection position. If yes, proceed to step S22; otherwise, do not perform the operation.

[0067] S22: Determine whether the specifications of the cigarette pack that has reached the preset detection position are equal to the preset specifications; if yes, proceed to step S3; otherwise, issue an alarm.

[0068] In other words, the cigarette pack orientation detection will only be performed after the cigarette pack of the specified specification arrives at the cigarette pack orientation detection position; otherwise, if the cigarette pack of an abnormal specification arrives at the cigarette pack orientation detection position, there will inevitably be a color detection and recognition error or even no color parameters of the target detection point can be detected, and the next step of cigarette pack orientation detection cannot be performed.

[0069] In one embodiment of the present invention, when performing step S1, the HSI standard color threshold of the corresponding detection area of ​​the cigarette pack is obtained based on the high-definition image of the cigarette pack and the setting position of the color sensor, and is denoted as the standard color threshold.

[0070] During step S4, it is determined whether the HSI color space values ​​acquired by each color sensor fall within its pre-stored HSI standard color threshold range; if so, the tobacco pack is in the correct orientation and is conveyed normally to the next process; otherwise, an alarm is issued.

[0071] Specifically, during step S4, the control system (such as a PLC) pre-stores the learned and calibrated standard color information threshold ranges corresponding to the correctly oriented smoke pack (for example, in the HSI space, the standard range of hue H can be [H_min, H_max], and the standard range of saturation S can be [S_min, S_max]). The system compares the HSI color space values ​​(such as H and S values) of the real-time color information obtained in step S3 with these preset standard threshold ranges one by one.

[0072] For scenarios requiring detection of multiple directions (front and back, up and down, left and right), this method sets up multiple detection points (i.e., uses multiple color sensors) and combines the comparison results of all detection points. It then uses "AND" logic to make the final judgment. Only when all points pass the test is the direction considered completely correct, and the cigarette pack is then transported to the next process normally.

[0073] However, once the orientation of the cigarette pack is determined to be abnormal, a predetermined abnormality handling operation needs to be performed. In this invention, when performing step S4, the predetermined abnormality handling operation includes at least one of the following:

[0074] S41: Send a stop command to the drive controller of the cigarette pack packaging and transportation equipment to stop the transportation equipment from running, prevent the reversed cigarette packs from continuing to flow to subsequent processes, and avoid quality defects and waste of resources;

[0075] S42: Trigger an audible and / or visual alarm to alert the operator to remove a cigarette pack that is oriented incorrectly.

[0076] Example 3, still as Figure 1 The above is only one embodiment of the present invention. Based on any of the above embodiments, in the detection method for automatically identifying the direction of a cigarette pack, when executing step S4, the PLC calls the stored standard threshold and compares the H value returned by the first color sensor A with the hue H threshold in the HSI value of the logo on the front of the cigarette pack, for example [35, 45]. The PLC also compares the S value returned by the second color sensor B with the hue H threshold in the HSI value of the logo on the front of the cigarette pack, for example [75, 85]. Only when both conditions are met—the H value of the first color sensor A ∈ [35, 45] and the S value of the second color sensor B ∈ [75, 85]—does the PLC determine that the direction of the cigarette pack is correct, and the cigarette pack continues to be transported downwards, waiting for the next cigarette pack.

[0077] If either of the above two conditions is not met (for example, the H value of sensor A is 50, which is outside the range), the PLC will immediately determine that the direction is wrong.

[0078] In this invention, when performing step S3, at least two detection areas are located on different sides of the cigarette pack; generally, at least three color sensors are set, two color sensors acquire color information of two different detection points on the front of the cigarette pack respectively, and the third color sensor identifies the color information of a certain detection point on the side of the cigarette pack (such as the brightness characteristics of the barcode area).

[0079] In step S4, an additional condition is added: the brightness value I returned by the third color sensor C must fall within a preset brightness threshold range, such as [60, 70]. At this point, the final judgment logic becomes an AND operation of three conditions: the H value of A meets the standard, the S value of B meets the standard, and the I value of C meets the standard. This achieves the determination of the left and right orientation of the cigarette pack.

[0080] When performing step S4, the real-time color information of all detection areas is compared with their respective standard color thresholds to comprehensively determine the front and back, up and down and / or left and right directions of the cigarette pack.

[0081] Finally, the method further includes step S5: recording the occurrence event of the directional abnormal cigarette pack, the event including at least the occurrence time and / or error type, and updating the error count; generating a quality statistics report based on the recorded data.

[0082] In this invention, the fiber optic sensor uses either the Keyence FS-N41N or FU-67G fiber optic sensor, with the main body IP67 protected and the fiber optic probe armored with stainless steel to prevent damage caused by tobacco debris accumulation or equipment vibration; it is used to accurately locate the position of the tobacco pack and trigger color detection.

[0083] On the other hand, the color sensor uses either the Keyence LR-W70 or MU-N11 color sensor. Of course, different models of color sensors can be used. The color sensor determines whether the cigarette pack is oriented correctly by comparing it with preset standard color values. For cigarette packs that are upside down or left-right reversed, multiple sensors work together to detect color marks or printed features on the edge of the cigarette pack.

[0084] This invention discloses an automatic detection method for identifying the orientation of cigarette packs. Utilizing optical non-contact detection technology, combined with cigarette pack position triggering and color recognition sensing, it can effectively and automatically detect the rotation, vertical reversal, and horizontal reversal of cigarette packs. This allows for rapid production changeovers, reducing downtime to within 5 seconds. The detection efficiency is high, at least 30% faster than manual inspection, and the accuracy is high, minimizing missed and false detections (missed detection rate ≤0.1%, false detection rate ≤0.5%). It enables real-time online automatic non-contact detection of cigarette pack orientation, completely preventing reversed cigarette packs from flowing into subsequent processes and avoiding disassembly and rework due to incorrect transparent paper packaging. The detection speed matches the theoretical capacity of the equipment (400~600 packs / minute), eliminating the need for speed reduction and manual inspection, achieving fully automatic detection, reducing human intervention, improving the automation level of the production line, and effectively improving the quality and efficiency of cigarette pack packaging. Modular mounting brackets are provided, supporting rapid deployment on mainstream packaging machines such as GDX1 / GDX2 / FOCKE, requiring only adjustment of sensor position parameters, and has broad application prospects.

[0085] Example 4: This application provides a detection device for automatically identifying the direction of a cigarette pack. The device includes:

[0086] The data acquisition module is used to acquire data from cigarette packs.

[0087] The position determination module determines whether the cigarette pack has reached the preset detection position. If it has, the color sensing module is activated; otherwise, no operation is performed.

[0088] A color sensing module is used to acquire real-time color information of at least one detection area of ​​the cigarette pack in a non-contact manner through at least one color sensor;

[0089] The judgment and execution module is used to determine whether the real-time color information acquired by all color sensors falls within the range of their pre-stored standard color thresholds; if so, the tobacco pack is in the correct direction and is normally transported to the next process; otherwise, the tobacco pack is in the wrong direction and the predetermined abnormal handling operation is executed.

[0090] Those skilled in the art will clearly understand that the technical solutions of the embodiments of this application can be implemented by means of software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware that can independently complete or cooperate with other components to complete a specific function, wherein the hardware may be, for example, a field-programmable gate array (FPGA), an integrated circuit (IC), etc.

[0091] It is understood that the apparatus provided in the embodiments of the present invention is applicable to the method described in any one of embodiments one to three, and the specific functions of each module can be referred to the above method flow, which will not be repeated here.

[0092] Example 5: An electronic device provided in this embodiment of the invention is used to implement the method described in any one of Examples 1 to 3. The electronic device may include: at least one central processing unit, at least one network interface, a control interface, a memory, and at least one communication bus.

[0093] The communication bus is used to enable communication and information exchange between the various components.

[0094] The network interface may include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0095] The control interface is used to output control operations according to instructions.

[0096] The central processing unit (CPU) may include one or more processing cores. The CPU connects to various parts of the terminal using various interfaces and lines, and executes instructions, programs, code sets, or instruction sets stored in memory, as well as calling data stored in memory, to perform various functions of the terminal and process data according to any one of the methods described in Embodiments 1 to 3.

[0097] The memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), methods for implementing any of the above embodiments one to three, etc.; the data storage area may store data involved in the above method embodiments, etc.

[0098] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any one of embodiments one to three above. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0099] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0100] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0101] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between devices or units may be electrical or other forms.

[0102] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.

[0103] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned memory includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0104] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0105] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0106] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific embodiments of the present invention are limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered within the scope of protection of the present invention.

Claims

1. A method for detecting the direction of a cigarette packet, characterized by: The method includes the following steps: S1: Obtain cigarette pack data; S2: Determine whether the cigarette pack has reached the preset detection position. If yes, proceed to step S3; otherwise, do not perform the operation. S3: Obtain real-time color information of at least one detection area of ​​the cigarette pack in a non-contact manner using at least one color sensor; S4: Determine whether the real-time color information acquired by all color sensors falls within their pre-stored standard color threshold range; if so, the tobacco pack is in the correct direction and is normally conveyed to the next process; otherwise, the tobacco pack is in the wrong direction and the predetermined abnormal handling operation is executed.

2. The detection method for automatically identifying the direction of a cigarette pack according to claim 1, characterized in that: When performing step S1, the cigarette pack specification parameters are obtained and used as preset specification parameters; When performing step S2, the specific steps include: S21: Determine if a cigarette pack has reached the preset detection position. If yes, proceed to step S22; otherwise, do not perform the operation. S22: Determine whether the specifications of the cigarette pack that has reached the preset detection position are equal to the preset specifications; if yes, proceed to step S3; otherwise, issue an alarm.

3. The detection method for automatically identifying the direction of a cigarette pack according to claim 1, characterized in that: In step S2, the position of the cigarette pack in the cigarette pack conveying channel is detected by a fiber optic sensor using a red laser light source with a wavelength of 660nm; and when the fiber optic sensor receives reflected light, a polarizing filter is installed on the fiber optic probe to suppress the interference signal of specular reflection light caused by the transparent film of the cigarette pack.

4. The detection method for automatically identifying the direction of a cigarette pack according to claim 1, characterized in that: When performing step S3, the specific steps include: S31: Using a color sensor, the detection area of ​​the cigarette pack is synchronously illuminated with four channels of RGB three primary colors and infrared light, and the reflected light is received; S32: Converts the reflected light signal into digital color values ​​using a 16-bit analog-to-digital converter; S33: Convert the digital color values ​​based on the RGB color space into HSI color space values ​​as real-time color information.

5. The detection method for automatically identifying the direction of a cigarette pack according to claim 4, characterized in that: When performing step S1, based on the high-definition image of the cigarette pack and the setting position of the color sensor, the HSI standard color threshold of the corresponding detection area of ​​the cigarette pack is obtained and recorded as the standard color threshold. When performing step S4, it is determined whether the HSI color space value acquired by each color sensor falls within its pre-stored HSI standard color threshold range; if so, the tobacco pack is in the correct direction and is normally transported to the next process; otherwise, an alarm is issued.

6. The detection method for automatically identifying the direction of a cigarette pack according to claim 5, characterized in that: When performing step S3, at least two detection areas are located on different sides of the cigarette pack; When performing step S4, the real-time color information of all detection areas is compared with their respective standard color thresholds to comprehensively determine the front and back, up and down and / or left and right directions of the cigarette pack.

7. The detection method for automatically identifying the direction of a cigarette pack according to claim 1, characterized in that: When performing step S4, the predetermined exception handling operation includes at least one of the following: S41: Send a stop command to the drive controller of the cigarette pack transportation equipment to stop the transportation equipment from running; S42: Trigger an audible and / or visual alarm to alert the operator to remove a cigarette pack that is oriented incorrectly.

8. A detection device for automatically identifying the direction of a cigarette packet, characterized in that include: The data acquisition module is used to acquire data from cigarette packs. The position determination module is used to determine whether the cigarette pack has reached the preset detection position. If so, the color sensing module is activated. Conversely, no operation will be performed. A color sensing module is used to acquire real-time color information of at least one detection area of ​​the cigarette pack in a non-contact manner through at least one color sensor; The judgment and execution module is used to determine whether the real-time color information acquired by all color sensors falls within the range of their pre-stored standard color thresholds; if so, the tobacco pack is in the correct direction and is normally transported to the next process; otherwise, the tobacco pack is in the wrong direction and the predetermined abnormal handling operation is executed.

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 computer program, it implements the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.