High-speed packaging unit regulation and control method based on cigarette case appearance defect detection and controller
By using a pre-established defect recognition model in cigarette box defect detection combined with imaging information, the problem of low detection accuracy of template matching method is solved, and higher detection accuracy and more accurate cigarette box defect removal is achieved.
Patent Information
- Application Number
- CN202411568835.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-05
AI Technical Summary
In the prior art, the template matching method is prone to missed detection or missed detection in cigarette box defect detection, and the detection accuracy is low.
By obtaining the appearance image and imaging information of the cigarette box, it is input into a pre-established defect recognition model, and defect detection is performed in combination with light uniformity, imaging clarity and imaging resolution, and instructing the high-speed packaging unit to remove cigarettes when a defect is detected. box.
It effectively avoids mis-detection and missed detection caused by imaging factors, improves the accuracy of cigarette box defect detection, and ensures the correct removal of defective cigarette boxes by high-speed packaging units.
Smart Images

Figure CN119438228A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent detection technology, and in particular relates to a high-speed packaging unit control method and a controller based on cigarette box appearance defect detection. Background Art
[0002] Packed cigarette inspection is a necessary step in cigarette quality control, and packaging box defect detection is a key link in quality control. Common cigarette box defects include dirty seals, damage, scratches, wrinkles, peeling, glue spitting, overlapping corners, missing, small boxes are wrinkled, broken, and the shape is not square, etc.
[0003] Currently, defect detection is usually performed using template matching, which requires the establishment of a template library that stores templates for different defects. However, the template matching method still results in false detection or missed detection, and the detection accuracy is low. Summary of the invention
[0004] In view of this, the present invention provides a high-speed packaging unit control method and controller based on cigarette box appearance defect detection, aiming to solve the problem that the template matching method of the prior art still has false detection or missed detection and low detection accuracy.
[0005] A first aspect of an embodiment of the present invention provides a high-speed packaging unit control method based on cigarette box appearance defect detection, comprising:
[0006] Acquire a cigarette box appearance image and imaging information of the cigarette box appearance image;
[0007] Inputting the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain the cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution;
[0008] When the cigarette box appearance recognition result of the current cigarette box is defective, the high-speed packaging unit is instructed to reject the cigarette box.
[0009] A second aspect of an embodiment of the present invention provides a high-speed packaging unit control device based on cigarette box appearance defect detection, comprising:
[0010] An acquisition module, used for acquiring a cigarette box appearance image and imaging information of the cigarette box appearance image;
[0011] The recognition module is used to input the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution;
[0012] The indication module is used to indicate the high-speed packaging unit to reject the cigarette box when the appearance recognition result of the current cigarette box is defective.
[0013] A third aspect of an embodiment of the present invention provides a controller, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the high-speed packaging machine control method based on cigarette box appearance defect detection of the first aspect are implemented.
[0014] A fourth aspect of an embodiment of the present invention provides an appearance inspection system, comprising the controller according to the third aspect above.
[0015] The fifth aspect of an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the high-speed packaging machine control method based on cigarette box appearance defect detection as described in the first aspect above are implemented.
[0016] The high-speed packaging unit control method and controller based on cigarette box appearance defect detection provided by the embodiment of the present invention first obtains the cigarette box appearance image and the imaging information of the cigarette box appearance image; inputs the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain the cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution; when the cigarette box appearance recognition result of the current cigarette box is defective, instructs the high-speed packaging unit to reject the cigarette box. By setting the defect recognition model, the influence of illumination uniformity, imaging clarity and imaging resolution on defect detection is considered at the same time, and false detection and missed detection caused by imaging factors are avoided, thereby effectively rejecting defective cigarette boxes. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0018] Figure 1 It is a partial structural schematic diagram of a high-speed packaging unit provided by an embodiment of the present invention;
[0019] Figure 2 It is a flow chart of the implementation of the high-speed packaging unit control method based on cigarette box appearance defect detection provided by an embodiment of the present invention;
[0020] Figure 3 It is a structural schematic diagram of a high-speed packaging unit control device based on cigarette box appearance defect detection provided by an embodiment of the present invention;
[0021] Figure 4 It is a schematic diagram of the structure of a controller provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0023] Figure 1 FIG. 1 is a schematic diagram of a portion of the structure of a high-speed packaging machine provided by an embodiment of the present invention. Figure 1 As shown, in some embodiments, an appearance detection system 11 and a rejection actuator 12 are sequentially arranged on the conveyor belt of the high-speed packaging unit. When the appearance detection system 11 detects that there are defects in the appearance of the cigarette box, an indication signal is sent to the rejection actuator 12 to reject the cigarette box at the corresponding position. Figure 1 The above is only an example of the present invention, and the setting position of the rejection actuator 12 depends on the detection speed of the appearance detection system 11 and the speed of the conveyor belt.
[0024] The appearance inspection system 11 includes at least one inspection camera and a controller. The controller receives the image detected by the inspection camera, processes and analyzes it, and determines whether there are defects in the appearance of the cigarette box. The appearance image of the cigarette box detected by the appearance inspection system 11 can be a two-dimensional image or a three-dimensional image. For example, laser projectors and CCD cameras are configured at different positions in the appearance inspection system, and then the three-dimensional point cloud data of the cigarette box is measured by triangulation.
[0025] Figure 2 1 is a flow chart of the implementation of the high-speed packaging unit control method based on cigarette box appearance defect detection provided by the embodiment of the present invention. Figure 2 As shown, in some embodiments, a high-speed packaging machine group control method based on cigarette box appearance defect detection includes:
[0026] S210, acquiring a cigarette box appearance image and imaging information of the cigarette box appearance image;
[0027] S220, inputting the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution;
[0028] S230, when the appearance recognition result of the current cigarette box is that there is a defect, instruct the high-speed packaging unit to reject the cigarette box.
[0029] In the embodiment of the present invention, the image resolution can be directly obtained, and the imaging clarity is calculated using the Tenengrad gradient function. At the same time, the standard deviation of the cigarette box pixels is divided by the pixel mean, which is defined as the illumination uniformity coefficient. The standard illumination uniformity coefficient of a good cigarette box under the set illumination is determined in advance by experiments. Then, in actual detection, the standard illumination uniformity coefficient is divided by the difference between the detected illumination uniformity coefficient and the standard illumination uniformity coefficient, and then normalized to obtain the illumination uniformity. The more uneven the illumination, the larger the standard deviation, the larger the detected illumination uniformity coefficient, and the smaller the calculated illumination uniformity.
[0030] In some embodiments, the defect recognition model includes a first encoder, a second encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; S220 includes: inputting the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time inputting the imaging information into the second encoder to obtain an imaging feature vector; inputting the first feature image and the imaging feature vector into the feature fusion module to obtain a fused feature; inputting the fused feature into the feature recognition module to obtain a cigarette box appearance recognition result.
[0031] In the embodiment of the present invention, the defect recognition model is specifically a neural network model. The first encoder extracts the cigarette box appearance image as an n×n feature matrix, and the second encoder extracts the imaging information as a 1×3 feature vector. The Euclidean norm of the feature vector is multiplied by the n×n feature matrix to obtain a fusion feature, and then the decoder in the feature recognition module is used to decode and classify the fusion feature to determine the cigarette box appearance recognition result.
[0032] In some embodiments, the defect recognition model includes a first encoder, a second encoder and a third encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are respectively connected to the third encoder; the first encoder and the third encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; S220 includes: inputting the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time inputting the imaging information into the second encoder to obtain an imaging feature vector; inputting the first feature image and the imaging feature vector into the third encoder to obtain a second feature image; inputting the first feature image and the second feature image into the feature fusion module to obtain a fused feature; inputting the fused feature into the feature recognition module to obtain a cigarette box appearance recognition result.
[0033] In an embodiment of the present invention, the defect recognition model is specifically a neural network model. The first encoder extracts the cigarette box appearance image as an n×n feature matrix, the second encoder extracts the imaging information as a 1×3 feature vector, and then the third encoder multiplies the Euclidean norm of the feature vector with the n×n feature matrix to obtain a second feature image. The fusion module fuses the first feature image and the second feature image, and then uses the decoder in the feature recognition module to decode and classify the fused features to determine the cigarette box appearance recognition result.
[0034] In some embodiments, the first feature image and the second feature image are input into a feature fusion module to obtain a fused feature, including: multiplying the first feature image by a first weight matrix to obtain a first feature matrix; multiplying the second feature image by a second weight matrix to obtain a second feature matrix; adding the first feature matrices to obtain a fused feature; wherein the first weight matrix and the second weight matrix are determined based on the average pixel difference of the area where the pixel points in the first feature image are located and the average pixel difference of the area where the corresponding pixel points in the second feature image are located.
[0035] In an embodiment of the present invention, the eight pixels around each pixel are the domain of the pixel. The average value of the difference between the pixels of these eight pixels and the pixel of the pixel is the average pixel difference. The first feature image and the second feature image are images of the same scale, but the difference is that the second feature image further considers the influence of the imaging conditions. However, after adding the same imaging conditions, the introduced features will cover some original features to a certain extent. Therefore, the present invention considers the original features, that is, the first feature image, and combines the second feature image with the imaging conditions in a weighted manner, so that the fused features can carry richer image information, thereby improving the detection accuracy.
[0036] In some embodiments, the method further includes: sending a stop signal to the high-speed packaging unit when the number of cigarette boxes continuously rejected reaches a preset number.
[0037] In some embodiments, obtaining a cigarette box appearance image includes: obtaining an initial cigarette box appearance image; and performing binarization processing on the initial cigarette box appearance image to obtain the cigarette box appearance image.
[0038] In some embodiments, before acquiring the cigarette box appearance image, the method further includes: extracting the cigarette box edge of the cigarette box appearance image, and filtering the cigarette box appearance image to remove background and interference on the cigarette box.
[0039] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0040] Figure 3 Schematic diagram of the structure of a high-speed packaging unit control device based on cigarette box appearance defect detection provided by an embodiment of the present invention. Figure 3 As shown, in some embodiments, the high-speed packaging unit control device 3 based on cigarette box appearance defect detection includes:
[0041] An acquisition module 310, used to acquire a cigarette box appearance image and imaging information of the cigarette box appearance image;
[0042] The recognition module 320 is used to input the cigarette box appearance image and imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution;
[0043] The instruction module 330 is used to instruct the high-speed packaging unit to reject the cigarette box when the appearance recognition result of the current cigarette box is defective.
[0044] Optionally, the defect recognition model includes a first encoder, a second encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; the recognition module 320 is used to: input the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time input the imaging information into the second encoder to obtain an imaging feature vector; input the first feature image and the imaging feature vector into the feature fusion module to obtain a fused feature; input the fused feature into the feature recognition module to obtain a cigarette box appearance recognition result.
[0045] Optionally, the defect recognition model includes a first encoder, a second encoder and a third encoder, a feature fusion module and a feature recognition module; the first encoder and the second encoder are respectively connected to the third encoder; the first encoder and the third encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; the recognition module 320 is used to: input the cigarette box appearance image into the first encoder to obtain a first feature image, and at the same time input the imaging information into the second encoder to obtain an imaging feature vector; input the first feature image and the imaging feature vector into the third encoder to obtain a second feature image; input the first feature image and the second feature image into the feature fusion module to obtain a fused feature; input the fused feature into the feature recognition module to obtain a cigarette box appearance recognition result.
[0046] Optionally, the recognition module 320 is used to: multiply the first feature image by the first weight matrix to obtain a first feature matrix; multiply the second feature image by the second weight matrix to obtain a second feature matrix; add the first feature matrices to obtain a fusion feature; wherein the first weight matrix and the second weight matrix are determined based on the average pixel difference of the area where the pixel points in the first feature image are located and the average pixel difference of the area where the corresponding pixel points in the second feature image are located.
[0047] Optionally, the device further comprises an alarm module, which is used to send a stop signal to the high-speed packaging unit when the number of cigarette boxes continuously rejected reaches a preset number.
[0048] Optionally, the acquisition module 310 is used to: acquire an initial cigarette box appearance image; and perform binarization processing on the initial cigarette box appearance image to obtain a cigarette box appearance image.
[0049] Optionally, the device further includes: a processing module, used to extract the cigarette box edge of the cigarette box appearance image, and filter the cigarette box appearance image to remove background and interference on the cigarette box.
[0050] The high-speed packaging machine control device based on cigarette box appearance defect detection provided in this embodiment can be used to execute the above method embodiments. Its implementation principle and technical effects are similar, and this embodiment will not be repeated here.
[0051] Figure 4 Schematic diagram of the structure of the controller provided by the embodiment of the present invention. Figure 4 As shown, an embodiment of the present invention provides a controller 4, and the controller 4 of this embodiment includes: a processor 40, a memory 41, and a computer program 42 stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42, the steps in the above-mentioned output voltage calibration method based on LLC are implemented, for example Figure 2 Alternatively, when the processor 40 executes the computer program 42, the functions of each module / unit in the above-mentioned system embodiments are realized, for example Figure 3 The functions of each module are shown.
[0052] Exemplarily, the computer program 42 may be divided into one or more modules / units, one or more modules / units are stored in the memory 41, and executed by the processor 40 to implement the present invention. One or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the controller 4.
[0053] The controller 4 may be a mobile phone, MCU, ECU, industrial computer, etc., which is not limited here. The controller 4 may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that Figure 4 It is only an example of the controller 4 and does not constitute a limitation of the controller 4. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the controller may also include input and output devices, network access devices, buses, etc.
[0054] The processor 40 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0055] The memory 41 may be an internal storage unit of the controller 4, such as a hard disk or memory of the controller 4. The memory 41 may also be an external storage device of the controller 4, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the controller 4. Further, the memory 41 may also include both an internal storage unit of the controller 4 and an external storage device. The memory 41 is used to store computer programs and other programs and data required by the controller. The memory 41 may also be used to temporarily store data that has been output or is to be output.
[0056] An embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned LLC-based output voltage calibration method embodiment are implemented.
[0057] The computer readable storage medium stores a computer program 42, which includes program instructions. When the program instructions are executed by the processor 40, all or part of the processes in the above-mentioned embodiment method are implemented. The computer program 42 can also be used to instruct related hardware to complete. The computer program 42 can be stored in a computer readable storage medium. When the computer program 42 is executed by the processor 40, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program 42 includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium.
[0058] The computer-readable storage medium may be an internal storage unit of the controller of any of the aforementioned embodiments, such as a hard disk or memory of the controller. The computer-readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the controller. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the controller and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the controller. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0059] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0060] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0061] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0062] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0063] In the embodiments provided by the present invention, it should be understood that the disclosed devices / controllers and methods can be implemented in other ways. For example, the device / controller embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, 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 interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0064] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0065] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0066] If the integrated module / 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 storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0067] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A high-speed packaging unit control method based on cigarette box appearance defect detection, characterized in that: include: Acquire a cigarette box appearance image and imaging information of the cigarette box appearance image; Inputting the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result; wherein the imaging information includes illumination uniformity, imaging clarity and imaging resolution; When the appearance recognition result of the current cigarette box is that there is a defect, the high-speed packaging unit is instructed to reject the cigarette box.
2. The high-speed packaging unit control method based on cigarette box appearance defect detection according to claim 1 is characterized in that: The defect recognition model includes a first encoder, a second encoder, a feature fusion module and a feature recognition module; The first encoder and the second encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; Inputting the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result, including: Inputting the cigarette box appearance image into a first encoder to obtain a first feature image, and simultaneously inputting the imaging information into a second encoder to obtain an imaging feature vector; Inputting the first feature image and the imaging feature vector into a feature fusion module to obtain a fusion feature; The fused features are input into a feature recognition module to obtain a cigarette box appearance recognition result.
3. The high-speed packaging unit control method based on cigarette box appearance defect detection according to claim 1 is characterized in that: The defect recognition model includes a first encoder, a second encoder, a third encoder, a feature fusion module and a feature recognition module; The first encoder and the second encoder are respectively connected to the third encoder; the first encoder and the third encoder are both connected to the feature fusion module; the feature fusion module is connected to the feature recognition module; Inputting the cigarette box appearance image and the imaging information into a pre-established defect recognition model to obtain a cigarette box appearance recognition result, including: Inputting the cigarette box appearance image into a first encoder to obtain a first feature image, and simultaneously inputting the imaging information into a second encoder to obtain an imaging feature vector; Inputting the first feature image and the imaging feature vector into the third encoder to obtain a second feature image; Inputting the first feature image and the second feature image into a feature fusion module to obtain a fusion feature; The fused features are input into a feature recognition module to obtain a cigarette box appearance recognition result.
4. The high-speed packaging unit control method based on cigarette box appearance defect detection according to claim 3 is characterized in that: Inputting the first feature image and the second feature image into a feature fusion module to obtain fusion features includes: Multiplying the first feature image by a first weight matrix to obtain a first feature matrix; Multiplying the second feature image by a second weight matrix to obtain a second feature matrix; Adding the first feature matrices to obtain the fusion feature; The first weight matrix and the second weight matrix are determined according to the average pixel difference of the area where the pixel points in the first feature image are located and the average pixel difference of the area where the corresponding pixel points in the second feature image are located.
5. The high-speed packaging unit control method based on cigarette box appearance defect detection according to claim 1 is characterized in that: The method further comprises: When the number of cigarette boxes continuously rejected reaches a preset number, a stop signal is sent to the high-speed packaging unit.
6. The high-speed packaging unit control method based on cigarette box appearance defect detection according to claim 1 is characterized in that: Get the appearance image of the cigarette box, including: Obtaining an initial cigarette box appearance image; The initial cigarette box appearance image is binarized to obtain a cigarette box appearance image.
7. The high-speed packaging unit control method based on cigarette box appearance defect detection according to claim 1 is characterized in that: When acquiring the cigarette box appearance image, the method further includes: The cigarette box edge of the cigarette box appearance image is extracted, and the cigarette box appearance image is filtered to remove interference from the background and the cigarette box.
8. A controller comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the high-speed packaging machine group control method based on cigarette box appearance defect detection as described in any one of claims 1 to 7 are implemented.
9. An appearance inspection system, characterized in that: Comprising the controller as claimed in claim 8 above.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the high-speed packaging machine group control method based on cigarette box appearance defect detection as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Image processing method and device, electronic equipment and storage medium
CN113762032A
Cigarette case defect detection method, device, equipment and medium
CN114708214A
Quality detection system for cigarette packets at inlet of transparent paper packaging machine
CN114771984A
High-resolution earth observation remote sensing image semantic segmentation method and device, storage medium and computing equipment
CN117078929A
Defect detection method, computer device and storage medium
US20220028055A1