JP2013148454A - Tablet checking apparatus - Google Patents

Tablet checking apparatus Download PDF

Info

Publication number
JP2013148454A
JP2013148454A JP2012008853A JP2012008853A JP2013148454A JP 2013148454 A JP2013148454 A JP 2013148454A JP 2012008853 A JP2012008853 A JP 2012008853A JP 2012008853 A JP2012008853 A JP 2012008853A JP 2013148454 A JP2013148454 A JP 2013148454A
Authority
JP
Japan
Prior art keywords
tablet
unit
image
light
translucent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012008853A
Other languages
Japanese (ja)
Inventor
Takanobu Tanimoto
貴頌 谷本
Yoichi Aida
陽一 合田
Hiroyuki Yamamoto
裕之 山本
Makoto Goto
誠 後藤
Yoshihiko Matsukawa
善彦 松川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Original Assignee
Panasonic Corp
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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2012008853A priority Critical patent/JP2013148454A/en
Publication of JP2013148454A publication Critical patent/JP2013148454A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve the following problem: translucent tablets are different in transparency depending on its kind, and it is difficult to set an appropriate threshold between a brightness distribution of the translucent tablet and that of an opaque tablet.SOLUTION: A tablet checking device 11 includes: a placing part (guide part 24) where a medicine pack 21 with translucent tablets 26 housed therein is placed; a lighting part 13 that irradiates the medicine pack 21 with diffusion light or parallel light; an imaging part (camera 12) for imaging the medicine pack 21 irradiated with the light from the lighting part 13; an image processing part 15 that generates a difference image 43 from a diffusion-light transmission image 41 of the medicine pack 21 irradiated with the diffusion light and a parallel-light transmission image 42 of the medicine pack 21 irradiated with the parallel light; and a checking part 16 that checks the tablets in the medicine pack 21 on the basis of the difference image 43 generated in the image processing part 15.

Description

本発明は、薬包体内の錠剤の監査を行なう錠剤監査装置に関する。   The present invention relates to a tablet inspection apparatus that audits tablets in a medicine package.

病院施設や薬局等では、処方箋に対して正確な調剤作業を行う必要がある。そのために、調剤作業の後に調剤の監査が行なわれている。調剤の監査としては、例えば、錠剤監査装置が用いられる。錠剤監査装置は、薬包体を撮影して得た画像データを二値化した後、二値化画像の中にある錠剤の個数を計数して、調剤の監査を行なう。しかしながら、錠剤には様々な種類があるため、光を通す半透明錠剤と光を遮断する一般錠剤とが薬包体に混在した場合、画像データの二値化で正確に錠剤個数を計数できないことがある。そこで、半透明錠剤と一般錠剤を薬袋で包んだ薬包体に対し、調剤の監査を行なうことができる錠剤監査装置が、特許文献1に提案されている。   In hospital facilities, pharmacies, etc., it is necessary to perform accurate dispensing work on prescriptions. Therefore, the dispensing audit is performed after the dispensing operation. As an inspection of dispensing, for example, a tablet inspection device is used. The tablet inspection apparatus binarizes image data obtained by photographing the medicine package, and then counts the number of tablets in the binarized image to audit the dispensing. However, because there are various types of tablets, when a translucent tablet that transmits light and a general tablet that blocks light are mixed in a medicine package, the number of tablets cannot be accurately counted by binarizing image data. There is. Therefore, Patent Document 1 proposes a tablet inspection apparatus capable of auditing dispensing of a medicine package in which a translucent tablet and a general tablet are wrapped in a medicine bag.

図20に示すように、特許文献1の錠剤監査装置は、薬袋に包まれた一般錠剤の個数を計数する一般錠剤認識部5と、薬袋に包まれた半透明錠剤の個数を計数する半透明錠剤認識部6と、を有する。一般錠剤確認部5は、錠剤を包む薬袋を撮影するカメラで撮影された薬袋の画像より一般錠剤の個数を計数する。半透明錠剤確認部6は、カメラで撮影された薬袋の画像より半透明錠剤の個数を計数する。   As shown in FIG. 20, the tablet inspection apparatus of Patent Document 1 includes a general tablet recognition unit 5 that counts the number of general tablets wrapped in a medicine bag, and a translucent that counts the number of translucent tablets wrapped in a medicine bag. A tablet recognition unit 6. The general tablet confirmation unit 5 counts the number of general tablets from an image of a medicine bag taken by a camera that photographs a medicine bag that wraps the tablet. The translucent tablet confirmation unit 6 counts the number of translucent tablets from the image of the medicine bag taken by the camera.

ここで、照明具にて下方より薬包体を照射したときにカメラで撮影された画像において、半透明錠剤及び背景となる薬袋の明度は高くなり、一般錠剤の明度は低くなる。なぜなら、半透明錠剤の明度は、半透明錠剤がある程度の光を透過することで高くなり、背景となる薬袋の明度は、透明なフィルムである薬袋が光を透過することで高くなるためである。一方、一般錠剤の明度は、一般錠剤が光を透過しないために半透明錠剤と比較すると低くなる。   Here, in the image photographed by the camera when the medicine package is irradiated from below with the illuminator, the lightness of the translucent tablet and the background medicine bag is high, and the lightness of the general tablet is low. This is because the lightness of the translucent tablet is increased when the translucent tablet transmits a certain amount of light, and the lightness of the background medicine bag is increased when the transparent medicine bag transmits light. . On the other hand, the brightness of general tablets is lower than that of translucent tablets because general tablets do not transmit light.

そこで、特許文献1の錠剤監査装置の一般錠剤認識部5では、図21に示すように、一般錠剤のしきい値を半透明錠剤の明度分布と一般錠剤の明度分布の間に設定している。一般錠剤のしきい値より低い明度の画素を一般錠剤として検出することで、一般錠剤の個数を計数している。   Therefore, in the general tablet recognition unit 5 of the tablet inspection device of Patent Document 1, as shown in FIG. 21, the threshold value of the general tablet is set between the lightness distribution of the translucent tablet and the lightness distribution of the general tablet. . The number of general tablets is counted by detecting pixels having brightness lower than the threshold value of general tablets as general tablets.

また、特許文献1の錠剤監査装置の半透明錠剤認識部6では、図21に示すように、半透明錠剤の明度分布と一般錠剤の明度分布との間に下しきい値を設定し、半透明錠剤の明度分布と背景の明度分布との間に上しきい値を設定し、画像から2つのしきい値の間の明度を示す画素を半透明錠剤として検出することで、半透明錠剤を計数している。   Further, in the translucent tablet recognition unit 6 of the tablet inspection device of Patent Document 1, as shown in FIG. 21, a lower threshold is set between the lightness distribution of the translucent tablet and the lightness distribution of the general tablet. An upper threshold value is set between the lightness distribution of the transparent tablet and the lightness distribution of the background, and a pixel indicating the lightness between the two threshold values is detected as a translucent tablet from the image. Counting.

特許文献1の錠剤監査装置は、さらに、一般錠剤認識部5及び半透明錠剤認識部6で計数された錠剤の個数データを加算して、薬包体内の全ての錠剤の個数を出力する演算制御回路7を有する。   The tablet inspection device of Patent Document 1 further adds the number data of the tablets counted by the general tablet recognition unit 5 and the translucent tablet recognition unit 6 and outputs the number of all tablets in the medicine package. A circuit 7 is included.

特許文献1の錠剤監査装置を用いることで、半透明錠剤を含んだ薬包体内の錠剤監査を行なうことができる。   By using the tablet inspection device of Patent Document 1, it is possible to perform tablet inspection within a medicine package containing a translucent tablet.

特開平7−282219号公報JP-A-7-282219

しかしながら、半透明錠剤にも複数の種類があり、種類により半透明錠剤の透過度が異なることがある。そのため、カメラで撮影された画像において半透明錠剤と背景が同程度の明度となる場合がある。この場合、特許文献1の錠剤監査装置では、半透明錠剤と背景の間にしきい値を設けることができず、薬包体内の半透明錠剤を検出できないことがある。   However, there are a plurality of types of translucent tablets, and the translucency of translucent tablets may differ depending on the type. For this reason, there are cases where the translucent tablet and the background have the same brightness in the image taken by the camera. In this case, in the tablet inspection device of Patent Document 1, a threshold value cannot be provided between the translucent tablet and the background, and the translucent tablet in the medicine package may not be detected.

本発明は、上記従来の課題を解決するために、薬包体内の半透明錠剤を正確に検出することのできる錠剤監査装置を提供することを目的とする。   In order to solve the above-described conventional problems, an object of the present invention is to provide a tablet inspection apparatus capable of accurately detecting a translucent tablet in a medicine package.

本発明の錠剤監査装置は、半透明錠剤が封入された薬包体が載置される載置部と、前記薬包体に拡散光又は平行光を照射する照明部と、前記照明部からの光が照射された前記薬包体を撮影する撮影部と、拡散光が照射された前記薬包体の拡散光の透過画像と、平行光が照射された前記薬包体の平行光の透過画像より差分画像を生成する画像処理部と、前記画像処理部で生成された差分画像に基いて前記薬包体内の錠剤を監査する監査部と、を備える構成である。   The tablet inspection device according to the present invention includes a placement unit on which a medicine package encapsulating a translucent tablet is placed, an illumination unit that irradiates the medicine package with diffused light or parallel light, and an illumination unit from the illumination unit. An imaging unit for photographing the medicine pack irradiated with light, a transmission image of diffusion light of the medicine pack irradiated with diffused light, and a transmission image of parallel light of the medicine pack irradiated with parallel light The image processing unit further generates a difference image, and the inspection unit audits the tablets in the medicine package based on the difference image generated by the image processing unit.

本発明の錠剤監査装置は、薬包体内の半透明錠剤を正確に監査することができる。   The tablet inspection device of the present invention can accurately audit a translucent tablet in a medicine package.

本発明の実施の形態1にかかる錠剤監査装置の概略構成図1 is a schematic configuration diagram of a tablet inspection device according to a first embodiment of the present invention. 本実施の形態1にかかる照明部の斜視図The perspective view of the illumination part concerning this Embodiment 1. FIG. 本実施の形態1にかかる平行光フィルタ部の斜視図The perspective view of the parallel light filter part concerning this Embodiment 1. FIG. 本実施の形態1にかかる薬包体の平面図The top view of the medicine pack concerning this Embodiment 1 本実施の形態1にかかる拡散光によりカメラで撮影された薬包体の透過画像を示す図The figure which shows the permeation | transmission image of the medicine package image | photographed with the camera with the diffused light concerning this Embodiment 1. FIG. 本実施の形態1にかかる平行光によりカメラで撮影された薬包体の透過画像を示す図The figure which shows the permeation | transmission image of the medicine pack which was image | photographed with the camera by the parallel light concerning this Embodiment 1. FIG. 本実施の形態1にかかる拡散光の透過画像及び平行光の透過画像より生成された差分画像を示す図The figure which shows the difference image produced | generated from the transmission image of the diffused light concerning Embodiment 1, and the transmission image of parallel light 本実施の形態1にかかる監査部のブロック図Block diagram of the audit department according to the first embodiment 半透明錠剤を透過してカメラへ入射する光を説明するための図であり、(a)平行光が透過する半透明錠剤の概念図、(b)拡散光が透過する半透明錠剤の概念図It is a figure for demonstrating the light which permeate | transmits a translucent tablet and injects into a camera, (a) The conceptual diagram of the translucent tablet which a parallel light permeate | transmits, (b) The conceptual diagram of the translucent tablet which a diffused light permeate | transmits 照明部より照射され半透明錠剤を透過する光を説明するための図であり、(a)拡散光が透過する半透明錠剤の概念図、(b)平行光が透過する半透明錠剤の概念図It is a figure for demonstrating the light which is irradiated from an illumination part and permeate | transmits a translucent tablet, (a) Conceptual diagram of the translucent tablet which diffused light permeate | transmits, (b) Conceptual diagram of the translucent tablet which permeate | transmits parallel light 本実施の形態1にかかる錠剤監査装置を用いて錠剤監査を行なう方法を示すフローチャートThe flowchart which shows the method of performing a tablet inspection using the tablet inspection apparatus concerning this Embodiment 1. FIG. 透過画像の明度分布を説明するための図であり、(a)拡散光の透過画像における画素の明度と各明度を有する画素の数の関係を表わしたグラフを示す図、(b)平行光の透過画像における画素の明度と各明度を有する画素の数の関係を表わしたグラフを示す図It is a figure for demonstrating the lightness distribution of a transmitted image, (a) The figure which shows the graph showing the relationship between the lightness of the pixel in the transmitted image of diffused light, and the number of the pixels which have each lightness, (b) Parallel light The figure which shows the graph showing the relationship between the brightness of the pixel in a transmission image, and the number of the pixels which have each brightness 台紙領域を含む薬包体の平面図Top view of the medicine pack including the mount area 台紙領域を含む薬包体における透過画像の明度分布を説明するための図であり、(a)拡散光の透過画像における画素の明度と各明度を有する画素の数の関係を表わしたグラフ、(b)平行光の透過画像における画素の明度と各明度を有する画素の数の関係を表わしたグラフを示す図It is a figure for demonstrating the brightness distribution of the transmitted image in the medicine package containing a mount area | region, (a) The graph showing the relationship between the brightness of the pixel in the transmitted image of diffused light, and the number of pixels which have each brightness, b) A graph showing the relationship between the brightness of pixels and the number of pixels having each brightness in a parallel light transmission image 拡散光の照明で撮影された薬包体の透過画像を示す図The figure which shows the transmission image of the medicine pack image | photographed with the illumination of the diffused light 平行光の照明で撮影された薬包体の透過画像を示す図The figure which shows the transmission image of the medicine package image | photographed with illumination of parallel light 本発明の実施の形態3にかかる照明部の側面図Side view of the illumination unit according to the third embodiment of the present invention. 本発明の実施の形態4にかかる錠剤監査装置の概略構成図Schematic configuration diagram of a tablet inspection device according to a fourth embodiment of the present invention. 本実施の形態4にかかるの錠剤監査装置の透過画像における半透明錠剤部分を示す図The figure which shows the translucent tablet part in the transparent image of the tablet inspection apparatus concerning this Embodiment 4. FIG. 特許文献1の錠剤監査装置の回路ブロック図Circuit block diagram of tablet inspection device of Patent Document 1 特許文献1において画像の明度と各明度を有する画素数の関係を表したグラフを示す図The figure which shows the graph showing the relationship between the brightness of an image and the pixel number which has each brightness in patent document 1

以下、本発明の実施の形態について、図面を参照しながら説明する。なお、同じ構成要素には同じ符号を付しており、説明を省略する場合もある。また、図面は理解し易くするために、それぞれの構成要素を主体に模式的に示している。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, the same code | symbol is attached | subjected to the same component and description may be abbreviate | omitted. In addition, for easy understanding, the drawings schematically show each component as a main component.

(実施の形態1)
図1は、本発明の実施の形態1にかかる錠剤監査装置11の概略構成図である。図2は、本実施の形態1にかかる照明部13の斜視図である。図3は、本実施の形態1にかかる平行光フィルタ部32の斜視図である。
(Embodiment 1)
FIG. 1 is a schematic configuration diagram of a tablet inspection device 11 according to the first embodiment of the present invention. FIG. 2 is a perspective view of the illumination unit 13 according to the first embodiment. FIG. 3 is a perspective view of the parallel light filter unit 32 according to the first embodiment.

本実施の形態1の錠剤監査装置11は、薬包体21に対して、処方箋通りに適切な錠剤が包まれているか否かを監査する。すなわち、本実施の形態1の錠剤監査装置11は、薬包体21内の錠剤の監査を行う。   The tablet inspection apparatus 11 according to the first embodiment audits whether or not an appropriate tablet is wrapped according to a prescription for the medicine package 21. That is, the tablet inspection apparatus 11 according to the first embodiment audits the tablets in the medicine package 21.

ここで、薬包体21は、錠剤分包機(図示せず)を用い、処方箋に従って、錠剤を薬袋で包んだものである。本実施の形態1での薬包体21は、光を遮断する不透明錠剤と、光を通す半透明錠剤とが、薬袋に包まれたものを想定している。薬袋は、さまざまな種類があるが、本実施の形態1にかかる薬袋は、光を通す透明フィルムより成る。   Here, the medicine package 21 is obtained by wrapping a tablet in a medicine bag according to a prescription using a tablet packaging machine (not shown). The medicine package 21 according to the first embodiment assumes that an opaque tablet that blocks light and a translucent tablet that transmits light are wrapped in a medicine bag. Although there are various types of medicine bags, the medicine bag according to the first embodiment is made of a transparent film that transmits light.

半透明錠剤は、例えば、薬液を透明膜で包んだ薬剤である。半透明錠剤の光の透過度は、その薬液の透過度によって異なる。また、半透明錠剤は、薬液を包むために、丸みを帯びた形状をしている。   The translucent tablet is, for example, a drug in which a drug solution is wrapped with a transparent film. The light transmittance of the translucent tablet varies depending on the transmittance of the drug solution. Further, the translucent tablet has a rounded shape in order to wrap the drug solution.

不透明錠剤は、光を遮断する錠剤である。一般的な錠剤の多くは、不透明錠剤である。   An opaque tablet is a tablet that blocks light. Many common tablets are opaque tablets.

本実施の形態1の錠剤監査装置11は、薬包体21内の錠剤の監査を行うために、最初に、不透明錠剤及び半透明錠剤を内包した薬包体21の画像を取得する。そして、その薬包体21の画像に基づいて、薬包体21内の錠剤を計数し、計数の結果と処方箋の情報とを照合する。本実施の形態1の錠剤監査装置11は、この照合の結果から、適切に薬包体21内に錠剤が封入されているか否かを判定し、錠剤の監査を行う。   The tablet inspection apparatus 11 according to the first embodiment first acquires an image of the medicine package 21 including the opaque tablet and the translucent tablet in order to audit the tablets in the medicine package 21. Then, based on the image of the medicine pack 21, the number of tablets in the medicine pack 21 is counted, and the counting result and the prescription information are collated. The tablet inspection apparatus 11 according to the first embodiment determines whether or not the tablet is appropriately enclosed in the medicine package 21 from the result of this collation, and performs tablet inspection.

錠剤監査装置11は、図1に示すように、撮像部の一例であるカメラ12と、照明部13と、載置台14と、画像処理部15と、監査部16と、表示部17と、透明板23と、載置部の一例であるガイド部24とを備える。画像処理部15は、明度調整部18と、差分画像生成部19とを備える。   As shown in FIG. 1, the tablet inspection apparatus 11 includes a camera 12, which is an example of an imaging unit, an illumination unit 13, a mounting table 14, an image processing unit 15, an inspection unit 16, a display unit 17, and a transparent unit. A plate 23 and a guide portion 24 which is an example of a placement portion are provided. The image processing unit 15 includes a brightness adjustment unit 18 and a difference image generation unit 19.

照明部13は、透明板23を介して、薬包体21を拡散光及び平行光で照らすための光源である。   The illumination unit 13 is a light source for illuminating the medicine pack 21 with diffused light and parallel light through the transparent plate 23.

照明部13は、図2に示すように、拡散光を発する発光部31と、拡散光を平行光に変換する平行光フィルタ部32と、切替部33と、を有する。   As illustrated in FIG. 2, the illumination unit 13 includes a light emitting unit 31 that emits diffused light, a parallel light filter unit 32 that converts the diffused light into parallel light, and a switching unit 33.

発光部31は、内部でLEDを発光させて拡散光を発する構造である。   The light emitting unit 31 has a structure that emits diffused light by causing an LED to emit light therein.

平行光フィルタ部32は、拡散光を平行光に変換する部材である。平行光フィルタ部32は、図3に示すように、可視光を透過する透過帯32aと可視光を吸収する吸収帯32bとを交互に積層した、積層体32c、32dにより形成される。ここで、積層体32cと積層体32dは、積層体32cの透過帯32aと吸収帯32bの積層方向と、積層体32dの透過帯32aと吸収帯32bの積層方向とが直交するように、重ねられている。平行光フィルタ部32は、照明部13より発光される光のうち、所定の入射角で入射する光のみを透過して、それ以外の入射角で入射する光を吸収する。平行光フィルタ部32は所定の入射角の光しか通さないため、平行光フィルタ部32から放射する光は平行光となる。また、本実施の形態1において、平行光フィルタ部32は、ルーバーフィルム2枚を直交させて重ねて構成した。そのため、平行光フィルタ部32により拡散光から変換された平行光は、ルーバーフィルムの厚さによって吸収できる入射角に限界があるため、完全に平行な照射角を持つ光ではなく、少しだけ照射角にバラツキを持つ。なお、この照射角のバラツキは、多少であれば本発明の効果への影響は少ない。これは、照射角が多少のバラツキを持つことで、後述する平行光の透過画像における半透明錠剤への影響は薄れるが、拡散光の透過画像との差分を取るために、平行光と拡散光での変化がない不透明錠剤および背景は画像上から除去でき、平行光と拡散光で違いが生じる半透明錠剤だけが画像上に残るからである。   The parallel light filter unit 32 is a member that converts diffused light into parallel light. As shown in FIG. 3, the parallel light filter unit 32 is formed of stacked bodies 32 c and 32 d in which transmission bands 32 a that transmit visible light and absorption bands 32 b that absorb visible light are alternately stacked. Here, the stacked body 32c and the stacked body 32d are stacked so that the stacking direction of the transmission band 32a and the absorption band 32b of the stacked body 32c is orthogonal to the stacking direction of the transmission band 32a and the absorption band 32b of the stacked body 32d. It has been. The parallel light filter unit 32 transmits only light incident at a predetermined incident angle out of the light emitted from the illumination unit 13 and absorbs light incident at other incident angles. Since the parallel light filter unit 32 passes only light having a predetermined incident angle, the light emitted from the parallel light filter unit 32 becomes parallel light. Further, in the first embodiment, the parallel light filter unit 32 is configured by stacking two louver films orthogonally. For this reason, the parallel light converted from the diffused light by the parallel light filter unit 32 has a limit on the incident angle that can be absorbed by the thickness of the louver film. Have variations. It should be noted that the variation in the irradiation angle has little influence on the effect of the present invention as long as it is slight. This is because there is some variation in the irradiation angle, but the effect on the translucent tablet in the parallel light transmission image, which will be described later, is diminished, but in order to take the difference from the diffusion light transmission image, the parallel light and the diffusion light This is because the opaque tablet and the background having no change in can be removed from the image, and only the translucent tablet in which the difference between the parallel light and the diffused light is different remains on the image.

切替部33は、発光部31と薬包体21の間の位置と、発光部31と薬包体21の間より離れた位置とで、平行光フィルタ部32を移動させることで、発光部31からの光を拡散光と平行光とで切り替える。   The switching unit 33 moves the parallel light filter unit 32 between a position between the light emitting unit 31 and the medicine pack 21 and a position farther from between the light emitting unit 31 and the medicine pack 21, thereby causing the light emitting unit 31 to move. Is switched between diffused light and parallel light.

切替部33は、図2に示すように、発光部31の発光面に平行光フィルタ部32を移動させて、その発光面に平行光フィルタ部32を被せることができる。また、切替部33は、発光面に被さった平行光フィルタ部32を、その発光面より外れる位置へ移動させることができる。切替部33は、平行光フィルタ部32が滑って移動するガイド部33aと、平行光フィルタ部32の片側面に設けたラック33bと、このラック33bに係合したアクチュエータ33cと、アクチュエータ33cを制御する切替制御部33dより構成される。切替部33はアクチュエータ33cを回動させることで、平行光フィルタ部32をラック33bの長手方向に動かす。そして、ある時は、平行光フィルタ部32を発光部31に被せ平行光を薬包体21に照射し、ある時は、平行光フィルタ部32を発光部31の発光面より外し、拡散光を薬包体21に照射する。   As shown in FIG. 2, the switching unit 33 can move the parallel light filter unit 32 to the light emitting surface of the light emitting unit 31 and cover the parallel light filter unit 32 on the light emitting surface. In addition, the switching unit 33 can move the parallel light filter unit 32 that covers the light emitting surface to a position away from the light emitting surface. The switching unit 33 controls the guide unit 33a through which the parallel light filter unit 32 slides, a rack 33b provided on one side of the parallel light filter unit 32, an actuator 33c engaged with the rack 33b, and the actuator 33c. It is comprised from the switching control part 33d to perform. The switching unit 33 moves the parallel light filter unit 32 in the longitudinal direction of the rack 33b by rotating the actuator 33c. In some cases, the parallel light filter unit 32 is placed on the light emitting unit 31 to irradiate the medicine pack 21 with the parallel light. Irradiate the medicine pack 21.

カメラ12は、画像素子(図示せず)とレンズ(図示せず)を有する。そして、図1に示すように、カメラ12は、平行光が照射された薬包体21の透過画像、及び拡散光が照射された薬包体21の透過画像を、取得する。   The camera 12 has an image element (not shown) and a lens (not shown). As shown in FIG. 1, the camera 12 acquires a transmission image of the medicine pack 21 irradiated with parallel light and a transmission image of the medicine pack 21 irradiated with diffused light.

載置台14は、カメラ12及び照明部13の間に配置される。   The mounting table 14 is disposed between the camera 12 and the illumination unit 13.

画像処理部15は、照明部13の拡散光に照らされてカメラ12で撮影された拡散光の透過画像と、照明部13の平行光に照らされてカメラ12で撮影された平行光の透過画像とから、差分画像を生成する。   The image processing unit 15 is a transmission image of diffused light that is captured by the camera 12 by being illuminated by the diffused light of the illumination unit 13 and a transmission image of parallel light that is captured by the camera 12 by being illuminated by the parallel light of the illumination unit 13. From the above, a difference image is generated.

明度調整部18は、拡散光の透過画像及び平行光の透過画像の少なくとも一方の明度レベルの調整を行ない、拡散光の透過画像と平行光の透過画像との明度レベルを略同一にする。なお、以下の文章において、明度レベルの調整と明度調整とを、同じ意味で使用する。   The brightness adjustment unit 18 adjusts the brightness level of at least one of the diffused light transmission image and the parallel light transmission image so that the diffused light transmission image and the parallel light transmission image have substantially the same brightness level. In the following text, brightness level adjustment and brightness adjustment are used interchangeably.

差分画像生成部19は、少なくとも一方の明度レベルの調整が行なわれた拡散光の透過画像及び平行光の透過画像より、差分画像を生成する。   The difference image generation unit 19 generates a difference image from the diffused light transmission image and the parallel light transmission image in which at least one brightness level is adjusted.

明度調整部18と差分画像生成部19とを用いて差分画像を生成すると、差分画像に、半透明錠剤を示す半透明錠剤部分が明瞭に残ると共に、不透明錠剤を示す不透明錠剤部分および背景部分が除去された状態となる。このようにして、本実施の形態1の錠剤監査装置11は、半透明錠剤の透過度に関係なく、薬包体21に含まれる半透明錠剤を示す差分画像を得ることができる。   When a difference image is generated using the brightness adjustment unit 18 and the difference image generation unit 19, a translucent tablet portion indicating a translucent tablet remains clearly in the difference image, and an opaque tablet portion and a background portion indicating an opaque tablet are present. It is in a removed state. In this manner, the tablet inspection device 11 according to the first embodiment can obtain a difference image indicating the translucent tablet included in the medicine package 21 regardless of the translucency of the translucent tablet.

次に、差分画像に半透明錠剤部分が明瞭に残り、不透明錠剤部分および背景部分が除去された状態になる理由について説明する。なお、背景部分とは、薬包体21の透過画像の領域の内、監査の対象である半透明錠剤部分26aおよび不透明錠剤部分25a以外の部分を指す。   Next, the reason why the translucent tablet portion remains clearly in the difference image and the opaque tablet portion and the background portion are removed will be described. The background portion refers to a portion other than the translucent tablet portion 26a and the opaque tablet portion 25a to be audited in the transmission image area of the medicine pack 21.

図4は、本実施の形態1にかかる薬包体21の平面図である。図5は、本実施の形態1にかかる拡散光によりカメラ12で撮影された、薬包体21の透過画像41を示す図である。図6は、本実施の形態1にかかる平行光によりカメラで撮影された、薬包体21の透過画像42を示す図である。図7は、本実施の形態1にかかる拡散光の透過画像と平行光の透過画像より生成した差分画像43である。   FIG. 4 is a plan view of the medicine pack 21 according to the first embodiment. FIG. 5 is a diagram showing a transmission image 41 of the medicine pack 21 taken by the camera 12 with the diffused light according to the first embodiment. FIG. 6 is a view showing a transmission image 42 of the medicine pack 21 taken by the camera with the parallel light according to the first embodiment. FIG. 7 is a difference image 43 generated from the diffused light transmission image and the parallel light transmission image according to the first embodiment.

図4に示すように、不透明錠剤25と半透明錠剤26は、薬包体21に包まれている。本実施の形態1の錠剤監査装置11は、薬包体21の拡散光による透過画像41(図5参照)と平行光による透過画像42(図6参照)とを、カメラ12で取得する。   As shown in FIG. 4, the opaque tablet 25 and the translucent tablet 26 are wrapped in a medicine package 21. The tablet inspection apparatus 11 according to the first embodiment acquires a transmission image 41 (see FIG. 5) using diffused light and a transmission image 42 (see FIG. 6) using parallel light of the medicine pack 21 with the camera 12.

図5に示すように、拡散光が照射された薬包体21の透過画像41では、不透明錠剤25を示す不透明錠剤部分25aは明度が低く、透明フィルムである背景部分は明度が高い。そのため、透過画像41において、不透明錠剤部分25aと背景部分とは、明瞭に区別できる。しかし、半透明錠剤26を示す半透明錠剤部分26bは、外周部を除いて背景部分と同程度に光を透過するため、明度が高い。そのため、透過画像41において、半透明錠剤部分26aと背景部分とは、明瞭な区別は難しい。   As shown in FIG. 5, in the transmission image 41 of the medicine package 21 irradiated with diffused light, the opaque tablet portion 25a showing the opaque tablet 25 has low brightness, and the background portion, which is a transparent film, has high brightness. Therefore, in the transmission image 41, the opaque tablet portion 25a and the background portion can be clearly distinguished. However, since the translucent tablet part 26b which shows the translucent tablet 26 transmits light to the same extent as a background part except an outer peripheral part, its brightness is high. Therefore, in the transmission image 41, it is difficult to clearly distinguish the translucent tablet portion 26a and the background portion.

一方、図6に示すように、平行光が照射された薬包体21をカメラ12で撮影して得た透過画像42では、不透明錠剤25が光を遮断するため、透過画像42中の不透明錠剤部分25aは、全体の明度が低い。一方、透過画像42の半透明錠剤部分26aは、レンズ効果により外周部の明度が低く、中心部の明度が高い。そのため、透過画像42において、半透明錠剤部分26aを明度の高い背景部分と明瞭に区別することが可能となり、半透明錠剤部分26aを示すドーナツ状の影が残る。このドーナツ状の影は、半透明錠剤26を示すものであるが、薬包体21内の不透明錠剤25のバラツキによっては、不透明錠剤25同士の隙間がドーナツ状になる場合もある。   On the other hand, as shown in FIG. 6, in the transmission image 42 obtained by photographing the medicine package 21 irradiated with the parallel light with the camera 12, the opaque tablet 25 blocks the light, and thus the opaque tablet in the transmission image 42. The portion 25a has a low overall brightness. On the other hand, the translucent tablet portion 26a of the transmission image 42 has a low brightness at the outer periphery due to the lens effect and a high brightness at the center. Therefore, in the transmission image 42, it is possible to clearly distinguish the translucent tablet portion 26a from the background portion having high brightness, and a donut-shaped shadow indicating the translucent tablet portion 26a remains. This donut-shaped shadow indicates the translucent tablet 26, but depending on the variation of the opaque tablet 25 in the medicine package 21, the gap between the opaque tablets 25 may be donut-shaped.

ここで、半透明錠剤26の配置によってはドーナツ状の影の形が歪むこともあるため、歪んだ形状のドーナツ状の影を半透明錠剤とした場合、不透明錠剤同士の隙間を半透明錠剤として認識してしまうことがある。そこで、本実施の形態1では、不透明錠剤25を画像上から除去し、半透明錠剤26のみの画像を作るために、平行光の透過画像42より拡散光の透過画像41を差し引いて差分画像43を生成している。   Here, since the shape of the donut-shaped shadow may be distorted depending on the arrangement of the semi-transparent tablet 26, when the distorted donut-shaped shadow is used as the semi-transparent tablet, the gap between the opaque tablets is defined as the semi-transparent tablet. It may be recognized. Therefore, in the first embodiment, in order to remove the opaque tablet 25 from the image and create an image of only the translucent tablet 26, the difference image 43 is obtained by subtracting the diffused light transmission image 41 from the parallel light transmission image 42. Is generated.

生成された差分画像43では、図7に示すように、不透明錠剤部分25aが平行光の透過画像42と拡散光の透過画像41とで同程度の明度となるため、不透明錠剤部分25aが除去された状態となる。また、差分画像43では、背景部分が平行光の透過画像42と拡散光の透過画像41とで同程度の明度となるため、背景部分が除去された状態となる。一方、半透明錠剤部分26aは、平行光の透過画像42と拡散光の透過画像41とで外周部の明度が異なる。そのため、差分画像43において半透明錠剤部分26aのみが残る。   In the generated differential image 43, as shown in FIG. 7, the opaque tablet portion 25a has the same brightness as that of the parallel light transmission image 42 and the diffused light transmission image 41, and therefore the opaque tablet portion 25a is removed. It becomes the state. Further, in the difference image 43, the background portion has the same brightness as that of the parallel light transmission image 42 and the diffused light transmission image 41, and thus the background portion is removed. On the other hand, in the translucent tablet portion 26a, the brightness of the outer peripheral portion is different between the transmission image 42 of parallel light and the transmission image 41 of diffused light. Therefore, only the translucent tablet portion 26a remains in the difference image 43.

本実施の形態1では、差分画像43上には半透明錠剤部分26aのみが残っているため、パターンマッチングやラベリング処理などを行なうことで、半透明錠剤26の計数を容易に行なうことができる。例えば、この半透明錠剤部分26aの個数を処方銭の個数と比較することで、処方箋の通りに半透明錠剤26が含まれているか否かを判定し、薬包体21の監査を行なうことができる。ここで、半透明錠剤26の透過度に関係なく、平行光の透過画像42に半透明錠剤26が写る理由は、後で説明する。   In the first embodiment, since only the semi-transparent tablet portion 26a remains on the difference image 43, the semi-transparent tablets 26 can be easily counted by performing pattern matching or labeling processing. For example, by comparing the number of the translucent tablet portions 26a with the number of prescriptions, it is determined whether or not the translucent tablet 26 is included according to the prescription, and the medicine pack 21 is audited. it can. The reason why the translucent tablet 26 appears in the parallel light transmission image 42 regardless of the translucency of the translucent tablet 26 will be described later.

ガイド部24は、薬包体21を連続して監査するために、図1に示すように、載置台14の載置面の端部に設けられている。ガイド部24は、内部に駆動ローラとガイドローラ(図示せず)を有し、駆動ローラとガイドローラの間に薬包体21の端を挟んで駆動ローラを回転させることで、薬包体21をガイド部24に沿って移動させる。   The guide part 24 is provided at the end of the mounting surface of the mounting table 14 as shown in FIG. The guide unit 24 includes a drive roller and a guide roller (not shown) inside, and rotates the drive roller with the end of the medicine pack 21 sandwiched between the drive roller and the guide roller, whereby the medicine pack 21 Is moved along the guide portion 24.

監査部16は、差分画像43に含まれる半透明錠剤26の個数が処方箋の半透明錠剤の個数と同一であるか否かを判定する。さらに、監査部16は、画像処理部15に保持された拡散光の透過画像41に含まれる不透明錠剤25の個数が、処方箋の不透明錠剤の個数と同一であるか否かを判定する。そして、監査部16は、薬包体21内に、適切な半透明錠剤26の個数及び不透明錠剤25の個数が存在していれば、処方箋通りの錠剤が薬包体21に含まれていると判定する。   The inspection unit 16 determines whether or not the number of translucent tablets 26 included in the difference image 43 is the same as the number of translucent tablets in the prescription. Furthermore, the inspection unit 16 determines whether or not the number of opaque tablets 25 included in the diffused light transmission image 41 held in the image processing unit 15 is the same as the number of opaque tablets in the prescription. And if the number of the appropriate translucent tablet 26 and the number of the opaque tablets 25 exist in the medicine pack 21, the inspecting unit 16 indicates that the medicine pack 21 contains the tablet according to the prescription. judge.

図8は、本実施の形態1にかかる監査部16のブロック図である。   FIG. 8 is a block diagram of the audit unit 16 according to the first embodiment.

上述したように、監査部16は、差分画像43に含まれる半透明錠剤26の個数が処方箋の半透明錠剤の個数と同一であるか否かを判定する。そのために、監査部16は、拡散光の透過画像41における不透明錠剤部分25aを検出して不透明錠剤25の個数を算出する不透明錠剤計数部35と、差分画像43における半透明錠剤部分26aを検出して半透明錠剤26の個数を算出する半透明錠剤計数部36と、判定部37と、記録部38とを備える。   As described above, the inspection unit 16 determines whether or not the number of translucent tablets 26 included in the difference image 43 is the same as the number of translucent tablets in the prescription. Therefore, the inspection unit 16 detects the opaque tablet portion 25a in the diffused light transmission image 41 and calculates the number of opaque tablets 25, and detects the translucent tablet portion 26a in the difference image 43. A translucent tablet counting unit 36 for calculating the number of translucent tablets 26, a determination unit 37, and a recording unit 38.

判定部37は、不透明錠剤計数部35で算出された不透明錠剤25の個数と、半透明錠剤計数部36で算出された半透明錠剤26の個数より、薬包体21内の不透明錠剤25の個数及び半透明錠剤26の個数が、適切か否かを判定する。   The determination unit 37 determines the number of opaque tablets 25 in the medicine package 21 from the number of opaque tablets 25 calculated by the opaque tablet counting unit 35 and the number of translucent tablets 26 calculated by the translucent tablet counting unit 36. And it is determined whether the number of the translucent tablets 26 is appropriate.

また、図1に示すように、表示部17は、画像処理部15に接続され、画像処理部15で検出された錠剤の画像を表示する。したがって、薬包体21内の錠剤の監査者は、表示部17を用いて目視で監査することもできる。また、表示部17に監査部16の判定結果を表示してもよい。   As shown in FIG. 1, the display unit 17 is connected to the image processing unit 15 and displays an image of a tablet detected by the image processing unit 15. Therefore, the inspector of the tablet in the medicine package 21 can also visually inspect using the display unit 17. Further, the determination result of the inspection unit 16 may be displayed on the display unit 17.

次に、拡散光の透過画像41において半透明錠剤部分26aが背景部分と同程度の明度となり、平行光の透過画像42において半透明錠剤部分26aの外周部の明度が低くなって背景部分と区別できる理由について説明する。ここで、平行光の透過画像42において、半透明錠剤部分26aが背景部分と区別ができるのは、本実施の形態1では、後述するレンズ効果を応用しているためである。   Next, the translucent tablet portion 26a has the same brightness as the background portion in the diffused light transmission image 41, and the brightness of the outer periphery of the translucent tablet portion 26a becomes lower in the parallel light transmission image 42 to distinguish it from the background portion. Explain why this is possible. Here, in the parallel light transmission image 42, the translucent tablet portion 26a can be distinguished from the background portion because the lens effect described later is applied in the first embodiment.

図9(a)、図9(b)は、半透明錠剤26を透過してカメラへ入射する光を説明するための図である。図9(a)は、拡散光が透過する半透明錠剤26の概念図であり、図9(b)は、平行光が透過する半透明錠剤26の概念図である。このとき、カメラ12に入射する光の強度が各画素の明度となる。   FIG. 9A and FIG. 9B are diagrams for explaining light that passes through the translucent tablet 26 and enters the camera. FIG. 9A is a conceptual diagram of the translucent tablet 26 through which diffused light is transmitted, and FIG. 9B is a conceptual diagram of the translucent tablet 26 through which parallel light is transmitted. At this time, the intensity of light incident on the camera 12 is the brightness of each pixel.

半透明錠剤26は、前述のように、凸レンズのように球形面を持つ透明体であり、入射する光に対して屈折率を持つ。本実施の形態1では、入射する光が透明体を通して屈折する効果のことをレンズ効果と呼ぶ。   As described above, the translucent tablet 26 is a transparent body having a spherical surface like a convex lens, and has a refractive index with respect to incident light. In the first embodiment, the effect that incident light is refracted through a transparent body is called a lens effect.

カメラ12の撮像素子に入射する光は、カメラ12のレンズを通して撮像素子に集められる光であるので、図9(a)に示す線39a、39b、39c、39e、39f、39gに沿って入射する光に限られる。ここで、図9(a)に示す方向以外の方向からカメラ12に入射する光は、カメラ12のレンズにより屈折した際にカメラ12の撮像素子の範囲外に照射されるため、考慮する必要はない。半透明錠剤26の中心部を通り入射される光は、線39dに沿って直線的に進み、外周部に近くなる程(線39c、39b、39aと位置が変わる程)、半透明錠剤26での屈折角が大きくなる。従来のように照明部13より照射される光が拡散光であると、光の照射角のバラツキがあるため、線39a、39b、39c、39d、39e、39f、39gのどの角度においても照明部13から一定以上の強度で照射され、半透明錠剤26を通過する全ての入射光はカメラ12で一定以上の強度を持つ。よって、図9(a)においては、半透明錠剤26を示す明度の低い画素は生成されず、図5に示すように、透過画像41では半透明錠剤26の明度は背景部分と同程度になり、区別ができない。   The light incident on the image pickup device of the camera 12 is light collected on the image pickup device through the lens of the camera 12 and therefore enters along the lines 39a, 39b, 39c, 39e, 39f, and 39g shown in FIG. Limited to light. Here, light incident on the camera 12 from a direction other than the direction shown in FIG. 9A is irradiated outside the range of the image pickup element of the camera 12 when refracted by the lens of the camera 12, so it needs to be considered. Absent. The incident light passing through the central portion of the translucent tablet 26 linearly travels along the line 39d and becomes closer to the outer peripheral portion (as the position changes from the lines 39c, 39b, 39a), the translucent tablet 26 The angle of refraction increases. If the light emitted from the illuminating unit 13 is diffuse light as in the prior art, the illuminating unit varies at any angle of the lines 39a, 39b, 39c, 39d, 39e, 39f, and 39g because there is a variation in the irradiation angle of the light. 13, all incident light that is irradiated with a certain intensity or higher and passes through the translucent tablet 26 has a certain intensity or more with the camera 12. Therefore, in FIG. 9A, pixels with low brightness indicating the semi-transparent tablet 26 are not generated, and as shown in FIG. 5, the brightness of the semi-transparent tablet 26 is about the same as the background portion in the transparent image 41. I cannot distinguish.

一方、図9(b)において、照明部13より照射される光が平行光であると、照射角のバラツキが小さいため、線39dのような照射角に近い角度の光のみカメラ12に到達できる。図9(a)の線39a、39b、39c、39e、39f、39gのような光軸の光は照明部13より照射されないため、この光軸に沿った光の強度が弱くなる。そのため、半透明錠剤26の中心部以外を通過する光が弱くなり、半透明錠剤26の外周部の明度が低くなる。よって、図6に示すように、透過画像42において、半透明錠剤26の外周部は明度の低い背景部分とは明瞭に区別ができる。   On the other hand, in FIG. 9B, when the light irradiated from the illumination unit 13 is parallel light, the variation in the irradiation angle is small, so that only light having an angle close to the irradiation angle such as the line 39d can reach the camera 12. . Since light with an optical axis such as lines 39a, 39b, 39c, 39e, 39f, and 39g in FIG. 9A is not irradiated from the illuminating unit 13, the intensity of the light along the optical axis is weakened. Therefore, the light passing through other than the central portion of the translucent tablet 26 becomes weak, and the brightness of the outer peripheral portion of the translucent tablet 26 is lowered. Therefore, as shown in FIG. 6, in the transmission image 42, the outer peripheral part of the translucent tablet 26 can be clearly distinguished from the background part with low brightness.

図10(a)、図10(b)は、照明部13より照射され半透明錠剤26を透過する光を説明するための図である。図10(a)は、拡散光が透過する半透明錠剤26の概念図であり、図10(b)は、平行光が透過する半透明錠剤26の概念図である。   FIGS. 10A and 10B are views for explaining light that is irradiated from the illumination unit 13 and passes through the translucent tablet 26. FIG. 10A is a conceptual diagram of the translucent tablet 26 through which diffused light is transmitted, and FIG. 10B is a conceptual diagram of the translucent tablet 26 through which parallel light is transmitted.

ここで、照明部13より照射される光を基点にして考える。図10(a)に示すように、半透明錠剤26に入射する光が拡散光であると、半透明錠剤26に入射する光の入射角にバラツキがあるため、レンズ効果があっても、透過する光は分散してしまう。その結果、拡散光の透過画像41に写る半透明錠剤部分26aの明度は略均一に高くなり、薬包体21の背景と同程度の明度になると考えられる。   Here, the light irradiated from the illumination unit 13 is considered as a base point. As shown in FIG. 10 (a), if the light incident on the translucent tablet 26 is diffuse light, the incident angle of the light incident on the translucent tablet 26 varies. The light that you do will disperse. As a result, it is considered that the brightness of the translucent tablet portion 26a reflected in the transmitted image 41 of diffused light becomes substantially uniform and is as bright as the background of the medicine pack 21.

図10(b)に示すように、照明部13から照射される平行光のうち、半透明錠剤26を透過することのない光は、屈折を起こさないため直進する。しかし、半透明錠剤26を透過する光は、レンズ効果により大きな屈折を起こす。特に半透明錠剤26の外周部では顕著に屈折するため、カメラ12へ光が到達せず、半透明錠剤26の外周部の明度が低下する。一方、半透明錠剤26の中心部付近では屈折率が小さいため、カメラ12で光を受光して明度が高くなる。従って、半透明錠剤26を示す半透明錠剤部分26aは、ドーナツ状に外周の明度が低下し、平行光の透過画像42に写ると考えられる。   As shown in FIG. 10B, light that does not pass through the translucent tablet 26 out of the parallel light emitted from the illumination unit 13 goes straight because it does not cause refraction. However, the light that passes through the translucent tablet 26 causes a large refraction due to the lens effect. In particular, since the light is refracted significantly at the outer peripheral portion of the translucent tablet 26, light does not reach the camera 12, and the brightness of the outer peripheral portion of the translucent tablet 26 is lowered. On the other hand, since the refractive index is small in the vicinity of the center of the translucent tablet 26, the light is received by the camera 12 and the brightness is increased. Therefore, it is considered that the translucent tablet portion 26a indicating the translucent tablet 26 has a donut-shaped outer peripheral brightness that is reflected in the parallel light transmission image 42.

なお、半透明錠剤26の曲率によって屈折率が決まるため、半透明錠剤26の透過度とは関係なく半透明錠剤部分26aの外周部の明度は低い。つまり、半透明錠剤26の透過度に関係なく、半透明錠剤部分26aとして、ドーナツ状に外周の明度の低い領域が透過画像42に生成される。   Since the refractive index is determined by the curvature of the translucent tablet 26, the lightness of the outer peripheral portion of the translucent tablet portion 26a is low regardless of the transmittance of the translucent tablet 26. That is, regardless of the translucency of the translucent tablet 26, a low-brightness outer peripheral area is generated in the translucent image 42 as a translucent tablet portion 26 a.

次に、この錠剤監査装置11を用いた錠剤監査の方法について説明する。   Next, a tablet inspection method using the tablet inspection apparatus 11 will be described.

図11は、本実施の形態1にかかる錠剤監査装置11を用いて錠剤監査を行なう方法を示すフローチャートである。   FIG. 11 is a flowchart showing a method of performing tablet inspection using the tablet inspection apparatus 11 according to the first embodiment.

図11に示すように、載置台14のガイド部24を用いて薬包体21を透明板23の上に移動させた後、錠剤監査装置11は、照明部13からの拡散光を、半透明錠剤26を含む薬包体21に照射して、拡散光の透過画像41を取得する(拡散光撮影ステップS01)。この時、照明部13は、平行光フィルタ部32を発光部31の発光面に被らない位置に移動させているため、照明部13からの光は拡散光となっている。   As shown in FIG. 11, after moving the medicine package 21 onto the transparent plate 23 using the guide portion 24 of the mounting table 14, the tablet inspection device 11 transmits the diffused light from the illumination portion 13 translucently. The medicine package 21 including the tablet 26 is irradiated to obtain a diffused light transmission image 41 (diffused light photographing step S01). At this time, since the illuminating unit 13 moves the parallel light filter unit 32 to a position not covering the light emitting surface of the light emitting unit 31, the light from the illuminating unit 13 is diffused light.

次に、錠剤監査装置11は、ガイド部24を停止させた状態で、照明部13からの平行光を、薬包体21に照射して、平行光の透過画像41を取得する(平行光撮影ステップS02)。平行光撮影ステップS02において照明部13より平行光を照射させるため、切替部33は、平行光フィルタ部32を発光部31の上方へ移動させて、発光部31の発光面に平行光フィルタ部32を被せている。   Next, the tablet inspection device 11 irradiates the medicine pack 21 with the parallel light from the illumination unit 13 in a state where the guide unit 24 is stopped, and acquires a parallel light transmission image 41 (parallel light imaging). Step S02). In order to irradiate the parallel light from the illuminating unit 13 in the parallel light photographing step S02, the switching unit 33 moves the parallel light filter unit 32 above the light emitting unit 31 so that the parallel light filter unit 32 is placed on the light emitting surface of the light emitting unit 31. Is covered.

次に、明度調整部18は、平行光の透過画像42に対して明度レベルの調整を行ない、拡散光の透過画像41と平行光の透過画像42との明度レベルを略同一にする(明度調整ステップS03)。   Next, the lightness adjusting unit 18 adjusts the lightness level of the parallel light transmission image 42 so that the diffuse light transmission image 41 and the parallel light transmission image 42 have substantially the same lightness level (lightness adjustment). Step S03).

明度レベルを略同一にする理由は、拡散光と平行光とで、照明部13からの光の強度が異なるのを調整するためである。ここで、光の強度が異なるのは、薬包体21に拡散光を照射する場合、発光部31の拡散光を薬包体21に直接照射するのに対し、薬包体21に平行光を照射する場合、発光部31の拡散光を平行光フィルタ部32で平行光に変換して薬包体21に照射するためである。そのため、この明度調整ステップS03を行なわないと、平行光は拡散光よりも弱い光になり、拡散光の透過画像41は平行光の透過画像42より全体的に明度が高くなる。ここで、拡散光の透過画像41と平行光の透過画像42との間に明度差がある状態で差分画像43を生成すると、差分画像43に不透明錠剤部分25aを残してしまい、監査部16で正確に不透明錠剤を算出することができないことがあるため、明度調整ステップS03が必要である。   The reason for making the brightness levels substantially the same is to adjust the difference in intensity of light from the illumination unit 13 between the diffused light and the parallel light. Here, the light intensity is different when the medicine pack 21 is irradiated with diffused light, whereas the medicine pack 21 is directly irradiated with the diffused light of the light emitting unit 31, whereas the medicine pack 21 is irradiated with parallel light. When irradiating, the diffused light of the light emitting unit 31 is converted into parallel light by the parallel light filter unit 32 and irradiated to the medicine pack 21. Therefore, if this brightness adjustment step S03 is not performed, the parallel light becomes weaker than the diffused light, and the transmitted image 41 of the diffused light has a higher overall brightness than the transmitted image 42 of the parallel light. Here, if the difference image 43 is generated in a state where there is a brightness difference between the diffused light transmission image 41 and the parallel light transmission image 42, the opaque tablet portion 25 a is left in the difference image 43, and the inspection unit 16 Since the opaque tablet cannot be calculated accurately, the brightness adjustment step S03 is necessary.

さらに、明度調整ステップS03の具体的な処理について、説明する。   Furthermore, specific processing of the brightness adjustment step S03 will be described.

図12(a)、図12(b)は、透過画像の明度分布を説明するための図である。図12(a)は、拡散光の透過画像における画素の明度と、各明度を有する画素の数の関係を表わしたグラフである。図12(b)は、平行光の透過画像における画素の明度と、各明度を有する画素の数の関係を表わしたグラフである。   FIG. 12A and FIG. 12B are diagrams for explaining the lightness distribution of the transmission image. FIG. 12A is a graph showing the relationship between the brightness of pixels in the diffused light transmission image and the number of pixels having each brightness. FIG. 12B is a graph showing the relationship between the brightness of pixels in the parallel light transmission image and the number of pixels having each brightness.

図12(a)、図12(b)に示すように、拡散光の透過画像41における明度分布は、平行光の透過画像42における明度分布よりも全体的に高い。すなわち、拡散光の透過画像41の明度レベルが、平行光の透過画像42の明度レベルよりも高い。   As shown in FIGS. 12A and 12B, the brightness distribution in the transmitted image 41 of diffused light is generally higher than the brightness distribution in the transmitted image 42 of parallel light. That is, the lightness level of the transmitted image 41 of diffused light is higher than the lightness level of the transmitted image 42 of parallel light.

明度調整部18は、拡散光の透過画像41と平行光の透過画像42との明度レベルを略同一にするため、平行光の透過画像42の明度レベルの調整を行なう。しかし、薬袋には不透明錠剤、半透明錠剤、背景などの複数の撮像物があり、さらに、錠剤の種類も多いために、これらの対策を行ないながら明度レベルを調整する必要がある。この対策として、複数の錠剤が含まれていても明度の変化がなく、最も高い明度を持つ背景を基準として、明度レベルの調整を行う。明度調整部18が行なう明度レベルの調整とは、図12(a)に示す拡散光の透過画像41における明度分布のピーク値Paに、図12(b)に示す平行光の透過画像42の明度分布のピーク値Pbを合わせることである。なぜなら、透過画像42では、複数の錠剤が混入していても、背景の明度が最も高く領域が広いため、明度分布のピーク値Paが背景の明度と同じ値となる。そのため、拡散光の透過画像41における明度分布のピーク値Paに、平行光の透過画像42の明度分布のピーク値Pbを合わせることで、錠剤の影響を受けることなく、背景および錠剤の明度レベルの調節が可能となる。具体的には、ピーク値Paにピーク値Pbが同じになるように、平行光の透過画像42における画素の明度をα倍することで、背景の明度値が同値になる。半透明錠剤26の中央部および不透明錠剤25の明度値も照明の強度に比例するため、同様にα倍する事で同値になる。ただし、半透明錠剤26の外周部はレンズ効果を持つため、照明の強度の変化以上に明度が変化するために、画素値をα倍しても同値とはならない。   The lightness adjustment unit 18 adjusts the lightness level of the parallel light transmission image 42 so that the diffuse light transmission image 41 and the parallel light transmission image 42 have substantially the same lightness level. However, since there are a plurality of images such as opaque tablets, translucent tablets, and backgrounds in the medicine bag, and there are many types of tablets, it is necessary to adjust the lightness level while taking these measures. As a countermeasure, the brightness level is adjusted on the basis of the background having the highest brightness without changing the brightness even when a plurality of tablets are included. The lightness level adjustment performed by the lightness adjusting unit 18 is the lightness of the parallel light transmission image 42 shown in FIG. 12B to the peak value Pa of the lightness distribution in the transmission image 41 of diffused light shown in FIG. The distribution peak value Pb is matched. This is because, in the transmission image 42, even if a plurality of tablets are mixed, the brightness of the background is the highest and the area is wide, so the peak value Pa of the brightness distribution is the same value as the brightness of the background. Therefore, by adjusting the peak value Pb of the brightness distribution of the transmitted image 42 of the parallel light to the peak value Pa of the brightness distribution in the transmitted image 41 of the diffused light, the brightness level of the background and the tablet can be adjusted without being affected by the tablet. Adjustment is possible. Specifically, the brightness value of the background becomes the same value by multiplying the brightness value of the pixel in the transmitted image 42 of the parallel light by α so that the peak value Pb becomes the same as the peak value Pa. Since the brightness values of the central part of the translucent tablet 26 and the opaque tablet 25 are also proportional to the intensity of illumination, they are similarly set by multiplying by α. However, since the outer peripheral part of the translucent tablet 26 has a lens effect, the brightness changes more than the change in the intensity of illumination, so the pixel value does not become the same value even if it is multiplied by α.

次に、画像処理部15の差分画像生成部19は、拡散光の透過画像41と平行光の透過画像42より差分画像43を生成する(差分画像生成ステップS05)。拡散光の透過画像の背景部分と、平行光の透過画像42の背景部分は前述の明度調整により略同一の明度であるため、差分画像生成部19が生成した差分画像43において、背景部分は除去された状態となる。一方、半透明錠剤部分26aは拡散光の透過画像41では背景部分と同程度の明度を持つが、平行光の透過画像42では明度調整をされてもレンズ効果により半透明錠剤部分26aの外周部の明度は背景部分よりも低い。そのため、差分画像生成部19が生成した差分画像43において、半透明錠剤部分26aは外周部が明瞭に残る。さらに、拡散光の透過画像41の不透明錠剤部分25aと、平行光の透過画像42の不透明錠剤部分25aは略同一の明度であるため、差分画像生成部19が生成した差分画像43において、不透明錠剤部分25aは除去された状態となる。実際には、拡散光の透過画像41における不透明錠剤部分25aは、不透明錠剤25の表面から回り込む光により実際より小さく写るため、不透明錠剤部分25aを構成する一部の極外周部が拡散光の透過画像41と平行光の透過画像42との差分画像43に残ってしまう。   Next, the difference image generation unit 19 of the image processing unit 15 generates a difference image 43 from the transmission image 41 of diffused light and the transmission image 42 of parallel light (difference image generation step S05). Since the background portion of the diffused light transmission image and the background portion of the parallel light transmission image 42 have substantially the same brightness by the above-described brightness adjustment, the background portion is removed in the difference image 43 generated by the difference image generation unit 19. It will be in the state. On the other hand, the translucent tablet portion 26a has the same brightness as that of the background portion in the diffused light transmission image 41, but the outer peripheral portion of the translucent tablet portion 26a due to the lens effect even if the brightness is adjusted in the parallel light transmission image 42. Is lighter than the background. Therefore, in the difference image 43 generated by the difference image generation unit 19, the outer peripheral portion of the translucent tablet portion 26a remains clearly. Further, since the opaque tablet portion 25a of the diffused light transmission image 41 and the opaque tablet portion 25a of the parallel light transmission image 42 have substantially the same brightness, the opaque tablet portion in the differential image 43 generated by the differential image generation unit 19 The portion 25a is removed. Actually, the opaque tablet portion 25a in the transmitted image 41 of the diffused light appears smaller than the actual size due to the light that wraps around from the surface of the opaque tablet 25. Therefore, a part of the outer periphery of the opaque tablet portion 25a is transparent to the diffused light. It remains in the difference image 43 between the image 41 and the parallel light transmission image 42.

そこで、本実施の形態1の画像処理部15は、差分画像43に二値化を施す(第1の二値化画像生成ステップS05)。画像処理部15は、二値化が施された差分画像43に対してオープニング処理を行なう。オープニング処理を行なうことで、差分画像43に残った不透明錠剤部分25aの外周部の除去を行なうことができる(第1のノイズ除去ステップS06)。第1のノイズ除去ステップS06によりノイズ除去が施された差分画像43には半透明錠剤部分26aしか残らない。   Therefore, the image processing unit 15 of the first embodiment performs binarization on the difference image 43 (first binarized image generation step S05). The image processing unit 15 performs an opening process on the difference image 43 that has been binarized. By performing the opening process, it is possible to remove the outer peripheral portion of the opaque tablet portion 25a remaining in the differential image 43 (first noise removal step S06). Only the translucent tablet portion 26a remains in the difference image 43 that has been subjected to noise removal in the first noise removal step S06.

次に、監査部16の半透明錠剤計数部36は、差分画像43に対してラベリング処理を行ない、差分画像43より半透明錠剤26の個数を検出する(半透明錠剤計数ステップS07)。   Next, the translucent tablet counting unit 36 of the inspection unit 16 performs a labeling process on the difference image 43 and detects the number of translucent tablets 26 from the difference image 43 (translucent tablet counting step S07).

このようにして、錠剤監査装置11は、半透明錠剤26の透過度に関係なく半透明錠剤26を正確に検出することができる。   In this way, the tablet inspection device 11 can accurately detect the translucent tablet 26 regardless of the permeability of the translucent tablet 26.

次に、画像処理部15は、不透明錠剤25の個数を検出するために不透明錠剤部分25aを残した画像を生成する。そのために、拡散光撮影ステップS01で取得した拡散光の透過画像41より、半透明錠剤26の領域を除去する(半透明錠剤領域の除去ステップS08)。画像処理部15は、半透明錠剤計数ステップS07にて、半透明錠剤部分26aのみを残した差分画像43にラベリング処理を行なう際、ラベリング処理中に検出された半透明錠剤部分26aの領域データ(差分画像における半透明錠剤部分26aを示す画素の位置)を記憶する。そして、半透明錠剤領域の除去ステップS08において、画像処理部15は、拡散光の透過画像41より、半透明錠剤部分26aの領域データの画素を除去することで、不透明錠剤部分25aを残した画像を生成する。   Next, the image processing unit 15 generates an image in which the opaque tablet portions 25a are left in order to detect the number of opaque tablets 25. For this purpose, the area of the translucent tablet 26 is removed from the transmitted image 41 of diffused light acquired in the diffused light imaging step S01 (translucent tablet area removing step S08). When the image processing unit 15 performs the labeling process on the differential image 43 in which only the translucent tablet part 26a is left in the translucent tablet counting step S07, the region data (the translucent tablet part 26a detected during the labeling process) ( The pixel position indicating the translucent tablet portion 26a in the difference image) is stored. Then, in the translucent tablet region removing step S08, the image processing unit 15 removes the pixels of the region data of the translucent tablet portion 26a from the diffused light transmission image 41, thereby leaving the opaque tablet portion 25a. Is generated.

次に、画像処理部15は、透過画像41に対して二値化を施す(第2の二値化画像生成ステップS09)。さらに、二値化された透過画像41に対してオープニング処理を行なう。オープニング処理を行なうことで、半透明錠剤領域の除去ステップS08で除去できなかった、半透明錠剤26の外周の細線等のノイズ等の除去が行なわれる(第2のノイズ除去ステップS10)。第2のノイズ除去ステップS10によりノイズ除去が施された拡散光の透過画像41には、不透明錠剤部分25aしか残らない。   Next, the image processing unit 15 binarizes the transmission image 41 (second binarized image generation step S09). Further, an opening process is performed on the binarized transmission image 41. By performing the opening process, noise such as fine lines on the outer periphery of the translucent tablet 26, which could not be removed in the translucent tablet region removal step S08, is removed (second noise removal step S10). Only the opaque tablet portion 25a remains in the transmitted image 41 of the diffused light that has been subjected to noise removal in the second noise removal step S10.

次に、監査部16の不透明錠剤計数部35は、差分画像43に対してラベリング処理を行ない、透過画像41の不透明錠剤25の個数を検出する(不透明錠剤計数ステップS11)。   Next, the opaque tablet counting unit 35 of the inspection unit 16 performs a labeling process on the difference image 43 to detect the number of opaque tablets 25 in the transparent image 41 (opaque tablet counting step S11).

そして、監査部16の判定部37は、計数された半透明錠剤26の個数および不透明錠剤25の個数と処方箋の錠剤数とを比較して、適切な錠剤数が薬包体21にあるか否かを判定する(監査ステップS12)。具体的には、半透明錠剤計数ステップS07で算出された半透明錠剤26の個数と、不透明錠剤計数ステップS11で算出された不透明錠剤25の錠剤の個数との和が、適切な錠剤数であるか否かを判定することで、錠剤の個数のチェックを行なう。   Then, the determination unit 37 of the inspection unit 16 compares the counted number of translucent tablets 26 and the number of opaque tablets 25 with the number of tablets in the prescription, and determines whether the appropriate number of tablets is in the medicine package 21. Is determined (audit step S12). Specifically, the sum of the number of translucent tablets 26 calculated in the translucent tablet counting step S07 and the number of tablets of the opaque tablet 25 calculated in the opaque tablet counting step S11 is an appropriate number of tablets. By determining whether or not, the number of tablets is checked.

そして、錠剤監査装置11は、ガイド部24を作動させて透明板23上の薬包体21を移動させ、続いて、別の薬包体21を透明板23に載せる。また、照明部13より拡散光を照射させるため、切替部33は、平行光フィルタ部32を発光部31の発光面に被らない位置へ移動させる。このように、ステップS01からステップS12を繰り返して、複数の薬包体21の錠剤監査を行なう。   Then, the tablet inspection device 11 operates the guide unit 24 to move the medicine pack 21 on the transparent plate 23, and then places another medicine pack 21 on the transparent plate 23. Further, the switching unit 33 moves the parallel light filter unit 32 to a position where it does not cover the light emitting surface of the light emitting unit 31 in order to irradiate the diffused light from the illumination unit 13. In this way, step S01 to step S12 are repeated, and tablet inspection of a plurality of medicine packs 21 is performed.

なお、監査ステップS12において、監査部16は、不透明錠剤25の個数と半透明錠剤26の個数との総数と、処方箋の総錠剤数と比較しているが、不透明錠剤25の個数と半透明錠剤26の個数とを別々に比較してもよい。つまり、処方箋の半透明錠剤の錠剤数と半透明錠剤計数ステップS07で計数された半透明錠剤26の個数とが同一であるか否かを判定し、処方箋の不透明錠剤の錠剤数と不透明錠剤計数ステップS11で計数された不透明錠剤25の個数とが同一であるか否かを判定し、いずれの判定結果も同一であれば、薬包体21内の錠剤は適切であると判定してもよい。   In the auditing step S12, the auditing unit 16 compares the total number of opaque tablets 25 and the number of translucent tablets 26 with the total number of prescription tablets, but the number of opaque tablets 25 and the translucent tablets. The 26 numbers may be compared separately. That is, it is determined whether the number of translucent tablets in the prescription and the number of translucent tablets 26 counted in the translucent tablet counting step S07 are the same, and the number of opaque tablets in the prescription and the opaque tablet count are determined. It is determined whether or not the number of opaque tablets 25 counted in step S11 is the same, and if any determination result is the same, it may be determined that the tablet in the medicine package 21 is appropriate. .

また、照明部13は、拡散光を発する発光部31の代わりに、平行光を発する発光部を用いてもよい。その場合、平行光フィルタ部の代わりに拡散光フィルタ部を用いる必要がある。この場合、照明部13は、平行光を発する発光部31と、平行光を拡散光に変換する拡散光フィルタ部と、拡散光フィルタ部を発光部と薬包体の間に介在させ又は発光部と薬包体の間より離れた位置に移動させる切替部と、を有するものであってもよい。   In addition, the illumination unit 13 may use a light emitting unit that emits parallel light instead of the light emitting unit 31 that emits diffused light. In that case, it is necessary to use a diffused light filter unit instead of the parallel light filter unit. In this case, the illumination unit 13 includes a light emitting unit 31 that emits parallel light, a diffused light filter unit that converts the parallel light into diffused light, and a diffused light filter unit interposed between the light emitting unit and the medicine package, or the light emitting unit. And a switching unit that moves to a position further away from between the medicine packs.

また、不透明錠剤計数部35及び半透明錠剤計数部36での処理は、ラベリング処理でなく、サンプル錠剤画像とのパターンマッチングにより透明錠剤の個数を算出してもよい。   Further, the processes in the opaque tablet counting unit 35 and the translucent tablet counting unit 36 may calculate the number of transparent tablets by pattern matching with the sample tablet image instead of the labeling process.

(実施の形態2)
図13は、台紙領域62を含む薬包体61の平面図である。図14は、台紙領域62を含む薬包体61における透過画像の明度分布を説明するための図である。図14(a)は、拡散光の透過画像における画素の明度と、各明度を有する画素の数の関係を表わしたグラフであり、図14(b)は、平行光の透過画像における画素の明度と、各明度を有する画素の数の関係を表わしたグラフである。
(Embodiment 2)
FIG. 13 is a plan view of the medicine package 61 including the mount area 62. FIG. 14 is a view for explaining the brightness distribution of the transmission image in the medicine package 61 including the mount region 62. FIG. 14A is a graph showing the relationship between the brightness of a pixel in a diffused light transmission image and the number of pixels having each brightness, and FIG. 14B is the brightness of the pixel in a parallel light transmission image. And a graph showing the relationship between the number of pixels having each brightness.

以下、本実施の形態2が実施の形態1と異なる点について、図面を参照しながら説明する。   Hereinafter, differences of the second embodiment from the first embodiment will be described with reference to the drawings.

実施の形態1における薬包体21の薬袋は、透明フィルムよりなるため、透過度が一律である。それに対し、本実施の形態2における薬包体61の薬袋は、透明フィルムを基本とするが、裏面(照明部13側)の一部に透過度の低い台紙領域62を持つ。すなわち、図13に示すように、薬包体61は、印字を行なうために透明フィルムよりも透過度を低くした台紙領域62と、透明フィルムの非台紙領域63とを有する。   Since the medicine bag of medicine pack 21 in Embodiment 1 is made of a transparent film, the transmittance is uniform. On the other hand, the medicine bag of the medicine package 61 according to the second embodiment is based on a transparent film, but has a mount region 62 with low transmittance on a part of the back surface (illumination unit 13 side). That is, as shown in FIG. 13, the medicine package 61 has a mount area 62 whose transparency is lower than that of the transparent film for printing, and a non-mount area 63 of the transparent film.

この台紙領域62は、透過度が低いため、透過する光の強度を弱めてしまう。さらに、台紙領域62は、照明部13の光が平行光であると、わずかではあるが拡散光に変換してしまうため、平行光を拡散光以上に光を弱めてしまう。そのため、薬包体61を拡散光で撮影した透過画像と薬包体61を平行光で撮影した透過画像とを、前述の実施の形態1のように明度調整すると、拡散光の透過画像における台紙領域62の明度と平行光の透過画像における台紙領域62の明度とは異なる明度となってしまう。具体的には、図14(a)に示す拡散光の透過画像における明度分布64のピーク値Paに、図14(b)に示す平行光の透過画像における明度分布65のピーク値Pbが一致するように、明度調整部18が明度分布65の明度をα倍にした明度分布65aを生成しても、明度分布64の台紙領域62を示すピーク値Daと明度分布65aの台紙領域62を示すピーク値Db・αは一致しない。そのため、実施の形態1と同じように平行光の透過画像の明度調整を行なうと、拡散光の透過画像における台紙領域62の明度と平行光の透過画像における台紙領域62の明度とが異なるため、画像処理部15は台紙領域を残した差分画像を生成する。   Since the mount area 62 has low transmittance, the intensity of transmitted light is weakened. Furthermore, since the mount area 62 converts the light from the illumination unit 13 into parallel light, although slightly, the light is weakened more than the diffused light. For this reason, when the brightness adjustment of the transmission image obtained by photographing the medicine pack 61 with the diffused light and the transmission image obtained by photographing the medicine package 61 with the parallel light as in the first embodiment described above, the mount in the transmission image of the diffused light is performed. The brightness of the area 62 is different from the brightness of the mount area 62 in the parallel light transmission image. Specifically, the peak value Pb of the lightness distribution 64 in the transmission image of parallel light shown in FIG. 14B matches the peak value Pa of the lightness distribution 64 in the transmission image of diffused light shown in FIG. As described above, even when the lightness adjusting unit 18 generates the lightness distribution 65a obtained by multiplying the lightness of the lightness distribution 65 by α, the peak value Da indicating the mount region 62 of the lightness distribution 64 and the peak indicating the mount region 62 of the lightness distribution 65a. The values Db · α do not match. Therefore, when the brightness adjustment of the parallel light transmission image is performed as in the first embodiment, the brightness of the mount area 62 in the diffuse light transmission image is different from the brightness of the mount area 62 in the parallel light transmission image. The image processing unit 15 generates a difference image that leaves the mount area.

そこで、本実施の形態2にかかる錠剤監査装置11の画像処理部15は、非台紙領域63及び台紙領域62を含む薬包体61の透過画像に対して、非台紙領域63と台紙領域62とを分けて明度調整を行なう。   Therefore, the image processing unit 15 of the tablet inspection apparatus 11 according to the second embodiment performs the non-mounting area 63 and the mounting area 62 on the transmission image of the medicine package 61 including the non-mounting area 63 and the mounting area 62. Adjust the brightness separately.

具体的には、画像処理部15の明度調整部18は、透過画像を台紙領域62と非台紙領域63とを分けた上で、台紙領域62と非台紙領域63ごとに、明度レベルの調整を行う。すなわち、明度調整部18は拡散光の透過画像66における台紙領域62と平行光の透過画像67における台紙領域62との明度レベルが略同一になるように、拡散光の透過画像における台紙領域62及び平行光の透過画像における台紙領域62の少なくとも一方の明度レベルの調整を行なう。さらに、拡散光の透過画像における非台紙領域63及び平行光の透過画像における非台紙領域63の少なくとも一方の明度レベルの調整を行なう。このようにして、本実施の形態2の錠剤監査装置11の画像処理部15は、拡散光の透過画像の明度レベルと平行光の透過画像の明度レベルを同一とした差分画像を生成する。   Specifically, the brightness adjustment unit 18 of the image processing unit 15 divides the transmission image into the mount area 62 and the non-mount area 63 and then adjusts the brightness level for each of the mount area 62 and the non-mount area 63. Do. In other words, the brightness adjustment unit 18 causes the mount area 62 in the diffused light transmission image and the mount area 62 in the diffused light transmitted image 66 and the mount area 62 in the parallel light transmitted image 67 to have substantially the same brightness level. The brightness level of at least one of the mount areas 62 in the parallel light transmission image is adjusted. Further, the brightness level of at least one of the non-mounting area 63 in the diffused light transmission image and the non-mounting area 63 in the parallel light transmission image is adjusted. In this manner, the image processing unit 15 of the tablet inspection device 11 according to the second embodiment generates a difference image in which the lightness level of the transmitted image of diffused light is the same as the lightness level of the transmitted image of parallel light.

図15は、拡散光の照明で撮影された薬包体61の透過画像66を示す図である。図16は、平行光の照明で撮影された薬包体61の透過画像67を示す図である。   FIG. 15 is a diagram showing a transmission image 66 of the medicine pack 61 taken with diffused light illumination. FIG. 16 is a diagram showing a transmission image 67 of the medicine pack 61 taken with parallel light illumination.

上述したように、明度調整部18は、透過画像を台紙領域62と非台紙領域63とを分けて、平行光の透過画像67の明度調整を行なう。そのために、明度調整部18は、透過画像66、67における微分画像から所定の長さ以上の直線を検出し、検出された二つの直線の間を台紙領域62と認識する。また、明度調整部18は、透過画像66、67における台紙領域62以外の領域を非台紙領域63と認識する。   As described above, the brightness adjustment unit 18 divides the transmission image into the mount area 62 and the non-mount area 63 and adjusts the brightness of the parallel light transmission image 67. For this purpose, the brightness adjustment unit 18 detects a straight line having a predetermined length or more from the differential image in the transmission images 66 and 67 and recognizes the mount area 62 between the two detected straight lines. Further, the brightness adjustment unit 18 recognizes an area other than the mount area 62 in the transparent images 66 and 67 as the non-mount area 63.

そして、明度調整部18は、平行光の透過画像67における台紙領域62に対して、拡散光の透過画像66と同じ明度レベルになるように明度調整を行なう。また、明度調整部18は、同様に、平行光の透過画像67における非台紙領域63に対して、拡散光の透過画像67と同じ明度レベルになるように明度調整を行なう。   Then, the lightness adjustment unit 18 performs lightness adjustment so that the mount region 62 in the parallel light transmission image 67 has the same lightness level as the diffused light transmission image 66. Similarly, the lightness adjustment unit 18 performs lightness adjustment so that the non-mounting region 63 in the parallel light transmission image 67 has the same lightness level as that of the diffused light transmission image 67.

そして、差分画像生成部19は、台紙領域62、非台紙領域63ごとに明度調整が行なわれた平行光の透過画像67と拡散光の透過画像66とを用いて、差分画像を生成する。このように、台紙領域62と非台紙領域63とを分けて、明度調整を行なうことで、台紙領域62を残すことなく半透明錠剤部分26aを強調した差分画像を生成することができる。この差分画像に対して、二値化処理、オープニング処理を行なうことで、錠剤監査装置11は、半透明錠剤部分26aを強調した画像を得ることができる。   Then, the difference image generation unit 19 generates a difference image using the parallel light transmission image 67 and the diffused light transmission image 66 that have been adjusted in brightness for each of the mount area 62 and the non-mount area 63. Thus, by performing the brightness adjustment by separating the mount area 62 and the non-mount area 63, a difference image in which the translucent tablet portion 26a is emphasized can be generated without leaving the mount area 62. By performing binarization processing and opening processing on the difference image, the tablet inspection device 11 can obtain an image in which the translucent tablet portion 26a is emphasized.

(実施の形態3)
本実施の形態3の錠剤監査装置は、前述の実施の形態1の錠剤監査装置11の照明部13が照明部83に置き換わったものであり、それ以外は、実施の形態1の錠剤監査装置11と同様であるため、照明部83以外の説明は省略する。図17は、本実施の形態3にかかる照明部83の側面図である。
(Embodiment 3)
In the tablet inspection apparatus of the third embodiment, the illumination unit 13 of the tablet inspection apparatus 11 of the first embodiment is replaced with the illumination unit 83. Otherwise, the tablet inspection apparatus 11 of the first embodiment is used. Therefore, the description other than the illumination unit 83 is omitted. FIG. 17 is a side view of the illumination unit 83 according to the third embodiment.

以下、本実施の形態3が実施の形態1と異なる点について、図面を参照しながら説明する。   Hereinafter, the differences of the third embodiment from the first embodiment will be described with reference to the drawings.

照明部83は、拡散光を発する発光部84と、電圧を印加すると液晶の配向状態を変化する液晶フィルタ部85と、液晶フィルタ部85へ印加する電圧のオンオフを行なう切替部86と、を備える。   The illumination unit 83 includes a light emitting unit 84 that emits diffused light, a liquid crystal filter unit 85 that changes the alignment state of the liquid crystal when a voltage is applied, and a switching unit 86 that turns on and off the voltage applied to the liquid crystal filter unit 85. .

液晶フィルタ部85は、電圧を印加すると拡散光を平行光に変換し、電圧を印加しなければ拡散光を拡散光のまま通す。すなわち、液晶フィルタ部85の液晶の配向を変えることで、液晶フィルタ部85を、拡散光を平行光に変換する平行光フィルタ部として利用し、また、透過光を透過光のまま通すフィルタ部として利用することができる。   The liquid crystal filter unit 85 converts diffused light into parallel light when a voltage is applied, and passes the diffused light as diffused light when no voltage is applied. That is, by changing the orientation of the liquid crystal of the liquid crystal filter unit 85, the liquid crystal filter unit 85 is used as a parallel light filter unit that converts diffused light into parallel light, and as a filter unit that transmits transmitted light as it is. Can be used.

照明部83は、電気のON、OFFで拡散光と平行光を切り替えるため、拡散光の透過画像41および平行光の透過画像42を即座に取得することができる。その結果、監査時間を短縮することができる。   Since the illumination unit 83 switches between diffused light and parallel light when the electricity is turned on and off, the transmitted image 41 of diffused light and the transmitted image 42 of parallel light can be acquired immediately. As a result, the audit time can be shortened.

なお、照明部83の液晶フィルタ部85は電圧を印加すると平行光を拡散光に変換し、電圧を印加しなければ平行光を平行光のまま通し、発光部84は平行光を発する構成としてもよい。   Note that the liquid crystal filter unit 85 of the illumination unit 83 converts parallel light into diffused light when a voltage is applied, and passes parallel light as parallel light when no voltage is applied, and the light emitting unit 84 emits parallel light. Good.

(実施の形態4)
本実施の形態4の錠剤監査装置は、グラデーションを利用して、半透明錠剤26を計数するものである。
(Embodiment 4)
The tablet inspection apparatus according to the fourth embodiment counts the translucent tablets 26 using gradation.

図18は、本実施の形態4の錠剤監査装置の概略構成図である。図19は、本実施の形態4の錠剤監査装置で撮影された透過画像の半透明錠剤部分を示す図である。前述の実施の形態1では、差分画像を基に半透明錠剤26を計数する方法として、二値化、オープニング処理とラベリング処理を用いているが、半透明錠剤26が台紙領域62と非台紙領域63にまたがっている場合、各領域で明度調整を行うために計数時に分割されてしまう可能性がある。そこで、発明者らがその対策を検討したところ、図19に示すように平行光の照明で撮影された半透明錠剤部分99は、発明者らの詳細な分析の結果、外周にグラデーションを持つことが分かった。そこで、発明者らは、外周に存在するグラデーションを利用して、半透明錠剤26を検出することを考えた。   FIG. 18 is a schematic configuration diagram of the tablet inspection device according to the fourth embodiment. FIG. 19 is a diagram illustrating a translucent tablet portion of a transmission image photographed by the tablet inspection device according to the fourth embodiment. In the above-described first embodiment, binarization, opening processing, and labeling processing are used as a method of counting the translucent tablets 26 based on the difference image. 63, there is a possibility of being divided at the time of counting in order to perform brightness adjustment in each area. Then, the inventors examined the countermeasure, and as shown in FIG. 19, the translucent tablet part 99 image | photographed with the illumination of parallel light has gradation on an outer periphery as a result of inventors' detailed analysis. I understood. Therefore, the inventors considered to detect the translucent tablet 26 using gradation existing on the outer periphery.

以下、本実施の形態4が実施の形態1と異なる点について、図面を参照しながら説明する。   Hereinafter, differences of the fourth embodiment from the first embodiment will be described with reference to the drawings.

本実施の形態4の錠剤監査装置91は、前述の実施の形態2の錠剤監査装置11の画像処理部15が画像処理部93に置き換わったものであり、それ以外は、実施の形態2の錠剤監査装置11と同様である。図18において、錠剤監査装置91は、図11の差分画像生成ステップS04の後、半透明錠剤部分99のグラデーションを利用して、差分画像より半透明錠剤26を検出する。   The tablet inspecting apparatus 91 according to the fourth embodiment is obtained by replacing the image processing unit 15 of the tablet inspecting apparatus 11 according to the above-described second embodiment with an image processing unit 93, and otherwise the tablet according to the second embodiment. This is the same as the audit device 11. In FIG. 18, the tablet inspection device 91 detects the translucent tablet 26 from the difference image using the gradation of the translucent tablet portion 99 after the difference image generation step S04 in FIG.

半透明錠剤26を検出するために、画像処理部93は、グラデーション判定部96と、エッジ画素判定部97とを備える。   In order to detect the translucent tablet 26, the image processing unit 93 includes a gradation determination unit 96 and an edge pixel determination unit 97.

差分画像における半透明錠剤部分99は、平行光の透過画像とほぼ同等の画像のため、グラデーションを有する。   The translucent tablet portion 99 in the difference image has a gradation because it is substantially the same as the transmission image of parallel light.

そこで、グラデーション判定部96は、差分画像に対して、グラデーションの有無、グラデーションの方向(輝度が高くなる方向)が中心に向かっているか否かより、画素毎に評価値を算出する。また、エッジ画素判定部97は、錠剤部分の外周部のエッジの有無により、画素毎に評価値を算出する。画像処理部93は、差分画像において、グラデーション判定部96の評価値とエッジ画素判定部97の評価値との評価を基に、錠剤領域が半透明錠剤26であるか否かを判定する。これにより台紙領域62と非台紙領域63の間で半透明錠剤26が多少途切れるような差分画像が得られたとしても、グラデーションの方向より一体の錠剤として検出されるために、正確な計数が実現できる。   Therefore, the gradation determination unit 96 calculates an evaluation value for each pixel based on the presence or absence of gradation and whether or not the gradation direction (the direction in which the luminance increases) is directed toward the center. Moreover, the edge pixel determination part 97 calculates an evaluation value for every pixel by the presence or absence of the edge of the outer peripheral part of a tablet part. The image processing unit 93 determines whether or not the tablet region is the translucent tablet 26 based on the evaluation of the evaluation value of the gradation determination unit 96 and the evaluation value of the edge pixel determination unit 97 in the difference image. As a result, even if a differential image in which the translucent tablet 26 is somewhat interrupted between the mount area 62 and the non-mount area 63 is obtained, it is detected as an integrated tablet from the gradation direction, so accurate counting is realized. it can.

このようにして、画像処理部93は、差分画像又は平行光の透過画像より半透明錠剤26を検出する。   In this way, the image processing unit 93 detects the translucent tablet 26 from the difference image or the parallel light transmission image.

また、半透明錠剤26のグラデーションは、台紙領域62を透過した平行光の透過画像においても見られるため、薬包体21に台紙領域62があるか否かに係わらず、半透明錠剤26を監査することもできる。   In addition, since the gradation of the translucent tablet 26 is also seen in a transmission image of parallel light transmitted through the mount area 62, the translucent tablet 26 is audited regardless of whether the mount area 62 is present in the medicine package 21. You can also

本発明の錠剤監査装置は、調剤作業を行わなければならない薬局や病院施設等で有用である。   The tablet inspection device of the present invention is useful in pharmacies, hospital facilities, and the like that must perform dispensing operations.

11,91 錠剤監査装置
12 カメラ
13,83 照明部
14 載置台
15,93 画像処理部
16 監査部
17 表示部
18 明度調整部
19 差分画像生成部
21,61 薬包体
23 透明板
24 ガイド部
25 不透明錠剤
25a 不透明錠剤部分
26 半透明錠剤
26a,26b,99 半透明錠剤部分
31,84 発光部
32 平行光フィルタ部
32a 透過帯
32b 吸収帯
32c,32d 積層体
33,86 切替部
33a ガイド部
33b ラック
33c アクチュエータ
33d 切替制御部
35 不透明錠剤計数部
36 半透明錠剤計数部
37 判定部
38 記録部
41,42,66,67 透過画像
43 差分画像
62 台紙領域
63 非台紙領域
85 液晶フィルタ部
DESCRIPTION OF SYMBOLS 11,91 Tablet inspection apparatus 12 Camera 13,83 Illumination part 14 Mounting base 15,93 Image processing part 16 Inspection part 17 Display part 18 Lightness adjustment part 19 Difference image generation part 21,61 Medicine pack 23 Transparent board 24 Guide part 25 Opaque tablet 25a Opaque tablet part 26 Translucent tablet 26a, 26b, 99 Translucent tablet part 31, 84 Light emitting part 32 Parallel light filter part 32a Transmission band 32b Absorption band 32c, 32d Laminate 33,86 Switching part 33a Guide part 33b Rack 33c Actuator 33d Switching control unit 35 Opaque tablet counting unit 36 Translucent tablet counting unit 37 Judgment unit 38 Recording unit 41, 42, 66, 67 Transparent image 43 Difference image 62 Mount area 63 Non-mount area 85 Liquid crystal filter section

Claims (9)

半透明錠剤が封入された薬包体が載置される載置部と、
前記薬包体に拡散光又は平行光を照射する照明部と、
前記照明部からの光が照射された前記薬包体を撮影する撮影部と、
拡散光が照射された前記薬包体の拡散光の透過画像と、平行光が照射された前記薬包体の平行光の透過画像より差分画像を生成する画像処理部と、
前記画像処理部で生成された差分画像に基いて前記薬包体内の錠剤を監査する監査部と、を備える、
錠剤監査装置。
A placement section on which a medicine package in which a translucent tablet is enclosed is placed;
An illumination unit that irradiates the medicine pack with diffused light or parallel light;
An imaging unit for imaging the medicine pack irradiated with light from the illumination unit;
An image processing unit that generates a differential image from a transmitted image of diffused light of the medicine pack irradiated with diffused light and a transmitted image of parallel light of the medicine pack irradiated with parallel light;
An inspection unit that audits the tablets in the medicine package based on the difference image generated by the image processing unit,
Tablet inspection device.
前記監査部は、前記画像処理部で生成された差分画像に基いて、少なくとも前記薬包体内の半透明錠剤を監査する、
請求項1に記載の錠剤監査装置。
The inspection unit audits at least the translucent tablet in the medicine package based on the difference image generated by the image processing unit,
The tablet inspection device according to claim 1.
前記画像処理部は、
前記拡散光の透過画像及び前記平行光の透過画像の少なくとも一方の明度レベルの調整を行ない、前記拡散光の透過画像と前記平行光の透過画像との明度レベルを略同一にする明度調整部と、
少なくとも一方の明度レベルの調整が行なわれた前記拡散光の透過画像及び前記平行光の透過画像より差分画像を生成する差分画像生成部と、を有する、
請求項1又は2に記載の錠剤監査装置。
The image processing unit
A brightness adjustment unit that adjusts the brightness level of at least one of the diffused light transmission image and the parallel light transmission image, and makes the brightness level of the diffused light transmission image and the parallel light transmission image substantially the same; ,
A difference image generation unit that generates a difference image from the diffused light transmission image and the parallel light transmission image in which at least one brightness level is adjusted,
The tablet inspection device according to claim 1 or 2.
前記監査部は、
前記差分画像における半透明錠剤部分を検出し前記半透明錠剤の個数を算出する半透明錠剤計数部と、
前記半透明錠剤計数部で算出された前記半透明錠剤の個数より前記薬包体に適切な半透明錠剤の個数が封止されているか否かを判定する判定部と、を備える、
請求項1から3のいずれか1項に記載の錠剤監査装置。
The audit department
A translucent tablet counting unit for detecting a translucent tablet part in the difference image and calculating the number of the translucent tablets;
A determination unit that determines whether or not the number of translucent tablets suitable for the medicine package is sealed from the number of translucent tablets calculated by the translucent tablet counting unit,
The tablet inspection device according to any one of claims 1 to 3.
前記照明部は、
拡散光を発する発光部と、
前記拡散光を平行光に変換する平行光フィルタ部と、
前記平行光フィルタ部を前記発光部と前記薬包体の間で移動させる切替部と、を有する、
請求項1から4のいずれか1項に記載の錠剤監査装置。
The illumination unit is
A light emitting unit that emits diffused light;
A parallel light filter that converts the diffused light into parallel light;
A switching unit that moves the parallel light filter unit between the light emitting unit and the medicine pack,
The tablet inspection device according to any one of claims 1 to 4.
前記照明部は、
平行光を発する発光部と、
前記平行光を拡散光に変換する拡散光フィルタ部と、
前記拡散光フィルタ部を前記発光部と前記薬包体の間で移動させる切替部と、を有する、
請求項1から4のいずれか1項に記載の錠剤監査装置。
The illumination unit is
A light emitting unit that emits parallel light;
A diffused light filter unit for converting the parallel light into diffused light;
A switching unit that moves the diffused light filter unit between the light emitting unit and the medicine pack,
The tablet inspection device according to any one of claims 1 to 4.
前記照明部は、
拡散光又は平行光を発する発光部と、
電圧を印加すると液晶の配向状態が変化する液晶フィルタ部と、
前記液晶フィルタ部へ印加する電圧のオンオフの切り替えを行なう切替部と、を備える、
請求項1から4のいずれか1項に記載の錠剤監査装置。
The illumination unit is
A light emitting unit that emits diffused light or parallel light;
A liquid crystal filter portion in which the alignment state of the liquid crystal changes when a voltage is applied;
A switching unit that switches on and off the voltage applied to the liquid crystal filter unit,
The tablet inspection device according to any one of claims 1 to 4.
前記明度調整部は、前記薬包体の非台紙領域と台紙領域とを切り分けた後、薬包体の透過画像に対して前記非台紙領域と台紙領域とを分けて明度調整を行なう、
請求項3に記載の錠剤監査装置。
The brightness adjustment unit separates the non-mounting area and the mounting area of the medicine package, and then adjusts the brightness by dividing the non-mounting area and the mounting area with respect to the transmission image of the medicine package.
The tablet inspection device according to claim 3.
前記画像処理部は、前記差分画像に対してオープニング処理を行なう、
請求項1から8のいずれか1項に記載の錠剤監査装置。
The image processing unit performs an opening process on the difference image.
The tablet inspection device according to any one of claims 1 to 8.
JP2012008853A 2012-01-19 2012-01-19 Tablet checking apparatus Pending JP2013148454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012008853A JP2013148454A (en) 2012-01-19 2012-01-19 Tablet checking apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012008853A JP2013148454A (en) 2012-01-19 2012-01-19 Tablet checking apparatus

Publications (1)

Publication Number Publication Date
JP2013148454A true JP2013148454A (en) 2013-08-01

Family

ID=49046076

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012008853A Pending JP2013148454A (en) 2012-01-19 2012-01-19 Tablet checking apparatus

Country Status (1)

Country Link
JP (1) JP2013148454A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015170762A1 (en) * 2014-05-09 2015-11-12 株式会社湯山製作所 Drug sorting device
JP2018084429A (en) * 2016-11-21 2018-05-31 株式会社ブレイン Article identification device including indirect illumination light source
CN108327934A (en) * 2018-01-04 2018-07-27 深圳中科华驰科技有限公司 Medicine inspection method during automatic packet medicine
US10217012B2 (en) 2013-09-30 2019-02-26 Fujifilm Corporation Drug recognition device and method
KR102271342B1 (en) * 2020-06-15 2021-06-30 창성소프트젤 주식회사 the capsule inspection system and method

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10217012B2 (en) 2013-09-30 2019-02-26 Fujifilm Corporation Drug recognition device and method
WO2015170762A1 (en) * 2014-05-09 2015-11-12 株式会社湯山製作所 Drug sorting device
JP2018138199A (en) * 2014-05-09 2018-09-06 株式会社湯山製作所 Medicine sorting device
US10226399B2 (en) 2014-05-09 2019-03-12 Yuyama Mfg. Co., Ltd. Medicine sorting apparatus
TWI673048B (en) * 2014-05-09 2019-10-01 日商湯山製作所股份有限公司 Drug sorting device
JP2018084429A (en) * 2016-11-21 2018-05-31 株式会社ブレイン Article identification device including indirect illumination light source
CN108327934A (en) * 2018-01-04 2018-07-27 深圳中科华驰科技有限公司 Medicine inspection method during automatic packet medicine
KR102271342B1 (en) * 2020-06-15 2021-06-30 창성소프트젤 주식회사 the capsule inspection system and method
WO2021256789A1 (en) * 2020-06-15 2021-12-23 창성소프트젤 주식회사 Capsule inspection system and method

Similar Documents

Publication Publication Date Title
JP5414917B2 (en) Tablet inspection device and tablet inspection method
EP3000458B1 (en) Pill inspection device and pill inspection method
JP5496348B2 (en) Tablet inspection apparatus and tablet inspection method using the same
JP5747150B2 (en) Tablet inspection device and tablet inspection method
JP6100136B2 (en) Drug recognition apparatus and method
CN100565195C (en) Irregular defect detecting method of figure and device
JP2013148454A (en) Tablet checking apparatus
JP6199042B2 (en) Container inspection equipment
US20070296963A1 (en) Methods and Apparatus for Inspecting the Sealing and Integrity of Blister Packages
JP4523474B2 (en) Defect inspection device and PTP packaging machine
JP2010191823A (en) Genuineness determination method for printing medium, image processing inspection system suitable therefor, and printing medium
TWI455046B (en) Counting device and counting method
JP2012022455A (en) Image processing inspection system of printing medium, genuineness determination method of printing medium and imaging apparatus suitable therefor
JP4048848B2 (en) Foreign object detection device in container and foreign object detection method in container
JP2006300875A (en) Liquid level detecting method, liquid amount detecting method, liquid level detector, liquid amount detector, and dispensing device
JP4472499B2 (en) Defect inspection device and PTP packaging machine
CN210109904U (en) Banknote checking device
WO2019193924A1 (en) Drug determination device and drug determination method
JP6823484B2 (en) Image collection device, coin-like medium processing machine and image collection method
WO2017145779A1 (en) Valuable document identification apparatus, valuable document processor, image sensor unit, and method for detecting optical variable element area
JP2001228100A (en) Apparatus and method for inspecting transparent material or matter wrapped with transparent material
JP2011158396A (en) Liquid container inspection device
JP7375049B2 (en) Image processing device and method
WO2023089954A1 (en) Glass bottle bottom inspection device
JP2017106824A (en) Visual inspection device