JP7364888B2 - Type discrimination device - Google Patents

Type discrimination device Download PDF

Info

Publication number
JP7364888B2
JP7364888B2 JP2019224015A JP2019224015A JP7364888B2 JP 7364888 B2 JP7364888 B2 JP 7364888B2 JP 2019224015 A JP2019224015 A JP 2019224015A JP 2019224015 A JP2019224015 A JP 2019224015A JP 7364888 B2 JP7364888 B2 JP 7364888B2
Authority
JP
Japan
Prior art keywords
drug
unit
similarity
type
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019224015A
Other languages
Japanese (ja)
Other versions
JP2020103885A (en
Inventor
剛 阿部
直樹 北村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuyama Manufacturing Co Ltd
Original Assignee
Yuyama Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuyama Manufacturing Co Ltd filed Critical Yuyama Manufacturing Co Ltd
Publication of JP2020103885A publication Critical patent/JP2020103885A/en
Priority to JP2023168701A priority Critical patent/JP2023165958A/en
Application granted granted Critical
Publication of JP7364888B2 publication Critical patent/JP7364888B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Medical Preparation Storing Or Oral Administration Devices (AREA)

Description

本発明は、薬剤の種類を自動で判別する種類判別装置等に関する。 The present invention relates to a type discrimination device and the like that automatically discriminates the type of medicine.

従来、返品された複数種類の薬剤は、薬剤師または医師の手により種類毎に仕分けられていた。返品される薬剤は、様々な患者に処方される、または処方された調剤後の薬剤である。そのため、1患者単位の処方箋情報に基づいて、調剤機器等に予め薬種単位でまとめられた薬種群(薬剤カセット)から、一服用時期単位毎に、(1種または複数種の)薬剤(錠剤)を取りまとめる(分包する)調剤業務に比べて、複数の患者に処方された薬剤がまとめて返品される薬剤の種類は非常に多い。そのため、返品された薬剤を自動的に仕分けて、再利用することの有用性は高い。なお、一服用時期用に調剤される薬剤は、一般に2~3種類程度であり、多くても10種類程度である。 Conventionally, multiple types of returned drugs have been sorted by type by pharmacists or doctors. The returned medication is the compounded medication that is or has been prescribed to various patients. Therefore, based on the prescription information for each patient, drugs (tablets) (one or more types) are prepared for each dosage period from a group of drugs (drug cassettes) that are pre-organized by drug type in a dispensing device, etc. Compared to dispensing services where drugs are compiled (divided into packages), there are many types of drugs that are prescribed to multiple patients and are returned together. Therefore, it is highly useful to automatically sort and reuse returned drugs. Note that the number of drugs that are prepared for each dose is generally about 2 to 3 types, and about 10 types at most.

なお、仕分け業務にかかる時間、手間、または仕分け間違い(薬剤カセットへの戻し間違い)による誤投与のリスクを避けるため、返品された薬剤を、そのまま廃棄する薬局または病院(正確には院内薬剤部)も存在している。 In addition, in order to avoid the time and effort required for sorting, or the risk of erroneous administration due to incorrect sorting (misplacement of drugs into cassettes), returned drugs must be disposed of as is at pharmacies or hospitals (more precisely, in-hospital pharmacy departments). also exists.

特許文献1には、返品されたアンプルまたはバイアルを自動的に認識して格納する薬剤仕分装置が開示されている。この薬剤仕分装置は、アンプルまたはバイアルの向き及び姿勢と、アンプルまたはバイアルの性状(例:形状、大きさ、種類及び使用期限)とを認識する。そして、認識されたアンプルまたはバイアルの大きさに応じて格納時に個々のアンプルまたはバイアルに設定される格納領域と、個々のアンプルまたはバイアルの識別情報とを関連付けて、アンプルまたはバイアルを個別に配置し、それによって個別のアンプルまたはバイアルを取り出し可能に格納する。 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 the ampoule or vial, and the properties (eg, shape, size, type, and expiration date) of the ampoule or vial. Then, the storage area set for each ampoule or vial during storage according to the recognized size of the ampoule or vial is associated with the identification information of each ampoule or vial, and the ampoules or vials are individually arranged. , thereby removably storing individual ampoules or vials.

国際公開第2015/170761号(2015年11月12日公開)International Publication No. 2015/170761 (released on November 12, 2015)

特許文献1での返品対象は、アンプルまたはバイアルであり、錠剤またはカプセル等の、容器等に収容されていない薬剤、または包装等が施されていない薬剤自体ではない。そのため、特許文献1では、このような薬剤(例:錠剤またはカプセル)そのものを識別し、自動的に仕分けることについてまでは想定されていない。薬剤の自動仕分けを行う薬剤仕分装置を実現しようとした場合、予め種類が既知の薬剤について、その外観の特徴を示すマスタデータを作成して記憶しておき、そのマスタデータを用いて仕分け対象の薬剤の種類の判別を行うことが考えられる。なお、マスタデータとの照合に用いる、仕分け対象の薬剤の外観の特徴は、該薬剤を撮像した画像を解析することで特定すればよい。 The items to be returned in Patent Document 1 are ampoules or vials, not medicines such as tablets or capsules that are not contained in containers or the like, or medicines themselves that are not packaged. Therefore, Patent Document 1 does not envisage identifying and automatically sorting such medicines (eg, tablets or capsules) themselves. When trying to realize a drug sorting device that automatically sorts drugs, it is necessary to create and store master data that describes the appearance characteristics of drugs whose types are known in advance, and then use that master data to sort the drugs to be sorted. It is conceivable to discriminate the type of drug. Note that the external appearance characteristics of the drug to be sorted, which are used for comparison with the master data, may be identified by analyzing an image of the drug.

しかしながら、同じ薬剤を撮像した場合であっても、撮像装置や撮像環境が変われば、得られる画像に差異が生じ得る。また、撮像装置や撮像環境を同じにしたとしても、装置(撮像装置のみならず照明装置等の周辺装置も含む)の経時劣化により、得られる画像に差異が生じ得る。つまり、撮像によって得られる画像は、マスタデータの作成時に想定していたものから変化する可能性があり、このような変化が生じた場合、種類の判別に要する時間が増加する等の支障が生じる可能性がある。 However, even when the same drug is imaged, differences may occur in the images obtained if the imaging device or imaging environment changes. Further, even if the imaging device and imaging environment are the same, differences may occur in the images obtained due to deterioration over time of the device (including not only the imaging device but also peripheral devices such as lighting devices). In other words, the image obtained by imaging may change from what was assumed when the master data was created, and if such a change occurs, problems such as an increase in the time required to distinguish the type may occur. there is a possibility.

本発明の一態様は、薬剤を撮像した画像とマスタデータとを用いた薬剤の種類の判別において、撮像によって得られる画像が、マスタデータの作成時に想定していたものから変化した場合であっても、適切に種類の判別を行うことができる種類判別装置等を実現することを目的とする。 One aspect of the present invention is to determine the type of drug using an image of the drug and master data, when the image obtained by imaging changes from what was assumed at the time of creating the master data. Another object of the present invention is to realize a type discrimination device etc. that can appropriately discriminate types.

上記の課題を解決するために、本発明の一態様に係る種類判別装置は、薬剤の照合用のマスタデータを用いて、種類不明の対象薬剤を撮像した撮像画像から、前記対象薬剤の種類を判別する種類判別装置であって、前記マスタデータには、薬剤の色を示すマスタ色データが含まれており、前記撮像画像から生成された、前記対象薬剤の外観の特徴を示す情報と、前記マスタデータとを照合し、該照合の結果に基づいて前記対象薬剤の種類を判別する判別部と、前記判別部が前記対象薬剤の種類の判別に成功したときに、当該判別に使用された、前記対象薬剤の色を示す判別成功色データを、新たな前記マスタ色データとするマスタ更新部と、を備える。 In order to solve the above problems, a type discrimination device according to one aspect of the present invention uses master data for drug verification to identify the type of a target drug from a captured image of an unknown type of target drug. The type discrimination device discriminates the type, and the master data includes master color data indicating the color of the drug, and information indicating the external appearance characteristics of the target drug generated from the captured image; a discriminating unit that collates the target drug with master data and determines the type of the target drug based on the result of the collation; The apparatus further includes a master updating unit that sets successful discrimination color data indicating the color of the target drug as new master color data.

本発明の一態様によれば、判別成功色データを新たなマスタ色データとするので、対象薬剤の撮像によって得られる画像が、マスタデータの作成時に想定していたものから変化した場合であっても、適切に種類の判別を行うことができる。なお、「適切に」とは、必ずしも種類の判別精度が高いことを意味しない。例えば、適正な時間で種類の判別ができることも「適切に」の範疇に含まれる。 According to one aspect of the present invention, successful discrimination color data is used as new master color data, so even if the image obtained by imaging the target drug changes from what was assumed when the master data was created, It is also possible to appropriately determine the type. Note that "appropriately" does not necessarily mean that the accuracy of type discrimination is high. For example, being able to determine the type in an appropriate amount of time is also included in the category of "appropriately."

薬剤仕分装置の全体構成を示すブロック図である。FIG. 1 is a block diagram showing the overall configuration of a medicine sorting device. 薬剤仕分装置の構成例を示す図であり、(a)は薬剤仕分装置の斜視図であり、(b)は、薬剤仕分領域の基本構成を示す斜視図である。It is a figure which shows the example of a structure of a medicine sorting device, (a) is a perspective view of a medicine sorting device, (b) is a perspective view which shows the basic structure of a medicine sorting area. (a)および(b)は、撮像ユニットの全体構成を示す斜視図であり、(c)は、薬剤載置台の一例を示す斜視図である。(a) and (b) are perspective views showing the overall configuration of an imaging unit, and (c) is a perspective view showing an example of a drug mounting table. (a)および(b)は、撮像ユニットの旋回について説明するための図である。(a) and (b) are diagrams for explaining the rotation of the imaging unit. 薬剤データベースの更新方法を説明する図である。It is a figure explaining the update method of a drug database. 色スコアの算出式における重みの更新方法を説明する図である。FIG. 3 is a diagram illustrating a method of updating weights in a color score calculation formula. 判別成功色データを記憶する処理の一例を示すフローチャートである。7 is a flowchart illustrating an example of a process for storing successfully discriminated color data. 薬剤データベースを更新する処理の一例を示すフローチャートである。It is a flowchart which shows an example of the process of updating a drug database. 色スコアの算出式における重みを更新する処理の一例を示すフローチャートである。12 is a flowchart illustrating an example of a process for updating weights in a color score calculation formula. 本発明の実施形態2に係る薬剤仕分装置が備える制御部の要部構成の一例を示すブロック図である。FIG. 2 is a block diagram showing an example of the configuration of main parts of a control section included in a medicine sorting device according to Embodiment 2 of the present invention. 情報処理装置の要部構成の一例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of main parts of an information processing device. 判定領域の設定例を示す図である。It is a figure which shows the example of a setting of a determination area. 閾値が相違することにより類似性の判定精度に相違が生じた例を示す図である。FIG. 7 is a diagram illustrating an example in which a difference in similarity determination accuracy occurs due to a difference in threshold value. 識別器を構築する処理の一例を示すフローチャートである。3 is a flowchart illustrating an example of a process for constructing a classifier. 識別器を構築する処理の具体例を示す図である。FIG. 7 is a diagram illustrating a specific example of processing for constructing a classifier. マークの一致判定処理の一例を示すフローチャートである。7 is a flowchart illustrating an example of mark match determination processing. マークの一致判定の具体例を示す図である。FIG. 7 is a diagram illustrating a specific example of mark match determination.

〔実施形態1〕
〔薬剤仕分装置1の概要〕
まず、薬剤仕分装置1の概要について図1および図2を用いて説明する。図1は、薬剤仕分装置1の全体構成を示すブロック図である。図2は、薬剤仕分装置1の構成例を示す図であり、(a)は薬剤仕分装置1の斜視図であり、(b)は、薬剤仕分領域2の基本構成を示す斜視図である。図1、並びに、図2の(a)および(b)に示すように、薬剤仕分装置1は、薬剤仕分領域2、タッチパネル3、印刷出力部4、および分包機構6を備える。
[Embodiment 1]
[Overview of drug sorting device 1]
First, an overview of the medicine sorting device 1 will be explained using FIGS. 1 and 2. FIG. 1 is a block diagram showing the overall configuration of the medicine sorting device 1. As shown in FIG. FIG. 2 is a diagram showing an example of the configuration of the medicine sorting device 1, in which (a) is a perspective view of the medicine sorting device 1, and (b) is a perspective view showing the basic configuration of the medicine sorting area 2. As shown in FIG. 1 and FIGS. 2A and 2B, the drug sorting device 1 includes a drug sorting area 2, a touch panel 3, a print output section 4, and a packaging mechanism 6.

薬剤仕分装置1は、複数種類の薬剤のそれぞれについて撮像し、撮像の結果得られた画像に基づき薬剤の種類を判別し、種類毎に薬剤を仕分ける。具体的には、薬剤仕分領域2においてこの処理が行われる。薬剤仕分領域2(薬剤仕分装置1の内部構成)については後述する。なお、種類毎に仕分けられた薬剤は、ユーザによる目視鑑査が行われた後、分包されたり、薬剤棚または分包機へと返却されたりする。 The drug sorting device 1 images each of a plurality of types of drugs, determines the type of drug based on the image obtained as a result of the imaging, and sorts the drugs by type. Specifically, this process is performed in the medicine sorting area 2. The medicine sorting area 2 (internal configuration of the medicine sorting device 1) will be described later. Note that the drugs sorted by type are visually inspected by the user and then packaged or returned to the drug shelf or the packaging machine.

本実施形態では、複数種類の薬剤は、容器等に収容されていない薬剤、または包装等が施されていない薬剤であり、その一例として、錠剤またはカプセルであるものとして説明する。また、複数種類の薬剤が返品された薬剤であるものとして説明する。薬剤の返品としては、薬局または病院における採用薬が当該薬局または病院にて「返品薬」として返品される場合と、当該薬局または病院において、当該採用薬以外に、他の薬局または病院で発行された薬剤も含み得る「持参薬」が返品される場合とが含まれる。換言すれば、返品される薬剤という概念には、上記「返品薬」および「持参薬」の少なくともいずれかが含まれる。薬剤仕分装置1は、薬剤が返品された後、撮像から仕分までの処理を自動的に行うことが可能である。 In this embodiment, the multiple types of drugs are drugs that are not contained in a container or the like, or are not packaged, and will be described as tablets or capsules as an example. Further, the description will be made assuming that a plurality of types of medicines are returned medicines. Drug returns include cases in which a drug adopted at a pharmacy or hospital is returned as a "returned drug," and cases in which a drug is issued at another pharmacy or hospital in addition to the adopted drug. This includes cases where ``medications brought in'' are returned, which may include drugs that have been taken. In other words, the concept of returned medicine includes at least one of the above-mentioned "returned medicine" and "bringing medicine." The medicine sorting device 1 is capable of automatically performing processing from imaging to sorting after medicines are returned.

タッチパネル3は、操作部31にて各種ユーザ入力を受け付けるとともに、表示部32にて各種画像(例:薬剤仕分の推移を示す画像、目視鑑査用の画像)を表示する。 The touch panel 3 receives various user inputs through the operation section 31, and displays various images (eg, an image showing the progress of drug sorting, an image for visual inspection) on the display section 32.

印刷出力部4は、目視鑑査後のユーザ入力に従って、目視鑑査後の薬剤に関する薬剤データ(例:薬剤名、製造元または成分を示すデータ)を表すジャーナルを印字する。薬剤データには、薬剤固有の画像を示す画像データが含まれていてもよい。 The print output unit 4 prints a journal representing drug data (eg, data indicating the drug name, manufacturer, or ingredient) regarding the drug after the visual inspection, in accordance with the user input after the visual inspection. The drug data may include image data showing an image unique to the drug.

分包機構6は仕分けられた薬剤を分包する。分包機構6はオプション機構である。分包機構6が薬剤仕分装置1に備えられる場合、返品された薬剤の仕分から、目視鑑査を経た後の分包までの処理を、薬剤仕分装置1で一括して行うことが可能となる。特に、搬送・仕分ユニット12により分包機構6へ薬剤が投入される場合には、目視鑑査を除き、上記仕分から分包までの処理を自動で行うことができる。 The packaging mechanism 6 packages the sorted medicines. The packaging mechanism 6 is an optional mechanism. When the drug sorting device 1 is equipped with the packaging mechanism 6, it becomes possible for the drug sorting device 1 to collectively process the sorting of returned drugs and packaging them after visual inspection. Particularly, when medicines are introduced into the packaging mechanism 6 by the transport/sorting unit 12, the above-mentioned processing from sorting to packaging can be performed automatically, except for visual inspection.

分包機構6としては、従来から用いられている錠剤分包機または散薬分包機の分包部を採用することが可能である。この場合、例えば、同一薬種毎に仕分けられた仕分カップ141内の薬剤を、一包または複数包に分包することができる。 As the packaging mechanism 6, it is possible to employ a packaging section of a conventionally used tablet packaging machine or powder medicine packaging machine. In this case, for example, the medicines in the sorting cup 141 that are sorted by the same medicine type can be divided into one package or a plurality of packages.

また、薬剤仕分装置1は、第1RFID(Radio Frequency Identifier)リーダ・ライタユニット5を備えている。第1RFIDリーダ・ライタユニット5は、図2の(b)に示すように、台座19の、薬剤の取出し側に設けられている。 The drug sorting device 1 also includes a first RFID (Radio Frequency Identifier) reader/writer unit 5. The first RFID reader/writer unit 5 is provided on the medicine extraction side of the pedestal 19, as shown in FIG. 2(b).

第1RFIDリーダ・ライタユニット5は、第2収容部14の各仕分カップ141の底部に設けられたRFIDタグ(不図示)に記憶された、各仕分カップ141に格納された薬剤に関するデータを読取る。当該データとしては、例えば、格納された薬剤の個数、薬剤データ、および撮像ユニット13が取得した画像データが挙げられる。当該データは、目視鑑査によって決定された薬剤データ(目視鑑査後の薬剤データ)を含んでもよい。また、上記RFIDタグに目視鑑査後の薬剤データを書込んでもよい。目視鑑査後の薬剤データは、対応する仕分カップ141に格納された薬剤を、(1)分包機構6、もしくは薬剤仕分装置1とは異なる分包機で分包する時、または(2)薬剤棚へ返却する時に用いられる。また、図2の(a)に示すように、薬剤仕分装置1は、薬剤の取出し側を開閉可能とする開閉シャッター51と開閉扉52とを備えている。 The first RFID reader/writer unit 5 reads data related to the medicine stored in each sorting cup 141, which is stored in an RFID tag (not shown) provided at the bottom of each sorting cup 141 in the second storage section 14. Examples of the data include the number of stored drugs, drug data, and image data acquired by the imaging unit 13. The data may include drug data determined by visual inspection (drug data after visual inspection). Moreover, drug data after visual inspection may be written in the RFID tag. The drug data after visual inspection is obtained when the drugs stored in the corresponding sorting cup 141 are packaged (1) by the packing mechanism 6 or a packing machine different from the drug sorting device 1, or (2) by the drug shelf. Used when returning to. Further, as shown in FIG. 2A, the medicine sorting device 1 includes an opening/closing shutter 51 and an opening/closing door 52 that can open and close the medicine extraction side.

〔薬剤仕分領域2の基本構成〕
次に、図1および図2の(b)を用いて、薬剤仕分領域2の基本構成(薬剤仕分装置1の内部構成)について説明する。
[Basic configuration of medicine sorting area 2]
Next, the basic configuration of the medicine sorting area 2 (internal configuration of the medicine sorting device 1) will be explained using FIG. 1 and FIG. 2(b).

図1および図2の(b)に示すように、薬剤仕分領域2は、ハードウェアとして主に、第1収容部11、搬送・仕分ユニット12(仕分部)、撮像ユニット13、第2収容部14、待機トレイ15、回収トレイ16、薬剤投入口17および第2RFIDリーダ・ライタユニット18を備える。そして、搬送・仕分ユニット12を除く各部材は台座19に設けられている。搬送・仕分ユニット12、撮像ユニット13、および第2RFIDリーダ・ライタユニット18の主要機能については、後述の各処理の説明において詳細に説明する。 As shown in FIGS. 1 and 2(b), the drug sorting area 2 mainly includes hardware such as a first storage section 11, a transport/sorting unit 12 (sorting section), an imaging unit 13, and a second storage section. 14, a standby tray 15, a collection tray 16, a medicine inlet 17, and a second RFID reader/writer unit 18. Each member except the conveyance/sorting unit 12 is provided on a pedestal 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 description of each process below.

第1収容部11は、ユーザによって返品された複数種類の薬剤を混在した状態で収容する。本実施例では、第1収容部11は、複数の収容部に分割されている。この場合、例えば、1つの収容部に収容された薬剤の全てが搬送・仕分ユニット12によって搬送されると、当該収容部に隣接する収容部に収容された薬剤が搬送対象となる。また、第1収容部11がZ軸(円柱形状の中心)に対して回動可能に設けられてもよい。この場合、コンピュータ(種類判別装置)60の制御部60aは、例えば1つの収容部が空になったタイミングで、搬送・仕分ユニット12が薬剤を取得しやすいように第1収容部11を回動させてもよい。 The first storage unit 11 stores a mixture of a plurality of types of medicines returned by users. In this embodiment, the first accommodating section 11 is divided into a plurality of accommodating sections. In this case, for example, when all of the medicines contained in one storage section are transported by the transport/sorting unit 12, the medicines stored in the storage section adjacent to the storage section are to be transported. Further, the first accommodating portion 11 may be provided so as to be rotatable about the Z axis (the center of the cylindrical shape). In this case, the control unit 60a of the computer (type discrimination device) 60 rotates the first storage section 11 so that the transport/sorting unit 12 can easily acquire the medicine, for example, when one storage section becomes empty. You may let them.

第2収容部14は、薬剤を種類毎に仕分けられた状態で収容する複数の仕分カップ141を備える。制御部60aは、撮像ユニット13で撮像された薬剤の画像に基づき薬剤の種類を判別し、その判別結果に基づき当該薬剤を格納する仕分カップ141を決定する。当該薬剤は、その決定された仕分カップ141に搬送・仕分ユニット12により搬送され、格納される。 The second storage section 14 includes a plurality of sorting cups 141 that store medicines sorted by type. The control unit 60a determines the type of medicine based on the image of the medicine taken by the imaging unit 13, and determines the sorting cup 141 in which to store the medicine based on the determination result. The medicine is transported to the determined sorting cup 141 by the transporting/sorting unit 12 and stored therein.

待機トレイ15は、薬剤が仮置きされる収容部である。例えば、仕分カップ141の全てに薬剤が格納されている場合に、制御部60aによりそれら以外の種類であると判別された薬剤が、待機トレイ15に仮置きされる。この場合、仕分カップ141から薬剤が取り除かれた後、待機トレイ15から当該仕分カップ141に搬送されてもよい。 The standby tray 15 is a storage section in which medicines are temporarily stored. For example, when medicines are stored in all of the sorting cups 141, medicines determined to be of a different type by the control unit 60a are temporarily placed on the standby tray 15. In this case, after the medicine is removed from the sorting cup 141, it may be transported from the standby tray 15 to the sorting cup 141.

また、本実施形態では、待機トレイ15には、薬剤であると推定された推定薬剤(後述)が仮置きされても構わない。推定薬剤が仮置きされた場合、制御部60aの判別結果に応じて、第2収容部14の所定領域に搬送される。 Further, in the present embodiment, an estimated drug (described later) that is estimated to be a drug may be temporarily placed on the standby tray 15. When the estimated medicine is temporarily stored, it is transported to a predetermined area of the second storage section 14 according to the determination result of the control section 60a.

回収トレイ16は、制御部60aにより種類が判別できなかった物(例:薬剤以外の異物)を格納する収容部である。薬剤以外の異物としては、例えば、PTP(Press Through Pack)シートの破片が挙げられる。PTPシートの破片は、薬剤の返品時に第1収容部11に混入する可能性がある。また、制御部60aは、薬剤データベースに廃棄する薬剤として登録されている薬剤、またはユーザが廃棄することを所望する薬剤(例:製造日の古い薬剤)についても、回収トレイ16に格納する。 The collection tray 16 is a storage unit that stores objects whose type cannot be determined by the control unit 60a (eg, foreign objects other than medicines). Examples of foreign substances other than drugs include fragments of PTP (Press Through Pack) sheets. Fragments of the PTP sheet may get mixed into the first storage section 11 when the medicine is returned. The control unit 60a also stores in the collection tray 16 drugs that are registered in the drug database as drugs to be discarded or drugs that the user desires to discard (eg, drugs with an old manufacturing date).

薬剤投入口17は、薬剤仕分装置1に分包機構6が備えられている場合に、第2収容部14に格納された薬剤を、搬送・仕分ユニット12により分包機構6へ搬送するためのものである。当然ながら、薬剤仕分装置1に分包機構6が備えられていない場合には、薬剤投入口17は不要な構成である。 The medicine input port 17 is used for transporting the medicine stored in the second storage section 14 to the packaging mechanism 6 by the transport/sorting unit 12 when the medicine sorting device 1 is equipped with the packaging mechanism 6 . It is something. Naturally, if the drug sorting device 1 is not equipped with the packaging mechanism 6, the drug inlet 17 is unnecessary.

また、図1に示すように、薬剤仕分装置1の上記各部材(ハードウェア)を統括して制御するコンピュータ60を備える。コンピュータ60は、制御部60aと記憶部80を備えている。そして、制御部60aには、搬送制御部61、仕分制御部62、撮像制御部63、判別部64、判別成否判定部65、操作入力部66、表示制御部67、RFID制御部68、印刷出力制御部69、登録部70、マスタ更新部71、および重み更新部(評価情報更新部)72が含まれる。搬送制御部61、仕分制御部62、撮像制御部63、判別部64、判別成否判定部65、マスタ更新部71、および重み更新部72については、後述の各処理の説明において詳細に説明する。記憶部80に予め記憶されているか、あるいは記憶される各情報についても後述する。 Further, as shown in FIG. 1, a computer 60 is provided which centrally controls each of the above-mentioned components (hardware) of the drug sorting device 1. The computer 60 includes a control section 60a and a storage section 80. The control section 60a includes a conveyance control section 61, a sorting control section 62, an imaging control section 63, a discrimination section 64, a discrimination success/failure determination section 65, an operation input section 66, a display control section 67, an RFID control section 68, and a print output section. A control section 69, a registration section 70, a master update section 71, and a weight update section (evaluation information update section) 72 are included. The conveyance control section 61, the sorting control section 62, the imaging control section 63, the discrimination section 64, the discrimination success/failure determination section 65, the master update section 71, and the weight update section 72 will be described in detail in the description of each process below. Each piece of information that is stored in advance or to be stored in the storage unit 80 will also be described later.

操作入力部66および表示制御部67は、それぞれタッチパネル3の操作部31および表示部32を制御する。RFID制御部68は、第1RFIDリーダ・ライタユニット5および第2RFIDリーダ・ライタユニット18を制御する。印刷出力制御部69は、操作入力部66が受け付けたユーザ入力に従って、印刷出力部4を制御する。なお、薬剤仕分装置1が分包機構6を備える場合には、制御部60aは、分包機構6を制御する分包制御部を備えることとなる。 The operation input section 66 and the display control section 67 control the operation section 31 and the display section 32 of the touch panel 3, respectively. The RFID control section 68 controls the first RFID reader/writer unit 5 and the second RFID reader/writer unit 18. The print output control section 69 controls the print output section 4 according to the user input received by the operation input section 66 . Note that when the drug sorting device 1 includes the packaging mechanism 6, the control section 60a includes a packaging control section that controls the packaging mechanism 6.

登録部70は、判別部64によって画像データに対応する薬剤データが存在しないと判定された薬剤に関する薬剤データを、薬剤データベース81に登録する。具体的には、登録部70は、判別部64により対応する薬剤データが存在しないと判定された薬剤について、当該薬剤の撮像画像82と、ユーザにより特定された薬剤データとを紐付けて薬剤データベース81に登録する。 The registration unit 70 registers, in the drug database 81, drug data regarding the drug for which the determining unit 64 determines that there is no drug data corresponding to the image data. Specifically, for a drug for which the determining unit 64 determines that no corresponding drug data exists, the registration unit 70 links the captured image 82 of the drug with the drug data specified by the user and stores it in the drug database. Register at 81.

また、コンピュータ60は記憶部80を備える。記憶部80には、複数種類の薬剤に関する薬剤データを管理する薬剤データベース(薬剤マスタ)81が予め記憶されていると共に、薬剤仕分装置1による仕分けが行われるにつれて、撮像画像82および判別成功色データ83が記憶される。撮像画像82は、第1カメラ131が撮像した画像である。なお、記憶部80に記憶された各種データは、記憶部80にて管理されていなくてもよく、例えば外部装置で管理されてもよい。この場合、制御部60aは、上記各種データを、必要に応じて、インターネット等の通信回線を通じて当該外部装置から取得してもよい。また、薬剤データベースは、新たな薬剤データが追加されることにより、更新されてもよい。 The computer 60 also includes a storage section 80 . The storage unit 80 stores in advance a drug database (drug master) 81 that manages drug data regarding multiple types of drugs, and as the drug sorting device 1 performs sorting, captured images 82 and discrimination success color data are stored in advance. 83 is stored. The captured image 82 is an image captured by the first camera 131. Note that the various data stored in the storage unit 80 may not be managed by the storage unit 80, but may be managed by an external device, for example. In this case, the control unit 60a may acquire the various data described above from the external device through a communication line such as the Internet, as necessary. Additionally, the drug database may be updated by adding new drug data.

〔薬剤仕分装置1における処理の概要〕
薬剤仕分装置1では、搬送・仕分ユニット12が、第1収容部11に返品された各薬剤を撮像ユニット13まで搬送する。搬送された各薬剤を順次撮像ユニット13が撮像する。制御部60aは、撮像された画像に基づき各薬剤の種類を判別するとともに、判別した各薬剤の第2収容部14における仕分位置を決定する。搬送・仕分ユニット12は、決定された仕分位置に各薬剤を搬送する。そして、第2収容部14に格納された薬剤についての情報は、仕分カップ141のRFIDタグに書き込まれたり、記憶部80に記憶されたり、タッチパネル3に表示されたりする。また、薬剤の仕分が完了した後、または仕分の途中において、ユーザがタッチパネル3を操作することで、目視鑑査、分包等の処理が行われる。以降、各処理について具体的に説明する。
[Outline of processing in drug sorting device 1]
In the medicine sorting device 1 , the transport/sorting unit 12 transports each medicine returned to the first storage section 11 to the imaging unit 13 . The imaging unit 13 sequentially images each transported drug. The control unit 60a determines the type of each medicine based on the captured image, and determines the sorting position of each determined medicine in the second storage unit 14. The transport/sorting unit 12 transports each medicine to the determined sorting position. Information about the medicines stored in the second storage section 14 is written to the RFID tag of the sorting cup 141, stored in the storage section 80, or displayed on the touch panel 3. Further, after the sorting of medicines is completed or during sorting, the user operates the touch panel 3 to perform processes such as visual inspection and packaging. Hereinafter, each process will be specifically explained.

〔撮像ユニット13への薬剤搬送処理〕
まず、第1収容部11から撮像ユニット13への薬剤搬送処理について、図1および図2の(a)を用いて説明する。
[Medicine transport process to imaging unit 13]
First, the process of transporting the medicine from the first storage section 11 to the imaging unit 13 will be explained using FIG. 1 and FIG. 2(a).

具体的には、搬送・仕分ユニット12は、第1収容部11に収容された薬剤を、撮像ユニット13が薬剤を受け入れる受入領域Ar1(図3の(b)参照)まで搬送させる。搬送制御部61は、搬送・仕分ユニット12による当該搬送処理を制御する。 Specifically, the transport/sorting unit 12 transports the medicine stored in the first storage section 11 to the receiving area Ar1 (see (b) of FIG. 3) where the imaging unit 13 receives the medicine. The conveyance control unit 61 controls the conveyance process by the conveyance/sorting unit 12.

搬送・仕分ユニット12は、第2カメラ121、吸着・シャッター機構122、および搬送機構123を備える。 The conveyance/sorting unit 12 includes a second camera 121, a suction/shutter mechanism 122, and a conveyance mechanism 123.

第2カメラ121は、搬送対象とする薬剤を特定するために、第1収容部11を逐次撮像する。撮像制御部63は、第2カメラ121の撮像処理を制御する。第2カメラ121は、搬送・仕分ユニット12の(具体的には、少なくとも吸着・シャッター機構122を含む筐体の)、台座19と対向する側の端部に設けられる。第2カメラ121は、後述の吸着機構の先端部に設けられてもよい。撮像制御部63は、撮像された画像を解析して、当該画像に薬剤が含まれるか否かを判定する。搬送制御部61は、薬剤が含まれると判定された場合には、例えば、上記先端部を第1収容部11に近づけ、そのとき撮像された画像に含まれる薬剤を搬送対象の薬剤として特定する。 The second camera 121 sequentially images the first container 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 conveyance/sorting unit 12 (specifically, the casing including at least the suction/shutter mechanism 122 ) on the side facing the pedestal 19 . The second camera 121 may be provided at the tip of the suction mechanism, which will be described later. The imaging control unit 63 analyzes the captured image and determines whether the image contains a drug. If it is determined that a drug is included, the transport control unit 61 brings the tip portion closer to the first storage unit 11 and identifies the drug included in the image captured at that time as the drug to be transported. .

吸着・シャッター機構122は、搬送対象として特定された薬剤を吸着する吸着機構と、吸着機構が吸着した薬剤が落下することを防止するシャッター機構とを含む。吸着機構はZ軸方向に移動可能に設けられる。シャッター機構は上記端部の前方に、XY平面と略平行に移動可能に設けられる。 The adsorption/shutter mechanism 122 includes an adsorption mechanism that adsorbs the drug specified as a transport target, and a shutter mechanism that prevents the drug adsorbed by the adsorption mechanism from falling. The suction mechanism is provided movably in the Z-axis direction. The shutter mechanism is provided in front of the end portion so as to be movable substantially parallel to the XY plane.

吸着機構は、薬剤取得時に、上記端部から延伸して、その先端部において、特定された薬剤を吸着した後、上記端部の位置まで戻る。この状態において、搬送制御部61は、上記端部と対向する位置にシャッター機構を移動させ、薬剤搬送中、シャッター機構の位置を維持する(閉状態とする)。搬送制御部61は、受入領域Ar1に配置された薬剤保持機構133の薬剤載置台133a(図3の(b)参照)と対向する位置まで吸着・シャッター機構122を移動させると、シャッター機構を上記端部と対向しない位置に移動させる(開状態とする)。そして、吸着機構を上記端部から延伸させた後、吸着状態を解除することにより、薬剤載置台133aに薬剤を載置する。 At the time of drug acquisition, the adsorption mechanism extends from the end, adsorbs the specified drug at its tip, and then returns to the end. In this state, the transport control unit 61 moves the shutter mechanism to a position facing the end, and maintains the position of the shutter mechanism (brings it into a closed state) during drug transport. When the transport control unit 61 moves the suction/shutter mechanism 122 to a position facing the drug mounting table 133a (see FIG. 3(b)) of the drug holding mechanism 133 arranged in the receiving area Ar1, the shutter mechanism moves to the above-mentioned position. Move it to a position where it does not face the end (open state). Then, after the suction mechanism is extended from the end, the suction state is released, thereby placing the medicine on the medicine mounting table 133a.

搬送機構123は、搬送制御部61の制御を受けて、X軸およびY軸方向に吸着・シャッター機構122を移動させる。この搬送機構123により、第1収容部11上での搬送対象となる薬剤の探索時の吸着・シャッター機構122の動き、または第1収容部11から薬剤載置台133aまでの薬剤搬送が可能となる。また、薬剤仕分処理においても、薬剤載置台133aから、第2収容部14、待機トレイ15または回収トレイ16への薬剤搬送が可能となる。なお、薬剤仕分処理では、仕分制御部62が、受入領域Ar1に配置された薬剤を、判別部64による判別結果に基づき、仕分ユニット12を制御して、第2収容部14の所定の仕分カップ141または待機トレイ15まで搬送する。 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 adsorption/shutter mechanism 122 when searching for a drug to be transported on the first storage section 11, or the transport of the drug from the first storage section 11 to the drug mounting table 133a. . Also, in the drug sorting process, the drug can be transported from the drug placement table 133a to the second storage section 14, the standby tray 15, or the collection tray 16. In the drug sorting process, the sorting control section 62 controls the sorting unit 12 to sort the drugs placed in the receiving area Ar1 into predetermined sorting cups of the second storage section 14 based on the discrimination result by the discriminating section 64. 141 or the standby tray 15.

〔薬剤撮像処理〕
次に、撮像ユニット13による薬剤撮像処理について、図1、図2の(b)、図3および図4を用いて説明する。図3の(a)および(b)は、撮像ユニット13の全体構成を示す斜視図であり、図3の(c)は、薬剤載置台133aの一例を示す斜視図である。図4の(a)および(b)は、撮像ユニット13の旋回について説明するための図である。上記薬剤撮像処理は、主として、撮像ユニット13および撮像制御部63により行われる。
[Drug imaging processing]
Next, drug imaging processing by the imaging unit 13 will be explained using FIG. 1, FIG. 2(b), FIG. 3, and FIG. 4. 3(a) and 3(b) are perspective views showing the overall configuration of the imaging unit 13, and FIG. 3(c) is a perspective view showing an example of the medicine mounting table 133a. (a) and (b) of FIG. 4 are diagrams for explaining the rotation of the imaging unit 13. The drug imaging process is mainly performed by the imaging unit 13 and the imaging control section 63.

具体的には、撮像ユニット13は、薬剤載置台133aに載置され、図3の(b)に示す撮像対象となる薬剤を配置する配置領域Ar2(撮像領域)に配置された薬剤を撮像する。撮像制御部63は、撮像ユニット13による当該撮像処理と、第1カメラ131および照明器134の旋回移動と、薬剤保持機構133の移動とを制御する。撮像ユニット13は、図1および図3に示すように、第1カメラ131(撮像部)、回転機構132(回動部)、薬剤保持機構133(薬剤載置台、移動機構)、および照明器134(紫外光照射部、可視光照射部)を備える。 Specifically, the imaging unit 13 images the drug placed on the drug placement table 133a in a placement area Ar2 (imaging area) where the drug to be imaged shown in FIG. 3(b) is placed. . The imaging control unit 63 controls the imaging processing 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 FIGS. 1 and 3, the imaging unit 13 includes a first camera 131 (imaging section), a rotating mechanism 132 (rotating section), a drug holding mechanism 133 (medicine mounting table, moving mechanism), and an illuminator 134. (Ultraviolet light irradiation section, visible light irradiation section).

第1カメラ131は、後述の判別部64において薬剤の種類を判別するために、第1カメラ131と対向する配置領域Ar2に配置された薬剤を撮像する。薬剤保持機構133は、薬剤を保持する機構であり、図3の(a)および(b)に示すように、薬剤載置台(シャーレ)133aと、旋回機構133b(移動機構)と、薬剤載置台133aおよび旋回機構133bを接続する軸部133cとを備える。薬剤載置台133aは、撮像対象となる薬剤を載置するものである。旋回機構133bは、薬剤載置台133aを移動させるものであり、具体的には、薬剤載置台133aをXY平面に対して旋回させるとともに、軸部133cを、軸部133cの周方向に旋回させる。 The first camera 131 images the medicine placed in the placement area Ar2 facing the first camera 131 in order to determine the type of medicine in the determination unit 64 described below. The drug holding mechanism 133 is a mechanism for holding drugs, and as shown in FIGS. 3(a) and 3(b), the drug holding mechanism 133 includes a drug mounting table (Petri dish) 133a, a rotating mechanism 133b (moving mechanism), and a drug mounting table. 133a and a shaft portion 133c connecting the rotating mechanism 133b. The drug placement table 133a is for placing a drug to be imaged. The turning mechanism 133b moves the drug mounting table 133a, and specifically, turns the drug mounting table 133a with respect to the XY plane and turns the shaft portion 133c in the circumferential direction of the shaft portion 133c.

撮像制御部63は、薬剤載置台133aに第1収容部11から搬送された薬剤が載置されると、旋回機構133bを駆動し、当該薬剤載置台133aを受入領域Ar1から配置領域Ar2へと移動させる。その後、少なくとも第1カメラ131および照明器134を制御して、配置領域Ar2に配置された薬剤を撮像する。撮像した画像は記憶部80に撮像画像82として記憶される。撮像制御部63は、例えば撮像が完了した後に、旋回機構133bを駆動し、撮像された薬剤が載置された薬剤載置台133aを配置領域Ar2から受入領域Ar1へと移動させる。 When the medicine transported from the first storage unit 11 is placed on the medicine placement table 133a, the imaging control unit 63 drives the rotation mechanism 133b to move the medicine placement table 133a from the receiving area Ar1 to the placement area Ar2. move it. Thereafter, at least the first camera 131 and the illuminator 134 are controlled to image the drug placed in the placement area Ar2. The captured image is stored in the storage unit 80 as a captured image 82. For example, after imaging is completed, the imaging control unit 63 drives the rotation mechanism 133b to move the medicine mounting table 133a on which the imaged medicine is placed from the placement area Ar2 to the receiving area Ar1.

本実施形態では、薬剤載置台133aは軸部133cの先端部(端部)に2つ設けられている。旋回機構133bは、軸部133cを旋回させることにより、一方の薬剤載置台133aを配置領域Ar2に配置したとき、他方の薬剤載置台133aを受入領域Ar1に配置する。配置領域Ar2での薬剤撮像時に、搬送・仕分ユニット12により、受入領域Ar1に存在する薬剤載置台133aに、第1収容部11から薬剤を搬送しておくことで、連続的な薬剤の撮像処理が可能となる。なお、当該薬剤載置台133aは、第2収容部14への薬剤仕分処理後等、薬剤が載置されていない状態であることが前提である。 In this embodiment, two drug mounting tables 133a are provided at the tip (end) of the shaft portion 133c. The rotating mechanism 133b rotates the shaft portion 133c, so that when one drug mounting table 133a is placed in the placement area Ar2, the other drug placing table 133a is placed in the receiving area Ar1. During drug imaging in the placement area Ar2, the transport/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 achieving continuous drug imaging processing. becomes possible. Note that it is assumed that the medicine placement table 133a is in a state where no medicine is placed on it, such as after the medicine has been sorted into the second accommodating section 14.

また、本実施形態では、薬剤載置台133aは透明性を有する。そのため、第1カメラ131は、薬剤載置台133aに載置された薬剤を、薬剤載置台133aを通して多方面から撮像できる。 Further, in this embodiment, the medicine mounting table 133a has transparency. Therefore, the first camera 131 can image the drug placed on the drug placement table 133a from various directions through the drug placement table 133a.

また、図3の(c)に示すように、薬剤載置台133aは底部が凹んだ状態の断面略V字形状であってもよい。また、図3の(b)および図4に示すように、薬剤載置台133aが受入領域Ar1および配置領域Ar2に配置されている場合、断面略V字形状の溝方向(軸部133cの延伸方向)は、回転機構132による撮像機構(後述)の旋回軸Ayに対して略平行である。また、薬剤載置台133aの底部は、鋭角なV字形状ではなくてよい。図3の(c)に示すように、底部は、底面部133aaと、底面部133aaの対向する2箇所から傾斜した傾斜面部133abとを備えていてもよい。底部の形状は、薬剤載置台133aの裏側から見ても(撮像しても)、薬剤の刻印またはプリントが示す情報(刻印情報または印字情報)を認識できる程度で、かつ薬剤が固定される程度の形状であればよい。 Further, as shown in FIG. 3C, the medicine table 133a may have a substantially V-shaped cross section with a concave bottom. Further, as shown in FIG. 3B and FIG. 4, when the drug placement table 133a is arranged in the receiving area Ar1 and the placement area Ar2, the direction of the groove having a substantially V-shaped cross section (the direction in which the shaft portion 133c extends) ) is substantially parallel to the rotation axis Ay of the imaging mechanism (described later) by the rotation mechanism 132. Further, the bottom of the medicine table 133a does not have to be in an acute V-shape. As shown in FIG. 3C, the bottom portion may include a bottom surface portion 133aa and sloped surface portions 133ab inclined from two opposing locations on the bottom surface portion 133aa. The shape of the bottom is such that the information indicated by the stamp or print on the drug (engraved information or printed information) can be recognized even when viewed from the back side of the drug placement table 133a (even when an image is taken), and the drug is fixed. Any shape is sufficient.

薬剤がカプセルまたは変形錠(例:ラグビーボール形)の場合、薬剤載置台133aの底部が平坦であれば、XY平面上で薬剤の向きがそろわずに、鮮明な薬剤の画像(刻印情報または印字情報)を取得することが困難になる可能性がある。断面略V字形状であれば、最下端部にカプセルまたは変形錠が嵌合され、当該薬剤を固定できる。そのため、鮮明な薬剤の画像が取得しやすくなる。なお、錠剤の場合には、例えば、軸部133cを軸部133cの周方向に旋回させることで、薬剤載置台133aの平面部分(傾斜面部133ab)を第1カメラ131に対向させることで、当該薬剤を確実に動かないようにしてもよい。 When the drug is a capsule or a modified tablet (e.g. rugby ball shape), if the bottom of the drug mounting table 133a is flat, the orientation of the drug will not be aligned on the XY plane and a clear image of the drug (engraved information or printed information) may be difficult to obtain. If the cross section is approximately V-shaped, a capsule or a modified tablet can be fitted to the lowermost end to fix the drug. Therefore, it becomes easier to obtain a clear image of the drug. In the case of a tablet, for example, by rotating the shaft portion 133c in the circumferential direction of the shaft portion 133c, the flat portion (sloped surface portion 133ab) of the medicine mounting table 133a is made to face the first camera 131, and the corresponding You may also ensure that the drug does not move.

その他、旋回機構133bは、薬剤載置台133aを振動させる(小さく動かす、ゆする)ことも可能である。この場合、例えば、薬剤載置台133aに載置されたカプセルに振動を与えて転がすことで、カプセルのプリントが付された部分を所定の方向に向かせることができる(例:当該部分を、後述の初期位置に配置された第1カメラ131と対向させることができる)。また、上記振動により、例えば円筒状(底部が円形状)の錠剤が上記平面部分に立った状態で載置されたとしても、錠剤を横に倒す(錠剤の底部が当該平面部分に対向するように配置する)ことができる。 In addition, the rotation mechanism 133b can also vibrate (move small, shake) the medicine table 133a. In this case, for example, by applying vibration to the capsule placed on the medicine table 133a and rolling it, the printed portion of the capsule can be directed in a predetermined direction (e.g., this portion will be described later). (can be made to face the first camera 131 placed at the initial position of). Furthermore, due to the vibration, even if a cylindrical tablet (with a circular bottom) is placed upright on the flat surface, the tablet will be turned sideways (so that the bottom of the tablet will face the flat surface). ).

照明器134は、撮像制御部63の制御により、薬剤の撮像時に、薬剤に照射される光を出射する。照明器134は、図3の(a)に示すように、薬剤に可視光を照射する可視光照射部(第1照射部134aおよび第2照射部134b)と、薬剤に紫外光を照射する紫外光照射部134cとを備える。 Under the control of the imaging control unit 63, the illuminator 134 emits light that is irradiated onto the medicine when imaging the medicine. As shown in FIG. 3A, the illuminator 134 includes a visible light irradiation section (a first irradiation section 134a and a second irradiation section 134b) that irradiates visible light onto the drug, and an ultraviolet irradiation section that irradiates the drug with ultraviolet light. A light irradiation section 134c is provided.

第1照射部134aおよび第2照射部134bは、可視光として白色光を薬剤に照射する。第1照射部134aはバー形状の可視光源(バー照明)であり、第2照射部134bはリング形状の可視光源(リング照明)である。第1カメラ131は、第1照射部134aまたは第2照射部134bから出射され、薬剤で反射した可視光を受光することにより、可視光に基づく画像(可視光画像)を取得する。撮像制御部63は、第1カメラ131が取得した可視光画像を示す画像データを撮像画像82として記憶部80に記憶する。 The first irradiation unit 134a and the second irradiation unit 134b irradiate the medicine with white light as visible light. The first irradiation section 134a is a bar-shaped visible light source (bar illumination), and the second irradiation section 134b is a ring-shaped visible light source (ring illumination). The first camera 131 acquires an image based on visible light (visible light image) by receiving visible light emitted from the first irradiation section 134a or the second irradiation section 134b and reflected by the drug. The imaging control unit 63 stores image data indicating the visible light image acquired by the first camera 131 in the storage unit 80 as a captured image 82 .

紫外光照射部134cは、薬剤に紫外光(例:365nm以上410nm以下のピーク波長を有する光)を照射することで、薬剤に含まれる成分を励起させる。これにより、薬剤から蛍光(例:410nm以上800nm以下のピーク波長を有する光)が取り出される。第1カメラ131は、薬剤から発せられた蛍光を受光することにより、紫外光に基づく画像(紫外光画像)を取得する。撮像制御部63は、第1カメラ131が取得した紫外光画像を示す画像データを撮像画像82として記憶部80に記憶する。 The ultraviolet light irradiation unit 134c excites components contained in the drug by irradiating the drug with ultraviolet light (eg, light having a peak wavelength of 365 nm or more and 410 nm or less). As a result, fluorescence (eg, light having a peak wavelength of 410 nm or more and 800 nm or less) is extracted from the drug. The first camera 131 acquires an image based on ultraviolet light (ultraviolet light image) by receiving fluorescence emitted from the drug. The imaging control unit 63 stores image data indicating the ultraviolet light image acquired by the first camera 131 in the storage unit 80 as a captured image 82 .

回転機構132は、図3および図4に示すように、撮像対象となる薬剤が配置される配置領域Ar2(当該位置に配置された薬剤載置台133a)の周囲を旋回するように第1カメラ131を回動させる。第1カメラ131は、回転機構132が回動させた複数の位置から、配置領域Ar2に配置された薬剤を撮像する。具体的には、第1カメラ131および照明器134を含む撮像機構を、配置領域Ar2の周囲を旋回するように回動させる。そのため、配置領域Ar2に対する第1カメラ131および照明器134の位置関係を維持したまま、第1カメラ131が複数の方向から薬剤を撮像できる。 As shown in FIGS. 3 and 4, the rotation mechanism 132 rotates the first camera 131 around the placement area Ar2 where the drug to be imaged is placed (the drug placement table 133a placed at the position). Rotate. The first camera 131 images the drug placed in the placement area Ar2 from a plurality of positions rotated by the rotation mechanism 132. Specifically, the imaging mechanism including the first camera 131 and the illuminator 134 is rotated around the arrangement area Ar2. Therefore, the first camera 131 can image the drug from a plurality of directions while maintaining the positional relationship of the first camera 131 and the illuminator 134 with respect to the arrangement area Ar2.

回転機構132は、図3の(a)に示すように、撮像機構駆動部132aと動力伝達機構132bとを含む。撮像機構駆動部132aは、撮像機構を配置領域Ar2の周囲を旋回させるための動力を発生する。動力伝達機構132bは、撮像機構駆動部132aが発生させた動力を撮像機構へと伝達する。撮像機構駆動部132aは、撮像制御部63の制御により駆動し、配置領域Ar2の周囲における撮像機構の位置を変更する。 The rotation mechanism 132 includes an imaging mechanism drive section 132a and a power transmission mechanism 132b, as shown in FIG. 3(a). The imaging mechanism drive unit 132a generates power for rotating the imaging mechanism around the arrangement area Ar2. The power transmission mechanism 132b transmits the power generated by the imaging mechanism drive section 132a to the imaging mechanism. The imaging mechanism driving section 132a is driven under the control of the imaging control section 63, and changes the position of the imaging mechanism around the arrangement area Ar2.

回転機構132は、撮像機構を、初期位置と、初期位置と対向する位置との間において旋回させる。初期位置とは、配置領域Ar2に対して略垂直方向の位置であって、配置領域Ar2の上方の位置である。初期位置と対向する位置とは、配置領域Ar2に対して略垂直方向の位置であって、配置領域Ar2の下方の位置である。また、当該位置は、第1カメラ131が配置領域Ar2に存在する薬剤載置台133aの底部と対向する位置であるともいえる。 The rotation mechanism 132 rotates the imaging mechanism between an initial position and a position facing the initial position. The initial position is a position substantially perpendicular to the arrangement area Ar2, and is a position above the arrangement area Ar2. The position facing the initial position is a position substantially perpendicular to the arrangement area Ar2, and is a position below the arrangement area Ar2. Further, this position can also be said to be a position where the first camera 131 faces the bottom of the medicine table 133a located in the arrangement area Ar2.

図4に示すように、配置領域Ar2の中心を通りZ軸と平行な軸を軸Ax0とし、配置領域Ar2の中心および撮像機構の中心を通る軸を軸Ax1とする。また、軸Ax0と軸Ax1とのなす角をθとする。本実施形態では、回転機構132は、撮像機構を、θ=0°(初期位置)、45°、135°および180°の位置のいずれかに配置する。なお、図4の(a)は撮像機構がθ=0°の位置にある場合を示し、図4の(b)は撮像機構が初期位置から旋回してθ=45°の位置にある場合を示す。 As shown in FIG. 4, an axis passing through the center of the arrangement area Ar2 and parallel to the Z-axis is defined as an axis Ax0, and an axis passing through the center of the arrangement area Ar2 and the center of the imaging mechanism is defined as an axis Ax1. Further, the angle formed by the axis Ax0 and axis Ax1 is assumed to be θ. In this embodiment, the rotation mechanism 132 places the imaging mechanism at any of the positions of θ=0° (initial position), 45°, 135°, and 180°. In addition, (a) of FIG. 4 shows the case where the imaging mechanism is at the position of θ=0°, and (b) of FIG. 4 shows the case where the imaging mechanism is rotated from the initial position to the position of θ=45°. show.

このように、撮像機構を配置領域Ar2の周囲を旋回させることにより、薬剤を配置領域Ar2に固定した状態で、複数の方向から薬剤を撮像できる。また、薬剤載置台133aをゆすっても薬剤(錠剤)が立っている場合であっても、斜め方向(θ=45°または135°)からの撮像で、薬剤に付された刻印等が示す情報を取得できる。 In this manner, by rotating the imaging mechanism around the placement area Ar2, images of the drug can be captured from a plurality of directions while the drug is fixed in the placement area Ar2. In addition, even if the drug (tablet) remains standing even when the drug table 133a is shaken, the information indicated by the markings etc. on the drug can be obtained by imaging from an oblique direction (θ=45° or 135°). can be obtained.

なお、撮像機構を固定し薬剤を回動させることで複数の方向から当該薬剤を撮像してもよい。 Note that the drug may be imaged from a plurality of directions by fixing the imaging mechanism and rotating the drug.

(撮像位置制御)
次に、撮像機構の位置制御の一例について説明する。撮像制御部63は、まず撮像機構を初期位置にセットし、第1カメラ131に、当該初期位置おいて配置領域Ar2に配置された薬剤を撮像させる。このとき、第1カメラ131は、第1照射部134aおよび第2照射部134bからの可視光に基づく可視光画像(2つの可視光画像)を取得するとともに、紫外光照射部134cからの紫外光に基づく紫外光画像を取得する。
(imaging 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 the initial position, and causes the first camera 131 to image the drug placed in the placement area Ar2 at the initial position. At this time, the first camera 131 acquires a visible light image (two visible light images) based on the visible light from the first irradiation section 134a and the second irradiation section 134b, and also acquires the ultraviolet light from the ultraviolet light irradiation section 134c. Obtain an ultraviolet light image based on

次に、撮像制御部63は、撮像機構を初期位置とは対向する位置にセットし、第1カメラ131に、当該位置において配置領域Ar2に配置された薬剤を撮像させ、2つの可視光画像および紫外光画像を取得する。判別部64は、これら6つの画像を解析することにより、薬剤の種類を判別する。薬剤の種類を1つに特定できなかった場合、撮像制御部63は、θ=45°および135°の位置において、第1照射部134aおよび第2照射部134bから可視光を出射させ、第1カメラ131に薬剤を撮像させる。判別部64は、このときの可視光画像を解析して薬剤の種類を判別する。 Next, the imaging control unit 63 sets the imaging mechanism to a position opposite to the initial position, causes the first camera 131 to image the drug placed in the placement area Ar2 at this position, and creates two visible light images and Acquire ultraviolet light images. The determining unit 64 determines the type of drug by analyzing these six images. If the type of drug cannot be identified as one, the imaging control unit 63 causes the first irradiation unit 134a and the second irradiation unit 134b to emit visible light at the positions of θ=45° and 135°, and The camera 131 is made to image the drug. The determining unit 64 analyzes the visible light image at this time and determines the type of drug.

上記に限らず、撮像機構の位置制御は種々の方法が挙げられる。例えば、初期位置と対向する位置から撮像した後、初期位置から撮像を行ってもよい。また、θ=45°の位置から撮像したときの可視光画像に基づく薬剤の判別処理を行い、薬剤の種類を1つに特定できなかった場合にのみθ=135°の位置から撮像したときの可視光画像を取得してもよい。また、初期位置および初期位置と対向する位置において紫外光画像のみを取得し、当該紫外光画像に基づく薬剤の判別処理を行った後、当該位置における可視光画像を取得してもよい。また、全ての位置において可視光画像および紫外光画像を取得してもよい。 The position control of the imaging mechanism is not limited to the above method, and various methods can be used. For example, after imaging from a position facing the initial position, imaging may be performed from the initial position. In addition, drug discrimination processing is performed based on the visible light image taken from the position of θ = 45°, and only when the type of drug cannot be identified as one, the image taken from the position of θ = 135° is processed. A visible light image may also be acquired. Alternatively, only ultraviolet light images may be acquired at the initial position and a position facing the initial position, and after performing drug discrimination processing based on the ultraviolet light image, a visible light image at the position may be acquired. Furthermore, visible light images and ultraviolet light images may be acquired at all positions.

〔画像処理・判別処理〕
次に、撮像ユニット13により撮像された画像に対する画像処理と、画像処理の結果に基づく薬剤の判別処理について、図1を用いて説明する。上記画像処理は、主として撮像制御部63により行われ、上記判別処理は、主として判別部64により行われる。
[Image processing/discrimination processing]
Next, image processing for an image captured by the imaging unit 13 and drug discrimination processing based on the result of the image processing will be described using FIG. 1. The above-mentioned image processing is mainly performed by the imaging control section 63, and the above-mentioned discrimination processing is mainly performed by the discriminating section 64.

判別部64は、第1カメラ131により撮像された薬剤の画像に基づき、薬剤の種類を判別する。具体的には、判別部64は、第1照射部134aまたは第2照射部134bから可視光が照射された状態で撮像された薬剤の撮像結果(可視光画像)に基づき、薬剤の種類を判別する。また、判別部64は、紫外光が照射された状態で撮像された薬剤の撮像結果(紫外光画像)に基づき、薬剤の種類を判別する。 The determining unit 64 determines the type of drug based on the image of the drug captured by the first camera 131. Specifically, the discrimination unit 64 discriminates the type of drug based on the imaging result (visible light image) of the drug that is imaged while being irradiated with visible light from the first irradiation unit 134a or the second irradiation unit 134b. do. Further, the determination unit 64 determines the type of medicine based on the imaging result (ultraviolet light image) of the medicine taken while being irradiated with ultraviolet light.

判別部64は、可視光画像および/または紫外光画像のそれぞれにおいて画像解析を実行することにより、当該画像に含まれる薬剤の特徴を抽出する。薬剤の特徴としては、例えば、大きさ、形状、刻印、プリント、割線、代表色(刻印またはプリントが付された領域の色)が挙げられる。OCR(Optical Character Recognition)等を行った場合には、薬剤の特徴として、刻印またはプリントにより表された薬剤名(例:識別コード)または製造元を示す識別情報(薬剤を識別する識別情報)、使用期限等のその他の情報が抽出される。また、紫外光画像の場合には、薬剤の特徴として、画像中の薬剤における代表色が挙げられる。判別部64は、抽出した各薬剤の特徴を示す情報を、薬剤の撮像画像82に紐づけて記憶部80に記憶する。なお、薬剤の特徴抽出は、公知の技術により行われてもよい。 The discrimination unit 64 extracts the characteristics of the drug included in each of the visible light images and/or ultraviolet light images by performing image analysis on each of the images. Characteristics of the drug include, for example, size, shape, stamp, print, dividing line, and representative color (the color of the region to which the stamp or print is attached). When performing OCR (Optical Character Recognition), etc., the characteristics of the drug include the drug name (e.g., identification code) stamped or printed, identification information indicating the manufacturer (identification information that identifies the drug), and the use of the drug. Other information such as deadline is extracted. Further, in the case of an ultraviolet light image, the representative color of the drug in the image can be cited as a characteristic of the drug. The determination unit 64 stores information indicating the characteristics of each extracted drug in the storage unit 80 in association with the captured image 82 of the drug. Note that the feature extraction of the drug may be performed using a known technique.

抽出した薬剤の特徴には、上述のように画像中の薬剤の代表色が含まれている。以下では、この代表色を示すデータを色データ(薬剤の色を示すデータ)と呼ぶ。色データには、可視光画像から生成されたものと、紫外光画像から生成されたものとが含まれる。なお、以下の説明では、特に断らない限り、単に「色データ」と記載した場合には、可視光画像から生成された色データと、紫外光画像から生成された色データの両方を指す。色データは、薬剤を撮像した画像における所定領域(薬剤が写っている領域の少なくとも一部、典型的には刻印またはプリントが付された領域)の色を示すデータである。例えば、当該領域に含まれる各画素のRGB値の平均値を色データとしてもよい。 The extracted drug characteristics include the representative color of the drug in the image, as described above. Hereinafter, data indicating this representative color will be referred to as color data (data indicating the color of the drug). The color data includes data generated from visible light images and data generated from ultraviolet light images. In the following description, unless otherwise specified, the term "color data" refers to both color data generated from visible light images and color data generated from ultraviolet light images. The color data is data indicating the color of a predetermined area (at least a part of the area where the drug is photographed, typically an area with a stamp or print) in an image of the drug. For example, the color data may be the average value of the RGB values of each pixel included in the area.

判別部64は、各薬剤の特徴を薬剤データベース81と照合することにより薬剤の種類を判別する。詳細は後述するが、判別部64は、色データに基づいて、薬剤データベースの中から、撮像された薬剤に関する薬剤データの候補を順位づけする。その後、判別部64は、上記順位に従って、他の特徴に基づく種類の判別を行う。 The determining unit 64 determines the type of drug by comparing the characteristics of each drug with the drug database 81. Although details will be described later, the determination unit 64 ranks drug data candidates related to the imaged drug from the drug database based on the color data. Thereafter, the determining unit 64 performs type determination based on other characteristics in accordance with the above ranking.

また、判別部64は、パターンマッチング等を用いて抽出した薬剤の特徴(対象特徴)が薬剤データベースに無い場合であっても、対象特徴の少なくとも一部に基づき薬剤(錠剤またはカプセル)であると推定される場合には、薬剤の種類を推定薬剤として判別する。この場合、推定薬剤も、第2収容部14または待機トレイ15への仕分け対象とすることができる。本実施形態では、推定薬剤は、まず待機トレイ15へ仮置きされても構わない。 Furthermore, even if the characteristics of the drug (target features) extracted using pattern matching or the like are not in the drug database, the determination unit 64 determines that the drug is a drug (tablet or capsule) based on at least part of the target features. If it is estimated, the type of drug is determined as a presumed drug. In this case, the estimated medicine can also be sorted into the second storage section 14 or the standby tray 15. In this embodiment, the estimated medicine may be temporarily placed on the standby tray 15 first.

このように、判別部64は、予め登録された複数種類の薬剤に関する薬剤データ(薬剤データベース81)の中に、第1カメラ131によって撮像された撮像画像82に対応する薬剤データが存在するか否かを判定している。 In this way, the determination 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) regarding multiple types of drugs registered in advance. We are determining whether

判別部64は、薬剤の種類の判別結果を仕分制御部62に出力する。例えば、薬剤の種類を1つに特定できた場合、または所定数以内の候補数に絞込んだ場合には、当該薬剤に関する薬剤データを判別結果として出力する。この場合、判別部64は、当該薬剤に関する薬剤データを、当該薬剤の撮像画像82に紐づけて記憶部80に記憶する。 The discrimination section 64 outputs the discrimination result of the drug type to the sorting control section 62 . For example, if one type of drug can be identified, or if the number of candidates is narrowed down to a predetermined number or less, drug data regarding the drug is output as the determination result. In this case, the determination unit 64 stores drug data regarding the drug in the storage unit 80 in association with the captured image 82 of the drug.

判別部64は、薬剤の種類を推定薬剤として判別した場合には、薬剤の特徴(推定薬剤として推定された物の特徴)を判別結果として出力する。一方、判別部64は、薬剤データベースに廃棄する薬剤として登録された薬剤であると判別した場合、または第1収容部11に収容された物が薬剤以外の異物であると判別した場合、仕分対象外の薬剤である旨を判別結果として出力する。 When determining the type of drug as a presumed drug, the determining unit 64 outputs the characteristics of the drug (characteristics of the object estimated as the presumed drug) as a determination result. On the other hand, if the discrimination unit 64 determines that the drug is registered as a drug to be discarded in the drug database, or if it determines that the object stored in the first storage unit 11 is a foreign object other than a drug, the discrimination unit 64 Outputs the fact that it is a foreign drug as a determination result.

〔判別成否判定〕
判別成否判定部65は、判別部64が薬剤の種類の判別に成功したか否かを判定する。例えば、判別成否判定部65は、判別部64が薬剤の種類を一意に判別することができた場合(薬剤の種類を1つに絞り込むことができた場合)に、判別成功と判定してもよい。また、例えば、判別成否判定部65は、判別部64の判定結果に従って仕分けられた薬剤の鑑査結果に基づいて上記判定を行ってもよい。鑑査は、仕分けられた薬剤そのものを鑑査員(例えば医師や薬剤師等)が目視することによって行ってもよいし、仕分けられた薬剤の画像を例えばタッチパネル3の表示部32に表示させ、表示された画像を鑑査員が目視することによって行ってもよい。また、鑑査結果は、例えば鑑査員がタッチパネル3の操作部31を操作することによってコンピュータ60に入力されてもよい。
[Judgment of success/failure]
The discrimination success/failure determination unit 65 determines whether or not the discrimination unit 64 has succeeded in determining the type of drug. For example, the discrimination success/failure determination unit 65 determines that the discrimination is successful when the discrimination unit 64 is able to uniquely discriminate the type of drug (in the case that the type of drug can be narrowed down to one). good. Further, for example, the discrimination success/failure determination section 65 may perform the above-mentioned determination based on the inspection results of the medicines sorted according to the determination results of the discrimination section 64. The inspection may be performed by visually inspecting the sorted drugs themselves by an inspector (for example, a doctor or pharmacist), or by displaying an image of the sorted drugs on the display section 32 of the touch panel 3. This may be done by having an inspector visually inspect the image. Further, the inspection results may be input into the computer 60 by, for example, an inspector operating the operation unit 31 of the touch panel 3.

また、判別成否判定部65は、判別部64が正しく判別したと判定した場合、判別部64が当該判別に用いた各種データと、判別部64が判別した種類とを紐付けて、判別成功データとして記憶部80に記憶する。本実施形態では、上記判別成功データが、判別部64が上記判別に用いた撮像画像82から生成された色データ(判別成功色データ83)である例を説明する。 Further, when the discrimination success/failure determination unit 65 determines that the discrimination unit 64 has correctly discriminated, the discrimination success/failure determination unit 65 links the various data used by the discrimination unit 64 for the discrimination with the type discriminated by the discrimination unit 64 to obtain discrimination success data. It is stored in the storage unit 80 as . In this embodiment, an example will be described in which the discrimination success data is color data (discrimination success color data 83) generated from the captured image 82 used by the discrimination unit 64 for the discrimination.

なお、判別成功データは、色データ以外の各種データ(判別部64が上記判別に用いた、薬剤の特徴を示すデータ)を含んでいてもよいし、判別部64が上記判別に用いた撮像画像82を判別成功データとして記憶してもよい。ただし、撮像画像82を判別成功データとする場合、記憶部80に記憶させるデータ量が多くなるため、本実施形態のように判別成功色データ83を判別成功データとして記憶する構成とすることが好ましい。 Note that the discrimination success data may include various data other than color data (data indicating characteristics of the drug used by the discrimination unit 64 in the above discrimination), or may include captured images used by the discrimination unit 64 in the above discrimination. 82 may be stored as discrimination success data. However, if the captured image 82 is used as discrimination success data, the amount of data to be stored in the storage unit 80 increases, so it is preferable to store the discrimination success color data 83 as discrimination success data as in this embodiment. .

〔薬剤データベース(マスタデータ)81の更新方法〕
図5に基づいて、薬剤データベース81の更新方法を説明する。図5は、薬剤データベース81の更新方法を説明する図である。以下説明するように、薬剤データベース81の更新はマスタ更新部71によって行われる。
[How to update the drug database (master data) 81]
A method for updating the drug database 81 will be explained based on FIG. 5. FIG. 5 is a diagram illustrating a method of updating the drug database 81. As explained below, the drug database 81 is updated by the master update unit 71.

薬剤データベース81には、複数種類の薬剤について、その薬剤に関する薬剤データがそれぞれ薬剤の照合用のマスタデータとして登録されている。また、図5に示すように、各種類の薬剤のマスタデータには、薬剤の特徴を示すデータの1つとして、当該薬剤の色を示す色データであるマスタ色データが含まれている。具体的には、図5の薬剤データベース81には、薬剤Aのマスタデータとしてマスタ色データ811aが登録されている。また、同様に、薬剤A、Bのマスタデータとして、マスタ色データ811b、811cがそれぞれ登録されている。なお、マスタ色データにも、可視光画像から生成されたものと、紫外光画像から生成されたものとが含まれる。 In the drug database 81, drug data regarding a plurality of types of drugs are registered as master data for drug verification. Further, as shown in FIG. 5, the master data for each type of drug includes master color data, which is color data indicating the color of the drug, as one of the data indicating the characteristics of the drug. Specifically, master color data 811a is registered in the drug database 81 in FIG. 5 as master data for drug A. Similarly, master color data 811b and 811c are registered as master data for medicines A and B, respectively. Note that the master color data also includes data generated from visible light images and data generated from ultraviolet light images.

また、上述のように、記憶部80には判別成功色データ83が記憶される。図5の例では、薬剤Aについて判別成功色データ83a~83cが記憶されている。つまり、この例では、薬剤仕分装置1が、種類不明の薬剤を薬剤Aであると仕分けし、その仕分けにおける種類の判別結果が正しかったことが過去に少なくとも3回はあったことを想定している。同様に、図5の例では、薬剤B、Cについて判別成功色データ83d~83eおよび83f~83hがそれぞれ記憶されている。 Furthermore, as described above, the storage unit 80 stores the discrimination success color data 83. In the example of FIG. 5, successful discrimination color data 83a to 83c for drug A are stored. In other words, in this example, it is assumed that the drug sorting device 1 has sorted a drug of unknown type as drug A, and that the type discrimination result in the sorting has been correct at least three times in the past. There is. Similarly, in the example of FIG. 5, successful discrimination color data 83d to 83e and 83f to 83h are stored for drugs B and C, respectively.

マスタ更新部71は、判別成功色データ83を、新たなマスタ色データとすることにより、薬剤データベース81(より詳細にはマスタデータに含まれるマスタ色データ)を更新する。この更新は各種類の薬剤のそれぞれについて行う。例えば、図5の例では、マスタ色データ811a~811cがそれぞれ更新される。 The master update unit 71 updates the medicine database 81 (more specifically, the master color data included in the master data) by using the successful discrimination color data 83 as new master color data. This update is performed for each type of drug. For example, in the example of FIG. 5, master color data 811a to 811c are each updated.

ここで、更新の際に、一種類の薬剤に対して、複数の判別成功色データ83が紐付けられて記憶されていれば、マスタ更新部71は、最新の(記憶されたタイミングが最も新しい)判別成功色データ83を新たなマスタ色データとすることが好ましい。これにより、撮像条件の変化等によって撮像画像82に写る薬剤の色が変化した場合であっても、適切に種類の判別を行うことが可能になる。なお、新たなマスタ色データを追加した後、更新前のマスタ色データ811a~811cは削除(言い換えれば上書き更新)してもよいし、記憶した状態のまま維持してもよい。 Here, at the time of updating, if a plurality of discrimination success color data 83 are associated and stored for one type of drug, the master update unit 71 updates the latest (the stored timing is the latest ) It is preferable to use the successfully discriminated color data 83 as new master color data. Thereby, even if the color of the drug appearing in the captured image 82 changes due to changes in imaging conditions, etc., it is possible to appropriately determine the type. Note that after adding new master color data, the master color data 811a to 811c before being updated may be deleted (in other words, overwritten) or may be maintained in the stored state.

〔色スコアの算出方法〕
判別部64は、仕分けの対象薬剤を撮像した撮像画像82(以下、対象画像と呼ぶ)から生成された色データである対象色データとマスタ色データとの類似度を示す色スコアを算出する。なお、1つの対象画像には可視光画像と紫外光画像とが含まれる。色スコアの算出式(類似度評価情報)は、例えば下記のような算出式であってもよい。
[How to calculate color score]
The determining unit 64 calculates a color score indicating the degree of similarity between the target color data, which is color data generated from a captured image 82 (hereinafter referred to as a target image) of a drug to be sorted, and master color data. Note that one target image includes a visible light image and an ultraviolet light image. The color score calculation formula (similarity evaluation information) may be, for example, the following calculation formula.

(色スコア)=(可視光画像におけるRGB値の類似度)×w
+(可視光画像におけるCIELab値の類似度)×w
+(紫外光画像におけるRGB値の類似度)×w
+(紫外光画像におけるCIELab値の類似度)×w
上記算出式におけるw~wは重みであり、w~wの和は例えば1であるが、w~wの和が1未満の値あるいは1より大きい値となっても構わない。重みw~wの値を適切に調整することによって、対象色データとマスタ色データとの類似度をより正確に反映させた色スコアを算出することができる。例えば、ある薬剤のマスタ色データにおいて、その薬剤を可視光で撮像した画像に基づくCIELab値がその薬剤の色の特徴を的確に反映したものとなっている場合がある。このような場合、wが他の重みよりも相対的に大きくなっていれば、算出される色スコアは、薬剤の色の特徴を的確に反映した、可視光撮像画像に基づくCIELab値の類似度の影響を強く受ける。よって、wを他の重みよりも相対的に大きくした上記算出式を用いることにより、実際の類似度を正確に反映させた色スコアを算出することができる。詳細は後述するが、実際の類似度を正確に反映させた色スコアを算出することができる状態が維持されるように、w~wは重み更新部72によって随時更新される。w~wの初期値は適宜定めておけばよい。
(Color score) = (Similarity of RGB values in visible light image) x w 1
+ (Similarity of CIELab values in visible light images) x w 2
+ (similarity of RGB values in ultraviolet light image) x w 3
+ (Similarity of CIELab values in ultraviolet light images) x w 4
In the above calculation formula, w 1 to w 4 are weights, and the sum of w 1 to w 4 is, for example, 1, but the sum of w 1 to w 4 may be a value less than 1 or a value greater than 1. do not have. By appropriately adjusting the values of the weights w 1 to w 4 , it is possible to calculate a color score that more accurately reflects the similarity between the target color data and the master color data. For example, in master color data for a certain drug, CIELab values based on an image of the drug captured using visible light may accurately reflect the color characteristics of the drug. In such a case, if w2 is relatively larger than the other weights, the calculated color score will be based on the similarity of the CIELab values based on the visible light image, which accurately reflects the color characteristics of the drug. strongly influenced by degree. Therefore, by using the above calculation formula in which w 2 is relatively larger than other weights, it is possible to calculate a color score that accurately reflects the actual degree of similarity. Although details will be described later, w 1 to w 4 are updated as needed by the weight updating unit 72 so that a state in which a color score that accurately reflects the actual similarity can be calculated is maintained. The initial values of w 1 to w 4 may be determined as appropriate.

なお、上記算出式におけるRGB値とは、薬剤を撮像した画像における所定領域(薬剤が写っている領域の少なくとも一部)の色をR値、G値、およびB値の組み合わせで表した値であり、典型的には当該領域に含まれる各画素のRGB値の平均値である。また、RGB値の類似度とは、対象画像のRGB値と、マスタ色データが示すRGB値との類似度である。RGB値の類似度の算出方法は特に限定されない。例えば、対象画像のRGB値とマスタ色データが示すRGB値とをそれぞれ三次元ベクトルとみなし、それら2つのベクトル間の距離を類似度としてもよい。なお、上記算出式では、RGB値の類似度とCIELab値の類似度とを加算するので、これらの類似度は例えば0~1の数値範囲となるように規格化しておく。 Note that the RGB value in the above calculation formula is a value that represents the color of a predetermined area (at least a part of the area where the drug is captured) in the image of the drug as a combination of the R value, G value, and B value. Typically, it is the average value of the RGB values of each pixel included in the area. Furthermore, the degree of similarity of RGB values is the degree of similarity between the RGB values of the target image and the RGB values indicated by the master color data. The method for calculating the similarity of RGB values is not particularly limited. For example, the RGB values of the target image and the RGB values indicated by the master color data may be regarded as three-dimensional vectors, and the distance between these two vectors may be defined as the degree of similarity. Note that in the above calculation formula, the similarity of RGB values and the similarity of CIELab values are added, so these similarities are normalized to fall within the numerical range of 0 to 1, for example.

また、上記算出式におけるCIELab値とは、薬剤を撮像した画像における所定領域(薬剤が写っている領域の少なくとも一部)の色をCIELab色空間におけるL*値、a*値、およびb*値の組み合わせで表した値である。CIELab値は、RGB値をまずXYZ色空間における値に変換し、その値をさらにCIELab色空間における値に変換することにより算出することができる。CIELab値の類似度は、上述したRGB値の類似度と同様にして算出することができる。 In addition, the CIELab value in the above calculation formula refers to the color of a predetermined area (at least a part of the area where the drug is captured) in the image of the drug as the L* value, a* value, and b* value in the CIELab color space. It is a value expressed as a combination of . The CIELab value can be calculated by first converting the RGB value into a value in the XYZ color space, and then further converting the value into a value in the CIELab color space. The similarity of CIELab values can be calculated in the same manner as the similarity of RGB values described above.

〔色スコアによる順位づけ〕
薬剤データベース81には各種類の薬剤のマスタ色データが登録されている。判別部64は、これらのマスタ色データのそれぞれについて、上述のようにして対象色データとの色スコアを算出する。そして、判別部64は、算出した色スコアの高い順に、各種類の薬剤のマスタデータを順位づけする。この後、判別部64は、順位の高いマスタデータから順に、対象画像との照合を行う。つまり、判別部64は、対象色データと、各種類の薬剤に対応するマスタ色データのそれぞれとの類似度を示す色スコアを算出すると共に、該色スコアの順に、対象画像の特徴を示す情報とマスタデータとの照合を行って対象薬剤の種類を判別する。照合においては、例えばマスタデータに含まれる刻印情報(薬剤の刻印の内容を示す情報)と、対象画像からOCR等によって読み取った刻印情報との照合等が行われ、対象薬剤の種類が特定される。
[Ranking by color score]
Master color data for each type of medicine is registered in the medicine database 81. The determining unit 64 calculates the color score of each of these master color data with respect to the target color data as described above. Then, the determining unit 64 ranks the master data of each type of medicine in descending order of the calculated color score. Thereafter, the determining unit 64 performs matching with the target image in order of master data starting from the highest rank. That is, the discrimination unit 64 calculates a color score indicating the degree of similarity between the target color data and each of the master color data corresponding to each type of drug, and also calculates information indicating the characteristics of the target image in the order of the color score. and the master data to determine the type of target drug. In the comparison, for example, the stamp information included in the master data (information indicating the content of the stamp on the drug) is compared with the stamp information read from the target image by OCR etc., and the type of target drug is identified. .

このような順位づけを行う理由としては、一般に、薬剤には色が類似したものが多い点が挙げられる。つまり、対象色データとの色スコアが同程度の値となるマスタ色データが複数生じることもあり、また、対象色データとの色スコアが最も高いマスタ色データの薬剤が、対象薬剤とは異なる薬剤であることもある。このため、色スコアのみで対象薬剤の種類を一意に特定することは一般に難しい。 The reason for this ranking is that, in general, many drugs have similar colors. In other words, there may be multiple pieces of master color data that have the same color score as the target color data, and the drug in the master color data that has the highest color score with the target color data is different from the target drug. It may also be a drug. For this reason, it is generally difficult to uniquely identify the type of target drug using only the color score.

そこで、判別部64は、色スコアをマスタデータとの照合における順位づけに用いている。色データは、刻印情報等の読み取りと比べて、簡易かつ短時間の情報処理によって生成できるから、色スコアの算出および照合も簡易に短時間で行うことが可能である。よって、色スコアによる順位づけを行うことにより、順位づけを行うことなくマスタデータとの照合を行う場合と比べて、短時間で照合を完了することが可能になる。また、以下説明するように、重み更新部72が色スコアの算出式の重みを適切に更新するので、例えば対象薬剤が薬剤Aであった場合には、薬剤Aのマスタ色データの順位が高くなりやすい。よって、マスタデータとの照合をより短時間で完了させることが可能になる。 Therefore, the determination unit 64 uses the color score for ranking in comparison with master data. Since color data can be generated through information processing that is simpler and takes less time than reading stamped information, etc., calculation and verification of color scores can also be done easily and in a short time. Therefore, by ranking based on color scores, it is possible to complete the matching in a shorter time than when matching with master data is performed without ranking. Furthermore, as will be explained below, the weight updating unit 72 appropriately updates the weight of the color score calculation formula, so for example, if the target drug is drug A, the master color data of drug A is ranked high. Prone. Therefore, it becomes possible to complete the comparison with the master data in a shorter time.

〔色スコアの算出式における重みの更新方法〕
図6に基づいて、上述した色スコアの算出式における重み(w~w)の更新方法について説明する。図6は、色スコアの算出式における重みの更新方法を説明する図である。以下説明するように、色スコアの算出式における重みの更新は重み更新部72によって行われる。
[How to update the weights in the color score calculation formula]
A method for updating the weights (w 1 to w 4 ) in the color score calculation formula described above will be explained based on FIG. 6. FIG. 6 is a diagram illustrating a method for updating weights in a color score calculation formula. As explained below, the weights in the color score calculation formula are updated by the weight updating unit 72.

重みの更新には、複数の判別成功色データ83を用いる。図6の例では、薬剤A~Zのそれぞれに複数の判別成功色データ83が紐付けられている。重み更新部72は、これらの判別成功色データ83を訓練データとして、確率的勾配降下法により、色スコアの算出式における重みを最適なものに更新する。確率的勾配降下法を用いることにより、最適ではない局所解を抜けて、最適解に到達することが期待できる。 A plurality of pieces of successfully discriminated color data 83 are used to update the weights. In the example of FIG. 6, a plurality of discrimination success color data 83 are linked to each of drugs A to Z. The weight updating unit 72 uses the successfully discriminated color data 83 as training data to update the weights in the color score calculation formula to the optimum weights using stochastic gradient descent. By using stochastic gradient descent, we can expect to bypass suboptimal local solutions and arrive at the optimal solution.

具体的には、まず、重み更新部72は、判別成功色データ83から所定数のミニバッチデータを作成する。この作成において、各ミニバッチデータには、全種類の薬剤について少なくとも1つの判別成功色データ83が含まれるようにし、かつ、各ミニバッチデータに含まれる判別成功色データ83の数が所定範囲内に収まるようにする。 Specifically, first, the weight updating unit 72 creates a predetermined number of mini-batch data from the successfully discriminated color data 83. In this creation, each mini-batch data includes at least one successful discrimination color data 83 for all types of drugs, and the number of successful discrimination color data 83 included in each mini-batch data is within a predetermined range. so that it fits.

図6には、薬剤A~Zのそれぞれについて1つの判別成功色データ83が含まれるn個のミニバッチデータB1~Bnを記載している。nは、薬剤データベース81に登録されている薬剤の種類数や、前回の重みの更新後の経過時間等に応じて決定すればよく、例えば40程度であってもよい。なお、1つの判別成功色データ83を複数のミニバッチデータに含めてもよい。 FIG. 6 shows n pieces of mini-batch data B1 to Bn that include one successful discrimination color data 83 for each of drugs A to Z. n may be determined depending on the number of types of drugs registered in the drug database 81, the elapsed time since the last weight update, etc., and may be about 40, for example. Note that one piece of successful discrimination color data 83 may be included in a plurality of mini-batch data.

次に、重み更新部72は、作成したミニバッチデータを用いて、確率的勾配降下法により、重み(w~w)を更新する。更新後の重みが、更新前の重みよりも妥当な値となっているか否かは、当該更新後の重みを用いて算出した色スコアから判定することができる。例えば、各種類の薬剤のマスタ色データと判別成功色データ83とについて、色スコアをそれぞれ算出して、その色スコアの順位から判定することもできる。 Next, the weight updating unit 72 uses the created mini-batch data to update the weights (w 1 to w 4 ) using the stochastic gradient descent method. Whether the updated weight is a more appropriate value than the pre-updated weight can be determined from the color score calculated using the updated weight. For example, color scores can be calculated for the master color data of each type of medicine and the successful discrimination color data 83, and the determination can be made based on the ranking of the color scores.

例えば、図6の例では、薬剤A~Zの26種類の薬剤についてマスタ色データが登録されている。そして、ミニバッチデータBnには、薬剤Aの判別成功色データ83bが含まれている。このミニバッチデータBnを用いた重みの更新においては、薬剤Aのマスタ色データと判別成功色データ83bとについて算出した色スコアの順位が高くなるように重みを更新すればよい。具体的な計算内容については以下で説明するが、この更新においては、可視光RGB値の重み(w)を+scaleする。なお、+scaleは、重みの変化量(正の数)である。同様に、他の重み(w~w)についても+scaleする。このように、確率的勾配降下法では、各重みを所定の変化量(+scale)ずつ変化させながら、最適な重みを探索する演算を行う。 For example, in the example of FIG. 6, master color data is registered for 26 types of drugs A to Z. The mini-batch data Bn includes successful discrimination color data 83b for drug A. In updating the weights using this mini-batch data Bn, the weights may be updated so that the color scores calculated for the master color data of drug A and the successful discrimination color data 83b are ranked higher. The specific calculation contents will be explained below, but in this update, the weight (w 1 ) of the visible light RGB value is +scaled. Note that +scale is the amount of change in weight (positive number). Similarly, the other weights (w 2 to w 4 ) are also scaled up. In this manner, in the stochastic gradient descent method, calculations are performed to search for optimal weights while changing each weight by a predetermined amount of change (+scale).

具体的には、上記演算には勾配平均を用いる。勾配平均は、例えば下記の数式で算出することができる。なお、下記の数式におけるZは1つのミニバッチデータに含まれる判別成功色データ83の数である。また、Σは、1つのミニバッチデータにおける1番目の判別成功色データ83からZ番目の判別成功色データ83までの和を表す。また、平均順位は、各ミニバッチデータに含まれる判別成功色データ83から算出した順位を、全てのミニバッチデータで平均した値である。なお、順位づけの方法は「色スコアによる順位づけ」で上述したとおりであるから説明は繰り返さない。 Specifically, gradient averaging is used in the above calculation. The gradient average can be calculated using the following formula, for example. Note that Z in the following formula is the number of successfully discriminated color data 83 included in one mini-batch data. Further, Σ represents the sum of the first successfully determined color data 83 to the Zth successfully determined color data 83 in one mini-batch data. Furthermore, the average rank is a value obtained by averaging the ranks calculated from the successfully discriminated color data 83 included in each mini-batch data for all the mini-batch data. Note that the ranking method is the same as described above in "ranking based on color score", so the explanation will not be repeated.

(勾配平均)={Σ(重みをずらした後の平均順位-重みをずらす前の平均順位)/重みの変化量}/Z
そして、重み更新部72は、下記の数式により重みを更新する。なお、学習率は適宜設定すればよい。
(Gradient average) = {Σ(Average rank after shifting the weight - Average rank before shifting the weight)/Amount of change in weight}/Z
Then, the weight updating unit 72 updates the weight using the following formula. Note that the learning rate may be set as appropriate.

(更新後の重み)=(現在の重み)-(学習率×勾配平均)
〔判別成功色データ83を記憶する処理の流れ〕
図7に基づいて判別成功色データ83を記憶する処理の流れを説明する。図7は、判別成功色データ83を記憶する処理の一例を示すフローチャートである。なお、図7では、種類不明の対象薬剤の撮像が行われて、記憶部80に撮像画像82が記憶された後の処理の流れを示している。
(Updated weight) = (current weight) - (learning rate x gradient average)
[Flow of processing for storing successful discrimination color data 83]
The flow of processing for storing the successfully discriminated color data 83 will be explained based on FIG. FIG. 7 is a flowchart illustrating an example of a process for storing the successful discrimination color data 83. Note that FIG. 7 shows the flow of processing after the target drug of unknown type is imaged and the captured image 82 is stored in the storage unit 80.

まず、判別部64は、対象画像から対象色データを生成する(S1)。続いて、判別部64は、S1で生成した対象色データと、薬剤データベース81に登録されているマスタ色データのそれぞれとの類似度を示す色スコアを算出する(S2)。そして、判別部64は、マスタデータとの照合順を、S2で算出した色スコアの高い順とし(S3)、その照合順で照合を行い(S4)、対象薬剤の種類を判別する(S5)。 First, the determination unit 64 generates target color data from the target image (S1). Subsequently, the determination unit 64 calculates a color score indicating the degree of similarity between the target color data generated in S1 and each piece of master color data registered in the drug database 81 (S2). Then, the discrimination unit 64 sets the order of comparison with the master data in the order of the highest color score calculated in S2 (S3), performs the comparison in the order of comparison (S4), and discriminates the type of target drug (S5). .

次に、S5にて対象薬剤の種類の判別に成功したことを受け、判別成否判定部65は、S1で生成された対象色データをS5で判別された種類の薬剤の判別成功色データ83として記憶部80に記憶し、図7の処理は終了する。 Next, in response to the successful discrimination of the type of target drug in S5, the discrimination success/failure determination unit 65 uses the target color data generated in S1 as discrimination success color data 83 for the type of drug discriminated in S5. The information is stored in the storage unit 80, and the process of FIG. 7 is completed.

〔薬剤データベース81を更新する処理の流れ〕
図8に基づいて薬剤データベース81を更新する処理の流れを説明する。図8は、薬剤データベース81を更新する処理の一例を示すフローチャートである。
[Flow of processing for updating drug database 81]
The flow of processing for updating the drug database 81 will be explained based on FIG. 8. FIG. 8 is a flowchart illustrating an example of a process for updating the drug database 81.

まず、マスタ更新部71は、薬剤データベース81を更新するか否か、より詳細には薬剤データベース81に含まれるマスタ色データを更新するか否かを判定する(S11)。マスタ色データの更新条件は特に限定されない。例えば、コンピュータ60の動作終了時(例えば一日の終り)に更新するようにしてもよい。また、例えば、所定期間(例えば1日)毎に更新の要否を問い合わせるメッセージをユーザに提示し、そのメッセージに対して、更新する旨のユーザ入力が行われたときにマスタ色データを更新してもよい。また、例えば、直近数回の種類判別の平均処理時間(撮像後、判別結果が出るまでの時間)が所定時間以上であること、撮像リトライの発生頻度が閾値以上であること(種類判別の失敗頻度が閾値以上であること)等を条件としてもよい。この他にも、例えば、前回の更新から所定期間(例えば30日)経過したことを条件として、マスタ色データを更新してもよい。 First, the master update unit 71 determines whether or not to update the drug database 81, more specifically, whether or not to update the master color data included in the drug database 81 (S11). The conditions for updating the master color data are not particularly limited. For example, the information may be updated when the computer 60 finishes operating (for example, at the end of the day). Also, for example, a message asking the user whether update is necessary is presented to the user every predetermined period (for example, one day), and when the user inputs a request to update in response to the message, the master color data is updated. It's okay. In addition, for example, the average processing time for the most recent type discrimination (the time from image capture to the generation of the discrimination result) is longer than a predetermined time, and the frequency of imaging retries is greater than or equal to a threshold (failure in type discrimination). The condition may be that the frequency is equal to or higher than a threshold value. In addition to this, for example, the master color data may be updated on the condition that a predetermined period (for example, 30 days) has passed since the previous update.

S12では、マスタ更新部71は、記憶部80に記憶されている判別成功色データ83のうち、最新の(記憶されたタイミングが最も新しい)判別成功色データ83を取得する。そして、S13では、マスタ更新部71は、S12で取得した判別成功色データ83を、新たなマスタ色データとして薬剤データベース81に追加する。これにより、図8の処理は終了する。なお、S12およびS13の処理は、少なくとも一種類の薬剤について行えばよく、例えば薬剤データベース81に登録されている全種類の薬剤について行ってもよいし、一部の種類の薬剤について行ってもよい。 In S12, the master update unit 71 acquires the latest (the latest stored timing) successful discrimination color data 83 from among the successful discrimination color data 83 stored in the storage unit 80. Then, in S13, the master update unit 71 adds the successful discrimination color data 83 acquired in S12 to the drug database 81 as new master color data. As a result, the process in FIG. 8 ends. Note that the processes in S12 and S13 may be performed for at least one type of drug; for example, they may be performed for all types of drugs registered in the drug database 81, or may be performed for some types of drugs. .

このように、判別部64は、対象画像から生成された、対象薬剤の外観の特徴を示す情報と、前記マスタデータとを照合し、該照合の結果に基づいて前記対象薬剤の種類を判別する(図7のS5)。そして、マスタ更新部71は、判別部64が対象薬剤の種類の判別に成功したときに、当該判別に使用された判別成功色データ83を、新たなマスタ色データとする(図8のS13)。 In this way, the determination unit 64 compares the master data with information indicating the appearance characteristics of the target drug generated from the target image, and determines the type of the target drug based on the result of the comparison. (S5 in FIG. 7). Then, when the discrimination unit 64 successfully discriminates the type of target drug, the master update unit 71 sets the discrimination success color data 83 used for the discrimination as new master color data (S13 in FIG. 8). .

したがって、薬剤仕分装置1によれば、対象薬剤の撮像によって得られる対象画像が、マスタデータの作成時に想定していたものから変化した場合であっても、適切に種類の判別を行うことができる。これにより、例えば薬剤仕分装置1をある薬局に導入した場合に、デフォルトのマスタデータを、その薬局における撮像条件に適合したものに更新することができる。また、薬剤仕分装置1の導入後に、撮像装置や照明装置等の経時劣化によって、撮像画像の色味が変化した場合にも、適切に種類の判別を行うことができる状態を維持することができる。 Therefore, according to the drug sorting device 1, even if the target image obtained by imaging the target drug changes from what was assumed at the time of creating the master data, it is possible to appropriately discriminate the type. . Thereby, for example, when the drug sorting device 1 is introduced into a certain pharmacy, the default master data can be updated to one that matches the imaging conditions at that pharmacy. Furthermore, even if the color of the captured image changes due to deterioration of the imaging device, lighting device, etc. over time after the introduction of the drug sorting device 1, it is possible to maintain a state in which the type can be appropriately distinguished. .

〔色スコアの算出式における重みを更新する処理の流れ〕
図9に基づいて色スコアの算出式における重みを更新する処理の流れを説明する。図9は、色スコアの算出式における重みを更新する処理の一例を示すフローチャートである。なお、図9の処理を行う条件は特に限定されない。例えば、薬剤仕分装置1が日時更新の要否を問い合わせるメッセージをユーザに提示し、そのメッセージに対して日時更新を行う旨のユーザ操作が行われた場合に、日時更新を行う前に図9の処理を開始してもよい。なお、日時更新は、図9の処理が終了次第行われる。また、例えば、前回の重みの更新から所定期間(例えば30日)経過したことを条件として図9の処理を開始してもよいし、所定数の判別成功色データ83が蓄積されたことを条件として図9の処理を開始してもよい。また、マスタ色データの更新が行われたときには、更新後のマスタ色データに対して、現行の重みが適切な値となっていない可能性があるため、マスタ色データの更新が行われたことを条件として図9の処理を開始してもよい。
[Processing flow for updating the weights in the color score calculation formula]
The flow of processing for updating the weights in the color score calculation formula will be explained based on FIG. FIG. 9 is a flowchart illustrating an example of a process for updating the weights in the color score calculation formula. Note that the conditions for performing the process in FIG. 9 are not particularly limited. For example, when the drug sorting device 1 presents a message to the user asking whether or not to update the date and time, and the user performs an operation to update the date and time in response to the message, the medicine sorting device 1 displays the message shown in FIG. 9 before updating the date and time. Processing may begin. Note that the date and time update is performed as soon as the processing in FIG. 9 is completed. Further, for example, the process of FIG. 9 may be started on the condition that a predetermined period of time (for example, 30 days) has passed since the last update of the weights, or on the condition that a predetermined number of successfully discriminated color data 83 has been accumulated. The process in FIG. 9 may be started as follows. Also, when the master color data is updated, the current weight may not be an appropriate value for the updated master color data, so it is important to note that the master color data has been updated. The processing in FIG. 9 may be started under the condition that:

まず、重み更新部72は、記憶部80に記憶されている所定期間の判別成功色データ83を取得する(S21)。例えば、上記所定期間が30日間であれば、重み更新部72は、直近30日に記憶された全ての判別成功色データ83を取得する。そして、重み更新部72は、S21で取得した判別成功色データ83からミニバッチデータを作成し(S22)、作成したミニバッチデータを用いて色スコアの算出式における重みを最適化する(S23)。 First, the weight updating unit 72 acquires the successfully determined color data 83 for a predetermined period stored in the storage unit 80 (S21). For example, if the predetermined period is 30 days, the weight update unit 72 acquires all the successfully discriminated color data 83 stored in the most recent 30 days. Then, the weight updating unit 72 creates mini-batch data from the successfully discriminated color data 83 acquired in S21 (S22), and optimizes the weight in the color score calculation formula using the created mini-batch data (S23). .

なお、S23では、過去に重みが更新されていた場合であっても、更新後の重み値ではなく、重みの初期値から最適化演算を行うことが好ましい。これにより、最適化後の重み値が、重みの初期値からかけ離れた値となりにくくすることができるので、安定した最適化が可能になる。 Note that in S23, even if the weights have been updated in the past, it is preferable to perform the optimization calculation from the initial values of the weights rather than the updated weight values. This makes it possible to prevent the weight value after optimization from being a value that is far from the initial value of the weight, thereby making it possible to perform stable optimization.

次に、重み更新部72は、S23で算出した重み(最適化した重み)が、現行の重み(過去に更新が行われている場合には直近の更新後の重み)よりも高精度な値となっているか否かを判定する(S24)。なお、重みの精度の評価は、その重みを適用した算出式によって算出された色スコアに基づいて行えばよい。例えば、重み更新部72は、S21で取得した判別成功色データ83の一部または全部について色スコアを算出して色スコアの順位を求め、平均順位が高くなっているか否かにより、重みが高精度な値となっているか否かを判定してもよい。なお、色スコアの順位とは、ある薬剤の判別成功色データ83と各種類の薬剤のマスタ色データとで算出した各色スコアのうち、上記ある薬剤の判別成功色データ83と当該ある薬剤の判別成功色データ83とで算出した色スコアの順位である。 Next, the weight updating unit 72 determines that the weight calculated in S23 (optimized weight) is a value with higher accuracy than the current weight (the weight after the most recent update if an update has been performed in the past). It is determined whether or not (S24). Note that the accuracy of the weights may be evaluated based on the color score calculated by a calculation formula to which the weights are applied. For example, the weight updating unit 72 calculates color scores for some or all of the successfully discriminated color data 83 acquired in S21 to determine the ranking of the color scores, and determines whether the average ranking is high or not. It may be determined whether the value is accurate. Note that the ranking of the color score refers to the color score calculated from the successful discrimination color data 83 of a certain drug and the master color data of each type of drug, and the ranking of the successful discrimination color data 83 of the drug and the discrimination of the drug. This is the ranking of the color score calculated using the successful color data 83.

S24において高精度な値となっていると判定された場合(S24でYES)、S25の処理に進み、重み更新部72は、現行の重みの代わりにS23で算出した重みを適用する。これにより、以後の仕分けにおいては更新後の重みが使用される。一方、高精度な値となっていないと判定された場合(S24でNO)、図9の処理は終了する。つまり、この場合には重みは更新されず、以後の仕分けにおいては現行の重みが引き続き使用される。 If it is determined in S24 that the value is highly accurate (YES in S24), the process proceeds to S25, and the weight updating unit 72 applies the weight calculated in S23 instead of the current weight. As a result, the updated weights are used in subsequent sorting. On the other hand, if it is determined that the value is not highly accurate (NO in S24), the process in FIG. 9 ends. That is, in this case the weights are not updated and the current weights continue to be used in subsequent sorting.

以上のように、重み更新部72は、複数の判別成功色データ83を訓練データとして取得し(S21)、取得した訓練データを用いて色スコアの算出式(より詳細には色スコアの算出式における重みw~w)を更新する(S25)。したがって、薬剤仕分装置1によれば、対象薬剤の撮像によって得られる対象画像が、マスタデータの作成時に想定していたものから変化した場合であっても、またマスタ色データが更新された後であっても、適切な重み値を用いて算出した適切な色スコアに基づき、適切に種類の判別を行うことができる。 As described above, the weight updating unit 72 acquires a plurality of successfully discriminated color data 83 as training data (S21), and uses the acquired training data to form a color score calculation formula (more specifically, a color score calculation formula). The weights w 1 to w 4 ) are updated (S25). Therefore, according to the drug sorting device 1, even if the target image obtained by imaging the target drug changes from what was assumed at the time of creating the master data, or even after the master color data is updated. Even if there is, the type can be appropriately determined based on an appropriate color score calculated using an appropriate weight value.

〔変形例〕
上記実施形態では、ミニバッチを用いた確率的勾配降下法により重みを更新する例を示したが、重みの更新には他のアルゴリズムを適用することもできる。例えば、ミニバッチを用いない確率的勾配降下法を用いてもよいし、局所解の問題を考慮する必要がなければ、通常の勾配降下法を用いてもよい。また、勾配降下法以外の最適化アルゴリズムを適用することもできる。
[Modified example]
In the above embodiment, an example was shown in which weights are updated by stochastic gradient descent using mini-batch, but other algorithms can also be applied to update weights. For example, a stochastic gradient descent method that does not use mini-batches may be used, or if there is no need to consider the problem of local solutions, a normal gradient descent method may be used. Moreover, optimization algorithms other than gradient descent can also be applied.

また、薬剤データベース81の更新処理と重みの更新処理の少なくとも何れかを、薬剤仕分装置1の外部の情報処理装置(コンピュータ)に実行させてもよい。この場合、当該情報処理装置を薬剤仕分装置1と通信可能な状態としておくことにより、情報処理装置から、薬剤仕分装置1が使用する薬剤データベース81と色スコアの算出式における重みを更新することができる。 Further, an information processing device (computer) external to the drug sorting device 1 may be made to execute at least one of the drug database 81 update process and the weight update process. In this case, by keeping the information processing device in a state where it can communicate with the drug sorting device 1, the information processing device can update the drug database 81 used by the drug sorting device 1 and the weight in the color score calculation formula. can.

〔実施形態2〕
本発明の他の実施形態について、以下に説明する。なお、説明の便宜上、上記実施形態にて説明した部材と同じ機能を有する部材については、同じ符号を付記し、その説明を繰り返さない。
[Embodiment 2]
Other embodiments of the invention will be described below. For convenience of explanation, members having the same functions as the members described in the above embodiment are given the same reference numerals, and the description thereof will not be repeated.

〔薬剤仕分装置の構成〕
図10は、本実施形態に係る薬剤仕分装置1が備える制御部60bの要部構成の一例を示すブロック図である。なお、図10では、本実施形態に特徴的な構成を中心に図示しているが、制御部60bには図1に示した制御部60aに含まれる他のブロックも含まれていてもよい。
[Configuration of drug sorting device]
FIG. 10 is a block diagram showing an example of the main configuration of the control section 60b included in the medicine sorting device 1 according to the present embodiment. Note that although FIG. 10 mainly shows the configuration characteristic of this embodiment, the control section 60b may also include other blocks included in the control section 60a shown in FIG. 1.

制御部60bには、マーク検出部73と類似性判定部74と一致判定部75と判別部64とが含まれている。また、類似性判定部74には、741-1から741-nまでのn個の識別器が含まれている。なお、nは2以上の整数である。また、各識別器を区別する必要がないときには、単に識別器741と記載する。 The control section 60b includes a mark detection section 73, a similarity determination section 74, a match determination section 75, and a discrimination section 64. Further, the similarity determination unit 74 includes n discriminators 741-1 to 741-n. Note that n is an integer of 2 or more. Further, when there is no need to distinguish each classifier, it is simply written as a classifier 741.

本実施形態の薬剤仕分装置1も、実施形態1の薬剤仕分装置1と同様に、種類不明の対象薬剤を撮像した撮像画像から、その対象薬剤の種類を判別する。そして、この判別は実施形態1と同様に判別部64が行う。本実施形態では、判別部64の判定材料の1つとして、対象薬剤のマークが薬剤の照合用のマスタデータに登録されている登録マークと一致するか否かを複数の識別器741を用いて判定する点で実施形態1と相違している。 Similarly to the drug sorting device 1 of Embodiment 1, the drug sorting device 1 of this embodiment also determines the type of a target drug from a captured image of an unknown type of target drug. This discrimination is performed by the discrimination unit 64 as in the first embodiment. In this embodiment, as one of the determination materials of the discriminator 64, a plurality of discriminators 741 are used to determine whether the mark of the target drug matches a registered mark registered in master data for drug verification. This embodiment differs from the first embodiment in the point of determination.

より詳細には、マーク検出部73は、対象薬剤に形成されたマークを撮像画像から検出する。続いて、類似性判定部74が、マーク検出部73が検出した検出マークと、薬剤の照合用のマスタデータに登録されている登録マークとの類似性を、複数の識別器741により判定する。そして、一致判定部75は、各識別器741による判定の結果に基づいて検出マークと登録マークとが一致するか判定する。 More specifically, the mark detection unit 73 detects a mark formed on the target drug from the captured image. Subsequently, the similarity determining unit 74 determines the similarity between the detection mark detected by the mark detecting unit 73 and the registered mark registered in the master data for drug verification using a plurality of discriminators 741. Then, the match determining unit 75 determines whether the detection mark and the registered mark match based on the results of the determination by each discriminator 741.

上記の構成によれば、複数の識別器741による類似性の判定結果に基づいて検出マークと登録マークとが一致するか判定する。したがって、マークの一致判定の精度を高めることが可能になる。そして、判別部64は、マーク検出部73の判定結果に基づいて対象薬剤の種類を判別するので、マークを的確に考慮して対象薬剤の種類判別の精度を高めることができる。 According to the above configuration, it is determined whether the detection mark and the registration mark match based on the similarity determination results by the plurality of discriminators 741. Therefore, it is possible to improve the accuracy of mark matching determination. Since the determining unit 64 determines the type of target drug based on the determination result of the mark detection unit 73, it is possible to improve the accuracy of determining the type of target drug by accurately considering the mark.

一般に、薬剤に形成されたマークは、その形状がバリエーションに富んでいるため、OCR(optical character reader)等による識別は難しい。また、マークが薬剤の表面を彫り込むことにより形成される場合には、撮像時の薬剤への光の当たり方により撮像画像へのマークの写り方が変わるため、一致判定の精度を上げることが難しかった。しかし、上記の構成によれば、薬剤の表面を彫り込むことにより形成されたマークについても、高精度に一致判定を行うことが可能である。 In general, marks formed on drugs have a wide variety of shapes, so it is difficult to identify them using an OCR (optical character reader) or the like. Additionally, if the mark is formed by carving the surface of the drug, the way the mark appears in the captured image changes depending on how the light hits the drug during imaging, so it is difficult to improve the accuracy of match determination. was difficult. However, according to the above configuration, it is possible to perform a match determination with high precision even for marks formed by engraving the surface of a drug.

〔情報処理装置の構成〕
上述の類似性判定部74と一致判定部75は、情報処理装置100によって構築される。ここでは、情報処理装置100の構成を図11に基づいて説明する。図11は、情報処理装置100の要部構成の一例を示すブロック図である。
[Configuration of information processing device]
The above-described similarity determining section 74 and matching determining section 75 are constructed by the information processing apparatus 100. Here, the configuration of the information processing device 100 will be explained based on FIG. 11. FIG. 11 is a block diagram illustrating an example of the configuration of main parts of the information processing device 100.

情報処理装置100は、情報処理装置100の各部を統括して制御する制御部110と、情報処理装置100が使用する各種データを記憶する記憶部150を備えている。また、情報処理装置100は、情報処理装置100に対する入力を受け付ける入力部130、および情報処理装置100がデータを出力するための出力部140を備えている。 The information processing device 100 includes a control unit 110 that centrally controls each unit of the information processing device 100, and a storage unit 150 that stores various data used by the information processing device 100. The information processing device 100 also includes an input unit 130 that receives input to the information processing device 100, and an output unit 140 that allows the information processing device 100 to output data.

制御部110には、識別器群生成部111、判定領域設定部112、類似性判定部113、評価部114、選抜部115、重み設定部116、信頼度算出部117、および識別器構築部118が含まれている。また、記憶部150には、識別器DB(データベース)151、登録マークDB152、および学習用DB153が記憶されている。 The control unit 110 includes a classifier group generation unit 111, a determination area setting unit 112, a similarity determination unit 113, an evaluation unit 114, a selection unit 115, a weight setting unit 116, a reliability calculation unit 117, and a classifier construction unit 118. It is included. The storage unit 150 also stores a classifier DB (database) 151, a registration mark DB 152, and a learning DB 153.

識別器群生成部111は、類似性判定部113が類似性の判定に使用する識別器群を生成する。具体的には、識別器群生成部111は、識別器DB151に格納されている識別器が類似性判定に用いる閾値のバリエーションを増やすことにより、1131-1から1131-NまでのN個の識別器からなる識別器群を生成する。この識別器群により類似性判定部113が構成される。なお、Nは2以上の整数である。また、各識別器を区別する必要がないときには、単に識別器1131と記載する。 The classifier group generation unit 111 generates a classifier group that the similarity determination unit 113 uses to determine similarity. Specifically, the classifier group generation unit 111 generates N classifications from 1131-1 to 1131-N by increasing the variations of the threshold values used for similarity determination by the classifiers stored in the classifier DB 151. Generate a discriminator group consisting of a classifier. This classifier group constitutes the similarity determination unit 113. Note that N is an integer of 2 or more. Further, when there is no need to distinguish each classifier, it is simply written as a classifier 1131.

判定領域設定部112は、撮像画像における検出マークが写っている領域を区分して、類似性判定部113が類似性の判定を行う対象となる判定領域を複数設定する。判定領域の設定については図12に基づいて後述する。 The determination area setting unit 112 divides the area in which the detection mark is shown in the captured image, and sets a plurality of determination areas on which the similarity determination unit 113 performs similarity determination. Setting of the determination area will be described later based on FIG. 12.

類似性判定部113は、識別器群生成部111が生成した識別器群に含まれる各識別器1131を用いて、登録マークDB152に格納されている登録マーク画像に写る登録マークと学習用DB153に含まれる各テスト画像に写るマークとの類似性の判定を行う。上述のように、この判定は、判定領域設定部112が設定した判定領域毎に行う。なお、テスト画像の詳細は図12に基づいて後述する。 The similarity determination unit 113 uses each classifier 1131 included in the classifier group generated by the classifier group generation unit 111 to compare the registration mark reflected in the registration mark image stored in the registration mark DB 152 and the learning DB 153. The similarity with the mark appearing in each included test image is determined. As described above, this determination is performed for each determination area set by the determination area setting unit 112. Note that details of the test image will be described later based on FIG. 12.

評価部114は、類似性判定部113に含まれる各識別器1131による類似性の判定結果を評価する。評価手法は、各識別器1131の類似性の判定精度に応じた評価値を算出できるものであればよい。本実施形態では、評価部114が、各識別器1131のエラー率を算出する例を説明する。エラー率は、類似性の判定を行った総回数に対する判定結果が誤りであった回数の割合を示す数値であり、エラー率が低いほど類似性の判定精度は高いといえる。 The evaluation unit 114 evaluates the similarity determination results by each classifier 1131 included in the similarity determination unit 113. The evaluation method may be any method as long as it can calculate an evaluation value according to the similarity determination accuracy of each classifier 1131. In this embodiment, an example will be described in which the evaluation unit 114 calculates the error rate of each classifier 1131. The error rate is a numerical value indicating the ratio of the number of times the determination result was incorrect to the total number of times the similarity determination was performed, and it can be said that the lower the error rate, the higher the accuracy of the similarity determination.

選抜部115は、識別器群生成部111が生成した識別器群、すなわち類似性判定部113に含まれる識別器1131の中から、評価部114が評価した類似性の判定精度に基づいて複数の識別器を選抜する。また、選抜部115は、この選抜において、重み設定部116が設定した重みを考慮する。 The selection unit 115 selects a plurality of classifiers from the classifier group generated by the classifier group generation unit 111, that is, the classifiers 1131 included in the similarity determination unit 113, based on the similarity determination accuracy evaluated by the evaluation unit 114. Select a classifier. In addition, the selection unit 115 considers the weight set by the weight setting unit 116 in this selection.

重み設定部116は、各識別器1131による類似性の判定対象となる各テスト画像に重みを設定する。重みの設定方法および重みを考慮した識別器の選抜方法については、図14に基づいて後述する。 The weight setting unit 116 sets a weight for each test image to be subjected to similarity determination by each classifier 1131. A method for setting weights and a method for selecting a classifier in consideration of weights will be described later based on FIG. 14.

信頼度算出部117は、選抜部115が選抜した各識別器の信頼度を算出する。詳細は後述するが、この信頼度は、薬剤仕分装置1による一致判定で用いられる。また、信頼度の算出方法についても後述する。 The reliability calculation unit 117 calculates the reliability of each classifier selected by the selection unit 115. Although the details will be described later, this reliability is used in the match determination by the medicine sorting device 1. Further, a method for calculating reliability will also be described later.

識別器構築部118は、選抜部115が選抜した複数の識別器を用いて、検出マークと登録マークとが一致するか否かを判定するための識別器を構築する。そして、薬剤仕分装置1は、識別器構築部118が構築した識別器を用いて一致判定を行う。 The classifier construction unit 118 constructs a classifier for determining whether or not the detection mark and the registered mark match, using the plurality of classifiers selected by the selection unit 115. Then, the drug sorting device 1 uses the discriminator constructed by the discriminator constructing unit 118 to perform a match determination.

識別器DB151には、薬剤の撮像画像から検出された検出マークと、薬剤の照合用のマスタデータに登録されている登録マークとの類似性を判定する識別器が格納されている。上述のように、識別器群生成部111が識別器DB151に格納されている識別器の閾値のバリエーションを増やし、これにより選抜部115による選抜の対象となる識別器群が生成される。このため、識別器DB151には、少なくとも1種類の識別器が格納されていればよい。ただし、複数種類の識別器が格納されていれば、複数種類の識別器から選抜された識別器からなる、より判定精度の高い識別器を構築し得るため好ましい。識別器DB151に格納されている識別器の具体例は後述する。 The discriminator DB 151 stores a discriminator that determines the similarity between a detection mark detected from a captured image of a drug and a registered mark registered in master data for drug verification. As described above, the classifier group generation unit 111 increases the variation of the threshold values of the classifiers stored in the classifier DB 151, thereby generating a classifier group to be selected by the selection unit 115. For this reason, the discriminator DB 151 only needs to store at least one type of discriminator. However, it is preferable if multiple types of classifiers are stored, since it is possible to construct a classifier with higher determination accuracy, which is made up of classifiers selected from the multiple types of classifiers. Specific examples of the classifiers stored in the classifier DB 151 will be described later.

登録マークDB152には、実施形態1の薬剤データベース81に薬剤の照合用のマスタデータとして登録されている、登録マークが写っている画像である登録マーク画像が格納されている。登録マーク画像は、薬剤データベース81に格納されているマスタ画像812からマークが写っている部分を切り出すことによって生成されたものであってもよい。 The registered mark DB 152 stores a registered mark image, which is an image showing a registered mark, which is registered as master data for drug verification in the drug database 81 of the first embodiment. The registered mark image may be generated by cutting out a portion of the mark from the master image 812 stored in the drug database 81.

学習用DB153には、上述のように、各識別器1131の類似性の判定精度の評価に用いるテスト画像が格納されている。テスト画像の詳細は図12に基づいて後述する。 As described above, the learning DB 153 stores test images used for evaluating the similarity determination accuracy of each classifier 1131. Details of the test image will be described later based on FIG. 12.

以上のように、情報処理装置100は、撮像画像から検出された検出マークと登録マークとの類似性を判定する識別器1131-1~1131-Nの中から、類似性の判定精度に基づいて複数の識別器を選抜する選抜部115を備えている。また、情報処理装置100は、選抜部115が選抜した複数の識別器を用いて、検出マークと登録マークとが一致するか否かを判定するための識別器を構築する識別器構築部118を備えている。 As described above, the information processing device 100 selects one of the discriminators 1131-1 to 1131-N that determines the similarity between the detection mark detected from the captured image and the registration mark based on the similarity determination accuracy. It includes a selection unit 115 that selects a plurality of discriminators. The information processing device 100 also includes a classifier construction unit 118 that constructs a classifier for determining whether or not the detection mark and the registration mark match, using the plurality of classifiers selected by the selection unit 115. We are prepared.

上記の構成によれば、類似性の判定精度に基づいて選抜された複数の識別器による判定結果に基づいて検出マークと登録マークとが一致するかを判定するための識別器を構築することができる。そして、本実施形態の薬剤仕分装置1は、このようにして構築された識別器を用いることにより、マークの一致判定を高精度に行うことが可能になり、その判定結果に基づく対象薬剤の種類判別も高精度に行うことが可能になる。 According to the above configuration, it is possible to construct a discriminator for determining whether a detected mark and a registered mark match based on the determination results of a plurality of discriminators selected based on similarity determination accuracy. can. By using the discriminator constructed in this manner, the drug sorting device 1 of the present embodiment can perform mark matching judgment with high precision, and the type of target drug based on the judgment result. It also becomes possible to perform discrimination with high accuracy.

〔判定領域の設定〕
図12は、判定領域の設定例を示す図である。より詳細には、図12には、マスタ画像812から登録マークのマスタデータである登録マーク画像1521を生成し、この登録マーク画像1521にA2-1からA2-MまでのM個の判定領域を設定した例を示している。
[Setting the judgment area]
FIG. 12 is a diagram showing an example of setting the determination area. More specifically, in FIG. 12, a registration mark image 1521, which is the master data of the registration mark, is generated from the master image 812, and M determination areas from A2-1 to A2-M are added to this registration mark image 1521. An example of the settings is shown.

図12に示すマスタ画像812においては、錠剤T1が写っていると共に、錠剤T1の表面部分にマークT11と番号T12が写っている。登録マーク画像1521は、このようなマスタ画像812からマークが写っている領域A1を検出し、この部分を切り出すことにより生成される。切り出した画像はそのまま登録マーク画像1521としてもよいし、所定サイズに拡大あるいは縮小する等の処理を行った上で登録マーク画像1521としてもよい。登録マーク画像1521は、登録マークDB152に格納される。 In the master image 812 shown in FIG. 12, a tablet T1 is shown, and a mark T11 and a number T12 are shown on the surface of the tablet T1. The registered mark image 1521 is generated by detecting an area A1 in which the mark is shown from such a master image 812 and cutting out this portion. The cut out image may be used as the registration mark image 1521 as it is, or may be used as the registration mark image 1521 after processing such as enlarging or reducing it to a predetermined size. The registration mark image 1521 is stored in the registration mark DB 152.

判定領域設定部112は、登録マーク画像1521に複数の判定領域を設定する。図12の例では、A2-1からA2-MまでのM個の判定領域を設定している。なお、Mは2以上の整数である。また、各判定領域を区別する必要がないときには、単に判定領域A2と記載する。 The determination area setting unit 112 sets a plurality of determination areas in the registered mark image 1521. In the example of FIG. 12, M determination areas from A2-1 to A2-M are set. Note that M is an integer of 2 or more. Further, when there is no need to distinguish each determination area, it is simply written as determination area A2.

判定領域設定部112は、登録マーク画像1521の全画像領域が、少なくとも何れかの判定領域A2に含まれるように判定領域を設定することが好ましい。また、図12の例における判定領域A2-1とA2-2のように、判定領域設定部112は、一部が重畳するように判定領域を設定してもよい。また、判定領域設定部112は、判定領域A2-1とA2-Mのようにサイズの異なる判定領域を設定してもよいし、形状の異なる判定領域を設定してもよい。 It is preferable that the determination area setting unit 112 sets the determination area so that the entire image area of the registered mark image 1521 is included in at least one of the determination areas A2. Furthermore, the determination area setting unit 112 may set the determination areas so that they partially overlap, like the determination areas A2-1 and A2-2 in the example of FIG. Further, the determination area setting unit 112 may set determination areas having different sizes, such as determination areas A2-1 and A2-M, or may set determination areas having different shapes.

判定領域2Aの個数および各判定領域2Aのサイズは特に限定されない。ただし、識別器1131による類否判定に支障が出ない程度のサイズおよび個数、つまり各判定領域2Aにマークの特徴が表れる程度のサイズおよび個数とすることが好ましい。一例として、判定領域設定部112は、数百個の判定領域A2を設定してもよい。 The number of determination areas 2A and the size of each determination area 2A are not particularly limited. However, it is preferable that the size and number of marks be set to such an extent that the similarity determination by the classifier 1131 is not hindered, that is, the size and number are such that the characteristics of the marks appear in each determination area 2A. As an example, the determination area setting unit 112 may set several hundred determination areas A2.

なお、判定領域設定部112は、自動で判定領域2Aを設定してもよい。例えば、判定領域設定部112は、所定サイズの判定領域2Aを所定の方向に所定の距離だけずらしながら登録マーク画像1521の全画像領域をカバーする複数の判定領域2Aを設定してもよい。また、判定領域設定部112は、例えば、入力部130を介したユーザの入力に従って各判定領域2Aを設定してもよい。 Note that the determination area setting unit 112 may automatically set the determination area 2A. For example, the determination area setting unit 112 may set a plurality of determination areas 2A that cover the entire image area of the registered mark image 1521 while shifting the determination area 2A of a predetermined size by a predetermined distance in a predetermined direction. Further, the determination area setting unit 112 may set each determination area 2A according to a user's input via the input unit 130, for example.

また、判定領域設定部112は、テスト画像に対しても登録マーク画像1521と同じ判定領域A2を設定する。テスト画像は、登録マーク画像1521との類似性判定の対象となる画像であり、学習用DB153に格納されている。 The determination area setting unit 112 also sets the same determination area A2 as the registered mark image 1521 for the test image. The test image is an image to be determined for similarity with the registered mark image 1521, and is stored in the learning DB 153.

学習用DB153に格納されているテスト画像には、登録マーク画像1521に写るマークと同一のマークが写ったテスト画像1531と、登録マーク画像1521に写るマークとは異なるマークが写ったテスト画像1532がそれぞれ複数含まれている。テスト画像1531および1532は、類似性の判定が容易なものから、困難なものまで、できるだけバリエーションに富んだものを用意することが好ましい。これにより、薬剤の多様な撮像画像についてマークの一致判定を高精度に行うことが可能になる。 The test images stored in the learning DB 153 include a test image 1531 that shows a mark that is the same as the mark that appears in the registered mark image 1521, and a test image 1532 that shows a mark that is different from the mark that appears in the registered mark image 1521. Contains multiple of each. It is preferable to prepare test images 1531 and 1532 with as much variety as possible, ranging from those whose similarity is easy to determine to those whose similarity is difficult to determine. This makes it possible to highly accurately determine whether marks match with respect to various captured images of drugs.

類似性判定部113は、登録マーク画像1521とテスト画像の類似性の判定を、上述のようにして設定された各判定領域のそれぞれについて行う。具体的には、類似性判定部113は、登録マーク画像1521の判定領域A2-1と、テスト画像1531の判定領域A2-1との類似性を判定する。また、類似性判定部113は、テスト画像1532についても同様の判定を行う。そして、類似性判定部113は、判定領域A2-2からA2-Mについても同様に、登録マーク画像1521とテスト画像1531、ならびに、登録マーク画像1521とテスト画像1532の類似性の判定を行う。 The similarity determining unit 113 determines the similarity between the registered mark image 1521 and the test image for each determination area set as described above. Specifically, the similarity determining unit 113 determines the similarity between the determination area A2-1 of the registered mark image 1521 and the determination area A2-1 of the test image 1531. Further, the similarity determination unit 113 performs the same determination regarding the test image 1532. Then, the similarity determining unit 113 similarly determines the similarity between the registered mark image 1521 and the test image 1531, and between the registered mark image 1521 and the test image 1532 for the determination areas A2-2 to A2-M.

そして、選抜部115は、複数の判定領域のそれぞれにおける類似性の判定精度に基づいて複数の識別器を選抜する。これにより、各判定領域における判定精度の高い識別器が選抜され、選抜されたそれらの識別器によりマークの一致判定を行うための識別器が構築される。このようにして構築された識別器では、例えば、マークの形状の特徴が表れた判定領域については形状の判定精度が高い識別器で判定し、マークの色の特徴が表れた判定領域については色の判定精度が高い識別器で判定する、といった適材適所の判定が可能である。 Then, the selection unit 115 selects a plurality of classifiers based on the similarity determination accuracy in each of the plurality of determination regions. As a result, a classifier with high determination accuracy in each determination area is selected, and a classifier for performing mark matching determination is constructed using the selected classifiers. In the discriminator constructed in this way, for example, a discriminator with high shape judgment accuracy is used to judge a judgment area where the shape characteristics of a mark appear, and a color It is possible to judge the right person in the right place by making a judgment using a discriminator with high judgment accuracy.

また、このようにして構築された識別器を用いる薬剤仕分装置1の類似性判定部74は、撮像画像の検出マークが写っている領域を区分した複数の判定領域のそれぞれについて、当該判定領域に応じた識別器により類似性の判定を行う。これにより、領域の違いを考慮した高精度な判定を行うことが可能になる。 Furthermore, the similarity determination unit 74 of the medicine sorting device 1 using the discriminator constructed in this manner determines whether the detection mark is included in the captured image or not. Similarity is determined using a corresponding discriminator. This makes it possible to perform highly accurate determination taking into account differences in regions.

〔使用する識別器〕
上述のように、薬剤仕分装置1の類似性判定部74は、複数の識別器741により類似性の判定を行う。この類似性判定部74は、類似性の判定方法が異なる複数種類の識別器により検出マークと登録マークとの類似性の判定を行ってもよい。この構成によれば、複数の判定方法を考慮してマークの一致判定を行うので、1種類の判定方法で類似性の判定を行う場合と比べて、当該判定の精度を高めることが可能になる。
[Discriminator used]
As described above, the similarity determination unit 74 of the medicine sorting device 1 performs similarity determination using the plurality of discriminators 741. The similarity determination unit 74 may determine the similarity between the detected mark and the registered mark using multiple types of classifiers that use different similarity determination methods. According to this configuration, since the matching of marks is determined by considering multiple determination methods, it is possible to improve the accuracy of the determination compared to the case where similarity is determined using one type of determination method. .

また、複数種類の識別器を用いる場合、それらの識別器の中には、色の類似性を判定する識別器と、形状の類似性を判定する識別器とが含まれている、ことが好ましい。この構成によれば、色の類似性と形状の類似性の両方を考慮してマークの一致判定を行うので、判定の精度を高めることが可能になる。 Furthermore, when using multiple types of classifiers, it is preferable that these classifiers include a classifier that determines color similarity and a classifier that determines shape similarity. . According to this configuration, since the matching of marks is determined taking into account both the color similarity and the shape similarity, it is possible to improve the accuracy of the determination.

ここで、識別器741は、情報処理装置100の類似性判定部113に含まれる識別器1131-1~1131-Nの中から選抜されたものであり、これらの識別器1131は識別器DB151に格納されている識別器が基になっている。 Here, the classifier 741 is selected from the classifiers 1131-1 to 1131-N included in the similarity determination unit 113 of the information processing device 100, and these classifiers 1131 are stored in the classifier DB 151. It is based on the stored discriminator.

よって、この基になる識別器を複数種類とし、その中に、色の類似性を判定する識別器と、形状の類似性を判定する識別器とを含めておけば、薬剤仕分装置1において上述のような効果が期待できる。 Therefore, if there are multiple types of discriminators that serve as the base, and if they include a discriminator that determines color similarity and a discriminator that determines shape similarity, the drug sorting device 1 can be used as described above. The following effects can be expected.

また、薬剤によっては色による類似性の判定が難しいものも存在するが、そのような薬剤については、色の類似性を判定する識別器の判定精度が低くなるため、そのような識別器は選抜され難い。よって、識別器DB151に色の類似性を判定する識別器を含めておいても、色による類似性の判定が難しい薬剤の類似性の判定には、色の類似性を判定する識別器を用いないようにすることができる。 Additionally, for some drugs, it is difficult to determine similarity based on color, but for such drugs, the accuracy of the discriminator that determines color similarity is low, so such discriminators are not used selectively. It's hard to get caught. Therefore, even if the classifier DB 151 includes a classifier that determines color similarity, the classifier that determines color similarity is used to determine the similarity of drugs for which it is difficult to determine similarity based on color. You can avoid it.

形状の類似性を判定する識別器としては、例えば、類似性の判定対象となる画像について下記のような値を算出して、算出した値と所定の閾値とを比較することにより、類似か非類似かを判定する識別器を用いることもできる。 For example, a discriminator that determines shape similarity calculates the following values for images to be determined for similarity, and then compares the calculated values with a predetermined threshold to determine whether they are similar or not. A classifier that determines similarity can also be used.

(1)HOG(Histograms of Oriented Gradients)特徴量の距離
(2)Average Hash法により算出したHash値の距離
(3)Perceptual Hash法により算出したHash値の距離
(4)HSV(H:Hue、S:Saturation・Chroma、V:Value・Brightness)変換により生成したS成分画像でのHOG特徴量の距離
(5)先鋭化した画像の特徴点抽出(ORB:Oriented FAST and Rotated BRIEF)により得た特徴の類似度
(6)ソーベルフィルタリングした画像から特徴点抽出アルゴリズムであるAKAZEにより得た特徴量の類似度
(7)グラディエントフィルタリングした画像から特徴点抽出アルゴリズムであるAKAZEにより得た特徴量の類似度
(8)数字等が写る画像からその数字等の特徴ベクトルを出力するように学習した畳み込みニューラルネットワークに類似性の判定対象となる各画像を入力して得た各特徴ベクトル間の距離
また、色の類似性を判定する識別器としては、例えば、HSV変換画像の平均色距離を算出して、算出した値と所定の閾値とを比較することにより、類似か非類似かを判定する識別器を用いることもできる。
(1) Distance of HOG (Histograms of Oriented Gradients) feature quantity (2) Distance of Hash value calculated by Average Hash method (3) Distance of Hash value calculated by Perceptual Hash method (4) HSV (H: Hue, S :Saturation/Chroma, V:Value/Brightness) conversion (5) Distance of HOG feature amount in S component image generated by conversion Similarity (6) Similarity of features obtained from Sobel filtered images using AKAZE, a feature point extraction algorithm (7) Similarity of features obtained from gradient filtered images using AKAZE, a feature point extraction algorithm ( 8) The distance between each feature vector obtained by inputting each image to be judged for similarity to a convolutional neural network trained to output feature vectors of numbers, etc. from images containing numbers, etc. As a classifier that determines similarity, for example, a classifier that calculates the average color distance of HSV-converted images and compares the calculated value with a predetermined threshold value to determine similarity or dissimilarity is used. You can also do that.

〔閾値の相違による類似性の判定精度の相違〕
上述のように、識別器群生成部111は、閾値が異なる識別器群を生成する。ここでは、閾値の相違による類似性の判定精度の相違について図13に基づいて説明する。図13は、閾値が相違することにより類似性の判定精度に相違が生じた例を示す図である。
[Difference in similarity judgment accuracy due to difference in threshold]
As described above, the classifier group generation unit 111 generates classifier groups with different threshold values. Here, differences in similarity determination accuracy due to differences in threshold values will be explained based on FIG. 13. FIG. 13 is a diagram illustrating an example in which similarity determination accuracy differs due to different threshold values.

この例では、登録マーク画像1521における領域A2とテスト画像における同領域との類似度を、識別器DB151に格納されている識別器の1つである第1識別器と、該第1識別器の閾値をより大きい値に変更した第2識別器とで判定している。テスト画像には、登録マーク画像1521に写るマークと同一のマークが写るテスト画像A~Cと、非同一のマークが写るテスト画像a~cが含まれている。 In this example, the degree of similarity between the area A2 in the registration mark image 1521 and the same area in the test image is determined by the first classifier, which is one of the classifiers stored in the classifier DB 151, and the first classifier, which is one of the classifiers stored in the classifier DB 151. The determination is made using a second classifier whose threshold value is changed to a larger value. The test images include test images A to C in which the same mark as the registered mark image 1521 appears, and test images a to c in which non-identical marks appear.

第1識別器と第2識別器は、類似と非類似の判定閾値が異なるだけで、同じ識別器であるから、これらの識別器が算出する、登録マーク画像1521とテスト画像の類似度は同じ値である。図13の例では、テスト画像Aが登録マーク画像1521との類似度が最も高く、以下類似度の高い順に、テスト画像B、a、b、C、cと続く結果となっている。 Since the first classifier and the second classifier are the same classifier, the only difference being the threshold for determining similarity and dissimilarity, the degrees of similarity between the registered mark image 1521 and the test image calculated by these classifiers are the same. It is a value. In the example of FIG. 13, test image A has the highest degree of similarity to registration mark image 1521, followed by test images B, a, b, C, and c in descending order of similarity.

第1識別器と第2識別器は、算出した上記類似度が閾値以上であれば類似、閾値未満であれば非類似との判定結果を出力する。この例では、第1識別器の判定結果は、テスト画像A、B、a、bは登録マーク画像1521と類似しており、テスト画像C、cは登録マーク画像1521と類似していない、となっている。これら6つの結果のうち、テスト画像a、b、Cについての判定結果は誤判定であるから、第1識別器のエラー率は3/6である。 The first classifier and the second classifier output a determination result that if the calculated degree of similarity is greater than or equal to a threshold value, the two are similar, and if it is less than the threshold value, the two are dissimilar. In this example, the determination result of the first classifier is that test images A, B, a, and b are similar to the registered mark image 1521, and test images C and c are not similar to the registered mark image 1521. It has become. Among these six results, the determination results for test images a, b, and C are false determinations, so the error rate of the first classifier is 3/6.

一方、第2識別器の判定結果は、テスト画像A、B、aは登録マーク画像1521と類似しており、テスト画像b、C、cは登録マーク画像1521と類似していない、となっている。これら6つの結果のうち、テスト画像a、Cについての判定結果は誤判定であるから、第2識別器のエラー率は2/6である。 On the other hand, the judgment results of the second classifier are that test images A, B, and a are similar to registered mark image 1521, and test images b, C, and c are not similar to registered mark image 1521. There is. Among these six results, the determination results for test images a and C are false determinations, so the error rate of the second classifier is 2/6.

これら第1識別器と第2識別器のように、同じ値の類似度を算出する識別器であっても、類似性の判定に用いる閾値の値が変われば、判定精度が変化し得る。よって、類似性判定に用いる閾値のバリエーションを増やすことにより、登録マーク画像1521の類似性の判定に適した識別器を含む識別器群を生成することができる。 Even if the first classifier and the second classifier are classifiers that calculate the same value of similarity, the determination accuracy may change if the threshold value used for determining the similarity changes. Therefore, by increasing the variations of the threshold values used for determining the similarity, it is possible to generate a classifier group including classifiers suitable for determining the similarity of the registered mark images 1521.

なお、識別器群生成部111が各識別器に設定する閾値を決定する方法、および閾値のバリエーションの数は、特に限定されない。バリエーションを多くする程、最適な閾値の識別器を含む識別器群を構築できる可能性が高くなるが、その分、最終的な識別器の構築までに要する演算量が増大する。このため、許容できる演算量と求められる判定精度等に基づいて閾値の決定方法および閾値のバリエーションの数を設定すればよい。例えば、識別器群生成部111は、各識別器の出力値の範囲を複数に等分する各値を閾値に設定してもよい。例えば、識別器群生成部111は、出力値の範囲を10等分する9つの値を閾値に設定してもよい。これにより、1つの識別器に9つのバリエーションを持たせることができる。 Note that the method by which the classifier group generation unit 111 determines the threshold to be set for each classifier and the number of threshold variations are not particularly limited. As the number of variations increases, the possibility of constructing a classifier group including a classifier with an optimal threshold increases, but the amount of calculation required to construct the final classifier increases accordingly. Therefore, the method for determining the threshold value and the number of variations in the threshold value may be set based on the allowable amount of calculation, the required determination accuracy, and the like. For example, the classifier group generation unit 111 may set each value that equally divides the range of output values of each classifier into a plurality of parts as a threshold value. For example, the classifier group generation unit 111 may set nine values that equally divide the range of output values into ten as threshold values. This allows one classifier to have nine variations.

〔識別器を構築する処理の流れ〕
図14および図15に基づいて、情報処理装置100が識別器を構築する処理(情報処理方法)の流れを説明する。図14は、識別器を構築する処理の一例を示すフローチャートである。また、図15は、識別器を構築する処理の具体例を示す図である。
[Processing flow for constructing a discriminator]
The flow of processing (information processing method) in which the information processing apparatus 100 constructs a classifier will be described based on FIGS. 14 and 15. FIG. 14 is a flowchart illustrating an example of processing for constructing a classifier. Further, FIG. 15 is a diagram showing a specific example of processing for constructing a discriminator.

図14の処理を開始する前に、識別器群生成部111は、識別器DB151に格納されている識別器の閾値のバリエーションを増やすことにより識別器群を生成している。また、判定領域設定部112は、判定領域を設定している。 Before starting the process in FIG. 14, the classifier group generation unit 111 generates a classifier group by increasing the variations of the threshold values of the classifiers stored in the classifier DB 151. Further, the determination area setting unit 112 sets a determination area.

上記識別器群について、図15の例では、識別器群生成部111は、識別器DB151に格納されているm種類(mは自然数)の識別器の閾値のバリエーションをそれぞれ増やすことにより、識別器1131-1から1131-NまでのN個の識別器を含む識別器群を生成している。 Regarding the discriminator group, in the example of FIG. 15, the discriminator group generation unit 111 generates a discriminator A classifier group including N classifiers from 1131-1 to 1131-N is generated.

また、図15の例では、判定領域設定部112は、A2-1からA2-MまでのM個の判定領域を設定している。上述のように、判定領域A2-1~A2-Mは、登録マーク画像1521とテスト画像1531および1532との類似性の判定に用いられる。 Further, in the example of FIG. 15, the determination area setting unit 112 sets M determination areas from A2-1 to A2-M. As described above, determination areas A2-1 to A2-M are used to determine the similarity between registration mark image 1521 and test images 1531 and 1532.

図14のS31では、類似性判定部113が、識別器群生成部111が生成した上述の識別器群に含まれる各識別器を用いて、登録マークDB152に格納されている登録マークと、学習用DB153に格納されているテスト画像1531および1532との類似性の判定を行う。この判定は、判定領域設定部112が設定した判定領域のそれぞれについて行われる。 In S31 of FIG. 14, the similarity determination unit 113 uses each classifier included in the above-mentioned classifier group generated by the classifier group generation unit 111 to determine the registered mark stored in the registered mark DB 152 and the learning Similarity with test images 1531 and 1532 stored in the application DB 153 is determined. This determination is performed for each determination area set by the determination area setting unit 112.

例えば、図15の例では、M個の判定領域が設定されているから、1つの識別器による判定は、1つのテスト画像につきM回行われる。また、識別器は合計でN個あるから、1つのテスト画像につき合計でM×N回の判定が行われる。 For example, in the example of FIG. 15, since M determination areas are set, determination by one classifier is performed M times for one test image. Furthermore, since there are a total of N classifiers, a total of M×N determinations are performed for one test image.

S32では、評価部114が、S31で行われた各判定の判定精度を評価する。上述のように、評価部114は、エラー率を算出することにより判定精度を評価してもよい。また、この評価には、重み設定部116が各テスト画像に設定した重みが考慮される。以下説明するように、S32~S36の処理は所定回数繰り返されるが、初回の評価では各テスト画像の重みは初期値(全てのテスト画像の重みは同一)とする。 In S32, the evaluation unit 114 evaluates the determination accuracy of each determination made in S31. As described above, the evaluation unit 114 may evaluate the determination accuracy by calculating the error rate. Further, this evaluation takes into consideration the weight set for each test image by the weight setting unit 116. As explained below, the processes of S32 to S36 are repeated a predetermined number of times, but in the first evaluation, the weight of each test image is set to an initial value (the weight of all test images is the same).

S33では、選抜部115が、S32で評価された識別器の中から、当該評価の結果に基づいて識別器を選抜する。例えば、選抜部115は、エラー率が最も低かった1つの識別器を選抜してもよい。なお、この際に、選抜部115は、選抜した識別器と、その識別器の判定領域とを対応付けておく。 In S33, the selection unit 115 selects a classifier from among the classifiers evaluated in S32 based on the result of the evaluation. For example, the selection unit 115 may select one classifier with the lowest error rate. Note that at this time, the selection unit 115 associates the selected classifier with the determination area of the classifier.

S34では、信頼度算出部117が、S33で選抜された識別器の信頼度を算出する。例えば、信頼度算出部117は、下記の数式により信頼度を算出してもよい。なお、下記の数式において、「ln」は、logである。 In S34, the reliability calculation unit 117 calculates the reliability of the classifier selected in S33. For example, the reliability calculation unit 117 may calculate the reliability using the following formula. In addition, in the following formula, "ln" is log e .

(信頼度)=1/2・ln[{1-(エラー率)}/(エラー率)]
S35では、識別器構築部118が、学習が終了したか否かを判定する。例えば、識別器構築部118は、S32~S36の処理の繰り返し回数が所定数に達していれば学習が終了したと判定し、所定回数に達していなければ学習は終了していないと判定してもよい。S35で学習が終了したと判定された場合(S35でYES)にはS37の処理に進み、終了していないと判定された場合(S35でNO)にはS36の処理に進む。
(Reliability) = 1/2・ln[{1-(Error rate)}/(Error rate)]
In S35, the classifier construction unit 118 determines whether learning has ended. For example, the discriminator construction unit 118 determines that learning has been completed if the number of repetitions of the processes S32 to S36 has reached a predetermined number, and determines that learning has not been completed if the number of repetitions of the processes in S32 to S36 has not reached a predetermined number. Good too. If it is determined in S35 that learning has been completed (YES in S35), the process proceeds to S37, and if it is determined that learning has not been completed (NO in S35), the process proceeds to S36.

S36では、重み設定部116が、テスト画像の重みを更新する。この更新において、重み設定部116は、直近のS33の処理で選抜された識別器が誤判定したテスト画像の重みが、同識別器が正しく判定したテスト画像の重みよりも大きくなるように更新する。 In S36, the weight setting unit 116 updates the weight of the test image. In this update, the weight setting unit 116 updates the weight of the test image that was incorrectly determined by the classifier selected in the most recent process of S33 to be greater than the weight of the test image that was correctly determined by the classifier. .

S36の後、処理はS32に戻り、評価部114が、更新後の重みを用いて、S31で行われた各判定の判定精度を再評価する。この再評価では、直近のS33の処理で選抜された識別器が誤判定したテスト画像の重みが相対的に大きくなっているので、このテスト画像の判定精度が高い識別器の評価が相対的に高くなる。 After S36, the process returns to S32, and the evaluation unit 114 uses the updated weights to re-evaluate the determination accuracy of each determination made in S31. In this re-evaluation, the weight of the test image incorrectly judged by the classifier selected in the most recent process of S33 is relatively large, so the evaluation of the classifier with high judgment accuracy for this test image is relatively large. It gets expensive.

よって、続くS33では、前回選抜された識別器が誤判定したテスト画像の判定精度が高い識別器が選抜されやすくなる。このような繰り返し処理により、互いに欠点を補い合う識別器を順次選抜することができる。 Therefore, in the subsequent S33, a classifier with high determination accuracy for the test image that was incorrectly determined by the previously selected classifier is likely to be selected. Through such repeated processing, it is possible to sequentially select classifiers that compensate for each other's deficiencies.

S37では、識別器構築部118が、これまでの繰り返し処理によって選抜された識別器を用いて、検出マークと登録マークとが一致するかを判定するための識別器を構築する。例えば、識別器構築部118は、選抜された識別器の出力値に当該識別器の信頼度で重みを付けた値を、選抜された全識別器について合計した値(以下、一致度と呼ぶ)を出力する識別器を構築してもよい。 In S37, the classifier constructing unit 118 constructs a classifier for determining whether the detected mark and the registered mark match, using the classifiers selected through the previous iterative processing. For example, the discriminator construction unit 118 calculates a value obtained by weighting the output value of the selected discriminator by the reliability of the discriminator, and sums up the value for all selected discriminators (hereinafter referred to as the degree of coincidence). You may also construct a classifier that outputs .

また、識別器構築部118は、上記一致度の閾値を設定する。閾値は、構築した上記識別器の判定精度が少なくとも許容下限値以上となるように設定すればよい。例えば、識別器構築部118は、構築した上記識別器により算出された、登録マーク画像に写る登録マークと、複数のテスト画像1531および1532に写るマークとの一致度を取得してもよい。そして、識別器構築部118は、取得した一致度の平均と分散から一致度の標準偏差σを算出し、この標準偏差σを基準に上記閾値を設定してもよい。例えば、識別器構築部118は、閾値を5σとしたときに、構築した上記識別器の誤判定率が許容下限値以上となる場合に、閾値を5σとしてもよい。 Further, the classifier construction unit 118 sets the threshold of the degree of matching. The threshold value may be set so that the determination accuracy of the constructed discriminator is at least equal to or higher than the allowable lower limit value. For example, the classifier construction unit 118 may obtain the degree of coincidence between the registration mark shown in the registration mark image and the marks shown in the plurality of test images 1531 and 1532, which is calculated by the constructed classifier. Then, the classifier construction unit 118 may calculate the standard deviation σ of the degree of coincidence from the average and variance of the acquired degrees of coincidence, and may set the threshold value based on this standard deviation σ. For example, the classifier construction unit 118 may set the threshold to 5σ if the false judgment rate of the constructed classifier is equal to or higher than the allowable lower limit value when the threshold is set to 5σ.

識別器が構築されることにより、図示の処理は終了となる。なお、S37で構築した識別器は、記憶部150に記憶してもよいし、出力部140に出力させてもよい。また、情報処理装置100と薬剤仕分装置1が通信機能を備えている場合、情報処理装置100は、該通信機能により薬剤仕分装置1に構築した識別器を送信してもよい。 Once the classifier is constructed, the illustrated process ends. Note that the classifier constructed in S37 may be stored in the storage unit 150 or may be output to the output unit 140. Furthermore, if the information processing device 100 and the drug sorting device 1 have a communication function, the information processing device 100 may transmit the constructed identifier to the drug sorting device 1 using the communication function.

薬剤仕分装置1の類似性判定部74に含まれる複数の識別器741は、以上のように、登録マークの画像と他のマークの画像とを含むテスト画像群についての類似性の判定精度に基づいて選抜された識別器である。この構成によれば、テスト画像群についての類似性の判定精度に基づいて選抜された識別器による類似性の判定結果に基づいてマークの一致判定を行うので、高精度な判定を行うことが可能になる。 As described above, the plurality of discriminators 741 included in the similarity determination unit 74 of the medicine sorting device 1 perform judgment based on the similarity determination accuracy for the test image group including the registered mark image and the other mark images. This is a discriminator selected by According to this configuration, since the mark match is determined based on the similarity determination result by the discriminator selected based on the similarity determination accuracy for the test image group, it is possible to perform highly accurate determination. become.

〔構築した識別器を用いたマークの一致判定処理の流れ〕
図16および図17に基づいて、上述のようにして構築した識別器を用いた、薬剤仕分装置1によるマークの一致判定処理(判定方法)の流れを説明する。図16は、マークの一致判定処理の一例を示すフローチャートである。また、図17は、マークの一致判定の具体例を示す図である。
[Flow of mark match determination process using the constructed discriminator]
Based on FIGS. 16 and 17, the flow of the mark match determination process (determination method) by the medicine sorting device 1 using the discriminator constructed as described above will be described. FIG. 16 is a flowchart illustrating an example of mark match determination processing. Further, FIG. 17 is a diagram showing a specific example of mark matching determination.

S41では、マーク検出部73が、対象薬剤を撮像した撮像画像82から、当該対象薬剤に形成されたマークを検出する。図17の例では、撮像画像82には、表面にマークT11と番号T12が記された錠剤T1が写っている。この例では、マーク検出部73は、マークT11を検出して、検出したマークT11が写る矩形状の領域A1を撮像画像82から切り出して所定サイズに変更し、マーク画像84を生成している。なお、所定サイズは、登録マーク画像1521と同じサイズである。 In S41, the mark detection unit 73 detects a mark formed on the target drug from the captured image 82 of the target drug. In the example of FIG. 17, the captured image 82 shows a tablet T1 with a mark T11 and a number T12 written on its surface. In this example, the mark detection unit 73 detects the mark T11, cuts out a rectangular area A1 in which the detected mark T11 is captured from the captured image 82, changes it to a predetermined size, and generates a mark image 84. Note that the predetermined size is the same size as the registered mark image 1521.

S42では、類似性判定部74が、S41で検出された検出マークと登録マークとの類似性を、複数の識別器741により判定する。図17の例では、類似性判定部74は、識別器741-1から741-mのそれぞれを用いて、マーク画像84に写る検出マークと、登録マーク画像1521に写る登録マークとの類似性を判定する。 In S42, the similarity determining unit 74 determines the similarity between the detection mark detected in S41 and the registered mark using the plurality of discriminators 741. In the example of FIG. 17, the similarity determining unit 74 uses each of the discriminators 741-1 to 741-m to determine the similarity between the detected mark appearing in the mark image 84 and the registered mark appearing in the registered mark image 1521. judge.

なお、この判定は、各識別器741に対応付けられた判定領域A2毎に行う。例えば、識別器741-1に対応付けられた判定領域がA2-1であり、識別器741-2に対応付けられた判定領域がA2-5であったとする。この場合、識別器741-1を用いた判定は判定領域A2-1について行い、識別器741-2を用いた判定は判定領域A2-5について行う。 Note that this determination is performed for each determination area A2 associated with each classifier 741. For example, assume that the determination area associated with the discriminator 741-1 is A2-1, and the determination area associated with the discriminator 741-2 is A2-5. In this case, the determination using the discriminator 741-1 is performed for the determination area A2-1, and the determination using the discriminator 741-2 is performed for the determination area A2-5.

S43では、一致判定部75が、S42の判定結果に基づいて判定用スコアを算出する。図17の例では、各識別器741は、類似していることを示す判定結果である「1」または非類似であることを示す判定結果である「-1」を出力している。そして、一致判定部75は、上記判定結果にその判定を行った識別器741の信頼度を乗じて足し合わせることにより、判定用スコアを算出している。 In S43, the match determination unit 75 calculates a determination score based on the determination result in S42. In the example of FIG. 17, each discriminator 741 outputs "1" as a determination result indicating similarity or "-1" as a determination result indicating dissimilarity. Then, the match determination unit 75 calculates a determination score by multiplying the determination result by the reliability of the classifier 741 that made the determination and adding the results.

S44では、一致判定部75は、S43で算出した判定用スコアが閾値以上であるか否かにより、S41で検出された検出マークと登録マークとが一致するか否かを判定する。このように、一致判定部75は、各識別器741による判定の結果に、各識別器741の信頼度に応じた重み付けを行った上で、検出マークと登録マークとが一致するか判定する。これにより、各識別器741の信頼度をマークの一致判定に反映させることができるので、高精度な判定を行うことが可能になる。 In S44, the match determination unit 75 determines whether the detection mark detected in S41 and the registered mark match based on whether the determination score calculated in S43 is equal to or greater than the threshold value. In this way, the match determining unit 75 weights the results of the determination by each classifier 741 according to the reliability of each classifier 741, and then determines whether the detected mark and the registered mark match. This allows the reliability of each classifier 741 to be reflected in the mark match determination, making it possible to perform highly accurate determination.

最後に、S45では、一致判定部75は、S45の判定結果を判別部64に出力し、これにより図16の処理は終了する。なお、S44の判定結果が一致していないという結果であった場合、類似性の判定対象の登録マークを変更して、再度S42~S44の処理を行ってもよい。そして、S44の判定結果が一致しているとの結果となるまでこれらの処理を繰り返してもよい。 Finally, in S45, the match determining unit 75 outputs the determination result of S45 to the determining unit 64, thereby ending the process of FIG. 16. Note that if the determination result in S44 is that they do not match, the registered mark to be determined for similarity may be changed and the processes in S42 to S44 may be performed again. These processes may be repeated until the determination result in S44 is that they match.

図16の処理の終了後、S45の判定結果を受信した判別部64は、マーク検出部73の判定結果と、対象薬剤の色や形状、番号等のその他の検出結果や判定結果に基づいて、対象薬剤の種類を判別する。 After the process of FIG. 16 is completed, the determination unit 64 that has received the determination result of S45, based on the determination result of the mark detection unit 73 and other detection results and determination results such as the color, shape, and number of the target drug, Determine the type of target drug.

〔ソフトウェアによる実現例〕
薬剤仕分装置1の制御ブロック(特に、制御部60aおよび60bに含まれる各部)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよいし、ソフトウェアによって実現してもよい。
[Example of implementation using software]
The control block of the drug sorting device 1 (particularly each part included in the control units 60a and 60b) may be realized by a logic circuit (hardware) formed in an integrated circuit (IC chip) or the like, or may be realized by software. You may.

後者の場合、薬剤仕分装置1は、各機能を実現するソフトウェアであるプログラムの命令を実行するコンピュータを備えている。このコンピュータは、例えば1つ以上のプロセッサを備えていると共に、上記プログラムを記憶したコンピュータ読み取り可能な記録媒体を備えている。そして、上記コンピュータにおいて、上記プロセッサが上記プログラムを上記記録媒体から読み取って実行することにより、本発明の目的が達成される。上記プロセッサとしては、例えばCPU(Central Processing Unit)を用いることができる。上記記録媒体としては、「一時的でない有形の媒体」、例えば、ROM(Read Only Memory)等の他、テープ、ディスク、カード、半導体メモリ、プログラマブルな論理回路などを用いることができる。また、上記プログラムを展開するRAM(Random Access Memory)などをさらに備えていてもよい。また、上記プログラムは、該プログラムを伝送可能な任意の伝送媒体(通信ネットワークや放送波等)を介して上記コンピュータに供給されてもよい。なお、本発明の一態様は、上記プログラムが電子的な伝送によって具現化された、搬送波に埋め込まれたデータ信号の形態でも実現され得る。 In the latter case, the medicine sorting device 1 is equipped with a computer that executes instructions of a program that is software that implements each function. This computer includes, for example, one or more processors and a computer-readable recording medium that stores the above program. In the computer, the processor reads the program from the recording medium and executes the program, thereby achieving the object of the present invention. As the processor, for example, a CPU (Central Processing Unit) can be used. As the recording medium, in addition to "non-temporary tangible media" such as ROM (Read Only Memory), tapes, disks, cards, semiconductor memories, programmable logic circuits, etc. can be used. Further, the computer may further include a RAM (Random Access Memory) for expanding the above program. Furthermore, the program may be supplied to the computer via any transmission medium (communication network, broadcast waves, etc.) that can transmit the program. Note that one aspect of the present invention can also be realized in the form of a data signal embedded in a carrier wave, in which the program is embodied by electronic transmission.

同様に、情報処理装置100の制御ブロック(特に制御部110に含まれる各部)は、集積回路(ICチップ)等に形成された論理回路(ハードウェア)によって実現してもよい。そして、これら制御ブロックは、上述のようにしてソフトウェアによって実現してもよい。 Similarly, the control blocks of the information processing device 100 (particularly the units included in the control unit 110) may be realized by logic circuits (hardware) formed in an integrated circuit (IC chip) or the like. These control blocks may also be realized by software as described above.

〔付記事項〕
本発明は上述した各実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
[Additional notes]
The present invention is not limited to the embodiments described above, and various modifications can be made within the scope of the claims, and embodiments obtained by appropriately combining technical means disclosed in different embodiments. are also included within the technical scope of the present invention.

1 薬剤仕分装置
60 コンピュータ(種類判別装置)
64 判別部
71 マスタ更新部
72 重み更新部(評価情報更新部)
81 薬剤データベース
82 撮像画像
811a、811b マスタ色データ
73 マーク検出部
74 類似性判定部
741 識別器
75 一致判定部
100 情報処理装置
115 選抜部
118 識別器構築部
1 Drug sorting device 60 Computer (type discrimination device)
64 Discrimination unit 71 Master update unit 72 Weight update unit (evaluation information update unit)
81 Drug database 82 Captured images 811a, 811b Master color data 73 Mark detection unit 74 Similarity determination unit 741 Discriminator 75 Match determination unit 100 Information processing device 115 Selection unit 118 Discriminator construction unit

Claims (12)

薬剤の照合用のマスタデータを用いて、種類不明の対象薬剤を撮像した撮像画像から、前記対象薬剤の種類を判別する種類判別装置であって、
前記マスタデータには、薬剤の色を示すマスタ色データが含まれており、
前記撮像画像から生成された、前記対象薬剤の外観の特徴を示す情報と、前記マスタデータとを照合し、該照合の結果に基づいて前記対象薬剤の種類を判別する判別部と、
前記判別部が前記対象薬剤の種類の判別に成功したときに、当該判別に使用された、前記対象薬剤の色を示す判別成功色データを、新たな前記マスタ色データとするマスタ更新部と、を備え
前記判別部は、前記対象薬剤の色を示す対象色データと、各種類の薬剤に対応する前記マスタ色データのそれぞれとの類似度を算出すると共に、該類似度の順に、前記対象薬剤の特徴を示す前記情報と前記マスタデータとの照合を行って前記対象薬剤の種類を判別することを特徴とする種類判別装置。
A type discrimination device that discriminates the type of a target drug from a captured image of an unknown type of target drug using master data for drug verification,
The master data includes master color data indicating the color of the drug,
a determination unit that compares information indicating the appearance characteristics of the target drug generated from the captured image with the master data, and determines the type of the target drug based on the result of the comparison;
a master updating unit that, when the discrimination unit successfully discriminates the type of the target drug, sets successful discrimination color data indicating the color of the target drug used for the discrimination as new master color data; Equipped with
The discrimination unit calculates the degree of similarity between the target color data indicating the color of the target drug and each of the master color data corresponding to each type of drug, and calculates the characteristics of the target drug in the order of the similarity. A type discrimination device characterized in that the type of the target drug is discriminated by comparing the information indicating the target drug with the master data .
薬剤の照合用のマスタデータを用いて、種類不明の対象薬剤を撮像した撮像画像から、前記対象薬剤の種類を判別する種類判別装置であって、A type discrimination device that discriminates the type of a target drug from a captured image of an unknown type of target drug using master data for drug verification,
前記マスタデータには、薬剤の色を示すマスタ色データが含まれており、The master data includes master color data indicating the color of the drug,
前記撮像画像から生成された、前記対象薬剤の外観の特徴を示す情報と、前記マスタデータとを照合し、該照合の結果に基づいて前記対象薬剤の種類を判別する判別部と、a determination unit that compares information indicating the appearance characteristics of the target drug generated from the captured image with the master data, and determines the type of the target drug based on the result of the comparison;
前記判別部が前記対象薬剤の種類の判別に成功したときに、当該判別に使用された、前記対象薬剤の色を示す判別成功色データを、新たな前記マスタ色データとするマスタ更新部と、a master updating unit that, when the discrimination unit successfully discriminates the type of the target drug, sets successful discrimination color data indicating the color of the target drug used for the discrimination as new master color data;
複数の前記判別成功色データを訓練データとして、前記対象薬剤の色を示す対象色データと前記マスタ色データとから前記対象色データと各種類の薬剤に対応する前記マスタ色データのそれぞれとの類似度を算出するための類似度評価情報を更新する評価情報更新部と、を備えることを特徴とする種類判別装置。Using a plurality of the successfully discriminated color data as training data, the similarity between the target color data and the master color data corresponding to each type of drug is calculated from the target color data indicating the color of the target drug and the master color data. A type discrimination device comprising: an evaluation information update unit that updates similarity evaluation information for calculating a degree.
前記評価情報更新部は、確率的勾配降下法を用いて前記類似度評価情報を更新することを特徴とする請求項に記載の種類判別装置。 3. The type discrimination device according to claim 2 , wherein the evaluation information updating unit updates the similarity evaluation information using a stochastic gradient descent method. 薬剤の照合用のマスタデータを用いて、種類不明の対象薬剤を撮像した撮像画像から、前記対象薬剤の種類を判別する種類判別装置であって、
前記マスタデータには、薬剤の色を示すマスタ色データが含まれており、
前記撮像画像から生成された、前記対象薬剤の色を示す対象色データと、各種類の薬剤に対応する前記マスタ色データのそれぞれとの類似度を算出すると共に、該類似度に基づいて前記対象薬剤の種類を判別する判別部と、
前記判別部の判別結果が正しかったときに、当該判別に使用された前記対象色データである判別成功色データを複数取得して訓練データとし、該訓練データを用いて、前記対象色データと前記マスタ色データとから前記類似度を算出するための類似度評価情報を更新する評価情報更新部と、を備えることを特徴とする種類判別装置。
A type discrimination device that discriminates the type of a target drug from a captured image of an unknown type of target drug using master data for drug verification,
The master data includes master color data indicating the color of the drug,
The degree of similarity between the target color data indicating the color of the target drug generated from the captured image and each of the master color data corresponding to each type of drug is calculated, and the degree of similarity between the target color data indicating the color of the target drug generated from the captured image and each of the master color data corresponding to each type of drug is calculated, and the degree of similarity is calculated based on the similarity. a discrimination unit that discriminates the type of drug;
When the discrimination result of the discriminator is correct, a plurality of successfully discriminated color data, which is the target color data used for the discrimination, are obtained as training data, and using the training data, the target color data and the A type discrimination device comprising: an evaluation information update unit that updates similarity evaluation information for calculating the similarity from master color data.
種類不明の対象薬剤を撮像した撮像画像から、前記対象薬剤の種類を判別する種類判別装置であって、
前記撮像画像から前記対象薬剤に形成されたマークを検出するマーク検出部と、
前記マーク検出部が検出した検出マークと、薬剤の照合用のマスタデータに登録されている登録マークとの類似性を、複数の識別器により判定する類似性判定部と、
各識別器による前記判定の結果に基づいて前記検出マークと前記登録マークとが一致するか判定する一致判定部と、を備えることを特徴とする種類判別装置。
A type discrimination device that discriminates the type of a target drug from a captured image of an unknown type of target drug, comprising:
a mark detection unit that detects a mark formed on the target drug from the captured image;
a similarity determination unit that uses a plurality of discriminators to determine the similarity between the detection mark detected by the mark detection unit and a registered mark registered in master data for drug verification;
A type discriminating device comprising: a match determining unit that determines whether the detection mark and the registration mark match based on the results of the determination by each classifier.
前記類似性判定部は、類似性の判定方法が異なる複数種類の識別器により前記検出マークと前記登録マークとの類似性の判定を行う、ことを特徴とする請求項に記載の種類判別装置。 The type discrimination device according to claim 5 , wherein the similarity determination unit determines the similarity between the detection mark and the registered mark using a plurality of types of discriminators that use different similarity determination methods. . 複数種類の前記識別器には、色の類似性を判定する識別器と、形状の類似性を判定する識別器とが含まれている、ことを特徴とする請求項に記載の種類判別装置。 The type discriminating device according to claim 6 , wherein the plurality of types of discriminators include a discriminator that determines color similarity and a discriminator that determines shape similarity. . 前記類似性判定部は、前記撮像画像の前記検出マークが写っている領域を区分した複数の判定領域のそれぞれについて、当該判定領域に応じた複数の前記識別器により類似性の判定を行う、ことを特徴とする請求項からの何れか1項に記載の種類判別装置。 The similarity determination unit determines similarity for each of a plurality of determination regions obtained by dividing a region of the captured image in which the detection mark is captured, using the plurality of discriminators corresponding to the determination region. The type discrimination device according to any one of claims 5 to 7 . 複数の前記識別器は、前記登録マークの画像と他のマークの画像とを含むテスト画像群についての類似性の判定精度に基づいて選抜された識別器である、ことを特徴とする請求項からの何れか1項に記載の種類判別装置。 5. The plurality of discriminators are discriminators selected based on similarity determination accuracy for a test image group including images of the registered mark and images of other marks. 9. The type discrimination device according to any one of 8 . 前記一致判定部は、各識別器による前記判定の結果に、各識別器の信頼度に応じた重み付けを行った上で、前記検出マークと前記登録マークとが一致するか判定する、ことを特徴とする請求項からの何れか1項に記載の種類判別装置。 The matching determination unit weights the results of the determination by each classifier according to the reliability of each classifier, and then determines whether the detected mark and the registered mark match. The type discrimination device according to any one of claims 5 to 9 . 薬剤の撮像画像から検出された検出マークと、薬剤の照合用のマスタデータに登録されている登録マークとの類似性を判定する識別器群の中から、類似性の判定精度に基づいて複数の識別器を選抜する選抜部と、
前記選抜部が選抜した複数の前記識別器を用いて、前記検出マークと前記登録マークとが一致するか否かを判定するための識別器を構築する識別器構築部と、を備えることを特徴とする情報処理装置。
Based on the accuracy of similarity judgment, multiple discriminators are selected from a group of discriminators that judge the similarity between the detection mark detected from the captured image of the drug and the registered mark registered in the master data for drug matching. a selection department that selects a discriminator;
A discriminator construction unit that constructs a discriminator for determining whether or not the detection mark and the registered mark match, using the plurality of discriminators selected by the selection unit. Information processing equipment.
前記選抜部は、前記撮像画像の前記検出マークが写っている領域を区分した複数の判定領域のそれぞれにおける類似性の判定精度に基づいて複数の識別器を選抜する、ことを特徴とする請求項11に記載の情報処理装置。 The selection unit selects a plurality of discriminators based on similarity judgment accuracy in each of a plurality of judgment areas obtained by dividing a region in which the detection mark of the captured image is shown. 11. The information processing device according to 11 .
JP2019224015A 2018-12-27 2019-12-11 Type discrimination device Active JP7364888B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2023168701A JP2023165958A (en) 2018-12-27 2023-09-28 Type discrimination device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018246003 2018-12-27
JP2018246003 2018-12-27

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2023168701A Division JP2023165958A (en) 2018-12-27 2023-09-28 Type discrimination device

Publications (2)

Publication Number Publication Date
JP2020103885A JP2020103885A (en) 2020-07-09
JP7364888B2 true JP7364888B2 (en) 2023-10-19

Family

ID=71447563

Family Applications (2)

Application Number Title Priority Date Filing Date
JP2019224015A Active JP7364888B2 (en) 2018-12-27 2019-12-11 Type discrimination device
JP2023168701A Pending JP2023165958A (en) 2018-12-27 2023-09-28 Type discrimination device

Family Applications After (1)

Application Number Title Priority Date Filing Date
JP2023168701A Pending JP2023165958A (en) 2018-12-27 2023-09-28 Type discrimination device

Country Status (1)

Country Link
JP (2) JP7364888B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016015093A (en) 2014-07-03 2016-01-28 アレイ株式会社 Tablet identifying apparatus and method thereof, and packaged tablet monitoring apparatus
US20170103195A1 (en) 2015-10-13 2017-04-13 Samsung Electronics Co., Ltd. Electronic device and method for authenticating fingerprint in an electronic device
WO2018173649A1 (en) 2017-03-23 2018-09-27 富士フイルム株式会社 Drug recognizing device, drug recognizing method, and drug recognizing program
WO2018190394A1 (en) 2017-04-14 2018-10-18 株式会社湯山製作所 Drug sorting device, sorting container, and drug return method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016015093A (en) 2014-07-03 2016-01-28 アレイ株式会社 Tablet identifying apparatus and method thereof, and packaged tablet monitoring apparatus
US20170103195A1 (en) 2015-10-13 2017-04-13 Samsung Electronics Co., Ltd. Electronic device and method for authenticating fingerprint in an electronic device
WO2018173649A1 (en) 2017-03-23 2018-09-27 富士フイルム株式会社 Drug recognizing device, drug recognizing method, and drug recognizing program
WO2018190394A1 (en) 2017-04-14 2018-10-18 株式会社湯山製作所 Drug sorting device, sorting container, and drug return method

Also Published As

Publication number Publication date
JP2023165958A (en) 2023-11-17
JP2020103885A (en) 2020-07-09

Similar Documents

Publication Publication Date Title
JP7120370B2 (en) system
JP7238942B2 (en) drug identification software
JP5916032B2 (en) Drug test support apparatus and method
JP6009888B2 (en) Drug inspection apparatus and method
JP7264105B2 (en) Drug sorting device
CN105307622B (en) Subpackage medicament check device and method
TW201625195A (en) Inspection assistance system and tablet packaging device
CN110418627A (en) Medicament identification device, medicament recognition methods and medicament recognizer
KR20170001467A (en) Medicine packets inspection apparatus and method for inspecting medicine packets
JP2024052916A (en) Drug inspection support device, drug inspection support system, and drug inspection method
JPWO2020044933A1 (en) Object collation device and object collation method
JP7364888B2 (en) Type discrimination device
JPWO2019082858A1 (en) Dispensing support system
WO2022092130A1 (en) Type discriminating device, type discriminating method, type discriminating program, and drug sorting device
JP2024000962A (en) Medicine sorting device and type discrimination device
JP7360070B2 (en) Pharmaceutical sorting device
JP7230985B2 (en) Drug sorting device
JP5582610B2 (en) Image identification apparatus and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221018

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230627

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230818

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20230905

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230918

R150 Certificate of patent or registration of utility model

Ref document number: 7364888

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150