A cigarette carton package misalignment detection method and system based on visual comparison
Patent Information
- Application Number
- CN202611420604.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]为解决运动模糊问题,已有“间歇式输送”配合“托举静态成像”方案,如专利CN202111042345.X公开的装置,工作时输送带间歇停止,托举机构升起雪茄烟,相机多角度拍摄后放回,输送带再启动,该方案可避免运动模糊,但存在不足:一是输送带频繁启停打断生产线连续流动,降低生产节拍,干扰上下游工序同步性,难以用于现有包装线;二是缺乏主动间距控制机制,“间停”模式未明确前后条盒间距参数化控制方法,生产线速度提高或条盒规格变化时,托举机构与后续条盒可能碰撞;三是成像适应性不足,相机布置主要针对圆柱形雪茄烟周向外观检测,难以满足长方体条盒包装错位检测多视角同步成像且角度可调的需求
[0030] By setting up a lifting component under the conveyor belt, the strip box is briefly lifted at the inspection station, causing it to detach from the conveyor belt surface. This keeps the strip box stationary relative to the top and side cameras, thereby eliminating motion blur and obtaining a clear static image. The conveyor belt continues to run, and subsequent strip boxes continue to be transported forward. Through spacing control and timing matching, continuous online inspection is achieved.
Smart Images

Figure CN122913109A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of conveying control and detection technology, specifically to a method and system for detecting misalignment in cigarette box and carton packaging based on visual comparison. Background Technology
[0002] On cigarette packaging production lines, misalignment defects in cigarette boxes and cartons negatively impact product appearance and brand image. Traditional manual inspection methods are inefficient, have a high rate of missed detections, and suffer from inconsistent standards, making them unsuitable for high-speed automated production lines. In recent years, automated inspection technology based on machine vision has been applied to packaging quality inspection. A common visual inspection solution involves installing a fixed camera above the conveyor belt to dynamically capture images of the cartons. However, due to conveyor belt vibration, speed fluctuations, and relative slippage between the cartons and the conveyor belt, the images suffer from motion blur, making it difficult to identify minute misalignment defects and limiting inspection accuracy.
[0003] To address the motion blur issue, an existing solution combines "intermittent conveying" with "static imaging with lifting," such as the device disclosed in patent CN202111042345.X. During operation, the conveyor belt intermittently stops, the lifting mechanism raises the cigars, the camera captures images from multiple angles, and then the cigars are returned to their original position before the conveyor belt restarts. This solution avoids motion blur, but it has several drawbacks: First, frequent starts and stops of the conveyor belt disrupt the continuous flow of the production line, reducing the production cycle time and interfering with the synchronization of upstream and downstream processes, making it difficult to use on existing packaging lines. Second, it lacks an active spacing control mechanism; the "intermittent stop" mode does not clearly define a parameterized control method for the spacing between the front and rear cartons, and the lifting mechanism may collide with subsequent cartons when the production line speed increases or the carton specifications change. Third, its imaging adaptability is insufficient; the camera arrangement is mainly designed for circumferential appearance inspection of cylindrical cigars, making it difficult to meet the requirements for multi-view synchronous imaging with adjustable angles for detecting misalignment in cuboid carton packaging.
[0004] In addition, existing continuous conveyor vision inspection systems increase camera exposure time or use high-speed shutters to reduce motion blur, but cannot fundamentally eliminate image ghosting, making it difficult to guarantee the reliability of dynamic imaging. Summary of the Invention
[0005] To overcome the problems of existing technologies, this invention provides a method and system for detecting misalignment in cigarette box and carton packaging based on visual comparison.
[0006] The technical solution adopted by this invention to solve its technical problem is: a method for detecting misalignment in cigarette box / carton packaging based on visual comparison, comprising the following steps:
[0007] Step 1: The cigarette packs are conveyed into the monitoring conveyor at a constant speed via the feeding conveyor and guided to the limit position by the limit component;
[0008] Step 2: The cigarette cartons enter the monitoring conveyor and are detected by the feed photoelectric sensor on the conveyor. The control system activates the blocking component. The conveyor speed is V. A detection gap S is formed between the blocked cigarette cartons and the released cigarette cartons. The detection gap S needs to satisfy: S>V*T+W+D, where V is the linear speed of the monitoring conveyor, T is the complete detection time for a single carton, W is the width of the carton along the conveying direction, and D is the safety margin. The complete detection time for a single carton is T=t1+t2+t3+t4+t5, where t1 is the lifting time, t2 is the mechanical stabilization time, t3 is the imaging exposure time, t4 is the image transmission and preprocessing time, and t5 is the lifting and falling time. The response time of the blocking component from receiving the descent command to fully descending to the conveyor surface is less than W / V to ensure that the blocking action is completed within the time it takes for the width of the carton to pass through.
[0009] Step 3: The cigarette carton is conveyed to the area below the imaging and detection component. The photoelectric sensor on the monitoring conveyor detects that the cigarette carton has reached the set position. The photoelectric sensor is located at a distance L upstream of the center of the detection station on the monitoring conveyor. The control system triggers the lifting component after a delay Δt, and the delay satisfies Δt=(LW / 2) / V. The control system controls the lifting component located below the monitoring conveyor to extend vertically through the middle gap of the monitoring conveyor, lift the carton off the conveyor belt surface and send it into the imaging and detection component. The carton is lifted into the imaging and detection component and fixed to the position of the lifting position sensor. The cigarette carton is constrained and limited by the lifting component, forming a relatively static imaging state.
[0010] Step 4: The imaging detection component takes a vertical downward shot of the top surface of the carton and a side shot of the side surface of the carton. High-definition imaging is completed simultaneously while the carton is stationary. The images are transmitted to the control system and registered pixel-level with the pre-stored standard template images to determine whether the carton has packaging misalignment defects.
[0011] Step 5: After imaging is completed, the control system receives the imaging completion signal and controls the lifting component to return to the bottom of the monitoring conveyor. The cigarette carton falls back onto the monitoring conveyor and continues to be conveyed away from the detection station. The conveyor belt continues to run, and subsequent cartons continue to be conveyed forward. Through spacing control and timing matching, online detection without stopping is achieved.
[0012] Step 6: If the detection determines that there is a packaging misalignment defect, the control system activates the rejection component to remove the defective carton from the normal conveying track and slide it into the waste collection box connected to the outside of the monitoring conveyor. If the detection determines that it is qualified, the cigarette carton is conveyed normally to the next process with the monitoring conveyor.
[0013] The above-mentioned visual comparison-based cigarette box and carton packaging misalignment detection method, in step 4, the shooting detection component can also adaptively adjust the shooting height according to the carton specifications to adapt to the detection needs of cigarette boxes and cartons of different sizes and specifications, ensuring image clarity and detection range coverage.
[0014] In the aforementioned visual comparison-based cigarette box packaging misalignment detection method, step 5 ensures that the total time for the lifting execution unit of the lifting component to fall back from the lifting high position to below the conveying surface, plus the safety margin of the control system, is not greater than the time required for the subsequent carton to travel at speed V with a safety margin D.
[0015] The above-mentioned visual comparison-based cigarette box packaging misalignment detection method uses a V-groove structure for the carton support base of the lifting component. The opening width of the V-groove is greater than the width of the carton, and the two inclined surfaces on both sides contact the two sides of the bottom surface of the carton to form line support, thereby achieving automatic centering by using gravity.
[0016] A visual comparison-based cigarette box and carton packaging misalignment detection system includes a feeding conveyor, a feeding photoelectric sensor, a monitoring conveyor, a barrier component, a station photoelectric sensor, a shooting detection component, a rejection component, a limiting component, and a lifting component arranged sequentially along the cigarette box and carton conveying direction;
[0017] The feeding conveyor and the monitoring conveyor are connected in sequence, and a transition connecting plate is fixedly installed at the connection point between the two.
[0018] The monitoring conveyor is fixed with a limit assembly, which includes two limit plates arranged opposite each other. The ends of the two limit plates are arc-shaped, and screws are rotatably connected to the sides of the two limit plates. The screws are screwed into threaded seats fixed on the frame of the monitoring conveyor.
[0019] A barrier assembly is fixedly installed on the input end of the monitoring conveyor. The barrier assembly includes a cylinder fixed to the monitoring conveyor by a bracket and a barrier plate that is driven to rise and fall by the cylinder.
[0020] The monitoring conveyor adopts a hollow conveyor belt structure, which consists of two parallel narrow belts or synchronous belts. The two belts are arranged in parallel along the conveying direction, and a transverse gap is formed between the two belts. The gap is parallel to the conveying direction, allowing the bar box support seat of the lifting component to pass through vertically.
[0021] A feed photoelectric sensor is installed at the upstream end of the monitoring conveyor, and a station photoelectric sensor is installed at a distance L upstream of the center area of the detection station on the monitoring conveyor.
[0022] The monitoring conveyor is equipped with a shooting and detection component, and a lifting component located at the lower end of the shooting and detection component and the lower end of the monitoring conveyor. A lifting position sensor is fixedly installed inside the shooting and detection component. The shooting and detection component includes a light-shielding dark box and a top camera installed inside the light-shielding dark box and side cameras respectively arranged on the four sides of the light-shielding dark box. The top camera is arranged vertically downward, and the side cameras are arranged horizontally or at an angle. The image acquisition work of five sides except the bottom surface is completed through a single lifting operation. A rejection component is fixedly installed downstream of the monitoring conveyor.
[0023] It also includes a control system, which includes a PLC controller and an industrial computer. The input terminal of the PLC controller is electrically connected to the feed photoelectric sensor, the station photoelectric sensor, and the lifting position sensor. The output terminal of the PLC controller is electrically connected to the cylinder control. The output terminal of the industrial computer is connected to the PLC controller via Ethernet communication.
[0024] The aforementioned visual comparison-based cigarette box packaging misalignment detection system includes a top camera and each side camera with a shadowless light source fixedly mounted on their outer sides. Each side camera also has a rotating shaft fixed to its rear side. The rotating shaft is rotatably connected to the side wall of a light-shielding dark box. One end of the rotating shaft is rotatably connected to a fixed plate inside the light-shielding dark box via a bearing, while the other end extends out of the dark box and is fixedly connected to a micro servo motor. Electric push rods and guide members are fixedly connected to both sides of the outside of the light-shielding dark box, allowing for vertical movement. The micro servo motor and electric push rod are electrically connected to the output of a PLC controller. The top camera and side cameras are electrically connected to the input of an industrial control computer.
[0025] The aforementioned vision-based cigarette box packaging misalignment detection system includes a lifting component comprising a servo motor, an eccentric wheel, a connecting rod, a lifting rod, a guide limit seat, and a carton support base. The servo motor is mounted on a fixed frame, and its output end is fixedly connected to the eccentric wheel. The servo motor is electrically connected to the output end of a PLC controller. A connecting rod is fixed to the side end of the eccentric wheel, and a keyway-type sliding hole is fixed on the connecting rod. The bottom end of the lifting rod is inserted into the keyway-type sliding hole and slidably connected thereto. A guide limit seat is fixed to the bottom end of the lifting rod, and the guide limit seats are respectively located at the upper and lower ends of the connecting rod. The top of the lifting rod passes through the lifting guide seat fixedly connected to the fixed frame and is fixedly connected to the bottom of the carton support base.
[0026] The aforementioned visual comparison-based cigarette box packaging misalignment detection system includes a rejection component comprising a rejection cylinder, a swing plate, and a guide plate. One end of the rejection cylinder is hinged to the frame of the monitoring conveyor, and the other end is hinged to the swing plate. The rejection cylinder is electrically connected to the output of a PLC controller. One of the limiting plates of the limiting component has a rejection opening, and the swing plate is hinged to the rejection opening. A guide plate is fixed between the side end of the rejection opening and the frame of the monitoring conveyor.
[0027] The aforementioned visual comparison-based cigarette box packaging misalignment detection system further includes a prediction triggering module in its control system. The prediction triggering module calculates the carton flow velocity based on the pulse interval of the feed photoelectric sensor and sends a pre-descent command to the cylinder in advance. The pre-descent advance amount is greater than the mechanical response time of the barrier execution unit, so that the barrier plate has completed the descent action before the carton arrives, eliminating the time lag between signal transmission and mechanical action.
[0028] The aforementioned visual comparison-based cigarette box packaging misalignment detection system further includes an image quality pre-inspection module. This module performs overexposure, underexposure, and blur detection on the image before visual comparison. Only when the image quality is acceptable does it send a visual feedback signal to the PLC controller, triggering a lifting and lowering mechanism. If the image quality is unacceptable, the industrial control computer sends an anomaly marking instruction to the PLC controller, marking the box as requiring manual re-inspection, thus avoiding erroneous judgments based on inferior images.
[0029] The beneficial effects of this invention are:
[0030] By setting up a lifting component under the conveyor belt, the strip box is briefly lifted at the inspection station, causing it to detach from the conveyor belt surface. This keeps the strip box stationary relative to the top and side cameras, thereby eliminating motion blur and obtaining a clear static image. The conveyor belt continues to run, and subsequent strip boxes continue to be transported forward. Through spacing control and timing matching, continuous online inspection is achieved.
[0031] A detection spacing formula S>V*T+W+D is proposed, which incorporates mechanical motion, camera parameters and image processing time into the quantitative calculation, so that the lifting component can complete the fall-away action before the next bar arrives, thus avoiding interference and collision between bars.
[0032] In the imaging and detection component, the top camera shoots vertically downwards at the top surface of the carton, while the four side cameras simultaneously shoot at the sides of the carton. The image acquisition of five surfaces, excluding the bottom, is completed in one lifting operation, improving detection efficiency.
[0033] The angle of the side camera can be adjusted to adapt to the imaging needs of different carton sides. The dark box is used in conjunction with the shadowless light source to isolate external light interference and achieve uniform illumination. The height of the dark box can be adjusted by an electric push rod to adjust the object distance according to the actual height of the carton, ensuring the imaging clarity and detection coverage of different carton sizes. Attached Figure Description
[0034] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0035] Figure 1 This is a flowchart of the detection method described in this invention;
[0036] Figure 2 This is a schematic diagram of the detection system structure described in this invention;
[0037] Figure 3 As described in this invention Figure 2 Front view sectional structural diagram;
[0038] Figure 4 This is a schematic diagram of the lifting component structure described in this invention;
[0039] Figure 5 This is a schematic diagram of the imaging and detection component structure described in this invention;
[0040] Figure 6 This is a block diagram illustrating the electrical control principle of the detection system described in this invention.
[0041] In the diagram: 1. Feeding conveyor; 2. Monitoring conveyor; 3. Barrier assembly; 4. Camera detection assembly; 5. Rejection assembly; 6. Limiting assembly; 7. Lifting assembly; 8. Cylinder; 9. Barrier plate; 10. Eccentric wheel; 11. Connecting rod; 12. Lifting rod; 13. Guide limit seat; 14. Lifting guide seat; 15. Strip box support seat; 16. Light-shielding dark box; 17. Electric push rod; 18. Guide component; 19. Top camera; 20. Side camera; 21. Swing plate; 22. Flow guide plate; 23. Rejection cylinder. Detailed Implementation
[0042] like Figure 1 , Figure 2 , Figure 3 As shown, a method for detecting misalignment in cigarette carton packaging based on visual comparison includes a feeding conveyor 1, a monitoring conveyor 2, a blocking component 3, an imaging and detection component 4, a rejection component 5, a limiting component 6, and a lifting component 7. The method is controlled and driven by a control system, which can control the conveying speed of cigarette cartons during continuous conveying and dynamically control the spacing between adjacent cigarette cartons during conveying. Then, the cigarette cartons are lifted and static imaging is performed to improve the detection effect of misalignment in cigarette carton packaging.
[0043] The specific steps are as follows:
[0044] Step 1: The cigarette carton is conveyed into the monitoring conveyor 2 at a constant speed via the feeding conveyor 1. At the same time, the limiting component 6 completes the guiding and limiting, ensuring that the cigarette carton is stably conveyed along the center line of the monitoring conveyor 2, and avoiding the carton from deviating during the conveying process, which would affect the accuracy of subsequent shooting and detection.
[0045] Step 2: The cigarette carton enters the monitoring conveyor 2 and is detected by the feed photoelectric sensor on the monitoring conveyor 2. The signal is transmitted to the control system, which activates the blocking component 3 to block the cigarette carton. According to the conveying speed V of the monitoring conveyor 2, a detection gap S is formed between the blocked cigarette carton and the released cigarette carton. The detection gap S needs to satisfy: S>V*T+W+D, where V is the linear speed of the detection conveyor, T is the complete detection time of a single carton, W is the width of the carton along the conveying direction, and D is the safety margin.
[0046] Where T = t1 + t2 + t3 + t4 + t5, t1 is the lifting and rising time, t2 is the mechanical stabilization time, t3 is the imaging exposure time, t4 is the image transmission and preprocessing time, and t5 is the lifting and falling time.
[0047] Assuming the monitored conveyor line speed V = 0.5 m / s and the carton width W = 0.28 m is taken as an example, and t1 = 0.15 s, t2 = 0.05 s, t3 = 0.02 s, t4 = 0.08 s, t5 = 0.15 s is set, then T = 0.45 s, the safety margin D = 0.15 m, and the calculated value S > 0.5 × 0.45 + 0.28 + 0.15 = 0.655 m. Therefore, S can be set to 0.70 m in practice.
[0048] The response time of the blocking component 3 from receiving the descent command to fully descending to the conveyor surface is less than W / V, so as to ensure that the blocking action is completed within the time of the carton width passing through, and to prevent the rear carton from rushing through the blocking component 3;
[0049] Step 3: The cigarette carton is continuously conveyed at the specified intervals and is brought to the area below the imaging and detection component 4. The photoelectric sensor on the monitoring conveyor 2 detects that the carton has reached the set position and transmits a signal to the control system. The control system then activates the lifting component 7. The lifting component 7, located below the monitoring conveyor 2, extends vertically upward through the middle gap of the monitoring conveyor 2, lifting the carton a certain distance away from the conveyor belt and into the imaging and detection component 4. The imaging and detection component 4 is equipped with a lifting position sensor. When the lifting position sensor detects that the carton has reached the imaging position, it immediately sends a position signal to the control system. The control system then triggers the imaging and detection component 4 to complete the image acquisition of the carton packaging and simultaneously controls the lifting component 7 to stop. At this time, the cigarette carton is constrained and limited by the lifting component 7, forming a relatively static imaging state.
[0050] Among them, the photoelectric sensor at the workstation is set at a distance L upstream of the center of the detection workstation. The control system does not immediately trigger the lifting, but delays Δt=(LW / 2) / V before sending the lifting command to the lifting component 7. This delay ensures that the center of the strip box is precisely aligned with the center of the detection workstation, so that the strip box is in the center of the field of view of the shooting detection component 4, avoiding the detection blind zone caused by imaging deviation.
[0051] Step 4: The imaging and detection component 4 can capture images of the top surface of the carton vertically downwards and the side surface of the carton from the side. High-definition imaging is completed simultaneously while the carton is stationary and transmitted to the control system. The images are then registered pixel-level with the pre-stored standard template images to determine whether there are packaging misalignment defects in the carton. The imaging and detection component 4 can also adaptively adjust the shooting height according to the carton specifications to adapt to the detection needs of cigarette cartons of different sizes and specifications, ensuring image clarity and detection range coverage. The control system will automatically drive the lifting and lowering adjustment of the imaging and detection component 4 to adjust its position based on the height signal after the lifting component 7 is finally lifted into place, ensuring that the shooting image completely covers the detection area and meets the accuracy requirements of pixel-level detection.
[0052] Step 5: After imaging is completed, the control system receives the control lifting component 7, the lifting component 7 returns to the bottom of the monitoring conveyor 2, the cigarette carton falls back onto the monitoring conveyor 2, and continues to be conveyed away from the detection station. The subsequent cigarette cartons arriving at the detection station will complete the misalignment detection in the same process.
[0053] The total time for the lifting execution unit of the lifting assembly 7 to fall back from the lifting high position to below the conveying surface, plus the safety margin of the control system, shall not be greater than the time required for the subsequent bar to travel at speed V with a safety margin D.
[0054] Step 6: If a packaging misalignment defect exists, the control system calculates the delay time based on the cigarette carton falling back onto the monitoring conveyor 2 and the conveying speed of the monitoring conveyor 2. When the defective carton is conveyed to the rejection station, the control system activates the rejection component 5 to remove the defective carton from the normal conveying trajectory and slide it into the waste collection box connected to the outside of the monitoring conveyor 2. If the detection determines that it is qualified, the cigarette carton is conveyed normally to the next process with the monitoring conveyor 2. The entire detection process does not require manual intervention. Relying on automated station triggering, lifting imaging, comparison judgment, and sorting rejection, the system achieves fully automated detection of cigarette carton packaging misalignment on the high-speed production line. The detection accuracy can reach the pixel level, which can effectively identify small misalignment defects that are easily missed by manual sampling. At the same time, it does not change the original main process of carton conveying and adapts to the high-speed production rhythm of the existing cigarette production and packaging line.
[0055] A visual comparison-based cigarette box and carton packaging misalignment detection system includes, in sequence along the cigarette box and carton conveying direction, a feeding conveyor 1, a feeding photoelectric sensor, a monitoring conveyor 2, a barrier component 3, a station photoelectric sensor, a shooting detection component 4, a rejection component 5, a limiting component 6, a lifting component 7, and a control system.
[0056] Feeding conveyor 1 receives the cartons from the upstream process and then sequentially conveys them into monitoring conveyor 2. Feeding conveyor 1 and monitoring conveyor 2 operate at the same constant conveying speed. The cartons are conveyed through the inspection station. A transition connecting plate for fixed connection of the conveyors is provided at the connection point between feeding conveyor 1 and monitoring conveyor 2. Monitoring conveyor 2 adopts a hollow conveyor belt structure, which consists of two parallel narrow belts or synchronous belts. The two belts are arranged parallel to the conveying direction, and a transverse gap is formed between the two belts. The gap is parallel to the conveying direction, allowing the carton support seat 15 to pass through vertically.
[0057] The monitoring conveyor 2 is also fixedly equipped with a limit component 6, which includes two oppositely arranged limit plates. The ends of the two limit plates are arc-shaped, which can guide the passing carton back to its original position and prevent the carton from shifting during the conveying process and affecting the shooting detection results. The sides of the two limit plates are respectively rotatably connected with screws, which are screwed into threaded seats. The threaded seats are fixed on the frame of the monitoring conveyor 2. Rotating the screws can adjust the distance between the two limit plates to adapt to the limit guidance requirements of different sizes and specifications of cigarette boxes.
[0058] A blocking component 3 is fixedly installed on the input end of the monitoring conveyor 2. The blocking component 3 includes a cylinder 8 fixed on the monitoring conveyor 2 by a bracket, and a blocking plate 9 driven by the cylinder 8 to lift and lower, which is used to dynamically block the conveying spacing in the carton flow that satisfies the spacing formula S>V*T+W+D.
[0059] When the feed photoelectric sensor installed at the upstream end of the monitoring conveyor 2 detects the entry of the strip box, it triggers the start of the blocking component 3.
[0060] The monitoring conveyor 2 is also equipped with a shooting detection component 4, and a lifting component 7 located at the lower end of the shooting detection component 4 and at the lower end of the monitoring conveyor 2.
[0061] The imaging and detection component 4 includes a light-shielding dark box 16 and a top camera 19 installed inside the light-shielding dark box 16, and side cameras 20 arranged on the four sides of the light-shielding dark box 16. The top camera 19 is arranged vertically downward, and the side cameras 20 are arranged horizontally or at an angle. A shadowless light source is fixedly fitted on the outside of the top camera 19 and each side camera 20. A lifting position sensor is fixed inside the light-shielding dark box 16. When the lifting position sensor detects that the carton has been lifted to the shooting position by the lifting component 7, it triggers the top camera 19 and each side camera 20 to start shooting synchronously to obtain clear images of each inspection surface of the carton. After the inspection is completed, the lifting component 7 is reset, and the carton continues to be conveyed downstream with the monitoring conveyor 2. The captured images are transmitted to the background visual comparison module, which performs feature matching and comparison between the real-time captured images and the standard qualified packaging images to identify whether the carton has a packaging misalignment defect. If a misalignment defect is determined, a rejection device is subsequently triggered to remove the unqualified carton from the conveyor line.
[0062] Each side camera 20 has a rotating shaft fixed to its rear side. The shaft is rotatably connected to the side wall of the light-shielding dark box 16. One end of the shaft is rotatably connected to a fixed plate fixed inside the light-shielding dark box 16 via a bearing, while the other end extends out of the light-shielding dark box 16 and is fixedly connected to a micro servo motor. The micro servo motor is electrically connected to the control system. The control system can drive the rotating shaft to rotate via the micro servo motor, thereby adjusting the shooting angle of the corresponding side camera. This adapts to the side shooting needs of cartons of different sizes and packaging forms, ensuring that the packaging details of each surface to be inspected can be clearly captured, providing clear and accurate original images for subsequent misalignment comparison. The light-shielding dark box can isolate the interference of external ambient light on the shooting process. The shadowless light source equipped with each camera can evenly illuminate the surface of the carton from all directions, avoiding problems such as light and shadow obstruction and uneven reflection, further improving the clarity and recognizability of the captured images, and reducing the impact of environmental interference on the accuracy of the detection results.
[0063] Electric push rods 17 and guide members 18 are fixedly connected to the two sides of the light-shielding dark box 16. The guide members 18 can move up and down. By activating the electric push rods 17 and using the guiding effect of the guide members 18, the height of the light-shielding dark box 16 can be adjusted to adapt to the shooting height requirements of conveyor mechanisms of different heights or strip boxes of different specifications. This ensures that the strip box to be tested is always within the reasonable shooting range of each camera, so that the shooting image completely covers all the surfaces of the strip box to be tested, avoiding the loss of local features due to unsuitable shooting height, and further improving the adaptability and accuracy of image acquisition.
[0064] The lifting assembly 7 includes a servo motor, an eccentric wheel 10, a connecting rod 11, a lifting rod 12, a guide limit seat 13, and a carton support 15. The servo motor is mounted on a fixed frame, and its output end is fixedly connected to the eccentric wheel 10, thereby driving the eccentric wheel 10 to move the connecting rod 11 up and down. A keyway-type sliding hole is fixed on the connecting rod 11, and the bottom end of the lifting rod 12 is inserted into the keyway-type sliding hole and slidably connected thereto. A guide limit seat 13 is fixed to the bottom end of the lifting rod 12, and the guide limit seats 13 are respectively located at the upper and lower ends of the connecting rod 11. The top of the lifting rod 12 passes through a lifting guide seat 14 fixedly connected to the fixed frame and is fixedly connected to the bottom of the carton support 15.
[0065] The photoelectric sensor at a distance L upstream of the center of the detection station on the monitoring conveyor 2 detects that the cigarette carton to be detected has been conveyed to the designated position. The servo motor then starts, driving the eccentric wheel 10 to rotate. This rotation, via the connecting rod 11, pulls the lifting rod 12 upwards along the direction defined by the lifting guide seat 14. This, in turn, causes the carton support seat 15 to smoothly lift the carton to be detected to the preset shooting position. Because the carton support seat 15 adopts a V-groove structure, the opening width of the V-groove is greater than the width of the carton. The inclined surfaces on both sides contact the bottom surface of the carton to form a linear support, utilizing gravity to achieve [the desired effect]. Automatic centering is achieved by positioning the carton support 15 in the belt gap of the monitoring conveyor 2 without contacting the side of the monitoring conveyor 2. This ensures that the lifting rod 12 drives the carton support 15 to pass vertically through the belt gap, guaranteeing the stability of the carton during the shooting process. This allows each industrial camera to capture clear and undistorted images of the carton packaging, providing an accurate image basis for subsequent visual comparison and inspection. After the inspection is completed, the servo motor rotates in the opposite direction, driving the carton support 15 to descend and placing the inspected carton back onto the conveyor belt of the conveyor 2 for continued transport to the next process.
[0066] The rejection assembly 5, located downstream of the monitoring conveyor 2, includes a rejection cylinder 23, a swing plate 21, and a guide plate 22. One end of the rejection cylinder 23 is hinged to the frame of the monitoring conveyor 2, and the other end is hinged to the swing plate 21. A rejection opening is provided on one of the limiting plates of the limiting assembly 6. The swing plate 21 is hinged to the rejection opening, and the guide plate 22 is fixed between the side end of the rejection opening and the frame of the monitoring conveyor 2. The rejection cylinder 23 drives the swing plate 21 to push the defective strip box away from the conveying track, and the guide plate 22 guides it out of the monitoring conveyor 2 and into the collection box connected to the outside of the monitoring conveyor 2.
[0067] When the vision inspection system determines that the carton has a packaging misalignment defect, it will output a rejection signal to the control system. After the defective carton is transported to the rejection station, the rejection cylinder receives the action command and quickly extends, pushing the swing plate 21 to swing around the guide plate 22 around the hinge point. The defective carton that deviates from the qualified conveying path is pushed from the side of the conveyor belt into the guide plate 22. It automatically slides into the collection box along the guide slope of the plate to complete the collection. After rejection is completed, the rejection cylinder resets and drives the swing plate 21 back to the initial position. This does not affect the normal conveying of qualified cartons. It realizes automatic online sorting of defective products, eliminating the need for manual re-inspection and sorting, and improving the overall inspection and sorting efficiency.
[0068] The control system includes a PLC controller and an industrial computer. The input terminals of the PLC controller are connected to the feed photoelectric sensor, the station photoelectric sensor, and the lifting position sensor, respectively. The output terminals are electrically connected to the cylinder 8, the servo motor, the rejection cylinder 23, the electric push rod 17, and the micro servo motor, respectively. The input terminals of the industrial computer are connected to the top camera 19 and the side camera 20 to run the visual comparison algorithm. The output terminal is connected to the PLC controller via Ethernet communication.
[0069] When the feed photoelectric sensor detects that a carton has entered the feeding station, it sends a feeding signal to the PLC controller. The PLC controller then controls the conveyor structure to start, gradually conveying the carton to the detection station.
[0070] When the photoelectric sensor at the workstation detects that the carton has moved to the designated detection workstation, it immediately sends a position signal to the PLC controller. The PLC controller triggers the industrial computer to control the top camera 19 and the side camera 20 to simultaneously acquire images of the top and side packaging of the carton. After the acquired image data is transmitted to the industrial computer, the industrial computer calls the pre-stored standard packaging template and runs a visual comparison algorithm to compare the feature differences between the acquired image and the template.
[0071] The system determines whether the carton has a packaging misalignment defect and then outputs the result to the PLC controller.
[0072] If the determination result is qualified, the PLC controller does not actuate the rejecting assembly, and the carton is normally conveyed to the downstream station;
[0073] If the determination result is unqualified, after the unqualified carton is conveyed to the rejecting station, the PLC controller sends an action instruction to the rejecting cylinder 23 to complete the rejection of the unqualified product. The entire detection and sorting process runs fully automatically with stable detection accuracy, which can effectively prevent unqualified cigarette cartons with misaligned packaging from flowing into the market, and improve the ex-factory quality of cigarette packs.
[0074] To further improve the reliability of the system under high-speed production lines, the control system may further include the following functional modules:
[0075] Prediction trigger module: Calculate the flow speed of cartons according to the pulse interval of the feeding photoelectric sensor, and send a pre-lowering instruction to the cylinder 8 in advance. The pre-lowering advance amount is greater than the mechanical response time of the blocking execution unit, so that the blocking plate 9 has completed the lowering action before the carton arrives, eliminating the time lag between signal transmission and mechanical action.
[0076] Image quality pre-inspection module: The industrial personal computer performs overexposure, underexposure and blurriness detection on the image before visual comparison, and sends a visual feedback signal to the PLC controller only when the image quality is qualified to trigger the lifting and returning action; if the image quality is unqualified, for example, the carton is not lifted in place resulting in defocus, or ambient light interference results in overexposure, the industrial personal computer sends an abnormality marking instruction to the PLC controller to mark the carton as to be manually re-inspected, so as to avoid wrong determination based on poor-quality images.
[0077] The above description is merely preferred embodiments of the present invention, and is not intended to limit the present invention. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present invention shall all fall within the protection scope of the present invention.
Claims
1. A method for detecting misalignment in cigarette box / carton packaging based on visual comparison, characterized in that: Includes the following steps: Step 1: The cigarette packs are conveyed into the monitoring conveyor at a constant speed via the feeding conveyor and guided to the limit position by the limit component; Step 2: The cigarette cartons enter the monitoring conveyor and are detected by the feed photoelectric sensor on the conveyor. The control system activates the blocking component. The conveyor speed is V. A detection gap S is formed between the blocked cigarette cartons and the released cigarette cartons. The detection gap S needs to satisfy: S>V*T+W+D, where V is the linear speed of the monitoring conveyor, T is the complete detection time for a single carton, W is the width of the carton along the conveying direction, and D is the safety margin. The complete detection time for a single carton is T=t1+t2+t3+t4+t5, where t1 is the lifting time, t2 is the mechanical stabilization time, t3 is the imaging exposure time, t4 is the image transmission and preprocessing time, and t5 is the lifting and falling time. The response time of the blocking component from receiving the descent command to fully descending to the conveyor surface is less than W / V to ensure that the blocking action is completed within the time it takes for the width of the carton to pass through. Step 3: The cigarette carton is conveyed to the area below the imaging and detection component. The photoelectric sensor on the monitoring conveyor detects that the cigarette carton has reached the set position. The photoelectric sensor is located at a distance L upstream of the center of the detection station on the monitoring conveyor. The control system triggers the lifting component after a delay Δt, and the delay satisfies Δt=(LW / 2) / V. The control system controls the lifting component located below the monitoring conveyor to extend vertically through the middle gap of the monitoring conveyor, lift the carton off the conveyor belt surface and send it into the imaging and detection component. The carton is lifted into the imaging and detection component and fixed to the position of the lifting position sensor. The cigarette carton is constrained and limited by the lifting component, forming a relatively static imaging state. Step 4: The imaging detection component takes a vertical downward shot of the top surface of the carton and a side shot of the side surface of the carton. High-definition imaging is completed simultaneously while the carton is stationary. The images are transmitted to the control system and registered pixel-level with the pre-stored standard template images to determine whether the carton has packaging misalignment defects. Step 5: After imaging is completed, the control system receives the imaging completion signal and controls the lifting component to return to the bottom of the monitoring conveyor. The cigarette carton falls back onto the monitoring conveyor and continues to be conveyed away from the detection station. The conveyor belt continues to run, and subsequent cartons continue to be conveyed forward. Through spacing control and timing matching, online detection without stopping is achieved. Step 6: If the detection determines that there is a packaging misalignment defect, the control system activates the rejection component to remove the defective carton from the normal conveying track and slide it into the waste collection box connected to the outside of the monitoring conveyor. If the detection determines that it is qualified, the cigarette carton is conveyed normally to the next process with the monitoring conveyor.
2. The method for detecting misalignment in cigarette box / carton packaging based on visual comparison according to claim 1, characterized in that: The imaging and detection component in step 4 can also adaptively adjust the imaging height according to the carton specifications to meet the detection needs of cigarette cartons of different sizes and specifications, ensuring image clarity and detection range coverage.
3. The method for detecting misalignment in cigarette box / carton packaging based on visual comparison according to claim 1, characterized in that: In step 5, the total time for the lifting execution unit of the lifting assembly to fall back from the lifting height to below the conveying surface, plus the safety margin of the control system, is not greater than the time required for the subsequent carton to travel at speed V with a safety margin D.
4. The method for detecting misalignment in cigarette box / carton packaging based on visual comparison according to claim 1, characterized in that: The support base of the lifting component adopts a V-groove structure. The opening width of the V-groove is greater than the width of the strip box. The two inclined surfaces on both sides contact the two sides of the bottom surface of the strip box to form line support, and automatic centering is achieved by using gravity.
5. A visual comparison-based cigarette box / carton packaging misalignment detection system, used to execute the visual comparison-based cigarette box / carton packaging misalignment detection method according to any one of claims 1-4, characterized in that: It includes a feeding conveyor, a feeding photoelectric sensor, a monitoring conveyor, a barrier component, a station photoelectric sensor, a shooting detection component, a rejection component, a limit component, and a lifting component arranged sequentially along the cigarette box conveying direction; The feeding conveyor and the monitoring conveyor are connected in sequence, and a transition connecting plate is fixedly installed at the connection point between the two. The monitoring conveyor is fixed with a limit assembly, which includes two limit plates arranged opposite each other. The ends of the two limit plates are arc-shaped, and screws are rotatably connected to the sides of the two limit plates. The screws are screwed into threaded seats fixed on the frame of the monitoring conveyor. A barrier assembly is fixedly installed on the input end of the monitoring conveyor. The barrier assembly includes a cylinder fixed to the monitoring conveyor by a bracket and a barrier plate that is driven to rise and fall by the cylinder. The monitoring conveyor adopts a hollow conveyor belt structure, which consists of two parallel narrow belts or synchronous belts. The two belts are arranged in parallel along the conveying direction, and a transverse gap is formed between the two belts. The gap is parallel to the conveying direction, allowing the bar box support seat of the lifting component to pass through vertically. A feed photoelectric sensor is installed at the upstream end of the monitoring conveyor, and a station photoelectric sensor is installed at a distance L upstream of the center area of the detection station on the monitoring conveyor. The monitoring conveyor is equipped with a shooting and detection component, and a lifting component located at the lower end of the shooting and detection component and the lower end of the monitoring conveyor. A lifting position sensor is fixedly installed inside the shooting and detection component. The shooting and detection component includes a light-shielding dark box and a top camera installed inside the light-shielding dark box and side cameras respectively arranged on the four sides of the light-shielding dark box. The top camera is arranged vertically downward, and the side cameras are arranged horizontally or at an angle. The image acquisition work of five sides except the bottom surface is completed through a single lifting operation. A rejection component is fixedly installed downstream of the monitoring conveyor. It also includes a control system, which includes a PLC controller and an industrial computer. The input terminal of the PLC controller is electrically connected to the feed photoelectric sensor, the station photoelectric sensor, and the lifting position sensor. The output terminal of the PLC controller is electrically connected to the cylinder control. The output terminal of the industrial computer is connected to the PLC controller via Ethernet communication.
6. The visual comparison-based cigarette box / carton packaging misalignment detection system according to claim 5, characterized in that: Each of the top and side cameras is equipped with a shadowless light source, and each side camera has a rotating shaft fixed to its rear side. The rotating shaft is rotatably connected to the side wall of the light-shielding box. One end of the rotating shaft is rotatably connected to a fixed plate fixed inside the light-shielding box via a bearing, and the other end extends out of the light-shielding box and is fixedly connected to a micro servo motor. Electric push rods and guide members are fixedly connected to the outside of the light-shielding box on both sides. The guide members can move up and down. The micro servo motor and electric push rod are electrically connected to the output of the PLC controller. The top and side cameras are electrically connected to the input of the industrial control computer.
7. The cigarette box / carton packaging misalignment detection system based on visual comparison according to claim 5, characterized in that: The lifting assembly includes a servo motor, an eccentric wheel, a connecting rod, a lifting rod, a guide limit seat, and a bar box support. The servo motor is mounted on a fixed frame, and its output end is fixedly connected to the eccentric wheel. The servo motor is electrically connected to the output end of a PLC controller. A connecting rod is fixed to the side end of the eccentric wheel, and a keyway-type sliding hole is fixed on the connecting rod. The bottom end of the lifting rod is inserted into the keyway-type sliding hole and slidably connected thereto. A guide limit seat is fixed to the bottom end of the lifting rod, and the guide limit seats are respectively set at the upper and lower ends of the connecting rod. The top of the lifting rod passes through the lifting guide seat fixedly connected to the fixed frame and is fixedly connected to the bottom of the bar box support.
8. The cigarette box / carton packaging misalignment detection system based on visual comparison according to claim 5, characterized in that: The rejection assembly includes a rejection cylinder, a swing plate, and a guide plate. One end of the rejection cylinder is hinged to the frame of the monitoring conveyor, and the other end is hinged to the swing plate. The rejection cylinder is electrically connected to the output of the PLC controller. One of the limit plates of the limit assembly has a rejection opening. The swing plate is hinged to the rejection opening, and a guide plate is fixed between the side end of the rejection opening and the frame of the monitoring conveyor.
9. The visual comparison-based cigarette box / carton packaging misalignment detection system according to claim 5, characterized in that: The control system also includes a predictive triggering module, which calculates the strip box flow speed based on the pulse interval of the feed photoelectric sensor and sends a pre-descent command to the cylinder in advance. The pre-descent advance is greater than the mechanical response time of the barrier execution unit, so that the barrier plate has completed the descent action before the strip box arrives, eliminating the time lag between signal transmission and mechanical action.
10. The visual comparison-based cigarette box / carton packaging misalignment detection system according to claim 5, characterized in that: The control system also includes an image quality pre-inspection module. Before visual comparison, the image quality pre-inspection module detects overexposure, underexposure, and blur in the image. Only when the image quality is qualified will it send a visual feedback signal to the PLC controller to trigger the lifting and lowering. If the image quality is unqualified, the industrial control computer sends an abnormal marking instruction to the PLC controller to mark the strip box as needing manual re-inspection, thus avoiding incorrect judgments based on poor-quality images.
Citation Information
Patent Citations
Conveyor belt intermittent stopping and lifting rotary type cigar appearance detection device
CN113624772A