Posture correction device capable of improving scanning accuracy of two-dimensional code of cigarette carton
By designing a device including the main frame, conveyor belt, center pushing mechanism and deviation correction mechanism, visual detection and mechanical drive are used to achieve cargo posture correction, the QR code scanning accuracy caused by the change of cargo posture on high-speed conveyor belt is solved. The problem of the problem improves the recognition rate and deviation correction efficiency.
Patent Information
- Application Number
- CN202411592438.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-01-10
Smart Images

Figure CN119284491A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code, and belongs to the technical field of posture correction. Background Art
[0002] During the production and transmission of cigarette strips or small strips of goods, it is necessary to code and scan the goods for identification. During the transmission process of the traditional assembly line, since the sorting line relies on the conveyor belt to move, there is a certain speed difference between the two sections of the belt, and the posture of the cigarette strips or small strips of goods changes during the turning process, and the goods cannot be kept in a relatively horizontal or specified state, resulting in the tilting and stacking of the goods before the QR code is scanned or identified. In addition, there are a large number of goods and a fast belt speed during the scanning process, resulting in low recognition accuracy of QR code and other scanning equipment, and even abnormal recognition, which requires stopping the line and re-scanning, affecting production. The existing correction equipment and its control algorithm are relatively single or applied to a single scenario, and the correction posture accuracy requirements are relatively low, or the speed requirements in the application scenario are not particularly strict, and there are not many scenarios for scanning and identifying on the conveyor belt production line. In summary, in the prior art, the measurement accuracy of the offset posture is not high, the correction speed is not fast, and the control technology used is relatively single. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a posture correction device which can improve the scanning accuracy of a cigarette two-dimensional code, so as to overcome the shortcomings of the prior art.
[0004] The technical solution of the present invention is: a posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code, the device comprising: a main frame, a first conveyor belt, a centering pushing mechanism, a correction mechanism, a controller and a camera;
[0005] The upper surface of the main frame is provided with a mounting groove;
[0006] The first conveyor belt is arranged in the mounting groove of the main frame, the centering pushing mechanism is arranged directly above the first conveyor belt through the main frame, the pushing direction of the centering pushing mechanism is perpendicular to the conveying direction of the first conveyor belt, the centering pushing mechanism is electrically connected to the controller, and the first conveyor belt is electrically connected to the controller;
[0007] The deflection correction mechanism is arranged at one end of the first conveyor belt outlet through the main frame, the deflection correction mechanism is located in the installation groove, and the deflection correction mechanism is electrically connected to the controller;
[0008] The camera is arranged above the deviation correction mechanism and the centering pushing mechanism through the main frame, and the camera is electrically connected to the controller.
[0009] Specifically, the centering pushing mechanism includes: a left pushing part and a right pushing part, and the left pushing part and the right pushing part are symmetrically arranged on the left and right sides of the first conveyor belt;
[0010] The left push part includes a steering gear, a first crank, a second crank, a push rod, a center push plate, a pressure sensor, a fixed support plate and a push rod bracket;
[0011] The steering gear is fixedly connected to the left side of the main frame through a fixed support plate, a sliding hole matching the push rod is provided on the push rod bracket, the central axis of the sliding hole is perpendicular to the conveying direction of the first conveyor belt, and the push rod bracket is fixedly connected to the main frame on the left side of the first conveyor belt;
[0012] The push rod is slidably inserted in the sliding hole of the push rod bracket, the push rod is connected to the rotating shaft of the steering gear through the second crank and the first crank in sequence, the push rod, the second crank and the first crank are hinged in sequence, and the rotating shaft of the push rod, the second crank and the first crank is parallel to the rotating shaft of the steering gear;
[0013] One side wide surface of the central push plate is fixedly connected to one end of the second crank of the push rod principle, and the other side wide surface of the central push plate is provided with a pressure sensor, and the pressure sensor is electrically connected to the controller.
[0014] Specifically, the deviation correction mechanism includes a fixed frame, a third crank, an end pulley, a deviation correction belt and a driving motor;
[0015] The third cranks include two, one end of the two third cranks is rotatably connected to one of the inner walls of the mounting groove, and the other ends of the two third cranks are simultaneously rotatably connected to the left wall or the right wall of the fixing frame, and the two third cranks always remain parallel to each other when rotating around the rotating shaft connected to the inner wall of the mounting groove, and a driving motor is provided on one of the rotating shafts connected to the inner wall of the mounting groove, and the driving motor is electrically connected to the controller;
[0016] The upper part of the fixing frame is provided with alternating and parallel shallow grooves and deep grooves, the shallow grooves are located at the left and right ends of the fixing frame, the shallow groove on the left side has no left side wall, and the shallow groove on the right side has no right side wall, the shallow grooves include 5, and the deep grooves include 4;
[0017] Each deep groove is provided with end pulleys at both ends, the number of the deviation-correcting belts is the same as the number of the deep grooves, the deviation-correcting belts are arranged in the deep grooves through the end pulleys in each corresponding deep groove, the upper surface of the deviation-correcting belts is higher than the upper surface of the fixing frame, and the upper surfaces of the deviation-correcting belts are parallel to each other;
[0018] The two guiding belts on the left side move in the opposite direction to the two guiding belts on the right side.
[0019] Furthermore, it also includes a second transmission device, which includes a transmission motor, a belt installation shaft and a transmission belt, the belt installation shaft includes 4, the 4 belt installation shafts are arranged in the installation groove, the central axis of the installation shaft is perpendicular to the length direction of the shallow groove of the fixing frame, the 4 belt installation shafts are parallel to each other, the end portions of the 4 belt installation shafts on the same side are connected to form a rectangle, one of the 4 belt installation shafts is connected to the transmission motor shaft, and the transmission motor is electrically connected to the controller;
[0020] The four belt mounting shafts are provided with transmission pulleys, the number of which is consistent with the number of shallow grooves, each transmission pulley corresponds to a shallow groove, and each transmission pulley matches the position of the corresponding shallow groove;
[0021] The number of the conveying belts is consistent with the number of the shallow grooves, each shallow groove corresponds to a conveying belt, and the conveying belt is connected to the pulley through the corresponding shallow grooves.
[0022] Furthermore, the angular velocity of a line connecting any point of the deviation-correcting belt on the same side and the center of the deviation-correcting mechanism rotating around the center of the deviation-correcting mechanism is the same.
[0023] Further, the deviation correction mechanism also includes a deviation correction motor, a main transmission shaft, a secondary transmission shaft, a forward drive gear, a reverse drive gear, a middle left pulley, a middle right pulley, a left pulley and a right pulley;
[0024] The deflection correction motor shaft is fixedly connected to the main transmission shaft, the main transmission shaft is coaxial with the motor shaft, the main transmission shaft is sequentially connected with a forward drive gear, a middle right pulley and a right pulley, the forward drive gear, the middle right pulley and the right pulley are coaxial with the main transmission shaft, the middle right pulley is located in a deep groove on the right side of the middle part, the right pulley is located in a deep groove on the right side, the deflection correction belt in the deep groove on the right side of the middle part is connected to the middle right pulley, and the deflection correction belt in the deep groove on the right side is connected to the right pulley;
[0025] The secondary transmission shaft is parallel to the main transmission shaft, and the secondary transmission shaft is rotatably connected in the fixed frame. The secondary transmission shaft is connected with a reverse drive gear, a middle left pulley and a left pulley in sequence. The reverse drive gear, the middle left pulley and the left pulley are coaxial with the main transmission shaft. The middle left pulley is located in a deep groove on the left side of the middle part, and the left pulley is located in a deep groove on the left side of the middle part. The correction belt in the deep groove on the left side of the middle part is connected to the middle left pulley, and the correction belt in the deep groove on the left side is connected to the left pulley.
[0026] Furthermore, the diameter of the middle left pulley is smaller than the diameter of the left pulley, and the diameter of the middle right pulley is smaller than the diameter of the right pulley.
[0027] Furthermore, the control method of the device is as follows:
[0028] S01, the controller detects the position of the cigarette rod by taking an image through the camera, and sends a push signal to the servo if the cigarette rod is between the left and right center push plates;
[0029] S02: When the pressure of the pressure sensors on the left and right center push plates is not 0 and the pressure difference is less than the set threshold, the controller controls the servo to send a retraction signal;
[0030] S03, the controller detects the angle of the cigarette rod by taking an image through a camera. If the angle of the cigarette rod is greater than a set threshold and the cigarette rod is on the deflection correction belt, the controller controls the drive motor to drive the third crank to rotate so that the height of the upper surface of the deflection correction belt is higher than the height of the upper surface of the conveyor belt. The controller calculates the rotation time required for the deflection correction motor to adjust the cigarette rod according to the angle of the cigarette rod;
[0031] S04, the controller controls the rotation of the deviation correction motor according to the rotation time;
[0032] S05. The controller controls the driving motor to drive the third crank to rotate so that the upper surface height of the deviation correction belt is lower than the upper surface height of the transmission belt.
[0033] Furthermore, the step S04 also includes: the controller detects the current angle of the cigarette rod by taking an image through a camera, and if the current angle of the cigarette rod is greater than a set threshold, jumps to step S03.
[0034] Furthermore, the control method of the device is:
[0035] Obtain the first conveyor belt motor speed ω1, the first conveyor belt length, the first conveyor belt teeth number Z1, the first conveyor belt module m1, the push rod stroke H, the deviation correction motor speed ω5, the third crank length L2, the forward drive gear teeth number Z3, the forward drive gear module m3, the cigarette strip length L3, and the distance h1 that the third crank exceeds the horizontal plane of the second conveyor device;
[0036] Calculate the time T1 that the cigarette rod passes through the first conveyor belt. The calculation method is:
[0037] T1=L1 / [(ω1*Z1*m1) / 2];
[0038] Calculate the center push plate speed vh, the calculation method is:
[0039] vh≥H / T1;
[0040] The controller controls the servo to rotate according to the center push plate speed vh so that the center push plate speed is vh;
[0041] The third crank speed is controlled to be ω4, and the calculation method of ω4 is as follows:
[0042]
[0043] The beneficial effects of the present invention are: compared with the prior art,
[0044] 1) The present invention proposes a method of using visual detection of the posture of goods, and uploads the detection data to the controller at the same time, and then drives the servo engine to move the goods to the middle of the conveyor belt through the first crank, the second crank, the push rod and the centering push plate, and feedbacks the centering posture through the pressure sensor, and then drives the stepper motor to rotate the double crank mechanism composed of the third crank. The correction mechanism is designed with gear meshing inside, so that a single motor can complete the forward and reverse correction belt rotation. The belt speeds in the forward and reverse directions are opposite and the same, and the center of the goods has been pushed to the center line of the correction mechanism by the centering pushing mechanism, so as to realize the posture correction function of the goods and ensure that the goods maintain a horizontal or specified state before entering the code scanning. When the goods complete the posture adjustment through the correction mechanism, the correction belt of the correction mechanism just moves under the conveyor belt with the rotation of the third crank, and leaves the correction mechanism under the push of the conveyor belt to complete the correction. At the same time, the correction of the goods is not limited by the size of the goods, because the centering pushing mechanism and the correction mechanism do not limit the size of the goods. Therefore, the present invention can correct the deviation of goods of different sizes while realizing the correction, so that the two-dimensional code of the goods is more consistent due to the posture of the goods, and the recognition rate is higher;
[0045] 2) The present invention makes the angular velocity of the line connecting any point of the correcting belt on the same side and the center of the correcting mechanism to rotate around the center of the correcting mechanism the same, thereby making the two correcting belts on the same side correct synchronously and correcting the cargo posture more accurately. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A perspective view of the present invention;
[0047] Figure 2 It is a partial view of the centering pushing mechanism of the present invention;
[0048] Figure 3 A three-dimensional view of a fixing frame of the deviation-correcting mechanism of the present invention;
[0049] Figure 4 It is a three-dimensional view of the deviation correction mechanism of the present invention;
[0050] Figure 5 is a perspective view of the deviation-correcting mechanism of the present invention;
[0051] Figure 6 is a circuit structure block diagram of the present invention;
[0052] Figure 7 This is a flow chart of the algorithm for judging whether a cigarette rod is centered according to the present invention. DETAILED DESCRIPTION
[0053] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0054] Implementation Example 1: Reference Figure 1 , a posture correction device capable of improving the accuracy of scanning a two-dimensional code of a cigarette strip, the device comprising: a main frame 1, a first conveyor belt 2, a centering pushing mechanism 5, a correction mechanism 4, a controller 7 and a camera 3;
[0055] The upper surface of the main frame 1 is provided with a mounting groove 1-1;
[0056] The first conveyor belt 2 is arranged in the mounting groove 1-1 of the main frame 1, and the centering pushing mechanism 5 is arranged directly above the first conveyor belt 2 through the main frame 1. The pushing direction of the centering pushing mechanism 5 is perpendicular to the conveying direction of the first conveyor belt 2. The centering pushing mechanism 5 is electrically connected to the controller 7, and the first conveyor belt 2 is electrically connected to the controller 7;
[0057] The deflection correction mechanism 4 is arranged at one end of the outlet of the first conveyor belt 2 through the main frame 1, the deflection correction mechanism 4 is located in the installation groove 1-1, and the deflection correction mechanism 4 is electrically connected to the controller 7;
[0058] The camera 3 is arranged above the deviation correction mechanism 4 and the centering pushing mechanism 5 through the main frame 1. The camera 3 is electrically connected to the controller 7. The camera 3 here is a binocular camera.
[0059] Specifically, the centering pushing mechanism 5 includes: a left pushing part and a right pushing part, and the left pushing part and the right pushing part are symmetrically arranged on the left and right sides of the first conveyor belt 2;
[0060] The left push part includes a steering gear 5-1, a first crank 5-2, a second crank 5-3, a push rod 5-4, a center push plate 5-6, a pressure sensor 5-7, a fixed support plate 5-5 and a push rod 5-4 bracket;
[0061] The steering gear 5-1 is fixedly connected to the left side of the main frame 1 through a fixed support plate 5-5, a sliding hole matching the push rod 5-4 is provided on the push rod 5-4 bracket, the central axis of the sliding hole is perpendicular to the conveying direction of the first conveyor belt 2, and the push rod 5-4 bracket is fixedly connected to the main frame 1 on the left side of the first conveyor belt 2;
[0062] The push rod 5-4 is slidably inserted in the sliding hole of the push rod 5-4 bracket, and the push rod 5-4 is connected to the rotating shaft of the steering gear 5-1 through the second crank 5-3 and the first crank 5-2 in sequence. The push rod 5-4, the second crank and the first crank 5-2 are hinged in sequence, and the rotating shaft of the push rod 5-4, the second crank 5-3 and the first crank 5-2 is parallel to the rotating shaft of the steering gear 5-1;
[0063] One side wide surface of the center push plate 5-6 is fixedly connected to one end of the second crank 5-3 of the push rod 5-4, and the other side wide surface of the center push plate 5-6 is provided with a pressure sensor 5-7, and the pressure sensor 5-7 is electrically connected to the controller 7.
[0064] The centering pushing mechanism consists of a servo, a crank, a push rod, a centering push plate and a pressure sensor. Its working principle is that the servo drives the crank mechanism to make the push rod move linearly in the sliding hole of the bracket, pushing the centering push plate to push the cigarette from both sides to the center position. The pressure sensor detects the thrust. When the cigarette is centered, the signal is fed back to the controller and the servo stops pushing.
[0065] Specifically, the deviation correction mechanism 4 includes a fixed frame 4-1, a third crank 4-2, an end pulley 4-3, a deviation correction belt 4-4 and a driving motor 4-14;
[0066] The third cranks 4-2 include two cranks, one end of the two third cranks 4-2 is rotatably connected to one of the inner walls of the mounting groove 1-1, and the other ends of the two third cranks 4-2 are simultaneously rotatably connected to the left wall or the right wall of the fixing frame 4-1, and the two third cranks 4-2 always remain parallel to each other when rotating around the rotating shaft connected to the inner wall of the mounting groove 1-1, and a driving motor 4-14 is provided on one of the rotating shafts connecting the third cranks 4-2 to the inner wall of the mounting groove 1-1, and the driving motor 4-14 is electrically connected to the controller 7;
[0067] The upper part of the fixing frame 4-1 is provided with alternate and parallel shallow grooves 4-1-1 and deep grooves 4-1-2. The shallow grooves 4-1-1 are located at the left and right ends of the fixing frame 4-1. The shallow groove 4-1-1 on the left has no left side wall, and the shallow groove 4-1-1 on the right has no right side wall. The shallow grooves 4-1-1 include 5, and the deep grooves 4-1-2 include 4.
[0068] Each deep groove 4-1-2 is provided with an end pulley 4-3 at both ends, and the number of the correcting belts 4-4 is the same as the number of the deep grooves 4-1-2. The correcting belts 4-4 are arranged in the deep grooves 4-1-2 through the end pulleys 4-3 in each corresponding deep groove 4-1-2. The upper surface of the correcting belts 4-4 is higher than the upper surface of the fixing frame 4-1, and the upper surfaces of the correcting belts 4-4 are parallel to each other.
[0069] The two deviation-correcting belts 4 - 4 on the left side move in opposite directions to the two deviation-correcting belts 4 - 4 on the left side.
[0070] The correcting mechanism consists of a fixed frame, a third crank, a correcting belt and a driving motor. Its working principle is that the driving motor drives the third crank to rotate, causing the correcting belt to rise or fall. When the correcting belt rises to a level higher than the conveyor belt, the cigarette strips are lifted up by the correcting belts, and the correcting belts on both sides move in opposite directions, adjusting the angle of the cigarette strips through friction. After the correction is completed, the belts drop and the cigarette strips continue to move forward.
[0071] Furthermore, it also includes a second conveying device 6, which includes a transmission motor 6-3, a belt installation shaft 6-1 and a transmission belt 6-2. The belt installation shaft 6-1 includes four, and the four belt installation shafts 6-1 are arranged in the installation groove 1-1. The central axis of the installation shaft is perpendicular to the length direction of the shallow groove 4-1-1 of the fixing frame 4-1. The four belt installation shafts 6-1 are parallel to each other, and the connecting line of the ends of the four belt installation shafts 6-1 on the same side is a rectangle. One of the four belt installation shafts 6-1 is connected to the rotating shaft of the transmission motor 6-3, and the transmission motor 6-3 is electrically connected to the controller 7;
[0072] The four belt mounting shafts 6-1 are provided with conveyor belt 6-2 wheels, the number of which is consistent with the number of shallow grooves 4-1-1, each conveyor belt 6-2 wheel corresponds to a shallow groove 4-1-1, and each conveyor belt 6-2 wheel matches the position of the corresponding shallow groove 4-1-1;
[0073] The number of the conveyor belts 6-2 is consistent with the number of the shallow grooves 4-1-1, and each shallow groove 4-1-1 corresponds to a conveyor belt 6-2, and the conveyor belt 6-2 is connected to the pulley through the corresponding shallow groove 4-1-1.
[0074] The second conveying device includes a transmission motor, a belt mounting shaft and a conveying belt. Its working principle is that the transmission motor drives the belt mounting shaft to rotate, thereby driving the conveying belt to run. The conveying belt passes through the shallow groove of the fixed frame and cooperates with the correction mechanism to ensure that the cigarette strips can be smoothly conveyed to the next process after correction.
[0075] Furthermore, the angular velocity of the line connecting any point of the correcting belt 4 - 4 on the same side and the center of the correcting mechanism 4 rotating around the center of the correcting mechanism 4 is the same.
[0076] The correcting belt is designed so that any point on the same side and the center line of the correcting mechanism have the same angular velocity when rotating. Its working principle is to ensure that the correcting belts on the same side move synchronously, apply uniform correcting force to the cigarette cartons, avoid the deviation of the cigarette cartons during the correction process, and improve the correction accuracy and efficiency.
[0077] Furthermore, the correction mechanism 4 also includes a correction motor 4-5, a main transmission shaft 4-6, a secondary transmission shaft 4-7, a forward drive gear 4-8, a reverse drive gear 4-9, a middle left pulley 4-11, a middle right pulley 4-10, a left pulley 4-13 and a right pulley 4-12;
[0078] The rotation shaft of the deflection correction motor 4-5 is fixedly connected to the main transmission shaft 4-6, and the main transmission shaft 4-6 is coaxial with the motor rotation shaft. The main transmission shaft 4-6 is sequentially connected with the forward drive gear 4-8, the middle right pulley 4-10 and the right pulley 4-12, the forward drive gear 4-8, the middle right pulley 4-10 and the right pulley 4-12 are coaxial with the main transmission shaft 4-6, the middle right pulley 4-10 is located in the deep groove 4-1-2 on the right side of the middle part, the right pulley 4-12 is located in the deep groove 4-1-2 on the right side, the deflection correction belt 4-4 in the deep groove 4-1-2 on the right side of the middle part is connected to the middle right pulley 4-10, and the deflection correction belt 4-4 in the deep groove 4-1-2 on the right side is connected to the right pulley 4-12;
[0079] The secondary transmission shaft 4-7 is parallel to the main transmission shaft 4-6, and the secondary transmission shaft 4-7 is rotatably connected in the fixed frame 4-1. The secondary transmission shaft 4-7 is connected with the reverse drive gear 4-9, the middle left pulley 4-11 and the left pulley 4-13 in sequence. The reverse drive gear 4-9, the middle left pulley 4-11 and the left pulley 4-13 are coaxial with the main transmission shaft 4-6. The middle left pulley 4-11 is located in the deep groove 4-1-2 on the left side of the middle part, and the left pulley 4-13 is located in the deep groove 4-1-2 on the left side of the middle part. The correcting belt 4-4 in the deep groove 4-1-2 on the left side of the middle part is connected to the middle left pulley 4-11, and the correcting belt 4-4 in the deep groove 4-1-2 on the left side is connected to the left pulley 4-13.
[0080] The transmission part of the correction mechanism is composed of a correction motor, a transmission shaft, gears and pulleys. Its working principle is that the correction motor drives the main transmission shaft to rotate, and the forward and reverse drive gears make the secondary transmission shaft rotate in the opposite direction, driving the left and right pulleys to rotate in opposite directions. The correction belt adjusts the angle of the cigarette strip through the rotation of the pulley. The pulley diameter design ensures that the belt speed matches and ensures consistent correction effect.
[0081] Furthermore, the diameter of the middle left pulley 4-11 is smaller than the diameter of the left pulley 4-13, and the diameter of the middle right pulley 4-10 is smaller than the diameter of the right pulley 4-12.
[0082] Furthermore, the control method of the device is as follows:
[0083] S01, the controller 7 detects the position of the cigarette rod by taking an image through the camera 3, and sends a push signal to the steering gear 5-1 if the cigarette rod is between the left and right center push plates 5-6;
[0084] S02, when the pressure of the pressure sensor 5-7 on the left and right center push plates 5-6 is not 0, and the pressure difference is less than the set threshold, the controller 7 controls the steering gear 5-1 to send a retraction signal;
[0085] S03, the controller 7 detects the angle of the cigarette rod by taking an image through the camera 3. If the angle of the cigarette rod is greater than the set threshold and the cigarette rod is on the deviation correction belt 4-4, the controller 7 controls the drive motor 4-14 to drive the third crank 4-2 to rotate, so that the upper surface height of the deviation correction belt 4-4 is higher than the upper surface height of the conveyor belt 6-2. The controller 7 calculates the rotation time required for the deviation correction motor 4-5 to adjust the cigarette rod according to the angle of the cigarette rod;
[0086] S04, the controller 7 controls the rotation of the deviation correction motor 4-5 according to the rotation time;
[0087] S05, the controller 7 controls the driving motor 4-14 to drive the third crank 4-2 to rotate so that the upper surface height of the deviation correction belt 4-4 is lower than the upper surface height of the conveying belt 6-2.
[0088] The control method is that the camera detects the position and angle of the cigarette strip in real time, and the controller controls the servo to drive the centering push plate to push the cigarette strip to the center based on the data. When the pressure sensor detects that the cigarette strip is centered, the servo stops; if an angle deviation of the cigarette strip is detected, the controller controls the correction mechanism to raise the correction belt, and the correction motor adjusts the belt rotation to correct the angle of the cigarette strip. After completion, the belt drops and the cigarette strip continues to move forward.
[0089] Furthermore, the step S04 also includes: the controller 7 detects the current angle of the cigarette rod by taking an image through the camera 3, and if the current angle of the cigarette rod is greater than a set threshold, jumps to step S03.
[0090] Furthermore, the control method of the device is:
[0091] S01, obtain the first conveyor belt 2 motor speed ω1, the first conveyor belt 2 length, the first conveyor belt 2 teeth number Z1, the first conveyor belt 2 module m1, the push rod 5-4 stroke H, the correction motor 4-5 speed ω5, the third crank 4-2 length L2, the forward drive gear 4-8 teeth number Z3, the forward drive gear 4-8 module m3, the cigarette length L3, the third crank 4-2 exceeds the second conveyor 6 horizontal distance h1;
[0092] S02, calculating the time T1 of the cigarette rod passing through the first conveyor belt 2, the calculation method is:
[0093] T1=L1 / [(ω1*Z1*m1) / 2];
[0094] S03, calculate the speed vh of the center push plate 5-6, the calculation method is:
[0095] vh≥H / T1;
[0096] S04, the controller 7 controls the steering gear 5-1 to rotate according to the speed vh of the center push plate 5-6 so that the speed of the center push plate 5-6 is vh;
[0097] S05, controlling the rotation speed of the third crank 4-2 to be ω4, and the calculation method of ω4 is as follows:
[0098]
[0099] By calculating parameters such as conveyor belt speed, push plate stroke and correction motor speed, the controller accurately controls the actions of each mechanism. Its working principle is to calculate the movement speed and time of the center push plate and correction mechanism according to the passage time of the cigarette strips on the conveyor belt, ensuring that the posture of the cigarette strips can be corrected in a timely and accurate manner during high-speed transmission, thereby improving production efficiency.
[0100] For whether the smoke strip is centered, refer to Figure 7 The following algorithm is used to determine:
[0101] 1) Using a binocular stereo camera to obtain images of cigarette rods;
[0102] 2) Convert the acquired color image into a grayscale image;
[0103] 3) In the first frame image, a feature point in the target area is selected as the seed point. According to the gray value of the seed point, the growth condition is set, and the pixel points with a gray value close to the seed point are added to the seed area. The average gray value Ga of the target feature area after growth is calculated as a reference for image segmentation. A preliminary circumscribed rectangle is generated according to the growth area to determine the position of the target in the image coordinate system;
[0104] 4) Using the calculated average gray value Ga to perform threshold segmentation on the entire image;
[0105] 5) Perform top hat operation, opening operation and closing operation on the segmented image;
[0106] 6) For the optimized image, extract the contours of each connected area, generate its circumscribed rectangle, calculate the area and aspect ratio of each circumscribed rectangle, and select the circumscribed rectangle with the largest area and the largest aspect ratio as the final target rectangle;
[0107] 7) Use the minimum bounding rectangle algorithm to obtain the center point coordinates, width, height and rotation angle of the target rectangle;
[0108] 8) The center coordinates and rotation angle of the target are transmitted to the controller;
[0109] 9) Update the average gray value Ga calculated for the current frame as a reference for the next frame image processing;
[0110] 10) According to the center position and rotation angle of the target, the offset of the cigarette rod is calculated. The controller adjusts the rotation angle of the servo according to the offset, controls the moving distance of the center baffle, and determines whether the target object is accurately centered through the pressure sensor on the center baffle;
[0111] 12) Repeat steps 1) to 9) to process the images of subsequent frames to achieve continuous detection and correction of the target object.
[0112] The image information of the cigarette strips is obtained by using a binocular stereo camera. In order to extract the target, a region growing algorithm is designed to realize the feature recognition of the attached target. The basic idea of the region growing algorithm is to start from a single pixel point and merge pixels with similar properties to form the same region according to the algorithm growth rule. The specific process is to first select a target point in the image as a seed point, then add the seed region according to the pixel points in the image that are similar to the seed region and meet the growth rule conditions, and finally generate a seed region with similar properties to the seed point.
[0113] The cigarette feature detection process is designed based on the region growing algorithm. First, a feature point in the target area is selected in the first acquired target image, and region growth is performed based on the image features of the point. The average grayscale value of the target feature area is calculated as a reference value for image segmentation and a preliminary bounding rectangle is generated to determine the coordinate position of the target in the image coordinates. In order to improve the detection accuracy of the target, the entire image is feature screened according to the average grayscale value to complete the image segmentation. Optimization processing is performed based on the image features, and top hat operations, open operations, and closed operations are used to improve features such as the contour and connected areas of the processed area. A bounding rectangle is then generated based on the processed features. The area and aspect ratio of all bounding rectangles are screened out to select the rectangle with the largest area and aspect ratio as the target rectangle. Finally, the center coordinate position of the bounding rectangle in the image coordinate system is fed back to the onboard computer for control processing, and the average grayscale value of the target feature area is updated at the same time as the reference value for the next frame of image processing. The overall process of target detection is as follows: Figure 7 shown.
[0114] In the process, the image is first converted from a color image to a grayscale image, and then region growing and bounding rectangle operations are performed to obtain information such as the average pixel grayscale and the bounding rectangle position. The target position information is obtained by performing operations in the pixel coordinate system, satisfying the following formula:
[0115]
[0116] Where M1, M2, N1, and N2 represent the extreme values of the horizontal and vertical coordinates of the coordinate system, roi.x represents the horizontal coordinate of the upper left corner of the target circumscribed rectangle in the pixel coordinate system, roi.y represents the vertical coordinate, roi.w represents the width of the circumscribed rectangle, roi.h represents the height of the circumscribed rectangle, Cw and Ch represent the set width and height thresholds, g(x,y) represents the pixel value after segmentation, Ga represents the target average pixel grayscale, T1 represents the adaptive adjustment threshold, and f(x,y) represents the grayscale value corresponding to the pixel point (x,y) coordinates.
[0117] In the optimization process, the interference features can be filtered by morphological top-hat operation. After the top-hat operation, the image features are basically horizontal features. The opening operation is used to erode first and then expand. The rectangles with feature width far greater than the height are retained, and the slender horizontal elements in the image features are filtered. Then the image is closed, expanded first and then eroded, and the target area features are filled to make the target area smooth and complete. Finally, the area and aspect ratio of the circumscribed rectangle are screened through the area contour after optimization. The target area P is selected as:
[0118] P = max(rectg i ×ratio i )
[0119] In the formula, rectgi represents the area of the circumscribed rectangle, and ratioi represents the ratio of the width to the height of the circumscribed rectangle.
[0120] Then use the minimum enclosing rectangle method, which will return the left side of the center point of the minimum enclosing rectangle, the rectangle width, height, and rotation angle, to calculate the rotation angle of the cigarette.
[0121] The target area and coordinate position are obtained through visual processing, and the target coordinate information is transmitted to the control system through the communication system, providing a data basis for the next step of posture correction.
[0122] Knowing the rotation angle and center position of the cigarette strip under the coordinate axis, the offset between the cigarette strip and the conveyor belt can be calculated in the same coordinate system. After the offset is calculated, it is fed back to the control system. The control system adjusts the rotation angle of the servo to control the moving distance of the center baffle, and the pressure sensor on the center baffle is used as feedback to determine whether the centering is accurate. Prepare for the next step of attitude correction.
[0123] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A posture correction device capable of improving the scanning accuracy of a cigarette QR code, characterized in that: The device comprises: a main frame (1), a first conveyor belt (2), a centering pushing mechanism (5), a deviation correcting mechanism (4), a controller (7) and a camera (3); The upper surface of the main frame (1) is provided with a mounting groove (1-1); The first conveyor belt (2) is arranged in the installation groove (1-1) of the main frame (1); the centering pushing mechanism (5) is arranged directly above the first conveyor belt (2) through the main frame (1); the pushing direction of the centering pushing mechanism (5) is perpendicular to the conveying direction of the first conveyor belt (2); the centering pushing mechanism (5) is electrically connected to the controller (7); and the first conveyor belt (2) is electrically connected to the controller (7); The deflection correction mechanism (4) is arranged at one end of the outlet of the first conveyor belt (2) through the main frame (1), the deflection correction mechanism (4) is located in the installation groove (1-1), and the deflection correction mechanism (4) is electrically connected to the controller (7); The camera (3) is arranged above the deviation correction mechanism (4) and the centering pushing mechanism (5) through the main frame (1), and the camera (3) is electrically connected to the controller (7).
2. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to claim 1 is characterized in that: The centering pushing mechanism (5) comprises: a left pushing part and a right pushing part, wherein the left pushing part and the right pushing part are symmetrically arranged on the left and right sides of the first conveyor belt (2); The left push part comprises a steering gear (5-1), a first crank (5-2), a second crank (5-3), a push rod (5-4), a center push plate (5-6), a pressure sensor (5-7), a fixed support plate (5-5) and a push rod (5-4) bracket; The steering gear (5-1) is fixedly connected to the left side of the main frame (1) through a fixed support plate (5-5); a sliding hole matching the push rod (5-4) is provided on the push rod (5-4) bracket; the central axis of the sliding hole is perpendicular to the conveying direction of the first conveyor belt (2); and the push rod (5-4) bracket is fixedly connected to the main frame (1) on the left side of the first conveyor belt (2); The push rod (5-4) is slidably inserted in the sliding hole of the push rod (5-4) bracket, the push rod (5-4) is connected to the rotating shaft of the steering gear (5-1) through the second crank (5-3) and the first crank (5-2) in sequence, the push rod (5-4), the second crank and the first crank (5-2) are hinged in sequence, and the hinged rotating shaft of the push rod (5-4), the second crank (5-3) and the first crank (5-2) is parallel to the rotating shaft of the steering gear (5-1); One side wide surface of the central push plate (5-6) is fixedly connected to one end of the second crank (5-3) of the push rod (5-4), and the other side wide surface of the central push plate (5-6) is provided with a pressure sensor (5-7), and the pressure sensor (5-7) is electrically connected to the controller (7).
3. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to claim 1 is characterized in that: The deviation-correcting mechanism (4) comprises a fixing frame (4-1), a third crank (4-2), an end pulley (4-3), a deviation-correcting belt (4-4) and a driving motor (4-14); The third cranks (4-2) include two cranks, one end of the two third cranks (4-2) is rotatably connected to one side inner wall of the mounting groove (1-1), and the other ends of the two third cranks (4-2) are simultaneously rotatably connected to the left side wall or the right side wall of the fixing frame (4-1), and the two third cranks (4-2) always remain parallel to each other when rotating around the rotating shaft connected to the inner wall of the mounting groove (1-1), and a driving motor (4-14) is provided on one of the rotating shafts connecting the third cranks (4-2) to the inner wall of the mounting groove (1-1), and the driving motor (4-14) is electrically connected to the controller (7); The upper part of the fixing frame (4-1) is provided with alternate and parallel shallow grooves (4-1-1) and deep grooves (4-1-2), the shallow grooves (4-1-1) are located at the left and right ends of the fixing frame (4-1), the shallow groove (4-1-1) on the left side has no left side wall, and the shallow groove (4-1-1) on the right side has no right side wall, the shallow grooves (4-1-1) include 5, and the deep grooves (4-1-2) include 4; Each deep groove (4-1-2) is provided with an end pulley (4-3) at both ends, the number of the deviation-correcting belts (4-4) is the same as the number of the deep grooves (4-1-2), the deviation-correcting belts (4-4) are arranged in the deep grooves (4-1-2) through the end pulleys (4-3) in each corresponding deep groove (4-1-2), the upper surface of the deviation-correcting belts (4-4) is higher than the upper surface of the fixing frame (4-1), and the upper surfaces of the deviation-correcting belts (4-4) are parallel to each other; The two deviation-correcting belts (4-4) on the left side move in opposite directions to the two deviation-correcting belts (4-4) on the right side.
4. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to claim 3 is characterized in that: It also includes a second transmission device (6), the second transmission device (6) includes a transmission motor (6-3), a belt installation shaft (6-1) and a transmission belt (6-2), the belt installation shaft (6-1) includes four, the four belt installation shafts (6-1) are arranged in the installation groove (1-1), the central axis of the installation shaft is perpendicular to the length direction of the shallow groove (4-1-1) of the fixed frame (4-1), the four belt installation shafts (6-1) are parallel to each other, the connecting line of the ends of the four belt installation shafts (6-1) on the same side is a rectangle, one of the four belt installation shafts (6-1) is connected to the rotating shaft of the transmission motor (6-3), and the transmission motor (6-3) is electrically connected to the controller (7); The four belt mounting shafts (6-1) are provided with transmission belt (6-2) wheels, the number of the transmission belt (6-2) wheels is consistent with the number of the shallow grooves (4-1-1), each transmission belt (6-2) wheel corresponds to a shallow groove (4-1-1), and the position of each transmission belt (6-2) wheel matches the corresponding shallow groove (4-1-1); The number of the conveying belts (6-2) is consistent with the number of the shallow grooves (4-1-1), each shallow groove (4-1-1) corresponds to a conveying belt (6-2), and the conveying belt (6-2) is connected to the pulley through the corresponding shallow groove (4-1-1).
5. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to claim 3 is characterized in that: The angular velocity of the line connecting any point of the deviation-correcting belt (4-4) on the same side and the center of the deviation-correcting mechanism (4) is the same when it rotates around the center of the deviation-correcting mechanism (4).
6. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to any one of claims 3 to 5, characterized in that: The deflection correction mechanism (4) also includes a deflection correction motor (4-5), a main transmission shaft (4-6), a secondary transmission shaft (4-7), a forward drive gear (4-8), a reverse drive gear (4-9), a middle left pulley (4-11), a middle right pulley (4-10), a left pulley (4-13) and a right pulley (4-12); The rotation shaft of the deflection correction motor (4-5) is fixedly connected to the main transmission shaft (4-6), the main transmission shaft (4-6) is coaxial with the motor rotation shaft, the main transmission shaft (4-6) is sequentially connected with a forward driving gear (4-8), a middle right pulley (4-10) and a right pulley (4-12), the forward driving gear (4-8), the middle right pulley (4-10) and the right pulley (4-12) are coaxial with the main transmission shaft (4-6), the middle right pulley (4-10) is located in a deep groove (4-1-2) on the right side of the middle part, the right pulley (4-12) is located in a deep groove (4-1-2) on the right side of the middle part, the deflection correction belt (4-4) in the deep groove (4-1-2) on the right side of the middle part is connected to the middle right pulley (4-10), and the deflection correction belt (4-4) in the deep groove (4-1-2) on the right side is connected to the right pulley (4-12); The secondary transmission shaft (4-7) is parallel to the main transmission shaft (4-6), and the secondary transmission shaft (4-7) is rotatably connected in the fixed frame (4-1). The secondary transmission shaft (4-7) is sequentially connected with a reverse driving gear (4-9), a middle left pulley (4-11) and a left pulley (4-13). The reverse driving gear (4-9), the middle left pulley (4-11) and the left pulley (4-13) are coaxial with the main transmission shaft (4-6). The middle left pulley (4-11) is located in a deep groove (4-1-2) on the left side of the middle part, and the left pulley (4-13) is located in a deep groove (4-1-2) on the left side of the middle part. The deviation correction belt (4-4) in the deep groove (4-1-2) on the left side of the middle part is connected to the middle left pulley (4-11), and the deviation correction belt (4-4) in the deep groove (4-1-2) on the left side is connected to the left pulley (4-13).
7. The posture correction device for improving the scanning accuracy of a cigarette two-dimensional code according to claim 6 is characterized in that: The diameter of the middle left pulley (4-11) is smaller than the diameter of the left pulley (4-13), and the diameter of the middle right pulley (4-10) is smaller than the diameter of the right pulley (4-12).
8. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to claim 7 is characterized in that: The control method of the device is as follows: S01, the controller (7) detects the position of the cigarette rod by taking an image through the camera (3), and sends a push signal to the steering gear (5-1) if the position of the cigarette rod is between the two center push plates (5-6) on the left and right; S02, when the pressure of the pressure sensors (5-7) on the left and right center push plates (5-6) is not 0 and the pressure difference is less than a set threshold, the controller (7) controls the steering gear (5-1) to send a retraction signal; S03, the controller (7) detects the angle of the cigarette rod by taking an image through the camera (3); if the angle of the cigarette rod is greater than a set threshold and the cigarette rod is located on the deviation correction belt (4-4), the controller (7) controls the driving motor (4-14) to drive the third crank (4-2) to rotate so that the height of the upper surface of the deviation correction belt (4-4) is higher than the height of the upper surface of the conveyor belt (6-2); the controller (7) calculates the rotation time required for the deviation correction motor (4-5) to adjust the cigarette rod according to the angle of the cigarette rod; S04, the controller (7) controls the rotation of the deviation correction motor (4-5) according to the rotation time; S05, the controller (7) controls the driving motor (4-14) to drive the third crank (4-2) to rotate so that the height of the upper surface of the deviation-correcting belt (4-4) is lower than the height of the upper surface of the transmission belt (6-2).
9. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to claim 8 is characterized in that: The step S04 also includes: the controller (7) detects the current angle of the cigarette rod by taking an image through the camera (3); if the current angle of the cigarette rod is greater than a set threshold, the process jumps to step S03.
10. The posture correction device capable of improving the scanning accuracy of a cigarette two-dimensional code according to claim 8, characterized in that: The control method of the device is: Obtain the first conveyor belt (2) motor speed ω1, the first conveyor belt (2) length, the first conveyor belt (2) tooth number Z1, the first conveyor belt (2) module m1, the push rod (5-4) stroke H, the deviation correction motor (4-5) speed ω5, the third crank (4-2) length L2, the forward drive gear (4-8) tooth number Z3, the forward drive gear (4-8) module m3, the cigarette strip length L3, and the third crank (4-2) exceeds the second conveyor device (6) horizontal plane distance h1; The time T1 that the tobacco rod passes through the first conveyor belt (2) is calculated as follows: T1=L1 / [(ω1*Z1*m1) / 2]; Calculate the velocity vh of the center push plate (5-6) as follows: vh≥H / T1.