Cigarette packet detection method, device and system

By image detection of cigarette bags, combined with contour and cable ties detection results, the problems of low efficiency and unstable effect of cigarette bag detection in the prior art are solved, and efficient and accurate cigarette bag detection is achieved.

CN120036518APending Publication Date: 2025-05-27LONGYAN CIGARETTE FACTORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510331845.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The lack of automated means in the prior art to conduct cigarette pack detection, resulting in low manual detection efficiency, unstable effect, and difficulty in comprehensively detecting various quality problems of cigarette packs.

Method used

By obtaining the image of the cigarette bag, performing overall contour detection and cable ties area detection, and combining the contour and cable ties detection results, we can determine whether the cigarette bag is qualified.

Benefits of technology

It realizes efficient, accurate and comprehensive detection of cigarette packs, improves detection efficiency and accuracy, and reduces the error rate of manual detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120036518A_ABST
    Figure CN120036518A_ABST
Patent Text Reader

Abstract

The invention provides a cigarette packet detection method, device and system, and relates to the technical field of tobacco machinery. The cigarette packet detection method comprises the following steps: acquiring an image of a to-be-detected cigarette packet; according to the image of the to-be-detected cigarette packet, detecting the overall contour of the to-be-detected cigarette packet to obtain a contour detection result; according to the colors of the pixel points in the image of the to-be-detected cigarette packet, extracting a region sub-image where a ribbon of the to-be-detected cigarette packet is located from the image of the to-be-detected cigarette packet, and detecting the ribbon according to the region sub-image to obtain a ribbon detection result; and determining whether the to-be-detected cigarette packet is qualified or not according to the contour detection result and the ribbon detection result. By means of the method, the efficiency, accuracy and comprehensiveness of cigarette packet detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of tobacco machinery, and in particular to a cigarette package detection method, device and system. Background Art

[0002] The efficiency of the formula library in and out of the warehouse directly affects the continuity and efficiency of silk production. Cigarette packs are the main raw materials in silk production. In the relevant technology, due to the lack of means and equipment for automatic detection of cigarette packs, cigarette packs are currently mainly detected manually.

[0003] There are the following problems with manual inspection of cigarette packages: First, due to the very large output of cigarette packages, manual inspection is inefficient and the inspection results are unstable; second, due to the complex quality of cigarette packages, there may be many problems such as damaged packages, leaking bottoms, cable ties floating out, and missing cable ties. How to detect these many cigarette package problems during the inspection process in the warehousing link and ensure the accuracy and comprehensiveness of the inspection has become a difficult point in the inspection of cigarette packages in the warehousing link. Summary of the invention

[0004] The present disclosure provides a cigarette package detection method, device and system.

[0005] According to a first aspect of the present disclosure, a cigarette pack detection method is provided, comprising: acquiring an image of a cigarette pack to be detected; based on the image of the cigarette pack to be detected, detecting the overall contour of the cigarette pack to be detected to obtain a contour detection result; based on the color of pixel points in the image of the cigarette pack to be detected, extracting a region sub-image where a cable tie of the cigarette pack to be detected is located from the image of the cigarette pack to be detected, and detecting the cable tie based on the region sub-image to obtain a cable tie detection result; and determining whether the cigarette pack to be detected is qualified based on the contour detection result and the cable tie detection result.

[0006] In some embodiments, the contour detection result includes a first contour detection result and a second contour detection result, and the overall contour of the cigarette package to be detected is detected based on the image of the cigarette package to be detected to obtain the contour detection result, including: determining the degree of matching between the image of the cigarette package to be detected and the standard cigarette package template; determining the first contour detection result of the cigarette package to be detected based on the matching degree; extracting the contour features of the cigarette package to be detected from the image of the cigarette package to be detected, wherein the contour features include at least one of the grayscale value, curvature, length, and width of the cigarette package to be detected; determining the second contour detection result of the cigarette package to be detected based on the cigarette package contour features and a preset contour feature threshold.

[0007] In some embodiments, extracting the contour features of the cigarette pack to be detected from the image of the cigarette pack to be detected includes: performing edge detection on the image of the cigarette pack to be detected using an edge detection algorithm to determine the edge pixel area of ​​the cigarette pack to be detected; extracting the contour features of the cigarette pack to be detected from the edge pixel area of ​​the cigarette pack to be detected, wherein the contour features include the grayscale value, curvature, length, and width of the cigarette pack to be detected.

[0008] In some embodiments, extracting a sub-image of the area where the cable tie of the cigarette pack to be detected is located from the image of the cigarette pack to be detected based on the color of the pixel points in the image of the cigarette pack to be detected includes: converting the image of the cigarette pack to be detected from a first color space to a second color space to obtain a converted image; and using the area where the pixels whose colors in the converted image are within a color threshold interval are located as the sub-image of the area where the cable tie of the cigarette pack to be detected is located, wherein the color threshold interval is pre-set according to the color of the cable tie.

[0009] In some embodiments, detecting the cable tie according to the region sub-graph to obtain a cable tie detection result includes: performing morphological processing on the region sub-graph to obtain a processed region sub-graph; extracting features of the cable tie from the processed region sub-graph, wherein the features of the cable tie include at least one of the number, shape, size, and position of the cable tie; and determining the cable tie detection result according to the features of the cable tie and a preset cable tie feature threshold.

[0010] In some embodiments, determining whether the cigarette package to be inspected is qualified based on the contour detection result and the tie detection result includes: when the first contour detection result and the second contour detection result indicate that the contour is normal, and the tie detection result indicates that the tie is normal, determining that the cigarette package to be inspected is qualified; otherwise, determining that the cigarette package to be inspected is unqualified.

[0011] According to a second aspect of the present disclosure, a cigarette pack detection device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the cigarette pack detection method as described above based on instructions stored in the memory.

[0012] According to a third aspect of the present disclosure, a cigarette pack detection system is provided, comprising: a collection device configured to collect images of cigarette packs to be detected; and a controller comprising the cigarette pack detection device as described above.

[0013] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the cigarette package detection method as described above is implemented.

[0014] According to a fifth aspect of the present disclosure, a computer program product is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the cigarette package detection method as described above is implemented.

[0015] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0017] Figure 1 is a flow chart of a cigarette pack detection method according to some embodiments of the present disclosure;

[0018] Figure 2 is a flowchart of contour detection steps according to some embodiments of the present disclosure;

[0019] Figure 3 is a flow chart of cable tie detection steps according to some embodiments of the present disclosure;

[0020] Figure 4 is a flowchart of a cigarette pack detection method according to other embodiments of the present disclosure;

[0021] Figure 5 is a schematic structural diagram of a cigarette packet detection device according to some embodiments of the present disclosure;

[0022] Figure 6 is a schematic structural diagram of a cigarette packet detection device according to other embodiments of the present disclosure;

[0023] Figure 7 It is a structural schematic diagram of a cigarette pack detection system according to some embodiments of the present disclosure.

[0024] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings. DETAILED DESCRIPTION

[0025] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0026] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0027] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0028] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0029] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0030] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0031] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0032] In order to solve the problems existing in the related art, the present disclosure discloses a cigarette package detection method, device and system, which can perform cigarette package detection more efficiently, accurately and comprehensively.

[0033] Figure 1 FIG. 1 is a flow chart of a cigarette pack detection method according to some embodiments of the present disclosure. Figure 1 As shown, the cigarette package detection method includes steps S11 to S14.

[0034] Step S11, obtaining an image of the cigarette package to be detected.

[0035] In some examples, the cigarette pack detection method is performed by a cigarette pack detection device. In these examples, the cigarette pack detection device receives the image of the cigarette pack to be detected collected by a collection device. The collection device may be an industrial camera, a civilian camera, or the like.

[0036] Step S12, detecting the overall contour of the cigarette package to be detected based on the image of the cigarette package to be detected, so as to obtain a contour detection result.

[0037] Step S12 may be implemented in a variety of ways, and two implementations are described below for exemplary purposes.

[0038] In a first embodiment, the contour detection result includes a first contour detection result and a second contour detection result. In this embodiment, the contour detection step is as follows: Figure 2 As shown, it includes steps S121 to S124.

[0039] Step S121, determining the degree of match between the image of the cigarette package to be detected and the standard cigarette package template.

[0040] The standard cigarette pack template may be a standard cigarette pack image or feature data extracted from the standard cigarette pack image. The feature data may include shape features such as length, width, aspect ratio, and contour coordinates of the standard cigarette pack.

[0041] In some examples, one or more types of standard cigarette package templates are pre-stored. In these examples, the standard cigarette package template corresponding to the type of cigarette package to be detected is first found according to the type of the cigarette package to be detected, and then the matching degree between the image of the cigarette package to be detected and the standard cigarette package template is calculated.

[0042] Furthermore, in the above example, the degree of match between the image of the cigarette package to be detected and the standard cigarette package template can be calculated in the following manner: the degree of feature match between the cigarette package to be detected and the standard cigarette package is calculated; based on the degree of feature match, the degree of match between the image of the cigarette package to be detected and the standard cigarette package template is calculated. For example, after obtaining multiple feature matches, the minimum value between the multiple feature matches can be used as the degree of match between the image of the cigarette package to be detected and the standard cigarette package template. For example, after obtaining multiple feature matches, the multiple feature matches can be weighted and summed to obtain the degree of match between the image of the cigarette package to be detected and the standard cigarette package template.

[0043] In addition, in the above example, the degree of match between the image of the cigarette package to be detected and the standard cigarette package template may also be calculated in other ways. For example, the image of the cigarette package to be detected and the standard cigarette package image are input into the trained machine learning model to output the degree of match between the image of the cigarette package to be detected and the standard cigarette package image.

[0044] In some embodiments, before executing step S121, the cigarette package detection method further includes: constructing a standard cigarette package template. For example, the standard cigarette package template is constructed in the following manner: 1) collecting standard cigarette package images, for example, using an industrial camera to collect multiple defect-free cigarette package images in a fixed position and with a light source; 2) performing denoising filtering, grayscale and other preprocessing on the standard cigarette package images; 3) performing edge detection and binarization on the preprocessed standard cigarette package images to obtain a contour template image; 4) extracting feature data from the contour template image, including but not limited to geometric features (such as contour coordinates, aspect ratio), and key point features (such as pixel point features of the strapping tape); 5) storing the feature data extracted from the standard cigarette package images.

[0045] In some embodiments, before executing step S121, the contour detection step further includes: preprocessing the image of the cigarette package to be detected; and aligning the preprocessed image with a standard cigarette package template.

[0046] The preprocessing may include at least one of image filtering, morphological processing, grayscale processing, etc. For example, image filtering may be mean filtering, median filtering, or Gaussian filtering, etc., and morphological processing may be expansion, corrosion, etc. By performing the above preprocessing on the image, it is helpful to improve the accuracy and processing efficiency of subsequent cigarette package detection.

[0047] Among them, aligning the preprocessed image with the standard cigarette pack template may include: first determining the posture deviation between the two based on the coordinate information of the cigarette pack in the preprocessed image and the coordinate information of the cigarette pack in the standard cigarette pack template, and then aligning the preprocessed image with the standard cigarette pack template (or aligning) through operations such as translation and rotation based on the above posture deviation.

[0048] Step S122: determining the first contour detection result of the cigarette packet to be detected according to the matching degree.

[0049] In some examples, step S122 includes: if the matching degree is greater than a matching degree threshold, determining that the first contour detection result is a normal contour; if the matching degree is less than or equal to the matching degree threshold, determining that the first contour detection result is an abnormal contour. The matching degree threshold can be flexibly set. For example, the matching degree threshold is set to 90%.

[0050] Step S123, extracting the contour features of the cigarette pack to be detected from the image of the cigarette pack to be detected.

[0051] The contour feature of the cigarette package to be detected includes at least one of the gray value, curvature, length and width of the cigarette package to be detected.

[0052] In some examples, an edge detection algorithm is first used to perform edge detection on the image of the cigarette package to be detected to determine the edge pixel area of ​​the cigarette package to be detected; and contour features of the cigarette package to be detected are extracted from the edge pixel area of ​​the cigarette package to be detected.

[0053] For example, the edge detection algorithm may adopt a Canny algorithm, an edge detection algorithm based on deep learning, or other edge detection algorithms.

[0054] For example, the extracted contour features of the cigarette packet to be detected may include the gray value, curvature, length and width of the cigarette packet to be detected.

[0055] Step S124, determining a second contour detection result of the cigarette packet to be detected according to the cigarette packet contour feature and a preset contour feature threshold.

[0056] In some examples, in step S124, a second contour detection result of the cigarette package to be detected is determined by comprehensively comparing multiple cigarette package contour features with a preset contour feature threshold, wherein the second contour detection result is a normal contour detection or an abnormal contour detection.

[0057] In the disclosed embodiment, by comparing the cigarette package image to be detected with the standard cigarette package template, it is possible to quickly detect the defects of the cigarette package such as protruding shape and severe deformation. Furthermore, combining the template matching detection step with the contour feature comparison step can further improve the accuracy of cigarette package detection and reduce the probability of missing abnormal cigarette packages.

[0058] In a second embodiment, the contour detection result includes a first contour detection result. In this embodiment, the contour detection step includes: determining the degree of match between the image of the cigarette package to be detected and the standard cigarette package template; and determining the first contour detection result of the cigarette package to be detected based on the degree of match. Among them, the first contour detection result is that the contour detection is normal or the contour detection is abnormal. In addition, in addition to the above two embodiments, step S12 may also have other embodiments. For example, in the third embodiment, step S12 includes: performing contour detection on the image of the cigarette package to be detected through template matching and grayscale analysis to obtain a contour detection result. For example, in the fourth embodiment, step S12 includes: performing contour detection on the cigarette package to be detected through a grating detection module to obtain a contour detection result. In addition, in the absence of conflict, the above-mentioned multiple embodiments can also be combined to perform contour detection on the cigarette package to be detected.

[0059] Back to Figure 1 Step S13, extracting a region sub-image where the cable tie of the cigarette pack to be detected is located from the image of the cigarette pack to be detected according to the color of the pixel points in the image of the cigarette pack to be detected, and detecting the cable tie according to the region sub-image to obtain a cable tie detection result.

[0060] Step S13 may be implemented in a variety of ways, and two implementations are described below for exemplary purposes.

[0061] In a first embodiment, the cable tie detection step is as follows: Figure 3 As shown, it includes steps S131 to S134.

[0062] Step S131, converting the image of the cigarette package to be detected from the first color space to the second color space to obtain a converted image.

[0063] For example, the first color space is a red-green-blue (RGB) color space, and the second color space is a hue-saturation-brightness (HSV) color space or a brightness-red-green-yellow-blue (LAB) color space.

[0064] In the disclosed embodiment, by converting the image of the cigarette package to be detected from a first color space to a second color space that is more suitable for color detection, it helps to improve the efficiency and accuracy of subsequent cigarette package detection.

[0065] Step S132, taking the area where the pixels whose colors are within the color threshold interval in the converted image are located as the area sub-image where the cable ties of the cigarette pack to be detected are located.

[0066] The color threshold range is preset according to the color of the cable tie.

[0067] Step S133: extracting the features of the cable tie from the region sub-graph.

[0068] The characteristics of the cable ties include at least one of the number, shape, size, and position of the cable ties.

[0069] Step S134, determining a cable tie detection result according to the cable tie feature and a preset cable tie feature threshold.

[0070] The cable tie detection result is a normal cable tie detection result or an abnormal cable tie detection result.

[0071] In some examples, step S134 includes: determining whether the number of cable ties is equal to a preset cable tie number threshold, determining whether the position of the cable tie is within a preset position threshold interval, and determining whether the size of the cable tie is within a preset size threshold interval; if all are yes, determining that the cable tie detection is normal; otherwise, determining that the cable tie detection is abnormal.

[0072] In other examples, step S134 includes: comparing the number, shape, size, and position of the cable ties determined according to the regional sub-graph with corresponding cable tie feature thresholds, and determining a cable tie detection result according to the comparison result.

[0073] In a second embodiment, the cable tie detection step includes: using the area where the pixel points in the image of the cigarette package to be detected are located in the color threshold interval as the area sub-image where the cable tie of the cigarette package to be detected is located; performing image morphological processing on the area sub-image to obtain a processed area sub-image; extracting the features of the cable tie from the processed area sub-image; and determining the cable tie detection result according to the features of the cable tie and a preset cable tie feature threshold. The image morphological processing includes image expansion, corrosion and other processing.

[0074] In the disclosed embodiment, by identifying the area where the cable tie is located based on the color of the pixels in the image of the cigarette package to be inspected, and extracting the cable tie features from the area where the cable tie is located, it is convenient to identify subtle changes in the appearance of the cigarette package, such as whether the cable tie is correctly installed, whether the cable tie has defects or abnormalities, etc.

[0075] Back to Figure 1Step S14, determining whether the cigarette package to be inspected is qualified according to the contour detection result and the cable tie detection result.

[0076] In some examples, the contour detection result includes a first contour detection result and a second contour detection result. In these examples, step S14 includes: if the first contour detection result and the second contour detection result indicate that the contour is normal, and the tie detection result indicates that the tie is normal, determining that the cigarette package to be detected is qualified; otherwise, determining that the cigarette package to be detected is unqualified.

[0077] In other examples, the contour detection result includes a first contour detection result. In these examples, step S14 includes: if the first contour detection result shows that the contour is normal and the tie detection result shows that the tie is normal, determining that the cigarette package to be detected is qualified; otherwise, determining that the cigarette package to be detected is unqualified.

[0078] In some other examples, step S14 includes: if the contour detection result shows that the contour is normal and the tie detection result shows that the tie is normal, determining that the cigarette package to be detected is qualified; if the contour detection result shows that the contour is abnormal and the tie detection result shows that the tie is abnormal, determining that the cigarette package to be detected is unqualified. If one of the contour detection result and the tie detection result shows that the tie is abnormal, it is uncertain whether the cigarette package to be detected is qualified and further inspection is required.

[0079] In some embodiments, after step S14, the cigarette pack detection method further includes: outputting the cigarette pack detection result. The cigarette pack detection result may include information indicating whether the detection is qualified or unqualified, or requiring further inspection. For example, the cigarette pack detection result is sent to a display device so as to display the cigarette pack detection result on the display device. The display device may include at least one of a display device such as an LED display screen and a personal computer.

[0080] In the disclosed embodiment, by detecting whether the overall outline of the cigarette pack is normal and whether the local tie is normal based on the image of the cigarette pack to be detected, it is possible to efficiently, accurately and comprehensively determine whether the cigarette pack to be detected is qualified. In this way, the efficiency of cigarette pack storage and warehousing can be improved, and the efficiency of silk workshop production and product qualification rate can be improved.

[0081] Figure 4 FIG. 1 is a flow chart of a cigarette pack detection method according to other embodiments of the present disclosure. Figure 4 As shown, the cigarette package detection method includes steps 41 to 46.

[0082] Step 41, obtaining an image of the cigarette package to be inspected.

[0083] In some examples, step 41 includes: the cigarette packet detection device receives an image of the cigarette packet to be detected captured by an industrial camera.

[0084] Step 42, preprocessing the image.

[0085] For example, the preprocessing includes but is not limited to at least one of image denoising, cropping, registration and the like.

[0086] Step 43: overall shape recognition.

[0087] In some embodiments, the correspondence between the cigarette package model and the cigarette package shape (or contour) recognition algorithm is pre-set. In these embodiments, according to the model of the cigarette package to be detected and the above correspondence, the cigarette package shape recognition algorithm corresponding to the model of the cigarette package to be detected is determined; the pre-processed cigarette package image is processed using the cigarette package shape recognition algorithm corresponding to the model of the cigarette package to be detected to obtain the shape recognition result (i.e., contour detection result).

[0088] For example, for cigarette package model "A", two cigarette package shape recognition algorithms, namely template matching algorithm and feature comparison algorithm, are set; for cigarette package model "B", one cigarette package shape recognition algorithm, namely template matching algorithm, is set. If the model of the cigarette package to be detected is "A", the shape detection of the cigarette package to be detected is performed based on the two cigarette package shape recognition algorithms, namely template matching algorithm and feature comparison algorithm. In the above embodiment, before performing shape recognition, the model of the cigarette package to be detected can be determined based on the following methods: obtaining the barcode or QR code information on the cigarette package to be detected; determining the model of the cigarette package to be detected based on the barcode or QR code information on the cigarette package to be detected. In addition, the model of the cigarette package to be detected can also be determined by other methods. For example, the model of the cigarette package to be detected is determined based on user input information.

[0089] In other embodiments, according to Figure 2 The process shown is to perform appearance inspection on the cigarette package to be inspected.

[0090] Step 44, cable tie identification.

[0091] In some embodiments, the correspondence between the cigarette package model and the cable tie recognition algorithm is preset. In these embodiments, the cable tie recognition algorithm corresponding to the cigarette package model to be detected is determined according to the cigarette package model to be detected and the above correspondence; the pre-processed cigarette package image is processed using the cable tie recognition algorithm corresponding to the cigarette package model to be detected to obtain the cable tie recognition result (i.e., the cable tie detection result).

[0092] For example, two cable tie recognition algorithms are set for cigarette package model "A", and one cable tie shape recognition algorithm is set for cigarette package model "B". If the model of the cigarette package to be detected is "A", the cable tie detection is performed on the cigarette package to be detected based on the cable tie recognition algorithm matching the model.

[0093] In other embodiments, according to Figure 3 The process shown is to perform cable tie inspection on the cigarette packages to be inspected.

[0094] Step 45, determining whether the cigarette pack is abnormal.

[0095] In some embodiments, whether the cigarette package is abnormal is determined based on the overall appearance detection result of the cigarette package and the cable tie detection result.

[0096] If it is determined that the cigarette package is normal, execute step 46; if it is determined that the cigarette package is abnormal, execute step 47.

[0097] Step 46: output or store the cigarette pack detection result.

[0098] For example, the cigarette pack detection result is sent to a display device so as to display the cigarette pack detection result to a user through the display device.

[0099] For example, the cigarette pack inspection results are stored in a designated storage module so that the cigarette pack production process can be tracked later.

[0100] Step 47: outputting a cigarette pack rejection instruction.

[0101] For example, the cigarette pack detection device sends a cigarette pack rejection instruction to the rejection device so that the rejection device rejects unqualified cigarette packs.

[0102] In the disclosed embodiment, the above process can efficiently, accurately and comprehensively inspect cigarette packs, and promptly remove unqualified cigarette packs, thereby improving the efficiency of cigarette pack warehousing and outbound transportation, and ensuring the production efficiency and product qualification rate of the silk-making workshop.

[0103] Figure 5 is a schematic diagram of the structure of a cigarette pack detection device according to some embodiments of the present disclosure. Figure 5 As shown, the cigarette pack detection device 50 is used to execute the cigarette pack detection method as described above, including an acquisition module 51 , a contour detection module 52 , a tie detection module 53 , and a determination module 54 .

[0104] The acquisition module 51 is configured to acquire the image of the cigarette package to be detected.

[0105] The contour detection module 52 is configured to detect the overall contour of the cigarette package to be detected based on the image of the cigarette package to be detected, so as to obtain a contour detection result.

[0106] The cable tie detection module 53 is configured to extract a region sub-image where the cable tie of the cigarette pack to be detected is located from the image of the cigarette pack to be detected according to the color of the pixel points in the image of the cigarette pack to be detected, and detect the cable tie according to the region sub-image to obtain a cable tie detection result.

[0107] The determination module 54 is configured to determine whether the cigarette package to be inspected is qualified according to the contour detection result and the cable tie detection result.

[0108] In the disclosed embodiment, the above device can efficiently, accurately and comprehensively inspect cigarette packs, and promptly remove unqualified cigarette packs, thereby improving the efficiency of cigarette pack storage and out of the warehouse, and ensuring the production efficiency and product qualification rate of the silk-making workshop.

[0109] Figure 6 is a schematic diagram of the structure of a cigarette pack detection device according to other embodiments of the present disclosure. Figure 6 As shown, the cigarette pack detection device 60 includes a memory 61 and a processor 62 coupled to the memory 61. The memory 61 is used to store instructions for executing the corresponding embodiments of the cigarette pack detection method. The processor 62 is configured to execute the cigarette pack detection method in any of the embodiments of the present disclosure based on the instructions stored in the memory 61.

[0110] Figure 7 is a schematic diagram of the structure of a cigarette pack detection system according to some embodiments of the present disclosure. Figure 7 As shown, the cigarette pack detection system includes a collection device 71 and a controller 72 .

[0111] The acquisition device 71 is used to acquire the image of the cigarette package to be detected.

[0112] In some examples, the acquisition device 71 is an industrial camera. In addition, in a specific implementation, the acquisition device 71 can also be a civilian camera.

[0113] In some embodiments, the cigarette pack detection system further includes an arrival detection device. The arrival detection device is configured to detect whether the cigarette pack has reached the collection area, and trigger the collection device 71 to collect images after detecting that the cigarette pack has reached the collection area. Exemplarily, the arrival detection device can be a photoelectric switch.

[0114] The controller 72 includes the cigarette pack detection device as described above, and is used to execute the cigarette pack detection method as described above.

[0115] In some embodiments, the cigarette pack detection system further includes a grating detection module. The grating detection module is used to detect the appearance of the cigarette pack to be detected. By combining the grating detection module with the controller to detect the cigarette pack to be detected, the accuracy of cigarette pack detection can be further improved.

[0116] In some embodiments, the cigarette pack detection system further includes a display device 73. The display device 73 is configured to display the cigarette pack detection result. Exemplarily, the display device 73 may be an LED display screen or a personal computer.

[0117] In some embodiments, the cigarette pack detection system further includes a rejection device 74. The rejection device 74 is configured to reject unqualified cigarette packs according to the cigarette pack rejection instruction output by the controller 72.

[0118] In the disclosed embodiment, through the above system, cigarette packs can be inspected efficiently, accurately and comprehensively, and unqualified cigarette packs can be removed in time, thereby improving the efficiency of cigarette pack entry and exit, and ensuring the production efficiency and product qualification rate of the silk-making workshop.

[0119] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.

[0120] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.

[0121] These computer-readable program instructions may also be stored in a computer-readable memory, which cause the computer to work in a specific manner to produce an article of manufacture, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.

[0122] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.

[0123] Through the cigarette pack detection method, device and system in the above-mentioned embodiments, cigarette packs can be detected efficiently, accurately and comprehensively, thereby improving the efficiency of cigarette pack entry and exit, and ensuring the production efficiency and product qualification rate of the silk-making workshop.

[0124] So far, the cigarette pack detection method, device and system according to the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

Claims

1. A cigarette package detection method, comprising: Acquire an image of a cigarette package to be inspected; According to the image of the cigarette pack to be detected, detecting the overall contour of the cigarette pack to be detected to obtain a contour detection result; According to the color of the pixel points in the image of the cigarette pack to be detected, extracting a region sub-image where the cable tie of the cigarette pack to be detected is located from the image of the cigarette pack to be detected, and detecting the cable tie according to the region sub-image to obtain a cable tie detection result; Whether the cigarette package to be inspected is qualified is determined based on the contour detection result and the cable tie detection result.

2. The cigarette package detection method according to claim 1, wherein: The contour detection result includes a first contour detection result and a second contour detection result. The contour detection result is obtained by detecting the overall contour of the cigarette package to be detected based on the image of the cigarette package to be detected, and includes: Determining the degree of match between the image of the cigarette package to be detected and a standard cigarette package template; Determining a first contour detection result of the cigarette packet to be detected according to the matching degree; Extracting contour features of the cigarette package to be detected from the image of the cigarette package to be detected, wherein the contour features include at least one of a grayscale value, a curvature, a length, and a width of the cigarette package to be detected; A second contour detection result of the cigarette packet to be detected is determined according to the cigarette packet contour feature and a preset contour feature threshold.

3. The cigarette package detection method according to claim 2, wherein: Extracting the contour features of the cigarette pack to be detected from the image of the cigarette pack to be detected includes: Performing edge detection on the image of the cigarette package to be detected using an edge detection algorithm to determine an edge pixel area of ​​the cigarette package to be detected; The contour features of the cigarette pack to be detected are extracted from the edge pixel region of the cigarette pack to be detected, wherein the contour features include the gray value, curvature, length, and width of the cigarette pack to be detected.

4. The cigarette package detection method according to claim 1, wherein: The extracting, from the image of the cigarette pack to be detected, a sub-image of the region where the cable tie of the cigarette pack to be detected is located according to the color of the pixel points in the image of the cigarette pack to be detected comprises: Converting the image of the cigarette package to be detected from the first color space to the second color space to obtain a converted image; The area where the pixels in the converted image are located in the color threshold interval is used as the area sub-image where the cable tie of the cigarette package to be detected is located, wherein the color threshold interval is pre-set according to the color of the cable tie.

5. The cigarette package detection method according to claim 1, wherein: The detecting the cable tie according to the regional sub-graph to obtain a cable tie detection result comprises: Performing morphological processing on the region sub-image to obtain a processed region sub-image; Extracting features of the cable ties from the processed region sub-graph, wherein the features of the cable ties include at least one of the number, shape, size, and position of the cable ties; The cable tie detection result is determined according to the cable tie feature and a preset cable tie feature threshold.

6. The cigarette package detection method according to claim 2, wherein: Determining whether the cigarette package to be inspected is qualified according to the contour detection result and the tie detection result includes: When the first contour detection result and the second contour detection result indicate that the contour is normal, and the tie detection result indicates that the tie is normal, the cigarette package to be detected is determined to be qualified; otherwise, the cigarette package to be detected is determined to be unqualified.

7. A cigarette pack detection device, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the cigarette package detection method according to any one of claims 1 to 6 based on instructions stored in the memory.

8. A cigarette package detection system, comprising: A collection device configured to collect images of cigarette packages to be inspected; A controller comprising the cigarette packet detection device as claimed in claim 7.

9. A computer-readable storage medium having computer program instructions stored thereon, wherein the instructions, when executed by a processor, implement the cigarette package detection method according to any one of claims 1 to 6.

10. A computer program product having computer program instructions stored thereon, wherein the instructions, when executed by a processor, implement the cigarette packet detection method according to any one of claims 1 to 6.