Cosmetic box appearance detection device and detection method based on image processing
By designing a cosmetic box appearance detection device based on image processing, the existing detection methods are solved, and the surface defects of the cosmetic box are automatically detected, multi-angle and efficient.
Patent Information
- Application Number
- CN202411916892.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing cosmetic box surface defect detection methods are inefficient, have low accuracy, and are difficult to adapt to the diversity of cosmetic box styles, making it difficult to guarantee the reliability of the detection results.
An image processing-based cosmetic box appearance detection device is designed, including a conveyor belt, an industrial camera, a detection mechanism and adjustment components. Through image acquisition, preprocessing and deep learning algorithms, it can identify defects on the surface of the cosmetic box to achieve automated and multi-angle detection.
Improves the efficiency and accuracy of cosmetic box appearance inspection, and can adapt to different sizes and styles of cosmetic boxes, including cosmetic boxes with drawers, significantly reduces manual intervention and ensures comprehensiveness and reliability of the inspection.
Smart Images

Figure CN119666858A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cosmetic box detection, and in particular to a cosmetic box appearance detection device and detection method based on image processing. Background Art
[0002] With the continuous expansion of the cosmetics market, the demand for cosmetic cases is also growing. The surface quality of cosmetic cases directly affects the appearance and quality of the product, so the detection of cosmetic case surface defects is crucial. At present, the traditional cosmetic case surface defect detection mainly relies on manual visual inspection, which is not only inefficient, but also easily affected by human factors, and the accuracy and reliability of the detection results are difficult to guarantee.
[0003] With the development of image recognition technology, some defect detection methods based on image recognition are gradually applied in industrial production. However, the existing image recognition technology still has some problems in the surface defect detection of cosmetic boxes, such as low detection accuracy, poor adaptability, slow detection speed, etc. In addition, due to the different styles of cosmetic boxes, the drawers of cosmetic boxes with drawers are easy to fall out during the flipping process, resulting in detection deviation.
[0004] In view of the above problems, the present invention proposes a cosmetic box appearance detection device and detection method based on image processing. Summary of the invention
[0005] Based on the technical problems of existing image processing for makeup box detection, the present invention proposes a makeup box appearance detection device and detection method based on image processing.
[0006] The present invention proposes a cosmetic box appearance detection device based on image processing, comprising a conveyor belt, a U-shaped fixing frame is fixedly connected to the middle of the conveyor belt, a controller is fixedly connected to the upper end of the U-shaped fixing frame, an industrial camera is fixedly connected to the upper end of the U-shaped fixing frame, and the industrial camera is located below the controller; one side of the U-shaped fixing frame is symmetrically fixedly connected to a support column, a screw rod is fixedly connected between two of the support columns, a placement disk is arrayed on the upper surface of the conveyor belt, a detection mechanism is arranged between the screw rod and the U-shaped fixing frame, the detection mechanism comprises an electric telescopic rod I fixed to one side of a screw nut of the screw rod, an electric turntable is fixedly connected to the outer surface of the lower end of the electric telescopic rod, and a connecting column is fixedly connected to the rotating part of the electric turntable.
[0007] Preferably, the lower end of the connecting column is fixedly connected to a bearing, an outer ring on one side of the bearing is fixedly connected to a sleeve, an inner wall of the sleeve is fixedly connected to a servo motor, an output shaft of the servo motor is fixedly connected to a circular plate, the circular plate is fixedly connected to the inner ring on the other side of the bearing, an electric telescopic rod II is provided on one side of the circular plate, a connecting block is fixedly connected to the outer periphery of the lower end of the electric telescopic rod II, one side of the connecting block is fixedly connected to the surface of the circular plate, and an adjusting component is provided on one side of the connecting block.
[0008] The adjusting components are used for flipping different sides of the cosmetic box.
[0009] Preferably, the adjusting component includes a fixing cap, the outer surface of the fixing cap is fixedly connected to the upper end of the electric telescopic rod II through a fixing block, the inner wall of the fixing cap is fixedly connected to the motor I, the output shaft of the motor I is fixedly connected to the spur gear I, the surface of the spur gear I is meshed with a toothed belt, the outer surface of the fixing cap is provided with a slot hole matched with the toothed belt, the outer surface of the fixing cap is fixedly connected to an upper fixing rod, the upper fixing rod is located below the slot hole, the upper surface of one end of the upper fixing rod is rotatably connected to the spur gear II through a bearing, the upper surface of the spur gear II is fixedly connected to a gasket, the upper surface of the gasket is fixedly connected to a mechanical arm, and the end of the mechanical arm is fixedly connected to a pneumatic clamp.
[0010] Preferably, a sliding rod is fixedly connected to a circular array on the lower surface of the fixing cap, and a lower fixing rod is slidably connected to the surface of the sliding rod, an L-shaped mounting groove is provided inside the lower fixing rod, a motor II is fixedly connected to the inner wall of the mounting groove, an output shaft of the motor II is fixedly connected to a spur gear III, a toothed belt II is meshed on the surface of the spur gear III, one end of the toothed belt II is meshed with a spur gear IIII, the lower surface of the spur gear IIII is rotatably connected to the rod body of the lower fixing rod through a bearing, a rotating column is fixedly connected to the upper surface of the spur gear IIII, and a contact plate is fixedly connected to the upper end of the rotating column.
[0011] Preferably, a slot hole matching the housing of the motor II is formed on the lower surface of the fixing cap.
[0012] Preferably, the outer surface of the contact disc is sleeved with a silicone sleeve.
[0013] Preferably, a silicone gasket is provided on the surface of the pneumatic clamping jaw.
[0014] Preferably, the controller includes a control mainboard, on which a microprocessor, an image acquisition module, an image processing module and a communication module are integrated, the microprocessor is electrically connected to the image acquisition module, the image processing module and the communication module respectively, the image acquisition module is electrically connected to the industrial camera, and the image processing module is used to pre-process the collected image, including denoising, enhancement and binarization operations, to improve the quality and contrast of the image, so as to facilitate subsequent defect analysis.
[0015] Preferably, the image processing module has a built-in deep learning algorithm unit, which adopts a convolutional neural network structure and is pre-trained with a large amount of annotated cosmetic box appearance image data. The trained model can automatically extract the characteristics of cosmetic box surface defects and accurately identify different types of appearance defects such as scratches, pits, color differences and pattern blemishes.
[0016] Preferably, the detection method of the cosmetic box appearance detection device based on image processing comprises the following operating steps:
[0017] Step 1: During the inspection, the cosmetic box is placed on the placement plate, and the micro camera embedded in the upper fixed rod takes real-time photos of whether the slot on the placement plate is aligned with the lower fixed rod, and the entire inspection mechanism is adjusted by the screw rod until the lower fixed rod is aligned with the slot of the placement plate. The conveyor belt drives it to the vicinity of the industrial camera, and the electric telescopic rod I drives the bearing at its lower end to descend, thereby driving the servo motor and the electric telescopic rod II to descend until the lower fixed rod contacts the surface of the conveyor belt, the lower fixed rod is inserted into the slot, and the conveyor belt stops driving;
[0018] Step 2: The upper end of the electric telescopic rod II contracts, driving the upper fixed rod fixed to the upper end thereof to descend together, and the rotatable part of the lower end of the upper fixed rod of the device contacts the surface of the cosmetic box. At this time, the upper fixed rod and the lower fixed rod form a clamping shape for the cosmetic box, and the electric telescopic rod I starts to contract, driving the lower adjustment component to approach the industrial camera. When the lower adjustment component rises to the specified height, the electric telescopic rod I stops contracting;
[0019] Step 3, the industrial camera takes a picture of the upper surface of the makeup box. While taking the picture, the motor II drives the contact plate fixedly connected to the upper end of the rotating column to rotate through the spur gear III, spur gear IIII and toothed belt II, and adjusts the drawer side of the makeup box close to the side where the pneumatic clamp is located. The mechanical arm drives the pneumatic clamp at its end close to the drawer of the makeup box, and the pneumatic clamp clamps the makeup box. At the same time, the clamping part of the pneumatic clamp squeezes the outside of the drawer of the makeup box. Then the servo motor rotates the disc 90 degrees through the rotating shaft, thereby driving the makeup box to rotate 90 degrees through the adjusting component. Motor II and motor I start working at the same time, and synchronously drive the makeup box to rotate 360 degrees through the gear and toothed belt transmission system. The industrial camera takes a picture of the rotating makeup box. Finally, the servo motor rotates 90 degrees again, and the industrial camera takes a picture of the other side of the makeup box.
[0020] Step 4: The industrial camera uploads each group of photos taken to the controller. The controller calls the image processing module to perform defect detection on different photos until the detection results are fed back to the terminal. At this point, the defect detection of a single makeup box is completed.
[0021] The beneficial effects of the present invention are:
[0022] 1. By setting up the detection mechanism, the entire detection process is coordinated by the controller, with the help of screw rods, electric telescopic rods, motors and other driving components and corresponding mechanical structures, to achieve an automated operation process, greatly reducing manual intervention and improving detection efficiency. It is especially suitable for the appearance inspection of batch cosmetic boxes. In addition, the detection mechanism can realize all-round and multi-angle appearance inspection of cosmetic boxes, effectively avoiding the problem of missing defects due to limited detection angles, and improving the comprehensiveness and accuracy of detection.
[0023] 2. By setting the controller to adjust the motion parameters of each component, it can adapt to the appearance inspection needs of cosmetic boxes of different sizes, including but not limited to those with special drawer structures, and has good versatility. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of a cosmetic box appearance detection device and detection method based on image processing proposed by the present invention;
[0025] Figure 2 A servo motor position diagram of a cosmetic box appearance detection device and detection method based on image processing proposed by the present invention;
[0026] Figure 3 This is a position diagram of the electric telescopic rod II of a cosmetic case appearance detection device and detection method based on image processing proposed by the present invention;
[0027] Figure 4 A three-dimensional diagram of the adjustment components of a cosmetic case appearance detection device and detection method based on image processing proposed by the present invention;
[0028] Figure 5 A cross-sectional view of a lower fixing rod of a cosmetic case appearance inspection device and inspection method based on image processing proposed by the present invention;
[0029] Figure 6 A three-dimensional diagram of a placement plate of a cosmetic case appearance detection device and detection method based on image processing proposed by the present invention.
[0030] In the figure: 1. conveyor belt; 2. U-shaped fixing frame; 3. industrial camera; 4. supporting column; 5. screw rod; 6. placing plate; 7. detection mechanism; 71. electric telescopic rod I; 72. electric turntable; 73. bearing; 74. round plate; 75. sleeve; 76. servo motor; 77. electric telescopic rod II; 78. connecting block; 79. adjusting component; 791. fixing cap; 792. motor I; 793. spur gear I; 794. toothed belt; 795. upper fixing rod; 796. spur gear II; 797. gasket; 798. mechanical arm; 799. pneumatic clamp; 7910. sliding rod; 7911. lower fixing rod; 7912. motor II; 7913. spur gear III; 7914. toothed belt II; 7915. spur gear IIII; 7916. rotating column; 7917. contact plate. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0032] Reference Figure 1-Figure 6A cosmetic box appearance detection device based on image processing includes a conveyor belt 1, a U-shaped fixing frame 2 is fixedly connected to the middle of the conveyor belt 1, a controller is fixedly connected to the upper end of the U-shaped fixing frame 2, an industrial camera 3 is fixedly connected to the upper end of the U-shaped fixing frame 2, and the industrial camera 3 is located below the controller. A support column 4 is symmetrically fixedly connected to one side of the U-shaped fixing frame 2, and a screw rod 5 is fixedly connected between the two support columns 4. A placement plate 6 is arranged in an array on the upper surface of the conveyor belt 1, and a detection mechanism 7 is arranged between the screw rod 5 and the U-shaped fixing frame 2. The detection mechanism 7 includes an electric telescopic rod I71 fixed to one side of the screw nut of the screw rod 5, and the electric telescopic rod I71 The outer surface of the lower end is fixedly connected to an electric turntable 72, and the rotating part of the electric turntable 72 is fixedly connected to a connecting column; the lower end of the connecting column is fixedly connected to a bearing 73, and a sleeve 75 is fixedly connected to the outer ring of one side of the bearing 73, and a servo motor 76 is fixedly connected to the inner wall of the sleeve 75. The output shaft of the servo motor 76 is fixedly connected to a circular plate 74, and the circular plate 74 is fixedly connected to the inner ring of the other side of the bearing 73. An electric telescopic rod II77 is provided on one side of the circular plate 74, and a connecting block 78 is fixedly connected to the outer periphery of the lower end of the electric telescopic rod II77, and one side of the connecting block 78 is fixedly connected to the surface of the circular plate 74, and an adjusting component 79 is provided on one side of the connecting block 78.
[0033] Through the complex and orderly mechanical structure combination in the detection mechanism 7, the industrial camera 3 can obtain the appearance image of the makeup box from multiple angles. This multi-angle detection method can effectively avoid the detection blind spots caused by the complex shape of the makeup box or the presence of hidden defects, greatly improving the comprehensiveness and accuracy of the detection, and ensuring that every part of the appearance of the makeup box can be carefully inspected; compared with the traditional manual detection method, the automated operation not only reduces the errors caused by visual fatigue, subjective judgment differences and other factors in manual detection, but also significantly improves the detection efficiency, and can quickly detect the makeup boxes that are continuously transported on the conveyor belt 1, which is particularly suitable for batch detection of the appearance of makeup boxes in a large-scale production environment.
[0034] In order to realize the turning action of adjusting component 79 for different sides of the cosmetic box, Figure 4-Figure 6As shown, an adjusting component 79 is provided, including a fixing cap 791, the outer surface of which is fixedly connected to the upper end of the electric telescopic rod II77 through a fixing block, the inner wall of the fixing cap 791 is fixedly connected to a motor I792, the output shaft of the motor I792 is fixedly connected to a spur gear I793, the surface of the spur gear I793 is meshed with a toothed belt 794, the outer surface of the fixing cap 791 is provided with a slot hole matched with the toothed belt 794, the outer surface of the fixing cap 791 is fixedly connected to an upper fixing rod 795, one end of the upper fixing rod 795 is embedded with a miniature camera, the upper fixing rod 795 is located below the slot hole, the upper surface of one end of the upper fixing rod 795 is rotatably connected to a spur gear II796 through a bearing, the upper surface of the spur gear II796 is fixedly connected to a gasket 797, the upper surface of the gasket 797 is fixedly connected to a mechanical arm 798, and the end of the mechanical arm 798 is fixedly connected There are pneumatic clamps 799, and the lower surface of the fixing cap 791 is fixedly connected to a sliding rod 7910 in a circular array, and the surface of the sliding rod 7910 is slidably connected to a lower fixing rod 7911. An L-shaped mounting groove is provided inside the lower fixing rod 7911, and a motor II7912 is fixedly connected to the inner wall of the mounting groove. The output shaft of the motor II7912 is fixedly connected to a spur gear III7913, and the surface of the spur gear III7913 is meshed with a toothed belt II7914, and one end of the toothed belt II7914 is meshed with a spur gear IIII7915. The lower surface of the spur gear IIII7915 is rotatably connected to the rod body of the lower fixing rod 7911 through a bearing, and the upper surface of the spur gear IIII7915 is fixedly connected to a rotating column 7916, and the upper end of the rotating column 7916 is fixedly connected to a contact plate 7917, and the rear end of the placement plate 6 is thicker than the lower fixing rod 7911.
[0035] Specifically, through the cooperation of components such as motor I792, spur gear I793, toothed belt 794 and spur gear II796, the robotic arm 798 can be driven to swing, so that the cosmetic box grasped by the pneumatic gripper 799 can be rotated around a specific axis and its angle can be changed. At the same time, the coordinated work of a series of components including motor II7912, spur gear III7913, toothed belt II7914, spur gear IIII7915, rotating column 7916 and contact plate 7917 can provide rotational power for the makeup box from another dimension, so that the makeup box can be flipped in different directions and at different angles. This multi-dimensional and multi-angle flipping capability ensures that each surface of the makeup box can be exposed in a suitable position in turn, which is convenient for the industrial camera 3 to take pictures, thereby realizing comprehensive and no-dead-angle detection of the appearance of the makeup box, and effectively avoiding the problem of missing defects due to failure to detect some surfaces; the adjustment component 79 can accurately adjust the flipping angle and strength according to the actual shape, size and structural characteristics of the makeup box. Whether it is a makeup box of conventional shapes such as a cuboid or a cylinder, or a makeup box with an irregular shape and a special concave-convex structure, it can achieve a matching flipping operation by adjusting the motor speed, rotation angle and other parameters, which greatly improves the adaptability of the device to appearance detection of different types of makeup boxes.
[0036] In this embodiment, a slot hole matching the housing of motor II7912 is provided on the lower surface of the fixing cap 791.
[0037] Specifically, the design of the above-mentioned slots prevents the upper fixing rod 795 and the lower fixing rod 7911 from being interfered by the motor II 7912 when clamping the cosmetic box, thereby preventing the cosmetic box from being clamped.
[0038] In this embodiment, a silicone sleeve is sleeved on the outer surface of the contact plate 7917. Specifically, when a certain pressure is applied to the cosmetic case to achieve a stable grasping and flipping action, the silicone sleeve can evenly disperse the pressure to prevent indentations on the cosmetic case surface due to excessive local pressure. Its good elasticity can adapt to cosmetic cases of different shapes and surface curvatures, making the pressure distribution during the contact process more reasonable, minimizing any irreversible marks on the appearance of the cosmetic case, and ensuring that the beauty of the cosmetic case is not affected by the detection operation.
[0039] In this embodiment, a silicone gasket is provided on the surface of the pneumatic clamp 799 , and the structure of one side of the upper fixing rod 795 and the contact plate 7917 is the same as that of the lower fixing rod 7911 .
[0040] Specifically, the silicone gasket is soft in texture. When the pneumatic clamp 799 grabs the makeup box, the silicone gasket will directly contact the surface of the makeup box, which can effectively buffer the clamping force applied by the clamp, and avoid leaving clamp marks on the surface of the makeup box or causing local deformation, damage, etc. due to the rigid contact of the clamp; the upper fixed rod 795 and the lower fixed rod 7911 have the same structural design, which can stably support and operate the makeup box from the upper and lower directions, so that the makeup box is subjected to more uniform and balanced force during the flipping process, avoiding shaking, deflection, etc. due to uneven force on one side, ensuring that the makeup box can be accurately flipped according to the preset angle and trajectory, thereby improving the accuracy and efficiency of detection.
[0041] In this embodiment, the controller includes a control main board, on which a microprocessor, an image acquisition module, an image processing module and a communication module are integrated. The microprocessor is electrically connected to the image acquisition module, the image processing module and the communication module, respectively. The image acquisition module is electrically connected to the industrial camera. The image processing module is used to pre-process the collected image, including denoising, enhancement and binarization operations, to improve the quality and contrast of the image, so as to facilitate subsequent defect analysis.
[0042] The image processing module is built with a deep learning algorithm unit, which adopts a convolutional neural network structure and is pre-trained with a large amount of labeled cosmetic box appearance image data. The trained model can automatically extract the features of cosmetic box surface defects and accurately identify different types of appearance defects such as scratches, pits, color difference and pattern flaws;
[0043] Specifically, the defect detection pseudo code is as follows:
[0044] / / Load the image and preprocess it (simple normalization, etc., expandable)
[0045] Mat preprocessImage(const string&image_path,int target_width,inttarget_height){
[0046] Mat image=imread(image_path);
[0047] if(image.empty()){
[0048]
[0049]
[0050]
[0051] refer to Figure 1-Figure 6 , a detection method of a cosmetic box appearance detection device based on image processing, the operation steps are as follows:
[0052] Step 1: During the inspection, the cosmetic box is placed on the placement plate 6, and the micro camera embedded in the upper fixed rod 795 takes real-time photos to see whether the slot on the placement plate 6 is aligned with the lower fixed rod 7911, and the entire inspection mechanism 7 is adjusted by the screw rod 5 until the lower fixed rod 7911 is aligned with the slot of the placement plate 6, and the conveyor belt 1 drives it to the vicinity of the industrial camera 3, and the electric telescopic rod I71 drives the bearing 73 at its lower end to descend, thereby driving the servo motor 76 and the electric telescopic rod II77 to descend until the lower fixed rod 7911 contacts the surface of the conveyor belt 1, and the lower fixed rod 7911 is inserted into the slot, and the conveyor belt 1 stops driving;
[0053] Step 2: The upper end of the electric telescopic rod II77 contracts, driving the upper fixed rod 795 fixed to the upper end thereof to descend together, and the rotatable lower end of the upper fixed rod 795 of the device contacts the surface of the cosmetic box. At this time, the upper fixed rod 795 and the lower fixed rod 7911 form a clamping shape for the cosmetic box, and the electric telescopic rod I71 starts to contract, driving the lower adjustment component 79 to approach the industrial camera 3. When the lower adjustment component 79 rises to the specified height, the electric telescopic rod I71 stops contracting;
[0054] Step 3, the industrial camera 3 takes a picture of the upper surface of the makeup box. While taking the picture, the motor II7912 drives the contact plate 7917 fixedly connected to the upper end of the rotating column 7916 to rotate through the spur gear III7913, the spur gear IIII7915 and the toothed belt II7914, and adjusts the drawer side of the makeup box close to the side where the pneumatic clamp 799 is located. The mechanical arm 798 drives the pneumatic clamp 799 at its end to approach the drawer of the makeup box, and the pneumatic clamp 799 clamps the makeup box. At this time, the clamping part of the pneumatic clamp 799 squeezes the outer side of the drawer of the makeup box, and then the servo motor 76 rotates the circular plate 74 90 degrees through the rotating shaft, thereby driving the makeup box to rotate 90 degrees through the adjusting component 79, and the motor II7912 and the motor I792 start working at the same time, and synchronously drive the makeup box to rotate 360 degrees through the gear and toothed belt transmission system, and the industrial camera 3 takes pictures of the rotating makeup box, and finally the servo motor 76 rotates 90 degrees again, and the industrial camera 3 takes pictures of the other side of the makeup box;
[0055] Step 4: The industrial camera 3 uploads each group of photos taken to the controller, and the controller calls the image processing module to perform defect detection on different photos until the detection results are fed back to the terminal. At this point, the defect detection of a single cosmetic box is completed.
[0056] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A cosmetic box appearance inspection device based on image processing, comprising a conveyor belt (1), characterized in that: A U-shaped fixing frame (2) is fixedly connected to the middle of the conveyor belt (1), a controller is fixedly connected to the upper end of the U-shaped fixing frame (2), an industrial camera (3) is fixedly connected to the upper end of the U-shaped fixing frame (2), and the industrial camera (3) is located below the controller; a support column (4) is symmetrically fixedly connected to one side of the U-shaped fixing frame (2), a screw rod (5) is fixedly connected between two of the support columns (4), a placement plate (6) is arranged in an array on the upper surface of the conveyor belt (1), a detection mechanism (7) is arranged between the screw rod (5) and the U-shaped fixing frame (2), and the detection mechanism (7) includes an electric telescopic rod I (71) fixed to one side of the screw nut of the screw rod (5), an electric turntable (72) is fixedly connected to the outer surface of the lower end of the electric telescopic rod I (71), and a connecting column is fixedly connected to the rotating part of the electric turntable (72).
2. The cosmetic box appearance detection device based on image processing according to claim 1, characterized in that: The lower end of the connecting column is fixedly connected to a bearing (73), one side outer ring of the bearing (73) is fixedly connected to a sleeve (75), the inner wall of the sleeve (75) is fixedly connected to a servo motor (76), the output shaft of the servo motor (76) is fixedly connected to a circular plate (74), the circular plate (74) is fixedly connected to the inner ring of the other side of the bearing (73), one side of the circular plate (74) is provided with an electric telescopic rod II (77), the lower end periphery of the electric telescopic rod II (77) is fixedly connected to a connecting block (78), one side of the connecting block (78) is fixedly connected to the surface of the circular plate (74), and one side of the connecting block (78) is provided with an adjusting component (79); The adjusting component (79) is used for turning over different sides of the cosmetic box.
3. The cosmetic box appearance detection device based on image processing according to claim 2 is characterized in that: The adjusting component (79) comprises a fixing cap (791), the outer surface of which is fixedly connected to the upper end of the electric telescopic rod II (77) via a fixing block, the inner wall of which is fixedly connected to a motor I (792), the output shaft of which is fixedly connected to a spur gear I (793), the surface of which is meshed with a toothed belt (794), the outer surface of which is provided with a slotted hole adapted to match the toothed belt (794), and the fixing cap (791) is provided with a slotted hole adapted to match the toothed belt (794). The outer surface of the upper fixing rod (791) is fixedly connected to an upper fixing rod (795), one end of which is embedded with a micro camera, and the upper fixing rod (795) is located below the slot hole, and the upper surface of one end of the upper fixing rod (795) is rotatably connected to a spur gear II (796) through a bearing, the upper surface of the spur gear II (796) is fixedly connected to a gasket (797), the upper surface of the gasket (797) is fixedly connected to a mechanical arm (798), and the end of the mechanical arm (798) is fixedly connected to a pneumatic clamp (799).
4. The cosmetic box appearance detection device based on image processing according to claim 3 is characterized in that: The lower surface of the fixing cap (791) is fixedly connected to a sliding rod (7910) in a circumferential array, and the surface of the sliding rod (7910) is slidably connected to a lower fixing rod (7911), and an L-shaped mounting groove is provided inside the lower fixing rod (7911). The inner wall of the mounting groove is fixedly connected to a motor II (7912), and the output shaft of the motor II (7912) is fixedly connected to a spur gear III (7913), and the surface of the spur gear III (7913) is meshed with a toothed belt II (791 4), one end of the toothed belt II (7914) is meshed with a spur gear IIII (7915), the lower surface of the spur gear IIII (7915) is rotatably connected to the rod body of the lower fixed rod (7911) through a bearing, the upper surface of the spur gear IIII (7915) is fixedly connected to a rotating column (7916), the upper end of the rotating column (7916) is fixedly connected to a contact plate (7917), and the rear end of the placement plate (6) is thicker than the lower fixed rod (7911).
5. The cosmetic box appearance detection device based on image processing according to claim 4 is characterized in that: The lower surface of the fixing cap (791) is provided with a slot hole adapted to the housing of the motor II (7912).
6. The cosmetic box appearance detection device based on image processing according to claim 5, characterized in that: The outer surface of the contact plate (7917) is sleeved with a silicone sleeve.
7. The cosmetic box appearance detection device based on image processing according to claim 6, characterized in that: A silicone gasket is provided on the surface of the pneumatic clamp (799), and the structure of one side of the upper fixing rod (795) and the contact plate (7917) is the same as that of the lower fixing rod (7911).
8. The cosmetic box appearance detection device based on image processing according to claim 7, characterized in that: The controller includes a control mainboard, on which a microprocessor, an image acquisition module, an image processing module and a communication module are integrated. The microprocessor is electrically connected to the image acquisition module, the image processing module and the communication module respectively. The image acquisition module is electrically connected to the industrial camera. The image processing module is used to pre-process the collected image, including denoising, enhancement and binarization operations, to improve the quality and contrast of the image, so as to facilitate subsequent defect analysis.
9. The cosmetic box appearance detection device based on image processing according to claim 8, characterized in that: The image processing module has a built-in deep learning algorithm unit, which adopts a convolutional neural network structure and is pre-trained with a large amount of labeled makeup box appearance image data. The trained model can automatically extract the characteristics of the makeup box surface defects and accurately identify different types of appearance defects such as scratches, pits, color differences and pattern flaws.
10. The detection method of the cosmetic box appearance detection device based on image processing according to claim 9 is characterized in that: The steps are as follows: Step 1: During the inspection, the cosmetic box is placed on the placement plate (6), and the micro camera embedded in the upper fixed rod (795) takes real-time photos of whether the slot on the placement plate (6) is aligned with the lower fixed rod (7911), and the entire inspection mechanism (7) is adjusted by the screw rod (5) until the lower fixed rod (7911) is aligned with the slot of the placement plate (6), the conveyor belt (1) is driven to bring it to the vicinity of the industrial camera (3), the electric telescopic rod I (71) drives the bearing (73) at its lower end to descend, and then drives the servo motor (76) and the electric telescopic rod II (77) to descend until the lower fixed rod (7911) contacts the surface of the conveyor belt (1), the lower fixed rod (7911) is inserted into the slot, and the conveyor belt (1) stops driving; Step 2: The upper end of the electric telescopic rod II (77) is retracted, driving the upper fixed rod (795) fixed to the upper end thereof to descend together, and the rotatable portion of the lower end of the upper fixed rod (795) of the device contacts the surface of the cosmetic box. At this time, the upper fixed rod (795) and the lower fixed rod (7911) form a clamping shape for the cosmetic box, and the electric telescopic rod I (71) begins to retract, driving the lower adjustment component (79) to approach the industrial camera (3). When the lower adjustment component (79) rises to a specified height, the electric telescopic rod I (71) stops retracting; Step 3, the industrial camera (3) takes a picture of the upper surface of the cosmetic box. While taking the picture, the motor II (7912) drives the contact plate (7917) fixedly connected to the upper end of the rotating column (7916) to rotate through the spur gear III (7913), the spur gear IIII (7915) and the toothed belt II (7914), and adjusts the drawer side of the cosmetic box close to the side where the pneumatic clamp (799) is located. The mechanical arm (798) drives the pneumatic clamp (799) at its end close to the drawer of the cosmetic box, and the pneumatic clamp (799) clamps the cosmetic box. At the same time, the clamping part of the pneumatic clamp (799) squeezes the outer side of the drawer of the cosmetic box, and then the servo motor (76) rotates the circular plate (74) 90 degrees through the rotating shaft, thereby driving the cosmetic box to rotate 90 degrees through the adjusting component (79), and the motor II (7912) and the motor I (792) start working at the same time, and synchronously drive the cosmetic box to rotate 360 degrees through the gear and toothed belt transmission system, and the industrial camera (3) takes pictures of the rotating cosmetic box, and finally the servo motor (76) rotates 90 degrees again, and the industrial camera (3) takes pictures of the other side of the cosmetic box; Step 4: The industrial camera (3) uploads each group of photos taken to the controller, and the controller calls the image processing module to perform defect detection on different photos until the detection results are fed back to the terminal. At this point, the defect detection of a single cosmetic box is completed.