A PLC-based method and device for detecting missing cigarette packs
By adopting a PLC-based missing cigarette pack detection method in cigarette machinery and using image processing technology to acquire and analyze cigarette pack images, the problems of high cost and low detection accuracy of existing detection devices are solved, and efficient and accurate missing cigarette pack detection is achieved.
Patent Information
- Application Number
- CN202211284534.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-10-20
AI Technical Summary
In existing cigarette machinery and equipment, the contact-type missing cigarette detection device increases the machinery investment cost, and the detection method is single, which easily leads to poor detection results of cigarettes in cigarette boxes and cannot meet the detection requirements.
A PLC-based method for detecting missing cigarettes in irregular-shaped packs is used. By acquiring images of the packs to be processed, processing and determining cigarette parameters, and combining them with size parameters for detection, non-contact, high-precision detection is achieved.
The accuracy and reliability of missing cigarette pack detection are improved, the cost of machinery investment is reduced, and more accurate detection results are achieved through image processing technology.
Smart Images

Figure CN115526884B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of cigarette machinery and equipment, and in particular relates to a method and device for detecting missing cigarette packs of irregular-shaped cigarettes based on PLC. Background Art
[0002] Among cigarette machinery, book-style packaging equipment is a packaging unit consisting of a 13-cigarette rigid case flip-top packaging machine (main unit), a 7-cigarette rigid case flip-top packaging machine (auxiliary unit), and a case packing machine. This packaging unit is equipped with a contact-type missing cigarette detection device to detect cigarettes placed in the cigarette case.
[0003] However, most of the above-mentioned detection methods are implemented in the form of mechanical probes, which not only increases the mechanical investment cost of the entire cigarette production process, but also because the detection method is too simple, it is easy to lead to poor detection results of cigarettes in cigarette boxes, and thus cannot meet the detection needs. Summary of the Invention
[0004] This application aims to solve the aforementioned technical problems of increasing the machinery investment cost of the entire cigarette production process, and the fact that the detection method is too simple, which easily leads to poor detection results of cigarettes in cigarette boxes and thus fails to meet the detection requirements. A method and device for detecting missing cigarettes in special-shaped cigarette packs based on PLC are proposed. The specific technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for detecting missing cigarettes in irregular-shaped cigarette packs based on PLC, comprising:
[0006] Acquiring a first image of the cigarette packet to be processed, and processing the first image of the cigarette packet to be processed;
[0007] determining parameters of a first cigarette in the cigarette pack to be processed according to the processed first image;
[0008] The size parameters of the cigarette pack to be processed are obtained from the first image of the cigarette pack to be processed, and the cigarette detection result of the cigarette pack to be processed is obtained based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed.
[0009] In an optional solution of the first aspect, obtaining a cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the number of cigarettes in the cigarette pack to be processed includes:
[0010] Calculating a second cigarette parameter of the cigarette pack to be processed based on the size parameter of the cigarette pack to be processed;
[0011] When it is detected that the parameter of the second cigarette of the cigarette pack to be processed is consistent with the parameter of the first cigarette of the cigarette pack to be processed, a detection result of the first cigarette of the cigarette pack to be processed is obtained;
[0012] When it is detected that the second cigarette parameter of the cigarette pack to be processed is inconsistent with the first cigarette parameter of the cigarette pack to be processed, the detection result of the second cigarette of the cigarette pack to be processed is obtained.
[0013] In another optional solution of the first aspect, after determining the parameters of the first cigarette in the cigarette pack to be processed based on the processed first image, the method further includes:
[0014] Obtaining a cigarette arrangement of the cigarette pack to be processed based on the first cigarette parameter of the cigarette pack to be processed;
[0015] According to the matching result between the cigarette arrangement of the cigarette pack to be processed and the preset cigarette arrangement, the third cigarette detection result of the cigarette pack to be processed is obtained.
[0016] In yet another optional solution of the first aspect, after obtaining the size parameters of the cigarette packet to be processed from the first image of the cigarette packet to be processed, the method further includes:
[0017] Acquire a second image of the cigarette pack to be processed; wherein the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is inconsistent with the shooting angle of the cigarettes in the second image of the cigarette pack to be processed;
[0018] fusing the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed;
[0019] According to the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed, a detection result of the fourth cigarette in the cigarette pack to be processed is obtained.
[0020] In another optional solution of the first aspect, the size parameter of the cigarette pack to be processed includes the diameter of the cigarettes in the cigarette pack to be processed;
[0021] A detection result of the fourth cigarette in the cigarette pack to be processed is obtained based on the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed, including:
[0022] determining the length of cigarettes in the cigarette pack to be processed based on the fused image of the cigarette pack to be processed;
[0023] Determining the type of cigarettes in the cigarette pack to be processed based on the length and diameter of the cigarettes in the cigarette pack to be processed;
[0024] According to the matching result of the cigarette type of the cigarette pack to be processed and the preset cigarette type, the fourth cigarette detection result of the cigarette pack to be processed is obtained.
[0025] In another optional solution of the first aspect, after fusing the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed, the method further includes:
[0026] Determining the arrangement order of characteristic patterns of each cigarette from the fused image of the cigarette pack to be processed;
[0027] When it is detected that the arrangement order of the characteristic patterns of at least one cigarette is inconsistent, a detection result of the fifth cigarette of the cigarette pack to be processed is obtained;
[0028] When it is detected that the arrangement order of the characteristic patterns of all cigarettes is consistent, the detection result of the sixth cigarette of the cigarette pack to be processed is obtained.
[0029] In another optional solution of the first aspect, after obtaining the cigarette detection result of the cigarette pack to be processed based on the size parameter of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed, the method further includes:
[0030] Determining cigarettes to be removed from the cigarette packs to be processed based on the cigarette detection results of the cigarette packs to be processed;
[0031] Send prompt information corresponding to the cigarettes to be rejected to the terminal.
[0032] In a second aspect, an embodiment of the present application provides a PLC-based device for detecting missing cigarettes in irregular-shaped packs, comprising:
[0033] a first processing module, configured to acquire a first image of the cigarette packet to be processed and process the first image of the cigarette packet to be processed;
[0034] A second processing module, configured to determine the first cigarette parameter of the cigarette pack to be processed based on the processed first image;
[0035] The first analysis module is used to obtain the size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed, and obtain the cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed.
[0036] In an optional solution of the second aspect, the first analysis module includes:
[0037] a calculation unit, configured to calculate a second cigarette parameter of the cigarette pack to be processed based on the size parameter of the cigarette pack to be processed;
[0038] a first analyzing unit, configured to obtain a detection result of the first cigarette in the cigarette pack to be processed when detecting that the parameter of the second cigarette in the cigarette pack to be processed is consistent with the parameter of the first cigarette in the cigarette pack to be processed;
[0039] The second analyzing unit is used to obtain a detection result of the second cigarette in the cigarette pack to be processed when it is detected that the parameters of the second cigarette in the cigarette pack to be processed are inconsistent with the parameters of the first cigarette in the cigarette pack to be processed.
[0040] In yet another optional solution of the second aspect, the apparatus further comprises:
[0041] a third processing module, configured to determine the first cigarette parameter of the cigarette pack to be processed according to the processed first image, and then obtain the cigarette arrangement of the cigarette pack to be processed based on the first cigarette parameter of the cigarette pack to be processed;
[0042] The second analysis module is used to obtain a third cigarette detection result of the cigarette pack to be processed based on a matching result between the cigarette arrangement of the cigarette pack to be processed and a preset cigarette arrangement.
[0043] In yet another optional solution of the second aspect, the apparatus further comprises:
[0044] an acquisition module, configured to acquire a second image of the cigarette pack to be processed after acquiring the size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed; wherein the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is inconsistent with the shooting angle of the cigarettes in the second image of the cigarette pack to be processed;
[0045] a fusion module, configured to fuse the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed;
[0046] The third analysis module is used to obtain a fourth cigarette detection result of the cigarette pack to be processed based on the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed.
[0047] In another optional solution of the second aspect, the size parameter of the cigarette pack to be processed includes the diameter of the cigarettes in the cigarette pack to be processed;
[0048] The third analysis module includes:
[0049] A first determining unit is configured to determine the length of a cigarette in the cigarette pack to be processed based on the fused image of the cigarette pack to be processed;
[0050] A second determining unit is configured to determine the type of cigarettes in the cigarette pack to be processed based on the length and diameter of the cigarettes in the cigarette pack to be processed;
[0051] The third analysis unit is used to obtain a fourth cigarette detection result of the cigarette pack to be processed based on the cigarette type of the cigarette pack to be processed and the matching result of the preset cigarette type.
[0052] In yet another optional solution of the second aspect, the apparatus further comprises:
[0053] a fourth processing module, configured to fuse the second image of the cigarette pack to be processed with the first image of the cigarette pack to be processed to obtain a fused image of the cigarette pack to be processed, and then determine an arrangement order of characteristic patterns of each cigarette from the fused image of the cigarette pack to be processed;
[0054] a fourth analysis module, configured to obtain a detection result of a fifth cigarette of the cigarette pack to be processed when it is detected that the arrangement order of the characteristic patterns of at least one cigarette is inconsistent;
[0055] The fifth analysis module is used to obtain the detection result of the sixth cigarette of the cigarette pack to be processed when it is detected that the arrangement order of the characteristic patterns of all cigarettes is consistent.
[0056] In yet another optional solution of the second aspect, the apparatus further comprises:
[0057] a fifth processing module, configured to determine cigarettes to be removed from the cigarette packs to be processed based on the cigarette detection results of the cigarette packs to be processed after obtaining the cigarette detection results of the cigarette packs to be processed based on the size parameters of the cigarette packs to be processed and the first cigarette parameter of the cigarette packs to be processed;
[0058] The sending module is used to send prompt information corresponding to the cigarettes to be rejected to the terminal.
[0059] In a third aspect, an embodiment of the present application further provides a PLC-based device for detecting missing cigarettes in irregular-shaped packs, including a processor and a memory;
[0060] The processor is connected to the memory;
[0061] a memory for storing executable program code;
[0062] The processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the PLC-based method for detecting missing cigarette packs of special-shaped cigarettes provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect.
[0063] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the PLC-based method for detecting missing cigarette packs based on special shapes provided in the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect can be implemented.
[0064] In an embodiment of the present application, when inspecting cigarettes within a cigarette pack, a first image of the pack to be processed is first acquired and processed; parameters of the first cigarette in the pack to be processed are then determined based on the processed first image; size parameters of the pack to be processed are then acquired from the first image; and a cigarette detection result for the pack to be processed is obtained based on the size parameters and the first cigarette parameters. By performing image processing on the cigarettes in the pack to be processed and employing a contactless inspection method and an algorithmic inspection method, the accuracy and reliability of missing cigarette detection in irregular-shaped packs can be effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0066] Figure 1 A flow chart of a PLC-based method for detecting missing cigarettes in irregular-shaped packs provided in an embodiment of the present application;
[0067] Figure 2 A schematic diagram of the structure of a PLC-based device for detecting missing cigarettes in irregular-shaped packs provided in an embodiment of the present application;
[0068] Figure 3 A schematic structural diagram of another PLC-based device for detecting missing cigarette packs of irregular shapes provided in an embodiment of the present application. DETAILED DESCRIPTION
[0069] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.
[0070] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application. Different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, even though the embodiment may not be clearly described in the following text.
[0071] 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 elements described without departing from the scope of the present application. Various examples may appropriately omit, replace, or add various processes or components. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted, or combined. In addition, features described in some examples may be combined in other examples.
[0072] See also Figure 1 , Figure 1 A flow chart of a PLC-based method for detecting missing cigarettes in irregular-shaped packs provided in an embodiment of the present application is shown.
[0073] like Figure 1As shown, the PLC-based method for detecting missing cigarette packs of irregular shapes may include at least the following steps:
[0074] Step 102: Acquire a first image of the cigarette packet to be processed, and process the first image of the cigarette packet to be processed.
[0075] The PLC-based method for detecting missing cigarettes in irregular-shaped packs described in the embodiments of this application can be applied, but is not limited to, to a programmable logic controller (PLC). The PLC can effectively and accurately detect incoming cigarette packs according to a program compiled for the method. The PLC can be connected to an industrial computer and an intelligent camera. The industrial computer can be used to perform procedures such as rejecting or transporting incoming cigarette packs according to instructions transmitted by the PLC to ensure the reliability of the inspected incoming cigarette packs. The intelligent camera can be used to photograph the incoming cigarette packs, and the PLC can process the images captured by the intelligent camera to obtain more accurate detection results. It can be understood that the PLC proposed in the embodiment of the present application can be but is not limited to a PLC of model Siemens S7-200, and the synchronous encoder used can be but is not limited to an incremental encoder corresponding to the smart shooting device, so that after the trigger signal input end of the smart shooting device receives the PNP signal, the encoder decodes it, and when the decoding angle is equal to the trigger angle of the smart shooting device, the smart shooting device is controlled to shoot, and the captured image can be sent directly to the PLC.
[0076] It is also understood that, before inspecting the cigarettes within the pack, one or more intelligent camera devices may be pre-installed at the inspection station for the pack to be processed. Possibly, when one intelligent camera device is installed, the intelligent camera device may be automatically adjusted in position by a PLC control to facilitate capturing images of the pack to be processed from different angles. For example, but not limited to, the intelligent camera device may be controlled by the PLC to capture images directly above the pack to be processed during a first preset time interval, and then further controlled by the PLC to capture images directly in front of the pack to be processed during a second preset time interval. The direction of movement to the pack to be processed is not limited to this.
[0077] Possibly, when multiple smart shooting devices are provided, the multiple smart shooting devices can be fixed in advance in different directions of the cigarette pack to be processed so that the cigarette pack to be processed can be photographed simultaneously from different angles. For example, here the multiple smart shooting devices are taken as two smart shooting devices. The first smart shooting device can be, but is not limited to, provided directly above the cigarette pack to be processed so as to photograph the cigarette pack to be processed from directly above the cigarette pack to be processed; the second smart shooting device can be, but is not limited to, provided directly in front of the cigarette pack to be processed so as to photograph the cigarette pack to be processed from directly in front of the cigarette pack to be processed, and the direction of the cigarette pack to be processed here is not limited to this.
[0078] Specifically, when inspecting the cigarettes in a cigarette pack, it is possible, but not limited to, that when the cigarette pack to be processed is transported to the inspection station, the PLC controls the intelligent shooting device to shoot the cigarette pack to be processed to obtain a first image of the cigarette pack to be processed. The first image can be understood as an image obtained by shooting the cigarette pack to be processed from a certain direction, and the certain direction can be, but is not limited to, directly above the cigarette pack to be processed, so that an image of all the cigarettes contained in the cigarette pack to be processed can be obtained more intuitively. It is understandable that the cigarette pack to be processed in the first image here can be at the center of the first image, so that the cigarette pack to be processed in the first image can be analyzed more accurately.
[0079] Furthermore, after obtaining the first image of the cigarette pack to be processed, the first image can be processed based on an image processing algorithm or a visual algorithm. When processing the first image, it is possible, but not limited to, to first select a processing area containing the cigarette pack to be processed from the first image. Then, pixel grayscale processing can be performed on the processing area containing the cigarette pack to be processed, so that regions with different grayscales can be selected from the grayscale-processed processing area. It is understood that when the first image corresponds to directly above the cigarette pack to be processed, the grayscale region corresponding to each cigarette in the first image is significantly different from the surrounding grayscale regions.
[0080] The image processing algorithms or visual algorithms mentioned in the embodiments of the present application may be common image processing techniques in the art and will not be described in detail here.
[0081] Step 104: Determine the first cigarette parameter of the cigarette pack to be processed based on the processed first image.
[0082] Specifically, after processing the first image, parameters of the first cigarette in the cigarette pack to be processed are determined based on the processed first image. Regions of varying grayscale may be selected from the processed first image, but are not limited to these regions. Each selected grayscale region corresponds to a cigarette in the cigarette pack to be processed. The number of cigarettes in the cigarette pack to be processed, i.e., the total number of cigarettes currently detected in the cigarette pack to be processed, can be determined by counting the number of grayscale regions.
[0083] Step 106: Acquire the size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed, and obtain a cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed.
[0084] Specifically, after image processing is performed on the first image of the cigarette package to be processed, the size parameters of the cigarette package to be processed can be determined from the first image after image processing, and the second cigarette parameters of the cigarette package to be processed can be calculated based on the size parameters of the cigarette package to be processed. The size parameters of the cigarette package to be processed can be, but are not limited to, the side length of the cigarette package to be processed. For example, if the first image of the cigarette package to be processed is taken from directly above the cigarette package to be processed, the size parameters of the cigarette package to be processed can be, but are not limited to, the length and width of the area including the bottoms of all cigarettes. It is understandable that the size parameters of the cigarette package to be processed can also be understood as the size of the bottom of the cigarette box used to place the cigarettes, and the bottoms of all cigarettes in the cigarette box are in contact with the bottom of the cigarette box.
[0085] Furthermore, after determining the size parameters of the cigarette pack to be processed, the theoretical number of cigarettes in the pack can be calculated based on the bottom size of the cigarettes corresponding to the pack. It is understood that since the bottom area of each cigarette is consistent, it is possible, but not limited to, to first calculate the bottom area of the pack based on the size parameters of the pack, and then combine the bottom area of the pack and the bottom area of each cigarette to calculate the theoretical number of cigarettes in the pack, which is also the second cigarette parameter of the pack.
[0086] Furthermore, after calculating the theoretical number of cigarettes in the processed cigarette pack, it is possible to determine whether the theoretical number of cigarettes in the processed cigarette pack and the total number of cigarettes currently detected in the processed cigarette pack mentioned above are consistent. Possibly, if it is detected that the theoretical number of cigarettes in the processed cigarette pack and the total number of cigarettes currently detected in the processed cigarette pack are consistent, it can be indicated that the processed cigarette pack does not have any missing cigarettes, and thus a detection result corresponding to the fact that the processed cigarette pack does not have any missing cigarettes can be obtained.
[0087] It is possible that when the theoretical number of cigarettes in the cigarette pack to be processed is detected to be inconsistent with the total number of cigarettes currently detected in the cigarette pack to be processed, it may indicate that there are missing cigarettes in the cigarette pack to be processed, and then a detection result corresponding to the missing cigarettes in the cigarette pack to be processed can be obtained.
[0088] In an embodiment of the present application, the number of cigarettes currently detected in the cigarette pack to be processed and the theoretical number of cigarettes in the cigarette pack to be processed can be combined to accurately determine whether the cigarette pack to be processed is missing cigarettes, thereby improving the accuracy of the detection results.
[0089] As an optional embodiment of the present application, after determining the parameters of the first cigarette in the cigarette pack to be processed according to the processed first image, the method further includes:
[0090] Obtaining a cigarette arrangement of the cigarette pack to be processed based on the first cigarette parameter of the cigarette pack to be processed;
[0091] According to the matching result between the cigarette arrangement of the cigarette pack to be processed and the preset cigarette arrangement, the third cigarette detection result of the cigarette pack to be processed is obtained.
[0092] Specifically, after obtaining the processed first image, the arrangement of the cigarettes in the cigarette pack to be processed can be calculated based on the grayscale regions corresponding to the individual cigarettes selected in the first image. It is understood that the cigarettes on a conventional cigarette pack can be arranged in a certain order, and when some cigarettes are placed randomly, the arrangement of the cigarettes can easily change. Based on this, the arrangement of the cigarettes corresponding to each type of cigarette pack to be processed can be pre-determined, and each type of cigarette pack to be processed and the corresponding arrangement of the cigarettes can be stored.
[0093] Furthermore, after obtaining the arrangement of cigarettes in the pending cigarette pack, a corresponding preset arrangement of cigarettes can be determined in conjunction with the pending cigarette pack, and then a similarity match is performed between the arrangement of cigarettes in the pending cigarette pack and the preset arrangement of cigarettes to obtain a similarity result between the arrangement of cigarettes in the pending cigarette pack and the preset arrangement of cigarettes. It is understood that when the similarity result between the arrangement of cigarettes in the pending cigarette pack and the preset arrangement of cigarettes is greater than or equal to a preset similarity threshold, it can be indicated that the arrangement of cigarettes in the pending cigarette pack is consistent with the preset arrangement of cigarettes, that is, there is no random placement of cigarettes in the pending cigarette pack, and thus a detection result corresponding to the non-random placement of cigarettes in the pending cigarette pack can be obtained.
[0094] It is possible that when the similarity result between the arrangement of cigarettes in the cigarette pack to be processed and the preset arrangement of cigarettes is less than the preset similarity threshold, it may indicate that the arrangement of cigarettes in the cigarette pack to be processed is inconsistent with the preset arrangement of cigarettes, that is, the cigarettes in the cigarette pack to be processed are placed randomly, and then a detection result corresponding to the random placement of cigarettes in the cigarette pack to be processed can be obtained.
[0095] As another optional embodiment of the present application, after obtaining the size parameters of the cigarette packet to be processed from the first image of the cigarette packet to be processed, the method further includes:
[0096] Acquire a second image of the cigarette pack to be processed; wherein the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is inconsistent with the shooting angle of the cigarettes in the second image of the cigarette pack to be processed;
[0097] fusing the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed;
[0098] According to the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed, a detection result of the fourth cigarette in the cigarette pack to be processed is obtained.
[0099] Specifically, after obtaining a first image of the cigarette pack to be processed, a second image of the cigarette pack to be processed can be obtained based on a different shooting direction. Here, the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is different from the shooting angle of the cigarettes in the second image of the cigarette pack to be processed. For example, but not limited to, the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is from directly above the cigarettes, while the shooting angle of the cigarettes in the second image of the cigarette pack to be processed is from directly in front of the cigarettes. This application is not limited to this.
[0100] Furthermore, after obtaining the first and second images of the cigarette pack to be processed, the first and second images can be fused to obtain a fused image that includes both the cigarette shooting angles in the first image and the cigarette shooting angles in the second image. It is understood that the image fusion method in the embodiments of the present application can be, but is not limited to, conventional image processing techniques in the art, and will not be elaborated upon herein.
[0101] It should be noted that the present application is not limited to the fusion processing of the first image and the second image of the cigarette pack to be processed herein. For example, but not limited to, the first image, the second image, the third image and the fourth image of the cigarette pack to be processed can be fused, and the shooting angles of the cigarettes corresponding to the first image, the second image, the third image and the fourth image of the cigarette pack to be processed are different.
[0102] Furthermore, after obtaining the fused image of the cigarette pack to be processed, the length of each cigarette in the pack can be determined based on the fused image. It is understood that because the second image of the pack to be processed corresponds to a photograph taken from the front of the cigarette, the top and bottom of each cigarette can be determined in the fused image of the pack to be processed, and the straight-line distance from the top to the bottom of each cigarette can be calculated using a visual algorithm.
[0103] Furthermore, the calculated length and diameter of each cigarette can be combined to determine the cigarette type corresponding to each cigarette in the processed cigarette pack. It is understood that the type corresponding to cigarettes of different lengths or diameters will definitely be different from the type of cigarettes of the same length or diameter.
[0104] Furthermore, before performing cigarette detection on a cigarette pack, a preset cigarette type corresponding to the pack can be pre-determined. After obtaining the cigarette type corresponding to each cigarette in the pack, the cigarette type corresponding to each cigarette in the pack is matched with the preset cigarette type, and a determination is made based on the matching result to determine whether the pack contains multiple cigarette types. Possibly, if the matching result determines that the pack contains at least two cigarette types, this may indicate that the pack contains misplaced cigarettes, and a detection result corresponding to the misplaced cigarettes in the pack can be obtained.
[0105] Possibly, when it is determined based on the matching result that the processed cigarette pack contains one type of cigarettes, it can indicate that the cigarette pack to be processed does not have the phenomenon of random placement, and then a detection result corresponding to the cigarettes in the cigarette pack to be processed not having the phenomenon of random placement can be obtained.
[0106] As another optional embodiment of the present application, after fusing the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed, the method further includes:
[0107] Determining the arrangement order of characteristic patterns of each cigarette from the fused image of the cigarette pack to be processed;
[0108] When it is detected that the arrangement order of the characteristic patterns of at least one cigarette is inconsistent, a detection result of the fifth cigarette of the cigarette pack to be processed is obtained;
[0109] When it is detected that the arrangement order of the characteristic patterns of all cigarettes is consistent, the detection result of the sixth cigarette of the cigarette pack to be processed is obtained.
[0110] Specifically, after obtaining the fused image of the cigarette pack to be processed, the characteristic pattern of each cigarette in the fused image of the cigarette pack to be processed can be selected, and the arrangement order of the characteristic patterns corresponding to each cigarette can be determined based on the characteristic pattern of each cigarette. Each cigarette can include at least two characteristic patterns, which can be, but are not limited to, any two of the following: a cigarette stem, a cigarette mouthpiece, or a print between the cigarette stem and the cigarette mouthpiece, and these at least two characteristic patterns can determine the placement order of the cigarettes. It is understood that the placement order of the cigarettes here can be, but is not limited to, the cigarette mouthpiece being placed at the top or the cigarette mouthpiece being placed at the bottom.
[0111] Furthermore, after determining the order of the characteristic patterns of each cigarette, it is possible to determine whether the cigarettes in the cigarette pack being processed are inverted. Possibly, if the order of the characteristic patterns of at least one cigarette is detected to be inconsistent, it may indicate that the cigarettes in the cigarette pack being processed are inverted, and a detection result corresponding to the cigarettes in the processed cigarette pack being inverted may be obtained.
[0112] Possibly, when it is detected that the characteristic pattern arrangement order of all cigarettes is consistent, it can indicate that the cigarettes in the cigarette pack to be processed are not inverted, and then a detection result corresponding to the fact that the cigarettes in the processed cigarette pack are not inverted can be obtained.
[0113] It should be noted that whether the above-mentioned cigarette packs are missing cigarettes, whether there are cigarettes placed randomly or whether they are inverted can all be tested by obtaining corresponding test results when the cigarette packs are tested.
[0114] As another optional embodiment of the present application, after obtaining the cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed, the method further includes:
[0115] Determining cigarettes to be removed from the cigarette packs to be processed based on the cigarette detection results of the cigarette packs to be processed;
[0116] Send prompt information corresponding to the cigarettes to be rejected to the terminal.
[0117] Specifically, after obtaining the cigarette inspection results for the cigarette packs to be processed, if it is determined that the cigarette packs are missing cigarettes, misplaced, or upside down, the problematic cigarettes can be rejected to ensure the quality of the cigarettes in the cigarette packs to be processed. The rejection operation can be, but is not limited to, performed manually. The human operator can reject the cigarettes identified for rejection based on the prompt information displayed on the terminal.
[0118] See also Figure 2 , Figure 2A schematic diagram of the structure of a PLC-based device for detecting missing cigarettes in irregular-shaped packs provided in an embodiment of the present application is shown;
[0119] like Figure 2 As shown, the PLC-based device for detecting missing cigarette packs of irregular shapes may include at least a first processing module 201, a second processing module 202, and a first analysis module 203, wherein:
[0120] A first processing module 201 is configured to obtain a first image of a cigarette packet to be processed and process the first image of the cigarette packet to be processed;
[0121] The second processing module 202 is configured to determine the first cigarette parameter of the cigarette pack to be processed based on the processed first image;
[0122] The first analysis module 203 is used to obtain the size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed, and obtain the cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed.
[0123] In some possible embodiments, the first analysis module includes:
[0124] a calculation unit, configured to calculate a second cigarette parameter of the cigarette pack to be processed based on the size parameter of the cigarette pack to be processed;
[0125] a first analyzing unit, configured to obtain a detection result of the first cigarette in the cigarette pack to be processed when detecting that the parameter of the second cigarette in the cigarette pack to be processed is consistent with the parameter of the first cigarette in the cigarette pack to be processed;
[0126] The second analyzing unit is used to obtain a detection result of the second cigarette in the cigarette pack to be processed when it is detected that the parameters of the second cigarette in the cigarette pack to be processed are inconsistent with the parameters of the first cigarette in the cigarette pack to be processed.
[0127] In some possible embodiments, the device further includes:
[0128] a third processing module, configured to determine the first cigarette parameter of the cigarette pack to be processed according to the processed first image, and then obtain the cigarette arrangement of the cigarette pack to be processed based on the first cigarette parameter of the cigarette pack to be processed;
[0129] The second analysis module is used to obtain a third cigarette detection result of the cigarette pack to be processed based on a matching result between the cigarette arrangement of the cigarette pack to be processed and a preset cigarette arrangement.
[0130] In some possible embodiments, the device further includes:
[0131] an acquisition module, configured to acquire a second image of the cigarette pack to be processed after acquiring the size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed; wherein the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is inconsistent with the shooting angle of the cigarettes in the second image of the cigarette pack to be processed;
[0132] a fusion module, configured to fuse the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed;
[0133] The third analysis module is used to obtain a fourth cigarette detection result of the cigarette pack to be processed based on the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed.
[0134] In some possible embodiments, the size parameter of the cigarette pack to be processed includes the cigarette diameter of the cigarette pack to be processed;
[0135] The third analysis module includes:
[0136] A first determining unit is configured to determine the length of a cigarette in the cigarette pack to be processed based on the fused image of the cigarette pack to be processed;
[0137] A second determining unit is configured to determine the type of cigarettes in the cigarette pack to be processed based on the length and diameter of the cigarettes in the cigarette pack to be processed;
[0138] The third analysis unit is used to obtain a fourth cigarette detection result of the cigarette pack to be processed based on the cigarette type of the cigarette pack to be processed and the matching result of the preset cigarette type.
[0139] In some possible embodiments, the device further includes:
[0140] a fourth processing module, configured to fuse the second image of the cigarette pack to be processed with the first image of the cigarette pack to be processed to obtain a fused image of the cigarette pack to be processed, and then determine an arrangement order of characteristic patterns of each cigarette from the fused image of the cigarette pack to be processed;
[0141] a fourth analysis module, configured to obtain a detection result of a fifth cigarette of the cigarette pack to be processed when it is detected that the arrangement order of the characteristic patterns of at least one cigarette is inconsistent;
[0142] The fifth analysis module is used to obtain the detection result of the sixth cigarette of the cigarette pack to be processed when it is detected that the arrangement order of the characteristic patterns of all cigarettes is consistent.
[0143] In some possible embodiments, the device further includes:
[0144] a fifth processing module, configured to determine cigarettes to be removed from the cigarette packs to be processed based on the cigarette detection results of the cigarette packs to be processed after obtaining the cigarette detection results of the cigarette packs to be processed based on the size parameters of the cigarette packs to be processed and the first cigarette parameter of the cigarette packs to be processed;
[0145] The sending module is used to send prompt information corresponding to the cigarettes to be rejected to the terminal.
[0146] Those skilled in the art will clearly understand that the technical solutions of the embodiments of the present application can be implemented with the help of software and / or hardware. "Unit" and "module" in this specification refer to software and / or hardware that can independently perform or cooperate with other components to perform specific functions, where the hardware can be, for example, a field-programmable gate array (FPGA) or an integrated circuit (IC).
[0147] See also Figure 3 , Figure 3 A structural schematic diagram of another PLC-based device for detecting missing cigarette packs of irregular shapes provided in an embodiment of the present application is shown.
[0148] like Figure 3 As shown, the PLC-based special-shaped cigarette pack missing detection device 300 may include: at least one processor 301, at least one network interface 304, a user interface 303, a memory 305 and at least one communication bus 302.
[0149] The communication bus 302 may be used to implement the connection and communication between the above components.
[0150] The user interface 303 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0151] The network interface 304 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, and the like.
[0152] Among them, the processor 301 may include one or more processing cores. The processor 301 uses various interfaces and lines to connect the various parts of the entire electronic device 300, and executes various functions of the routing device 300 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 305, and calling data stored in the memory 305. Optionally, the processor 301 can be implemented in at least one hardware form of DSP, FPGA, PLA. The processor 301 can integrate one or a combination of CPU, GPU and modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to handle wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 301, but may be implemented separately through a chip.
[0153] Among them, the memory 305 may include RAM and ROM. Optionally, the memory 305 includes a non-transitory computer-readable medium. The memory 305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 305 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 a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 305 may also be optionally at least one storage device located away from the aforementioned processor 301. As Figure 3 As shown, the memory 305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a PLC-based special-shaped cigarette pack missing detection application.
[0154] Specifically, the processor 301 may be configured to call the PLC-based special-shaped cigarette pack missing detection application stored in the memory 305 and perform the following operations:
[0155] Acquiring a first image of the cigarette packet to be processed, and processing the first image of the cigarette packet to be processed;
[0156] determining parameters of a first cigarette in the cigarette pack to be processed according to the processed first image;
[0157] The size parameters of the cigarette pack to be processed are obtained from the first image of the cigarette pack to be processed, and the cigarette detection result of the cigarette pack to be processed is obtained based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed.
[0158] In some possible embodiments, obtaining a cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the number of cigarettes in the cigarette pack to be processed includes:
[0159] Calculating a second cigarette parameter of the cigarette pack to be processed based on the size parameter of the cigarette pack to be processed;
[0160] When it is detected that the parameter of the second cigarette of the cigarette pack to be processed is consistent with the parameter of the first cigarette of the cigarette pack to be processed, a detection result of the first cigarette of the cigarette pack to be processed is obtained;
[0161] When it is detected that the second cigarette parameter of the cigarette pack to be processed is inconsistent with the first cigarette parameter of the cigarette pack to be processed, the detection result of the second cigarette of the cigarette pack to be processed is obtained.
[0162] In some possible embodiments, after determining the parameters of the first cigarette in the cigarette pack to be processed based on the processed first image, the method further includes:
[0163] Obtaining a cigarette arrangement of the cigarette pack to be processed based on the first cigarette parameter of the cigarette pack to be processed;
[0164] According to the matching result between the cigarette arrangement of the cigarette pack to be processed and the preset cigarette arrangement, the third cigarette detection result of the cigarette pack to be processed is obtained.
[0165] In some possible embodiments, after obtaining the size parameters of the cigarette packet to be processed from the first image of the cigarette packet to be processed, the method further includes:
[0166] Acquire a second image of the cigarette pack to be processed; wherein the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is inconsistent with the shooting angle of the cigarettes in the second image of the cigarette pack to be processed;
[0167] fusing the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed;
[0168] According to the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed, a detection result of the fourth cigarette in the cigarette pack to be processed is obtained.
[0169] In some possible embodiments, the size parameter of the cigarette pack to be processed includes the cigarette diameter of the cigarette pack to be processed;
[0170] A detection result of the fourth cigarette in the cigarette pack to be processed is obtained based on the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed, including:
[0171] determining the length of cigarettes in the cigarette pack to be processed based on the fused image of the cigarette pack to be processed;
[0172] Determining the type of cigarettes in the cigarette pack to be processed based on the length and diameter of the cigarettes in the cigarette pack to be processed;
[0173] According to the matching result of the cigarette type of the cigarette pack to be processed and the preset cigarette type, the fourth cigarette detection result of the cigarette pack to be processed is obtained.
[0174] In some possible embodiments, after fusing the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed, the method further includes:
[0175] Determining the arrangement order of characteristic patterns of each cigarette from the fused image of the cigarette pack to be processed;
[0176] When it is detected that the arrangement order of the characteristic patterns of at least one cigarette is inconsistent, a detection result of the fifth cigarette of the cigarette pack to be processed is obtained;
[0177] When it is detected that the arrangement order of the characteristic patterns of all cigarettes is consistent, the detection result of the sixth cigarette of the cigarette pack to be processed is obtained.
[0178] In some possible embodiments, after obtaining a cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed, the method further includes:
[0179] Determining cigarettes to be removed from the cigarette packs to be processed based on the cigarette detection results of the cigarette packs to be processed;
[0180] Send prompt information corresponding to the cigarettes to be rejected to the terminal.
[0181] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above method. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0182] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0183] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0184] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interface, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0185] The units described as separate components may or may not be physically separate, and 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 these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0186] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, 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. The computer software product is stored in a memory and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk, or optical disk, etc., various media that can store program code.
[0188] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program. The program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0189] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure herein, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art that are not recorded in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A PLC-based method for detecting missing cigarette packs, characterized in that: include: Acquiring a first image of a cigarette packet to be processed, and processing the first image of the cigarette packet to be processed; determining a first cigarette parameter of the cigarette pack to be processed based on the processed first image; Acquiring size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed, and obtaining a cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed; After determining the first cigarette parameter of the cigarette pack to be processed based on the processed first image, the method further includes: Obtaining a cigarette arrangement of the cigarette pack to be processed based on the first cigarette parameter of the cigarette pack to be processed; According to the matching result between the cigarette arrangement of the cigarette pack to be processed and the preset cigarette arrangement, the third cigarette detection result of the cigarette pack to be processed is obtained.
2. The method according to claim 1, characterized in that Obtaining a cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the number of cigarettes in the cigarette pack to be processed includes: Calculating a second cigarette parameter of the cigarette pack to be processed based on the size parameter of the cigarette pack to be processed; When it is detected that the second cigarette parameter of the cigarette pack to be processed is consistent with the first cigarette parameter of the cigarette pack to be processed, obtaining the first cigarette detection result of the cigarette pack to be processed; When it is detected that the second cigarette parameter of the cigarette pack to be processed is inconsistent with the first cigarette parameter of the cigarette pack to be processed, the second cigarette detection result of the cigarette pack to be processed is obtained.
3. The method according to claim 1, characterized in that After obtaining the size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed, the method further includes: Acquire a second image of the cigarette pack to be processed; wherein the shooting angle of the cigarettes in the first image of the cigarette pack to be processed is inconsistent with the shooting angle of the cigarettes in the second image of the cigarette pack to be processed; performing a fusion process on the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain a fused image of the cigarette packet to be processed; A fourth cigarette detection result of the cigarette pack to be processed is obtained based on the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed.
4. The method according to claim 3, characterized in that The size parameters of the cigarette pack to be processed include the cigarette diameter of the cigarette pack to be processed; Obtaining a fourth cigarette detection result of the cigarette pack to be processed based on the fused image of the cigarette pack to be processed and the size parameters of the cigarette pack to be processed includes: determining the length of cigarettes in the cigarette pack to be processed based on the fused image of the cigarette pack to be processed; Determining the type of cigarettes in the cigarette pack to be processed based on the length of the cigarettes in the cigarette pack to be processed and the diameter of the cigarettes in the cigarette pack to be processed; According to the matching result of the cigarette type of the cigarette pack to be processed and the preset cigarette type, a fourth cigarette detection result of the cigarette pack to be processed is obtained.
5. The method according to claim 3, characterized in that After fusing the second image of the cigarette packet to be processed and the first image of the cigarette packet to be processed to obtain the fused image of the cigarette packet to be processed, the method further includes: determining an arrangement order of characteristic patterns of each cigarette from the fused image of the cigarette pack to be processed; When it is detected that the arrangement order of the characteristic patterns of at least one cigarette is inconsistent, a detection result of the fifth cigarette of the cigarette pack to be processed is obtained; When it is detected that the arrangement order of the characteristic patterns of all cigarettes is consistent, the detection result of the sixth cigarette of the cigarette pack to be processed is obtained.
6. The method according to claim 1, characterized in that After obtaining the cigarette detection result of the cigarette pack to be processed based on the size parameter of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed, the method further includes: Determining cigarettes to be removed from the cigarette packs to be processed according to the cigarette detection results of the cigarette packs to be processed; Send prompt information corresponding to the cigarette to be rejected to the terminal.
7. A PLC-based device for detecting missing cigarette packs, characterized in that: include: a first processing module, configured to acquire a first image of a cigarette packet to be processed and process the first image of the cigarette packet to be processed; a second processing module, configured to determine a first cigarette parameter of the cigarette pack to be processed based on the processed first image; a first analysis module, configured to obtain size parameters of the cigarette pack to be processed from the first image of the cigarette pack to be processed, and obtain a cigarette detection result of the cigarette pack to be processed based on the size parameters of the cigarette pack to be processed and the first cigarette parameter of the cigarette pack to be processed; After determining the first cigarette parameter of the cigarette pack to be processed based on the processed first image, the method further includes: Obtaining a cigarette arrangement of the cigarette pack to be processed based on the first cigarette parameter of the cigarette pack to be processed; According to the matching result between the cigarette arrangement of the cigarette pack to be processed and the preset cigarette arrangement, the third cigarette detection result of the cigarette pack to be processed is obtained.
8. A PLC-based device for detecting missing cigarette packs, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for detecting lack and upending of cigarettes in cigarette packet on basis of machine vision technology
CN102502000A
System and method for detecting arrangement confusion and inverted arrangement of cigarettes in cigarette warehouse
CN103010531A
Cigarette appearance quality detection method based on computer vision
CN103868935A
Cigarette measuring device for cigarette packaging
CN202022311U