Medicine discriminating device

By adjusting photography timing and speed in response to tray position changes, the device improves drug discrimination accuracy by reducing image blurring from vibrations.

JP2026000771APending Publication Date: 2026-01-06OKI ELECTRIC INDUSTRY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024098291
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2026-01-06

AI Technical Summary

Technical Problem

Drug discrimination devices face reduced accuracy due to tray vibration during image capture, causing shifted positions of medicines and blurred photographs.

Method used

The device includes a tray that is moved and positioned relative to cameras, with a control unit adjusting photography timing and speed based on detected position changes to ensure clear images.

Benefits of technology

This approach enhances drug discrimination accuracy by minimizing image blurring from tray vibrations, allowing precise identification of medicines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026000771000001_ABST
    Figure 2026000771000001_ABST
Patent Text Reader

Abstract

To more accurately discriminate medicines.SOLUTION: An image of the medicine placed on the tray is captured by the camera after a lapse of a first time which is a pre-imaging waiting time after the tray is moved to the first position, and in a case where the detection unit detects a change in the position of the medicine in the image, the pre-imaging waiting time from the completion of the movement of the tray to the start of imaging by the camera is changed to a second time longer than the first time, and an image is captured again at the first position.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a drug discrimination device. [Background technology]

[0002] Conventionally, there have been drug discrimination devices that discriminate drugs based on images obtained by photographing drugs such as tablets and capsules. In this type of drug discrimination device, for example, features such as drug identification information printed or engraved on the drug are extracted from images obtained by photographing drugs placed on a tray with a camera (i.e., images captured by a camera), and the extracted features are used to discriminate drugs (see, for example, Patent Document 1). Note that recording an image with a camera is called imaging, and the action of capturing an image with a camera is called photographing. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] WO2019 / 188281 publication Summary of the Invention [Problem to be solved by the invention]

[0004] Meanwhile, in a drug discrimination device, a single-dose drug package, in which multiple drugs to be taken at one time are packed in a transparent bag called a packet, is placed on a tray, so that multiple drugs packed in the packet can be discriminated all at once. When discriminating single-dose drugs, the drug discrimination device sometimes uses a method of moving the tray to multiple positions, taking images at each of the multiple positions, and discriminating the drugs based on the obtained images in order to improve the accuracy of drug discrimination.

[0005] However, with the above-mentioned method, the tray is moved before photographing at each position, and therefore photographs may be taken with the position of the medicine shifted due to vibration of the tray, which reduces the accuracy of drug identification.

[0006] The present invention has been made in consideration of the above points, and aims to propose a drug discrimination device that can more accurately discriminate drugs. [Means for solving the problem]

[0007] In order to solve this problem, the drug discrimination device of the present invention comprises a tray on which drugs are placed, a camera that photographs the tray from at least one of above and below, a drive unit that moves the position of the tray while it is stored in the device housing and determines the position of the tray relative to the camera, a control unit that controls the camera's photography and the drive unit's movement of the tray, a detection unit that detects changes in the position of the drug in the image captured by the camera, and a drug discrimination unit that distinguishes the drugs using the image captured by the camera, wherein the control unit captures an image a first time period, which is a pre-photography waiting time, after the tray is moved to a first position, and if the detection unit detects a change in the position of the drug in the image, changes the pre-photography waiting time from when the tray has been moved to a first position until the camera starts photographing to a second time period longer than the first time period, and then captures an image again at the first position.

[0008] Furthermore, the drug discrimination device of the present invention includes a tray on which drugs are placed, a camera that photographs the tray from at least one of above and below, a drive unit that moves the position of the tray while the tray is stored in the device housing and determines the position of the tray relative to the camera, a control unit that controls the photography by the camera and the movement of the tray by the drive unit, a detection unit that detects fluctuations in the position of the drug in the image captured by the camera, and a drug discrimination unit that distinguishes drugs using the image captured by the camera, wherein the control unit moves the tray to a first position at a first speed and then captures an image, and if the detection unit detects fluctuations in the position of the drug in the image, changes the movement speed of the tray to a second speed slower than the first speed and captures an image again at the first position.

[0009] This allows drugs to be identified using images captured in a state where the position of the drug is unlikely to change. [Effects of the Invention]

[0010] Thus, the present invention can realize a drug discrimination device that can more accurately discriminate drugs. [Brief explanation of the drawings]

[0011] [Figure 1] 1 is a diagram showing the overall configuration of a brought-medicine discrimination system according to a first embodiment. [Figure 2] 1 is a perspective view showing the appearance of an imaging device according to a first embodiment. [Figure 3] 1 is a partial cross-sectional view showing the configuration of an imaging mechanism provided inside an imaging device according to a first embodiment. [Figure 4] 1 is a block diagram showing a system configuration of a brought-medicine discrimination system according to a first embodiment. [Figure 5] FIG. 2 is a side view showing a photographing position of the tray according to the first embodiment. [Figure 6] FIG. 2 is a diagram used to explain a shake detection method according to the first embodiment. [Figure 7] 4 is a flowchart showing the procedure of a photographing operation according to the first embodiment. [Figure 8] 10A and 10B are diagrams used to explain a method for detecting positional deviation according to a second embodiment. [Figure 9] 10 is a flowchart showing the procedure of a photographing operation according to a second embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0012] Hereinafter, modes for carrying out the invention (hereinafter referred to as embodiments) will be described in detail with reference to the drawings.

[0013] 1. First Embodiment [1-1. Overall configuration of the system for identifying medicines brought in by customers] First, the overall configuration of a brought-medicine discrimination system 1 according to the first embodiment will be briefly described using Figure 1. This brought-medicine discrimination system 1 is installed in medical institutions such as hospitals and pharmacies to discriminate medicines brought by patients (hereinafter referred to as "brought-medicines"), and functions as a brought-medicine discrimination device as a whole. This brought-medicine discrimination system 1 is composed of a control device 2 and an imaging device 3 connected by an interface such as a USB.

[0014] The control device 2 is a computer that controls the entire brought-medicine identification system 1, and has a main body 20, a display 21 connected to the main body 20, and an operation unit 22. The display 21 is a liquid crystal display or the like, and the operation unit 22 is a keyboard, a mouse, or the like.

[0015] The photographing device 3 is a device for photographing medications brought with the patient, and has a box-shaped device housing 30. Figures 2(A) and (B) show perspective views of the exterior of the photographing device 3 as seen from the front side of the device housing 30. Note that the direction from the front to the rear of the device housing 30 is referred to as the rear direction, the direction from the rear to the front is referred to as the front direction, the direction from the bottom to the top of the device housing 30 as the up direction, the direction from the top to the bottom of the device housing 30 as the down direction, the direction from the right to the left of the device housing 30 as the left direction, and the direction from the left to the right of the device housing 30 as the right direction.

[0016] 2(A) and 2(B), a tray ejection opening 31 is provided in the center in the vertical direction on the front surface of the device housing 30. Also, as shown in Fig. 2(B), the photographing device 3 can expose the tray 40 to the outside of the device housing 30 by ejecting the tray 40 forward from this tray ejection opening 31, and can store the tray 40 inside the device housing 30 by pulling the tray 40 ejected forward back. The tray ejection opening 31 is provided with a shutter 32 that opens when the tray is ejected and closes when the tray is stored.

[0017] The tray 40 has a tray 41 made of a transparent plate-like member (for example, a glass plate with high transmittance), and when the tray 40 is discharged from the tray discharge port 31, at least the tray 41 is exposed to the outside of the device housing 30 so that medicines can be placed on the tray 41. The configuration of the brought-medicine identification system 1 is as described above.

[0018] Here, we will briefly explain the general operation of the brought-medicine discrimination system 1. First, an operator such as a pharmacist operates the control device 2 to instruct the photographing device 3 to eject the tray 40, and the control device 2 instructs the photographing device 3 to eject the tray 40 in accordance with this instruction. The photographing device 3 ejects the tray 40 from the tray ejection port 31 in accordance with this instruction. Here, the operator places the medicine to be discriminated (i.e., the patient's brought-medicine) on the tray 40 exposed to the outside of the device housing 30.

[0019] Thereafter, when the operator operates the control device 2 to instruct discrimination of the medicines, the control device 2 instructs the photographing device 3 to photograph the medicines in accordance with this instruction. In accordance with this instruction, the photographing device 3 pulls the tray 40 back and stores it inside the device housing 30, and photographs the medicines on the tray 40 with a camera (not shown in Figures 1 and 2) inside the device housing 30. The image captured by the camera of the photographing device 3 in this way (i.e., the photographed image) is sent to the control device 2. The control device 2 distinguishes the medicines based on the characteristics of the medicines (shape, size, color, printed or engraved medicine identification information, etc.) shown in the image sent from the photographing device 3, and displays the discrimination result on the display unit 21. The general operation of the brought-medicine discrimination system 1 is as described above.

[0020] Furthermore, in the photographing device 3, a packaged drug, which is a drug packaged in a transparent bag called a packaging paper, is set (placed) directly on the tray 40, so that all the drugs contained in the packaged drug can be identified all at once without removing them from the packaging paper.

[0021] [1-2. Configuration of the imaging mechanism] Next, the configuration of the photographing mechanism 50 provided inside the photographing device 3 will be described with reference to Fig. 3. Fig. 3 is a diagram of the photographing mechanism 50 as seen from the front side of the device housing 30, and is a schematic diagram with some parts omitted or simplified. Fig. 3 is also a partial cross-sectional view in which the hatched parts are cross-sectional.

[0022] As shown in Figure 3, the photographing mechanism 50 has a tray 40 that can move back and forth, an upper camera 51, a lens 52 attached to the upper camera 51, a first upper light 53, and a second upper light 54, which are arranged above the tray 40 housed inside the device housing 30, and a lower camera 55, a lens 56 attached to the lower camera 55, a first lower light 57, and a second lower light 58, which are arranged below the tray 40.

[0023] Tray 40 is provided with a hole 40h that penetrates in the thickness direction and is rectangular when viewed from above and below, and a tray 41 made of a rectangular glass plate that is thinner than tray 40 is attached to cover this hole 40h. This tray 41 is attached so that its upper surface is one step lower than the upper surface of tray 40. As a result, the tray 40 has a recess in the area of ​​tray 41, and the packaged medicine placed on tray 41 fits into this recess, preventing the packaged medicine placed on tray 41 from falling off tray 41 when tray 40 is moved, etc.

[0024] The tray 40 is movable in the front-rear direction while the tray 41 is held horizontally. The tray 40 is movable in the front-rear direction between a position where it is retracted to the innermost position inside the imaging device 3 and the entire tray 40 is housed inside the device housing 30 (this position is referred to as the initial position), and a position where it is pulled out to the outermost position outside the device housing 30 and at least the tray 41 portion of the tray 40 is exposed to the outside of the imaging device 3 (this position is the ejection position) as shown in FIG. 2(B). The imaging mechanism 50 moves the tray 40, for example, to a predetermined imaging position forward of the initial position and where the entire tray 40 is housed inside the imaging device 3, and images the medicines placed on the tray 41. The tray 40 is incorporated into the imaging mechanism 50 as a tray unit 59, which is composed of the tray 40 and a drive unit (not shown) that moves the tray 40 in the front-rear direction. The portions of the tray 40 other than the tray 41 have non-transparent optical properties and are formed of, for example, a black material (i.e., an opaque member).

[0025] Above this tray 40, an upper second light 54 is positioned closest to the tray 40, above which an upper first light 53 is positioned, and above that an upper camera 51 is positioned with its lens 52 facing downward (i.e., toward the top surface of the tray 40).

[0026] Meanwhile, below the tray 40, a lower second light 58 is positioned closest to the tray 40, below which a lower first light 57 is positioned, and further below that a lower camera 55 is positioned with its lens 56 facing upward (i.e., toward the underside of the tray 40).

[0027] Upper camera 51 is a camera that photographs from above the medicines placed on transparent tray 41 of tray 40, and is fixed to an internal frame (not shown) inside device housing 30 with optical axis A1 extending from lens 52 oriented perpendicular to horizontal tray 41. Upper camera 51 is connected to control device 2 by, for example, USB cable 60, and performs photographing according to instructions from control device 2, and transmits the resulting images to control device 2.

[0028] Meanwhile, lower camera 55 is a camera that photographs the medicines placed on transparent tray 41 of tray 40 from below, and is fixed to an internal frame (not shown) inside device housing 30 with optical axis A2 extending from lens 56 oriented perpendicular to tray 41. Like upper camera 51, lower camera 55 is also connected to control device 2 by, for example, USB cable 61, and photographs according to instructions from control device 2, transmitting the resulting images to control device 2. Upper camera 51 and lower camera 55 are fixed so that their respective optical axes A1 and A2 coincide (overlap).

[0029] The vertical positions of the upper camera 51 and the lower camera 55 are adjusted via lenses 52 and 56, respectively, so that they are focused on the upper surface of the tray 41 (i.e., so that they are focused on the medicine placed on the upper surface of the tray 41).

[0030] The upper first illuminator 53 is a ring-shaped illuminator located outside the shooting range of the upper camera 51, and is fixed to an internal frame (not shown) inside the device housing 30. The upper first illuminator 53 is a flat illuminator that uses, for example, an LED as a light source, and is configured to irradiate light from above onto the receptacle 41 of the tray 40 in a vertical direction (i.e., a direction parallel to the optical axis A1 of the upper camera 51, as indicated by the arrow B1 in the drawing) during shooting.

[0031] The upper second illuminator 54 is a ring-shaped illuminator located outside the shooting range of the upper camera 51 and having an inner diameter larger than the outer diameter of the upper first illuminator 53, and is fixed to an internal frame (not shown) inside the device housing 30. The upper second illuminator 54 is a low-angle illuminator that uses, for example, an LED as a light source, and is configured to irradiate the receptacle 41 of the tray 40 with light in an oblique direction (the direction indicated by the arrow B2 in the figure) from above toward the optical axis A1 of the upper camera 51.

[0032] On the other hand, the lower first illuminator 57 is a ring-shaped illuminator located outside the shooting range of the lower camera 55, and is fixed to an internal frame (not shown) inside the device housing 30. This lower first illuminator 57 is also a flat illuminator that uses, for example, an LED as a light source, and is configured to irradiate light onto the receptacle 41 of the tray 40 from below in a vertical direction (i.e., in the direction indicated by the arrow B3 in the figure, which is a direction parallel to the optical axis A2 of the lower camera 55) during shooting.

[0033] The second lower illuminator 58 is a ring-shaped illuminator located outside the shooting range of the lower camera 55 and having an inner diameter larger than the outer diameter of the first lower illuminator 57, and is fixed to an internal frame (not shown) inside the device housing 30. The second lower illuminator 58 is a low-angle illuminator that uses, for example, an LED as a light source, and is configured to irradiate the receptacle 41 of the tray 40 with light in an oblique direction (the direction indicated by the arrow B4 in the figure) from below toward the optical axis A2 of the lower camera 55.

[0034] [1-3. System configuration of the medicine identification system] Next, the system configuration of the brought-medicine discrimination system 1 will be briefly described using the block diagram shown in Figure 4. The control device 2 has a control unit 100, a memory unit 101, a drug discrimination unit 102, a display unit 21, and an operation unit 22. On the other hand, the photographing device 3 has an upper camera 51, a lower camera 55, an illumination control unit 71, a first upper illumination unit 53, a second upper illumination unit 54, a first lower illumination unit 57, a second lower illumination unit 58, a tray control board 70, a motor 80, a first position sensor 81, and a second position sensor 82.

[0035] The control unit 100 of the control device 2 controls the entire brought-medicine discrimination system 1. The control unit 100 is composed of, for example, a CPU and a memory, and operates by loading a program read from the storage unit 101 into the memory and executing the program. Specifically, the control unit 100 starts the drug discrimination application by reading the drug discrimination application program from the storage unit 101 and executing the program. Then, in response to an operation by the operator on the operation unit 22, the control unit 100 causes the drug discrimination unit 102 to discriminate drugs and displays the discrimination results on the screen of the drug discrimination application.

[0036] The storage unit 101 stores various programs as well as patient data and a drug database Db in which drug data is accumulated. The patient data includes, as data for each patient, at least patient identification information for identifying the patient, detailed patient information indicating the patient's name, age, sex, symptoms, etc., and medication information indicating medications brought by the patient. The drug data stored in the drug database Db also includes, as data for each drug, at least the drug name, drug identification information for identifying the drug, detailed drug information indicating the ingredient name, efficacy, specifications, type (tablet or capsule), etc., drug images, and feature information indicating the drug's external appearance. As will be described in more detail below, the storage unit 101 also stores, as the drug database Db, a commercially available drug database used by pharmacies and the like in which commercially available drugs are registered, and a dedicated database created based on drug images captured by the image capture device 3 or a camera with equivalent functionality to the image capture device 3.

[0037] The drug distinguishing unit 102 distinguishes drugs using images of the drugs captured by the upper camera 51 and the lower camera 55 and the drug database Db stored in the storage unit 101, and outputs the distinction results to the control unit 100. Note that the control unit 100 may also have the function of the drug distinguishing unit 102.

[0038] The upper camera 51 and lower camera 55 of the image capturing device 3 are connected to the control unit 100 of the control device 2 via a predetermined interface such as USB and are controlled by the control unit 100. The first upper illuminator 53, the second upper illuminator 54, the first lower illuminator 57, and the second lower illuminator 58 of the image capturing device 3 are connected to the illumination control unit 71 and controlled by the illumination control unit 71. The illumination control unit 71 is connected to the control unit 100 of the control device 2 via a predetermined interface and operates according to instructions from the control unit 100. The motor 80, the first position sensor 81, and the second position sensor 82 of the image capturing device 3 are connected to the tray control board 70 and controlled by the tray control board 70. The tray control board 70 is connected to the control unit 100 of the control device 2 via a predetermined interface and operates according to instructions from the control unit 100. The tray control board 70 also acquires the position of the tray 40 based on, for example, the output of the first position sensor 81, the output of the second position sensor 82, and the pulse signal of the motor 80, and transmits this to the control unit 100. The system configuration of the brought-medicine identification system 1 is as described above.

[0039] [1-4. Identification of single-dose medicines] Next, we will explain how packaged medicines are distinguished by the brought-person medicine distinguishing system 1. When distinguishing packaged medicines with the brought-person medicine distinguishing system 1, the operator places the packaged medicine in a predetermined orientation on the top surface of the receptacle 41 of the tray 40 in the discharge position. After placing the packaged medicine on the tray 40 in this manner, the operator operates the operation unit 22 of the control device 2 to select the packaged medicine as the object of distinction and then instructs the start of distinction. The control unit 100 of the control device 2 then controls the imaging device 3 to photograph the medicine in the packaged medicine.

[0040] 5(A) to 5(E) show operational transition diagrams of the tray 40 when photographing the drugs Dg in the drug package 110. Note that FIGS. 5(A) to 5(E) are side views of the tray 40 as seen from the right side, and are diagrams in which parts of the tray 40 are omitted or simplified to make it easier to understand the positions of the drugs Dg in the drug package 110 set in the tray 40.

[0041] The photographing device 3 first moves the tray 40, on which the packaged medicines 110 are set, backward from the discharge position shown in Fig. 5(A) to the initial position shown in Fig. 5(B). Next, the photographing device 3 moves the tray 40 forward a predetermined amount from the initial position to the first photographing position shown in Fig. 5(C). When the tray 40 is in the first photographing position, the optical axes A1, A2 of the upper camera 51 and the lower camera 55 (not shown in Fig. 5) are positioned near the center of the tray 41 in the front-to-rear direction.

[0042] After the tray 40 is moved to the first photographing position, the photographing device 3 photographs the packaged medicines 110 set on the tray 40 with the upper camera 51 and the lower camera 55. Here, six stages of exposure time from the first exposure time to the sixth exposure time are set as one of the photographing conditions in the photographing device 3. The first exposure time is the shortest exposure time (for example, 5 [ms]), and the sixth exposure time is the longest exposure time (for example, 50 [ms]).

[0043] For this reason, after moving the tray 40 to the first photographing position, the photographing device 3 sets the exposure time to the first exposure time and photographs with the upper camera 51, then sets the exposure time to the second exposure time and photographs with the upper camera 51, and so on, photographing with the upper camera 51 while switching the exposure time in order from the first exposure time to the sixth exposure time. Thereafter, the photographing device 3 photographs with the lower camera 55 while switching the exposure time in order from the first exposure time to the sixth exposure time.

[0044] Next, the photographing device 3 moves the tray 40 forward a predetermined amount from the first photographing position to the second photographing position shown in Fig. 5(D). When the tray 40 is in the second photographing position, the optical axes A1, A2 of the upper camera 51 and the lower camera 55 (not shown in Fig. 5) are positioned at the rear of the tray 40. After the tray 40 has been moved to the second photographing position, the photographing device 3 photographs the packaged medicines 110 set on the tray 40 while switching the exposure time between the upper camera 51 and the lower camera 55, just as in the first photographing position.

[0045] Next, the photographing device 3 moves the tray 40 forward a predetermined amount from the second photographing position to the third photographing position shown in Fig. 5(E). When the tray 40 is in the third photographing position, the optical axes A1, A2 of the upper camera 51 and the lower camera 55 (not shown in Fig. 5) are located behind the tray 40. After the tray 40 has been moved to the third photographing position, the photographing device 3 photographs the packaged medicines 110 set on the tray 40 while switching the exposure time between the upper camera 51 and the lower camera 55, as in the first photographing position.

[0046] In this way, when photographing the packaged medicine 110, the photographing device 3 photographs the tray 40 while moving it in sequence from the first photographing position to the second photographing position and the third photographing position, and sequentially transmits the images obtained for each photographing (i.e., the photographed images) to the control device 2. Note that the first photographing position, second photographing position and third photographing position shown in Fig. 5 are examples, and these positions may be set to positions different from those shown in Fig. 5.

[0047] The control unit 100 of the control device 2 stores the images sent from the photographing device 3 in the memory unit 101, and based on the images stored in the memory unit 101, the drug discrimination unit 102 discriminates the drugs Dg in the packaged drug 110.

[0048] For example, the drug distinguishing unit 102 performs HDR (High Dynamic Range) compositing of multiple images captured with different exposure times by the upper camera 51 at the first photographing position, and also performs HDR compositing of multiple images captured with different exposure times by the lower camera 55. Similarly, at each of the second photographing position and the third photographing position, the drug distinguishing unit 102 performs HDR compositing of multiple images captured by the upper camera 51, and also performs HDR compositing of multiple images captured by the lower camera 55. The drug distinguishing unit 102 then distinguishes the drug Dg in the packaged drug 110 based on the images after HDR compositing. Note that this algorithm for distinguishing drugs is merely an example, and other algorithms may be used.

[0049] As described above, the photographing device 3 sequentially moves the tray 40 from the first photographing position to the second photographing position and the third photographing position, photographing the tray 40 at each photographing position (i.e., photographing the images with the upper camera 51 and the lower camera 55). As described above, the photographing device 3 moves the tray 40 before photographing at each photographing position, and therefore, photographing may be performed in a state in which the tray 40 vibrates and the position of the medicine has changed. In this case, the images photographed by the upper camera 51 or the lower camera 55 are blurred due to the change in the position of the medicine, and the discrimination accuracy decreases.

[0050] Therefore, in the present embodiment of the brought-medicine identification system 1, when blurring of the image of the medicine is detected in the image captured by the upper camera 51 or the lower camera 55, the movement speed of the tray 40 is changed from the specified speed to a slower speed, and the time from when the movement of the tray 40 is completed to when image capture begins is extended, and then image capture is performed again, so that the position of the medicine is less likely to fluctuate.

[0051] [1-5. Blur detection] Here, a method for detecting blur of a drug image from images captured by the upper camera 51 and the lower camera 55 will be described. The detection of blur is performed, for example, by the drug distinguishing unit 102. The drug distinguishing unit 102 detects blur using an image captured with the sixth exposure time, which is the longest exposure time, among images captured at the first imaging position. The reason for using the image captured with the sixth exposure time to detect blur is that blur is more likely to occur when the exposure time is long.

[0052] 6(A) shows an image of the drug Dg (i.e., one of the drugs Dg contained in the packaged drug 110) captured at the sixth exposure time. If the position of the drug Dg fluctuates during imaging, the captured image of the drug Dg will be blurred, causing a blur Br to appear around the drug Dg.

[0053] Here, the change in brightness obtained from the dotted line portion of the image of the drug Dg shown in Figure 6(A) is shown in the graph of Figure 6(B). Note that the dotted line portion shown in Figure 6(A) may be any dotted line portion that passes through the center of the image of the drug Dg and crosses the drug Dg. Figure 6(B) is also a graph with brightness on the vertical axis and pixel position on the horizontal axis.

[0054] As shown in the graph in Figure 6(B), the brightness obtained from the image of the drug Dg is roughly constant in the area inside the drug Dg, while in the blurred area Br located outside the drug Dg, it changes to become lower as it moves away from the outer periphery of the drug Dg.

[0055] Here, the greater the blur in the image of the drug Dg, the wider the range of blur Br, and therefore, in the graph of Fig. 6(B), the greater the blur, the gentler the gradient (inclination) of the brightness in the range of blur Br. Therefore, the drug distinguishing unit 102 determines whether or not the image of the drug Dg is blurred based on the gradient of the brightness in the range of blur Br.

[0056] Specifically, the drug distinguishing unit 102 calculates the average brightness of the portion of the drug Dg where the brightness is equal to or greater than a predetermined value, for example, in the graph of FIG. 6(B). Next, the angle θ1 between a line segment L1 connecting one end point P1 of the portion where the brightness is equal to or greater than the average value to a point P2 where the brightness is minimum in the range of blur Br located on one end of the drug Dg and a line segment L2 parallel to the height direction of the brightness is calculated. Similarly, the angle θ2 between a line segment L3 connecting the other end point P3 of the portion where the brightness is equal to or greater than the average value to a point P4 where the brightness is minimum in the range of blur Br located on the other end of the drug Dg and a line segment L4 parallel to the height direction of the brightness is calculated.

[0057] The drug distinguishing unit 102 then determines that the image of the drug Dg is blurred if at least one of the two calculated angles θ1 and θ2 is 45 degrees or greater. The drug distinguishing unit 102 determines whether or not blurring occurs for each image of the drug Dg included in the image obtained by photographing the packaged drug 110 using the method described above. In this way, the brought-medicine distinguishing system 1 detects blurring of the drug image from the images captured by the upper camera 51 and the lower camera 55.

[0058] In this embodiment, it is determined that there is a blur when the angles θ1 and θ2 are 45 degrees or more, because verification has revealed that when the angles θ1 and θ2 are 45 degrees or more, the discrimination accuracy decreases due to the blur. In other words, the angle (45 degrees) that serves as the judgment standard may be set to an appropriate value depending on the system configuration of the brought-medicine discrimination system 1, the required discrimination accuracy, etc.

[0059] 6(B), the angle formed by line segment L1 and the horizontal axis of the graph is θ3 (not shown), and the angle formed by line segment L3 and the horizontal axis of the graph is θ4 (not shown), and if at least one of angles θ3 and θ4 is 45 degrees or less, it may be determined that the image of the drug Dg is blurred. In other words, the location where angle θ is taken with respect to line segment L1 and line segment L3 on the graph in FIG. 6(B) to determine that the image of the drug Dg is blurred is not limited to the above example.

[0060] Furthermore, the determination of whether blurring has occurred is not limited to the method of calculating the angle θ described above. In the graph of Fig. 6(B), to determine the slope of the line segments L1 and L3 in the range of blur Br, for example, it is possible to calculate a value generally called the slope of a line for the line segments L1 and L3 (in Fig. 6(B), the increase in luminance change relative to the increase in pixel position), and compare this slope with a predetermined value to determine whether blurring has occurred in the image of the drug Dg.

[0061] [1-6. Shooting operations when photographing a single-dose medicine] Next, a specific photographing operation when photographing a packaged medicine will be described with reference to the flowchart shown in Fig. 7. This photographing operation is performed by the control unit 100 controlling each unit.

[0062] In the first step SP1, the control unit 100 moves the tray 40 to the discharge position. Here, the operator places the packaged medicine 110 in a predetermined orientation on the tray 41 of the tray 40 at the discharge position.

[0063] In the next step SP2, the control unit 100 moves the tray 40 to the initial position, thereby storing it inside the photographing device 3. In the next step SP3, the control unit 100 moves the tray 40 to the first photographing position at a specified speed, and when a predetermined time (a waiting time before photographing, described later) has elapsed since the tray 40 was moved, starts photographing the packaged medicines 110 set in the tray 41 of the tray 40. The specific photographing method at the first photographing position has been described above, so its explanation is omitted here. The images photographed by the upper camera 51 and the lower camera 55 at the first photographing position are stored in the memory unit 101.

[0064] In the next step SP4, the control unit 100 causes the drug discrimination unit 102 to detect blur from the images captured by the upper camera 51 and the lower camera 55 at the first photographing position (i.e., the images obtained by photographing the packaged medicine 110), and determines whether blur has been detected. Specific methods for detecting blur have been described above, and therefore will not be described here. If blur is detected in at least one of the drugs Dg contained in the images obtained by photographing the packaged medicine 110, the control unit 100 obtains a positive result in step SP4 and proceeds to step SP5.

[0065] In step SP5, the control unit 100 changes the movement speed of the tray 40 from the specified speed to a low speed, and extends the time from when the tray 40 has finished moving to when shooting begins (this time is called the pre-shooting wait time) from the initial setting time. Specifically, the control unit 100 changes the movement speed of the tray 40 from the specified speed of 50 [mm / s] to a low speed of 25 [mm / s]. In other words, the movement speed of the tray 40 is set to 50 [%] of the specified speed. Furthermore, the control unit 100 extends the pre-shooting wait time from the initial setting time of 1 second to the extended setting time of 2 seconds. In other words, the shooting stop time is doubled.

[0066] After changing the moving speed of the tray 40 and the waiting time before photographing in this way, the control unit 100 returns to step SP3 and photographs the packaged medicine 110 again at the first photographing position. In this case, since the tray 40 has already been moved to the first photographing position, the control unit 100 photographs again without moving the tray 40. Note that if the waiting time before photographing (the extended set value of 2 seconds) has not elapsed since the tray 40 was moved to the first photographing position at this point, photographing will be performed after the photographing stop time has elapsed.

[0067] On the other hand, if no blur is detected in any of the drugs Dg contained in the image obtained by photographing the packaged drug 110 at the first photographing position, the control unit 100 obtains a negative result in step SP4 and proceeds to step SP6.

[0068] In step SP6, the control unit 100 moves the tray 40 to the second photographing position, and when the pre-photography waiting time has elapsed since the tray 40 was moved, starts photographing the packaged medicine 110. The images taken by the upper camera 51 and the lower camera 55 at the second photographing position are also stored in the memory unit 101.

[0069] In the next step SP7, the control unit 100 causes the drug distinguishing unit 102 to detect blur from the images captured by the upper camera 51 and the lower camera 55 at the second photographing position (i.e., the images obtained by photographing the packaged drug 110), and determines whether blur has been detected. Here, if blur is detected from at least one of the drugs Dg included in the images obtained by photographing the packaged drug 110, the control unit 100 obtains a positive result in step SP7 and proceeds to step SP8.

[0070] In step SP8, the control unit 100 moves the tray 40 to the first photographing position again, and proceeds to step SP5. In step SP5, the control unit 100 changes the moving speed of the tray 40 and the waiting time before photographing, and then returns to step SP3, and photographs the packaged medicine 110 again at the first photographing position.

[0071] On the other hand, if no blur is detected in any of the drugs Dg contained in the image obtained by photographing the packaged drug 110 at the second photographing position, the control unit 100 obtains a negative result in step SP7 and proceeds to step SP9.

[0072] In step SP9, the control unit 100 moves the tray 40 to the third photographing position, and when the pre-photography waiting time has elapsed since the tray 40 was moved, starts photographing the packaged medicine 110. The images taken by the upper camera 51 and the lower camera 55 at the third photographing position are also stored in the memory unit 101.

[0073] In the next step SP10, the control unit 100 causes the drug distinguishing unit 102 to detect blur from the images captured by the upper camera 51 and the lower camera 55 at the third photographing position (i.e., the images obtained by photographing the packaged drug 110), and determines whether blur has been detected. If blur is detected in at least one of the drugs Dg included in the image obtained by photographing the packaged drug 110, the control unit 100 obtains a positive result in step SP10, proceeds to step SP8, and moves the tray 40 back to the first photographing position.

[0074] On the other hand, if no blur is detected in any of the drugs Dg contained in the image obtained by photographing the packaged drug 110 at the third photographing position, the control unit 100 obtains a negative result in step SP10 and proceeds to step SP11.

[0075] In step SP11, the control unit 100 moves the tray 40 to the discharge position. Here, the operator removes the packaged medicine 110 from the tray 41 of the tray 40 at the discharge position. The photographing operation when photographing a packaged medicine is as described above.

[0076] For example, there may be cases where shaking is detected at the first shooting position in step SP4, and even though the movement speed of tray 40 is changed from the specified speed to a low speed in step SP5 and the waiting time before shooting is extended from 1 second to 2 seconds, shaking is again detected at the first shooting position.

[0077] Therefore, for example, in step SP5, the control unit 100 may change the moving speed of the tray 40 from the specified speed to a low speed and extend the waiting time before photographing from 1 second to 2 seconds, and then, if the blurring does not disappear even after repeating the operations from step SP3 to step SP10 a predetermined number of times, stop the photographing operation and move the tray 40 to the discharge position. In this case, the control unit 100 may, for example, display on the display unit 21, a message that the medicine cannot be properly identified due to the blurring of the photographed image.

[0078] Furthermore, without being limited to this, if shaking is detected again even after the movement speed of tray 40 has been changed from the specified speed to a low speed and the pre-shooting waiting time has been extended from 1 second to 2 seconds, in step SP5, for example, the movement speed of tray 40 may be changed from a low speed to an ultra-low speed (for example, 12.5 mm / s, half the low speed) and the pre-shooting waiting time may be extended from the extended set time of 2 seconds to a re-extended set time of 3 seconds. Note that the specified speed, low speed, and ultra-low speed described above are merely examples, and speeds different from the above may be set. Furthermore, the initial set time, extended set time, and re-extended set time of the pre-shooting waiting time are also merely examples, and may be set to times different from the above.

[0079] Then, after changing the moving speed of tray 40 from a low speed to an ultra-low speed and extending the waiting time before photographing from 2 seconds to 3 seconds, if the blurring does not disappear even after repeating the operations from step SP3 to step SP10 a predetermined number of times, the photographing operation may be stopped and tray 40 may be moved to the discharge position. In this case, too, control unit 100 may display on display unit 21, for example, that the medicine cannot be properly identified due to blurring of the photographed image.

[0080] [1-7. Summary and Effects] As explained so far, in the first embodiment, the brought-medicine discrimination system 1, which is an example of a drug discrimination device, is provided with a tray 40 on which drugs are placed, an upper camera 51 and a lower camera 55, which are examples of cameras that photograph the tray 40 from at least one direction, either above or below, a tray control board 70, which is an example of a drive unit that moves the position of the tray 40 while the tray 40 is stored in the device housing 30 and determines the position of the tray 40 relative to the upper camera 51 and the lower camera 55, a control unit 100 that controls the photographing by the upper camera 51 and the lower camera 55 and the movement of the tray 40 by the tray control board 70, a detection unit that detects fluctuations in the position of the drug in the images captured by the upper camera 51 and the lower camera 55, and a drug discrimination unit 102, which is an example of a drug discrimination unit that discriminates drugs using the images captured by the upper camera 51 and the lower camera 55.

[0081] The control unit 100 then moves the tray 40 to the first shooting position, which is an example of the first position, at a specified speed, which is an example of the first speed, and then captures an image of the drug after an initial setting time (1 second), which is an example of the first time, which is the waiting time before shooting, has elapsed.If the drug identification unit 102 detects blurring of the image of the drug in the image, which is an example of a change in the position of the drug, it changes the waiting time before shooting from the completion of movement of the tray 40 to an extended setting time (2 seconds), which is an example of a second time longer than the initial setting time (1 second), and changes the movement speed of the tray 40 to a low speed, which is an example of the second speed slower than the specified speed, and captures an image of the drug again at the first shooting position.

[0082] Furthermore, if the drug discrimination unit 102 does not detect any blurring of the drug image in the image captured at the first shooting position, the control unit 100 moves the tray 40 at a specified speed to the second shooting position, which is an example of the second position, and then captures an image of the drug after an initial setting time (1 second) has elapsed.If the drug discrimination unit 102 detects any blurring of the drug image in the image, the control unit 100 changes the waiting time before shooting to an extended setting time (2 seconds) and slows down the movement speed of the tray 40, and then captures an image of the drug again at the first shooting position.

[0083] In this way, in the brought-medicine discrimination system 1, if blurring is detected in the image of the medicine, the movement speed of the tray 40 and the waiting time before capturing an image are changed to make the image less likely to be blurred, and then the image is captured again, thereby making it possible to discriminate the medicine using an image captured in a less blurred state. Thus, the brought-medicine discrimination system 1 of the first embodiment can discriminate medicines more accurately. Note that in this embodiment, the medicine discriminating unit 102 detects blurring, which is a change in the position of the medicine, but a detection unit that detects blurring may be provided separately from the medicine discriminating unit 102.

[0084] 2. Second Embodiment Next, a second embodiment will be described. This second embodiment differs from the first embodiment in the method of detecting a change in the position of a medicine. Therefore, here, the method of detecting a change in the position of a medicine will be mainly described. In the first embodiment, because the tray 40 is moved before photographing at each photographing position, blurring may occur in the images captured by the upper camera 51 and the lower camera 55 as a result of a change in the position of the medicine. However, a positional deviation may occur as a result of a change in the position of the medicine. In the second embodiment, this positional deviation is detected.

[0085] [2-1. Detection of positional deviation] Here, a method for detecting positional deviation from images captured by upper camera 51 and lower camera 55 will be described. The detection of positional deviation is performed, for example, by drug distinguishing unit 102. Note that the positional deviation here means that, for example, the position of the drug in the image captured at the second imaging position has moved (shifted) from the position of the drug in the image captured at the first imaging position.

[0086] 8(A) shows an image captured by the upper camera 51 at the first imaging position. In this image, the tray 41 and the packaged medicine 110 placed on the tray 41 are captured.

[0087] Here, a plurality of marks Mx are provided on the rear edge of tray 41 at regular intervals in the left-right direction (X direction in the drawing) along the rear edge of tray 41. In addition, a plurality of marks My are provided on the left edge of tray 41 at regular intervals in the up-down direction (Y direction in the drawing) along the left edge of tray 41.

[0088] These marks Mx and My are, for example, cross-shaped and indicate reference positions for identifying the position of the drug Dg on the tray 41 from the captured image. Specifically, in the captured image, the drug distinguishing unit 102 extends a virtual line Lx in the Y direction from the center of the cross of each mark Mx provided on the rear end side of the tray 41, and extends a virtual line Ly in the X direction from the center of the cross of each mark My provided on the left end side of the tray 41. Note that only some of the multiple virtual lines Lx and some of the multiple virtual lines Ly are shown in FIG. 8(A).

[0089] Furthermore, the drug distinguishing unit 102 identifies which virtual lines Lx and Ly each drug Dg is in contact with in the image captured at the first imaging position. For example, in the image shown in FIG. 8(A), the drug distinguishing unit 102 identifies the left drug Dg1 as being in contact with the sixth virtual line Lx in the X direction and the fourth virtual line Ly in the Y direction, starting from the upper left corner of the tray 41. The drug distinguishing unit 102 then stores, in the storage unit 101, position information indicating that the position of the drug Dg1 in the image captured by the upper camera 51 at the first imaging position is in contact with the fifth virtual line Lx and the fourth virtual line Ly. Similarly, the drug distinguishing unit 102 acquires position information for another drug Dg (Dg2) and stores it in the storage unit 101. The position information for each drug Dg identified in this way from the image captured at the first imaging position serves as a reference for detecting misalignment.

[0090] The interval between the marks Mx and the virtual lines Lx is set to be equal to or less than the minimum diameter of the drug (e.g., 7 mm). Similarly, the interval between the marks My and the virtual lines Ly is set to be equal to or less than the minimum diameter of the drug.

[0091] FIG. 8(B) shows an image captured by the upper camera 51 at the second imaging position. The image shown in FIG. 8(B) is an example in which the drug Dg1 on the left side is misaligned. The drug distinguishing unit 102 identifies which virtual lines Lx and Ly each drug Dg is in contact with in this image. In the case of the image shown in FIG. 8(B), the drug distinguishing unit 102 identifies that the drug Dg1 on the left side is in contact with the fifth virtual line Lx in the X direction and the fourth virtual line Ly in the Y direction.

[0092] Then, the drug discrimination unit 102 determines whether the position information indicating that the position of drug Dg1 is a position where it is in contact with the fifth virtual line Lx and the fourth virtual line Ly4 (i.e., the position information of drug Dg1 identified from the image captured at the second shooting position) matches any of the position information for each drug Dg identified from the image captured at the first shooting position (i.e., the reference position information).

[0093] Here, the drug distinguishing unit 102 determines that no positional deviation has occurred if the positional information of the drug Dg1 identified from the image captured at the second photographing position matches any of the positional information for each drug Dg identified from the image captured at the first photographing position, and determines that a positional deviation has occurred if they do not match. The drug distinguishing unit 102 is configured to determine whether or not a positional deviation has occurred for each image of the drug Dg included in the image obtained by photographing the packaged drug 110 using the method described above. In this way, the brought-medicine distinguishing system 1 is configured to detect a positional deviation from the images captured by the upper camera 51 and the lower camera 55.

[0094] [2-2. Shooting operations when photographing a single-dose medicine] Next, a specific photographing operation when photographing a packaged medicine will be described with reference to the flowchart shown in Fig. 9. This photographing operation is performed by the control unit 100 controlling each unit.

[0095] The operations of the initial steps SP21 and SP22 are similar to those of steps SP1 and SP2 of the photographing operation described in the first embodiment, and therefore will not be described again. In step SP23, the control unit 100 moves the tray 40 to the first photographing position, and when the pre-photography waiting time has elapsed since the tray 40 was moved, starts photographing the packaged medicines 110 set in the tray 41 of the tray 40. The images captured by the upper camera 51 and the lower camera 55 at the first photographing position are stored in the memory unit 101. Here, the drug distinguishing unit 102 acquires position information for each drug Dg from the images captured at the first photographing position and stores the information in the memory unit 101. The method for acquiring the position information has been described above, and therefore will not be described again.

[0096] In the next step SP24, the control unit 100 moves the tray 40 to the second photographing position, and when the pre-photography waiting time has elapsed since the tray 40 was moved, starts photographing the packaged medicines 110. The images captured by the upper camera 51 and the lower camera 55 at the second photographing position are also stored in the memory unit 101. The medicine distinguishing unit 102 also obtains position information for each medicine Dg from the images captured at the second photographing position and stores the information in the memory unit 101.

[0097] In the next step SP25, the control unit 100 detects positional deviation using the position information for each drug Dg (i.e., reference position information) acquired from the image captured at the first photographing position by the drug distinguishing unit 102 and the position information for each drug Dg acquired from the image captured at the second photographing position, and determines whether or not positional deviation has been detected. The specific method for detecting positional deviation has been described above, and therefore will not be described here. If positional deviation has been detected for at least one of the drugs Dg included in the image captured by photographing the packaged medicine 110, the control unit 100 obtains a positive result in step SP25 and proceeds to step SP26.

[0098] In step SP26, the control unit 100 moves the tray 40 back to the first shooting position, and then proceeds to step SP27. In step SP27, the control unit 100 changes the movement speed of the tray 40 from the specified speed to a low speed, and extends the waiting time before shooting from the initial setting time. Specifically, the control unit 100 changes the movement speed of the tray 40 from the specified speed of 50 [mm / s] to a low speed of 25 [mm / s]. Furthermore, the control unit 100 extends the waiting time before shooting from the initial setting time of 1 second to the extended setting time of 2 seconds.

[0099] After changing the moving speed of the tray 40 and the waiting time before photographing in this way, the control section 100 returns to step SP23 and photographs the packaged medicine 110 again at the first photographing position.

[0100] On the other hand, if no positional deviation is detected in any of the drugs Dg contained in the image obtained by photographing the packaged drug 110 at the second photographing position, the control unit 100 obtains a negative result in step SP25 and proceeds to step SP28.

[0101] In step SP28, the control unit 100 moves the tray 40 to the third photographing position, and when the pre-photography waiting time has elapsed since the tray 40 was moved, starts photographing the packaged medicines 110. The images captured by the upper camera 51 and the lower camera 55 at the third photographing position are also stored in the memory unit 101. The medicine distinguishing unit 102 also acquires position information for each medicine Dg from the images captured at the third photographing position and stores the information in the memory unit 101.

[0102] In the next step SP29, the control unit 100 detects positional deviation using the position information for each drug Dg (i.e., reference position information) acquired from the image captured at the first photographing position and the position information for each drug Dg acquired from the image captured at the third photographing position by the drug distinguishing unit 102, and determines whether or not positional deviation has been detected. Here, if positional deviation has been detected for at least one of the drugs Dg included in the image acquired by photographing the packaged medicine 110, the control unit 100 obtains a positive result in step SP29 and proceeds to step SP26.

[0103] In step SP26, the control unit 100 moves the tray 40 to the first photographing position again, and proceeds to step SP27. In step SP27, the control unit 100 changes the moving speed of the tray 40 and the waiting time before photographing, and then returns to step SP23, and photographs the packaged medicine 110 again at the first photographing position.

[0104] On the other hand, if no positional deviation is detected in any of the drugs Dg contained in the image obtained by photographing the packaged drug 110 at the third photographing position, the control unit 100 obtains a negative result in step SP29 and proceeds to step SP30.

[0105] In step SP30, the control unit 100 moves the tray 40 to the discharge position. Here, the operator removes the packaged medicine 110 from the tray 41 of the tray 40 at the discharge position. The photographing operation when photographing a packaged medicine is as described above.

[0106] For example, there may be a case where a positional deviation is detected at the second shooting position in step SP24, and even though the movement speed of the tray 40 is changed from the specified speed to a low speed in step SP27 and the waiting time before shooting is extended from 1 second to 2 seconds, a positional deviation is again detected at the second shooting position.

[0107] Therefore, for example, in step SP27, the control unit 100 may change the moving speed of the tray 40 from the specified speed to a low speed and extend the waiting time before imaging from 1 second to 2 seconds, and then, if the positional deviation is not resolved even after repeating the operations from step SP23 to step SP29 a predetermined number of times, stop the imaging operation and move the tray 40 to the discharge position. In this case, the control unit 100 may, for example, display on the display unit 21, a message that the medicine cannot be properly identified due to the positional deviation of the medicine in the captured image.

[0108] Furthermore, without being limited to this, if a positional deviation is detected again even though the movement speed of tray 40 has been changed from the specified speed to a low speed and the waiting time before shooting has been extended from 1 second to 2 seconds, in step SP27, for example, the movement speed of tray 40 may be changed from a low speed to an ultra-low speed (for example, 12.5 mm / s, which is half the low speed) and the waiting time before shooting may be extended from the extended setting time of 2 seconds to the re-extended setting time of 3 seconds.

[0109] Then, after changing the moving speed of tray 40 from low to very low and extending the waiting time before imaging from 2 seconds to 3 seconds, if the positional deviation is not resolved even after repeating the operations from step SP23 to step SP29 a predetermined number of times, the imaging operation may be stopped and tray 40 may be moved to the discharge position. In this case, too, control unit 100 may display on display unit 21, for example, that the medicine cannot be properly identified due to the positional deviation of the medicine in the captured image.

[0110] [2-3. Summary and Effects] As described above, in the second embodiment, the control unit 100 captures an image of the drug after an initial setting time (1 second), which is an example of the first time, has elapsed since the control unit 100 moved the tray 40 to the first shooting position, which is an example of the first position, at a specified speed, which is an example of the first speed, and then captures an image of the drug after an initial setting time (1 second), which is an example of the first time, has elapsed since the control unit 100 moved the tray 40 to the second shooting position, which is an example of the second position, at a specified speed, and then captures an image of the drug after an initial setting time (1 second), which is an example of the change in the position of the drug, based on the image captured at the first shooting position and the image captured at the second shooting position.If the drug discrimination unit 102 detects a positional deviation, which is an example of a change in the position of the drug, based on the image captured at the first shooting position and the image captured at the second shooting position, the control unit 102 changes the pre-shooting waiting time from the completion of movement of the tray 40 to the start of shooting by the upper camera 51 and the lower camera 55 to an extended setting time (2 seconds), which is an example of a second time longer than the initial setting time (1 second), and changes the movement speed of the tray 40 to a low speed, which is an example of a second speed slower than the specified speed, and captures an image of the drug again at the first shooting position.

[0111] In this way, in the brought-medicine discrimination system 1, when a positional deviation is detected from an image of a medicine, the movement speed of the tray 40 and the waiting time before image capture are changed to make the image less likely to be misaligned, and then the image is captured again, thereby making it possible to discriminate the medicine using an image captured in a state less likely to cause a positional deviation. Thus, the brought-medicine discrimination system 1 of the second embodiment can discriminate medicines more accurately. Note that in this embodiment, the medicine discriminating unit 102 detects a positional deviation, which is a change in the position of the medicine, but a detection unit that detects a positional deviation may be provided separately from the medicine discriminating unit 102.

[0112] 3. Other Embodiments [3-1. Other embodiment 1] In the first embodiment described above, when a blur is detected in the image of the drug Dg, the movement speed of the tray 40 and the waiting time before photographing are changed, but this is not limiting, and either the movement speed of the tray 40 or the waiting time before photographing may be changed. Similarly, in the second embodiment, when a positional deviation is detected in the image of the drug Dg, either the movement speed of the tray 40 or the waiting time before photographing may be changed.

[0113] When blurring or misalignment is detected, simply extending the waiting time before photography can sufficiently reduce the occurrence of blurring or misalignment compared to conventional methods, thereby improving the accuracy of identification. Similarly, when blurring or misalignment is detected, simply changing the movement speed of tray 40 from the specified speed to a slower speed can sufficiently reduce the occurrence of blurring or misalignment compared to conventional methods, thereby improving the accuracy of identification.

[0114] [3-2. Other embodiment 2] In addition, in the first embodiment described above, if blur is detected in an image captured at the second shooting position or if blur is detected in an image captured at the third shooting position, the tray 40 is moved to the first shooting position in step SP8, and then the moving speed of the tray 40 is changed in step SP5.

[0115] Alternatively, if blur is detected in an image captured at the second photographing position or if blur is detected in an image captured at the third photographing position, the movement speed of the tray 40 may be changed before moving the tray 40 to the first photographing position. In this way, if blur is detected in an image captured at the second photographing position or if blur is detected in an image captured at the third photographing position, the tray 40 can be moved to the first photographing position at a low speed.

[0116] Similarly, in the second embodiment, if a positional deviation is detected from an image captured at the second shooting position or if a positional deviation is detected from an image captured at the third shooting position, the movement speed of the tray 40 may be changed before moving the tray 40 to the first shooting position.

[0117] [3-3. Other embodiment 3] Furthermore, in the first embodiment described above, if blur is detected in an image captured at the second photographing position or if blur is detected in an image captured at the third photographing position, the tray 40 is moved to the first photographing position in step SP8, and the movement speed of the tray 40 and the waiting time before photographing are changed in step SP5, and the drug Dg is photographed again at the first photographing position. This is not a limitation. For example, if blur is detected in an image captured at the second photographing position, the tray 40 may remain at the second photographing position, the movement speed of the tray 40 and the waiting time before photographing are changed, and the drug Dg may be photographed again at the second photographing position. In other words, if blur is detected, the movement speed of the tray 40 and the waiting time before photographing may be changed, and the drug Dg may be photographed again at the same photographing position.

[0118] [3-4. Other embodiment 4] Furthermore, in the first embodiment described above, blurring of the drug Dg is detected based on a change in brightness around the drug Dg obtained from an image of the drug Dg. However, this is not a limitation, and blurring may be detected using other image analysis methods. Furthermore, in the second embodiment, positional deviation of the drug Dg is detected based on positional information of the drug Dg obtained from an image of the drug Dg. However, this is not a limitation, and blurring may be detected using other image analysis methods. For example, the similarity between the image captured at the first imaging position and the image captured at the second imaging position may be calculated, and if the similarity is equal to or less than a predetermined threshold, it may be determined that a positional deviation has occurred in the image captured at the second imaging position.

[0119] [3-5. Other embodiment 5] Furthermore, in the second embodiment described above, the tray 41 is provided with the marks Mx and My indicating the reference positions for identifying the position of the drug Dg on the tray 41, but this is not limiting, and the marks Mx and My may be provided on the tray 40 instead of the tray 41. Furthermore, the shapes of the marks Mx and My may be arrow-shaped or any other shape other than a cross shape.

[0120] [3-6. Other embodiment 6] Furthermore, in the first and second embodiments described above, when photographing a packaged drug 110 set on the tray 41, any change in the position of the drug Dg is detected, and the movement speed of the tray 40 and the waiting time before photographing are changed according to the detection results. However, this is not limited to this, and when photographing loose drugs set on the tray 41, any change in the position of the drug Dg may be detected, and the movement speed of the tray 40 and the waiting time before photographing may be changed according to the detection results.

[0121] [3-7. Other embodiment 7] Furthermore, in the first and second embodiments described above, the photographing by the upper camera 51 and the lower camera 55 and the movement of the tray 40 are controlled by the control unit 100 on the control device 2 side, but this is not limited to this. For example, a control unit that controls the photographing by the upper camera 51 and the lower camera 55 and the movement of the tray 40 in accordance with instructions from the control unit 100 may be provided on the photographing device 3 side.

[0122] Furthermore, in the first and second embodiments described above, the brought-medicine discrimination system 1 is realized by the control device 2 and the photographing device 3, but this is not limiting, and the brought-medicine discrimination system 1 may be realized by a single device having the functions of both the control device 2 and the photographing device 3. For example, the brought-medicine discrimination system 1 may be realized by a device in which each part of the control device 2 and each part of the photographing device 3 are built into a single housing. Also, for example, the brought-medicine discrimination system 1 may be realized by giving the photographing device 3 the functions of the control device 2.

[0123] Furthermore, in the first and second embodiments described above, the present invention is applied to the brought-medicine discrimination system 1 that discriminates the medicine Dg placed on the tray 40 by photographing it from above and below using the upper camera 51 and the lower camera 55. However, the present invention is not limited to this, and may be applied to various medicine discrimination devices that discriminate medicines placed on a tray by photographing them with a camera. For example, the present invention may be applied to a medicine discrimination device that photographs medicines placed on a tray from above using only the upper camera, or a medicine discrimination device that photographs medicines placed on a tray from below using only the lower camera.

[0124] [3-8. Other embodiment 8] Furthermore, the present invention is not limited to the above-described embodiments, and the scope of application of the present invention extends to embodiments in which the first and second embodiments are combined with part or all of the other embodiments, or embodiments in which only part of the first and second embodiments is extracted. [Industrial Applicability]

[0125] The present invention can be widely used in, for example, a drug discrimination device for discriminating drugs brought by a person. [Explanation of symbols]

[0126] 1...Brought-in medication identification system, 2...Control device, 3...Photographing device, 20...Main body, 21...Display, 22...Operation unit, 30...Device housing, 31...Tray discharge outlet, 32...Shutter, 40...Tray, 41...Receptacle, 50...Photographing mechanism, 51...Upper camera, 53...Upper first lighting, 54...Upper second lighting, 55...Lower camera, 57...Lower first lighting, 58...Lower second lighting, 59...Tray unit, 70...Tray control board, 71...Lighting control unit, 80...Motor, 100...Control unit, 101...Memory unit, 102...Drug identification unit, 110...Single-dose drug, Dg...Drug, Br...Blur, Mx, My...Mark, Lx, Ly...Virtual line.

Claims

1. a tray on which medicines are placed; a camera that photographs the tray from at least one of above and below; a drive unit that moves the position of the tray while the tray is housed in the device housing and determines the position of the tray relative to the camera; a control unit that controls the photographing by the camera and the movement of the tray by the drive unit; a detection unit that detects a change in the position of the medicine in the image captured by the camera; a medicine distinguishing unit that distinguishes medicines using the image captured by the camera; Equipped with The control unit An image is captured after a first time, which is a waiting time before photographing, has elapsed since the tray was moved to a first position, and if the detection unit detects a change in the position of the medicine in the image, the waiting time before photographing, from the completion of the movement of the tray to the start of photographing by the camera, is changed to a second time longer than the first time, and an image is captured again at the first position. A drug discrimination device characterized by:

2. The control unit An image is taken at the first position, and if the detection unit does not detect a change in the position of the medicine in the image, the tray is moved to a second position and then an image is taken after the pre-photographing waiting time has elapsed, and if the detection unit detects a change in the position of the medicine in the image, the pre-photographing waiting time is changed to the second time, and an image is taken again at the second position.

2. The drug discrimination device according to claim 1.

3. The control unit If the detection unit detects a change in the position of the medicine in the image captured at the second position, the waiting time before photographing is changed to the second time, the tray is moved to the first position again, and an image is captured after the waiting time before photographing has elapsed, and then the tray is moved to the second position again, and an image is captured after the waiting time before photographing has elapsed.

3. The drug discrimination device according to claim 2.

4. The control unit The tray is moved to the first position at a first speed, and then an image is taken after the pre-photography waiting time has elapsed. If the detection unit detects a change in the position of the medicine in the image, the pre-photography waiting time is changed to the second time, and the moving speed of the tray is changed to a second speed slower than the first speed, and an image is taken again at the first position.

4. The drug discrimination device according to claim 1.

5. The detection unit A blur of the image of the medicine is detected as a change in the position of the medicine in the image captured by the camera.

2. The drug discrimination device according to claim 1.

6. The detection unit A blur of the image of the medicine is detected from a change in brightness of the image of the medicine in the image captured by the camera.

6. The drug discrimination device according to claim 5.

7. The detection unit The positional deviation of the medicine is detected as a change in the position of the medicine in the image captured by the camera.

4. The drug discrimination device according to claim 2 or 3.

8. The detection unit A positional deviation of the medicine is detected from the position of the medicine in the image captured at the first position and the position of the medicine in the image captured at the second position.

8. The drug discrimination device according to claim 7.

9. a tray on which medicines are placed; a camera that photographs the tray from at least one of above and below; a drive unit that moves the position of the tray while the tray is housed in the device housing and determines the position of the tray relative to the camera; a control unit that controls the photographing by the camera and the movement of the tray by the drive unit; a detection unit that detects a change in the position of the medicine in the image captured by the camera; a medicine distinguishing unit that distinguishes medicines using the image captured by the camera; Equipped with The control unit The tray is moved to a first position at a first speed, and an image is taken. If the detection unit detects a change in the position of the medicine in the image, the moving speed of the tray is changed to a second speed slower than the first speed, and an image is taken again at the first position. A drug discrimination device characterized by:

Citation Information

Patent Citations

  • Medicine determination device and medicine determination method

    WO2019188281A1