Type discrimination device, information processing device, and image generation system
The type discrimination device enhances drug sorting accuracy and efficiency by using image-based feature extraction and sorting algorithms to identify and sort tablets and capsules, addressing the limitations of existing technologies.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- YUYAMA MFG CO LTD
- Filing Date
- 2026-01-08
- Publication Date
- 2026-04-10
AI Technical Summary
Existing drug sorting technologies are inadequate for identifying and sorting drugs not contained in containers, such as tablets or capsules, leading to inefficiencies and potential misadministration risks.
A type discrimination device that extracts feature information from drug images, including reflection and color characteristics, to accurately identify drug types, and a drug sorting device that uses a combination of imaging, temporary storage, and priority determination to efficiently sort drugs.
Improves the accuracy and efficiency of drug sorting by enabling precise identification and sorting of tablets and capsules, reducing data requirements for image processing and minimizing misadministration risks.
Smart Images

Figure 2026063020000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a type discrimination device for automatically discriminating the types of drugs, a drug sorting device for sorting drugs, and the like.
Background Art
[0002] Conventionally, a plurality of types of returned drugs have been sorted by a pharmacist or a doctor for each type. The returned drugs are drugs that have been prescribed to various patients or are drugs after being dispensed according to prescriptions. Therefore, compared with the dispensing operation of collecting (sub-packaging) drugs (tablets) of (one or a plurality of) types from a group of drug types (drug cassettes) grouped in advance by drug type in dispensing equipment or the like for each dosing time unit based on the prescription information per patient unit, the types of drugs that are collectively returned and prescribed to a plurality of patients are very many. Therefore, it is highly useful to automatically sort and reuse the returned drugs. Note that the drugs dispensed for one dosing time are generally about 2 to 3 types, and at most about 10 types.
[0003] Note that there are also pharmacies or hospitals (more precisely, in-hospital pharmacy departments) that discard the returned drugs as they are in order to avoid the risk of misadministration due to the time, labor, or sorting error (mistaken return to the drug cassette) involved in the sorting operation.
[0004] Patent Document 1 discloses a drug sorting device that automatically recognizes and stores returned ampoules or vials. This drug sorting device recognizes the orientation and posture of an ampoule or a vial and the properties of the ampoule or the vial (e.g., shape, size, type, and expiration date). Then, in accordance with the recognized size of the ampoule or the vial, the storage area set for each individual ampoule or vial at the time of storage is associated with the identification information of each individual ampoule or vial, and the ampoules or vials are individually arranged, thereby storing the individual ampoules or vials in a retrievable manner.
Prior Art Documents
Patent Documents
[0005] [Patent Document 1] International Publication No. 2015 / 170761 (Published November 12, 2015) [Overview of the project] [Problems that the invention aims to solve]
[0006] The items subject to return in Patent Document 1 are ampoules or vials, and not drugs that are not contained in a container, such as tablets or capsules, or drugs that are not packaged. Therefore, Patent Document 1 does not envision identifying such drugs (e.g., tablets or capsules) themselves, nor does it envision automatically sorting such drugs.
[0007] One aspect of the present invention aims to realize a drug type identification device that can identify the type of drug not contained in a container such as a tablet or capsule, and can improve the accuracy of such identification.
[0008] Furthermore, one aspect of the present invention aims to realize a drug sorting device that can sort drugs that are not contained in containers such as tablets or capsules, and that can improve the efficiency of such sorting.
[0009] Furthermore, one aspect of the present invention aims to realize a drug type discrimination device that can distinguish the type of drug not contained in a container such as a tablet or capsule, and can reduce the data size of the image used to create the image for distinguishing the type of drug. [Means for solving the problem]
[0010] To solve the above problems, a type discrimination device according to one aspect of the present invention is a type discrimination device that discriminates the type of a target drug from an image of the target drug, comprising: a feature extraction unit that extracts first feature information indicating the appearance characteristics of the target drug, which includes at least reflection region information indicating the reflection region of light irradiated onto the target drug, from the image; and a discrimination unit that compares second feature information indicating the appearance characteristics of the reference drug, which includes at least reflection region information indicating the reflection region of light irradiated onto a reference drug, with the first feature information, and discriminates the type of the target drug based on the result of the comparison.
[0011] Furthermore, a type discrimination device according to one aspect of the present invention is a type discrimination device that discriminates the type of a target drug from an image of the target drug, comprising: a feature extraction unit that extracts third feature information indicating the external characteristics of the target drug, which includes at least reflection information indicating whether or not light irradiated onto the target drug is reflected by the target drug, from the image; a discrimination unit that compares fourth feature information indicating the external characteristics of a reference drug, which includes at least reflection information indicating whether or not light irradiated onto a reference drug is reflected by the reference drug, with the third feature information and discriminates the type of the target drug based on the result of the comparison.
[0012] Furthermore, a type discrimination device according to one aspect of the present invention is a type discrimination device that discriminates the type of a target drug from an image of the target drug, comprising: a discrimination unit that compares a fifth feature information indicating the appearance characteristics of the target drug, which includes target color information indicating the color of the target drug extracted from the image, with a sixth feature information including reference color information indicating the color of a reference drug, and discriminates the type of the target drug based on the result of the comparison; and an update unit that, if the discrimination unit fails to discriminate the type of the target drug, receives an operation from the user and updates the target color information used for the discrimination as new reference color information.
[0013] Furthermore, a type discrimination device according to one aspect of the present invention is a type discrimination device that discriminates the type of a target drug from an image of the target drug, comprising: a feature extraction unit that extracts seventh feature information indicating the outward appearance of the target drug, which includes at least identification information displayed on the surface of the target drug and first position information indicating the relative position of the display area of the identification information with respect to the image of the target drug; and a discrimination unit that compares the seventh feature information with specific drug information indicating whether or not the reference drug is a specific drug, identification information displayed on the surface of the reference drug, and second position information indicating the relative position of the display area of the identification information with respect to the image of the reference drug in the image of the reference drug, and discriminates the type of the target drug based on the result of the comparison, wherein the discrimination unit, when the specific drug information indicates that the reference drug is a specific drug, does not use the first position information and the second position information to discriminate the type of the target drug, but instead determines whether or not the discriminated target drug is the same type of drug as the reference drug.
[0014] Furthermore, a drug sorting device according to one aspect of the present invention includes: a first storage unit for storing multiple types of drugs; a second storage unit for storing the drugs by type; a temporary storage unit for temporarily storing drugs not to be stored in the second storage unit; an imaging unit for imaging target drugs taken out from the first storage unit; a discrimination unit for determining the type of target drug from the captured image; a priority determination unit for determining a priority for each type of drug according to the frequency of discrimination in the discrimination history of the discrimination unit; and a sorting determination unit for determining to temporarily store a target drug in the temporary storage unit if the priority corresponding to the type of target drug determined by the discrimination unit is lower than a predetermined value.
[0015] Furthermore, the type discrimination device according to one aspect of the present invention is a type discrimination device that discriminates the type of a target drug from an image of the target drug, and includes an image processing unit that generates at least one cropped image from a cropped image which is obtained by cutting out a first region which is the region of the image of the target drug and a second region which is the region of the image of the platform on which the target drug is placed, including the first region, from an image of the target drug, in order to generate an image of a reference drug for discriminating the type of the target drug.
[0016] Furthermore, an image generation system according to one aspect of the present invention comprises (1) a type determination device that determines the type of target drug from an image of the target drug, and (2) an information processing device that can communicate with the type determination device and generates an image of a reference drug for determining the type of the target drug, wherein the type determination device generates a cropped image by cutting out a first region which is the region of the image of the target drug, or a second region which is the region of the image of a platform on which the target drug is placed, including the first region, from an image of the target drug, and the information processing device generates the reference image based on the cropped image generated by the type determination device.
[0017] Furthermore, an image generation system according to one aspect of the present invention comprises (1) a type determination device that determines the type of target drug from an image of the target drug, and (2) an information processing device that can communicate with the type determination device and generates an image of a reference drug for determining the type of the target drug, wherein the type determination device generates at least one cropped image from a cropped image obtained by cutting out a first region which is the region of the image of the target drug and a second region which is the region of the image of a platform on which the target drug is placed, including the first region, from an image of the target drug, and the information processing device generates the reference image based on the cropped image generated by the type determination device. [Effects of the Invention]
[0018] According to the type discrimination device according to one aspect of the present invention, the accuracy of drug discrimination can be improved.
[0019] Also, according to the drug sorting device according to one aspect of the present invention, the efficiency of drug sorting can be improved.
[0020] Also, according to the type discrimination device according to one aspect of the present invention, the data capacity of the image for creating the image used for discriminating the type of drug can be reduced.
[0021] Also, according to the image generation system according to one aspect of the present invention, the data capacity of the image for creating the image used for discriminating the type of the drug can be reduced.
Brief Description of Drawings
[0022] [Figure 1] It is a block diagram showing the overall configuration of the drug sorting device. [Figure 2] It is a diagram showing a configuration example of the drug sorting device. [Figure 3] It is a perspective view showing the overall configuration of the imaging unit and a perspective view showing an example of the drug placement table. [Figure 4] It is a diagram for explaining the turning of the imaging unit. [Figure 5] It is a diagram schematically showing the configuration of the imaging unit. [Figure 6] It is a diagram showing an example of the reflection region of the light reflected by the target drug in the captured image. [Figure 7] It is a flowchart showing an example of the discrimination process of the discrimination unit. [Figure 8] It is a diagram showing an example of the thickness of the target drug extracted by the feature extraction unit. [Figure 9] It is a flowchart showing an example of the update process of the drug database update unit. [Figure 10] It is a flowchart showing an example of the discrimination process of the discrimination unit. [Figure 11]This figure shows an example of the relative position of the display area of identification information for the image of the target drug or reference drug. [Figure 12] This figure shows an example of comparing the relative position of the display area of the identification information for the image of the target drug with the relative position of the display area of the identification information for the image of the reference drug. [Figure 13] This flowchart shows an example of the drug sorting process in the sorting control unit. [Figure 14] This flowchart shows an example of the print control process of the print output control unit. [Figure 15] This flowchart shows an example of the failure detection process for a drug sorting device. [Figure 16] This figure shows an example of an image generation system. [Figure 17] This flowchart shows an example of the image cropping process in the image generation unit. [Figure 18] This figure shows an example of a cropped image. [Figure 19] This figure shows an example of the image cropping process performed by the image processing unit 73. [Figure 20] This is a block diagram showing an example of a part of the configuration of a drug sorting device. [Figure 21] This flowchart shows an example of the process for generating a shape model of a sorting cup using a drug sorting device. [Figure 22] This figure shows an image of a sorting cup and an example of a shape model of the sorting cup. [Figure 23] This flowchart shows an example of a drug detection process for checking remaining medication using a drug sorting device. [Figure 24] This figure shows an image of a sorting cup, an extracted image of the inside of the sorting cup, a shape model, and an example of an image of the matching region in the extracted image. [Figure 25] This flowchart shows an example of the printing process for a drug sorting device. [Figure 26] This figure shows an example of a drug identification system. [Figure 27]This flowchart shows an example of the discrimination process of a drug sorting device. [Figure 28] This figure shows an example of identification information for target drugs, identification information for standard drugs in the user-adopted drug list, and identification information for standard drugs in the comprehensive drug database. [Figure 29] This is a diagram showing an example of the first containment section. [Figure 30] This figure shows an example of an initial image (initial screen) that can display the results of drug sorting. [Figure 31] This figure shows an example of a settings image (settings screen) for setting how the user stores the medications they bring to the first storage compartment when the system is set to the medication sorting mode. [Figure 32] This figure shows an example of a sorting image used to display the sorting status of medications brought by the patient when the patient's medication sorting mode is set. [Modes for carrying out the invention]
[0023] [Embodiment 1] (Overview of drug sorting device 1) First, an overview of the drug sorting device 1 will be explained using Figures 1 and 2. Figure 1 is a block diagram showing the overall configuration of the drug sorting device 1. Figure 2 is a diagram showing an example of the configuration of the drug sorting device 1, where 2001 is a perspective view of the drug sorting device 1 and 2002 is a perspective view showing the basic configuration of the drug sorting area 2. As shown in Figures 1 and 2001 and 2002 of Figure 2, the drug sorting device 1 comprises a drug sorting area 2, a touch panel 3, a print output unit 4, and a packaging mechanism 6.
[0024] The drug sorting device 1 takes images of each of several types of drugs, identifies the type of drug based on the images obtained, and sorts the drugs according to their type. Specifically, this process is performed in the drug sorting area 2. Details of the drug sorting area 2 (internal configuration of the drug sorting device 1) will be described later. After the drugs are sorted by type, they are visually inspected by the user, and then either packaged or returned to the drug shelves or packaging machine.
[0025] In this embodiment, the multiple types of drugs are drugs that are not contained in containers or other packaging, and are described as being tablets or capsules, for example. Furthermore, the multiple types of drugs are described as returned drugs. These drugs are drugs that are used by a pharmacy or hospital and are returned to that pharmacy or hospital as "returned drugs." However, the multiple types of drugs may also be "brought-in drugs" that include drugs issued by other pharmacies or hospitals in addition to the drugs used by the pharmacy or hospital. The drug sorting device 1 can automatically perform the processing from imaging to sorting after the drugs have been returned.
[0026] The touch panel 3 accepts various user inputs via the operation unit 31 and displays various images (e.g., images showing the progression of drug sorting, images for visual inspection) via the display unit 32.
[0027] The printing unit 4 prints a journal containing drug data (e.g., drug name, manufacturer, or ingredient information) related to the drug after visual inspection, according to user input following the visual inspection. The drug data may include image data showing drug-specific images.
[0028] The packaging mechanism 6 packages the sorted drugs. The packaging mechanism 6 is an optional mechanism. When the packaging mechanism 6 is installed in the drug sorting device 1, the drug sorting device 1 can perform all processes from sorting returned drugs to packaging after visual inspection. In particular, when drugs are fed into the packaging mechanism 6 by the transport and sorting unit 12, the sorting and packaging processes described above can be performed automatically, excluding visual inspection.
[0029] The packaging mechanism 6 can be the packaging section of a conventional tablet packaging machine or powder packaging machine. In this case, for example, the drugs in the sorting cups 141, which have been sorted by drug type, can be packaged into one or more packets.
[0030] It should be noted that throughout this specification, the term "packaging" as used at least in the description of the drug sorting device 1 encompasses both the meaning of "packaging drugs separately according to their administration time based on prescription data" and the meaning of "simply packaging drugs sorted into the second storage section 14, regardless of prescription data."
[0031] Furthermore, the drug sorting device 1 is equipped with a first RFID (Radio Frequency Identifier) reader / writer unit 5. As shown at 2002 in Figure 2, the first RFID reader / writer unit 5 is located on the drug dispensing side of the base 19.
[0032] The first RFID reader / writer unit 5 reads data related to the drugs stored in each sorting cup 141, which is stored in an RFID tag (not shown) located at the bottom of each sorting cup 141 in the second storage section 14. This data includes, for example, data indicating the number of drugs stored, drug identification data for identifying the drugs (e.g., GS1 code), data indicating the type of sorting cup 141, and sorting cup identification information (identification information attached to the RFID tag) for identifying the sorting cup 141. Drug data of the drugs stored in the sorting cup 141 (e.g., drug name), and image data acquired by the imaging unit 13 are stored in the drug database 81, linked to the sorting cup identification information.
[0033] Furthermore, the above data may include drug data determined by visual inspection (drug data after visual inspection). Alternatively, drug data after visual inspection may be written to the RFID tag. The drug data after visual inspection is used when (1) dispensing the drugs stored in the corresponding sorting cup 141 using a different packaging machine than the packaging mechanism 6 or drug sorting device 1, or (2) returning them to the drug shelf. This drug data may also be stored in the drug database linked to the sorting cup identification information.
[0034] Furthermore, as shown in 2001 of Figure 2, the drug sorting device 1 is equipped with an opening / closing shutter 51 and an opening / closing door 52 that allow the drug dispensing side to be opened and closed.
[0035] (Basic structure of drug sorting area 2) Next, using Figures 1 and 2 (2002), the basic configuration of the drug sorting area 2 (internal configuration of the drug sorting device 1) will be explained.
[0036] As shown in Figures 1 and 2 (2002), the drug sorting area 2 mainly comprises, as hardware, a first storage unit 11, a transport / sorting unit 12 (sorting unit), an imaging unit 13, a second storage unit 14, a standby tray 15, a recovery tray 16, a drug input port 17, and a second RFID reader / writer unit 18. All components except the transport / sorting unit 12 are mounted on a base 19. The main functions of the transport / sorting unit 12, the imaging unit 13, and the second RFID reader / writer unit 18 will be described in detail in the descriptions of each process below.
[0037] The first storage unit 11 stores multiple types of drugs returned by users in a mixed state. In this embodiment, the first storage unit 11 is divided into multiple storage units. In this case, for example, when all the drugs stored in one storage unit are transported by the transport / sorting unit 12, the drugs stored in the storage unit adjacent to that unit become targets for transport. The first storage unit 11 may also be rotatable around the Z-axis (center of the cylindrical shape). In this case, the control unit 60a of the computer (type discrimination device) 60 may rotate the first storage unit 11, for example, when one storage unit becomes empty, to facilitate the transport / sorting unit 12 from acquiring the drugs.
[0038] The second storage unit 14 is equipped with multiple sorting cups 141 for storing drugs sorted by type. The control unit 60a determines the type of drug based on the image of the drug captured by the imaging unit 13, and determines which sorting cup 141 to store the drug based on the determination result. The drug is then transported and stored in the determined sorting cup 141 by the transport and sorting unit 12.
[0039] The standby tray 15 is a temporary storage area where drugs are temporarily placed. For example, if all of the sorting cups 141 are filled with drugs, drugs that the control unit 60a has determined to be of a different type are temporarily placed in the standby tray 15. In this case, after the drugs are removed from the sorting cups 141, they may be transported from the standby tray 15 to the sorting cups 141.
[0040] Furthermore, in this embodiment, the standby tray 15 may temporarily contain the estimated drug (described later), which is presumed to be a drug. If the estimated drug is temporarily contained, for example, the estimated drug is transported from the standby tray 15 to a predetermined area of the second storage unit 14 according to the determination result of the control unit 60a.
[0041] The collection tray 16 is a storage unit for items whose type could not be identified by the control unit 60a (e.g., foreign objects other than pharmaceuticals). Examples of foreign objects other than pharmaceuticals include fragments of PTP (Press Through Pack) sheets. Fragments of PTP sheets may be mixed into the first storage unit 11 when pharmaceuticals are returned. The control unit 60a also stores pharmaceuticals registered in the pharmaceutical database 81 as pharmaceuticals to be discarded, or pharmaceuticals that the user wishes to discard (e.g., pharmaceuticals with old manufacturing dates), in the collection tray 16.
[0042] The drug input port 17 is for transporting the drugs stored in the second storage section 14 to the packaging mechanism 6 via the transport and sorting unit 12, when the drug sorting device 1 is equipped with a packaging mechanism 6. Naturally, if the drug sorting device 1 is not equipped with a packaging mechanism 6, the drug input port 17 is unnecessary.
[0043] Furthermore, as shown in Figure 1, the drug sorting device 1 is equipped with a computer 60 that comprehensively controls each of the above-mentioned components (hardware). The computer 60 comprises a control unit 60a and a storage unit 80. The control unit 60a includes a transport control unit 61, a sorting control unit (sorting determination unit) 62, an imaging control unit 63, a discrimination unit 64, a priority determination unit 65, an operation input unit 66, a display control unit 67, an RFID control unit 68, a print output control unit 69, a registration unit 70, a packaging control unit 71, a drug adsorption control unit 72, an image processing unit 73, a drug database update unit (update unit) 74, a notification control unit 75, and a lighting failure determination unit 76.
[0044] This section describes the basic processing of the operation input unit 66, display control unit 67, RFID control unit 68, print output control unit 69, registration unit 70, and packaging control unit 71. The basic processing of the transport control unit 61, sorting control unit 62, imaging control unit 63, and discrimination unit 64 will be described in detail later in the sections (drug transport processing to imaging unit 13), (drug sorting processing), (drug imaging processing), and (image processing / discrimination processing). Processing by other configurations included in the control unit 60a will be described in each embodiment later.
[0045] The operation input unit 66 and the display control unit 67 control the operation unit 31 and the display unit 32 of the touch panel 3, respectively. The RFID control unit 68 controls the first RFID reader / writer unit 5 and the second RFID reader / writer unit 18. The print output control unit 69 controls the print output unit 4 according to the user input received by the operation input unit 66.
[0046] The registration unit 70 registers drug data for drugs for which the discrimination unit 64 has determined that no corresponding drug data exists in the drug database 81. Specifically, for drugs for which the discrimination unit 64 has determined that no corresponding drug data exists, the registration unit 70 links the captured image 82 of the drug with the drug data identified by the user and registers it in the drug database 81.
[0047] Furthermore, if the drug sorting device 1 is equipped with a packaging mechanism 6, the control unit 60a will be equipped with a packaging control unit 71 that controls the packaging mechanism 6. The packaging control unit 71 controls the operation of the packaging mechanism 6. The packaging control unit 71 also controls the transport and sorting unit 12 to transport the drugs stored in the sorting cups 141 to the drug input port 17.
[0048] Furthermore, the drug sorting device 1 may also be equipped with a barcode reader 7. The barcode reader 7 reads, for example, a barcode indicating the drug data of the drug that has been printed on the drug packets (packaging paper) into which the sorted drugs have been packaged by the packaging mechanism 6. This allows the control unit 60a to perform processing based on the read barcode (e.g., displaying the drug data indicated by the barcode). The packaging mechanism 6 may also be equipped with a barcode printing mechanism (not shown) that prints a barcode indicating the drug data of the drug packaged in the drug packet onto the drug packet.
[0049] The barcode reader 7 can be any reading device capable of reading information indicating drug data printed on drug packaging, etc. Furthermore, the drug sorting device 1 does not necessarily need to be equipped with a barcode reader 7. When the control unit 60a performs processing based on the above information, the control unit 60a can obtain the above information by communicating with an external device equipped with a barcode reader 7.
[0050] Furthermore, the drug sorting device 1 may also be equipped with a notification unit 8. The notification unit 8 may include, for example, a patrol light (registered trademark) that illuminates, a speaker that outputs sound, etc.
[0051] The computer 60 also includes a storage unit 80. The storage unit 80 pre-stores a drug database (drug master) 81 that manages drug data for multiple types of drugs, and also stores captured images 82, etc., as sorting is performed by the drug sorting device 1. The captured images 82 are images captured by the first camera 131. Alternatively, the captured images 82 may be images captured by the first camera 131 that have been processed by the image processing control unit 63. The image processing described above includes the process of generating an image to be analyzed by the discrimination unit 64 (an image that extracts the characteristics of a drug and enables comparison with the characteristics of drugs (reference drugs) included in the drug database 81). For example, this includes the process of extracting images of drugs from captured images.
[0052] Furthermore, the various data stored in the storage unit 80 do not necessarily have to be managed by the storage unit 80; for example, they may be managed by an external device. In this case, the control unit 60a may acquire the above-mentioned data from the external device via a communication line such as the Internet, as needed. Also, the drug database 81 may be updated when new drug data is added.
[0053] Furthermore, the storage unit 80 may include priority data 83, target drug color data 84, identification information change information 85, captured image discrimination information 86, and discrimination count information 88. Note that these configurations are not essential to the drug sorting device 1. Details of these configurations will be explained in each embodiment that requires them.
[0054] (Overview of processing in drug sorting device 1) In the drug sorting device 1, the transport / sorting unit 12 transports each drug returned to the first storage unit 11 to the imaging unit 13. The imaging unit 13 sequentially images each transported drug. The control unit 60a identifies the type of drug based on the captured images and determines the sorting position of each identified drug in the second storage unit 14. The transport / sorting unit 12 transports each drug to the determined sorting position. Information about the drugs stored in the second storage unit 14 is written to the RFID tag of the sorting cup 141, stored in the memory unit 80, or displayed on the touch panel 3. Furthermore, after the sorting of drugs is completed, or during the sorting process, the user can operate the touch panel 3 to perform processes such as visual inspection and packaging. The following describes each process in detail.
[0055] (Drug delivery process to imaging unit 13) First, the drug transport process from the first storage unit 11 to the imaging unit 13 will be explained using 2001 in Figures 1 and 2.
[0056] Specifically, the transport and sorting unit 12 transports the drug stored in the first storage section 11 to the receiving area Ar1 (see 3002 in Figure 3) where the imaging unit 13 accepts the drug. The transport control unit 61 controls this transport process by the transport and sorting unit 12.
[0057] The transport and sorting unit 12 includes a second camera 121, a suction and shutter mechanism 122, and a transport mechanism 123.
[0058] The second camera 121 sequentially images the first storage unit 11 in order to identify the drug to be transported. The imaging control unit 63 controls the imaging process of the second camera 121. The second camera 121 is provided at the end of the transport / sorting unit 12 (specifically, at least the housing including the suction / shutter mechanism 122) on the side facing the base 19. The second camera 121 may also be provided at the tip of the suction mechanism described later. The imaging control unit 63 analyzes the captured image to determine whether or not the image contains a drug. If the transport control unit 61 determines that a drug is contained, it brings the tip closer to the first storage unit 11, for example, and identifies the drug contained in the image captured at that time as the drug to be transported.
[0059] The adsorption / shutter mechanism 122 includes an adsorption mechanism for adsorbing a drug identified as the target for transport, and a shutter mechanism for preventing the drug adsorbed by the adsorption mechanism from falling. The adsorption mechanism is provided to be movable in the Z-axis direction. The shutter mechanism is provided in front of the above end and is provided to be movable substantially parallel to the XY plane.
[0060] The adsorption mechanism extends from the end when acquiring the drug, adsorbs the specified drug at its tip, and then returns to the position of the end. In this state, the transport control unit 61 moves the shutter mechanism to a position opposite the end and maintains the position of the shutter mechanism (closed) during drug transport. When the transport control unit 61 moves the adsorption / shutter mechanism 122 to a position opposite the drug placement platform 133a (see 3002 in Figure 3) of the drug holding mechanism 133 located in the receiving area Ar1, it moves the shutter mechanism to a position that does not face the end (opened). Then, after extending the adsorption mechanism from the end, the adsorption state is released and the drug is placed on the drug placement platform 133a.
[0061] The transport mechanism 123 moves the suction / shutter mechanism 122 in the X-axis and Y-axis directions under the control of the transport control unit 61. This transport mechanism 123 enables the movement of the suction / shutter mechanism 122 when searching for a drug to be transported on the first storage unit 11, or enables the transport of drugs from the first storage unit 11 to the drug placement table 133a. In addition, during the drug sorting process, it enables the transport of drugs from the drug placement table 133a to the second storage unit 14, the standby tray 15, or the recovery tray 16. During the drug sorting process, the sorting control unit 62 controls the transport / sorting unit 12 based on the discrimination result by the discrimination unit 64 to transport the drugs placed in the receiving area Ar1 to a predetermined sorting cup 141 in the second storage unit 14 or the standby tray 15.
[0062] (Drug imaging processing) Next, the drug imaging process by the imaging unit 13 will be explained using Figures 1, 2002 in Figure 2, 3, and 4. Figures 3001 and 3002 in Figure 3 are perspective views showing the overall configuration of the imaging unit 13, and Figure 3003 in Figure 3 is a perspective view showing an example of the drug placement stage 133a. Figures 4001 and 4002 in Figure 4 are diagrams for explaining the rotation of the imaging unit 13. The above drug imaging process is mainly performed by the imaging unit 13 and the imaging control unit 63.
[0063] Specifically, the imaging unit 13 is placed on the drug placement platform 133a and images the drug placed in the placement area Ar2 (imaging area) where the drug to be imaged is placed, as shown at 3002 in Figure 3. The imaging control unit 63 controls the imaging process by the imaging unit 13, the rotational movement of the first camera 131 and the illuminator 134, and the movement of the drug holding mechanism 133. As shown in Figures 1 and 3, the imaging unit 13 includes a first camera 131 (imaging unit), a rotation mechanism 132 (rotating unit), a drug holding mechanism 133 (drug placement platform, moving mechanism), and an illuminator 134 (ultraviolet light irradiation unit, visible light irradiation unit).
[0064] The first camera 131 images the drug placed in the arrangement area Ar2 opposite to the first camera 131 in order to determine the type of drug in the discrimination unit 64 described later. The drug holding mechanism 133 is a mechanism for holding the drug, and as shown in 3001 and 3002 of Figure 3, it comprises a drug placement table (petri dish) 133a, a rotation mechanism 133b (movement mechanism), and a shaft portion 133c connecting the drug placement table 133a and the rotation mechanism 133b. The drug placement table 133a is on which the drug to be imaged is placed. The rotation mechanism 133b moves the drug placement table 133a, and specifically rotates the drug placement table 133a with respect to the XY plane and rotates the shaft portion 133c in the circumferential direction of the shaft portion 133c.
[0065] When the drug transported from the first storage unit 11 is placed on the drug placement platform 133a, the imaging control unit 63 drives the rotation mechanism 133b to move the drug placement platform 133a from the receiving area Ar1 to the placement area Ar2. Subsequently, it controls at least the first camera 131 and the illuminator 134 to image the drug placed in the placement area Ar2. The captured image is stored in the storage unit 80 as an image captured image 82. For example, after imaging is completed, the imaging control unit 63 drives the rotation mechanism 133b to move the drug placement platform 133a, on which the imaged drug is placed, from the placement area Ar2 to the receiving area Ar1.
[0066] In this embodiment, two drug placement tables 133a are provided at the tip (end) of the shaft portion 133c. The swivel mechanism 133b rotates the shaft portion 133c so that when one drug placement table 133a is placed in the placement area Ar2, the other drug placement table 133a is placed in the receiving area Ar1. When drug imaging is performed in the placement area Ar2, the transport and sorting unit 12 transports the drug from the first storage unit 11 to the drug placement table 133a located in the receiving area Ar1, thereby enabling continuous drug imaging processing. It is assumed that the drug placement table 133a is in a state where no drug is placed on it, such as after drug sorting processing to the second storage unit 14.
[0067] Furthermore, in this embodiment, the drug placement platform 133a is transparent. Therefore, the first camera 131 can image the drug placed on the drug placement platform 133a from multiple angles through the drug placement platform 133a.
[0068] Furthermore, as shown at 3003 in Figure 3, the drug placement platform 133a may have a roughly V-shaped cross-section with a concave bottom. Also, as shown at 3003 in Figure 3 and in Figure 4, when the drug placement platform 133a is positioned in the receiving area Ar1 and the placement area Ar2, the groove direction of the roughly V-shaped cross-section (the extension direction of the shaft portion 133c) is roughly parallel to the rotation axis Ay of the imaging mechanism (described later) by the rotation mechanism 132. Furthermore, the bottom of the drug placement platform 133a does not have to be a sharp V-shape. As shown at 3003 in Figure 3, the bottom may comprise a bottom surface portion 133aa and inclined surfaces 133ab that are inclined from two opposing points on the bottom surface portion 133aa. The shape of the bottom should be such that the information indicated by the markings or prints on the drug can be recognized (marked information or printed information) even when viewed (imaged) from the underside of the drug placement platform 133a, and that the drug is secured in place.
[0069] If the drug is in the form of a capsule or a deformed tablet (e.g., rugby ball shaped), and the bottom of the drug mounting platform 133a is flat, the orientation of the drug may not be aligned on the XY plane, making it difficult to obtain a clear image of the drug (engraving or printed information). If the cross-section is roughly V-shaped, the capsule or deformed tablet can be fitted into the lowest end, and the drug can be fixed in place. This makes it easier to obtain a clear image of the drug. In the case of a tablet, for example, the shaft portion 133c can be rotated in the circumferential direction of the shaft portion 133c so that the flat portion (inclined surface portion 133ab) of the drug mounting platform 133a faces the first camera 131, thereby ensuring that the drug does not move.
[0070] In addition, the rotation mechanism 133b can also vibrate (move, shake) the drug placement platform 133a. In this case, for example, by vibrating and rolling a capsule placed on the drug placement platform 133a, the printed portion of the capsule can be made to face a predetermined direction (e.g., this portion can be made to face the first camera 131, which is positioned in the initial position described later). Furthermore, the above vibration can cause, for example, a cylindrical tablet (with a circular base) to be placed upright on the flat surface, to be tilted sideways (positioned so that the base of the tablet faces the flat surface).
[0071] The illuminator 134 emits light to irradiate the drug when imaging the drug, under the control of the imaging control unit 63. Figure 5 is a schematic diagram showing the internal configuration of the imaging unit 13. As shown in Figure 3001 and Figure 5, the illuminator 134 includes a visible light irradiation unit (first irradiation unit 134a and second irradiation unit 134b) that irradiates the drug with visible light, and an ultraviolet light irradiation unit 134c that irradiates the drug with ultraviolet light.
[0072] The first irradiation unit 134a and the second irradiation unit 134b irradiate the drug with white light as visible light. The first irradiation unit 134a is a bar-shaped visible light source (bar illumination), and the second irradiation unit 134b is a ring-shaped visible light source (ring illumination). The first camera 131 receives the visible light emitted from the first irradiation unit 134a or the second irradiation unit 134b and reflected by the drug, thereby acquiring an image based on visible light (visible light image). The imaging control unit 63 stores the image data showing the visible light image acquired by the first camera 131 as an image captured image 82 in the storage unit 80.
[0073] The ultraviolet light irradiation unit 134c irradiates the drug with ultraviolet light (e.g., light with a peak wavelength between 365 nm and 410 nm) to excite components contained in the drug. This extracts fluorescence (e.g., light with a peak wavelength between 410 nm and 800 nm) from the drug. The first camera 131 receives the fluorescence emitted from the drug and acquires an image based on ultraviolet light (ultraviolet light image). The imaging control unit 63 stores the image data showing the ultraviolet light image acquired by the first camera 131 as an image captured image 82 in the storage unit 80.
[0074] As shown in Figures 3 and 4, the rotation mechanism 132 rotates the first camera 131 so that it revolves around the placement area Ar2 (the drug placement platform 133a located at that position) where the drug to be imaged is placed. The first camera 131 images the drug placed in the placement area Ar2 from multiple positions rotated by the rotation mechanism 132. Specifically, the imaging mechanism, including the first camera 131 and the illuminator 134, is rotated so that it revolves around the placement area Ar2. Therefore, the first camera 131 can image the drug from multiple directions while maintaining the positional relationship between the first camera 131 and the illuminator 134 with respect to the placement area Ar2.
[0075] The rotation mechanism 132 includes an imaging mechanism drive unit 132a and a power transmission mechanism 132b, as shown at 3001 in Figure 3. The imaging mechanism drive unit 132a generates power to rotate the imaging mechanism around the placement area Ar2. The power transmission mechanism 132b transmits the power generated by the imaging mechanism drive unit 132a to the imaging mechanism. The imaging mechanism drive unit 132a is driven by the control of the imaging control unit 63 to change the position of the imaging mechanism around the placement area Ar2.
[0076] The rotation mechanism 132 rotates the imaging mechanism between the initial position and the position opposite the initial position. The initial position is a position approximately perpendicular to the placement area Ar2 and above the placement area Ar2. The position opposite the initial position is a position approximately perpendicular to the placement area Ar2 and below the placement area Ar2. This position can also be described as the position where the first camera 131 faces the bottom of the drug placement platform 133a located in the placement area Ar2.
[0077] As shown in Figure 4, axis Ax0 is defined as the axis passing through the center of the arrangement area Ar2 and parallel to the Z-axis, and axis Ax1 is defined as the axis passing through the center of the arrangement area Ar2 and the center of the imaging mechanism. The angle between axis Ax0 and axis Ax1 is defined as θ. In this embodiment, the rotation mechanism 132 positions the imaging mechanism at one of the following positions: θ = 0° (initial position), 45°, 135°, and 180°. Note that 4001 in Figure 4 shows the case where the imaging mechanism is at the θ = 0° position, and 4002 in Figure 4 shows the case where the imaging mechanism has rotated from the initial position to the θ = 45° position.
[0078] In this way, by rotating the imaging mechanism around the placement area Ar2, the drug can be imaged from multiple directions while remaining fixed in the placement area Ar2. Furthermore, even if the drug (tablet) remains upright when the drug placement platform 133a is shaken, information indicated by markings on the drug can be obtained by imaging from an oblique direction (θ=45° or 135°).
[0079] Alternatively, the imaging mechanism may be fixed and the drug rotated to image the drug from multiple directions.
[0080] (Image position control) Next, an example of position control of the imaging mechanism will be described. The imaging control unit 63 first sets the imaging mechanism to an initial position and causes the first camera 131 to image the drug placed in the placement area Ar2 at that initial position. At this time, the first camera 131 acquires a visible light image (two visible light images) based on visible light from the first irradiation unit 134a and the second irradiation unit 134b, as well as an ultraviolet light image based on ultraviolet light from the ultraviolet light irradiation unit 134c.
[0081] Next, the imaging control unit 63 sets the imaging mechanism to a position opposite to the initial position and causes the first camera 131 to image the drug placed in the placement area Ar2 at that position, acquiring two visible light images and an ultraviolet light image. The discrimination unit 64 analyzes these six images to determine the type of drug. If the type of drug cannot be identified as a single type, the imaging control unit 63 emits visible light from the first irradiation unit 134a and the second irradiation unit 134b at positions θ=45° and 135°, causing the first camera 131 to image the drug. The discrimination unit 64 analyzes the visible light image at this time to determine the type of drug.
[0082] The above are not limited to various methods for controlling the position of the imaging mechanism. For example, imaging may be performed from a position opposite the initial position, and then from the initial position. Alternatively, drug identification processing may be performed based on the visible light image acquired from the position θ=45°, and only if the type of drug cannot be identified as a single entity, a visible light image acquired from the position θ=135° may be obtained. Alternatively, only ultraviolet light images may be acquired at the initial position and the position opposite the initial position, drug identification processing may be performed based on the ultraviolet light image, and then a visible light image at that position may be acquired. Alternatively, visible light and ultraviolet light images may be acquired at all positions.
[0083] (Image processing / discrimination processing) Next, the image processing performed on the image captured by the imaging unit 13 and the drug discrimination process based on the results of the image processing will be explained using Figure 1. The image processing is mainly performed by the imaging control unit 63, and the discrimination process is mainly performed by the discrimination unit 64.
[0084] The discrimination unit 64 determines the type of drug based on the drug image captured by the first camera 131. Specifically, the discrimination unit 64 determines the type of drug based on the imaging result (visible light image) of the drug when it is irradiated with visible light from the first irradiation unit 134a or the second irradiation unit 134b. In addition, the discrimination unit 64 determines the type of drug based on the imaging result (ultraviolet light image) of the drug when it is irradiated with ultraviolet light.
[0085] The discrimination unit 64 extracts the characteristics of the drug contained in the image by performing image analysis on the visible light image and / or ultraviolet light image, respectively. Examples of drug characteristics include size, shape, markings, prints, cleavage lines, and representative color (color of the area where the marking or print is applied).
[0086] The size of the above-mentioned drug refers to, for example, its major axis, minor axis, etc. The shape of the above-mentioned drug refers to, for example, its roundness, aspect ratio, etc.
[0087] When OCR (Optical Character Recognition) or similar techniques are performed, the characteristics of the drug include the drug name (e.g., identification code) or manufacturer identification information (identification information to identify the drug), as well as other information such as the expiration date, which is represented by the marking or print. In the case of ultraviolet light images, the representative color of the drug in the image may be used as a characteristic of the drug. The discrimination unit 64 stores the information indicating the characteristics of each extracted drug in the storage unit 80, linked to the captured image 82 of the drug. Note that drug characteristic extraction may be performed using known techniques.
[0088] The characteristics of the extracted drug include the representative color of the drug in the image, as described above. Below, the data indicating this representative color will be referred to as color data (data indicating the color of the drug). Color data includes data generated from visible light images and data generated from ultraviolet light images. In the following explanation, unless otherwise specified, when simply referred to as "color data," it refers to both color data generated from visible light images and color data generated from ultraviolet light images. Color data is data indicating the color of a predetermined area in the image in which the drug is captured (at least a part of the area in which the drug is visible, typically the area with an imprint or print). For example, the average value of the RGB values of each pixel in the area may be used as color data. Alternatively, the CIELab value, which is a value that represents the color in the area as a combination of L*, a*, and b* values in the CIELab color space, may be used as color data.
[0089] The discrimination unit 64 identifies the type of drug by comparing the characteristics of each drug with the drug database 81. For example, based on the color data, the discrimination unit 64 ranks candidate drug data (reference drug data) related to the imaged drug from the drug database 81. Then, according to the above ranking, the discrimination unit 64 performs type identification based on other characteristics.
[0090] Furthermore, the discrimination unit 64 may narrow down candidate drug data related to the imaged drug from the drug database 81 using pattern matching or the like, based on the characteristics of the extracted drug. In this case, for example, candidate drug data is narrowed down using at least one of the above-mentioned characteristics: size, shape, markings, print, cleavage lines, and representative color. Subsequently, the discrimination unit 64 performs OCR or the like to read the identification information, etc., expressed on the markings or print, and further narrows down the type of drug from the above candidates using pattern matching or the like. The discrimination unit 64 may also rank the above candidates based on the degree of agreement between the characteristics of the extracted drug and the characteristics of drugs (reference drugs) included in the drug database 81.
[0091] Furthermore, even if the drug characteristics (target characteristics) extracted using pattern matching or the like are not found in the drug database 81, the discrimination unit 64 will identify the drug as a suspected drug if it is estimated to be a drug (tablet or capsule) based on at least a part of the target characteristics. In this case, the suspected drug can also be sorted into the second storage unit 14 or the standby tray 15. In this embodiment, the suspected drug may be temporarily placed in the standby tray 15 first.
[0092] In this way, the discrimination unit 64 determines whether or not drug data corresponding to the captured image 82 captured by the first camera 131 exists in the drug data (drug database 81) for multiple types of drugs that have been registered in advance.
[0093] The discrimination unit 64 outputs the drug type discrimination result to the sorting control unit 62. For example, if the drug type can be identified as one, or if the number of candidates is narrowed down to a predetermined number, drug data related to that drug is output as the discrimination result. In this case, the discrimination unit 64 stores the drug data related to that drug in the storage unit 80, linked to the captured image 82 of that drug.
[0094] If the discrimination unit 64 determines that the drug is a suspected drug, it outputs the characteristics of the drug (characteristics of the item suspected to be a suspected drug) as the discrimination result. On the other hand, if the discrimination unit 64 determines that the drug is registered in the drug database 81 as a drug to be discarded, or if it determines that the item stored in the first storage unit 11 is a foreign object other than a drug, it outputs as the discrimination result that the drug is not subject to sorting.
[0095] As described above, the discrimination unit 64 analyzes the captured image 82 and performs discrimination processing. The discrimination unit 64 may be configured to perform the following processing when it is difficult to determine the type of drug in a single discrimination process (when the type of drug could not be determined in a single discrimination process). For example, the discrimination unit 64 may be configured to perform image analysis on the captured image 82 again and attempt to determine the type of drug (discrimination retry processing) until a predetermined upper limit number of times (e.g., 3 times) is reached or until a timeout occurs.
[0096] (Chemical sorting and processing) Next, the drug sorting process based on the results of the above discrimination process will be explained using Figure 1. The above drug sorting process is mainly carried out by the transport and sorting unit 12 and the sorting control unit 62.
[0097] The transport and sorting unit 12 sorts the drugs by type based on the discrimination results from the discrimination unit 64 and stores them in the second storage unit 14 or standby tray 15. The sorting control unit 62 controls the transport and sorting unit 12 to transport the drugs placed in the receiving area Ar1 after imaging and discrimination processing to the designated sorting cups 141 in the second storage unit 14 or the standby tray 15, based on the discrimination results.
[0098] When the sorting control unit 62 receives the drug identification result, it determines the sorting location where the drug will be stored, and stores the identification result and the determined sorting location in the storage unit 80, linking them together. Specifically, the sorting control unit 62 determines whether or not the same identification result as the above identification result is stored in the storage unit 80.
[0099] If the same discrimination result as described above is stored, the sorting cup 141 associated with the stored discrimination result is determined as the sorting position. Also, if the sorting position associated with the stored discrimination result (e.g., estimated drug) is the standby tray 15, the standby tray 15 is determined as the sorting position. On the other hand, if the same discrimination result as described above is not stored, the sorting cup 141 that does not contain drug (the sorting cup 141 whose sorting position has not yet been determined) is determined as the sorting position. If all of the sorting cups 141 contain drug, the standby tray 15 is determined as the sorting position. Note that, for estimated drug, the sorting control unit 62 may determine any of the sorting cups 141 contained in a predetermined area of the second storage unit 14 as the sorting position instead of the standby tray 15.
[0100] Once the sorting position is determined, the sorting control unit 62 controls the transport mechanism 123, similar to the transport control unit 61, to move the transport / sorting unit 12 above the receiving area Ar1. The sorting control unit 62, similar to the transport control unit 61, controls the second camera 121 and the suction / shutter mechanism 122 to pick up the drugs placed in the receiving area Ar1. Subsequently, the transport mechanism 123 transports the drugs to the determined sorting cup 141 or standby tray 15. As described above, since the shutter mechanism is closed during drug transport, it is possible to prevent the drugs from falling into areas other than the determined sorting position (e.g., sorting cups 141 other than the determined sorting cup 141). After transport, the suction is released to store the drugs in the sorting cup 141 or standby tray 15. The sorting control unit 62 also counts the number of drugs stored in the sorting cup 141 and stores it in the storage unit 80, linked to the sorting position.
[0101] After the sorting control unit 62 transports the drugs (drugs after identification) from the drug placement table 133a located in the receiving area Ar1 to the sorting position, the transport control unit 61 controls the transport and sorting unit 12 to transport and place the drugs stored in the first storage unit 11 onto the now empty drug placement table 133a. This allows the drug sorting device 1 to continuously identify the types of drugs.
[0102] Furthermore, if the sorting control unit 62 receives a determination result indicating that it could not determine the type of drug, it determines that the object placed in the receiving area Ar1 after determination is a foreign object and transports the foreign object to the collection tray 16.
[0103] In this way, the sorting control unit 62 stores all items contained in the first storage unit 11 into either the second storage unit 14, the standby tray 15, or the recovery tray 16, regardless of the identification result of the type of drug. Therefore, even if the type of drug cannot be identified as a single type, or if foreign matter is mixed in the first storage unit 11, the sorting process can be continued without being stopped for that reason.
[0104] Furthermore, the sorting control unit 62 uses the second camera 121 to image the drug placement platform 133a located in the receiving area Ar1 in order to retrieve the drug for which the discrimination process has been completed, thereby narrowing down the location of the drug. In addition, when transporting the drugs stored in the sorting cup 141 to the packaging mechanism 6, the sorting control unit 62 uses the second camera 121 to image the sorting cup 141 in order to retrieve the drug from the sorting cup 141, thereby narrowing down the drugs to be transported.
[0105] Furthermore, if the sorting control unit 62 stores drugs up to the upper limit of the number of drugs that can be stored in the sorting cup 141, it will store the drugs to be sorted in an empty sorting cup 141 different from the sorting cup 141, even if the type of drug to be sorted is the same as the type of drug already sorted in the sorting cup 141.
[0106] Furthermore, the sorting control unit 62 stores data related to the drugs stored in the sorting cup 141 in an RFID tag provided on the sorting cup 141, which is then stored by the second RFID reader / writer unit 18.
[0107] The second RFID reader / writer unit 18, like the first RFID reader / writer unit 5, writes various data to RFID tags or reads various data stored in RFID tags. The sorting control unit 62 instructs the RFID control unit 68 to write data related to the drug each time a drug is placed in a sorting cup 141. The second RFID reader / writer unit 18 is located on the underside of the second storage section 14. Specifically, it is positioned to face the bottom of each sorting cup 141 when reading or writing data related to the drug stored in the RFID tag of each sorting cup 141.
[0108] [Embodiment 2] Other embodiments of the present invention are described below. For the sake of clarity, components having the same function as those described in the above embodiments will be denoted by the same reference numerals, and their descriptions will not be repeated. The same applies to the following embodiments.
[0109] (overview) In this embodiment, using Figures 6 and 7, we will describe a configuration for quickly and accurately distinguishing between coated tablets, such as sugar-coated tablets, whose surface is covered with a film, and other drugs (uncoated tablets).
[0110] The discrimination unit 64 according to this embodiment extracts feature information indicating the external characteristics of the target drug (target drug) from an image of the drug to be discriminated, including at least reflection region information indicating the reflection region of light irradiated onto the target drug, and uses the reflection region information for discriminating the target drug.
[0111] In the case of pharmaceuticals, for example, the reflection area of light irradiated onto the drug differs depending on whether or not the drug is coated with sugar. With the above configuration, by using the reflection area of light irradiated onto the drug to distinguish between the types of target drugs, coated tablets and other drugs can be distinguished quickly and accurately.
[0112] (Control unit 60a) The control unit 60a according to this embodiment has the main components described in Embodiment 1.
[0113] (Discrimination unit 64) The discrimination unit 64 in this embodiment includes a feature extraction unit 64a and a matching unit 64b as shown in Figure 1. In addition to the processing described in Embodiment 1, the discrimination unit 64 performs the following processing.
[0114] (Feature extraction unit 64a) The feature extraction unit 64a extracts feature information (first feature information) that indicates the appearance characteristics of the target drug from the captured image in which the target drug is captured, including at least reflection region information that indicates the reflection region of light irradiated onto the target drug. The above-mentioned reflection region of light can also be said to be, for example, the region affected by halation in the captured image 82.
[0115] In detail, the feature extraction unit 64a extracts the features of the drug contained in the visible light image and / or ultraviolet light image (imaging image 82) by performing image analysis. In addition to the drug features extracted by the discrimination unit 64 described in Embodiment 1, the feature extraction unit 64a also extracts the reflection region of light irradiated onto the target drug as a feature of the target drug. The feature extraction unit 64a outputs feature information indicating the extracted drug features, including the reflection region information, to the matching unit 64b.
[0116] For example, the feature extraction unit 64a may extract image regions in the captured image 82 that have a saturation value higher than a predetermined value as the reflection region. The predetermined value is, for example, a saturation level that allows the reflection region to be extracted from the captured image of a coated tablet so that it can be distinguished from a coated tablet and other drugs through experiments.
[0117] Furthermore, the feature extraction unit 64a may extract the reflection region by performing a filtering process on the captured image 82, for example, using a bilateral filter.
[0118] Figure 6 shows an example of the reflection region of light reflected by the target drug in the captured image. The image shown in D1 of Figure 6 is a visible light image of a sugar-coated tablet captured using the second illumination unit 134b (ring illumination). The image shown in D2 of Figure 6 is the visible light image shown in D1 after filtering using a bilateral filter.
[0119] Furthermore, the image shown at D3 in Figure 6 is a visible light image of the untreated tablet captured using the second irradiation unit 134b. The image shown at D4 in Figure 6 is the visible light image shown at D3 after filtering using a bilateral filter.
[0120] As shown in Figure 6, D2, in the image filtered using a bilateral filter, a ring-shaped reflective region is extracted in the image of the sugar-coated tablet. On the other hand, as shown in Figure 6, D4, in the image filtered using a bilateral filter, no reflective region is extracted in the image of the uncoated tablet.
[0121] (Verification unit 64b) The matching unit 64b compares feature information (second feature information) indicating the appearance characteristics of the reference drug with the feature information of the target drug. The feature information of the reference drug includes at least reflection region information indicating the reflection region of light irradiated onto the reference drug. This feature information is drug data relating to the reference drug included in the drug database 81. The feature information of the target drug also includes at least reflection region information indicating the reflection region of light irradiated onto the target drug. Based on the result of the comparison, the matching unit 64b determines the type of target drug.
[0122] The matching unit 64b may narrow down candidate drug data relating to the imaged target drug from among the drug data relating to reference drugs included in the drug database 81, using pattern matching or the like, based on the characteristics of the target drug extracted by the feature extraction unit 64a. In addition, the matching unit 64b may narrow down candidate drug data using at least one of the drug characteristics described in Embodiment 1, in addition to the reflection region information. Furthermore, the matching unit 64b may rank the candidates based on the degree of agreement between the extracted characteristics of the target drug and the characteristics of reference drugs included in the drug database 81.
[0123] For example, the drug database 81 includes reflective region information as drug data for each reference drug, which shows the reflective region of the light irradiated onto the reference drug in the image in which each reference drug is captured. The matching unit 64b compares the shape of the reflective region shown by the reflective region information of the target drug with the shape of the reflective region shown by the reflective region information of each reference drug, and narrows down the candidate drug data for the target drug (i.e., candidate types of target drugs) from the drug data for multiple reference drugs.
[0124] The matching unit 64b outputs the determination result of the type of target drug to the sorting control unit 62. For example, if the type of target drug can be identified as one, or if the number of candidates is narrowed down to a predetermined number, drug data related to that target drug is output as the determination result. In this case, the matching unit 64b stores the drug data related to that target drug in the storage unit 80, linked to the captured image 82 of that target drug.
[0125] (Example of processing) Figure 7 is a flowchart showing an example of the discrimination process of the discrimination unit 64 in this embodiment. As shown in Figure 7, the feature extraction unit 64a extracts feature information of the target drug, including reflection region information, from the captured image 82 (S11). Next, the matching unit 64b compares the feature information of the target drug with the feature information of the reference drug (drug data) contained in the drug database 81 (S12). Subsequently, the matching unit 64b determines the type of the target drug based on the result of the matching (S13), outputs the determination result of the type of drug to the sorting control unit 62, and the process ends.
[0126] (modified version) (Summary of variations) In this modified example, the discrimination unit 64 extracts feature information indicating the external characteristics of the target drug from the captured image of the target drug. This feature information includes at least reflection information indicating whether or not the light irradiated onto the target drug is reflected by the target drug. The discrimination unit 64 uses this reflection information to discriminate against the target drug.
[0127] For example, whether or not light is reflected from a drug depends on factors such as the presence or absence of a coating (e.g., sugar coating) on the drug. Therefore, by using whether or not light is reflected from a drug to distinguish between different types of drugs, coated tablets and other drugs can be quickly and accurately differentiated.
[0128] Other processing of the discrimination unit 64 in this modified example is the same as that of the discrimination unit 64 described in Embodiment 2 above, so we will not repeat the explanation.
[0129] (Feature extraction unit 64a) The feature extraction unit 64a in this modified example extracts feature information (third feature information) of the target drug from an image in which the target drug is captured. This feature information includes at least reflection information indicating whether or not light irradiated onto the target drug is reflected by the target drug. The feature extraction unit 64a outputs the feature information of the target drug, including the extracted reflection information, to the matching unit 64b.
[0130] For example, as described in Embodiment 2, the feature extraction unit 64a extracts image regions in the captured image 82 that have a saturation value higher than a predetermined value. The feature extraction unit 64a determines whether or not light is being reflected by the target drug based on whether or not such extraction has occurred. Furthermore, as described in Embodiment 2, the feature extraction unit 64a uses the captured image, which has been filtered by a bilateral filter applied to the captured image 82, to determine whether or not light is being reflected by the target drug. Based on the above determination, the feature extraction unit 64a extracts reflection information indicating whether or not the irradiated light is being reflected by the reference drug.
[0131] (Verification unit 64b) The matching unit 64b in this modified example matches the characteristic information of a reference drug (fourth characteristic information) with the characteristic information of a target drug (third characteristic information). The characteristic information of the reference drug includes at least reflection information indicating whether or not the irradiated light is reflected by the reference drug. The characteristic information of the target drug also includes at least reflection information indicating whether or not the irradiated light is reflected by the target drug. The matching unit 64b determines the type of target drug based on the result of the matching. The matching unit 64b outputs the determination result of the type of target drug to the sorting control unit 62.
[0132] For example, the drug database 81 includes reflection information as drug data for each reference drug, indicating whether or not the light irradiated in the image captured of each reference drug is reflected by that reference drug. The matching unit 64b may compare the reflection information of the target drug with the reflection information of each reference drug and narrow down the candidate drug data for the target drug from among the drug data for multiple reference drugs.
[0133] For example, when the matching unit 64b extracts reflection information from an image in which the target drug is captured, indicating that the light irradiated onto the image is reflected by the target drug, it extracts characteristic information (drug data) containing the reflection information from the drug database 81. This reflection information indicates that the light irradiated onto the image in which the reference drug is captured is reflected. As a result, the matching unit 64b narrows down the characteristic information of the reference drug, which contains the reflection information indicating that the light is reflected, as a candidate for drug data related to the target drug in the drug database 81.
[0134] Similarly, when the matching unit 64b extracts reflection information from the captured image in which the target drug is captured, indicating that the light irradiated on the image is not reflected by the target drug, it extracts feature information including the following reflection information. This reflection information indicates that the light irradiated on the image in which the reference drug is captured is not reflected. As a result, the matching unit 64b narrows down the feature information of the reference drug, which includes the reflection information indicating that the light is not reflected, as a candidate for drug data relating to the target drug in the drug database 81.
[0135] Furthermore, the matching unit 64b may narrow down the candidate drug data using, in addition to the reflection information described above, at least one of the drug characteristics described in Embodiments 1 and 2.
[0136] [Embodiment 3] (overview) In this embodiment, a configuration is described that utilizes differences in drug thickness to quickly and accurately distinguish between drugs.
[0137] (Control unit 60a) The control unit 60a according to this embodiment has the main components described in Embodiment 1.
[0138] (Discrimination unit 64) The discrimination unit 64 according to this embodiment includes a feature extraction unit 64a and a matching unit 64b as shown in Figure 1. The discrimination unit 64 according to this modified example performs the following processing in addition to the processing described in Embodiment 1.
[0139] (Feature extraction unit 64a) In this embodiment, the feature extraction unit 64a extracts the thickness of the target drug from an image captured from an oblique direction (θ = 45° or 135°). The feature extraction unit 64a outputs the thickness information indicating the thickness to the matching unit 64b as one of the features of the target drug. For example, the feature extraction unit 64a extracts the thickness of the drug contained in the image by performing image analysis on the visible light image and / or ultraviolet light image (captured image 82). The process of capturing the target drug from an oblique direction is described in detail in the "drug imaging process" of Embodiment 1, so it will not be repeated here.
[0140] Figure 8 shows an example of the thickness of the target drug extracted by the feature extraction unit 64a. More specifically, the figure shown at D5 in Figure 8 is a visible light image of the drug captured using the first illumination unit 134a (bar illumination). For example, the feature extraction unit 64a extracts the thickness T1 of the captured target drug using known image processing techniques. For example, the feature extraction unit 64a may extract the thickness T1 of the target drug from the captured image using techniques such as trapezoidal correction or panoramic imaging.
[0141] (Verification unit 64b) The matching unit 64b compares the characteristic information of the reference drug with the characteristic information of the target drug. The characteristic information of the reference drug includes at least thickness information indicating the thickness of the reference drug. The characteristic information of the target drug also includes at least thickness information indicating the thickness of the target drug.
[0142] For example, the drug database 81 includes thickness information indicating the thickness of each reference drug as drug data for each reference drug. The matching unit 64b may compare the thickness information of the target drug with the thickness information of each reference drug and narrow down the candidate drug data for the target drug from among the drug data for multiple reference drugs. In addition, the matching unit 64b may narrow down the candidate drug data using at least one of the drug characteristics described in Embodiment 1 and Embodiment 2, in addition to the thickness information. Furthermore, the matching unit 64b may determine the type of target drug by comparing the thickness information of the target drug with the thickness information of each reference drug in the "discrimination retry process" described in the "image processing and discrimination process" of Embodiment 1.
[0143] [Embodiment 4] (overview) In this embodiment, a configuration that can accurately identify the type of target drug will be described using Figure 9.
[0144] In this embodiment, the drug database update unit 74 performs the following processing when the discrimination unit 64 fails to discriminate the type of target drug. After receiving an operation from the user, the drug database update unit 74 updates the target drug color data 84 (target color information), which indicates the color of the target drug used for discrimination, as color data (reference color information), which indicates the color of a reference drug included in the drug database 81.
[0145] According to the above configuration, for target drugs whose type identification fails, the target drug color data 84 extracted from the captured image 82 taken in the environment in which the type of target drug is actually identified can be used as the color data of the reference drug. Therefore, the type of target drug can be identified with high accuracy.
[0146] The control unit 60a receives the drug database 81 created by the external device from the external device and stores it in the storage unit 80. The drug sorting device 1 used by the external device to create the drug database 81 is different from the drug sorting device 1 installed in a medical institution such as a hospital, and the drug imaging environment is also different. With the above configuration, the possibility that the type of target drug may not be properly identified due to differences in color in the captured image caused by differences in the drug sorting device 1 or the imaging environment can be reduced.
[0147] Furthermore, when creating the drug database 81, the system checks whether the type of drug can be appropriately identified using the drug data registered in the drug database 81 by using image data of multiple drugs of the same or similar type. In the above configuration, if only the color data of the reference drug is updated, this check does not need to be performed. Therefore, the time and effort required for this check can be reduced.
[0148] (Control unit 60a) In this embodiment, the control unit 60a includes the drug database update unit 74 shown in Figure 1, in addition to the main components described in Embodiment 1.
[0149] (Discrimination unit 64) In this embodiment, the discrimination unit 64 performs the following processing in addition to the processing described in Embodiment 1. The discrimination unit 64 compares the characteristic information of the target drug (fifth characteristic information) with characteristic information (sixth characteristic information) that includes color data (reference color information) indicating the color of a reference drug included in the drug database 81, and determines the type of target drug based on the result of the comparison. The characteristic information of the target drug includes target drug color data 84 (target color information) that indicates the color of the target drug, extracted from the captured image in which the target drug is captured. The target drug color data 84 is the same as the color data described in Embodiment 1, so the explanation will not be repeated here. The discrimination unit 64 also stores the target drug color data 84 in the storage unit 80 as target drug color data 84, linked to the captured image 82 of the target drug.
[0150] (Operation unit 31) The operation unit 31 of the touch panel 3 accepts user input. In particular, the operation unit 31 of this embodiment accepts input operations to update the target drug color data 84, which is associated with the captured image 82 in which the discrimination unit 64 failed to identify the type of target drug, with the color data of a reference drug specified by the user.
[0151] For example, if the discrimination unit 64 fails to discriminate the type of target drug, the user can view the failed captured image 82 on the display unit 32 of the touch panel 3 or the like. If the user is able to discriminate the target drug captured in the captured image 82, the user specifies the type of drug that was identified and performs an operation input to update the target drug color data 84 associated with the captured image 82 with the color data of the specified reference drug. In other words, the above operation input specifies the reference drug and the captured image 82. The operation unit 31 may also accept an operation input to update only the color data of the reference drug with the target drug color data 84 associated with the specified captured image 82. Alternatively, the operation unit 31 may accept an operation input to update both the color data of the reference drug and the captured image with the specified captured image 82 and the target drug color data 84 associated with the specified captured image 82.
[0152] (Drug Database Update Department 74) If the discrimination unit 64 fails to determine the type of target drug, the drug database update unit 74, after receiving an operation from the user, updates the target drug color data 84 used for the discrimination as the new standard drug color data.
[0153] In detail, the drug database update unit 74 updates the color data of the reference drug specified by the user in the drug database 81 to the target drug color data 84 linked to the captured image 82 specified by the user, in accordance with the user's operation input via the operation input unit 66.
[0154] Furthermore, if the drug database update unit 74 receives an input request to update both the color data of the reference drug and the captured image of the reference drug, it performs the following processing: The drug database update unit 74 updates the color data and captured image of the reference drug specified by the user in the drug database 81 to the specified captured image 82 and the target drug color data 84 associated with the specified captured image 82.
[0155] (Example of processing) Figure 9 is a flowchart showing an example of the update process of the drug database update unit 74 in this embodiment. As shown in Figure 9, the drug database update unit 74 determines whether or not it has received an operation input to update the color data of a reference drug stored in the drug database 81 (S21). If it has received an operation input to update the color data of a reference drug (YES in S21), the drug database update unit 74 performs the following processing. The drug database update unit 74 updates the color data of the reference drug specified by the user in the drug database 81 to the target drug color data 84 associated with the specified image 82 (S22), and the process ends. If it has not received an operation input to update the color data of a reference drug (NO in S21), the process returns to S21.
[0156] [Embodiment 5] (overview) In this embodiment, a configuration that enables quick and accurate identification of target drugs will be described using Figures 10 to 12.
[0157] In this embodiment, the drug database 81 includes specific drug information indicating whether or not each reference drug is a specific drug, as drug data for each reference drug.
[0158] In this embodiment, the discrimination unit 64 determines the type of target drug using identification information displayed on the surface of the reference drug and the target drug, and position information indicating the relative position of the display area of the identification information with respect to the drug image in the captured image of the reference drug and the target drug. However, if the reference drug, whose specific drug information indicates that it is a specific drug, is a candidate for the target drug, the discrimination unit 64 does not use the position information to determine the type of target drug, but instead determines whether the target drug is the same type of drug as the reference drug.
[0159] For example, in the case of spherical drugs or drugs where the display position of identification information differs between production lots, even if they are the same type of drug, the relative position in the reference image and the relative position in the target image may be separated by more than a predetermined value. According to the above configuration, if the drug is one of the above-mentioned drugs, it is possible to determine whether the target drug is the same type of drug as the reference drug, regardless of whether the two relative positions are separated by more than a predetermined value. On the other hand, for drugs other than the specified type of target drug, if the two relative positions are separated by more than a predetermined value, the target drug will not be determined to be the same type of drug as the reference drug. For example, for two different drugs whose identification information is partially the same string, the target drug will not be determined to be the same type of drug as the reference drug. Therefore, according to the above configuration, the possibility of misidentification of drugs can be reduced.
[0160] (Control unit 60a) The control unit 60a according to this embodiment has the main components described in Embodiment 1.
[0161] (Discrimination unit 64) The discrimination unit 64 according to this embodiment includes a feature extraction unit 64a and a matching unit 64b as shown in Figure 1. In addition to the processing described in Embodiment 1, the discrimination unit 64 performs the following processing.
[0162] (Feature extraction unit 64a) The feature extraction unit 64a extracts characteristic information (seventh characteristic information) of the target drug from the captured image 82 in which the target drug is imaged. This characteristic information includes at least (1) identification information displayed on the surface of the target drug, and (2) position information (first position information) indicating the relative position of the display area of the identification information with respect to the image of the target drug.
[0163] In detail, the feature extraction unit 64a extracts, in addition to the features of the target drug extracted by the discrimination unit 64 described in Embodiment 1, the relative position of the display area of the identification information with respect to the image of the target drug as a feature. The feature extraction unit 64a outputs the feature information, including the first position information, to the matching unit 64b.
[0164] For example, the identification information described above is an engraving or print on the surface of the drug to identify it, as explained in Embodiment 1. Furthermore, the "relative position of the display area of the identification information with respect to the image of the target drug" can be exemplified by a predetermined position in the display area of the engraving or print on the surface of the drug with respect to the image of the target drug (for example, the center of the display area).
[0165] (Verification unit 64b) The matching unit 64b matches the characteristic information of the reference drug (8th characteristic information) with the characteristic information of the target drug (7th characteristic information). The characteristic information of the target drug includes at least identification information and first position information. The characteristic information of the reference drug (drug data related to the reference drug) includes at least specific drug information indicating whether the reference drug is a specific drug, identification information displayed on the surface of the reference drug, and position information (2nd position information) indicating the relative position of the display area of the identification information with respect to the image of the reference drug. The "relative position of the display area of the identification information with respect to the image of the reference drug" can be a position corresponding to a predetermined position on the target drug (for example, the center of the display area). The relative position on the target drug and the relative position on the target drug can be any position as long as they have a corresponding positional relationship. Examples of specific drugs indicated by specific drug information include drugs with a shape that is easily rolled (spherical, etc.), drugs where the display position of the identification information differs between production lots, etc.
[0166] The matching unit 64b determines the type of target drug based on the matching result. The matching unit 64b may use pattern matching or the like to narrow down candidate drug data relating to the imaged target drug from the drug data relating to reference drugs included in the drug database 81, based on the characteristics of the target drug extracted by the feature extraction unit 64a. In addition, the matching unit 64b may narrow down candidate drug data using at least one of the drug characteristics described in Embodiment 1, in addition to the above identification information.
[0167] When the reference drug is indicated to be a specific drug by the specific drug information, the matching unit 64b determines whether the target drug is the same type of drug as the reference drug, without using the first position information and the second position information to determine the type of target drug.
[0168] Furthermore, if the specific drug information indicates that the reference drug is not a specific drug, the matching unit 64b uses the first position information and the second position information to determine the type of target drug and whether or not the target drug is the same type of drug as the reference drug.
[0169] In detail, the matching unit 64b determines whether the position indicated by the first position information and the position indicated by the second position information are separated by a predetermined value or more. That is, the matching unit 64b determines whether the relative position of the target drug and the relative position of the reference drug are separated by a predetermined value or more. Based on the result of the above determination, the matching unit 64b outputs the drug type determination result to the sorting control unit 62.
[0170] (Example of processing) Figure 10 is a flowchart showing an example of the discrimination process of the discrimination unit 64 in this embodiment. As shown in Figure 10, the feature extraction unit 64a extracts feature information of the target drug from the captured image 82 (S1). The feature information includes, for example, shape, color data, identification information, and first position information. Next, the matching unit 64b compares a part of the feature information of the target drug (shape, color data, etc.) with the feature information of a reference drug included in the drug database 81 to narrow down the candidate drug data for the target drug (S2). Next, the matching unit 64b starts matching the identification information of the reference drug data for each of the narrowed-down target drug candidates with the identification information of the target drug (S3). In the process of matching the identification information, the matching unit 64b starts matching the entire identification information (S4). Specifically, the matching unit 64b determines whether the shape of the display area of the identification information of the candidate reference drug data matches the shape of the display area of the identification information of the target drug (S5).
[0171] If the discriminant unit 64 determines that the shape of the display area of the identification information of the candidate reference drug data matches the shape of the display area of the identification information of the target drug (YES in S5), the discriminant unit 64 starts pattern matching of each character of the identification information (S6). The feature extraction unit 64a performs OCR on the identification information of the target drug (S7). The feature extraction unit 64a may also perform OCR on the identification information of the target drug in step S1. Next, the matching unit 64b determines whether all the characters contained in the identification information of the target drug match the characters contained in the identification information of the reference drug in the drug database 81 (S8). If the discriminant unit 64b determines that all the characters contained in the identification information of the target drug match the characters contained in the identification information of the reference drug (YES in S8), the matching unit 64b performs the following processing. The matching unit 64b determines whether the specific drug information of the candidate reference drug data indicates that it is a specific drug (S31). In this example, we will explain the case where the specific drug is a drug with a shape that is easily rolled. If the specific drug information determines that the candidate reference drug data is not a drug with a shape that is easily rolled (NO in S31), the matching unit 64b compares the first position information extracted by the feature extraction unit 64a with the second position information of the reference drug indicated by the candidate drug data of the target drug included in the drug database 81 (S32). Based on this comparison, the matching unit 64b determines whether the position indicated by the first position information and the position indicated by the second position information are separated by a predetermined value or more (S33).
[0172] Figure 11 shows an example of a relative position in the target drug or relative position in the reference drug. The images of the target drug or reference drug shown in D6, D7, D8, and D9 of Figure 11 show positions P1, P2, P3, and P4. Each of positions P1, P2, P3, and P4 is the center (a predetermined position) in the display area of the identification information (ABC or ABC 12). For example, the relative position in the target drug or relative position in the reference drug is the position P1, P2, P3, and P4 with respect to the image of the target drug shown in D6, D7, D8, and D9. The feature extraction unit 64a extracts the display area of the identification information using, for example, known image processing techniques and identifies the center of the display area.
[0173] Figure 12 shows an example of a comparison between the relative position of the target drug and the relative position of the reference drug.
[0174] Figure 12, D10 shows an example of an image of the target drug. P5 shown in Figure 12, D10, indicates the relative position (center of the identification information display area) of the identification information display area relative to the image D10 of the target drug. Figure 12, D11, also shows an example of an image of the reference drug. P6 shown in Figure 12, D11, indicates the relative position (center of the identification information display area) of the identification information display area relative to the image D11 of the reference drug. Figure 12, D12, shows the image of the target drug D10 and the image of the reference drug D11 superimposed. The distance L1 shown in Figure 12 indicates the distance between the center P5 of the identification information display area in the image of the target drug and the center P6 of the identification information display area in the image of the reference drug.
[0175] The matching unit 64b determines whether the value of distance L1 is greater than or equal to a predetermined value. The predetermined value can be set as appropriate, but for example, it may be 30 pixels. The predetermined value should be set to such an extent that it is possible to distinguish a drug other than the predetermined drug as a different drug through experimentation, for example.
[0176] If the matching unit 64b determines that the position indicated by the first position information and the position indicated by the second position information are not separated by a predetermined value (NO in S33), the matching unit 64b outputs the type of drug it has identified to the sorting control unit 62 (S34), and the process ends.
[0177] If the system determines that the shape of the display area for the identification information of the candidate standard drug data does not match the shape of the display area for the identification information of the target drug (NO in S5), the discrimination unit 64 performs the following processing: The discrimination unit 64 determines whether or not there is candidate standard drug data that has not been matched (S35). If there is candidate standard drug data that has not been matched (YES in S35), the process returns to S3. If there is no candidate standard drug data that has not been matched (NO in S35), the process ends. Also, if the system determines that all the characters included in the identification information of the target drug do not match the characters included in the identification information of the standard drug (NO in S8), the process continues to S35. Also, if the matching unit 64b determines that the position indicated by the first position information and the position indicated by the second position information are separated by a predetermined value or more (YES in S33), the process continues to S35. Also, if the specific drug information determines that the candidate standard drug data is a drug with a shape that is easily rolled (YES in S31), the process continues to S34.
[0178] Furthermore, if drug data that could be a candidate for the target drug is not included in the drug database 81, that is, if there is no reference drug data for the un-verified candidate (NO in S35), the following processing may be performed. If the verification unit 64b estimates that the target drug is a drug (tablet or capsule) based on at least some of the characteristics of the target drug, it identifies the type of target drug as the estimated drug and terminates the processing. Also, if the verification unit 64b cannot identify the object being imaged in the captured image 82 as a drug, it identifies the object being imaged as a foreign object other than a drug and terminates the processing.
[0179] [Embodiment 6] (overview) In this embodiment, a configuration that can improve the efficiency of sorting will be described using Figure 13.
[0180] In this embodiment, the priority determination unit 65 assigns a priority to the types of drugs based on the past sorting performance of the drug sorting device 1. For example, the priority determination unit 65 may determine a priority for each type of drug according to the frequency of discrimination in the discrimination history of the discrimination unit 64. In addition, the sorting control unit 62 in this embodiment decides to temporarily place drugs of a priority lower than a predetermined value in the standby tray (temporary storage unit) 15.
[0181] Generally, while the drug sorting device 1 sorts hundreds to thousands of drugs, there is a limit to the number of sorting cups 141 that can be placed in the second storage section 14 (in this embodiment, 40 sorting cups 141 can be placed). Therefore, when drugs are sorted in the sorting order, drugs with a low identification frequency (drugs that fit in small quantities in the sorting cups 141) may be sorted into the sorting cups 141, while drugs with a high identification frequency (drugs that fit in large quantities in the sorting cups 141) may be sorted into the standby tray 15.
[0182] According to the above configuration, drugs with low frequency in the discrimination history are temporarily placed in the standby tray 15. Therefore, drugs with high frequency in the discrimination history can be sorted into the sorting cup 141 of the second storage unit 14 as a priority. In other words, more drugs can be included as sorting targets (targets for sorting into the sorting cup 141).
[0183] Alternatively, the priority determination unit 65 may determine a priority for each type of drug according to its prescription frequency.
[0184] Furthermore, the priority determination unit 65 uses a genetic algorithm to identify the combination of drug types to be sorted into the sorting cup 141 that maximizes the rate at which the sorting operation can be completed in a single sorting operation. In the above identification, the priority determination unit 65 may use past sorting results. The priority determination unit 65 calculates an index for each drug type from the identified combination of drug types. The priority determination unit 65 assigns a priority to each drug type based on the calculated index.
[0185] Furthermore, the processing according to this embodiment may be configured to be performed when the amount of drug contained in the first storage section 11 is greater than a predetermined amount (for example, when the bottom of the first storage section 11 is not visible due to the amount of drug contained).
[0186] (Control unit 60a) In addition to the main components described in Embodiment 1, the control unit 60a according to this embodiment includes a priority determination unit 65 as shown in Figure 1.
[0187] (Priority determination unit 65) The priority determination unit 65 assigns priorities to drug types based on the past sorting performance of the drug sorting device 1. The priority determination unit 65 stores priority data 83 indicating the priority of each determined drug type in the storage unit 80. More specifically, the priority determination unit 65 determines a priority for each drug (reference drug) type according to the frequency of discrimination in the discrimination history of the discrimination unit 64. More specifically, if the discrimination unit 64 has identified one target drug type, or has narrowed down the number of candidates to a predetermined number, it stores drug data (discriminated type) related to the target drug in the storage unit 80, linked to the captured image 82 of the target drug. For example, the priority determination unit 65 may use the drug data (discriminated type) related to the target drug as the discrimination history. Alternatively, the priority determination unit 65 may set priorities for each drug type such that the priority increases in order of the frequency of discrimination in the discrimination history.
[0188] The priority determination unit 65 may update the priority data 83 each time the discrimination unit 64 identifies the target drug. The priority determination unit 65 may also update the priority data 83 when the number of discriminations performed by the discrimination unit 64 since the last update of the priority data 83 reaches a predetermined number. Furthermore, the priority determination unit 65 may update the priority data 83 at predetermined intervals.
[0189] (Sorting control unit 62) In this embodiment, the sorting control unit 62 performs the following processing in addition to the processing described in Embodiment 1.
[0190] The sorting control unit 62 decides to temporarily place the target drug in the standby tray 15 if the priority corresponding to the type of target drug identified by the discrimination unit 64 is lower than a predetermined value. Specifically, the sorting control unit 62 obtains the priority corresponding to the type of target drug identified by the discrimination unit 64 from the priority data 83 in the storage unit 80. If the obtained priority is lower than a predetermined value, the sorting control unit 62 decides to temporarily place the target drug identified by the discrimination unit 64 in the standby tray 15. The predetermined value should be set to a level that allows the user to sort the desired number of drug types when using the drug sorting device 1.
[0191] (Example of processing) Figure 13 is a flowchart showing an example of the drug sorting process of the sorting control unit 62 in this embodiment.
[0192] As shown in Figure 13, when the sorting control unit 62 receives the type of target drug it has identified, it determines whether the priority corresponding to that type of target drug is lower than a predetermined value (S41). If the priority is lower than the predetermined value (YES in S41), it decides to temporarily place the target drug in the standby tray 15 (S42), and the process ends.
[0193] If the above priority is equal to or greater than a predetermined value (NO in S41), the sorting control unit 62 determines whether the same discrimination result as the above discrimination result is stored in the storage unit 80 (S43). That is, it determines whether the type of target drug has already been identified. If the same discrimination result as the above discrimination result is stored (YES in S43), the sorting cup 141 associated with the stored discrimination result is determined as the sorting position (S44), and the process ends.
[0194] Furthermore, if no identical discrimination result is stored (NO in S43), the sorting cup 141 that does not contain the drug (the sorting cup 141 whose sorting position has not yet been determined) is determined as the sorting position (S45). Subsequently, the sorting control unit 62 stores the type of drug that was identified and the determined sorting position in the storage unit 80 (S46), and the process ends.
[0195] [Embodiment 7] (overview) In this embodiment, a configuration that can improve sorting work will be described using Figure 14.
[0196] If the identification information on a drug is changed by the pharmaceutical manufacturer or other relevant party, drugs with the old identification information and drugs with the new identification information will end up mixed together in the pharmacy. In particular, if the identification information for a drug is changed, but the drugs identified before and after the change are managed under the same YJ code, drugs with both old and new identification information may be managed in a mixed state.
[0197] In this embodiment, the print output control unit 69 performs the following processing if the drug whose identification information has been changed has been identified multiple times by the discrimination unit 64. The print output control unit 69 controls the print output unit 4 to print an alert "Identification information changed" on the drug packaging paper or on a journal representing drug data related to the drug.
[0198] The above configuration allows users to be aware of the possibility that drugs with altered identification information may be mixed together during sorting. For example, when filling or reusing drugs in a dispensing machine, users can be reminded to take precautions to prevent mixing of drugs with altered identification information.
[0199] (Control unit 60a) The control unit 60a according to this embodiment has the main components described in Embodiment 1.
[0200] (Discrimination unit 64) In this embodiment, the discrimination unit 64 performs the following processing in addition to the processing described in Embodiment 1. The discrimination unit 64 stores the captured image 82 and captured image discrimination information 86 used to discriminate the target drug in the storage unit 80. Specifically, the discrimination unit 64 discriminates the type of target drug from the captured image 82 and stores a code (for example, a YJ code) that identifies the type of target drug as captured image discrimination information 86 in the storage unit 80. The captured image discrimination information 86 and the captured image 82 used to discriminate the target drug are linked and stored in the storage unit 80.
[0201] Furthermore, the storage unit 80 in this embodiment stores identification information change information 85. The identification information change information 85 indicates a code (for example, a YJ code) that identifies the type of drug whose identification information has been changed. The identification information change information 85 may also indicate the date and time on which the identification information was changed.
[0202] (Print output control unit 69) The print output control unit 69 refers to the identification information change information 85 and obtains a code that identifies the type of drug whose identification information has been changed. The print output control unit 69 compares the captured image discrimination information 86 with the identification information change information 85 to determine whether there are multiple captured images 82 associated with the drug whose identification information has been changed. The print output control unit 69 may be configured to perform the above processing only for a predetermined period (for example, 30 days after the change occurs) when a change in the identification information of a drug occurs.
[0203] If the print output control unit 69 determines that there are multiple imaged images 82 associated with a drug whose identification information has changed, it performs the following processing: The print output control unit 69 controls the print output unit 4 to print an alert "Identification information changed" on the drug packaging paper or journal. In the above configuration, the packaging mechanism 6 is equipped with a printing mechanism (not shown) that prints drug data of the drug packaged in the drug packaging onto the drug packaging, and the print output control unit 69 may control the printing of the printing mechanism.
[0204] Furthermore, if, for a drug whose identification information has changed, the discrimination unit 64 identifies only drugs that show either the identification information before the change or the identification information after the change within a predetermined period, the print output control unit 69 may stop the control for printing the alert.
[0205] (Example of processing) Figure 14 is a flowchart showing an example of the print control process of the print output control unit 69 according to this embodiment.
[0206] As shown in Figure 14, the print output control unit 69 refers to the identification information change information 85 and determines whether or not there is a drug whose identification information has been changed (S51). For example, the print output control unit 69 may determine whether or not there is a drug that has been within a predetermined period since the change in identification information occurred.
[0207] If it is determined that there is a drug whose identification information has changed (YES in S51), the print output control unit 69 determines whether there are multiple imaged images 82 associated with a code that identifies the drug whose identification information has changed (S52). If it is determined that there are multiple such imaged images 82 (YES in S52), the print output control unit 69 controls the print output unit 4 to print an alert that "Identification information has changed" (S53), and the process ends.
[0208] Furthermore, if the print output control unit 69 determines that there are no drugs whose identification information has changed (YES in S51), the process will terminate. Also, if the print output control unit 69 determines that there are no multiple copies of the above-mentioned captured image 82 (NO in S52), the process will terminate.
[0209] [Embodiment 8] (overview) This embodiment describes a configuration that can improve sorting work.
[0210] The drug sorting device 1 according to this embodiment accepts an input for setting an unmanned time, such as at night, and restricts processes that require a heat source, processes that emit light, processes that output an alarm sound, etc.
[0211] For example, if a chemical sorting device 1 installed in an environment where a security system is activated during unmanned hours such as nighttime is operated at night, there is a possibility that the security system may detect light, sound, heat, etc., emanating from the chemical sorting device 1. In this case, the processing of the chemical sorting device 1 may be stopped. Alternatively, the chemical sorting device 1 may not be usable at night. The above configuration makes it possible to operate the chemical sorting device 1 during unmanned hours such as nighttime when the security system is activated.
[0212] (Operation unit 31) The operation unit 31 of the touch panel 3 accepts user input. In particular, the operation unit 31 according to this embodiment accepts input operations for setting the above time period specified by the user.
[0213] (Notification section 8) The drug sorting device 1 according to this embodiment includes a notification unit 8 as shown in Figure 1. The notification unit 8 includes, for example, a patrol light (registered trademark) that illuminates, a speaker that outputs sound, etc. The notification unit 8 notifies the completion, interruption, etc. of each process of the drug sorting device 1 by illuminating the patrol light (registered trademark), outputting sound, etc.
[0214] (Packaging mechanism 6) In addition to the configuration described in Embodiment 1, the packaging mechanism 6 according to this embodiment is equipped with a heater roller (not shown) for sealing the packaging paper.
[0215] (Control unit 60a) In this embodiment, the control unit 60a includes the notification control unit 75 shown in Figure 1, in addition to the main components described in Embodiment 1.
[0216] (Notification Control Unit 75) The notification control unit 75 receives instructions from each component included in the control unit 60a to notify the completion or interruption of processing. The notification control unit 75 controls the notification unit 8 according to the received instructions.
[0217] In this embodiment, the notification control unit 75 receives the user's specified time period setting input via the operation input unit 66. The notification control unit 75 controls the notification unit 8 so that notifications are not sent by the notification unit 8 during the set time period.
[0218] (Packaging control unit 71) The packaging control unit 71 controls the operation of the packaging mechanism 6. In this embodiment, the packaging control unit 71 specifically receives the setting input for the time period specified by the user via the operation input unit 66. The packaging control unit 71 controls the packaging mechanism 6 so that the heater rollers of the packaging mechanism 6 do not start during the set time period.
[0219] (Example of processing) Next, an example of the function restriction process for the drug sorting device 1 according to this embodiment will be described.
[0220] The notification control unit 75 and the packaging control unit 71 determine whether or not they have received an input operation for setting the above time period. If they have received an input operation for setting the time period, the notification control unit 75 and the packaging control unit 71 perform the following processing: The notification control unit 75 controls the notification unit 8 so that notifications are not sent by the notification unit 8 during the set time period. The packaging control unit 71 also controls the packaging mechanism 6 so that the heater rollers of the packaging mechanism 6 are not started during the set time period. Then the processing ends. If they have not received an input operation for setting the above time period, the packaging control unit 71 returns to the process of determining whether or not it has received an input operation for setting the above time period.
[0221] [Embodiment 9] (overview) In this embodiment, a configuration that can accurately identify the target drug will be described using Figure 15.
[0222] The lighting failure determination unit 76 according to this embodiment determines whether the lighting unit 134 is malfunctioning when the drug sorting device 1 is started up, or when the determination process has been performed a predetermined number of times. With the above configuration, since a malfunction of the lighting unit 134 can be detected, the possibility of the determination process being performed using the captured image 82 taken while the lighting unit 134 is malfunctioning can be reduced.
[0223] (Control unit 60a) In this embodiment, the control unit 60a includes a lighting fault determination unit 76 in addition to the main components described in Embodiment 1.
[0224] (Lighting failure determination unit 76) As shown in Figure 1, the lighting failure detection unit 76 includes a luminance calculation unit 76a and a luminance comparison unit 76b.
[0225] (Brightness calculation unit 76a) The luminance calculation unit 76a instructs the imaging control unit 63 to capture an image and calculates the average value of the luminance in a predetermined area (such as the frame of the drug placement platform 133a) in the acquired image. The luminance calculation unit 76a outputs the calculated average value of luminance to the luminance comparison unit 76b.
[0226] For example, the brightness calculation unit 76a may calculate the above average value when the number of times the discrimination process for determining the type of target drug by the discrimination unit 64 has reached a predetermined number of times since the previous fault determination.
[0227] The memory unit 80 may store discrimination count information 88. The discrimination count information 88 indicates the cumulative number of discrimination processes performed by the discrimination unit 64. The discrimination unit 64 updates the cumulative number indicated by the discrimination count information 88 each time it finishes discriminating for one captured image 82. The brightness calculation unit 76a refers to the discrimination count information 88 and determines whether the number of discrimination processes performed by the discrimination unit 64 has reached a predetermined number since the last fault determination. For example, the brightness calculation unit 76a determines whether the number of discrimination processes performed by the discrimination unit 64 has reached 100 since the last fault determination. The predetermined number should be set to a number that is less than the number of times in which a failure is likely to occur, for example, through experiments.
[0228] Alternatively, the brightness calculation unit 76a may instruct the imaging control unit 63 to capture an image when the drug sorting device 1 is started, and calculate the average brightness of the acquired captured images.
[0229] (Brightness comparison section 76b) The luminance comparison unit 76b determines whether the average luminance value of the captured image calculated by the luminance calculation unit 76a is within a predetermined range relative to a reference value. For example, the luminance comparison unit 76b determines whether the average luminance value of the captured image calculated by the luminance calculation unit 76a is 80% or more and 120% or less of the reference value. The above predetermined range can be set appropriately, for example, through experiments.
[0230] The above reference value is, for example, the average value of brightness in a predetermined area (such as the frame of the drug placement platform 133a) of the captured image taken when the illuminator 134 is not malfunctioning. The above reference value may also be acquired when the drug sorting device 1 is started up (e.g., during teaching).
[0231] The brightness mentioned above may be, for example, the V value of an HSV (H: hue, S: saturation, V: brightness) value that can be converted from the RGB values of each pixel included in the predetermined region in the captured image.
[0232] Furthermore, the captured image used for fault detection of the ultraviolet light irradiation unit 134c may be, for example, an image captured at the maximum allowable exposure time for the ultraviolet light irradiation unit 134c. For example, if the exposure time during normal imaging is 8 to 10 msec, the maximum time may be set to, for example, 1 sec. The maximum time may be set appropriately, for example, through experiments.
[0233] The brightness comparison unit 76b determines whether the illuminator 134 is malfunctioning based on the above judgment result. The display control unit 67 displays the malfunction determination result on the display unit 32.
[0234] (Example of processing) Figure 15 is a flowchart showing an example of the failure determination process of the drug sorting device 1 according to this embodiment. As shown in Figure 15, the brightness calculation unit 76a determines whether the number of determination processes performed by the determination unit 64 has reached a predetermined number since the previous failure determination (S71).
[0235] If the luminance calculation unit 76a determines that the number of times the determination process has been performed has reached a predetermined number since the previous fault determination (YES in S71), the imaging control unit 63 controls the first camera 131 to capture an image (S72). Next, the luminance calculation unit 76a calculates the average value of the luminance of the captured image taken in S72 (S73). Next, the luminance comparison unit 76b determines whether the average value of the luminance of the captured image calculated by the luminance calculation unit 76a is within a predetermined range relative to a reference value (S74). If the luminance comparison unit 76b determines that the average value is not within the predetermined range (NO in S74), the luminance comparison unit 76b determines that the illuminator 134 is faulty (S75). Next, the display unit 32 displays the determination result (S76), and the process ends.
[0236] If the luminance calculation unit 76a determines that the number of times the discrimination process has been performed has not reached a predetermined number since the previous fault determination (NO in S71), the process returns to S71. Also, if the luminance comparison unit 76b determines that the average value is within a predetermined range (YES in S74), the luminance comparison unit 76b determines that the illuminator 134 is normal (S77), and the process continues to S76.
[0237] [Embodiment 10] (overview) In this embodiment, a configuration for reducing the data size of images used to create images for identifying drug types will be described, primarily using Figures 16 to 18.
[0238] The image processing unit 73 in the drug sorting device 1 according to this embodiment generates a cropped image by cutting out either a first region, which is the region of the image of the target drug, or a second region, which is the region of the image of the drug placement platform 133a on which the target drug, including the first region, is placed, from an captured image image that includes the image of the target drug, in order to generate an image of a reference drug for determining the type of target drug.
[0239] For example, the above configuration can reduce the data size of the image used to generate the image of the reference drug. When the drug sorting device 1 transmits an captured image to an external device, the drug sorting device 1 transmits a cropped image to the external device as the captured image, thereby reducing the data size transmitted compared to a configuration in which a cropped image is not generated. Therefore, data transfer from the drug sorting device 1 to the external device can be easily performed.
[0240] Furthermore, the data transfer time for captured images can be reduced. This makes it possible to transfer captured image data using a VPN connection or similar method. Also, even when transferring the data to an HDD, the cost of the HDD can be reduced by reducing the data size. Thus, data transfer costs can be reduced. In addition, the running costs of the drug sorting device 1 can be reduced.
[0241] (Image generation system 1000) The image generation system 1000 according to this embodiment will be described with reference to Figure 16. Figure 16 is a diagram showing an example of the image generation system 1000.
[0242] As shown in Figure 16, the image generation system 1000 includes a drug sorting device 1 and an information processing device 200 that can communicate with the drug sorting device 1. The information processing device 200 generates an image of a reference drug for determining the type of target drug. More specifically, the information processing device 200 generates a reference image based on the cropped image generated by the drug sorting device 1. The reference image is an image used to determine the type of target drug to be determined, and is an image (master image) that is pre-registered in the drug database 81. The drug sorting device 1 and the information processing device 200 transmit and receive data via an internet line or a dedicated VPN (Virtual Private Network) line. Note that the image generation system 1000 may include multiple drug sorting devices 1, and each drug sorting device 1 may be configured to communicate with the information processing device 200.
[0243] Furthermore, data transmission and reception between the drug sorting device 1 and the information processing device 200 does not necessarily have to be performed using the aforementioned line. For example, data transmission and reception with the information processing device 200 may be performed using a communication device different from the drug sorting device 1 (e.g., a PC (Personal Computer)). Alternatively, data to be transmitted to the information processing device 200 may be stored on a storage medium (e.g., an HDD (Hard Disk Drive) or a DVD (Digital Versatile Disc)) and input to the information processing device 200. When a communication device or storage medium is used, the drug sorting device 1 does not need to have a transmitting / receiving unit 100. Similarly, the information processing device 200 does not need to have a transmitting / receiving unit 201.
[0244] (Medicine sorting device 1) As shown in Figure 16, the drug sorting device 1 comprises an imaging unit 13, a touch panel 3, and a computer 60. The computer 60 also comprises a control unit 60b, a storage unit 80b, and a transmission / reception unit 100 that transmits and receives data with the information processing device 200.
[0245] Note that in FIG. 16, only the configuration related to the cutting process and the transmission process to the information processing device 200 among the configurations of the drug dispensing device 1 according to this embodiment is shown. The drug dispensing device 1 according to this embodiment may include all the configurations of the drug dispensing device 1 shown in FIG. 1.
[0246] (Operation unit 31) The operation unit 31 of the touch panel 3 receives input operations by the user. In particular, the operation unit 31 according to this embodiment receives input operations by the user for transmitting the cut-out image 821, the region information file 822, and the compressed image 823 to the information processing device 200.
[0247] (Control unit 60b) The control unit 60b according to this embodiment includes a transmission control unit 77b in addition to the main component configurations provided by the control unit 60a described in Embodiment 1.
[0248] (Imaging control unit 63) The imaging control unit 63 causes the first camera 131 to image the drugs arranged on the drug placement table 133a. The imaging control unit 63 acquires an imaging image from the first camera 131 and transmits the image to the image processing unit 73.
[0249] (Operation input unit 66) The operation input unit 66 receives the input by the user in the operation unit 31. In this embodiment, in particular, the operation input unit 66 receives operations for transmitting the cut-out image 821, the region information file 822, and the compressed image 823 to the information processing device 200. When receiving the operation, the operation input unit 66 transmits a signal indicating that the operation has been received to the transmission control unit 77b.
[0250] (Image processing unit 73) The image processing unit 73 receives the captured image from the imaging control unit 63. From the received captured image, the image processing unit 73 generates a cropped image 821, a region information file 822, and a compressed image 823. The cropped image 821 may be a cropped image obtained by cropping the region of the image of the target drug (first region) from the captured image which includes the image of the target drug. Alternatively, the cropped image 821 may be the region of the image of the drug placement platform 133a on which the target drug is placed (second region), which includes the image of the target drug. The region information file 822 is region information indicating the cropped region in the captured image (the position and size of the image of the drug in the captured image). The compressed image 823 is an image obtained by compressing the captured image. The image processing unit 73 stores the generated cropped image, region information file 822, and compressed image 823 in the storage unit 80b.
[0251] (Transmission control unit 77b) The transmission control unit 77b transmits the cropped image 821, region information file 822, and compressed image 823 stored in the storage unit 80b to the information processing device 200 via the transmission / reception unit 100, according to the operation input received from the user.
[0252] (Storage unit 80b) In this embodiment, the storage unit 80b stores, in addition to the data stored by the storage unit 80 described in Embodiment 1, a cropped image 821, a region information file 822, and a compressed image 823.
[0253] (Information processing device 200) The information processing device 200 can communicate with the drug sorting device 1 and generates an image of a reference drug. As shown in Figure 16, the information processing device 200 includes a transmitting / receiving unit 201, a control unit 202, a storage unit 203, and a touch panel 204. The touch panel 204 includes an operation unit 241 and a display unit 242.
[0254] (Transmitting / receiving unit 201) The transmitting / receiving unit 201 transmits and receives data with the drug sorting device 1. In this embodiment, in particular, the transmitting / receiving unit 201 receives the cropped image 821, the region information file 822, and the compressed image 823 from the transmitting / receiving unit 100 of the drug sorting device 1.
[0255] (Control unit 202) The control unit 202 comprehensively controls the information processing device 200. The control unit 202 mainly comprises an acquisition unit (receiving unit) 221 and an image generation unit 222. The acquisition unit 221 acquires the cropped image 821, the region information file 822, and the compressed image 823 from the transmission / reception unit 201 and stores them in the storage unit 203. The storage unit 203 stores the cropped image 821, the region information file 822, and the compressed image 823. The image generation unit 222 generates a reference image by superimposing the cropped image 821 onto the compressed image 823 based on the region information file 822. For example, the image generation unit 222 may resize the reduced compressed image 823 to its original size, and then superimpose the cropped image 821 onto the position of the drug image in the captured image indicated by the region information file 822 to generate a reference image. For example, the image generation unit 222 may generate a reference image in response to user input via the operation unit 241 of the touch panel 204.
[0256] According to the above configuration, the drug sorting device 1 can reduce the amount of data transferred from the drug sorting device 1 to the information processing device 200 by transferring the compressed image 823, the cropped image 821, and the region information file 822 to the external device, the information processing device 200. Furthermore, even with reduced data transfer from the drug sorting device 1 to the information processing device 200, the information processing device 200 can still generate a reference image in which the resolution of the drug image is at least equivalent to the resolution of the captured image.
[0257] (Example of processing) Figure 17 is a flowchart showing an example of the cropping process of the image processing unit 73 in this embodiment. As shown in Figure 17, the imaging control unit 63 acquires an image from the first camera 131 (S101).
[0258] Next, the image processing unit 73 identifies the cropping region in the received captured image (S102). For example, the image processing unit 73 converts the captured image into a binarized (white, black) image. The image processing unit 73 may identify the white region in the binarized image as the cropping region. Alternatively, the image processing unit 73 may identify the cropping region using pattern matching between the shape of the white region in the binarized image and a predetermined shape. The predetermined shape may be, for example, the shape of the image of the drug in an image taken with the drug placed on the drug stand 133a. Alternatively, the predetermined shape may be, for example, the shape of the image of the drug stand 133a in an image taken of the drug stand 133a. For example, when the image processing unit 73 generates a cropped image using the shape of the image of the drug stand 133a in an image taken of the drug stand 133a, it may generate the cropped image from the following two captured images: One is an image taken of the surface of the tablet, and the other is an image taken of the back surface of the tablet. Here, the front surface refers to one side of the tablet on which identification information is displayed, and the back surface refers to the other side of the tablet that is different from the aforementioned side on which identification information is displayed.
[0259] Next, the image processing unit 73 generates an extracted image 821 by extracting the region identified in S102 from the captured image D100 (S103). The image processing unit 73 also generates a region information file 822 (S104). Subsequently, a compressed image 823 is generated (S105). Figure 18 shows an example of the captured image D100, extracted image D101, region information file D102, and compressed image D103 of the target drug.
[0260] For example, the cropped image D101 may be generated as PNG data. Also, as shown in Figure 18, the region information file D102 indicates the position of the cropped image D101 in the captured image D100. Furthermore, the compressed image D103 may be generated as JPEG data obtained by compressing the captured image D100. For example, one example of a compressed image D103 is a JPEG image file obtained by resizing the captured image D100 to 1 / 4 size. In other words, the amount of data can be compressed by resizing the captured image D100 to 1 / 4 size.
[0261] Next, the image processing unit 73 stores the extracted image 821, the region information file 822, and the compressed image 823 in the storage unit 80b (S106), and the processing is completed.
[0262] Subsequently, the drug sorting device 1 transmits the cropped image 821, the region information file 822, and the compressed image 823 to the information processing device 200. This allows the information processing device 200 to reconstruct the captured image D100 based, for example, on the cropped image D101, the region information file D102, and the compressed image D103.
[0263] Furthermore, multiple captured images may be used to determine the type of a single target drug. For example, if the target drug is a tablet, 10 captured images may be used for the determination, and if the target drug is a capsule, up to 10 additional captured images may be added to the 10 captured images for the determination. For example, the image processing unit 73 may determine whether the target drug captured in the received captured images is a tablet or a capsule. Furthermore, the image processing unit 73 may perform this determination using pattern matching between the image of the target drug captured in the received captured images and a predetermined shape. If the image processing unit 73 determines that the target drug is a tablet, it may not process any captured images other than the first 10 received images, and may not store these captured images in the storage unit 80b. This is because, if the target drug is a tablet, it is possible to determine the type using 10 captured images. On the other hand, if it is a capsule, it may not be possible to determine the type using 10 captured images. Therefore, if the target drug is in capsule form, the image processing unit 73 may store in the storage unit 80b any more than 10 captured images acquired up to the point when it can determine that the target drug is in capsule form.
[0264] (modified version) Modified examples of this embodiment will be explained with reference to Figure 19. For the sake of clarity, components having the same function as those described in the above embodiment will be denoted by the same reference numerals, and their descriptions will not be repeated.
[0265] The image processing unit 73 according to this modification example generates data in which the cut-out image, the cut-out region image, the region information file, the information indicating the color of the target drug, the information indicating the shape of the target drug, etc. are serialized (serialized), and aggregates them into one file. The image processing unit 73 stores the file in a designated backup disk. For example, serialized data is data in which specific data is arranged regularly. In this modification example, an image obtained by cutting out the range of the image of the target drug in the captured image is called a cut-out image. Here, the "range of the image of the target drug" is the same as the "region of the image of the target drug (first region)" in the above-described Embodiment 10. For convenience of explanation, in this modification example, it is called the "range of the image of the target drug".
[0266] Also, in this modification example, an image obtained by cutting out the image of the drug placement table 133a including the image of the target drug in the captured image is called a cut-out region image. Also, the "range of the image of the drug placement table 133a on which the target drug including the image of the target drug is placed" in this modification example is the same as the "region of the image of the drug placement table 133a on which the target drug including the image of the target drug is placed (second region)" in the above-described Embodiment 10. For convenience of explanation, in this modification example, it is called the "range of the image of the drug placement table 133a on which the target drug including the image of the target drug is placed". Also, in this modification example, a cut-out image of a predetermined range centered on the image of the target drug in the captured image is also called a cut-out region image.
[0267] Also, the information processing apparatus 200 according to this modification example deserializes (restores serialization) the serialized data and returns the serialized data to the file format before serialization. The serialized data is data for the discrimination process of the type of one target drug, including the number of discrimination processes, data indicating the color and shape of the drug, the cut-out image generated from the captured image, and the aggregated data.
[0268] For example, the information processing device 200 creates a black background of the same size as the cropped captured image. Based on the region information file, the information processing device 200 generates a reference image by pasting the cropped image onto the black background area corresponding to the cropped area in the captured image.
[0269] (Generation of image set classes and optimization classes) In this modified example, the image processing unit 73 generates an image set class for each discrimination process of a single target drug type. The image processing unit 73 pre-prepares a data storage area as an image set class that can store the maximum number of cropped images and cropped region images that can be generated in a single discrimination process. In this embodiment, the image set class can store cropped images and cropped region images generated from a maximum of 20 captured images.
[0270] For example, if the matching unit 64b is able to determine the type from a predetermined number of captured images (e.g., 10 images) in a single discrimination process, the image processing unit 73 stores the cropped image and cropped region image generated from the predetermined number of captured images (e.g., 10 images) together in an image set class prepared in advance for the discrimination process.
[0271] If the matching unit 64b is unable to determine the type from a predetermined number of captured images (for example, 10 images), the imaging control unit 63 controls the first camera 131 to acquire further captured images. The imaging control unit 63 continues to acquire captured images until the matching unit 64b can determine the type from the acquired captured images. The image processing unit 73 also stores the cropped images and cropped region images generated from the captured images acquired in excess of the predetermined number into the image set class.
[0272] For example, once the matching unit 64b has completed the identification of a target drug, the image processing unit 73 adds the corresponding image set class to the lightweight class image set class list for each identification process. The drug sorting device 1 transmits the lightweight class image set class list to the information processing device 200, which then generates a reference image for each target image by deserializing the data included in the image set class.
[0273] Furthermore, the discrimination unit 64 may be configured to perform image analysis on the captured image 82 again and attempt to determine the type of drug (perform discrimination retry processing) if it fails to determine the type of drug in a single discrimination process. In this modified example, the image processing unit 73 generates an image set class corresponding to the discrimination retry process when discrimination retry processing occurs.
[0274] (Example of extraction process) Next, an example of the image cropping process performed by the image processing unit 73 in this modified example will be explained using Figure 19. Figure 19 is a diagram showing an example of the image cropping process performed by the image processing unit 73.
[0275] First, we will explain the two patterns of captured images. There are two patterns of captured images: a horizontal image (N image) and a vertical image (V image), depending on the inclination of the drug placement platform 133a at the time of image acquisition. N in Figure 19 is a diagram showing the inclination of the drug placement platform 133a when the captured image is an N image. As shown in N in Figure 19, when the captured image is an N image, the N image is captured when one of the inclined surfaces 133ab of the drug placement platform 133a is horizontal.
[0276] Figure 19 shows the inclination of the drug placement platform 133a when the image is captured as a vertical image (V image). As shown in Figure 19, when the image is captured as a V image, the V image is captured with the bottom surface 133aa of the drug placement platform 133a horizontal.
[0277] The image processing unit 73 performs cropping of the captured image according to the pattern of the captured image (V image, N image), the type of lighting used when capturing the image, etc.
[0278] (1) An example of cropping processing by the image processing unit 73 on an N image, which is an N image, captured using the first illumination unit 134a (bar illumination) at the time of capture (bar illumination N image), will be explained using the captured image D104 in Figure 19. The captured image D104 in Figure 19 is a bar illumination N image. In the captured image D104 in Figure 19, the range J104 of the image of the target drug, which is the range in which cropping is performed, and the range R104 of the image of the drug mounting stage 133a, which includes the image of the target drug, are shown.
[0279] The image processing unit 73 performs binarization on the captured image. The image processing unit 73 detects the white areas of the binarized captured image as the areas to be extracted. As shown in the captured image D104 in Figure 19, for example, the areas to be extracted detected by the image processing unit 73 are the area J104 of the image of the target drug and the area R104 of the image of the drug placement platform 133a containing the image of the target drug. For example, the image processing unit 73 may use a binarized image with different thresholds for detecting the area of the image of the target drug and for detecting the area of the image of the drug placement platform 133a containing the image of the target drug. The image processing unit 73 extracts the area of the image of the target drug from the captured image and generates an extracted image. The image processing unit 73 also extracts the area of the image of the drug placement platform 133a containing the image of the target drug and generates an extracted region image.
[0280] (2) A V image is a V image, and an example of cropping processing by the image processing unit 73 on an captured image (bar-illuminated V image) captured using the first illumination unit 134a (bar illumination) at the time of shooting will be explained using the captured image D105 in Figure 19.
[0281] The captured image D105 in Figure 19 is a bar-illuminated V image. In the captured image D105 in Figure 19, the range J105 of the image of the target drug, which is the area where cropping is performed, and a predetermined range R105 centered on the image of the target drug are shown.
[0282] As shown in the captured image D105 in Figure 19, for example, the image processing unit 73 detects the range J105 of the target drug image by pattern matching. The predetermined shape may be, for example, the shape of the drug image in an image captured with the drug placed on the drug placement platform 133a. Next, the image processing unit 73 determines a predetermined range R105 centered on the range J105 of the target drug image. For example, range R105 is a range centered on the range J105 of the target drug image, and is an area obtained by magnifying range J105 by a predetermined magnification. The predetermined magnification may be determined, for example, from the degree of reduction in the size of the image data or from the results of verifying the quality of the restored image.
[0283] The image processing unit 73 extracts the area of the target drug image from the captured image and generates an extracted image. The image processing unit 73 also extracts a predetermined area centered on the image of the target drug and generates an extracted region image.
[0284] (3) An example of cropping processing by the image processing unit 73 on an N image, which is an N image, captured using the second illumination unit 134b (ring illumination) at the time of capture (ring illumination N image), will be explained using the captured image D106 in Figure 19.
[0285] The image processing unit 73 refers to the range of the target drug image detected in the bar-illuminated N image (the relative position of the range of the target drug image relative to the captured image) and determines the position of the range of the target drug image in the ring-illuminated N image. More specifically, the image processing unit 73 determines the position of the range of the target drug image in the ring-illuminated N image so that the relative position of the range of the target drug image relative to the ring-illuminated N image is the same as the relative position of the range of the target drug image in the bar-illuminated N image.
[0286] The captured image D106 in Figure 19 is a ring-illuminated N image. In the captured image D106 in Figure 19, the range J106 of the image of the target drug, which is the area where the excision is performed, is shown.
[0287] For example, in the example shown in Figure 19, the image processing unit 73 refers to the relative position of the range J104 of the target drug image with respect to the captured image D104, which is a bar illumination N image, and identifies the position of the range J106 of the target drug image in the captured image D106.
[0288] (4) An example of cropping processing by the image processing unit 73 on an acquired image (ring illumination V image) which is a V image and was captured using the second illumination unit 134b (ring illumination) at the time of acquisition will be described.
[0289] The image processing unit 73 refers to the range of the target drug image detected in the bar illumination V image (the relative position of the range of the target drug image in the captured image) and determines the position of the range of the target drug image in the ring illumination V image. More specifically, the image processing unit 73 determines the position of the range of the target drug image in the ring illumination V image so that the relative position of the range of the target drug image in the ring illumination V image is the same as the relative position of the range of the target drug image in the bar illumination V image.
[0290] For example, in the example shown in Figure 19, the image processing unit 73 refers to the relative position of the range J105 of the target drug image with respect to the captured image D105, which is a bar-illuminated V image, and identifies the position of the range of the target drug image in the ring-illuminated V image (not shown).
[0291] (5) An example of cropping processing by the image processing unit 73 for an N image, which is an N image, and which was captured using the ultraviolet light irradiation unit 134c (UV illumination) at the time of capture (UV illuminated N image), will be described.
[0292] The image processing unit 73 refers to the range of the target drug image detected in the bar-illuminated N image (the relative position of the range of the target drug image relative to the captured image) and determines the position of the range of the target drug image in the UV-illuminated N image. More specifically, the image processing unit 73 determines the position of the range of the target drug image in the UV-illuminated N image so that the relative position of the range of the target drug image in the UV-illuminated N image is the same as the relative position of the range of the target drug image in the bar-illuminated N image.
[0293] For example, in the example shown in Figure 19, the image processing unit 73 refers to the relative position of the range J104 of the target drug's image with respect to the captured image D104, which is a bar-illuminated N image, and identifies the position of the range of the target drug's image in the UV-illuminated N image (not shown).
[0294] Furthermore, for images captured using ring illumination or UV illumination during shooting, the image processing unit 73 does not need to generate a cropped region image.
[0295] Furthermore, the processing described in (1) to (5) above may be performed on the predetermined number of captured images. Specifically, the predetermined number of captured images are bar illumination N images, bar illumination V images, ring illumination N images, ring illumination V images, and UV illumination N images. In addition, the bar illumination N images, bar illumination V images, ring illumination N images, ring illumination V images, and UV illumination N images described above may be captured images taken by positioning the imaging mechanism so that the angle θ between axis Ax0 and axis Ax1 shown in Figure 4 is 0° and 180°. In this case, the predetermined number of captured images will be a total of 10 captured images: bar illumination N images, bar illumination V images, ring illumination N images, ring illumination V images, and UV illumination N images, all taken by positioning the imaging mechanism so that θ is 0° and 180°. On the other hand, any captured images obtained in excess of the predetermined number are bar illumination V images, which are captured while changing the imaging angle. Therefore, the processing described in (2) above is performed on these images.
[0296] Comparing the data size of the captured image without the above processing with the data size of the serialized data after the above processing, the data size of the serialized data compared to the data size of the captured image without the cropping process was as follows: • For 39 engraved tablets, the data capacity of the captured images without cutting was 23.2%. • For 39 printed tablets, the data capacity of the captured image without cropping is 21.5%. • 20 capsules account for 34.5% of the data size of the unextracted images. Furthermore, it was confirmed that compressing the serialized data with zip resulted in a data size of approximately 10% of the unextracted images.
[0297] This modified example can be rephrased as follows.
[0298] The image processing unit 73 of the drug sorting device 1 in this modified example generates at least one cropped image from an image containing the image of the target drug, by cutting out the range of the image of the target drug (first region) and the range of the image of the drug placement platform 133a on which the target drug is placed, in order to generate an image of a reference drug for determining the type of target drug.
[0299] The image processing unit 73 generates at least one region information file indicating a first region in the captured image and a region information file indicating a second region.
[0300] The information processing device 200 in this modified example can communicate with the drug sorting device 1 and generates an image of a reference drug. The acquisition unit 221 of the information processing device 200 receives a cropped image and a region information file corresponding to the cropped image from the drug sorting device 1. The image generation unit (generation unit) 222 generates a reference image based on the region information file.
[0301] This modified image generation system 1000 includes a drug sorting device 1 and an information processing device 200.
[0302] [Embodiment 11] (overview) In this embodiment, a configuration for reducing the replacement cost of the sorting cup 141 will be described, primarily using Figures 20 to 24.
[0303] The drug sorting device 1 according to this embodiment generates a shape model 800 that shows the shape of the damage on the sorting cup 141 and stores the generated shape model 800. When the drug sorting device 1 detects drugs from an image of the sorting cup 141 for purposes such as checking remaining drugs, it uses the shape model 800 to prevent detecting damage on the sorting cup 141 as a drug. With the above configuration, a damaged sorting cup 141 can be used continuously. Therefore, the cost of replacing the sorting cup 141 can be reduced.
[0304] (Medicine sorting device 1) The drug sorting device 1 according to this embodiment will be described with reference to Figure 20. Figure 20 is a block diagram showing an example of some of the configurations of the drug sorting device 1 according to this embodiment. Note that in Figure 20, only the configurations related to the shape model generation process of the sorting cup 141 and the drug detection process in the sorting cup 141 according to this embodiment are shown. The drug sorting device 1 according to this embodiment may include all the configurations of the drug sorting device 1 shown in Figure 1.
[0305] (Operation unit 31) The operation unit 31 of the touch panel 3 accepts user input. In particular, the operation unit 31 according to this embodiment accepts user input instructing the generation of a shape model 800 of the sorting cup 141. The operation unit 31 also accepts user input instructing the confirmation of remaining medication in the sorting cup 141. Confirmation of remaining medication refers to the drug sorting device 1 determining whether or not there is any medication contained in the sorting cup 141 based on the image captured of the sorting cup 141.
[0306] (Control unit 60c) The control unit 60c according to this embodiment includes, in addition to the main components of the control unit 60a described in Embodiment 1, a shape model generation unit 791c, a drug detection unit 792c, and a matching determination unit 793c.
[0307] (Imaging control unit 63) The imaging control unit 63, in accordance with instructions received from the operation input unit 66, causes the second camera 121 to image the inside of the sorting cup 141. The imaging control unit 63 acquires the image from the second camera 121. If the operation input unit 66 receives user input instructing the generation of a shape model 800 of the sorting cup 141, the imaging control unit 63 transmits the acquired image to the shape model generation unit 791c. Also, if the operation input unit 66 receives user input instructing the confirmation of remaining medication in the sorting cup 141, the imaging control unit 63 transmits the acquired image to the drug detection unit 792c.
[0308] (Operation input section 66) The operation input unit 66 receives user input from the operation unit 31. In this embodiment, in particular, the operation input unit 66 receives user input instructing the generation of a shape model 800 of the sorting cup 141 and user input instructing the confirmation of remaining medication in the sorting cup 141.
[0309] When the operation input unit 66 receives user input instructing the generation of a shape model 800 for the sorting cup 141 and user input instructing the confirmation of remaining medication in the sorting cup 141, it instructs the imaging control unit 63 to image the sorting cup 141 with the second camera. The user input instructing the generation of a shape model 800 for the sorting cup 141 may also include an input specifying the sorting cup 141.
[0310] (Display control unit 67) The display control unit 67 receives a signal from the drug detection unit 792c indicating the detection result of the drug image. The display control unit 67 displays the remaining drug confirmation image on the display unit 32. For example, the remaining drug confirmation image may display an image of each sorting cup 141 and also display "remaining drug present," "no remaining drug present," etc. for each sorting cup 141.
[0311] (Shape model generation unit 791c) The shape model generation unit 791c receives the captured image from the imaging control unit 63. The shape model generation unit 791c generates a shape model 800 of the sorting cup 141 from the captured image. The process of generating the shape model 800 will be described in detail later. The shape model generation unit 791c associates the shape model 800 with the UID (unique identification) of the RFID tag of the corresponding sorting cup 141 and stores it in the storage unit 80c. In addition to the shape model showing the shape of the scratch, the shape model 800 may also include region information indicating the area of the scratch on the sorting cup 141.
[0312] (Drug detection unit 792c) The drug detection unit 792c receives the captured image from the imaging control unit 63. The drug detection unit 792c detects the image of the drug from the captured image. When the drug detection unit 792c detects the image of the drug from the captured image, it transmits the captured image to the matching determination unit 793c.
[0313] For example, the drug detection unit 792c converts the captured image into a binarized image. The drug detection unit 792 may identify the white areas in the binarized image as images of the drug. Alternatively, the drug detection unit 792c may identify the images of the drug using pattern matching between the shape of the white areas in the binarized image and a predetermined shape. The predetermined shape may be, for example, the shape of the drug image in a previously captured image.
[0314] Furthermore, the drug detection unit 792c receives a signal from the matching determination unit 793c indicating a matching region. The matching region will be described in detail later. The drug detection unit 792c excludes the matching region indicated by the signal from the region to be detected and performs drug image detection. If drug image is detected, the drug detection unit 792c transmits a signal to the display control unit 67 indicating that there is remaining drug in the corresponding sorting cup 141. Also, if the drug detection unit 792c receives a signal from the matching determination unit 793c indicating that no matching region was detected, it transmits a signal to the display control unit 67 indicating that there is remaining drug in the corresponding sorting cup 141. Furthermore, if no drug image is detected from the captured image with the matching region excluded, or from the captured image received from the imaging control unit 63, the drug detection unit 792c transmits a signal to the display control unit 67 indicating that there is no remaining drug in the corresponding sorting cup 141.
[0315] (Matching determination unit 793c) The matching determination unit 793c receives the captured image from the drug detection unit 792c. The matching determination unit 793c matches the shape model 800 of the storage unit 80c with the image detected as the drug in the captured image and calculates a matching score. The matching determination unit 793c determines whether the matching score is greater than a predetermined value. If the matching score is greater than the predetermined value, the matching determination unit 793c identifies the area of the image detected as the drug as the matching area. The matching determination unit 793c transmits a signal indicating the matching area to the drug detection unit 792c. If the matching score is less than or equal to the predetermined value, the matching determination unit 793c transmits a signal indicating that no matching area was detected to the drug detection unit 792c.
[0316] The matching region is the area where the matching score is greater than a predetermined value, as described above. In other words, the matching region is the area of the captured image in which an image with a shape similar to the shape of the scratch shown in the shape model 800 is captured. Furthermore, a value greater than the predetermined value (threshold) mentioned above is a value that can be considered to indicate a high degree of similarity between the shape of the scratch shown in the shape model 800 and the image in the captured image. A specific example of the predetermined value mentioned above is 0.75 (75 points). For example, the matching score is a value where 1 (100 points) represents a perfect match and 0 (0 points) represents dissimilarity.
[0317] (Example of the process for generating shape model 800) Figure 21 is a flowchart showing an example of the process for generating a shape model of the sorting cup 141 by the drug sorting device 1 of this embodiment. As shown in Figure 21, the operation input unit 66 receives an instruction to generate a shape model 800 of the sorting cup 141 (S201). For example, in the remaining drug check performed after the drug has been removed from the sorting cup 141, if the user determines that the sorting cup 141 is damaged, the user inputs an instruction to generate a shape model 800 of the sorting cup 141 from the operation unit 31.
[0318] Next, the imaging control unit 63 acquires an image of the inside of the sorting cup 141 from the second camera 121 (S202). Subsequently, the shape model generation unit 791c generates a shape model 800 of the sorting cup 141 from the image (S203). Figure 22 shows an example of an image of the sorting cup 141 and a shape model 800 of the sorting cup 141. Image D200 shown in Figure 22 is an example of an image of the inside of the sorting cup 141 taken by the second camera 121. Region R20 is shown in image D200, and there is one scratch in region R20. Image D201 shown in Figure 22 is a magnified image of region R20. Shape model 800E1 shown in Figure 22 shows the shape model 800 corresponding to the scratch detected in image D201.
[0319] For example, shape model 800E1 is the shape of a scratch on sorting cup 141 extracted from image D201. Note that shape model 800 may only show a part of the shape of the scratch on sorting cup 141. Also, image D202 shown in Figure 22 is an example of a magnified image of the inside of another sorting cup 141. Multiple scratches are present in the sorting cup 141 captured in image D202. If multiple scratches are detected from the captured image of sorting cup 141, the shape model generation unit 791c may generate a shape model 800 corresponding to each of the detected scratches. Shape models 800E2 to 800E4 shown in Figure 22 show shape models 800 corresponding to each of the multiple scratches detected in image D202.
[0320] Next, the shape model generation unit 791c stores the generated shape model 800 in the storage unit 80c (S204).
[0321] (Example of drug detection process for checking remaining medication) Figure 23 is a flowchart showing an example of drug detection processing for checking remaining medication by the drug sorting device 1 of this embodiment. As shown in Figure 23, the operation input unit 66 receives an instruction to check remaining medication in the sorting cup 141 (S301). Subsequently, the imaging control unit 63 acquires an image of the inside of the sorting cup 141 from the second camera 121 (S302).
[0322] Next, the drug detection unit 792c detects the image of the drug from the captured image (S303). If the drug detection unit 792c detects the image of the drug from the captured image (YES in S303), the matching determination unit 793c matches the shape model 800 stored in the memory unit 80c with the image detected as the drug in the captured image (S304). Subsequently, the matching determination unit 793c determines whether the matching score is greater than a predetermined value (S305).
[0323] Figure 24 shows an example of an image of the sorting cup 141, an extracted image showing the inside of the sorting cup 141, a shape model 800, and an image of the matching region in the extracted image. Image D203 shown in Figure 24 is an example of an image of the sorting cup 141. The matching determination unit 793c may generate an extracted image by extracting the inside of the sorting cup 141 from the image of the sorting cup 141. Extracted image D204 shown in Figure 24 is an extracted image obtained by extracting the inside of the sorting cup 141 from image D203. The matching determination unit 793c may perform matching using this extracted image as the image. Shape model 800F1 shown in Figure 24 is an example of a shape model of a scratch on the sorting cup 141. Also, image D205 shown in Figure 24 is an example of an image of the matching region corresponding to shape model 800F1 in extracted image D204. As shown in Figure 24, the matching determination unit 793c searches for image patterns similar to the shape model 800F1 from the extracted image D204 and calculates a matching score indicating how similar the searched image patterns are to the shape model 800F1. Figure 24 shows an example where the matching determination unit 793c calculated a matching score of 0.93.
[0324] If the matching determination unit 793c determines that the matching score is greater than a predetermined value (threshold) (YES in S305), the drug detection unit 792c excludes the matching area from the area in the captured image where the drug is detected (S306) and detects the drug image (S307). If the drug detection unit 792c detects the drug image (YES in S307), the display control unit 67 displays a remaining drug confirmation image with "Remaining drug present" displayed on the corresponding sorting cup 141 on the display unit 32 (S308), and the process ends.
[0325] Image D206 in Figure 24 shows an example of the drug detection result of the drug detection unit 792c when the matching area is excluded from the detection target area. As shown in image D206 in Figure 24, the drug detection unit 792c detects only the drug image J200 and does not detect the wound image as a drug.
[0326] If the drug detection unit 792c does not detect an image of the drug from the captured image (NO in S303), the display control unit 67 displays a remaining drug confirmation image with "No remaining drug" displayed on the corresponding sorting cup 141 on the display unit 32 (S309), and the process ends. Also, if the matching determination unit 793c determines that the matching score is below a predetermined value (NO in S305), the process continues to 308. Also, if the drug detection unit 792c does not detect an image of the drug (NO in S307), the process continues to 309.
[0327] [Embodiment 12] In this embodiment, Figure 25 illustrates a configuration that can assist users in removing drugs in poor condition from the sorted drugs. For example, drugs in poor condition include drugs that are partially missing, dirty, or discolored.
[0328] In this embodiment, the drug sorting device 1 displays buttons on an image (visual inspection image) for the user to visually inspect the sorted drugs, allowing the user to select the status of each drug. The drug sorting device 1 prints the status of each drug on at least one of the journal and the packaging paper according to the user input received.
[0329] With the above configuration, if the sorted drugs include drugs in poor condition, the user can easily determine the number of drugs in poor condition. Therefore, the drug sorting device 1 can assist the user in removing drugs in poor condition from the sorted drugs. In addition, since the user can be made aware that drugs in poor condition are included in the sorted drugs, the chances of missing or failing to remove drugs in poor condition can be reduced.
[0330] In this embodiment, the operation unit 31, control unit 60a, and print output unit 4 perform the following processing in addition to the processing described in Embodiment 1.
[0331] (Operation unit 31) The operation unit 31 receives input operations from the user. In particular, the operation unit 31 according to this embodiment receives user input for displaying an image for visual inspection. The operation unit 31 also receives user input entered via the buttons displayed on the image for visual inspection. The operation unit 31 transmits a signal indicating the received user input to the operation input unit 66.
[0332] (Imaging control unit 63) The imaging control unit 63 receives instructions from the operation input unit 66 and causes the second camera 121 to image the sorting cup 141. The imaging control unit 63 acquires the image and transmits it to the display control unit 67.
[0333] (Operation input section 66) When the operation input unit 66 receives a signal indicating user input for displaying an image for visual inspection, it instructs the imaging control unit 63 to image the sorting cup 141 with the second camera 121. The operation input unit 66 also receives a signal indicating user input from the buttons displayed on the image for visual inspection. The operation input unit 66 transmits this signal indicating user input to the print output control unit 69.
[0334] (Display control unit 67) The display control unit 67 receives the captured image from the imaging control unit 63, generates an image for visual inspection using the captured image, and displays it on the display unit 32. The image for visual inspection includes "buttons that allow the user to select the status of each drug." Through these buttons, the user can input the status of each drug sorted in the sorting cups 141. For example, the user can use these buttons to select the status of the drug, such as whether it is dirty, chipped, or discolored.
[0335] (Print output control unit 69) The print output control unit 69 controls the print output unit 4 according to the user input received by the operation input unit 66.
[0336] (Print output unit 4) The printing output unit 4 prints the status of each drug on at least one of the journal and the packaging paper according to the user input.
[0337] (Example of processing) Figure 25 is a flowchart showing an example of the printing process of the drug sorting device according to this embodiment. As shown in Figure 25, the operation input unit 66 receives user input to display an image for visual inspection (S401). Subsequently, the imaging control unit 63 controls the second camera 121 to image the sorting cup 141 (S402). Next, the display control unit 67 displays an image for visual inspection, including a "button that allows the user to select the status of each drug" (S403). Subsequently, the operation input unit 66 receives user input for the status of each drug for the above buttons (S404). The user visually inspects the images for visual inspection and performs a visual inspection of the drugs shown in each image. If the user finds any problem with a drug during the visual inspection, they select the button indicating "Yes" for the corresponding problem. If no problems are found, they select the button indicating "No" for each problem. Upon receiving this selection, the operation input unit 66 receives user input for the above buttons.
[0338] Next, the print output control unit 69 controls the print output unit 4 to print the status of each drug on the journal (S405), and the process ends. For example, if the user performs a visual inspection before dispensing the sorted drugs, the status of each drug may be printed on both the journal paper and the packaging paper. Alternatively, if the user performs a visual inspection after dispensing the sorted drugs, the status of each drug may be printed only on the journal paper. For example, for each sorting cup 141, the status of the drug and the number of drugs in that state may be printed, such as "Stained: 1 tablet present, Chipped: 2 tablets present".
[0339] [Embodiment 13] (overview) In this embodiment, we will primarily use Figures 26 to 28 to describe a configuration that can increase the probability of successfully identifying the type of target drug and improve the accuracy of identifying the type of target drug.
[0340] In this embodiment, the drug sorting device 1 generates a converted string in which, if the identification information of a target drug contains unidentifiable characters, the unidentifiable characters in the identification information string are converted into wildcards that match all patterns. The drug sorting device 1 determines the type of target drug from the search results using the converted string against the user-adopted drug list 810 and the comprehensive drug database 541.
[0341] According to the above configuration, if the identification information of the target drug contains unidentifiable characters, the drug sorting device 1 determines the type of target drug from the search results using the user-adopted drug list 810 and the comprehensive drug database 541. Therefore, the drug sorting device 1 can increase the probability that the target drug will be one of the drugs.
[0342] Here, Figure 26 shows an example of the drug identification system 2000 according to this embodiment. As shown in Figure 26, the user-adopted drug list 810 is stored in the storage unit 80d of each drug sorting device 1. The user-adopted drug list 810 is a list that includes the characteristics (drug data) of reference drugs corresponding to drugs managed in the hospital, ward, or pharmacy where the drug sorting device 1 is used. The drug data is associated with identification information of the reference drug (e.g., information indicating the type of drug, such as the drug name). The drug data may also be image data that includes the characteristics of the reference drug.
[0343] Furthermore, as shown in Figure 26, the comprehensive drug database 541 is stored in the storage unit 504 of the data management device 500. The data management device 500 manages drug data for multiple types of drugs that may be used in any hospital, ward, or pharmacy. The data management device 500 can communicate with the drug sorting device 1 and centrally manages multiple types of drugs in the comprehensive drug database 541.
[0344] Because the amount of drug data managed in the comprehensive drug database 541 is enormous, it is not practical to include all of it in the user-adopted drug list 810. Therefore, the drug data included in the user-adopted drug list 810 is extracted from the drug data contained in the comprehensive drug database, and consists of drug data that is expected to be used in each drug sorting device 1, or in each hospital, ward, or pharmacy.
[0345] (Drug Identification System 2000) The drug identification system 2000 according to this embodiment will be described with reference to Figure 26. As shown in Figure 26, the drug identification system 2000 includes a plurality of drug sorting devices 1 and a data management device 500 that can communicate with each drug sorting device 1. The drug sorting devices 1 and the data management device 500 transmit and receive data via an internet line or a dedicated VPN (Virtual Private Network) line. Note that the drug identification system 2000 may include only one drug sorting device 1.
[0346] (Data management device 500) The data management device 500 is, for example, a device used by the manufacturer of the drug sorting device 1. The data management device 500 comprises a communication unit 501, a control unit 502, a touch panel 503, and a storage unit 504. The storage unit 504 stores the comprehensive drug database 541. The communication unit 501 transmits and receives data with the drug sorting device 1. The communication unit 501 receives, for example, a converted string from the communication unit 101 of the drug sorting device 1. The control unit 502 performs a search in the comprehensive drug database 541 using the converted string. The control unit 502 transmits the drug data of the reference drug found in the comprehensive drug database 541 to the drug sorting device 1 via the communication unit 501. The touch panel 503 comprises an operation unit and a display unit (not shown). For example, drug data contained in the comprehensive drug database 541 may be updated by user operation via the touch panel 503.
[0347] (Medicine sorting device 1) As shown in Figure 26, the drug sorting device 1 includes a touch panel 3, a control unit 60a, a storage unit 80d, and a communication unit 101.
[0348] Note that Figure 26 shows only the configuration related to the discrimination process according to this embodiment of the drug sorting device 1. The drug sorting device 1 according to this embodiment may include all the configurations of the drug sorting device 1 shown in Figure 1.
[0349] (Touch panel 3) The operation unit (not shown) of the touch panel 3 accepts user input. In particular, the operation unit according to this embodiment accepts user operations such as instructing to add drug data for a reference drug to the user-adopted drug list 810.
[0350] For example, drug data for reference drugs added to the user-selected drug list 810 may be drug data for reference drugs that are not found in the user-selected drug list 810 but are found in the comprehensive drug database 541 when searching using a converted string. For example, when the operation input unit 66 receives a user operation instructing the addition of drug data for a reference drug, the drug database update unit 74 shown in Figure 1 may add the drug data for that reference drug to the user-selected drug list 810. Alternatively, the user may request the manufacturer of the drug sorting device 1 to add drug data for reference drugs that are not found in the user-selected drug list 810 but are found in the comprehensive drug database 541 to the user-selected drug list 810.
[0351] In addition to the functions described in Embodiment 1, the control unit 60a according to this embodiment has the following functions.
[0352] (Feature extraction unit 64a) The feature extraction unit 64a performs OCR processing on the identification information of the target drug. The feature extraction unit 64a also determines whether or not the string of identification information after OCR contains unrecognizable characters.
[0353] Furthermore, the feature extraction unit 64a determines whether the string of identification information after OCR contains a predetermined number of characters equal to or greater than a first number. For example, the feature extraction unit 64a determines whether the total number of identifiable and unidentifiable characters contained in the string of identification information is equal to or greater than a first number. This first number may be a number set by the user.
[0354] Furthermore, the feature extraction unit 64a determines whether the string of identification information after OCR contains more identifiable characters than a predetermined second number. For example, the feature extraction unit 64a may determine whether the number of identifiable characters is greater than the number of unidentifiable characters. If the number of characters in the string of identification information after OCR is 8, it may determine whether the number of identifiable characters is 5 or more (greater than 4).
[0355] If the string of identification information after OCR contains a first number of characters or more, and the string of identification information after OCR contains a second number of identifiable characters, the feature extraction unit 64a generates a converted string. Specifically, the feature extraction unit 64a generates the converted string by converting unidentifiable characters in the string of identification information after OCR into wildcards. The feature extraction unit 64a transmits a signal indicating the generated converted string to the matching unit 64b.
[0356] (Verification unit 64b) The matching unit 64b searches for a reference drug of the same type as the target drug by comparing the received converted string with the identification information string of the reference drug included in the user-adopted drug list 810.
[0357] Furthermore, the matching unit 64b transmits a signal indicating the converted string to the data management device 500 via the communication unit 101. The matching unit 64b obtains drug data of the reference drug searched using the converted string from the comprehensive drug database 541 via the communication unit 101 from the data management device 500. The matching unit 64b determines the type of target drug according to the search result. The matching unit 64b also updates the discrimination result information 820 stored in the storage unit 80d. The discrimination result information 820 includes information such as the type of target drug determined by the matching unit 64b, drug data of the reference drug used for discrimination, and all candidate drugs if there were multiple candidates for the target drug. The discrimination result information 820 may also be stored in the storage unit 80 linked to the captured image 82 of the target drug.
[0358] (Example of processing) Figure 27 is a flowchart showing an example of the discrimination process of the drug sorting device 1 of this embodiment. As shown in Figure 27, the feature extraction unit 64a performs OCR processing on the identification information of the target drug (S501). Subsequently, the feature extraction unit 64a determines whether or not the string of identification information after OCR contains unidentifiable characters (S502).
[0359] Figure 28 shows an example of identification information for a target drug, drug data for a reference drug in the user-adopted drug list 810, and drug data for a reference drug in the comprehensive drug database 541. D301 in Figure 28 shows an example of identification information in the upper (front) side image of the target drug. D302 in Figure 28 shows an example of identification information in the lower (back) side image of the target drug. In the example shown in D301 in Figure 28, the upper side of the target drug displays the identification information "ABC" in the upper section and "123" in the lower section. As shown in C1 in D301 in Figure 28, after OCR processing, the letter "C" in the upper section of the identification information on the upper side of the target drug becomes an unrecognizable character. Also, as shown in C2 in D301 in Figure 28, after OCR processing, the letter "2" in the lower section of the upper side of the target drug becomes an unrecognizable character. In addition, in the example shown in D302 in Figure 28, the lower side of the target drug displays the identification information "20". As shown in C3 of D302 in Figure 28, after OCR processing, the character "2" in the lower identification information of the target drug becomes an unrecognizable character. In the examples shown in D301 and D302 in Figure 28, since the characters shown in C1, C2, and C3 are unrecognizable characters, the feature extraction unit 64a determines that the string of identification information after OCR contains unrecognizable characters.
[0360] If the identification information string contains unidentifiable characters (YES in S502), the feature extraction unit 64a determines whether the identification information string after OCR contains a first number or more characters (S503). For example, in the examples shown in D301 and D302 of Figure 28, regardless of whether they are identifiable or unidentifiable, the Upper side displays 6 characters of identification information, "ABC" and "123", and the Lower side displays 2 characters of identification information, "20". In other words, in the examples shown in D301 and D302 of Figure 28, a total of 8 characters of identification information are displayed. If the first number is set to a number of 8 or less (for example, 5), in the examples shown in D301 and D302 of Figure 28, the feature extraction unit 64a determines that the identification information string after OCR contains a first number or more characters.
[0361] If the string of identification information after OCR contains more than the first number of characters (YES in S503), the feature extraction unit 64a determines whether the string of identification information after OCR contains more identifiable characters than the second number (S504). For example, in the examples shown in D301 and D302 of Figure 28, the upper row "A" and "B", the lower row "1" and "3", and the lower row "0" of the target drug are identifiable characters, and the string of identification information contains 5 identifiable characters. For example, the second number may be the number of unidentifiable characters among the characters in the string of identification information displayed on the target drug. In this case, in the examples shown in D301 and D302 of Figure 28, the number of unidentifiable characters is 3, and the number of identifiable characters, 5, is greater than the number of unidentifiable characters, 3. Therefore, the feature extraction unit 64a determines that the string of identification information after OCR contains more identifiable characters than the second number (number of unidentifiable characters).
[0362] If the string of identification information after OCR contains more identifiable characters than the second number (YES in S504), the feature extraction unit 64a converts the unidentifiable characters in the string of identification information after OCR into wildcards (S505) and generates a converted string. For example, in the examples shown in D301 and D302 of Figure 28, the feature extraction unit 64a may generate a converted string as follows.
[0363] First, the feature extraction unit 64a may divide the string of identification information into display areas using delimiters ("space", ":"). Display areas include the upper section of the Upper side, the lower section of the Upper side, the Lower side, etc. In the example shown in D301 and D302 of Figure 28, the feature extraction unit 64a generates "AB× 1×3:×0" (× represents an unidentifiable character). Next, the feature extraction unit 64a converts the unidentifiable character into a wildcard (*). The feature extraction unit 64a also adds a wildcard (*) to the beginning and end of the string for each display area. That is, the string for the upper section of the Upper side becomes "*AB**", the string for the lower section of the Upper side becomes "*1*3*", and the string for the Lower side becomes "**0*". The wildcard (*) represents any zero or more characters.
[0364] The process of adding wildcards (*) to the beginning and end of the string is a precaution in case there are characters before the beginning or after the end of the string that the feature extraction unit 64a has not been able to recognize as characters. This process ensures that the search for the reference drug can be performed appropriately when there are characters before the beginning or after the end of the string that the feature extraction unit 64a has not been able to recognize as characters.
[0365] Next, the matching unit 64b searches for a reference drug of the same type as the target drug using the user-adopted drug list 810 (S506). Figure 28, D303 shows an example of drug data for a reference drug found using the user-adopted drug list 810. As shown in Figure 28, D303 shows the reference drug (adopted drug MB master) with the identification information "ABC" displayed on the upper section (Upper1) and "123" on the lower section (Upper2). The reference drug also has the identification information "30" displayed on the Lower section. In this example, the adopted drug B master found using the user-adopted drug list 810 is a different type of drug from the target drug.
[0366] Next, the matching unit 64b obtains search results using the comprehensive drug database 541 (S507). Figure 28, D304 shows an example of drug data for a reference drug retrieved using the comprehensive drug database 541. As shown in Figure 28, D304 shows the reference drug (drug MA master) with the identification information "ABC" displayed in the upper section (Upper1) and "123" displayed in the lower section (Upper2). In addition, the reference drug has the identification information "20" displayed in the Lower section. In this example, drug A retrieved using the comprehensive drug database 541 is the same type of drug as the target drug.
[0367] Next, the matching unit 64b determines whether or not a reference drug of the same type as the target drug was found in either the search using the user-adopted drug list 810 or the search using the comprehensive drug database 541.
[0368] If a reference drug is found (YES in S508), the matching unit 64b determines whether there are multiple reference drugs found (S509). For example, the matching unit 64b determines that there are multiple reference drugs found in the following cases:
[0369] (1) When one reference drug is found in a search using the user-adopted drug list 810, and when one reference drug is found in a search using the comprehensive drug database 541. (2) When multiple reference drugs are found in at least one of the searches using the user-adopted drug list 810 and the comprehensive drug database 541.
[0370] If multiple reference drugs are found (YES in S509), the matching unit 64b identifies the type of target drug as one of the multiple candidate drugs (S510). For example, if reference drugs are found in both the search using the user-adopted drug list 810 and the search using the comprehensive drug database 541, the matching unit 64b may identify the reference drug found in the search using the user-adopted drug list 810 as the type of target drug. In addition, the reference drugs included in the user-adopted drug list 810 and the comprehensive drug database 541 may be assigned a discrimination priority indicating the priority of discrimination. The matching unit 64b may determine the type of target drug based on this discrimination priority. Subsequently, the matching unit 64b stores all of the multiple candidate drugs that are the found reference drugs as discrimination result information 820 in the storage unit 80d (S511), and the process ends.
[0371] If the identification information string does not contain any unidentifiable characters (NO in S502), the process terminates. For example, the process of converting unidentifiable characters in the identification information string into wildcards may be omitted, and the discrimination process described in Embodiment 1 may be performed instead.
[0372] Furthermore, if the string of identification information after OCR does not contain more than the first number of characters (NO in S503), the matching unit 64b determines the target drug to be the estimated drug (S513), and the process ends. Also, if the string of identification information after OCR does not contain more than the second number of identifiable characters (NO in S504), the process continues to S513. Also, if no reference drug is found (NO in S508), the process continues to S513.
[0373] Furthermore, if the searched reference drug is not multiple (only one) (NO in S509), the matching unit 64b identifies the type of target drug as the searched reference drug (S512), and the process ends.
[0374] For example, if the operation input unit 66 receives user input via the operation unit 31 to display an image for visual inspection after the above-described discrimination process of the drug sorting device 1 has been completed, the following process is performed. The display control unit 67 displays a warning image on the display unit 32 for target drugs for which there are multiple searched reference drugs. The visual inspection image includes a warning indicating that there are multiple candidates, drug data for the multiple candidate drugs, etc. In the example shown in Figure 28, the drug data from the adopted drug MB master and drug MA master will be included in the display image as candidate drugs for the target drug.
[0375] Furthermore, by checking this display image, if the drug data for the identified drug is not included in the user-selected drug list 810, the user inputs an instruction from the operation unit 31 of the touch panel 3 to add the drug data to the user-selected drug list 810. When the operation input unit 66 receives this instruction, the drug database update unit 74 adds the drug data for the reference drug to the user-selected drug list 810.
[0376] [Embodiment 14] (overview) As described above, the drug sorting device 1 is capable of sorting drugs stored in the first storage section 11 by type. Drugs stored in the first storage section 11 include returned drugs and drugs brought by patients. In this embodiment, we will mainly describe an example of the configuration of the first storage section 11A assuming that the drug sorting device 1 sorts drugs brought by patients, an example of the processing when the drug sorting device 1 sorts drugs brought by patients, and an example of a display image (display screen) that can be displayed when the drug sorting device 1 sorts drugs brought by patients. Drugs brought by patients are drugs that were once prescribed to a patient at a medical institution (adopted drugs), and that the patient then brought to another medical institution for hospitalization or the like, and that the patient is currently taking.
[0377] In this embodiment, the patient is prescribed medication to be taken over multiple days, with multiple dose times scheduled each day. The type of medication taken at the same time each day is assumed to be the same. One specific day among the multiple dose days is referred to as the "prescribed dose day." The prescribed dose day is, for example, the start date of medication, but it may be any other specific day.
[0378] (An example of a first storage compartment that is effective for sorting medications brought in by the customer) Figure 29 shows an example of the first storage section 11A. Unlike the first storage section 11 shown in Figure 2, the first storage section 11A shown in Figure 29 has an internal structure that enables the drug sorting device 1 to efficiently sort the medications brought in by the user. The first storage section 11A can be effectively used primarily for sorting medications brought in by the user, but it may also be used for sorting returned medications.
[0379] In the example shown in Figure 29, the first storage section 11A has four storage sections 111 to 114 with approximately the same volume. Each of the four storage sections 111 to 114 is further divided into four sections. Storage section 111 has three small storage sections 111a to 111c and one medium storage section 111d. Storage section 112 has three small storage sections 112a to 112c and one medium storage section 112d. Storage section 113 has three small storage sections 113a to 113c and one medium storage section 113d. Storage section 114 has three small storage sections 114a to 114c and one medium storage section 114d.
[0380] When storing patient-supplied medications in the first storage section 11A, the user classifies the medications into first-supplied medications and second-supplied medications. First-supplied medications are medications prescribed to a patient PA by a medical institution for administration at multiple times on a designated administration day (designated administration period), and which are subsequently brought to a different medical institution. Second-supplied medications are medications prescribed to a patient PA by a medical institution, and which are subsequently brought to a different medical institution, excluding the first-supplied medications. In the storage section 111, each of the small storage sections 111a to 111c functions to store the patient PA's first-supplied medications. The medium storage section 111d functions to store the patient PA's second-supplied medications. For example, if the patient-supplied medications are prescribed to be taken three times each day, the three doses to be taken on the first day become the first-supplied medications, and the medications to be taken from the second day onward become the second-supplied medications.
[0381] Since the number of first-supplied medications stored in the small storage sections 111a to 111c is less than or equal to the number of second-supplied medications stored in the medium storage section 111d, the volume of the small storage sections 111a to 111c is smaller than the volume of the medium storage section 111d. Considering the number and volume of the small and medium storage sections, in the example shown in Figure 29, the small storage sections 111a to 111c are arranged circumferentially in the outer region of the storage section 111, and the medium storage section 111d is arranged in the remaining region (inner region) of the storage section 111. Storage sections 112 to 114 have the same function and configuration as storage section 111.
[0382] Each of the storage compartments 111 to 114 may, for example, contain the first and second medications brought by different patients PA to PD. In this case, the first storage compartment 11A can contain medications for up to four people at a time. However, in this case, the medications brought by patients PA to PD whose medication administration times on a prescribed day are set to three or fewer times (e.g., at least one of the following: morning, noon, and evening) will be stored in each of the storage compartments 111 to 114. If a patient's medication administration times on a prescribed day are set to four or more times, two or more storage compartments from storage compartments 111 to 114 will be used to store the medications brought by that patient. For the second medication, at least one of the two or more storage compartments may be used. If the above medication administration times are set to four or more times, the first storage compartment 11A can contain medications for up to three people at a time.
[0383] For example, if a patient's prescribed medication schedule is set to take medication 4 to 6 times a day, two storage compartments (e.g., compartments 111 and 112) are used to store the patient's medication. For example, if the patient's prescribed medication schedule is set to take medication 6 times a day, small storage compartments 111a to 111c and 112a to 112c are used to store the first medication. On the other hand, medium storage compartments 111d and / or 112d are used to store the second medication.
[0384] Furthermore, indicators 111e to 114e are provided in each of the storage compartments 111 to 114. Indicators 111e to 114e function as markers to identify each of the storage compartments 111 to 114. Indicators 111e to 114e have different colors from each other. Specifically, indicators 111e to 114e may be areas assigned to each respective color. For example, indicator 111e may be red, indicator 112e blue, indicator 113e yellow, and indicator 114e green, but this is not limited to these. Also, indicators 111e to 114e do not necessarily have to have different colors from each other as long as they are distinguishable from each other; for example, they may have different shapes or patterns from each other.
[0385] Indicator 111e is placed at two locations at the boundary between the small storage sections 111a-111c and the medium storage section 111d. Indicator 112e is placed at two locations at the boundary between the small storage sections 112a-112c and the medium storage section 112d. Indicator 113e is placed at two locations at the boundary between the small storage sections 113a-113c and the medium storage section 113d. Indicator 114e is placed at two locations at the boundary between the small storage sections 114a-114c and the medium storage section 114d. However, the positions of indicators 111e-114e are not limited to the above examples, as long as there is no inconvenience in identifying the storage sections 111-114.
[0386] (Example of sorting and processing of medications brought in by the customer) In the drug sorting device 1 of this embodiment, it is possible to set a normal sorting mode (returned drug sorting mode) for automatically sorting returned drugs and a drug-brought drug sorting mode for automatically sorting drugs brought in by customers.
[0387] The processing and operation of the drug sorting device 1 when set to normal sorting mode are as described above. That is, in normal sorting mode, the drug sorting device 1 takes out one by one of the multiple types of drugs stored in the first storage unit 11A and determines the type of drug based on the image of the taken drug. Based on the determination result, the drug sorting device 1 transports the drug to either the second storage unit 14, the standby tray 15, or the recovery tray 16. In normal sorting mode, the user may store the drugs to be sorted in any small storage unit and / or medium storage unit.
[0388] When set to the medication sorting mode, the user sorts the first and second medications and stores them in the small and / or medium storage compartments, as described above. The control unit 60a sorts the first medication before the second medication. At this time, the order in which the medications are taken out from the storage compartments 111 to 114 and the order in which the medications are placed in the sorting cup 141 may be set in advance. The order in which the medications are taken out from the storage compartments 111 to 114 is set to, for example, storage compartments 111, 112, 113, and 114. The order in which the medications are placed in the sorting cup 141 is set to, for example, if the sorting cup 141 is arranged with rows 1 to 7 and columns A to F, then columns A to F of the first row, then columns A to F of the second row, and so on. For example, consider a case where patient PA has five types of medications brought by the patient, stored in storage unit 111, and patient PB has five types of medications brought by the patient, stored in storage unit 112. In this case, the control unit 60a places patient PA's medications into sorting cups 141 located in columns A to E of the first row, and then places patient PB's medications into column F of the first row and columns A to D of the second row. In other words, the control unit 60a places the medications brought by the patient into the sorting cups 141 in a predetermined order, for each patient and for each type of medication.
[0389] Furthermore, the discrimination unit 64 in the drug sorting device 1 of this embodiment has the function of determining reference data for determining the type of the second drug brought by the patient, for example, by one of the following two methods. The discrimination unit 64 stores the determined reference data in the storage unit 80.
[0390] (Method 1) The discrimination unit 64 determines reference data that represents information based on at least one feature of the first medication (e.g., size, shape, or representative color as described above) extracted from an image of the first medication brought by the patient. The discrimination unit 64 determines, for example, as reference data multiple features managed as drug data for the first medication, obtained by matching at least one feature of the first medication with the drug database by the matching unit 64b. In this case, the matching unit 64b can use the multiple features of the first medication as the comparison target for at least one feature of the second medication brought by the patient.
[0391] (Method 2) The discrimination unit 64 determines at least one characteristic of the first medication brought by the patient as reference data. For example, the discrimination unit 64 determines the size, shape, and representative color of the first medication brought by the patient as reference data.
[0392] After sorting the first medication brought by the patient is complete, the control unit 60a sorts the second medication brought by the patient. At this time, the control unit 60a only needs to sort the second medication based on the characteristics of the first medication brought by the patient using reference data. Therefore, even if the type of the first medication brought by the patient is not accurately identified or narrowed down, it is sufficient if the first and second medications, which are considered to be of the same type, are placed in the same sorting cup 141. In method 1 above, the type of the first medication brought by the patient can be accurately identified or narrowed down by comparing the characteristics of the first medication brought by the patient with the drug database, but since the number of drug data managed in the drug database is enormous, it takes time. In method 2 above, the discrimination unit 64 determines the characteristics of the first medication brought by the patient as reference data, which shortens the processing time of the discrimination unit 64 (reference data creation time).
[0393] The matching unit 64b, when multiple first-supplied medications are contained in the same small storage compartment, compares the reference data of each first-supplied medication to determine whether the reference data can be considered identical. The matching unit 64b may consider the reference data to be identical if the degree of agreement of at least one feature of the two first-supplied medications being compared is equal to or greater than a predetermined value. The number of features for which the degree of agreement is determined to be equal to or greater than a predetermined value, and the predetermined value, may be set by experimentation or other means. The matching unit 64b may also perform a similar process when comparing at least one feature of a second-supplied medication with its reference data.
[0394] Furthermore, the matching unit 64b functions as a first matching unit that matches at least one feature of the second medication, extracted from an image of the second medication, with reference data determined by the discrimination unit 64. The matching unit 64b does not match the features of the second medication with the drug database, at least for the second medication. Also, the reference data is stored in the storage unit 80 only for the number of first medications. Therefore, the matching time can be shortened compared to when the features of the second medication are matched with all drug data managed in the drug database. In addition, the matching time can be further shortened by narrowing down the features of the first medication included in the reference data (e.g., size, shape, and representative color of the first medication).
[0395] Furthermore, when the discrimination unit 64 determines reference data using method 1 above, the comparison unit 64b functions as a second comparison unit that narrows down the type of first medication by comparing at least one characteristic of the first medication with the drug database. In this case, the comparison unit 64b can accurately identify or narrow down the type of the first medication, and consequently, it can accurately identify or narrow down the type of the second medication.
[0396] Although the verification unit 64b is described as having the functions of both the first verification unit and the second verification unit, the control unit 60a may have the first verification unit and the second verification unit as separate functions.
[0397] (Screen description) Figure 30 shows an example of an initial image (initial screen) that can display the drug sorting results. In the normal state, the display control unit 67 displays the initial image on the display unit 32. The initial image shown in Figure 30 includes a button B11 for displaying a menu related to the operation of the drug sorting device 1. When the user operates button B11, the display control unit 67 displays a menu that includes a button B12 for displaying a submenu for switching the sorting mode of the drug sorting device 1. When the user operates button B12, the display control unit 67 displays a submenu that includes a button B13 for setting the sorting mode to normal sorting mode and a button B14 for setting the sorting mode to the self-administered drug sorting mode. When the user operates button B14, the control unit 60a sets the sorting mode to the self-administered drug sorting mode.
[0398] Figure 31 shows an example of a setting image (setting screen) used by the user to set how to store the patient's medications in the first storage unit 11A when the system is set to the medication sorting mode. The display control unit 67 changes the image displayed on the display unit 32 from the initial image to the setting image when the control unit 60a sets the sorting mode to the medication sorting mode. The setting image shown in Figure 31 includes an input area PIR that accepts patient information input. The user enters patient information such as patient name, gender, age, and medical department in the input area PIR. The control unit 60a stores the entered patient information in the storage unit 80.
[0399] The configuration image shown in Figure 31 further includes a button B21 for selecting a storage compartment to hold the user's medication. Button B21 includes areas corresponding to the respective colors of indicators 111e to 114e. By operating button B21, the user can select a storage compartment having an indicator corresponding to the color of the operated area as the storage compartment for their medication.
[0400] The setting image shown in Figure 31 further includes a button B22 for selecting another storage compartment to store the patient's medication. As described above, if a patient's medication schedule is set to four or more times on a given day, two or more storage compartments from compartments 111 to 114 will be used to store the patient's medication. By operating button B22, the user can select a storage compartment with an indicator corresponding to the color of the operated area as the second storage compartment for the patient's medication.
[0401] Button B22, like button B21, includes areas corresponding to the respective colors of indicators 111e to 114e, as well as an area for clearing the selection of the storage compartment. If a second storage compartment is not required, the user can simply operate the area of button B22 that clears the storage compartment for the patient's own medication.
[0402] In the following explanation, we will assume that the housing section 111 is selected by button B21 and the housing section 112 is selected by button B22.
[0403] The setting image shown in Figure 31 further includes buttons B3 corresponding to each of the small storage compartments 111a-111c and 112a-112c. Buttons B3 are for the user to set the usage of the medication to be stored in each of the small storage compartments 111a-111c and 112a-112c. When any of the buttons B3 are operated, the display control unit 67 displays a submenu (not shown) for selecting the usage of the medication to be stored in the small storage compartment corresponding to that button B3. In the submenu, the user can select usages such as "morning," "noon," "evening," "every day," "upon waking," "before going to bed," "before meals," "between meals," "after meals," "immediately before meals," and "immediately after meals." If there is no suitable usage in the submenu (for example, "when in pain"), the user can also directly input the usage as text. However, the control unit 60a may not display the submenu and may accept text input for all usages.
[0404] The setting image shown in Figure 31 further includes image IA representing housing unit 111 and image IB representing housing unit 112. In other words, the display control unit 67 includes images IA and IB corresponding to the housing units 111 and 112, respectively, selected by the user operating buttons B21 and B22, in the setting image. Image IA includes image IAe corresponding to indicator 111e. Image IB includes image IBe corresponding to indicator 112e. By referring to images IAe and IBe, the user can confirm that the selected housing units are housing units 111 and 112.
[0405] Image IA includes images IAa to IAd corresponding to the small storage sections 111a to 111c and the medium storage section 111d of the storage section 111, respectively. Image IA further includes image IAf showing the usage of the medication to be stored in each of the small storage sections 111a to 111c. Similarly, image IB includes images IBA to IBd corresponding to the small storage sections 112a to 112c and the medium storage section 112d of the storage section 112, respectively. Image IB further includes image IBf showing the usage of the medication to be stored in each of the small storage sections 112a to 112c.
[0406] The display control unit 67 reflects the usage instructions for the medications to be stored in the small storage compartments 111a-111c and 112a-112c, respectively, which the user has selected by operating button B3, in images IAf and IBf. The user refers to images IAf and IBf and places the first medication into the small storage compartments 111a-111c and 112a-112c. The user also places the second medication into the medium storage compartments 111d and 112d.
[0407] The settings image shown in Figure 31 further includes a button B41 for adding patient information, etc., for patients who have brought their own medication. By operating button B41, a tab for displaying a settings image for setting the patient information, etc., for a new patient is added next to button B41. By selecting a tab, the user can register patient information for each patient and set which storage compartment to put the medication brought by that patient in, and which sub-storage compartment to put which dosage of the first medication brought by that patient in.
[0408] The configuration image shown in Figure 31 further includes a button B42 for deleting patient information, etc. When sorting of a patient's medications is no longer needed, the user deletes the patient's information, etc. by operating button B42. When the control unit 60a receives a user's operation of button B42, it deletes the corresponding patient's information, etc. from the storage unit 80.
[0409] The configuration image shown in Figure 31 further includes button B5 for initiating the sorting of the patient's medications. After the patient has finished loading the medications into the first storage unit 11A, they operate button B5 to start the medication sorting process in the drug sorting device 1. Note that, as shown in Figure 30, button B5 is also included in the initial image.
[0410] On the other hand, when the user operates button B13 in the setting image shown in Figure 30, the control unit 60a sets the sorting mode to normal sorting mode. As described above, in normal sorting mode, the first and second medications brought by the patient are not classified for each patient, and the medications brought by the patient or returned medications may be placed in any small and / or medium storage compartment. In this case, the display control unit 67 does not change the image displayed on the display unit 32 from the initial image to the setting image. After the user places the medications to be sorted into the first storage compartment 11, the user operates button B5, which is included in the initial image. When button B5 is operated, the control unit 60a starts sorting.
[0411] Figure 32 is a diagram showing an example of a sorting image for displaying the sorting status of medications brought by the user when the system is set to the medication sorting mode. After the sorting of medications by the control unit 60a is started, the display control unit 67 changes the image displayed on the display unit 32 from the initial image to the sorting image. The display control unit 67 updates the sorting image in accordance with the progress of the sorting of medications by the control unit 60a. The sorting image shown in Figure 32 includes an image IC that shows the sorting status of the medications brought by the user. The image IC includes an image that shows the number of medications brought by the user stored in each area corresponding to the sorting cup 141 of the second storage unit 14.
[0412] The display control unit 67 matches the color of the area corresponding to the sorting cup 141 to the color of the indicator in the storage unit where the medication sorted into the sorting cup 141 was stored. In the example shown in Figure 32, the display control unit 67 matches the colors of columns A to D in the first row to the indicator 111e of the storage unit 111. The display control unit 67 also matches the colors of columns E and F in the first row to the indicator 112e of the storage unit 112. The display control unit 67 also matches the colors of columns C to E in the second row to the indicator 113e of the storage unit 113. The display control unit 67 also matches column F in the second row and column A in the third row to the indicator 114e of the storage unit 114.
[0413] Furthermore, the image IC includes an image for each sorting cup 141 in the second storage section 14 indicating whether or not a visual inspection of the medications stored inside has been completed. In the example shown in Figure 32, the visual inspection has not been completed for any of the sorting cups 141. Therefore, the display control unit 67 displays the string "Visual Inspection Not Completed" in the area corresponding to each sorting cup 141.
[0414] The image IC includes an image indicating the type of medication contained in each sorting cup 141 of the second storage unit 14, if the type of medication contained can be determined at the time of sorting. In the example shown in Figure 32, the display control unit 67 indicates the type with multiple "*" symbols below the string "Not Visually Inspected" mentioned above in columns A and C of the first row, column E of the second row, and column A of the third row. The image IC also includes an image indicating that the type of medication contained in each sorting cup 141 of the second storage unit 14 is in a provisional sorting state, if the type of medication contained in that sorting cup 141 could not be determined at the time of sorting. In the example shown in Figure 32, the display control unit 67 displays "Provisional Sorting" instead of the string indicating the type in the area corresponding to the sorting cup 141 containing the medication of unknown type. The type of medication in the provisional sorting state can be determined by visual inspection by the user and entered into the drug sorting device 1.
[0415] The sorting image shown in Figure 32 further includes a button B6 for initiating the packaging of the sorted medications brought by the user. After the sorting and visual inspection of the medications brought by the user is complete, the user operates button B6 to start the medication sorting device 1 from packaging the medications. When the user operates button B6, the print output control unit 69 controls the print output unit 4 to print a journal representing the medication data for the medications to be packaged. The packaging control unit 71 also controls the packaging mechanism 6 to package the medications sorted into each sorting cup 141.
[0416] As described above, in the drug sorting device 1, the display control unit 67 can easily identify the storage unit into which the patient's medication should be placed by referring to the image displayed on the display unit 32. Therefore, the possibility of placing medication into the wrong storage unit can be reduced. Furthermore, by sorting and packaging medications using the drug sorting device 1, labor costs can be reduced and economic productivity can be improved. This contributes to achieving the Sustainable Development Goals (SDGs).
[0417] [Examples of implementation using software] The drug sorting device 1, the information processing device 200, and the data management device 500 are equipped with a computer that executes instructions for a program, which is software that realizes each function. This computer is equipped with, for example, one or more processors and a computer-readable recording medium that stores the program. The object of the present invention is achieved when the processor reads the program from the recording medium and executes it in the computer. As the processor, for example, a CPU (Central Processing Unit) can be used. As the recording medium, a "tangible medium that is not temporary," such as ROM (Read Only Memory), can be used, as well as tape, disk, card, semiconductor memory, programmable logic circuit, etc. It may also be further equipped with RAM (Random Access Memory) for deploying the program. Furthermore, the program may be supplied to the computer via any transmission medium capable of transmitting the program (such as a communication network or broadcast wave). In one aspect of the present invention, the program can also be realized in the form of a data signal embedded in a carrier wave, which is embodied by electronic transmission.
[0418] [Additional Notes] The present invention is not limited to the embodiments described above, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present invention.
[0419] Furthermore, one aspect of the present invention can also be described as follows.
[0420] A type discrimination device according to one aspect of the present invention is a type discrimination device that discriminates the type of a target drug from an image of the target drug, comprising: a feature extraction unit that extracts first feature information indicating the external appearance characteristics of the target drug, which is reflection region information indicating the reflection region of light irradiated onto the target drug, from the image; a discrimination unit that compares second feature information indicating the external appearance characteristics of the reference drug, which is reflection region information indicating the reflection region of light irradiated onto a reference drug, with the first feature information, and determines that the type of the target drug is a coated tablet based on the result of the comparison, wherein the reflection region is a region located inside the outer edge of the target drug included in the image.
[0421] In one aspect of the present invention, the type discrimination device may have the discrimination unit compare the shape of the reflective region indicated by the reflective region information included in the first feature information with the shape of the reflective region indicated by the reflective region information included in the second feature information.
[0422] In one aspect of the present invention, the type discrimination device is such that the reflective region is an image region in the captured image having a saturation value higher than a predetermined value, and when the target drug is a coated tablet, it may be an annular region formed on the surface of the coated tablet.
[0423] Furthermore, a type discrimination device according to one aspect of the present invention is a type discrimination device that discriminates the type of a target drug from an image of the target drug, comprising: a discrimination unit that compares a fifth feature information indicating the appearance characteristics of the target drug, which includes target color information indicating the color of the target drug extracted from the image, with a sixth feature information including reference color information indicating the color of a reference drug, and discriminates the type of the target drug based on the result of the comparison; and an update unit that, when the discrimination unit fails to discriminate the type of the target drug, receives an operation from a user to specify the type of the target drug that failed to discriminate, and then updates the reference color information of the reference drug corresponding to the type of target drug specified by the user using the target color information of the target drug that failed to discriminate.
[0424] A type determination device according to one aspect of the present invention includes a feature extraction unit that extracts third feature information indicating the appearance characteristics of the target drug from the captured image, which includes at least reflection information indicating whether or not light irradiated onto the target drug is reflected by the target drug. The determination unit may compare the third feature information with fourth feature information indicating the appearance characteristics of the reference drug, which includes at least reflection information indicating whether or not light irradiated onto the reference drug is reflected by the reference drug, and determine the type of the target drug based on the result of the comparison. [Explanation of symbols]
[0425] 1. Chemical sorting device 11. First Detention Unit 13. Imaging Unit (Imaging Section) 14. Second Detention Unit 15. Standby tray (temporary storage area) 60. Computer (Type Identification Device) 62. Sorting Control Unit (Sorting Determination Unit) 64a Feature extraction unit 64b Verification unit (discrimination unit) 65 Priority determination section 73 Image Processing Unit 74. Drug Database Update Department (Update Department) 82 Acquired Images 200 Information Processing Devices 221 Acquisition unit (receiving unit) 222 Image generation unit (generation unit) 1000 Image Generation System
Claims
1. A type determination device that determines the type of target drug from an image captured of the target drug, An image processing unit generates at least one cropped image from an image image including the target drug, obtained by cutting out a first region which is the region of the image of the target drug and a second region which is the region of the image of the platform on which the target drug is placed, including the first region, in order to generate an image of a reference drug for determining the type of the target drug. A type discrimination device equipped with the following features.
2. The type determination device according to claim 1, wherein the image processing unit generates a compressed image obtained by compressing the captured image, and region information indicating the first region or the second region in the captured image.
3. An information processing device that can communicate with the type discrimination device described in claim 2 and generates an image of the reference drug, A receiving unit that receives the cropped image, the compressed image, and the region information from the type determination device, An information processing apparatus comprising: a generation unit that generates an image of the reference drug by superimposing the cropped image onto the compressed image based on the region information.
4. An image generation system comprising: (1) a type determination device that determines the type of target drug from an image of the target drug; and (2) an information processing device that can communicate with the type determination device and generates an image of a reference drug for determining the type of the target drug, The type discrimination device generates a cropped image by cutting out a first region, which is the region of the image of the target drug, or a second region, which is the region of the image of the platform on which the target drug is placed, including the first region, from the captured image including the image of the target drug. The information processing device is an image generation system that generates an image of the reference drug based on the cropped image generated by the type discrimination device.
5. The type determination device according to claim 1, wherein the image processing unit generates at least one of region information indicating a first region and region information indicating a second region in the captured image.
6. An information processing device that can communicate with the type discrimination device described in claim 5 and generates an image of the reference drug, A receiving unit that receives the cropped image and the region information from the type determination device, An information processing apparatus comprising a generation unit that generates an image of the reference drug based on the cropped image and the region information.
7. An image generation system comprising: (1) a type determination device that determines the type of target drug from an image of the target drug; and (2) an information processing device that can communicate with the type determination device and generates an image of a reference drug for determining the type of the target drug, The type discrimination device generates at least one cropped image from an image image including the image of the target drug, which is obtained by cropping a first region which is the region of the image of the target drug and a second region which is the region of the image of the platform on which the target drug is placed, including the first region. The information processing device is an image generation system that generates an image of the reference drug based on the cropped image generated by the type discrimination device.
Citation Information
Patent Citations
Drug assortment device and drug assortment method
WO2015170761A1