WO2014080966A1 - Drug inspection device - Google Patents

Drug inspection device Download PDF

Info

Publication number
WO2014080966A1
WO2014080966A1 PCT/JP2013/081353 JP2013081353W WO2014080966A1 WO 2014080966 A1 WO2014080966 A1 WO 2014080966A1 JP 2013081353 W JP2013081353 W JP 2013081353W WO 2014080966 A1 WO2014080966 A1 WO 2014080966A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
drug
area
medicine
region
Prior art date
Application number
PCT/JP2013/081353
Other languages
French (fr)
Japanese (ja)
Inventor
弘治 伊藤
紘道 津田
弘和 天野
泰行 吉川
美 張
Original Assignee
株式会社湯山製作所
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 株式会社湯山製作所 filed Critical 株式会社湯山製作所
Priority to JP2014548610A priority Critical patent/JP6424624B2/en
Priority to US14/646,879 priority patent/US9870611B2/en
Priority to EP13856758.1A priority patent/EP2924647A4/en
Publication of WO2014080966A1 publication Critical patent/WO2014080966A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/9508Capsules; Tablets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/60Type of objects
    • G06V20/66Trinkets, e.g. shirt buttons or jewellery items
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H10/00ICT specially adapted for the handling or processing of patient-related medical or healthcare data
    • G16H10/60ICT specially adapted for the handling or processing of patient-related medical or healthcare data for patient-specific data, e.g. for electronic patient records
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H20/00ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance
    • G16H20/10ICT specially adapted for therapies or health-improving plans, e.g. for handling prescriptions, for steering therapy or for monitoring patient compliance relating to drugs or medications, e.g. for ensuring correct administration to patients
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/56Cameras or camera modules comprising electronic image sensors; Control thereof provided with illuminating means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Abstract

[Problem] The purpose of the present invention is to provide a drug inspection device capable of inspecting, with adequate precision, a drug accommodated in a divided bag on which printing is applied, and to provide a drug divided packaging system provided with the drug inspection device. [Solution] In a drug inspection device (10), medicine information detection control for detecting information for a drug which is the subject of inspection can be performed by a control device (60). The medicine information detection control is performed by: a drug candidate region extraction step for extracting a region of dark color in an image illuminated from a back side as a drug candidate region (A) in which a drug is assumed to be present, a printing candidate region extraction step for extracting a region in which printing applied to a divided bag is included as a printing candidate region (B) on the basis of an image illuminated from a front side, a printing region specifying step for specifying a region corresponding to the printing included in the printing candidate region (B) as a printing region (C) on the basis of a luminance distribution in the image illuminated from the back side, and a drug region derivation step for deriving a drug region (X) by subtracting the printing region (C) from the drug candidate region (A).

Description

薬剤鑑査装置Drug inspection device
 本発明は、薬剤の数量を鑑査するための薬剤鑑査装置、及び当該薬剤鑑査装置を備えた薬剤分包装置に関する。 The present invention relates to a medicine inspection device for inspecting the quantity of medicine and a medicine packaging device provided with the medicine inspection device.
 従来、下記特許文献1に開示されているような錠剤検査システムが提供されている。下記特許文献1に開示されている錠剤検査システムでは、粒状やカプセル状などの形状の固形薬剤を一包分ずつ分包紙に分包し、供給することが可能とされている。また、下記特許文献1に係る錠剤検査システムでは、分包紙に分包された状態において固形薬剤を撮像し、これにより得られた画像に基づいて固形薬剤の数量を鑑査することができる構成とされている。 Conventionally, a tablet inspection system as disclosed in Patent Document 1 below has been provided. In the tablet inspection system disclosed in the following Patent Document 1, it is possible to supply a solid medicine having a granular shape or a capsule shape into wrapping paper one by one. In the tablet inspection system according to Patent Document 1 below, the solid medicine is imaged in a state of being packaged in a wrapping paper, and the quantity of the solid medicine can be inspected based on the image obtained thereby. Has been.
特開平7-200770号公報Japanese Patent Application Laid-Open No. 7-200770
 上述したように、特許文献1に係る錠剤検査システムにおいては、固形薬剤が分包紙に分包された状態で撮像される。そのため、分包紙に印字がなされていると、鑑査用として撮影した画像において印字に相当する領域と薬剤に相当する領域とを区別することが難しく、鑑査精度の低下に繋がる。特許文献1の錠剤検査システムをはじめとする従来技術の薬剤鑑査装置においては、分包紙に付された印字及び薬剤に相当する画像領域を区別することについて特別な方策が講じられておらず、十分な鑑査精度が得られないという問題があった。 As described above, in the tablet inspection system according to Patent Document 1, imaging is performed in a state where the solid medicine is packaged in the wrapping paper. For this reason, if printing is performed on the wrapping paper, it is difficult to distinguish between the area corresponding to the printing and the area corresponding to the drug in the image photographed for inspection, leading to a decrease in inspection accuracy. In the conventional drug inspection device including the tablet inspection system of Patent Document 1, no special measures are taken for distinguishing the image attached to the wrapping paper and the image area corresponding to the drug, There was a problem that sufficient inspection accuracy could not be obtained.
 そこで、本発明は、印字が付された分包袋に収容された薬剤について十分な精度で鑑査可能な薬剤鑑査装置、及び当該薬剤鑑査装置を備えた薬剤分包システムの提供を目的とした。 Therefore, an object of the present invention is to provide a medicine inspection device capable of inspecting a medicine contained in a printed packaging bag with sufficient accuracy, and a medicine packaging system provided with the medicine inspection device.
 上述した課題を解決すべく提供される本発明の薬剤鑑査装置は、薬剤が分包袋内に収容された状態で配置される鑑査部と、前記鑑査部に配置された前記分包袋を撮影可能な撮影装置と、前記鑑査部に配置された前記分包袋を照明する照明装置と、前記撮影装置によって得られた画像を用いて画像マッチング処理を行うことにより、薬剤の数量及び種類のいずれか一方又は双方を薬剤情報として検出する薬品情報検出制御を実行可能な制御手段とを備えており、前記照明装置が、前記鑑査部に配置された分包袋を前記撮影装置側から照射する正面側照明装置と、前記分包袋を背面側から照射する背面側照明装置とを有し、前記制御手段が、前記正面側照明装置をオン状態として前記撮影装置により撮影された正面側照明画像と、前記背面側照明装置をオン状態として前記撮影装置により撮影された背面側照明画像とに基づき前記分包袋内に収容されている薬剤の画像を抽出し、当該薬剤の画像に基づいて薬剤情報を検出するものであり、前記薬品情報検出制御が、前記背面側照明画像において暗色の領域を薬剤の存在が想定される薬剤候補領域Aとして抽出する薬剤候補領域抽出工程と、前記正面側照明画像に基づいて分包袋に付された印字が含まれている領域を印字候補領域Bとして抽出する印字候補領域抽出工程と、前記背面側照明画像における輝度分布に基づき、前記印字候補領域Bに含まれている印字に相当する領域を印字領域Cとして特定する印字領域特定工程と、前記薬剤候補領域Aから印字領域Cを差し引くことにより薬剤領域Xを導出する薬剤領域導出工程と、を経て実施されることを特徴とするものである。 The medicine inspection device of the present invention provided to solve the above-described problem is an image of the inspection part arranged in a state where the medicine is accommodated in the packaging bag, and the packaging bag arranged in the inspection part Any of the quantity and type of the medicine by performing image matching processing using a possible imaging device, an illuminating device that illuminates the packaging bag arranged in the inspection unit, and an image obtained by the imaging device A control unit capable of executing drug information detection control for detecting either or both as drug information, and the illumination device irradiates a sachet disposed in the inspection unit from the imaging device side. A front-side illumination image captured by the imaging device with the front-side illumination device turned on, and a rear-side illumination device that irradiates the packaging bag from the rear side. , Back side illumination An image of a medicine stored in the packaging bag is extracted based on a back side illumination image photographed by the photographing device with the device turned on, and medicine information is detected based on the medicine image. Yes, the medicine information detection control is performed based on the medicine candidate area extraction step of extracting a dark area as a medicine candidate area A in which the presence of medicine is assumed in the back side illumination image and the front side illumination image. Based on the print candidate area extraction step for extracting the area including the print attached to the bag as the print candidate area B, and the brightness distribution in the back side illumination image, the print included in the print candidate area B A printing region specifying step of specifying the corresponding region as a printing region C; and a medicine region derivation step of deriving a medicine region X by subtracting the printing region C from the medicine candidate region A. It is characterized in being implemented Te.
 本発明の薬剤鑑査装置は、薬剤候補領域抽出工程によって導出された薬剤候補領域Aから、印字領域特定工程において特定された印字領域Cを差し引くことにより、薬剤領域Xを導出することとしている。また、印字領域Cの導出に際し、先ず印字候補領域抽出工程を実施して正面側照明画像に基づいて分包袋に付された印字が含まれている領域を印字候補領域Bとして絞り込んだ後、印字領域特定工程において背面側照明画像における輝度分布に基づいて印字候補領域Bに含まれている印字に相当する領域を特定することとしている。このように、本発明の薬剤鑑査装置においては、正面側照明画像及び背面側照明画像の双方の観点から印字領域Cを絞り込むこととしているため、印字領域Cの導出精度が高い。従って、本発明の薬剤鑑査装置によれば、薬剤領域Xを精度良く導出することが可能となり、精度の高い鑑査を行うことができる。 The drug inspection device of the present invention derives the drug area X by subtracting the print area C specified in the print area specifying process from the drug candidate area A derived in the drug candidate area extracting process. Further, when deriving the print area C, first, a print candidate area extraction step is performed, and after narrowing the area including the print attached to the packaging bag based on the front side illumination image as the print candidate area B, In the print area specifying step, an area corresponding to printing included in the print candidate area B is specified based on the luminance distribution in the back side illumination image. Thus, in the medicine inspection device of the present invention, since the printing area C is narrowed down from the viewpoint of both the front side illumination image and the back side illumination image, the derivation accuracy of the printing area C is high. Therefore, according to the medicine inspection device of the present invention, it is possible to derive the medicine region X with high accuracy, and high-precision inspection can be performed.
 上述した本発明の薬剤鑑査装置は、前記薬剤候補領域抽出工程が、前記背面側照明画像をグレイスケール化して背面照明グレイ画像を取得する処理と、前記背面照明グレイ画像を二値化処理することにより分包袋に付された印字及び薬剤の存在が想定される印字・薬剤想定領域として特定する処理と、前記背面照明グレイ画像をトップハット処理することにより得られたトップハット領域、及び前記背面照明グレイ画像をボトムハット処理することにより得られたボトムハット領域の和領域を印字の存在が想定される印字想定領域として導出する処理と、を実施し、前記印字・薬剤想定領域と前記印字想定領域との差分により、薬剤の存在が想定される薬剤候補領域Aを導出することを特徴とするものであることが望ましい。 In the above-described drug inspection device of the present invention, the drug candidate region extraction step includes processing for obtaining a back-lighted gray image by converting the back-side illuminated image to gray scale, and binarizing the back-lit gray image The printing specified on the sachet and the printing / drug assumption area where the presence of the medicine is assumed, the top hat area obtained by top hat processing the back-lighted gray image, and the back face A process of deriving a sum area of the bottom hat area obtained by performing the bottom hat process on the illuminated gray image as a print assumed area where the presence of printing is assumed, and performing the print / drug assumption area and the print assumption It is desirable that a drug candidate area A in which the presence of a drug is assumed is derived based on a difference from the area.
 上述したように背面側照明画像から得られた背面照明グレイ画像を動的二値化処理した場合、印字及び薬剤の存在が想定される印字・薬剤想定領域が黒色の領域となり、白色に変換された背景領域と区別して特定することができる。また、背面照明グレイ画像をトップハット処理、及びボトムハット処理して得られるトップハット領域及びボトムハット領域の和領域を取得することにより、印字の存在が想定される領域(印字想定領域)を導出することができる。従って、前述したような処理により特定された印字・薬剤想定領域から印字想定領域を差し引くことにより、薬剤の存在が想定される薬剤候補領域Aを特定することができる。 As described above, when the back-lighted gray image obtained from the back-side illuminated image is subjected to the dynamic binarization process, the print / drug assumed area where the presence of the print and the medicine is assumed becomes a black area and is converted to white. It can be specified separately from the background area. In addition, by obtaining the sum area of the top hat area and the bottom hat area obtained by top hat processing and bottom hat processing of the back-lighted gray image, the area where printing is expected (print assumption area) is derived. can do. Accordingly, by subtracting the print assumption area from the print / drug assumption area specified by the processing as described above, it is possible to specify the drug candidate area A in which the presence of the drug is assumed.
 また、上述した本発明の薬剤鑑査装置は、前記印字候補領域抽出工程が、前記正面側照明画像をRGB分解して得られるRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の各画像についてボトムハット処理を実施し、Rチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色であると想定される領域を印字候補領域Bとして抽出するものであることが好ましい。 Further, in the medicine inspection device of the present invention described above, the print candidate region extracting step is a bottom hat for each of the R channel image, the G channel image, and the B channel image obtained by performing RGB separation on the front side illumination image. It is preferable that the processing is performed and an area assumed to be black in all of the R channel image, the G channel image, and the B channel image is extracted as the print candidate area B.
 本発明の薬剤鑑査装置においては、正面側照明画像をRGB分解して得られるRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色の印字が黒色であると認識されることを利用し、印字候補領域Bとそれ以外の領域とに区別できることに着目して印字候補領域抽出工程を実施することとしている。そのため、本発明の薬剤鑑査装置によれば、印字候補領域Bを抽出することが可能となる。 The drug inspection device of the present invention utilizes the fact that black printing is recognized as black in all of the R channel image, G channel image, and B channel image obtained by subjecting the front side illumination image to RGB decomposition. In consideration of the fact that the print candidate area B can be distinguished from the other areas, the print candidate area extraction step is performed. Therefore, according to the medicine inspection device of the present invention, it is possible to extract the print candidate area B.
 ここで、上述したようにして印字候補領域Bを抽出した場合、ロットナンバー等を示すために薬剤に付されている刻印等が、分包袋に付された印字であると誤認される可能性にまで配慮すれば、さらに高精度に鑑査を行うことができると想定される。かかる想定の下、薬剤に付された刻印等と、分包袋に付された印字とを区別するための方策を種々検討したところ、正面側照明画像中において輝度が相違することを利用すれば印字候補領域Bから薬剤に付された刻印等を排除しうるとの知見を得た。 Here, when the print candidate area B is extracted as described above, there is a possibility that the stamp or the like attached to the medicine to indicate the lot number or the like is the print attached to the packing bag. It is assumed that the inspection can be performed with higher accuracy if the above is taken into consideration. Under such assumptions, various measures for distinguishing between the markings attached to the medicine and the printing attached to the sachet were examined, and if the difference in brightness in the front side illumination image was utilized, The knowledge that the markings and the like attached to the medicine can be excluded from the printing candidate area B was obtained.
 かかる知見に基づいて提供される本発明の薬剤鑑査装置は、前記印字領域特定工程が、前記背面側照明画像をグレイスケール化した背面照明グレイ画像をトップハット処理することにより得られたトップハット領域、及び前記背面照明グレイ画像をボトムハット処理することにより得られたボトムハット領域の和領域として導出された印字想定領域から、前記印字領域Cを絞り込む工程であって、前記正面側照明画像中の前記印字想定領域について輝度分布を分析し、文字に相当する領域と他の領域とを区別するための輝度の基準を規定する輝度基準規定処理と、前記正面側照明画像をRGB分解して得られるRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色であると想定される印字候補領域Bを規定し、前記正面側照明画像中における前記印字候補領域B内に含まれている前記印字領域Cを、前記輝度基準規定処理によって規定された輝度の基準に基づき絞り込む処理と、を経て実行されるものである。 The medicine inspection device of the present invention provided on the basis of such knowledge is the top hat region obtained by performing the top hat processing on the back-illuminated gray image in which the printing region specifying step grayscales the back-side illuminated image. And a step of narrowing down the print area C from the assumed print area derived as the sum area of the bottom hat area obtained by performing the bottom hat process on the back-lighted gray image, It is obtained by analyzing the luminance distribution of the assumed print area, luminance standard defining processing for defining a luminance standard for distinguishing between a region corresponding to a character and another region, and RGB decomposition of the front side illumination image A print candidate area B that is assumed to be black in all of the R channel image, the G channel image, and the B channel image is defined, The processing is performed through a process of narrowing down the print area C included in the print candidate area B in the front side illumination image based on the luminance standard defined by the luminance standard defining process. .
 本発明の薬剤鑑査装置では、印字領域特定工程において輝度基準規定処理と、絞込処理とを経て実行される。輝度基準規定処理においては、上述した薬剤候補領域抽出工程の実行方法として説明したのと同様の手法により導出された印字想定領域を正面側照明画像に適用し、正面側照明画像中に占める印字想定領域について輝度分布を分析することにより文字に相当する領域と他の領域とを区別するための輝度の基準を規定する処理を実行する。また、絞込処理においては、上述した印字候補領域抽出工程におけるのと同様の手法により導出された印字候補領域Bを正面側照明画像に適用し、正面側照明画像中において印字候補領域B内に含まれている印字領域Cを、輝度基準規定処理によって規定された輝度の基準に基づき絞り込む処理を実行する。このような処理を行うことにより、薬剤に付された刻印等と分包袋に付された印字とを適確に区別することが可能となり、印字領域Cに薬剤に付された刻印等が含まれることを抑制できる。 In the medicine inspection device according to the present invention, the process is performed through the luminance standard defining process and the narrowing process in the printing area specifying step. In the luminance standard defining process, a print assumption region derived by the same method as described as the execution method of the above-described drug candidate region extraction step is applied to the front side illumination image, and the print assumption that occupies in the front side illumination image By analyzing the luminance distribution for the region, a process for defining a luminance reference for distinguishing the region corresponding to the character from other regions is executed. In the narrowing-down process, the print candidate area B derived by the same method as in the print candidate area extraction step described above is applied to the front side illumination image, and the print candidate area B is included in the front side illumination image. A process of narrowing the included print area C based on the luminance standard defined by the luminance standard defining process is executed. By performing such processing, it becomes possible to accurately distinguish the markings attached to the medicine and the printing attached to the packaging bag, and the printing area C includes the markings attached to the medicine. Can be suppressed.
 ここで、本発明の薬剤鑑査装置においては、鑑査対象の薬剤が分包袋に収容された状態で撮影される。そのため、分包袋の皺や光の反射具合等によって写り込んだ筋の影響により、単一の薬剤であるにも関わらず複数の薬剤が存在するように認識されてしまう可能性がある。薬剤鑑査装置における鑑査精度をより一層向上させるためには、かかる可能性を排除すべく何らかの方策を講じることが望ましい。 Here, in the medicine inspection device of the present invention, the medicine to be inspected is photographed in a state of being contained in a sachet. For this reason, there is a possibility that a plurality of medicines may be recognized even though they are a single medicine due to the influence of the muscles reflected due to the wrinkles of the sachets or the reflection of light. In order to further improve the inspection accuracy in the drug inspection device, it is desirable to take some measures to eliminate such possibility.
 かかる知見に基づいて提供される本発明の薬剤鑑査装置は、前記薬剤領域導出工程において導出された薬剤領域Xに基づき、鑑査対象となる領域を規定する鑑査領域規定工程を有し、前記鑑査領域規定工程が、前記薬剤候補領域Aを縮小した縮小薬剤候補領域A2を導出する処理と、前記薬剤領域Xと前記縮小薬剤候補領域A2との和領域を薬剤鑑査領域Zとして導出する処理と、を経て実施されるものであることが好ましい。 The drug inspection device of the present invention provided based on such knowledge has an inspection area defining step for defining an area to be inspected based on the drug area X derived in the drug area deriving step, and the inspection area The defining step includes a process of deriving a reduced drug candidate area A2 obtained by reducing the drug candidate area A, and a process of deriving a sum area of the drug area X and the reduced drug candidate area A2 as a drug inspection area Z. It is preferable that it is implemented after that.
 本発明の薬剤鑑査装置においては、鑑査領域規定工程として、薬剤候補領域Aを縮小した縮小薬剤候補領域A2を導出し、薬剤領域Xと縮小薬剤候補領域A2との和領域を薬剤鑑査領域Zとして導出する処理を実行する。これにより、単一の薬剤についての薬剤領域Xが複数の領域に分割されて誤検知されることを防止し、薬剤の鑑査精度を向上させることが可能となる。 In the medicine inspection device of the present invention, as the inspection area defining step, a reduced medicine candidate area A2 obtained by reducing the medicine candidate area A is derived, and the sum area of the medicine area X and the reduced medicine candidate area A2 is used as the medicine inspection area Z. Execute the process to derive. Thereby, it is possible to prevent the medicine region X of a single medicine from being divided into a plurality of regions and erroneously detected, and to improve the inspection accuracy of the medicine.
 また、本発明の薬剤鑑査装置は、薬剤を撮影した画像をマスター画像として蓄積した画像データベースを用いて画像マッチング処理を実行可能なものであり、前記画像データベースに登録される薬剤について、単一の薬剤を複数に分割した分割薬剤に係るマスター画像を、全体形状を示すマスター画像に基づいて作成可能なマスター画像作成手段を有し、前記マスター画像作成手段が、登録対象である薬剤を撮影した背面側照明画像に基づき薬剤の全体形状に係る輪郭線を導出する輪郭線導出処理と、前記正面側照明画像において、前記輪郭線導出処理により得られた前記輪郭線の内部領域に対応する領域内の画像を、薬剤の全体形状に係る画像として取得する全体画像取得処理と、前記正面側照明画像において、前記輪郭線導出処理により得られた前記輪郭線の内部領域に対応する領域外の画像を背景画像として認識し、前記背景画像の平均輝度を導出する背景輝度導出処理と、前記背景輝度導出処理で得られた前記背景画像に相当する輝度を有するマスキング画像を作成すると共に、前記全体画像取得処理により得られた薬剤の全体形状に係る画像の一部の領域に、前記マスキング画像を重複させるオーバーレイ処理と、を実施することにより分割薬剤についてのマスター画像を作成可能なものとすることが可能である。 Further, the medicine inspection device of the present invention is capable of performing image matching processing using an image database in which an image obtained by photographing medicine is stored as a master image, and a single medicine is registered in the image database. A master image creating unit capable of creating a master image related to a divided medicine divided into a plurality of medicines based on a master image showing an overall shape, and the master image creating means takes a back image of the medicine to be registered A contour line deriving process for deriving a contour line related to the entire shape of the medicine based on the side illumination image; and in the front side illumination image, in an area corresponding to an internal area of the contour line obtained by the contour line deriving process In the entire image acquisition process for acquiring an image as an image relating to the entire shape of the medicine, and in the front side illumination image, the contour line derivation process Recognizing an image outside the region corresponding to the obtained inner region of the contour line as a background image and deriving an average luminance of the background image, and a background luminance derivation process, and the background image obtained by the background luminance derivation process A masking image having a luminance equivalent to the above, and an overlay process for overlapping the masking image in a partial region of the image related to the entire shape of the medicine obtained by the entire image acquisition process. Thus, it is possible to create a master image for the divided medicine.
 本発明の薬剤鑑査装置においては、マスター画像作成手段により単一の薬剤の全体形状を示すマスター画像に基づいて複数に分割した分割薬剤についてのマスター画像を取得することができる。本発明の薬剤鑑査装置においては、先ず輪郭線導出処理により背面側照明画像から導出した全体形状に係る輪郭線を導出し、その後この輪郭線を正面側照明画像に適用して全体画像を取得する処理(全体画像取得処理)を実行する。また、正面側照明画像において輪郭線の外部領域の画像を背景画像として認識すると共に、背景画像の平均輝度を導出する処理(背景輝度導出処理)を実行する。このようにして導出された平均輝度のマスキング画像を作成し、全体画像取得処理により得られた薬剤の全体形状に係る画像の一部の領域にマスキング画像を重複させるオーバーレイ処理を実行することにより、分割薬剤についてのマスター画像を取得することができる。従って、本発明によれば、全体形状を示すマスター画像から、分割薬剤についてのマスター画像を正確に作成することができる。 In the medicine inspection device of the present invention, it is possible to acquire a master image of a divided medicine divided into a plurality of parts based on a master image showing the entire shape of a single medicine by the master image creating means. In the medicine inspection device of the present invention, first, a contour line related to the overall shape derived from the back side illumination image is derived by the contour line derivation process, and then the contour line is applied to the front side illumination image to obtain the entire image. Processing (whole image acquisition processing) is executed. Further, in the front side illumination image, an image in the outer region of the contour line is recognized as a background image, and processing for deriving the average luminance of the background image (background luminance derivation processing) is executed. By creating a masking image with an average luminance derived in this way, and executing an overlay process that overlaps the masking image with a partial area of the image related to the overall shape of the drug obtained by the overall image acquisition process, A master image for the divided medicine can be acquired. Therefore, according to this invention, the master image about a division medicine can be created correctly from the master image which shows the whole shape.
 ここで、薬剤を撮影した画像をマスター画像として蓄積した画像データベースを用いた照合により薬剤の種類等を特定する場合には、登録されているマスター画像と、実際に撮影装置によって撮影して得られる画像とで色調が相違する等して薬剤の特定がうまくいかないことも想定しうる。すなわち、撮影装置や照明装置の個体差等に起因して同じ薬剤について撮影を行っても色調等が異なる可能性があり、これを原因として鑑査不良が生じることも想定しうる。 Here, in the case of specifying the type of medicine by collation using an image database in which an image obtained by photographing the medicine is stored as a master image, it is obtained by photographing the registered master image and the photographing apparatus actually. It may be assumed that the identification of the drug is not successful due to the difference in color tone from the image. That is, even if the same medicine is imaged due to individual differences of the imaging device or the illumination device, the color tone or the like may be different, and it may be assumed that inspection failure occurs due to this.
 かかる事態を想定して提供される本発明の薬剤鑑査装置は、薬剤を撮影した画像をマスター画像として蓄積した画像データベースを用いて照合可能なものであり、前記画像データベースに登録されている薬剤について、前記鑑査部に配置された所定の薬剤を前記撮影装置によって撮影した画像と、当該薬剤のマスター画像とを照合し、前記制御手段により同一の薬剤でないとの判定がなされることを条件として、前記撮影装置によって撮影した画像に基づいて作成されたマスター画像を、既登録のマスター画像と置換可能であるものであることが望ましい。 The drug inspection device of the present invention provided in view of such a situation can be collated using an image database in which an image obtained by photographing a drug is stored as a master image, and the drug registered in the image database. The image obtained by photographing the predetermined medicine arranged in the inspection unit with the photographing device and the master image of the medicine are collated, and it is determined that the control means determines that they are not the same medicine. It is desirable that a master image created based on an image photographed by the photographing device can be replaced with a registered master image.
 かかる構成とすることにより、画像データベースに登録されているマスター画像と、実際に薬剤を撮影した画像の色調差等を原因とする鑑査不良を防止することができる。 By adopting such a configuration, it is possible to prevent an inspection failure caused by a color difference between a master image registered in the image database and an image obtained by actually photographing a medicine.
 本発明の薬剤分包システムは、上述した本発明の薬剤鑑査装置と、処方にあわせて薬剤を一包分ずつ分包袋に分包可能な薬剤分包装置とを備えており、前記薬剤分包装置において分包された薬剤の個数を前記薬剤鑑査装置によって鑑査可能なものである。 The drug packaging system of the present invention includes the above-described drug inspection device of the present invention, and a drug packaging device capable of packaging the medicine into a packaging bag one by one in accordance with the prescription. The number of medicines packaged in the packaging device can be inspected by the medicine inspection device.
 本発明によれば、薬剤の分包から鑑査に至る一連の業務を精度良く実施することが可能な薬剤分包システムを提供することができる。 According to the present invention, it is possible to provide a medicine packaging system capable of accurately performing a series of operations from medicine packaging to inspection.
 本発明によれば、印字が付された分包袋に収容された薬剤について十分な精度で鑑査可能な薬剤鑑査装置、及び当該薬剤鑑査装置を備えた薬剤分包システムを提供することができる。 According to the present invention, it is possible to provide a medicine inspection device capable of inspecting a medicine contained in a printed packaging bag with sufficient accuracy, and a medicine packaging system including the medicine inspection device.
(a)は本発明の一実施形態に係る薬剤鑑査装置の正面図であり、(b)は制御装置を示すブロック図である。(A) is a front view of the chemical | medical agent inspection apparatus which concerns on one Embodiment of this invention, (b) is a block diagram which shows a control apparatus. 図1(a)に示した薬剤鑑査装置の内部構造を示した斜視図である。It is the perspective view which showed the internal structure of the chemical | medical agent inspection apparatus shown to Fig.1 (a). 薬剤鑑査装置における鑑査部周辺の構造を示した斜視図である。It is the perspective view which showed the structure of the inspection part periphery in a chemical | medical agent inspection apparatus. 起立解消手段の変形例を示す図であり、(a)は平面図、(b)は斜視図、(c)は正面図、(d)は側面図である。It is a figure which shows the modification of a standing-up cancellation | release means, (a) is a top view, (b) is a perspective view, (c) is a front view, (d) is a side view. 薬剤鑑査装置において表示されるインターフェイスの一例を示す画像図である。It is an image figure showing an example of an interface displayed in a medicine inspection device. 薬品情報検出制御の各段階において得られる画像の一例を示した画像図である。It is the image figure which showed an example of the image obtained in each step of chemical | medical agent information detection control. 薬品情報検出制御のメインルーチンに係るフローチャートである。It is a flowchart which concerns on the main routine of chemical | medical agent information detection control. 薬品情報検出制御の薬剤候補領域抽出工程において実施されるサブルーチンに係るフローチャートである。It is a flowchart which concerns on the subroutine implemented in the chemical | medical agent candidate area | region extraction process of chemical | medical agent information detection control. 薬品情報検出制御の印字候補領域抽出工程において実施されるサブルーチンに係るフローチャートである。It is a flowchart which concerns on the subroutine implemented in the printing candidate area | region extraction process of chemical | medical agent information detection control. 薬品情報検出制御の印字領域特定工程において実施されるサブルーチンに係るフローチャートである。るフローチャートである。It is a flowchart which concerns on the subroutine implemented in the printing area | region identification process of chemical | medical agent information detection control. It is a flowchart. 分割薬剤に係るマスター画像の作成方法を示したフローチャートである。It is the flowchart which showed the creation method of the master image which concerns on a division | segmentation medicine. マスター画像差し換え処理の実施方法を示したフローチャートである。It is the flowchart which showed the implementation method of a master image replacement process. 分包袋の皺や光の反射具合等によって写り込んだ筋等の影響により単一の薬剤領域が分割された状態を示す説明図である。It is explanatory drawing which shows the state by which the single chemical | medical agent area | region was divided | segmented by the influence of the stripe etc. which were reflected by the wrinkle of the packaging bag, the light reflection condition, etc. 分割薬剤に係るマスター画像の作成段階において表示されるインターフェイスを示した画像図であり、(a)は薬剤の全体形状を示す輪郭線が描かれた画像が形成された状態、(b)は薬剤を略均等に二分割した形状を示す画像が形成された状態を示す。It is an image figure showing the interface displayed in the creation stage of the master picture concerning division medicine, (a) is in the state where the picture where the outline which shows the whole shape of medicine was drawn was formed, and (b) is medicine This shows a state in which an image showing a shape obtained by dividing the image into two substantially equally is formed. 薬剤均し具を搬送経路から退避可能とした場合の動作の一例を示したフローチャートである。It is the flowchart which showed an example of the operation | movement at the time of making a chemical | medical agent leveling tool retreatable from a conveyance path | route. (a)は分包紙押さえ具を設けた状態を示す要部を拡大した側面図、(b)は(a)の平面図、(c),(d)は分包紙押さえ具の変形例を示した斜視図である。(A) is the side view which expanded the principal part which shows the state which provided the packaging paper presser, (b) is the top view of (a), (c), (d) is the modification of a packaging paper presser It is the perspective view which showed.
 以下、本発明の一実施形態に係る薬剤鑑査装置10について、図面を参照しつつ詳細に説明する。薬剤鑑査装置10は、分包紙に一服用分ずつ分包された状態で供給された鑑査対象の薬剤の数量及び種類を、一包ずつ鑑査する装置である。図1に示すように、薬剤鑑査装置10は、筐体10aの側面に鑑査対象の薬剤を導入するための導入部10bを有し、正面に操作パネル10cを有する。薬剤は、透光性を有する分包紙によって包装され、外部から視認可能な状態で薬剤鑑査装置10に供給される。また、薬剤鑑査装置10は、一服用分の薬剤を包装した分包袋bが複数、連続するように形成された分包袋連続体Bの状態で分包袋bを供給し、各分包袋bについて順次鑑査を行うことができる。 Hereinafter, a drug inspection device 10 according to an embodiment of the present invention will be described in detail with reference to the drawings. The medicine inspection apparatus 10 is an apparatus for inspecting the quantity and type of medicines to be inspected supplied one by one on a wrapping paper. As shown in FIG. 1, the medicine inspection device 10 has an introduction portion 10b for introducing the medicine to be inspected on the side surface of the housing 10a, and an operation panel 10c on the front surface. The medicine is packaged by a translucent dividing paper and supplied to the medicine inspection device 10 in a state where it can be visually recognized from the outside. In addition, the medicine inspection device 10 supplies the sachet b in a state of a sachet bag B formed so that a plurality of sachets b each containing a dose of medicine are continuous, and each sachet is provided. The inspection can be sequentially performed on the bag b.
 図1~図3に示すように、薬剤鑑査装置10は、搬送手段20、鑑査部30、撮影装置40、照明装置50、及び制御装置60等を備えている。搬送手段20は、薬剤を分包してなる分包袋連続体Bを取り込み、搬送するためのものである。搬送手段20は、従来公知のベルトコンベア、ローラコンベア等によって形成することが可能である。本実施形態では、搬送手段20としてベルトコンベアが採用されている。搬送手段20は、鑑査部30に対して搬送方向上流側に設けられた供給検知装置(図示せず)により分包紙によって形成された分包袋連続体Bが検知された場合に、後に詳述する制御装置60の制御の下で動作し、分包袋連続体Bを順次下流側に向けて搬送する。また、搬送手段20は、下流端に設けられた排出検知装置(図示せず)により、分包紙の分包袋連続体Bの末端が鑑査部30よりも下流側に排出されたことが確認された場合に、動作を停止する。 As shown in FIG. 1 to FIG. 3, the drug inspection device 10 includes a conveying means 20, an inspection unit 30, an imaging device 40, an illumination device 50, a control device 60, and the like. The conveyance means 20 is for taking in and conveying the continuous sachet bag B formed by packaging the medicine. The conveying means 20 can be formed by a conventionally known belt conveyor, roller conveyor or the like. In the present embodiment, a belt conveyor is employed as the conveying means 20. The conveying means 20 is described in detail later when a continuous sachet B formed by the wrapping paper is detected by a supply detection device (not shown) provided upstream in the conveying direction with respect to the inspection unit 30. It operates under the control of the control device 60 to be described, and sequentially conveys the continuous packaging bag B toward the downstream side. In addition, the conveying means 20 confirms that the end of the continuous wrapping bag B of the wrapping paper is discharged downstream from the inspection unit 30 by a discharge detection device (not shown) provided at the downstream end. If it is, stop the operation.
 鑑査部30は、鑑査対象の薬剤が分包袋bに収容された状態で配置される部分である。図3に示すように、鑑査部30は、分包袋bが配置される撮影用ステージ32を有する。撮影用ステージ32は、透明の板体によって形成されており、一包分の分包袋bを搭載可能な大きさを有する。撮影装置40は、鑑査部30に配置された分包袋b及びこれに収容されている薬剤を撮影するためのものである。図2に示すように、撮影装置40は、鑑査部30の真上に配置されている。 The inspection unit 30 is a part in which the medicine to be inspected is arranged in a state of being contained in the packaging bag b. As shown in FIG. 3, the inspection unit 30 includes an imaging stage 32 on which the packaging bag b is arranged. The photographing stage 32 is formed of a transparent plate and has a size capable of mounting a single packaging bag b. The imaging device 40 is for imaging the packaging bag b arranged in the inspection unit 30 and the medicine accommodated therein. As shown in FIG. 2, the imaging device 40 is disposed directly above the inspection unit 30.
 照明装置50は、鑑査部30に配置された分包袋bを照明するためのものである。照明装置50は、正面側照明装置52(図2参照)と背面側照明装置54(図3参照)とを有する。正面側照明装置52は、鑑査部30に配置された分包袋bを撮影装置40側、すなわち鑑査部30の上方側から照射するためのものである。正面側照明装置52は、いかなる照明装置によって構成されていても良いが、本実施形態では拡散光を発生させることが可能な照明装置が用いられている。背面側照明装置54は、鑑査部30に配置された分包袋bを背面側、すなわち鑑査部30を介して撮影装置40とは反対側(下方)から照射するためのものである。背面側照明装置54は、撮影用ステージ32の略全体を照明領域とするものであり、撮影用ステージ32上に搭載された分包袋b全体を背面側から照明することができる。 The illumination device 50 is for illuminating the sachet b arranged in the inspection unit 30. The illumination device 50 includes a front side illumination device 52 (see FIG. 2) and a back side illumination device 54 (see FIG. 3). The front side illumination device 52 is for irradiating the packaging bag b arranged in the inspection unit 30 from the imaging device 40 side, that is, from the upper side of the inspection unit 30. The front side illumination device 52 may be configured by any illumination device, but in this embodiment, an illumination device capable of generating diffused light is used. The back side illumination device 54 is for irradiating the packaging bag b arranged in the inspection unit 30 from the back side, that is, the side opposite to the imaging device 40 (downward) via the inspection unit 30. The back side illumination device 54 uses substantially the entire shooting stage 32 as an illumination area, and can illuminate the entire packaging bag b mounted on the shooting stage 32 from the back side.
 制御装置60は、コンピュータに対してソフトウェアをインストールすることにより、コンピュータ上に実現されている。制御装置60は、各分包袋bに収容されている薬剤が処方通りであるかを鑑査する薬剤鑑査処理等の処理を実行させることができる。 The control device 60 is realized on the computer by installing software on the computer. The control device 60 can execute processing such as a medicine inspection process for inspecting whether the medicine contained in each sachet b is as prescribed.
 本実施形態の薬剤鑑査装置10は、上述した構成を基本構成としつつ、起立解消手段70(図3,図4参照)等の付随的な構成を備えている。起立解消手段70は、分包袋b内に起立した状態で収容されている薬剤を横転させるための機構である。起立解消手段70は、鑑査部30よりも搬送方向上流側において、搬送手段20によって搬送される分包紙の正面に倣うように動作することにより、起立状態にある薬剤を分包袋内において横転させることができる。起立解消手段70は、いかなる構成のものであっても良いが、本実施形態では図4に示すようなものとされている。 The drug inspection device 10 according to the present embodiment has the above-described configuration as a basic configuration, and includes ancillary configurations such as an upright cancellation means 70 (see FIGS. 3 and 4). The standing up cancellation means 70 is a mechanism for overturning the medicine accommodated in the sachet b. The stand-up canceling means 70 operates so as to follow the front of the wrapping paper transported by the transporting means 20 on the upstream side in the transporting direction with respect to the inspection unit 30, so that the medicine in the standing state rolls over in the wrapping bag. Can be made. The standing up cancellation means 70 may have any configuration, but in this embodiment, it is as shown in FIG.
 具体的には、起立解消手段70は、アーム72を有し、アーム72の先端部に側面視が略「V」字型の接触部74を設けた構成とされている。アーム72は、分包紙の搬送路を横断するように設けられた支軸76に対して回動自在に装着されている。また、アーム72は、バネ78により搬送路側に向けて付勢されている。これにより、搬送路を通過する分包紙の正面に対し、分包紙及び薬剤を破損しない程度の適度な強度で接触部74を分包紙に接触させることができる。 Specifically, the standing-up eliminating means 70 has an arm 72 and is provided with a contact portion 74 having a substantially “V” shape in side view at the tip of the arm 72. The arm 72 is rotatably attached to a support shaft 76 that is provided so as to cross the conveyance path of the wrapping paper. The arm 72 is urged toward the conveyance path by a spring 78. Accordingly, the contact portion 74 can be brought into contact with the wrapping paper with an appropriate strength so as not to damage the wrapping paper and the medicine with respect to the front surface of the wrapping paper passing through the transport path.
 接触部74は、搬送手段20による搬送方向上流側に向けて傾斜した導入側傾斜面74aと、下流側に向けて傾斜した排出側傾斜面74bと、薬剤均し具75とを有する。接触部74は、搬送手段20によって形成された搬送路及びこの上を通過する分包袋連続体B(分包袋b)と導入側傾斜面74aとがなす角θ1、及び搬送路と排出側傾斜面74bとがなす角θ2は、共に鋭角である。 The contact portion 74 includes an introduction side inclined surface 74a inclined toward the upstream side in the conveyance direction by the conveyance means 20, a discharge side inclined surface 74b inclined toward the downstream side, and a medicine leveling tool 75. The contact portion 74 includes the conveyance path formed by the conveyance means 20, the angle θ1 formed by the continuous sachet bag B (packaging bag b) passing through the conveyance path 20, and the introduction-side inclined surface 74a, and the conveyance path and the discharge side. The angle θ2 formed by the inclined surface 74b is an acute angle.
 薬剤均し具75は、導入側傾斜面74a及び排出側傾斜面74bの間に設けられている。薬剤均し具75は、支軸75a、及び珠部材75bを有する。支軸75aは、導入側傾斜面74a及び排出側傾斜面74bの境界部分に形成される稜線に沿って延びるように設置された軸体である。すなわち、支軸75aは、起立解消手段70の設置状態において、分包袋連続体Bの流れ方向に対して略直行するように設置されている。珠部材75bは、算盤の珠あるいはビーズのような珠によって構成されている。本実施形態では、珠部材75bとして、算盤の珠のように、二つの台円錐の下底部同士を接合したような外観形状を有し、断面形状が六角形または略菱形の珠が用いられている。珠部材75bは、支軸75aに対して摺動可能なように装着されている。 The medicine leveling tool 75 is provided between the introduction side inclined surface 74a and the discharge side inclined surface 74b. The medicine leveling tool 75 includes a support shaft 75a and a bead member 75b. The support shaft 75a is a shaft body installed so as to extend along a ridgeline formed at a boundary portion between the introduction-side inclined surface 74a and the discharge-side inclined surface 74b. That is, the support shaft 75a is installed so as to be substantially perpendicular to the flow direction of the continuous sachet B in the installed state of the standing-up eliminating means 70. The bead member 75b is made of an abacus bead or a bead such as a bead. In the present embodiment, as the bead member 75b, a bead having an appearance shape in which the bottom bases of two trapezoidal cones are joined to each other like a abacus bead and having a hexagonal or substantially rhombic cross section is used. Yes. The bead member 75b is mounted so as to be slidable with respect to the support shaft 75a.
 上述したような構成とした場合、分包袋連続体Bが往復動することにより、珠部材75bが薬剤に対して当接しつつ支軸75aに沿って摺動する。このようにして珠部材75bが軸方向に摺動しつつ程よく薬剤に当接することで、起立状態等にある薬剤を横転させ、鑑査しやすい状態にすることができる。 In the case of the above-described configuration, the sachet 75b slides along the support shaft 75a while abutting against the medicine by the reciprocating movement of the continuous bag B. In this way, the bead member 75b slides in the axial direction and comes into contact with the drug moderately, whereby the drug in an upright state or the like can be rolled over to make it easy to inspect.
 薬剤鑑査装置10は、上述した薬剤均し具75を必ず使用する構成とするだけでなく、薬剤均し具75を使用するか否かを適宜選択可能な構成とすることも可能である。薬剤均し具75の使用及び不使用の選択手段はいかなるものであっても良いが、例えば図5に示すようなインターフェイスを薬剤鑑査装置10の操作画面に表示し、薬剤均し具75を使用するか否かを適宜選択可能とすることができる。具体的には、図5の例においては、「そろばんシェイク」と表示された項目に対応するボタンをタッチすることにより、薬剤均し具75の使用及び不使用の選択をすることができる。 The drug inspection device 10 can be configured not only to use the above-described drug leveling device 75 but also to be able to appropriately select whether or not to use the drug leveling device 75. Any means may be used for selecting whether or not to use the medicine leveling device 75. For example, an interface as shown in FIG. 5 is displayed on the operation screen of the medicine inspection device 10 and the medicine leveling device 75 is used. Whether or not to do so can be appropriately selected. Specifically, in the example of FIG. 5, the use or non-use of the medicine leveling device 75 can be selected by touching a button corresponding to the item displayed as “Abacus shake”.
 ここで、上述した薬剤均し具75により薬剤を均す必要がない場合にも、搬送手段20により搬送される分包紙に対して薬剤均し具75が接触した状態であると、薬剤均し具75から分包紙(分包袋連続体B)に対して常にランダムな負荷が作用することになる。これにより、鑑査を進めるうちに分包袋連続体Bが搬送手段20によって構成された搬送経路から逸脱してしまう原因になりかねない。 Here, even when it is not necessary to level the drug by the above-described drug leveling tool 75, if the drug leveling tool 75 is in contact with the wrapping paper transported by the transport means 20, A random load always acts on the wrapping paper (packaging bag continuous body B) from the tool 75. This may cause the continuous sachet B to deviate from the transport path formed by the transport means 20 while proceeding with inspection.
 そこで、かかる懸念が想定される場合や、上述したように薬剤均し具75の使用を適宜選択可能とした場合においては、搬送手段20による搬送経路から薬剤均し具75を逃すことが可能な構成とし、薬剤均し具75を使用しなくて良い場合に、薬剤均し具75を搬送経路から逃した状態とするようにすることが望ましい。 Therefore, when such a concern is assumed or when the use of the medicine leveling device 75 can be appropriately selected as described above, the medicine leveling device 75 can be released from the transport path by the transport means 20. In the case where it is not necessary to use the medicine leveling tool 75, it is desirable that the medicine leveling tool 75 is in a state of being missed from the transport path.
 具体的には、初期段階においては、薬剤均し具75が搬送経路から退避された状態とされる。そして、図15に示すように、先ずステップ7-1において薬剤を均す「均し作業」が必要か否かの検出を行う。均し作業の要否については、上述した薬剤均し具75の使用条件の設定状態や、後に詳述する画像処理等、適宜の方法により実施できる。 Specifically, in the initial stage, the medicine leveling device 75 is in a state of being retracted from the transport path. Then, as shown in FIG. 15, first, in step 7-1, it is detected whether or not “a leveling operation” for leveling the medicine is necessary. Whether or not the leveling operation is necessary can be performed by an appropriate method such as the setting state of the use condition of the medicine leveling tool 75 described above or image processing described in detail later.
 ステップ7-1において薬剤を均すべき分包袋が検出された場合には、ステップ7-2において上述した接触部74が設けられている位置(均し作業位置)まで、均し作業の対象である分包袋を移動させる。また、ステップ7-3において、薬剤均し具75を搬送手段20による搬送経路内に移動させる。このような状態で、ステップ7-4において分包袋連続体Bを往復動させることにより、分包袋内の薬剤を均す。その後、ステップ7-5において薬剤均し具75を搬送経路から退避させた後、ステップ7-6において分包袋を鑑査位置まで移動させる。以後は、通常通りに鑑査作業を行う。 If a sachet for leveling the medicine is detected in step 7-1, the leveling work target is reached up to the position (leveling work position) where the contact portion 74 is provided in step 7-2. Move the sachet that is. In step 7-3, the medicine leveling tool 75 is moved into the transport path by the transport means 20. In this state, the medicine in the packing bag is leveled by reciprocating the packing bag continuous body B in step 7-4. Thereafter, in step 7-5, the medicine leveling tool 75 is retracted from the conveyance path, and in step 7-6, the packing bag is moved to the inspection position. Thereafter, the inspection work will be carried out as usual.
 上述したように薬剤均し具75を分包袋(分包袋連続体B)の搬送経路から適宜退避可能な構成することにより、薬剤均し具75によって分包袋連続体Bにランダムな負荷が作用することを最小限に抑制し、分包袋連続体Bが搬送経路から逸脱すること、及び当該逸脱に伴う鑑査不良の発生を防止できる。また、均し作業が必要な分包袋については適確に均し作業を行うことができる。 As described above, the medicine leveling device 75 can be appropriately retracted from the delivery path of the packaging bag (packaging bag continuous body B), so that a random load is applied to the packaging bag continuous body B by the medicine leveling device 75. Can be suppressed to the minimum, and the sachet continuous body B can deviate from the conveyance path, and the occurrence of inspection defects associated with the deviation can be prevented. In addition, it is possible to perform the leveling work accurately for the sachets that require leveling.
 ここで、上述したように起立状態等にある薬剤が分包されている分包袋を薬剤均し具75を設けられた位置まで移動させ、分包袋連続体Bを往復動させる場合、この往復動に伴い分包袋連続体Bに皺が入る可能性がある。これに加えて、本実施形態では、図3に示すように搬送手段20において搬送面(搬送経路)をなす部分の幅方向一方側に分包袋連続体Bを保持するためのクランプ22が設けられているが、幅方向他方側にはクランプ22に相当するものがない。そのため、前記往復動を行うことにより、分包袋連続体Bがクランプ22から外れる等して、さらに分包袋連続体Bに皺が入りやすい状況になりうる。分包袋連続体Bに皺が入ると、外観が低下してしまうだけでなく、鑑査部30において実施される鑑査の精度が低下する懸念も生じる。また更に悪い状況として、搬送経路から分包袋連続体Bが脱線することにより、装置内において分包袋連続体Bが詰まってしまうような状況も想定しうる。 Here, as described above, when the packaging bag in which the medicine in the standing state or the like is packaged is moved to the position where the medicine leveling tool 75 is provided and the packaging bag continuous body B is reciprocated, There is a possibility that wrinkles may enter into the continuous sachet B as it reciprocates. In addition to this, in the present embodiment, as shown in FIG. 3, a clamp 22 for holding the continuous sachet bag B is provided on one side in the width direction of the portion that forms the conveyance surface (conveyance path) in the conveyance means 20. However, there is no equivalent to the clamp 22 on the other side in the width direction. Therefore, by performing the reciprocating motion, the sachet bag continuous body B may come off from the clamp 22 or the like, so that the bag can easily enter the sachet bag continuous body B. When wrinkles enter into the continuous sachet B, not only the appearance is deteriorated, but also there is a concern that the accuracy of inspection performed in the inspection unit 30 is reduced. Furthermore, as a worse situation, a situation can be assumed in which the continuous sachet B is clogged in the apparatus due to derailment of the continuous sachet B from the transport path.
 従って、上述した分包袋連続体Bへの皺入りが懸念される場合には、例えば図16のような構成とすることが望ましい。具体的には、薬剤均し具75に対して搬送方向に離れた位置に分包紙押さえ具80を設ける。分包紙押さえ具80は、分包袋連続体Bの搬送方向(図16(a)における矢印X方向)への往復動を許容しつつ、分包袋連続体Bに対して接触し、搬送手段20の搬送面20a側に押さえる力を作用させるものである。本実施形態では、分包紙押さえ具80が、薬剤均し具75に対して搬送方向上流側に配置されている。また、分包紙押さえ具80は、薬剤均し具75と搬送手段20の駆動ローラ24との間に配置されている。また、分包紙押さえ具80には、バネ等の付勢手段(図示せず)により搬送面側への付勢力が作用している。分包紙押さえ具80に作用している付勢力は、分包紙押さえ具80の下を分包袋連続体Bが通過することにより、分包紙連続体Bの表面に倣って分包紙押さえ具80が上下動(図16(a)の矢印Z参照)できる程度の大きさとされている。 Therefore, when there is a concern about the entry of the bag into the above-mentioned continuous sachet B, it is desirable to have a configuration as shown in FIG. More specifically, the wrapping paper pressing tool 80 is provided at a position away from the medicine leveling tool 75 in the transport direction. The wrapping paper presser 80 is in contact with the sachet bag continuous body B while allowing reciprocation in the transport direction of the sachet bag continuous body B (in the direction of arrow X in FIG. 16A). A pressing force is applied to the conveying surface 20a side of the means 20. In the present embodiment, the wrapping paper pressing tool 80 is arranged on the upstream side in the transport direction with respect to the medicine leveling tool 75. Further, the separating paper presser 80 is disposed between the medicine leveling tool 75 and the driving roller 24 of the transport means 20. Further, a biasing force toward the conveyance surface is applied to the paper wrapper presser 80 by a biasing means (not shown) such as a spring. The urging force acting on the wrapping paper presser 80 follows the surface of the wrapping paper continuum B as the wrapping paper continuum B passes under the wrapping paper presser 80. The size is such that the presser 80 can move up and down (see arrow Z in FIG. 16A).
 本実施形態では、図3や図16(b)に示すように、搬送手段20の幅方向一端側にクランプ22が設けられている。そのため、クランプ22が設けられた位置から搬送手段20の幅方向に離れた位置に分包紙押さえ具80を設けることで、幅方向の各所において分包袋連続体Bが搬送手段20による搬送経路から逸脱しないように保持し、分包袋連続体Bへの皺入りを防止できる。 In this embodiment, as shown in FIG. 3 and FIG. 16B, a clamp 22 is provided on one end side in the width direction of the conveying means 20. For this reason, by providing the wrapping paper presser 80 at a position away from the position where the clamp 22 is provided in the width direction of the conveyance means 20, the wrapping bag continuous body B is conveyed by the conveyance means 20 at various positions in the width direction. It can hold | maintain so that it may not deviate from, and can enter into the sachet bag continuous body B.
 また、図16に示すように、分包紙押さえ具80の本体82において分包袋連続体Bと接触する部分にローラー84を設けることにより、分包袋連続体Bの往復動をスムーズなものとすることができる。これに加え、分包袋連続体Bに形成されてしまった皺をローラー82によって伸ばすことが可能となる。 In addition, as shown in FIG. 16, by providing a roller 84 at a portion of the main body 82 of the wrapping paper presser 80 that contacts the wrapping bag continuum B, the reciprocating motion of the wrapping bag continuum B is smooth. It can be. In addition to this, the wrinkles formed in the continuous sachet bag B can be stretched by the roller 82.
 なお、図16に示した例では、分包紙押さえ具80として本体82にローラー84を取り付けたものを例示したが、本発明はこれに限定されるものではない。具体的には、図16(c),(d)に示す分包紙押さえ具90,100のようにJ字型あるいはL字型に形成された板体等、分包袋連続体Bの搬送方向への往復動を許容しつつ、分包袋連続体Bに対して接触し、搬送手段20の搬送面側に押さえる力を作用させることができるものであればいかなるものであっても良い。また、少なくとも分包袋連続体Bとの接触部分には、必ずしもローラー84を設ける必要はないが、分包紙連続体Bがスムーズに滑ることが可能な金属、樹脂等を用いることが望ましい。 In the example shown in FIG. 16, the wrapping paper presser 80 is illustrated with the roller 84 attached to the main body 82, but the present invention is not limited to this. Specifically, the transport of the continuous sachet B, such as a J-shaped or L-shaped plate as in the wrapping paper retainers 90 and 100 shown in FIGS. Any one can be used as long as it can contact the sachet bag continuous body B and allow a pressing force to be applied to the conveying surface side of the conveying means 20 while allowing reciprocation in the direction. Further, it is not always necessary to provide the roller 84 at a contact portion with at least the packaging bag continuous body B, but it is desirable to use a metal, a resin, or the like that can smoothly slide the packaging paper continuous body B.
 図16に示した例では、ローラー84を搬送手段20の幅方向に2つ設けた例を示したが、ローラー84の個数は適宜設定することが可能である。また、分包紙押さえ具80は、ローラー84を分包紙連続体Bに対して幅方向の一部(本実施形態では2箇所)において接触可能な構成であるが、分包紙連続体Bに対して略全幅に亘って接触可能なものであっても良い。 In the example shown in FIG. 16, an example in which two rollers 84 are provided in the width direction of the conveying unit 20 is shown, but the number of rollers 84 can be set as appropriate. Further, the wrapping paper presser 80 is configured to be able to contact the roller 84 with respect to the wrapping paper continuous body B at a part in the width direction (two locations in the present embodiment). However, it may be contactable over substantially the entire width.
≪薬剤鑑査処理について≫
 制御装置60は、薬剤の画像をマスター画像として蓄積した画像データベース62を備えている。制御装置60は、画像データベース62に登録されているマスター画像と、撮影装置40によって取得された薬剤の画像とをマッチングする画像マッチング処理を実行することにより、薬剤の数量及び種類のいずれか一方又は双方を薬剤情報として検出する薬品情報検出制御を実行可能である。以下、制御装置60によって実施される薬剤情報検出制御について先ず概略を説明した後、各工程において実施される制御について順を追って具体的に説明する。
≪About drug inspection processing≫
The control device 60 includes an image database 62 that stores medicine images as master images. The control device 60 executes an image matching process for matching the master image registered in the image database 62 and the image of the medicine acquired by the imaging device 40, thereby either one of the quantity and type of medicine or It is possible to execute drug information detection control for detecting both as drug information. Hereinafter, first, an outline of the drug information detection control performed by the control device 60 will be described first, and then the control performed in each process will be specifically described in order.
≪薬品情報検出制御≫
 薬品情報検出制御は、正面側照明装置52をオン状態として撮影装置40により撮影された正面側照明画像と、背面側照明装置54をオン状態として撮影装置40により撮影された背面側照明画像とを用いて実施される。正面側照明画像は、図6(a)に示すように分包袋bを正面視した状態の画像であり、薬剤及び分包袋bに付されている印字とが写った画像となる。また、背面側照明画像は、図6(b)に示すように薬剤の影と分包袋bに付されている印字とが写った画像となる。制御装置60は、正面側照明画像及び背面側照明画像に基づき、分包袋b内に収容されている薬剤の画像を抽出し、この薬剤の画像に基づいて薬剤情報を検出する。
≪Drug information detection control≫
In the medicine information detection control, the front side illumination image captured by the imaging device 40 with the front side illumination device 52 in the on state and the back side illumination image captured by the imaging device 40 with the back side illumination device 54 in the on state. Implemented. The front side illumination image is an image in a state in which the packaging bag b is viewed from the front as shown in FIG. 6A, and is an image in which the medicine and the printing attached to the packaging bag b are reflected. In addition, the back side illumination image is an image in which the shadow of the medicine and the print attached to the packaging bag b are shown as shown in FIG. Based on the front side illumination image and the back side illumination image, the control device 60 extracts an image of the medicine accommodated in the packaging bag b, and detects medicine information based on the medicine image.
 図7に示すように、薬品情報検出制御は、大別して薬剤候補領域抽出工程(ステップ1-1)、印字候補領域抽出工程(ステップ1-2)、印字領域特定工程(ステップ1-3)、薬剤領域導出工程(ステップ1-4)、及び鑑査領域規定工程(ステップ1-5)の各工程を経て実施される。ステップ1-1において実施される薬剤候補領域抽出工程は、背面側照明画像から薬剤が含まれている領域を薬剤候補領域A(図6(c)参照)として抽出する工程である。また、ステップ1-2において実施される印字候補領域抽出工程は、正面側照明画像から分包袋に付された印字が含まれている領域を印字候補領域Bとして抽出する工程である。 As shown in FIG. 7, the drug information detection control is roughly divided into a drug candidate area extraction step (step 1-1), a print candidate area extraction step (step 1-2), a print area specifying step (step 1-3), This is performed through each step of the drug region deriving step (step 1-4) and the inspection region defining step (step 1-5). The drug candidate region extraction step performed in step 1-1 is a step of extracting a region including a drug from the back side illumination image as a drug candidate region A (see FIG. 6C). Further, the print candidate area extracting step performed in step 1-2 is a process of extracting, as the print candidate area B, an area including the print attached to the packaging bag from the front side illumination image.
 ステップ1-3において実施される印字領域特定工程は、背面側照明画像における輝度分布に基づき、印字候補領域B(図6(e)参照)に含まれている印字に相当する領域を印字領域Cとして特定する工程である。また、ステップ1-4において実施される薬剤領域導出工程は、ステップ1-1において導出された薬剤候補領域Aから、ステップ1-3において導出された印字領域Cを差し引くことにより薬剤領域Xを導出する工程である。また、ステップ1-5において実施される鑑査領域規定工程は、薬剤領域導出工程において導出された薬剤領域Xに基づき、鑑査対象となる領域を規定する工程である。 In the print area specifying step performed in step 1-3, the area corresponding to the print included in the print candidate area B (see FIG. 6E) is determined based on the luminance distribution in the back side illumination image. It is the process specified as. The drug region deriving step performed in step 1-4 is to derive the drug region X by subtracting the print region C derived in step 1-3 from the drug candidate region A derived in step 1-1. It is a process to do. In addition, the inspection area defining step performed in step 1-5 is a process for defining an area to be inspected based on the medicine area X derived in the medicine area deriving process.
 以下、図7に示した各工程において実施される制御(画像処理)について、さらに詳細に説明する。図8に示すように、ステップ1-1の薬品情報検出制御は、グレイ画像取得処理(ステップ2-1)、切出処理(ステップ2-2)、印字想定領域導出処理(ステップ2-3)、差分処理(ステップ2-4)、ノイズ除去処理(ステップ2-5)、及び薬品候補領域縮小処理(ステップ2-6)を経て実施される。 Hereinafter, the control (image processing) performed in each step shown in FIG. 7 will be described in more detail. As shown in FIG. 8, the drug information detection control in step 1-1 includes gray image acquisition processing (step 2-1), clipping processing (step 2-2), and assumed print area derivation processing (step 2-3). The difference processing (step 2-4), noise removal processing (step 2-5), and drug candidate area reduction processing (step 2-6) are performed.
 具体的には、図7に示すメインルーチンに係る制御フローがステップ1-1にある場合には、図8に示すサブルーチンのステップ2-1のグレイ画像取得処理が実行される。グレイ画像取得処理は、背面側照明画像をグレイスケール化した画像を背面照明グレイ画像を取得する処理である。その後、制御フローがステップ2-2に進められ、ステップ2-1において得られた背面照明グレイ画像を動的二値化処理することにより分包袋bに付された印字及び薬剤の存在が想定される印字・薬剤想定領域を切り出す処理(切出処理)が実施される。すなわち、印字及び薬剤の影については背面照明グレイ画像において黒色あるいは暗色として写っており、背景については白色あるいは明色として写っている。そのため、背面照明グレイ画像を動的二値化処理することにより、印字及び薬剤が存在する領域(黒色系領域)を、背景の領域(白色系領域)から切り出すことができる。 Specifically, when the control flow related to the main routine shown in FIG. 7 is in step 1-1, the gray image acquisition process in step 2-1 of the subroutine shown in FIG. 8 is executed. The gray image acquisition process is a process of acquiring a back-lighted gray image from an image obtained by converting the back-side illuminated image into a gray scale. Thereafter, the control flow proceeds to step 2-2, and it is assumed that the back-lighted gray image obtained in step 2-1 is dynamically binarized and prints and medicines attached to the packaging bag b are present. A process (cutout process) for cutting out the print / drug assumed area to be performed is performed. That is, the print and the shadow of the medicine appear as black or dark in the backlit gray image, and the background appears as white or light. Therefore, by performing dynamic binarization processing on the back-lighted gray image, it is possible to cut out the area where the printing and the medicine exist (black area) from the background area (white area).
 ステップ2-2において切出処理が完了すると、制御フローがステップ2-3に進められ、印字想定領域導出処理が実施される。印字想定領域導出処理においては、背面照明グレイ画像をトップハット処理することにより周辺よりも明るい領域(トップハット領域)導出する。また、背面照明グレイ画像をボトムハット処理することにより、周辺よりも暗い領域(ボトムハット領域)を導出する。このようにしてトップハット領域及びボトムハット領域は、印字の存在が想定される領域(印字想定領域)に相当する。そこで、制御装置60は、トップハット領域とボトムハット領域の和領域を、印字の存在が想定される印字想定領域として導出する。 When the cutout process is completed in step 2-2, the control flow proceeds to step 2-3, and the assumed print area derivation process is performed. In the assumed print area derivation process, the back-lighted gray image is top-hat processed to derive an area brighter than the surroundings (top hat area). Further, by performing a bottom hat process on the back-lighted gray image, an area darker than the periphery (bottom hat area) is derived. In this way, the top hat area and the bottom hat area correspond to areas where printing is expected (print expected area). Therefore, the control device 60 derives the sum area of the top hat area and the bottom hat area as an assumed print area where the presence of printing is assumed.
 ステップ2-3において印字想定領域の導出が完了すると、制御フローがステップ2-4に進められ、差分処理が実行される。具体的には、ステップ2-2において特定された印字・薬剤想定領域と、ステップ2-3において特定された印字想定領域との差分を取ることにより、薬剤の存在が想定される薬剤候補領域A(図6(c)において白線によって囲まれた領域)が導出される。ステップ2-4において薬剤候補領域Aが導出されると、ステップ2-5においてノイズ除去処理が実行され、ノイズが除去される。その後、ステップ2-6において、薬剤候補領域Aを縮小する画像処理(薬品候補領域縮小処理)が実施される。すなわち、薬剤候補領域Aを画定する輪郭線を薬剤候補領域Aの内側にオフセットした輪郭線により囲まれた領域を縮小薬剤候補領域A2(図6(d)において白線で囲まれた領域)として導出する。この画像処理は、後に詳述する鑑査領域規定工程における画像処理の前処理として実施される。これにより、図8に示したサブルーチンが完了し、制御フローが図7に示したメインルーチンのステップ1-2に進行する。 When the derivation of the print expected area is completed in step 2-3, the control flow proceeds to step 2-4, and difference processing is executed. Specifically, by taking the difference between the print / drug assumption area specified in Step 2-2 and the print assumption area specified in Step 2-3, a drug candidate area A in which the presence of a drug is assumed is obtained. (A region surrounded by a white line in FIG. 6C) is derived. When the drug candidate region A is derived in step 2-4, noise removal processing is executed in step 2-5, and noise is removed. Thereafter, in step 2-6, image processing for reducing the drug candidate area A (drug candidate area reduction process) is performed. That is, the region surrounded by the contour line in which the contour line defining the drug candidate region A is offset to the inside of the drug candidate region A is derived as the reduced drug candidate region A2 (the region surrounded by the white line in FIG. 6D). To do. This image processing is performed as a preprocessing of the image processing in the inspection area defining step described in detail later. Thereby, the subroutine shown in FIG. 8 is completed, and the control flow proceeds to step 1-2 of the main routine shown in FIG.
 メインルーチンの制御フローがステップ1-2の印字候補領域抽出工程に進行すると、図9に示したサブルーチンに則って制御(画像処理)が進められる。具体的には、図9に示したサブルーチンにおいては、チャンネル画像ボトムハット処理(ステップ3-1)、及び印字領域抽出処理(ステップ3-2)が実施され、正面側照明画像から印字候補領域B(図6(e)において白線で囲まれた領域)を抽出する作業が実施される。 When the control flow of the main routine proceeds to the print candidate area extracting step of step 1-2, control (image processing) is advanced according to the subroutine shown in FIG. Specifically, in the subroutine shown in FIG. 9, the channel image bottom hat process (step 3-1) and the print area extraction process (step 3-2) are performed, and the print candidate area B is detected from the front side illumination image. An operation of extracting (a region surrounded by a white line in FIG. 6E) is performed.
 具体的には、先ずステップ3-1においては、正面側照明画像をRGB分解して得られるRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の各画像についてボトムハット処理が実施される。ここで、分包袋bに付された黒色の印字は、Rチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色である。一方、黒色に近い暗色(濃色)の薬剤に相当する領域については、Rチャンネル画像、Gチャンネル画像、及びBチャンネル画像の少なくともいずれか一つのチャンネル画像において黒色以外で表現される。そのため、ステップ3-1において先ずRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の各画像についてボトムハット処理(チャンネル画像ボトムハット処理)を実施する。その後、ステップ3-2においてRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色である領域を印字候補領域Bとして抽出する処理(印字領域抽出処理)を実行することにより、正面側照明画像から印字候補領域Bを抽出することができる。これにより、図9に示したサブルーチンが完了し、制御フローが図7のメインルーチンにおけるステップ1-3に進行する。 Specifically, first, in step 3-1, bottom hat processing is performed on each of the R channel image, the G channel image, and the B channel image obtained by performing RGB decomposition on the front side illumination image. Here, the black print attached to the packaging bag b is black in all of the R channel image, the G channel image, and the B channel image. On the other hand, a region corresponding to a dark (dark) drug that is close to black is expressed in a color other than black in at least one of the R channel image, the G channel image, and the B channel image. Therefore, in step 3-1, first, bottom hat processing (channel image bottom hat processing) is performed on each of the R channel image, the G channel image, and the B channel image. Thereafter, in step 3-2, the front side illumination is performed by executing a process (print area extraction process) of extracting a black area as a print candidate area B in all of the R channel image, the G channel image, and the B channel image. The print candidate area B can be extracted from the image. As a result, the subroutine shown in FIG. 9 is completed, and the control flow proceeds to step 1-3 in the main routine of FIG.
 メインルーチンの制御フローがステップ1-3の印字領域特定工程に進行すると、図10に示したサブルーチンに則って印字領域Cを特定する画像処理が実施される。印字領域特定工程においては、大別して輝度基準規定処理(ステップ4-1)、及び印字領域絞込処理(ステップ4-2)の二つの処理が実施される。 When the control flow of the main routine proceeds to the print area specifying step in step 1-3, image processing for specifying the print area C is performed according to the subroutine shown in FIG. In the print area specifying step, two processes are roughly performed: a luminance reference defining process (step 4-1) and a print area narrowing process (step 4-2).
 具体的には、ステップ4-1の輝度基準規定処理においては、上述したステップ1-1の薬剤候補領域抽出工程において導出された印字想定領域(ステップ2-3参照)が用いられる。輝度基準規定処理では、正面側照明画像における印字想定領域内の輝度分布が分析される。印字想定領域は、分包袋bに付された文字に相当する領域である。そのため、この領域内の輝度を導出することにより、文字に相当する領域と他の領域、具体的には薬剤に付された刻印等とを区別するための輝度の基準を規定することができる。本実施形態では、ステップ4-1において印字想定領域を別途導出する処理を実行せず、ステップ1-2の薬剤候補領域抽出工程で導出された印字想定領域を流用しているが、ステップ4-1において改めて印字想定領域を導出することとしても良い。 Specifically, in the brightness reference defining process in step 4-1, the print expected area (see step 2-3) derived in the drug candidate area extracting process in step 1-1 described above is used. In the brightness reference defining process, the brightness distribution in the assumed print area in the front side illumination image is analyzed. The assumed print area is an area corresponding to characters attached to the packaging bag b. Therefore, by deriving the luminance in this region, it is possible to define a luminance standard for distinguishing between the region corresponding to the character and other regions, specifically, the markings attached to the medicine. In the present embodiment, the process of deriving the assumed print area in step 4-1 is not executed, and the assumed print area derived in the drug candidate area extracting step in step 1-2 is used. It is also possible to derive the expected print area in 1 again.
 上述した輝度基準規定処理が完了すると、ステップ4-2の印字領域絞込処理に移行する。印字領域絞込処理においては、上述したステップ1-2において実施された印字候補領域抽出工程により導出された印字候補領域Bが用いられる。ステップ4-2では、正面側照明画像中において印字候補領域B内に含まれている印字領域C内の画像(図6(f)参照)を、ステップ4-1において規定された輝度基準に基づいて処理することにより、分包袋bに付された印字の領域に絞り込む。これにより、分包袋bに付された文字に相当する領域が印字領域Cとして絞り込まれ(図6(g)参照)、薬剤に付された刻印等が排除される。ステップ4-2の印字領域絞込処理が終了すると図10に係るサブルーチンが完了し、制御フローが図7に示すメインルーチンのステップ1-4に進行する。 When the above-described luminance standard defining process is completed, the process proceeds to the print area narrowing process in step 4-2. In the print area narrowing process, the print candidate area B derived by the print candidate area extraction process performed in step 1-2 described above is used. In Step 4-2, the image in the print area C (see FIG. 6F) included in the print candidate area B in the front side illumination image is based on the luminance standard defined in Step 4-1. The processing is narrowed down to the print area attached to the packaging bag b. As a result, the area corresponding to the characters attached to the packaging bag b is narrowed down as the printing area C (see FIG. 6G), and the markings attached to the medicine are eliminated. When the print area narrowing process of step 4-2 is completed, the subroutine shown in FIG. 10 is completed, and the control flow proceeds to step 1-4 of the main routine shown in FIG.
 上述したようにして制御フローがステップ1-4に進行すると、ステップ1-1において特定された薬剤候補領域Aから、ステップ1-3において特定された印字領域Cを差し引く処理が実施される。これにより、薬剤が存在する薬剤領域X(図6(h)参照)が導出される。 When the control flow proceeds to step 1-4 as described above, a process of subtracting the print area C specified in step 1-3 from the drug candidate area A specified in step 1-1 is performed. Thereby, the medicine region X (see FIG. 6H) where the medicine is present is derived.
 上述したようにしてステップ1-4において薬剤領域Xが導出されると、制御フローがステップ1-5の鑑査領域規定工程に進められる。ステップ1-5においては、ステップ1-4において導出された薬剤領域Xに基づき、鑑査対象となる領域を規定する。具体的には、ステップ1-5においては、薬剤候補領域Aを縮小する処理(ステップ2-6)により得られた縮小薬剤候補領域A2と、ステップ1-4において得られた薬剤領域Xとの和領域を薬剤鑑査領域Zとして導出する。 When the drug region X is derived in step 1-4 as described above, the control flow proceeds to the inspection region defining step in step 1-5. In step 1-5, the region to be inspected is defined based on the drug region X derived in step 1-4. Specifically, in step 1-5, the reduced drug candidate area A2 obtained by the process of reducing the drug candidate area A (step 2-6) and the drug area X obtained in step 1-4 The sum area is derived as the drug inspection area Z.
 制御装置60は、正面側照明画像において薬剤鑑査領域Z内に含まれている画像を分包袋b内に存在する薬剤の画像として認識する。制御装置60は、上述した制御フローを経て得られた薬剤の画像について、画像データベース62に登録されているマスター画像を用いて画像マッチング処理を行い、薬剤が処方通りに分包されているか否かについて鑑査を行う。 The control device 60 recognizes the image included in the medicine inspection area Z in the front side illumination image as an image of the medicine existing in the packaging bag b. The control device 60 performs an image matching process on the medicine image obtained through the control flow described above using the master image registered in the image database 62, and determines whether or not the medicine is packaged as prescribed. Conduct an inspection.
 上述したように、本実施形態の薬剤鑑査装置10では、印字領域Cの導出に際し、先ず印字候補領域抽出工程を実施して正面側照明画像に基づいて分包袋bに付された印字が含まれている領域を印字候補領域Bとして絞り込んだ後、印字領域特定工程において背面側照明画像における輝度分布に基づいて印字候補領域Bに含まれている印字に相当する領域を特定することとしている。このように、本実施形態の薬剤鑑査装置10においては、正面側照明画像及び背面側照明画像の双方の観点から印字領域Cを絞り込むこととしているため、印字領域Cの導出精度が高い。 As described above, in the medicine inspection device 10 of the present embodiment, when the print area C is derived, the print candidate area extraction step is first performed, and the print attached to the packaging bag b based on the front side illumination image is included. After narrowing down the printed area as the print candidate area B, an area corresponding to the print included in the print candidate area B is specified based on the luminance distribution in the back side illumination image in the print area specifying step. As described above, in the medicine inspection device 10 according to the present embodiment, the printing area C is narrowed down from the viewpoints of both the front side illumination image and the back side illumination image, so that the derivation accuracy of the printing area C is high.
 本実施形態の薬剤鑑査装置10では、薬剤候補領域抽出工程によって導出された薬剤候補領域Aから、印字領域特定工程において特定された印字領域Cを差し引くことにより、薬剤領域Xを導出することとしている。また、上述したように、薬剤鑑査装置10によれば、分包袋bに付された印字に相当する印字領域Cを、薬剤に付された刻印等と区別して精度良く絞り込むことができる。従って、本実施形態の薬剤鑑査装置10によれば、薬剤領域Xを正確に導出し、精度の高い鑑査を行うことができる。 In the medicine inspection device 10 of the present embodiment, the medicine region X is derived by subtracting the printing area C specified in the printing area specifying step from the medicine candidate region A derived in the medicine candidate region extracting step. . Further, as described above, according to the medicine inspection device 10, the printing area C corresponding to the printing attached to the packaging bag b can be distinguished from the markings attached to the medicine with high accuracy. Therefore, according to the medicine inspection device 10 of the present embodiment, the medicine region X can be accurately derived and highly accurate inspection can be performed.
 また、本実施形態の薬剤鑑査装置10では、薬剤候補領域抽出工程において、背面側照明画像から得られた背面照明グレイ画像を動的二値化処理する処理を実行しているため、印字・薬剤想定領域を背景領域から明確に区別して特定することができる。また、背面照明グレイ画像を処理して得られるトップハット領域及びボトムハット領域の和領域を取得することにより、印字の存在が想定される印字想定領域を導出することができる。薬剤鑑査装置10においては、このようにして特定された印字・薬剤想定領域から印字想定領域を差し引くことにより、薬剤の存在が想定される薬剤候補領域Aを特定することとしているため、薬剤候補領域Aの特定精度が高い。 Further, in the medicine inspection device 10 of the present embodiment, in the medicine candidate region extraction step, the process of dynamically binarizing the backside illuminated gray image obtained from the backside illuminated image is executed. The assumed area can be identified clearly from the background area. Further, by acquiring the sum area of the top hat area and the bottom hat area obtained by processing the back-illuminated gray image, it is possible to derive an assumed print area where printing is assumed. In the medicine inspection device 10, the medicine candidate area A in which the presence of the medicine is assumed is identified by subtracting the print assumption area from the print / drug assumption area thus identified. The specific accuracy of A is high.
 また、薬剤鑑査装置10では、印字候補領域抽出工程において、正面側照明画像から得られたRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色と認識された領域を、分包袋bに付された印字に相当する領域の候補(印字候補領域B)として特定している。このようにして印字候補領域Bを特定することにより、分包袋bに付された印字に相当する領域を漏れなく特定することができる。 Further, in the medicine inspection device 10, in the print candidate region extraction step, the region recognized as black in all of the R channel image, the G channel image, and the B channel image obtained from the front side illumination image is divided into the packaging bags b. Is specified as a candidate area (printing candidate area B) corresponding to the printing attached to. By specifying the print candidate area B in this way, the area corresponding to the print attached to the packaging bag b can be specified without omission.
 また、上述したようにして印字候補領域Bを抽出した場合に、薬剤に付されている刻印等が印字候補領域Bに含まれてしまう懸念を考慮し、刻印等のような分包袋bに付された印字以外の文字等の領域を印字候補領域Bから除外する工程(印字領域特定工程)を設けている。本実施形態では、薬剤に付された刻印等と、分包袋bに付された印字とが、正面側照明画像中において輝度が相違することを利用し、正面照明画像において分包袋bに印字が付された領域の輝度分析して判定基準となる輝度値を定め、正面側照明画像中において印字候補領域B内に含まれている印字領域Cを絞り込む処理を実施している。これにより、薬剤鑑査装置においては、薬剤に付された刻印等と分包袋bに付された印字とを適確に区別して印字領域Cを特定し、薬剤領域Xを正確に導出することができる。従って、薬剤鑑査装置10によれば、精度の高い鑑査を行うことができる。 In addition, in the case where the print candidate area B is extracted as described above, in consideration of the concern that the marking or the like attached to the medicine may be included in the print candidate area B, the packaging bag b such as the stamp or the like is included. A step (print region specifying step) of excluding regions such as attached characters and the like from the print candidate region B is provided. In the present embodiment, using the fact that the markings and the like attached to the medicine and the print attached to the packaging bag b have different luminances in the front side illumination image, the packaging bag b in the front side illumination image is used. A luminance value serving as a determination reference is determined by analyzing the luminance of the printed region, and processing for narrowing down the print region C included in the print candidate region B in the front side illumination image is performed. Thereby, in the medicine inspection device, it is possible to accurately distinguish between the marking or the like attached to the medicine and the printing attached to the packaging bag b, to specify the printing area C, and to accurately derive the medicine area X. it can. Therefore, according to the medicine inspection device 10, highly accurate inspection can be performed.
 本実施形態の薬剤鑑査装置10においては、薬剤領域導出工程において導出された薬剤領域Xに基づき、鑑査対象となる領域を規定する鑑査領域規定工程が設けられている。鑑査領域規定工程においては、薬剤候補領域Aを縮小することにより導出された縮小薬剤候補領域A2と、薬剤領域Xとの和領域を薬剤鑑査領域Zとして導出している。このような処理を実行することにより、例えば図13に示すように分包袋bの皺や光の反射具合等によって写り込んだ筋L等の影響により、単一の薬剤領域Xとして認識されるべきであるにも関わらず複数の薬剤領域Xが存在するように認識されてしまう可能性があるような場合であっても、このような不具合を抑制し、薬剤の鑑査精度を向上させることが可能となる。 In the medicine inspection device 10 of the present embodiment, an inspection area defining step for defining an area to be inspected based on the medicine area X derived in the medicine area deriving process is provided. In the inspection area defining step, the sum area of the reduced drug candidate area A2 derived by reducing the drug candidate area A and the drug area X is derived as the drug inspection area Z. By executing such processing, for example, as shown in FIG. 13, it is recognized as a single medicine region X due to the influence of muscle L or the like reflected due to wrinkles of the packaging bag b, light reflection, or the like. Even if it should be, even if there is a possibility that a plurality of drug regions X may be recognized, such a problem can be suppressed and drug inspection accuracy can be improved. It becomes possible.
≪分割薬剤に係るマスター画像の作成方法≫
 続いて、薬剤を画像鑑査する際に用いられる画像データベース62に登録されているマスター画像として、複数に分割した分割薬剤に関するものを作成する方法について説明する。制御装置60は、マスター画像作成手段64を備えている。マスター画像作成手段64は、画像データベース62に登録される薬剤の全体形状を示すマスター画像に基づき、この薬剤を複数に分割した分割薬剤についてのマスター画像を作成することができる。以下、マスター画像作成手段64による分割薬剤に係るマスター画像の作成方法について、図11に示したフローチャートを参照しつつ順を追って説明する。
≪Master image creation method for divided medicine≫
Next, a method for creating a plurality of divided medicines related to a master image registered in the image database 62 used for image inspection of the medicine will be described. The control device 60 includes master image creation means 64. The master image creation means 64 can create a master image for a divided medicine obtained by dividing the medicine into a plurality of parts based on a master image indicating the entire shape of the medicine registered in the image database 62. Hereinafter, a method for creating a master image related to a divided medicine by the master image creating means 64 will be described in order with reference to the flowchart shown in FIG.
 分割薬剤に係るマスター画像を作成する作業は、登録対象である薬剤の全体形状を撮影した背面側照明画像及び正面側照明画像を用い、輪郭線導出処理(ステップ5-1)、全体画像取得処理(ステップ5-2)、背景輝度導出処理(ステップ5-3)、及びオーバーレイ処理(ステップ5-4)を経て実施される。具体的には、分割薬剤に係るマスター画像を作成する際には、先ずステップ5-1において輪郭線導出処理が実施される。輪郭線導出処理は、登録対象である薬剤を撮影した背面側照明画像に基づき、薬剤の全体形状に係る輪郭線を導出する画像処理を実行することにより実施される。これにより、図14(a)に示すように薬剤の全体形状を示す輪郭線が描かれた画像が形成される。 The operation of creating a master image related to a divided medicine uses a back side illumination image and a front side illumination image obtained by photographing the entire shape of the medicine to be registered, and uses an outline derivation process (step 5-1) and an overall image acquisition process. (Step 5-2), background luminance derivation processing (step 5-3), and overlay processing (step 5-4) are performed. Specifically, when creating a master image related to a divided medicine, first, a contour line derivation process is performed in step 5-1. The contour derivation process is performed by executing image processing for deriving a contour line related to the overall shape of the medicine based on the back side illumination image obtained by photographing the medicine to be registered. Thereby, as shown to Fig.14 (a), the image in which the outline which shows the whole shape of a chemical | medical agent was drawn is formed.
 上述したようにして薬剤の全体形状に係る輪郭線が導出されると、制御フローがステップ5-2に進み、全体画像取得処理が実施される。全体画像取得処理は、登録対象である薬剤全体を示す正面側照明画像において、輪郭線導出処理により得られた輪郭線の内部領域に対応する領域内の画像を、薬剤の全体形状に係る画像として取得する処理が実施される。具体的には、ステップ5-1において導出された輪郭線によって囲まれた領域に対応する部分を正面側照明画像から切り出すことにより、薬剤の全体形状に係る画像が取得される。 When the contour line related to the entire shape of the medicine is derived as described above, the control flow proceeds to step 5-2, and the entire image acquisition process is performed. The whole image acquisition process is a front side illumination image showing the whole medicine to be registered, and an image in an area corresponding to the inner area of the outline obtained by the outline derivation process is used as an image related to the whole shape of the medicine. The acquisition process is performed. Specifically, an image relating to the entire shape of the medicine is obtained by cutting out a portion corresponding to the region surrounded by the contour line derived in step 5-1 from the front side illumination image.
 薬剤の全体形状に係る画像が取得されると、制御フローがステップ5-3に進められ、背景輝度導出処理が実施される。すなわち、ステップ5-3においては、正面側照明画像において、ステップ5-1において導出された輪郭線の外側の領域に対応する部分が背景画像として認識され、この背景画像についての平均輝度が導出される。 When an image relating to the entire shape of the medicine is acquired, the control flow proceeds to step 5-3, and background luminance derivation processing is performed. That is, in step 5-3, a portion of the front side illumination image corresponding to the area outside the contour line derived in step 5-1 is recognized as a background image, and the average luminance for this background image is derived. The
 上述したようにして背景画像についての平均輝度が導出されると、その後ステップ5-4においてオーバーレイ処理が実施される。オーバーレイ処理は、ステップ5-3において導出された背景画像の輝度を有するマスキング画像を作成し、ステップ5-2の全体画像取得処理において得られた薬剤の全体形状に係る画像の一部の領域に、マスキング画像を重複(オーバーレイ)させることにより実施される。これにより、分割薬剤に係るマスター画像が形成される。本実施形態では、全体形状に係る画像の略半分にマスキング画像を重複させ、薬剤を略二分割した半錠分の薬剤を相当するマスター画像が形成される。これにより、図14(b)に示すように薬剤を略均等に二分割した形状を示す画像が形成される。 When the average luminance for the background image is derived as described above, overlay processing is then performed in step 5-4. The overlay process creates a masking image having the brightness of the background image derived in step 5-3, and applies it to a partial region of the image related to the entire shape of the medicine obtained in the entire image acquisition process in step 5-2. This is performed by overlapping (overlaying) the masking images. Thereby, a master image relating to the divided medicine is formed. In the present embodiment, a masking image is overlapped with approximately half of the image related to the entire shape, and a master image corresponding to a half-tablet drug obtained by dividing the drug into approximately two parts is formed. Thereby, as shown in FIG.14 (b), the image which shows the shape which divided | segmented the chemical | drug | medicine substantially equally into two is formed.
≪マスター画像差し換え処理≫
 続いて、撮影装置によって撮影した画像に基づいて作成されたマスター画像を、既登録のマスター画像と置換するマスター画像差し換え処理について説明する。マスター画像差し替え処理は、撮影装置40や照明装置50の個体差等に起因し、同一の薬剤について撮影を行っても色調等が異なる可能性を考慮し、薬剤の鑑査精度を向上させるために実施される処理である。すなわち、マスター画像差し替え処理は、画像データベース62に登録されているマスター画像と、実際に撮影装置によって撮影して得られる画像とで色調が相違する等して薬剤の特定がうまくいかないことを抑制するために実施されるものである。
≪Master image replacement process≫
Next, a master image replacement process for replacing a master image created based on an image photographed by the photographing apparatus with a registered master image will be described. The master image replacement process is performed in order to improve the inspection accuracy of the medicine in consideration of the possibility that the color tone may be different even if the same medicine is photographed due to individual differences of the photographing device 40 and the lighting device 50, etc. Process. In other words, the master image replacement process is performed in order to suppress a failure in specifying a medicine due to a difference in color tone between a master image registered in the image database 62 and an image actually obtained by photographing with a photographing apparatus. To be implemented.
 図12のフローチャートに示すように、マスター画像差し替え処理を行う際には、先ずステップ6-1において、マスター画像の差し替え候補である薬剤を鑑査部32に配置して撮影装置40によって撮影することにより、薬剤についての実際の画像(実画像)を取得する実画像取得処理が実施される。その後、ステップ6-2において、実画像取得処理により得られた実画像と、画像データベース62に登録されている当該薬剤のマスター画像とを照合する照合処理が実施される。その結果、同一の薬剤でないとの判定がなされた場合(ステップ6-3においてNOの場合)には、ステップ6-4において撮影装置40によって撮影して得られた実画像に基づいてマスター画像が作成され、既登録のマスター画像と置換される。一方、ステップ6-2の照合処理の結果、同一の薬剤であるとの判定がなされた場合(ステップ6-3においてYESの場合)には、実画像によるマスター画像の置換を行うことなく、一連の制御フローが完了する。 As shown in the flowchart of FIG. 12, when performing the master image replacement process, first, in step 6-1, a medicine that is a candidate for replacement of the master image is placed in the inspection unit 32 and photographed by the photographing device 40. Real image acquisition processing for acquiring an actual image (actual image) of the medicine is performed. Thereafter, in step 6-2, a collation process for collating the actual image obtained by the actual image acquisition process with the master image of the medicine registered in the image database 62 is performed. As a result, when it is determined that they are not the same medicine (NO in step 6-3), the master image is based on the actual image obtained by photographing with the photographing device 40 in step 6-4. Created and replaced with registered master image. On the other hand, if it is determined that the medicines are the same as a result of the collation process in step 6-2 (YES in step 6-3), the series of the master images is not replaced with the actual images. This completes the control flow.
 上述したようにして画像データベース62に登録されているマスター画像と、実際に薬剤を撮影して得られる画像の色調差等を原因とする鑑査不良を防止することができる。 As described above, it is possible to prevent the inspection failure caused by the color difference between the master image registered in the image database 62 and the image obtained by actually photographing the medicine.
 本発明は上述した第一実施形態、及び第二実施形態として例示した実施形態、及び各実施形態についての変形例として示したものに限定されるものではなく、特許請求の範囲を逸脱しない範囲でその教示および精神から他の実施形態があり得ることは当業者に容易に理解できよう。 The present invention is not limited to the first embodiment described above, the embodiment illustrated as the second embodiment, and the modifications shown for each embodiment, and does not depart from the scope of the claims. Those skilled in the art will readily appreciate that other embodiments are possible in light of the teaching and spirit thereof.
 10  薬剤鑑査装置
 30  鑑査部
 40  撮影装置
 50  照明装置
 52  正面側照明装置
 54  背面側照明装置
 60  制御装置
 62  画像データベース
 70  起立解消手段
 A   薬剤候補領域
 A2  縮小薬剤候補領域
 B   印字候補領域
 C   印字領域
 X   薬剤領域
DESCRIPTION OF SYMBOLS 10 Drug inspection apparatus 30 Inspection part 40 Imaging apparatus 50 Illumination apparatus 52 Front side illumination apparatus 54 Back side illumination apparatus 60 Control apparatus 62 Image database 70 Standing cancellation means A Drug candidate area A2 Reduction drug candidate area B Print candidate area C Print area X Drug area

Claims (8)

  1.  薬剤が分包袋内に収容された状態で配置される鑑査部と、
     前記鑑査部に配置された前記分包袋を撮影可能な撮影装置と、
     前記鑑査部に配置された前記分包袋を照明する照明装置と、
     前記撮影装置によって得られた画像を用いて画像マッチング処理を行うことにより、薬剤の数量及び種類のいずれか一方又は双方を薬剤情報として検出する薬品情報検出制御を実行可能な制御手段とを備えており、
     前記照明装置が、
     前記鑑査部に配置された分包袋を前記撮影装置側から照射する正面側照明装置と、
     前記分包袋を背面側から照射する背面側照明装置とを有し、
     前記制御手段が、
     前記正面側照明装置をオン状態として前記撮影装置により撮影された正面側照明画像と、前記背面側照明装置をオン状態として前記撮影装置により撮影された背面側照明画像とに基づき前記分包袋内に収容されている薬剤の画像を抽出し、当該薬剤の画像に基づいて薬剤情報を検出するものであり、
     前記薬品情報検出制御が、
     前記背面側照明画像において暗色の領域を薬剤の存在が想定される薬剤候補領域Aとして抽出する薬剤候補領域抽出工程と、
     前記正面側照明画像に基づいて分包袋に付された印字が含まれている領域を印字候補領域Bとして抽出する印字候補領域抽出工程と、
     前記背面側照明画像における輝度分布に基づき、前記印字候補領域Bに含まれている印字に相当する領域を印字領域Cとして特定する印字領域特定工程と、
     前記薬剤候補領域Aから印字領域Cを差し引くことにより薬剤領域Xを導出する薬剤領域導出工程と、
     を経て実施されることを特徴とする薬剤鑑査装置。
    An inspection unit arranged in a state where the medicine is contained in a sachet;
    A photographing device capable of photographing the sachet disposed in the inspection unit;
    An illumination device for illuminating the sachet disposed in the inspection unit;
    Control means capable of performing drug information detection control for detecting one or both of the quantity and type of medicine as medicine information by performing image matching processing using an image obtained by the imaging device. And
    The lighting device is
    A front side illumination device for irradiating a sachet arranged in the inspection unit from the imaging device side;
    A back side illumination device that irradiates the packaging bag from the back side;
    The control means is
    Based on the front side illumination image photographed by the photographing device with the front side illumination device in the on state and the back side illumination image photographed by the photographing device with the back side illumination device in the on state The medicine image stored in the medicine is extracted, and the medicine information is detected based on the medicine image.
    The drug information detection control is
    A drug candidate region extraction step of extracting a dark region in the back side illumination image as a drug candidate region A in which the presence of a drug is assumed;
    A print candidate area extraction step for extracting a print candidate area B as a print candidate area B including a print attached to the sachet based on the front side illumination image;
    A printing area specifying step of specifying, as a printing area C, an area corresponding to printing included in the printing candidate area B based on the luminance distribution in the back side illumination image;
    A drug region deriving step of deriving a drug region X by subtracting the print region C from the drug candidate region A;
    It is carried out through the drug inspection device characterized by the above.
  2.  前記薬剤候補領域抽出工程が、
     前記背面側照明画像をグレイスケール化して背面照明グレイ画像を取得する処理と、
     前記背面照明グレイ画像を二値化処理することにより分包袋に付された黒色の印字及び薬剤の存在が想定される印字・薬剤想定領域として特定する処理と、
     前記背面照明グレイ画像をトップハット処理することにより得られたトップハット領域、及び前記背面照明グレイ画像をボトムハット処理することにより得られたボトムハット領域の和領域を印字の存在が想定される印字想定領域として導出する処理と、
     を実施し、
     前記印字・薬剤想定領域と前記印字想定領域との差分により、薬剤の存在が想定される薬剤候補領域Aを導出することを特徴とする請求項1に記載の薬剤鑑査装置。
    The drug candidate region extraction step includes
    Processing to grayscale the backside illumination image to obtain a backside illumination gray image;
    A process of specifying the black print attached to the sachet bag by performing binarization processing on the back-illuminated gray image and the print / drug assumed area where the presence of the drug is assumed,
    Printing that is assumed to be present in the top hat area obtained by top-hat processing of the back-lighted gray image and the sum area of the bottom hat area obtained by bottom-hat processing of the back-lighted gray image Processing to derive as an assumed area;
    Carried out
    The drug inspection apparatus according to claim 1, wherein a drug candidate area A in which a drug is assumed is derived based on a difference between the print / drug assumed area and the assumed print area.
  3.  前記印字候補領域抽出工程が、
     前記正面側照明画像をRGB分解して得られるRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の各画像についてボトムハット処理を実施し、Rチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色であると想定される領域を印字候補領域Bとして抽出するものであることを特徴とする請求項1又は2に記載の薬剤鑑査装置。
    The printing candidate area extraction step includes
    Bottom hat processing is performed on each of the R channel image, the G channel image, and the B channel image obtained by performing RGB decomposition on the front side illumination image, and all of the R channel image, the G channel image, and the B channel image are performed. The drug inspection device according to claim 1 or 2, wherein an area assumed to be black is extracted as a print candidate area B.
  4.  前記印字領域特定工程が、
     前記背面側照明画像をグレイスケール化した背面照明グレイ画像をトップハット処理することにより得られたトップハット領域、及び前記背面照明グレイ画像をボトムハット処理することにより得られたボトムハット領域の和領域として導出された印字想定領域から、前記印字領域Cを絞り込む工程であって、
     前記正面側照明画像中の前記印字想定領域について輝度分布を分析し、文字に相当する領域と他の領域とを区別するための輝度の基準を規定する輝度基準規定処理と、
     前記正面側照明画像をRGB分解して得られるRチャンネル画像、Gチャンネル画像、及びBチャンネル画像の全てにおいて黒色であると想定される印字候補領域Bを規定し、前記正面側照明画像中における前記印字候補領域B内に含まれている前記印字領域Cを、前記輝度基準規定処理によって規定された輝度の基準に基づき絞り込む絞込処理と、
     を経て実行されることを特徴とする請求項1~3のいずれかに記載の薬剤鑑査装置。
    The printing area specifying step includes
    A top hat region obtained by top hat processing a back lighting gray image obtained by converting the back side lighting image into a gray scale, and a sum region of a bottom hat region obtained by bottom hat processing the back lighting gray image. A step of narrowing the print area C from the assumed print area derived as
    A luminance reference defining process for analyzing a luminance distribution of the print assumed region in the front side illumination image and defining a luminance reference for distinguishing between a region corresponding to a character and another region;
    A print candidate region B that is assumed to be black in all of the R channel image, the G channel image, and the B channel image obtained by performing RGB decomposition on the front side illumination image is defined, and the print candidate region B in the front side illumination image is defined. A narrowing-down process for narrowing down the print area C included in the print candidate area B based on the luminance standard defined by the luminance standard defining process;
    The drug inspection device according to any one of claims 1 to 3, wherein the drug inspection device is executed through a process.
  5.  前記薬剤領域導出工程において導出された薬剤領域Xに基づき、鑑査対象となる領域を規定する鑑査領域規定工程を有し、
     前記鑑査領域規定工程が、
     前記薬剤候補領域Aを縮小した縮小薬剤候補領域A2を導出する処理と、
     前記薬剤領域Xと前記縮小薬剤候補領域A2との和領域を薬剤鑑査領域Zとして導出する処理と、
     を経て実施されることを特徴とする請求項1~4のいずれかに記載の薬剤鑑査装置。
    Based on the drug region X derived in the drug region derivation step, the inspection region defining step for defining the region to be inspected,
    The inspection area defining step is:
    A process of deriving a reduced drug candidate area A2 obtained by reducing the drug candidate area A;
    A process of deriving a sum area of the drug area X and the reduced drug candidate area A2 as a drug inspection area Z;
    The drug inspection device according to any one of claims 1 to 4, wherein the drug inspection device is implemented through the following.
  6.  薬剤を撮影した画像をマスター画像として蓄積した画像データベースを用いて画像マッチング処理を実行可能なものであり、
     前記画像データベースに登録される薬剤について、単一の薬剤を複数に分割した分割薬剤に係るマスター画像を、全体形状を示すマスター画像に基づいて作成可能なマスター画像作成手段を有し、
     前記マスター画像作成手段が、
     登録対象である薬剤を撮影した背面側照明画像に基づき薬剤の全体形状に係る輪郭線を導出する輪郭線導出処理と、
     前記正面側照明画像において、前記輪郭線導出処理により得られた前記輪郭線の内部領域に対応する領域内の画像を、薬剤の全体形状に係る画像として取得する全体画像取得処理と、
     前記正面側照明画像において、前記輪郭線導出処理により得られた前記輪郭線の外部領域の画像を背景画像として認識し、前記背景画像の平均輝度を導出する背景輝度導出処理と、
     前記背景輝度導出処理で得られた前記背景画像に相当する輝度を有するマスキング画像を作成すると共に、前記全体画像取得処理により得られた薬剤の全体形状に係る画像の一部の領域に、前記マスキング画像を重複させるオーバーレイ処理と、
     を実施することにより分割薬剤についてのマスター画像を作成可能であることを特徴とする請求項1~5のいずれかに記載の薬剤鑑査装置。
    Image matching processing can be performed using an image database that stores images of drugs taken as master images,
    A master image creating means capable of creating a master image related to a divided medicine obtained by dividing a single medicine into a plurality of medicines registered in the image database based on a master image indicating an overall shape,
    The master image creating means
    An outline deriving process for deriving an outline related to the overall shape of the drug based on the back side illumination image obtained by imaging the drug to be registered;
    In the front side illumination image, an overall image acquisition process for acquiring an image in an area corresponding to an internal area of the outline obtained by the outline derivation process as an image related to the overall shape of the medicine;
    In the front side illumination image, a background luminance derivation process for recognizing an image of an outer region of the outline obtained by the outline derivation process as a background image and deriving an average luminance of the background image;
    A masking image having a luminance corresponding to the background image obtained by the background luminance derivation process is created, and the masking is applied to a partial region of the image related to the entire shape of the medicine obtained by the whole image acquisition process. Overlay processing that overlaps images,
    6. The medicine inspection device according to claim 1, wherein a master image of the divided medicine can be created by performing the above.
  7.  薬剤を撮影した画像をマスター画像として蓄積した画像データベースを用いて照合可能なものであり、
     前記画像データベースに登録されている薬剤について、前記鑑査部に配置された所定の薬剤を前記撮影装置によって撮影した画像と、当該薬剤のマスター画像とを照合し、
     前記制御手段により同一の薬剤でないとの判定がなされることを条件として、前記撮影装置によって撮影した画像に基づいて作成されたマスター画像を、既登録のマスター画像と置換可能であることを特徴とする請求項1~6のいずれかに記載の薬剤鑑査装置。
    It is possible to collate using an image database that stores images of drugs taken as master images,
    For a drug registered in the image database, an image obtained by photographing the predetermined medicine arranged in the inspection unit with the photographing device and a master image of the medicine are collated,
    The master image created based on the image photographed by the photographing device can be replaced with a registered master image on condition that the control means determines that the medicines are not the same. The drug inspection device according to any one of claims 1 to 6.
  8.  請求項1~7のいずれかに記載の薬剤鑑査装置と、
     処方にあわせて薬剤を一包分ずつ分包袋に分包可能な薬剤分包装置とを備えており、
     前記薬剤分包装置において分包された薬剤の個数を前記薬剤鑑査装置によって鑑査可能であることを特徴とする薬剤分包システム。
    The drug inspection device according to any one of claims 1 to 7,
    It is equipped with a medicine packaging device that can sachet the medicine one by one in accordance with the prescription,
    The medicine packaging system, wherein the number of medicines packaged in the medicine packaging apparatus can be inspected by the medicine inspection apparatus.
PCT/JP2013/081353 2012-11-22 2013-11-21 Drug inspection device WO2014080966A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2014548610A JP6424624B2 (en) 2012-11-22 2013-11-21 Drug inspection device
US14/646,879 US9870611B2 (en) 2012-11-22 2013-11-21 Drug inspection device
EP13856758.1A EP2924647A4 (en) 2012-11-22 2013-11-21 Drug inspection device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2012256015 2012-11-22
JP2012-256015 2012-11-22

Publications (1)

Publication Number Publication Date
WO2014080966A1 true WO2014080966A1 (en) 2014-05-30

Family

ID=50776144

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/081353 WO2014080966A1 (en) 2012-11-22 2013-11-21 Drug inspection device

Country Status (4)

Country Link
US (1) US9870611B2 (en)
EP (1) EP2924647A4 (en)
JP (1) JP6424624B2 (en)
WO (1) WO2014080966A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017194828A (en) * 2016-04-20 2017-10-26 株式会社東芝 Position detection device, position detection method and position detection program
JP2017192651A (en) * 2016-04-22 2017-10-26 富士フイルム株式会社 Audit support method and audit support apparatus
JPWO2018173649A1 (en) * 2017-03-23 2019-12-12 富士フイルム富山化学株式会社 Drug recognition device, drug recognition method, and drug recognition program
WO2020162263A1 (en) * 2019-02-07 2020-08-13 富士フイルム富山化学株式会社 Medical drug verification device, medical drug verification method, and medical drug verification system

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3077907B1 (en) * 2018-02-13 2021-06-18 Pharmed S A M INSTALLATION AND PROCEDURE FOR DETECTION OF THE CONTOUR, AND LOCATION OF A THREE-DIMENSIONAL PRODUCT BASED IN THE LOCATION OR UPside down ON A SURFACE
KR20200138921A (en) 2019-06-03 2020-12-11 삼성전자주식회사 Apparatus and method for identifying pharmaceutical
JP7427684B2 (en) * 2019-10-01 2024-02-05 富士フイルム富山化学株式会社 Drug verification system, drug management method and program
EP4107516A4 (en) * 2020-02-21 2024-04-03 Applied Materials Inc Method and system for inspection of products
CN112883958B (en) * 2021-01-11 2023-12-05 壹药网科技(上海)股份有限公司 Medicine goods space checking method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200770A (en) 1993-12-28 1995-08-04 Sanyo Electric Co Ltd Tablet inspection system
JPH07209196A (en) * 1994-01-17 1995-08-11 Sanyo Electric Co Ltd Tablet inspection system
WO2012147907A1 (en) * 2011-04-28 2012-11-01 株式会社湯山製作所 Medicine checking device and apparatus for separately packaging medicines

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3784884T2 (en) * 1986-12-29 1993-06-24 Fujimori Kogyo Co METHOD AND DEVICE FOR CHECKING THE CONTENT OF PACKED PRODUCTS.
US6330351B1 (en) * 1996-11-29 2001-12-11 Kabushiki Kaisha Yuyama Seisakusho Drug inspection device and drug packaging device
JPH10320502A (en) * 1997-05-20 1998-12-04 Matsushita Electric Ind Co Ltd Component character collation and inspection method, and component character collation and inspection device
JPH11144057A (en) * 1997-11-12 1999-05-28 Ricoh Co Ltd Device and method for image recognition
US6324253B1 (en) * 1998-08-26 2001-11-27 Yuyama Mfg. Co., Ltd. Tablet inspection apparatus
NL1022679C1 (en) * 2003-02-14 2004-08-17 Dijkstra Vereenigde Bedrijven Inspection device for loose objects, such as tablets.
NL1025161C1 (en) * 2003-08-19 2005-07-04 Global Factories B V Drug inspection method in large pharmacy, involves grouping number of packs each including several drugs, to form string in association with patient data, and storing scanned image of packs and patient data in memory
US9334096B2 (en) * 2004-10-01 2016-05-10 Edge Medical Properties, Llc Multiple inspection system and method that inspects different medications
KR100650285B1 (en) * 2005-05-25 2006-11-27 (주)제이브이엠 System for inspecting medicine packets
JP4159577B2 (en) * 2005-12-13 2008-10-01 ファナック株式会社 Interlock automatic setting device and automatic setting method between a plurality of robots
NL1032492C2 (en) * 2006-09-14 2008-03-17 Dijkstra Vereenigde Bedrijven Inspection device.
CN101678960B (en) * 2007-06-19 2011-11-02 快力胶囊股份有限公司 Vibration feeder, carrier and visual inspection apparatus
JP4168428B1 (en) * 2007-06-19 2008-10-22 クオリカプス株式会社 Inspected object conveying device and appearance inspection device
US20090055116A1 (en) * 2007-08-24 2009-02-26 Chou-Pi Chen Method For Inspecting Appearance Of Pellet Type Medicines And System Employing Thereof
US20100170206A1 (en) * 2009-01-06 2010-07-08 Jvm Co., Ltd. Medicine pouch arranging device
US8146331B2 (en) * 2009-01-15 2012-04-03 Sabrie Soloman Automated packaging, inspection, verification, and counting apparatus
EP2381246A1 (en) * 2010-04-26 2011-10-26 Becton Dickinson France Device, kit and method for inspection of an article
EP2591761A1 (en) 2010-07-09 2013-05-15 Panasonic Corporation Tablet inspection assistance method and tablet inspection assistance system
US8215557B1 (en) * 2010-11-18 2012-07-10 Innovation Associates, Inc. Low profile color-based counting system
US20120293623A1 (en) * 2011-05-17 2012-11-22 Gii Acquisition, Llc Dba General Inspection, Llc Method and system for inspecting small manufactured objects at a plurality of inspection stations and sorting the inspected objects

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07200770A (en) 1993-12-28 1995-08-04 Sanyo Electric Co Ltd Tablet inspection system
JPH07209196A (en) * 1994-01-17 1995-08-11 Sanyo Electric Co Ltd Tablet inspection system
WO2012147907A1 (en) * 2011-04-28 2012-11-01 株式会社湯山製作所 Medicine checking device and apparatus for separately packaging medicines

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2924647A4

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017194828A (en) * 2016-04-20 2017-10-26 株式会社東芝 Position detection device, position detection method and position detection program
JP2017192651A (en) * 2016-04-22 2017-10-26 富士フイルム株式会社 Audit support method and audit support apparatus
US10937152B2 (en) 2016-04-22 2021-03-02 Fujifilm Toyama Chemical Co., Ltd. Inspection support method and inspection support device
JPWO2018173649A1 (en) * 2017-03-23 2019-12-12 富士フイルム富山化学株式会社 Drug recognition device, drug recognition method, and drug recognition program
WO2020162263A1 (en) * 2019-02-07 2020-08-13 富士フイルム富山化学株式会社 Medical drug verification device, medical drug verification method, and medical drug verification system
CN113260344A (en) * 2019-02-07 2021-08-13 富士胶片富山化学株式会社 Drug comparison device, drug comparison method, and drug comparison system
JPWO2020162263A1 (en) * 2019-02-07 2021-11-04 富士フイルム富山化学株式会社 Drug matching device, drug matching method and drug matching system

Also Published As

Publication number Publication date
JP6424624B2 (en) 2018-11-21
JPWO2014080966A1 (en) 2017-01-05
US20160005160A1 (en) 2016-01-07
EP2924647A1 (en) 2015-09-30
US9870611B2 (en) 2018-01-16
EP2924647A4 (en) 2016-08-31

Similar Documents

Publication Publication Date Title
WO2014080966A1 (en) Drug inspection device
JP5196285B1 (en) Drug inspection device and drug packaging device
JP6100136B2 (en) Drug recognition apparatus and method
US10726285B2 (en) Medicine audit apparatus, method, and program
CN110892445B (en) Drug inspection support device, drug identification device, image processing method, and program
CN111052145B (en) Drug inspection support device, image processing device, and image processing method
CN111031995A (en) Medicine inspection support device, image processing method, and program
JP2006194801A (en) Appearance inspection apparatus and ptp wrapping machine
CN114450677A (en) Drug matching device, drug matching system, drug management method, and program
JPH07204253A (en) Tablet inspection system
JP2014221134A (en) Packaged single-dose-medicament auditing device
CN110892413A (en) Drug identification device, image processing method, and program
JP4201143B2 (en) Appearance inspection device and PTP packaging machine equipped with appearance inspection device
JP7375049B2 (en) Image processing device and method
JP4251325B2 (en) Appearance inspection device and PTP packaging machine
JP2010121941A (en) Inspection apparatus and method for print position displacement
JP2021010712A (en) Medicament screening device
JP2021133238A (en) Medicine inspection device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13856758

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2014548610

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2013856758

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14646879

Country of ref document: US