Medicine defect detection equipment and detection method based on machine vision
By introducing a combination of machine vision detection and carrier storage modules into drug testing equipment, the problem of low efficiency in traceability of drug defects in the existing technology is solved, and rapid sorting and accurate traceability of defective drugs are achieved.
Patent Information
- Application Number
- CN202411409027.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
After screening out defective drugs, existing drug testing equipment needs to manually trace the source of defect problems, resulting in inefficient traceability.
A drug defect detection equipment based on machine vision is designed. Through the combination of the carrier and the storage module, the visual inspection device is used to detect drug defects, and when the defect is detected, the setting information is written to the storage module, and the device is subsequently read. After determining the information, the carrier containing the defective medicine will be removed from the conveyor line.
It realizes the rapid and accurate sorting and recycling of defective drugs, and quickly traces the source through the storage module information in the carrier, which improves the traceability efficiency of drug defects.
Smart Images

Figure CN119327733A_ABST
Abstract
Description
Technical Field
[0001] The present invention generally relates to the technical field of drug detection, and in particular to a drug defect detection device and a detection method based on machine vision. Background Art
[0002] Drugs need to be inspected for defects before leaving the factory to avoid selling defective drugs to users. Most existing drug inspection equipment performs defect inspection on the produced drugs, and when defective drugs are detected, they are sorted to the defective drug collection station through sorting equipment. However, the above existing drug inspection equipment can only screen out defective drugs, and manufacturers need to trace the defect problems through manual comprehensive investigation, which makes the traceability of drug defects inefficient. Summary of the invention
[0003] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide a drug defect detection device and detection method based on machine vision.
[0004] In a first aspect, the present application provides a drug defect detection device based on machine vision, comprising:
[0005] A carrying device, the carrying device includes a plurality of carriers for carrying the drugs to be tested, each of the plurality of carriers is provided with a storage module, and the storage module pre-stores drug information corresponding to the drugs carried by the carrier, and the drug information includes a production batch number;
[0006] A first conveying device, the first conveying device is used to sequentially convey a plurality of carriers, the first conveying device has a first detection position and a second detection position arranged at intervals along the conveying direction, the first detection position is provided with a first read-write device, the second detection position is provided with a second read-write device, the first read-write device is used to read and write a storage module in the carrier that has arrived at the first detection position, and the second read-write device is used to read and write a storage module in the carrier that has arrived at the second detection position;
[0007] A visual inspection device, the visual inspection device is arranged above the first inspection position, and the visual inspection device is used to detect whether the medicine carried by the carrier has defects;
[0008] A picking device, the picking device is arranged at a second detection position;
[0009] A control device, the control device is used to control the carrier to stop at a first detection position when the first read-write device reads the drug information, control the visual inspection device to detect whether the drugs carried by the carrier stopped at the first inspection position are defective, wherein the carrier is controlled to continue to move when the drugs are not defective, or when the drugs are defective, the first read-write device is controlled to write setting information to the storage module and the carrier is controlled to continue to move after the setting information is written, control the carrier to stop at a second detection position when the second read-write device reads the setting information, and control the picking device to move the carrier stopped at the second detection position from the first conveying device.
[0010] Furthermore, it also includes a first stop mechanism arranged at the first detection position, the first stop mechanism has a first stop state and a first avoidance state, wherein in the first stop state, the first stop mechanism extends into the moving path of the carrier to form a stop fit with the carrier located at the first detection position, and in the first stop state, the first stop mechanism withdraws from the moving path of the carrier, and the control device is used to control the first stop mechanism to switch to the first stop state when the first read-write device reads the drug information, and to control the first stop mechanism to switch to the first avoidance state when the visual inspection device detects that the drug is not defective or after the first read-write device writes setting information to the storage module.
[0011] Furthermore, it also includes a second stop mechanism arranged at the second detection position, the second stop mechanism has a second stop state and a second avoidance state, wherein in the second stop state, the second stop mechanism extends into the moving path of the carrier to form a stop cooperation with the carrier located at the second detection position, and in the second stop state, the second stop mechanism withdraws from the moving path of the carrier, and the control device is used to control the second stop mechanism to switch to the second stop state when the second read-write device reads the setting information, and to control the second stop mechanism to switch to the second avoidance state when the picking device moves out of the carrier.
[0012] Furthermore, it also includes a second conveying device, which is used to convey the carrier picked up by the picking device.
[0013] Furthermore, the first reading / writing device and the second reading / writing device are both radio frequency identification modules.
[0014] In a second aspect, the present application also provides a drug defect detection method based on machine vision, based on the above-mentioned drug defect detection device, comprising:
[0015] Convey multiple carriers in sequence;
[0016] Reading drug information at a first detection position, and controlling the carrier to stop at the first detection position after the drug information is read;
[0017] Inspecting whether the medicine carried by the carrier stopped at the first inspection position is defective, wherein if the medicine is defective, setting information is written into the storage module in the carrier and the carrier is controlled to continue moving after the setting information is written, and if the medicine is not defective, the carrier is controlled to continue moving;
[0018] The setting information is read at the second detection position, and after the setting information is read, the carrier is controlled to stop at the second detection position, and the carrier at the second detection position is moved out.
[0019] The machine vision-based drug defect detection equipment and method provided in the embodiments of the present application, by placing the drug on a carrier and a storage module in the carrier storing drug information related to the drug, writes setting information into the storage module when the visual detection device detects that the drug carried by the carrier is defective, and after subsequently reading the setting information, removes the carrier carrying the defective drug from the conveyor line for subsequent recycling and processing, which not only realizes the sorting and recycling of defective drugs, but also can quickly and accurately trace the problem of defective drugs through the information stored in the storage module in the carrier, thereby improving the efficiency of tracing drug defects. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0021] Figure 1 A schematic diagram of the structure of a drug defect detection device provided in an embodiment of the present application;
[0022] Figure 2 A schematic flow chart of a drug defect detection method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0025] Please refer to the attached Figure 1, an embodiment of the present application provides a drug defect detection device based on machine vision, including a frame and a carrying device arranged on the frame, a first conveying device 100, a visual inspection device 300, a picking device 400 and a control device. The carrying device includes a plurality of carriers 200 and the plurality of carriers 200 are used to carry the drugs to be inspected, and the shape of the drugs can be but not limited to capsules or sheets. The plurality of carriers 200 are all provided with a storage module, and the storage module can perform information reading and writing operations. The storage module pre-stores drug information, and the drug information corresponds to the drug carried by the carrier 200 where the storage module is located. The drug information at least includes a production batch number, and the production batch number includes information such as a production date and a production line number. The first conveying device 100 is used to convey a plurality of carriers 200 in sequence, and the first conveying device 100 can be but not limited to a belt conveyor device. The first conveying device 100 has a first detection position 101 and a second detection position 102 arranged at intervals along the conveying direction. The first detection position 101 is provided with a first read-write device, and the second detection position 102 is provided with a second read-write device. The first read-write device is used to read and write the storage module in the carrier 200 that arrives at the first detection position 101, and the second read-write device is used to read and write the storage module in the carrier 200 that arrives at the second detection position 102. The visual inspection device 300 is arranged above the first detection position 101. The visual inspection device 300 is used to detect whether the medicine carried by the carrier 200 has defects. Specifically: the visual inspection device 300 obtains the image information of the medicine through a camera, and then compares the obtained image information with the pre-stored standard image information. If the comparison is successful, it means that the medicine has no defects, otherwise it means that the medicine has defects. It should be immediately noted that the visual inspection device 300 is an existing general-purpose device, and this application will not be repeated. The picking device 400 is arranged at the second detection position 102. The first conveying device 100, the visual inspection device 300, and the picking device 400 are all connected to the control device, which is used to control the carrier 200 to stop at the first inspection position 101 when the first read-write device reads the drug information, and then control the visual inspection device 300 to detect whether the drug carried by the carrier 200 stopped at the first inspection position 101 has defects, and the defect is specifically an appearance defect, wherein the carrier 200 is controlled to continue to move when the drug does not have defects, or when the drug has defects, the first read-write device is controlled to write setting information to the storage module and control the carrier 200 to continue to move after writing the setting information, the setting information is used to characterize that the drug has defects, and when the second read-write device reads the setting information, the carrier 200 is controlled to stop at the second inspection position 102, and the picking device 400 is controlled to move the carrier 200 stopped at the second inspection position 102 from the first conveying device 100.
[0026] In this embodiment, when it is detected that the medicine carried by the carrier 200 has an appearance defect, setting information will be written into the storage module of the carrier 200. The carrier 200 with the setting information will be read in the subsequent movement process and after reading the setting information, the carrier 200 will be moved out of the current conveyor line to facilitate the recycling of the defective medicine. Such a setting not only realizes the sorting and recycling of defective medicines, but also can quickly and accurately trace the problem of defective medicines through the information stored in the storage module in the carrier 200, thereby improving the efficiency of tracing the source of drug defects.
[0027] The first reading and writing device and the second reading and writing device may preferably be radio frequency identification modules, such as RFID readers, and the storage module may be an RFID tag, etc. By utilizing the advantages of RFID wireless communication, the reading and writing device may be arranged on one side of the conveying surface perpendicular to the height direction to avoid interference with the visual inspection device 300 located above the conveying surface.
[0028] The setting information may be a digital code, etc., and this application does not impose any specific restrictions on this.
[0029] The picking device 400 may preferably be a robot arm, such as a six-axis industrial robot arm, etc. The control device may be, but is not limited to, a controller such as a single chip microcomputer or a PLC.
[0030] In some embodiments of the present application, the first conveying device 100 further includes a first stop mechanism 110 disposed at the first detection position 101, and the first stop mechanism 110 has a first stop state and a first avoidance state and can be switched between the first stop state and the first avoidance state. In the first stop state, the first stop mechanism 110 extends into the moving path of the carrier 200, and when the carrier 200 contacts the first stop mechanism 110, it will be stopped by the first stop mechanism 110 so that the carrier 200 stops at the first detection position 101, at which time the first conveying device 100 can continue to maintain the conveying state to complete defect detection without stopping. In the first avoidance state, the first stop mechanism 110 withdraws from the moving path of the carrier 200 to prevent the first stop mechanism 110 from interfering with the movement of the carrier 200 on the first conveying device 100.
[0031] The control device is connected to the first stop mechanism 110. The control device is also used to control the first stop mechanism 110 to switch to the first stop state when the first read-write device reads the drug information, so as to stop the carrier 200 at the first detection position 101, so that the visual inspection device 300 can perform defect detection on the drugs on the carrier 200. The control device is also used to control the first stop mechanism 110 to switch to the first avoidance state when the visual inspection device 300 detects that there are no defects in the drugs or after the first read-write device writes setting information to the storage module, so that the carrier 200 stopped at the first detection position 101 can continue to move.
[0032] Wherein, the first conveying device 100 may adopt a double-belt conveyor, and the two belts are arranged at intervals. The first stop mechanism 110 may be a stop switch, which is connected to the control device, and has a retractable stop rod, and the stop rod is located below the interval between the two belts. When the first stop mechanism 110 switches to the first stop state, the stop rod extends out of the conveying surface of the first conveying device 100, and when the first stop mechanism 110 switches to the first avoidance state, the stop rod retracts below the conveying surface of the first conveying device 100. For another example: the first stop mechanism 110 includes a stop plate and an electric push rod, one end of the stop plate is fixedly connected to the electric push rod, the electric push rod is installed on the frame and connected to the control device, when the first stop mechanism 110 switches to the first stop state, the electric push rod pushes the stop plate to extend to the conveying surface of the first conveying device 100, and when the first stop mechanism 110 switches to the first avoidance state, the electric push rod drives the stop plate to retract and exit the conveying surface of the first conveying device 100. The first reading / writing device and the first stopping mechanism 110 are arranged along the conveying direction of the first conveying device 100 .
[0033] In some embodiments of the present application, the first conveying device 100 further includes a second stop mechanism 120, which has a second stop state and a second avoidance state and can be switched between the second stop state and the second avoidance state. In the second stop state, the second stop mechanism 120 extends into the moving path of the carrier 200, and when the carrier 200 contacts the second stop mechanism 120, it will be stopped by the second stop mechanism 120 so that the carrier 200 stops at the second detection position 102. At this time, the first conveying device 100 can continue to maintain the conveying state to complete the sorting and removal of defective drugs without stopping. In the second avoidance state, the second stop mechanism 120 withdraws from the moving path of the carrier 200 to prevent the second stop mechanism 120 from interfering with the movement of the carrier 200 on the first conveying device 100.
[0034] The control device is connected to the second stop mechanism 120, and is also used to control the second stop mechanism 120 to switch to the second stop state when the second read-write device reads the setting information, so as to stop the carrier 200 at the second detection position 102, so as to facilitate the picking device 400 to remove the carrier 200 carrying the defective medicine. The control device is also used to control the picking device 400 to move the carrier 200 stopped at the second detection position 102 from the first conveying device 100.
[0035] The structures of the second stopping mechanism 120 and the first stopping mechanism 110 may be the same, and will not be described in detail in this application.
[0036] In some embodiments of the present application, the detection device further includes a second conveying device, which is used to convey the carrier 200 picked up by the picking device 400. The carrier 200 picked up by the picking device 400 is sent to the second conveying device and transported to the recycling processing station by the second conveying device. The second conveying device can be, but is not limited to, a belt conveyor.
[0037] Please refer to the attached Figure 2 The present application also provides a method for drug defect detection based on machine vision. The drug defect detection device based on the above embodiment includes:
[0038] S100: conveying a plurality of carriers 200 in sequence;
[0039] S200: reading drug information at the first detection position 101, and controlling the carrier 200 to stop at the first detection position 101 after reading the drug information;
[0040] S300: Checking whether the medicine carried by the carrier 200 parked at the first inspection position 101 is defective, wherein if the medicine is defective, setting information is written to the storage module in the carrier 200 and the carrier 200 is controlled to continue moving after the setting information is written, and if the medicine is not defective, the carrier 200 is controlled to continue moving;
[0041] S400 : Reading the setting information at the second detection position 102 , controlling the carrier 200 to stop at the second detection position 102 after reading the setting information, and moving the carrier 200 at the second detection position 102 out.
[0042] It should be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like used above to indicate orientations or positional relationships are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention; the orientation words "inside" and "outside" refer to the inside and outside relative to the contours of the components themselves. In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0043] For ease of description, spatially relative terms such as "above", "above", "on the upper surface of", "above", etc. may be used herein to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" may include both "above" and "below". The device may also be positioned in other different ways, rotated 90 degrees or in other orientations, and the spatially relative descriptions used herein are interpreted accordingly.
[0044] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. A drug defect detection device based on machine vision, characterized in that: include: A carrying device, the carrying device comprising a plurality of carriers for carrying drugs to be tested, the plurality of carriers are each provided with a storage module, and the storage module pre-stores drug information corresponding to the drugs carried by the carriers, the drug information including a production batch number; A first conveying device, the first conveying device is used to sequentially convey the plurality of carriers, the first conveying device has a first detection position and a second detection position arranged at intervals along a conveying direction, the first detection position is provided with a first read-write device, the second detection position is provided with a second read-write device, the first read-write device is used to read and write the storage module in the carrier that has arrived at the first detection position, and the second read-write device is used to read and write the storage module in the carrier that has arrived at the second detection position; A visual inspection device, the visual inspection device is arranged above the first inspection position, and the visual inspection device is used to detect whether the medicine carried by the carrier has defects; A picking device, wherein the picking device is arranged at the second detection position; A control device, the control device is used to control the carrier to stop at the first detection position when the first read-write device reads the drug information, control the visual inspection device to detect whether the drug carried by the carrier stopped at the first detection position is defective, wherein the carrier is controlled to continue to move when the drug is not defective, or when the drug is defective, the first read-write device is controlled to write setting information to the storage module and the carrier is controlled to continue to move after writing the setting information, control the carrier to stop at the second detection position when the second read-write device reads the setting information, and control the picking device to move the carrier stopped at the second detection position from the first conveying device.
2. The drug defect detection device based on machine vision according to claim 1 is characterized in that: It also includes a first stop mechanism arranged at the first detection position, the first stop mechanism has a first stop state and a first avoidance state, wherein in the first stop state, the first stop mechanism extends into the moving path of the carrier to form a stop fit with the carrier located at the first detection position, and in the first stop state, the first stop mechanism withdraws from the moving path of the carrier, and the control device is used to control the first stop mechanism to switch to the first stop state when the first read-write device reads the drug information, and to control the first stop mechanism to switch to the first avoidance state when the visual inspection device detects that there is no defect in the drug or after the first read-write device writes the setting information to the storage module.
3. The drug defect detection device based on machine vision according to claim 2 is characterized in that: It also includes a second stop mechanism arranged at the second detection position, the second stop mechanism having a second stop state and a second avoidance state, wherein in the second stop state, the second stop mechanism extends into the moving path of the carrier to form a stop fit with the carrier located at the second detection position, and in the second stop state, the second stop mechanism withdraws from the moving path of the carrier, and the control device is used to control the second stop mechanism to switch to the second stop state when the second read-write device reads the setting information, and to control the second stop mechanism to switch to the second avoidance state when the picking device moves out of the carrier.
4. The drug defect detection device based on machine vision according to claim 1, characterized in that: It also includes a second conveying device, which is used to convey the carrier picked up by the picking device.
5. The drug defect detection device based on machine vision according to claim 1, characterized in that: The first reading and writing device and the second reading and writing device are both radio frequency identification modules.
6. A drug defect detection method based on machine vision, based on the drug defect detection device according to any one of claims 1 to 5, characterized in that: include: conveying the plurality of carriers sequentially; Reading drug information at a first detection position, and controlling the carrier to stop at the first detection position after the drug information is read; Inspecting whether the medicine carried by the carrier stopped at the first inspection position is defective, wherein if the medicine is defective, setting information is written into the storage module in the carrier and the carrier is controlled to continue moving after the setting information is written, and if the medicine is not defective, the carrier is controlled to continue moving; The setting information is read at the second detection position, and after the setting information is read, the carrier is controlled to stop at the second detection position, and the carrier stopped at the second detection position is moved out.