JP2012078265A - Pill inspection device and pill inspection method - Google Patents

Pill inspection device and pill inspection method Download PDF

Info

Publication number
JP2012078265A
JP2012078265A JP2010225339A JP2010225339A JP2012078265A JP 2012078265 A JP2012078265 A JP 2012078265A JP 2010225339 A JP2010225339 A JP 2010225339A JP 2010225339 A JP2010225339 A JP 2010225339A JP 2012078265 A JP2012078265 A JP 2012078265A
Authority
JP
Japan
Prior art keywords
tablet
image
unit
label
illumination
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.)
Granted
Application number
JP2010225339A
Other languages
Japanese (ja)
Other versions
JP5747150B2 (en
Inventor
Takanobu Tanimoto
貴頌 谷本
Makoto Goto
誠 後藤
Yoshihiko Matsukawa
善彦 松川
Hitoshi Yamashita
仁 山下
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 JP2010225339A priority Critical patent/JP5747150B2/en
Publication of JP2012078265A publication Critical patent/JP2012078265A/en
Application granted granted Critical
Publication of JP5747150B2 publication Critical patent/JP5747150B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Medical Preparation Storing Or Oral Administration Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To solve the problem that a conventional pill inspection device leaves a part of a display label in an inspection image even when removal of the display label by binarization is attempted to be performed.SOLUTION: A pill inspection device 11 is constituted by being provided with: a placement base 12 for loading a chartula cartridge 21 to which a display label with transparency is applied; a reflection illumination part 13; a transparent illumination part 14 which illuminates the placement base 12 from the opposite side of the reflection illumination part 13; a camera part 15 which photographs a reflected image and photographs a transmission image; a differential image generation part 18 which takes difference between the reflected image and the transmission image to generate a differential image; a separation degree calculation part 16 which calculates a separation degree showing whether or not a pill area and a label area of the differential images are clearly separated from each other when the differential image is binarized; and a brightness adjustment part 17 which changes a level value of a transparent illumination level of the transparent illumination part 14 to be adjusted to a level value of an operation level at which the separation degree to be obtained from the separation degree calculation part 16 is equal to or less than a predetermined value or the minimum value.

Description

本発明は、薬包体に封入された錠剤の監査を支援する錠剤監検査装置および錠剤検査方法に関する。   The present invention relates to a tablet supervision inspection apparatus and a tablet inspection method for supporting an inspection of a tablet enclosed in a medicine package.

病院施設、薬局等では、処方箋に対して正確な調剤作業を行わなければならない。そのために、調剤作業の後に調剤の監査が行われている。例えば、錠剤分包機より錠剤を区分封入した薬包体に対しては、光透過性のある薬包体において表示ラベルを除去する錠剤検査装置が提案されている。   In hospital facilities, pharmacies, etc., accurate dispensing work must be performed on prescriptions. Therefore, the dispensing audit is performed after the dispensing operation. For example, a tablet inspection apparatus that removes a display label from a light-transmitting medicine package has been proposed for a medicine package in which tablets are enclosed by a tablet packaging machine.

図14は、従来の錠剤検査装置の斜視図である。   FIG. 14 is a perspective view of a conventional tablet inspection apparatus.

錠剤検査装置1は、カメラ3で撮影された薬包体2の透過画像を二値化することにより、薬包体2に施された表示ラベルを除去して検査画像を生成する。   The tablet inspection apparatus 1 binarizes the transmission image of the medicine package 2 taken by the camera 3 to remove the display label applied to the medicine package 2 and generate an inspection image.

錠剤検査装置1は、検査位置の薬包体2を撮影するカメラ3と、カメラ3の下方位置に配置した照明器6と、カメラ3で撮影された濃淡のある透過画像を画像処理する画像処理部4と、画像処理部4に接続したディスプレイ5とを有する。   The tablet inspection device 1 performs image processing on a camera 3 that captures the medicine pack 2 at the inspection position, an illuminator 6 that is disposed below the camera 3, and a shaded transmission image captured by the camera 3. And a display 5 connected to the image processing unit 4.

そして、画像処理部4は、カメラ3で撮影された透過画像を取り込んだ後、透過画像を所定の閾値で二値化し、二値化画像を得る。続いて、二値化画像に対して収縮および膨張からなるノイズ除去処理を施して、薬包体2に施された表示ラベルの除去を行なう。そして、表示ラベルを除去した検査画像をディスプレイ5に表示する。   Then, the image processing unit 4 captures the transmission image captured by the camera 3, and then binarizes the transmission image with a predetermined threshold value to obtain a binary image. Subsequently, a noise removal process including contraction and expansion is performed on the binarized image, and the display label applied to the medicine package 2 is removed. Then, the inspection image from which the display label is removed is displayed on the display 5.

ここで、透過画像を二値化する際に特定の閾値を採用した場合、薬包体に用いる薬包紙の種類や照明状態によって適切な二値化が困難な場合がある。   Here, when a specific threshold value is adopted when binarizing the transmission image, it may be difficult to appropriately binarize depending on the type of medicine-wrapping paper used for the medicine package and the illumination state.

そのために、錠剤検査装置1は、透過画像の二値化行程においては、二値化画像にラベリングを施し、これによって得られるラベル数を所定の基準値と比較して、ラベル数が基準値を上回っているときは、二値化の際の閾値をラベル数減少方向に変化させる。例えば、薬包体内には通常、数個〜20個の錠剤が封入されているとすれば、画像処理装置4の基準値は20とする。   Therefore, in the binarization process of the transmission image, the tablet inspection apparatus 1 performs labeling on the binarized image, compares the number of labels obtained by this with a predetermined reference value, and the number of labels becomes the reference value. If it exceeds the threshold, the threshold for binarization is changed in the direction of decreasing the number of labels. For example, if several to 20 tablets are normally enclosed in the medicine package, the reference value of the image processing device 4 is 20.

これによって、ラベル数が基準値を上回っている場合は、ラベル数が減少する方向に変化させて、閾値を修正する。ラベル数が基準値以下になるまで閾値を修正することで、適切な閾値が設定される。そして、錠剤検査装置1は、カメラ3を用いて撮影した透過画像をこの閾値で二値化処理すると、表示ラベルを除去した検査画像を生成することができる(例えば、特許文献1参照)。   As a result, when the number of labels exceeds the reference value, the threshold value is corrected by changing the number of labels in a decreasing direction. An appropriate threshold value is set by correcting the threshold value until the number of labels becomes equal to or less than the reference value. And the tablet inspection apparatus 1 can produce | generate the test | inspection image which removed the display label, if the transmission image image | photographed using the camera 3 is binarized with this threshold value (for example, refer patent document 1).

特開平9−231342号公報Japanese Patent Laid-Open No. 9-231342

しかしながら、従来の錠剤検査装置1によって透過画像を二値化させると、検査画像に表示ラベルの一部が残ったり、錠剤の外形形状に欠けが生じてしまうことがある。錠剤の外形形状の欠けは、透過画像における錠剤の領域の明度が中心より周縁の方が高くなる等が原因だと考えられる。表示ラベルの一部が残るのは、錠剤の周縁と表示ラベルとの明度が同じになることがあるためだと考えられる。   However, when the transmission image is binarized by the conventional tablet inspection apparatus 1, a part of the display label may remain in the inspection image or the outer shape of the tablet may be chipped. It is considered that the lack of the outer shape of the tablet is caused by the fact that the brightness of the tablet region in the transmission image is higher at the periphery than at the center. The reason why a part of the display label remains is considered that the brightness of the peripheral edge of the tablet and the display label may be the same.

すなわち、従来の錠剤検査装置1は、二値化による表示ラベルの除去を行なうときに、表示ラベルの一部が検査画像に残ったり、錠剤の外形形状に欠けが生じてしまうという課題を有していた。   That is, the conventional tablet inspection apparatus 1 has a problem that when the display label is removed by binarization, a part of the display label remains in the inspection image or the outer shape of the tablet is missing. It was.

本発明は、上記従来の課題を解決するためのものであり、表示ラベルを除去するときに、表示ラベルの残りや錠剤の欠けを防止することのできる差分画像を生成するための錠剤検査装置および錠剤検査方法を提供することを目的とする。   The present invention is to solve the above-described conventional problems, and when removing a display label, a tablet inspection apparatus for generating a differential image capable of preventing the remainder of the display label and chipping of the tablet, and An object is to provide a tablet inspection method.

上記課題を解決するために、本発明の錠剤検査装置は、透過性を有する表示ラベルが施された薬包体を載置する載置台と、前記載置台を照らす反射照明部と、前記載置台を挟んで前記反射照明部の反対側より前記載置台を照らす透過照明部と、カメラ部と、前記反射照明部で照らされた前記薬包体を前記カメラ部で撮影した反射画像と、前記透過照明部で照らされた前記薬包体を前記カメラ部で撮影した透過画像と、の差分から差分画像を生成する差分画像生成部と、二値化された前記差分画像の錠剤領域とラベル領域との分離度を算出する分離度算出部と、前記分離度算出部より得られる分離度が所定の値以下になるように、前記透過照明部,前記反射照明部,前記カメラ部および前記差分画像生成部の少なくとも1つの作動状態を調整する明度調整部と、を備えたことを特徴とする。   In order to solve the above problems, a tablet inspection apparatus according to the present invention includes a mounting table on which a medicine package with a display label having transparency is mounted, a reflective illumination unit that illuminates the mounting table, and the mounting table. A transmission illumination unit that illuminates the mounting table from the opposite side of the reflection illumination unit across the camera, a camera unit, a reflection image obtained by photographing the medicine pack illuminated by the reflection illumination unit with the camera unit, and the transmission A difference image generation unit that generates a difference image from a difference between the transmission image obtained by photographing the medicine pack illuminated by the illumination unit with the camera unit, and a tablet region and a label region of the binarized difference image A degree-of-separation calculation unit, and the transmission illumination unit, the reflection illumination unit, the camera unit, and the differential image generation so that the degree of separation obtained from the degree-of-separation calculation unit is a predetermined value or less. Adjust at least one operating state of the part Characterized by comprising a brightness adjusting unit.

また、上記課題を解決するために、本発明の錠剤検査方法は、透過性を有する表示ラベルが施された薬包体を載置する載置台と、前記載置台を照らす反射照明部と、前記載置台を挟んで前記反射照明部の反対側より前記載置台を照らす透過照明部と、を備えた錠剤検査装置を用いた錠剤検査方法であって、前記反射照明部で照らした状態で前記薬包体をカメラ部で撮影した反射画像を取得する反射画像取得ステップと、透過照明部で照らした状態で前記薬包体を前記カメラ部で撮影し透過画像を取得する透過画像取得ステップと、前記反射画像と前記透過画像との差分から差分画像生成部で差分画像を生成する差分画像生成ステップと、二値化した前記差分画像の錠剤領域とラベル領域の分離度を算出する分離度算出ステップと、前記分離度が所定の値以下になるように、前記透過照明部,前記反射照明部,前記カメラ部および前記差分画像生成部の少なくとも1つの作動状態を調整する明度調整ステップと、を有することを特徴とする。   In order to solve the above problems, the tablet inspection method of the present invention includes a mounting table on which a medicine package with a display label having transparency is mounted, a reflective illumination unit that illuminates the mounting table, and a front And a transmission illumination unit that illuminates the previous mounting table from the opposite side of the reflective illumination unit across the mounting table, the tablet inspection method using a tablet inspection device, wherein the medicine in the state illuminated by the reflective illumination unit A reflection image acquisition step of acquiring a reflection image obtained by photographing the package with the camera unit; a transmission image acquisition step of acquiring the transmission image by photographing the medicine package with the camera unit in a state illuminated by the transmission illumination unit; A difference image generation step of generating a difference image by a difference image generation unit from a difference between the reflected image and the transmission image; and a degree of separation calculation step of calculating a degree of separation between the binarized tablet region and the label region of the difference image; , The degree of separation To be equal to or less than the predetermined value, the transmitting illumination unit, the reflection illumination unit, characterized by having a a brightness adjustment step of adjusting at least one operating condition of the camera unit and the difference image generation unit.

本発明は、差分画像を用いて二値化処理を行うことで、錠剤の外形形状に欠けや、表示ラベルの残りがが生じることなく表示ラベルを除去することができる。   In the present invention, the binarization process is performed using the difference image, whereby the display label can be removed without the lack of the outer shape of the tablet or the remaining display label.

本発明の実施の形態1における錠剤検査装置の概略構成図1 is a schematic configuration diagram of a tablet inspection device according to Embodiment 1 of the present invention. 本実施の形態1における差分画像のヒストグラムを示す図The figure which shows the histogram of the difference image in this Embodiment 1. 本実施の形態1における照明レベルに対する錠剤明度とラベル明度の変化を示す図であり、(a)透過画像の明度変化を示す図、(b)反射画像の明度変化を示す図It is a figure which shows the change of the tablet brightness and label brightness with respect to the illumination level in this Embodiment 1, (a) The figure which shows the brightness change of a transmitted image, (b) The figure which shows the brightness change of a reflected image 本実施の形態1におけるカメラで撮影した薬包体の画像を示す図であり、(a)反射画像を示す図、(b)透過画像を示す図It is a figure which shows the image of the medicine package which was image | photographed with the camera in this Embodiment 1, (a) The figure which shows a reflected image, The figure which shows a (b) transmission image 本実施の形態1における薬包体の差分画像を示す図The figure which shows the difference image of the medicine package in this Embodiment 1. 本実施の形態1における曲面を持つ錠剤の各画像における明度を示す図であり、(a)カプセル型の錠剤を示す図、(b)錠剤の反射画像における画素ごとの明度を示す図、(c)錠剤の透過画像における画素ごとの明度を示す図、(d)錠剤の差分画像における画素ごとの明度を示す図It is a figure which shows the lightness in each image of the tablet with a curved surface in this Embodiment 1, (a) The figure which shows a capsule-type tablet, (b) The figure which shows the lightness for every pixel in the reflective image of a tablet, (c ) A diagram showing the brightness for each pixel in the transmission image of the tablet, (d) a diagram showing the brightness for each pixel in the difference image of the tablet 本実施の形態1における薬包体の差分画像を二値化した差分二値化画像を示す図The figure which shows the difference binarization image which binarized the difference image of the medicine pack in this Embodiment 1. 本実施の形態1における薬包体の透過画像を二値化した薬包体の透過二値化画像を示す図The figure which shows the transmission binarized image of the medicine pack which binarized the transmission image of the medicine pack in this Embodiment 1. FIG. 本実施の形態1における薬包体の差分二値化画像および透過二値化画像より生成した交差領域画像を示す図The figure which shows the cross | intersection area | region image produced | generated from the difference binarized image and transparent binarized image of the medicine pack in this Embodiment 1. 本実施の形態1における反射画像と交差領域画像を合成した薬包体の合成画像を示す図The figure which shows the synthetic | combination image of the medicine pack which synthesize | combined the reflection image and intersection area | region image in this Embodiment 1. FIG. 本実施の形態1における錠剤検査装置の照明調整手順を示すフローチャートThe flowchart which shows the illumination adjustment procedure of the tablet inspection apparatus in this Embodiment 1. 本実施の形態1におけるサンプル薬包体を示す図The figure which shows the sample medicine pack in this Embodiment 1. 本実施の形態1における錠剤検査装置を用いて行う錠剤検査の手順を示すフローチャートThe flowchart which shows the procedure of the tablet test | inspection performed using the tablet test | inspection apparatus in this Embodiment 1. 従来の錠剤検査装置を示す図The figure which shows the conventional tablet inspection device

以下、本発明の実施の形態について、図面を参照しながら説明する。なお、同じ構成要素には同じ符号を付しており、説明を省略する場合もある。また、図面は理解しやすくするために、それぞれの構成要素を主体に模式的に示している。   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 mainly.

(実施の形態1)
図1は、本発明の実施の形態1における錠剤検査装置11の概略構成図である。錠剤検査装置11は、表示ラベルを有する薬包体21を撮影した画像より表示ラベルを除去して検査画像を生成する装置である。そして、薬包体21を撮影した画像より表示ラベルを除去するため、錠剤検査装置11は、差分画像において分離度が小さくなるように透過照明部14を適切な透過照明レベル値に調整する。
(Embodiment 1)
FIG. 1 is a schematic configuration diagram of a tablet inspection apparatus 11 according to Embodiment 1 of the present invention. The tablet inspection apparatus 11 is an apparatus that generates a test image by removing a display label from an image obtained by photographing a medicine pack 21 having a display label. And in order to remove a display label from the image which image | photographed the medicine package 21, the tablet test | inspection apparatus 11 adjusts the permeation | transmission illumination part 14 to a suitable permeation | transmission illumination level value so that the degree of separation may become small in a difference image.

ここで、分離度とは、差分画像において、錠剤領域とラベル領域の明度分布が、明確に分離可能かを示す指標である。   Here, the degree of separation is an index indicating whether the brightness distribution of the tablet area and the label area can be clearly separated in the difference image.

なお、透過照明レベルとは照明光の強度を示す値であり、透過照明部14の最小強度を透過照明レベルがレベル1だとし、透過照明部14の最大強度を透過照明レベルがレベル16だとして、透過照明レベルを変化させると線形に照明光の強度が増加する。   The transmitted illumination level is a value indicating the intensity of the illumination light. The minimum intensity of the transmitted illumination unit 14 is assumed to be a transmitted illumination level of level 1, and the maximum intensity of the transmitted illumination unit 14 is assumed to be a transmitted illumination level of level 16. When the transmitted illumination level is changed, the intensity of the illumination light increases linearly.

また、錠剤領域とは撮影した画像の中で、錠剤を示す部分の領域である。ラベル領域とは撮影した画像の中で、表示ラベルを示す部分の領域である。   In addition, the tablet area is an area of a portion indicating a tablet in a photographed image. The label area is an area of a portion indicating a display label in the photographed image.

図1に示すように、錠剤検査装置11は、表示ラベルが形成された薬包体21を載置する載置台12と、載置台12を白色光で照らす反射照明部13と、反射照明部13の反対側より載置台12を白色光で照らす透過照明部14と、カメラ部15と、差分画像生成部18と、分離度算出部16と、明度調整部17とを備える。   As shown in FIG. 1, the tablet inspection apparatus 11 includes a mounting table 12 on which a medicine package 21 on which a display label is formed is mounted, a reflective illumination unit 13 that illuminates the mounting table 12 with white light, and a reflective illumination unit 13. A transmissive illumination unit 14 that illuminates the mounting table 12 with white light from the opposite side, a camera unit 15, a difference image generation unit 18, a separation degree calculation unit 16, and a brightness adjustment unit 17.

本実施の形態1の薬包体21は、透明フィルムと薄い白色フィルムの間に錠剤を封入したものである。そして、白色フィルムは、表示ラベルを透過性のある黒色インクで印刷された印字部を備える。ここで、表示ラベルとは、患者名、薬剤の服用時間、薬包番号、バーコードなどである。   The medicine package 21 according to the first embodiment is obtained by encapsulating a tablet between a transparent film and a thin white film. And a white film is provided with the printing part which printed the display label with the transparent black ink. Here, the display label includes a patient name, a medicine taking time, a medicine package number, a barcode, and the like.

載置台12は、検査時、薬包体21を置くための台である。載置台12は、端部に設けたガイド部20と、カメラ部15および透過照明部14の間に位置する透明アクリル板22と、を有する。   The mounting table 12 is a table for placing the medicine pack 21 at the time of inspection. The mounting table 12 includes a guide unit 20 provided at an end, and a transparent acrylic plate 22 positioned between the camera unit 15 and the transmission illumination unit 14.

ガイド部20は、内部に駆動ローラとガイドローラ(図示せず)を有する。そして、駆動ローラとガイドローラの間に薬包体21の端部を挟み、駆動ローラを回転させることで、薬包体21をガイド部20に沿って移動させる。   The guide part 20 has a driving roller and a guide roller (not shown) inside. Then, the end portion of the medicine pack 21 is sandwiched between the drive roller and the guide roller, and the drive roller is rotated to move the medicine pack 21 along the guide portion 20.

また、透明アクリル板22は透明板であり、下方にある透過照明部14で発生する光を通す。透明アクリル板22の位置は、カメラ部15で撮影する薬包体21を置く位置でもある。   Moreover, the transparent acrylic board 22 is a transparent board, and lets the light which generate | occur | produces in the transmission illumination part 14 below. The position of the transparent acrylic plate 22 is also a position where the medicine pack 21 photographed by the camera unit 15 is placed.

カメラ部15は、載置台12の透明アクリル板22に載った薬包体21を反射照明部13で照らして反射画像を撮影する。また、カメラ部15は、透過照明部14で照らして透過画像を撮影する。   The camera unit 15 shoots a reflected image by illuminating the medicine package 21 placed on the transparent acrylic plate 22 of the mounting table 12 with the reflection illumination unit 13. Further, the camera unit 15 captures a transmission image by illuminating with the transmission illumination unit 14.

この時、薬包体21の透明フィルムはカメラ部15側を向いている。また、カメラ部15の撮影レンズは、筒状の反射照明部13の開口部の上方にある。また、カメラ部15は、載置台12を介して透過照明部14に対向する位置にある。   At this time, the transparent film of the medicine pack 21 faces the camera unit 15 side. The photographing lens of the camera unit 15 is above the opening of the cylindrical reflection illumination unit 13. The camera unit 15 is located at a position facing the transmission illumination unit 14 with the mounting table 12 interposed therebetween.

差分画像生成部18は、反射画像と透過画像の差分を取り差分画像を生成する。差分画像を形成する画素の明度は、反射画像の画素より透過画像の画素を差し引いた明度差である。   The difference image generation unit 18 takes the difference between the reflection image and the transmission image and generates a difference image. The brightness of the pixels forming the difference image is a brightness difference obtained by subtracting the pixels of the transmission image from the pixels of the reflection image.

分離度算出部16は、差分画像を二値化した時に、差分画像の錠剤領域とラベル領域を明確に分離できたかを示す分離度を算出する。   The degree-of-separation calculating unit 16 calculates a degree of separation indicating whether the tablet area and the label area of the difference image have been clearly separated when the difference image is binarized.

明度調整部17は、透過照明部14の作動レベルである透過照明レベルを変更し、透過照明部14からの照明光の強度を変更させることで、透過画像の錠剤領域と表示ラベル領域の明度を変化させる。これにより、差分画像の明度も変化する。この特性に基づいて、差分画像の明度分布から分離度算出部16より得られる分離度が最小の値である透過照明レベルに調整する。   The brightness adjustment unit 17 changes the transmitted illumination level, which is the operation level of the transmitted illumination unit 14, and changes the intensity of the illumination light from the transmitted illumination unit 14, thereby changing the brightness of the tablet region and the display label region of the transmitted image. Change. Thereby, the brightness of a difference image also changes. Based on this characteristic, the transmitted illumination level is adjusted so that the degree of separation obtained from the degree-of-separation calculating unit 16 is the minimum value from the brightness distribution of the difference image.

なお、差分画像における錠剤領域とラベル領域の分離度とは、差分画像の明度ヒストグラムにおける、錠剤を示す分布と表示ラベルを示す分布の分かれ具合である。ここで、分離度とは、一般に、ある集合を2つのクラスに分割した場合、クラス内の分散をクラス外の分散で除算した値である。上記の2つのクラスが、完全に分離している場合、クラス内分散は小さく、クラス外分散が大きくなるため、分離度は小さくなり、完全に分離されていない場合、クラス内分散は大きく、クラス外分散が小さくなるため、分離度は大きくなる。   Note that the degree of separation between the tablet area and the label area in the difference image is the degree of separation between the distribution indicating the tablet and the distribution indicating the display label in the brightness histogram of the difference image. Here, the degree of separation is generally a value obtained by dividing the variance within a class by the variance outside the class when a certain set is divided into two classes. When the above two classes are completely separated, the variance within the class is small and the variance outside the class is large, so the degree of separation is small, and when the two classes are not completely separated, the variance within the class is large and the class Since the outer dispersion is reduced, the degree of separation is increased.

図2は本実施の形態1における差分画像のヒストグラムを示す図である。図2において、横軸は、領域における明度を示し、縦軸は、領域における画素数を示す。   FIG. 2 is a diagram showing a histogram of the difference image in the first embodiment. In FIG. 2, the horizontal axis indicates the lightness in the region, and the vertical axis indicates the number of pixels in the region.

分離度を算出する際にはクラスを分割するための閾値が必要となるが、各クラスのダイナミックレンジを広くとるために、二値化の閾値を明度0とした場合、分離度算出部16は、差分画像より錠剤領域における画素の明度の平均値である錠剤明度およびラベル領域における画素の明度の平均値であるラベル明度を乗算した乗算値を算出する。   When calculating the degree of separation, a threshold value for dividing the class is required. However, in order to increase the dynamic range of each class, when the threshold value for binarization is 0, the degree-of-separation calculating unit 16 Then, a multiplication value obtained by multiplying the tablet brightness, which is the average value of the pixel brightness in the tablet area, and the label brightness, which is the average value of the pixel brightness in the label area, is calculated from the difference image.

この乗算値が最小である時、差分画像における錠剤領域とラベル領域の分離度は最小となる。なぜならば、明度調整部17において、透過照明部14の透過照明レベルを調整することで、反射画像の錠剤明度を透過画像の錠剤明度より低く、反射画像のラベル明度は透過画像のラベル明度より高く調整できる。そのため、この乗算値が最小である時は、明度0を中心として正負に大きく離れることを意味する事になり、前記クラス外の分散が最大となるため、二値化の閾値を明度0とした場合の分離度が最小となる。   When this multiplication value is minimum, the degree of separation between the tablet area and the label area in the difference image is minimum. This is because the brightness adjustment unit 17 adjusts the transmission illumination level of the transmission illumination unit 14 so that the tablet brightness of the reflection image is lower than the tablet brightness of the transmission image, and the label brightness of the reflection image is higher than the label brightness of the transmission image. Can be adjusted. Therefore, when this multiplication value is the minimum, it means that the value is largely separated from the positive and negative with the lightness 0 as the center, and the variance outside the class is the maximum, so the binarization threshold is set to the lightness 0. The degree of separation is minimal.

次に、透過照明部14の透過照明レベルを調整することで、反射画像の錠剤明度を透過画像の錠剤明度より低く、反射画像のラベル明度を透過画像のラベル明度より高く調整できる理由を、図3(a)(b)を用いて説明する。   Next, the reason why the tablet brightness of the reflected image can be adjusted lower than the tablet brightness of the transmitted image and the label brightness of the reflected image can be adjusted higher than the label brightness of the transmitted image by adjusting the transmitted illumination level of the transmitted illumination unit 14 is shown in FIG. This will be described with reference to 3 (a) and 3 (b).

図3(a)(b)は、本実施の形態1における照明レベルに対する錠剤明度とラベル明度の変化を示す図である。図3(a)は透過画像の明度変化を示す図であり、図3(b)は反射画像の明度変化を示す図である。   FIGS. 3A and 3B are diagrams showing changes in tablet brightness and label brightness with respect to the illumination level in the first embodiment. FIG. 3A is a diagram showing a change in the brightness of the transmitted image, and FIG. 3B is a diagram showing a change in the brightness of the reflected image.

図3(a)に示すように、透過画像における錠剤明度は、透過照明レベルに比例して高くなる。一方、透過画像におけるラベル明度は、錠剤明度に比べ急激に高くなる。これは、表示ラベルは透過性インクにより形成されているのに対して、錠剤は光を透過しないためである。そのため、ラベル明度と錠剤明度との間に大きな差がある。   As shown in FIG. 3A, the tablet brightness in the transmission image increases in proportion to the transmission illumination level. On the other hand, the label brightness in the transmission image is rapidly higher than the tablet brightness. This is because the display label is formed of a transparent ink, whereas the tablet does not transmit light. Therefore, there is a large difference between label brightness and tablet brightness.

一方、図3(b)に示すように、反射画像における錠剤明度は、反射照明レベルに比例して高くなる。同様に、反射画像におけるラベル明度も、反射照明レベルに比例して同程度の傾きで高くなる。   On the other hand, as shown in FIG. 3B, the tablet brightness in the reflected image increases in proportion to the reflected illumination level. Similarly, the label brightness in the reflected image also increases with the same slope in proportion to the reflected illumination level.

図3(a)(b)に示すように、照明レベルに対する錠剤明度とラベル明度の変化は、透過画像と反射画像によって異なる。ここで、透過画像において透過照明レベルが低い場合、錠剤明度は低くともラベル明度は高いことに着目する。すると、反射画像において、最適な反射照明レベルが存在する。最適な反射照明レベルとは、透過画像の錠剤明度より低い錠剤明度で、かつ、透過画像のラベル明度よりも高いラベル明度である。   As shown in FIGS. 3A and 3B, changes in tablet brightness and label brightness with respect to the illumination level differ depending on the transmission image and the reflection image. Here, it is noted that when the transmitted illumination level is low in the transmitted image, the label brightness is high even if the tablet brightness is low. Then, there is an optimum reflected illumination level in the reflected image. The optimum reflected illumination level is a tablet brightness that is lower than the tablet brightness of the transmission image and higher than the label brightness of the transmission image.

例えば、透過照明レベルがレベル4の時、反射照明レベルがレベル16であると、反射画像の錠剤明度は、透過画像の錠剤明度より低く、透過画像のラベル明度は、反射画像の錠剤明度よりも低くなる。   For example, when the transmitted illumination level is level 4 and the reflected illumination level is level 16, the tablet brightness of the reflected image is lower than the tablet brightness of the transmitted image, and the label brightness of the transmitted image is lower than the tablet brightness of the reflected image. Lower.

つまり、透過照明レベルと反射照明レベルを調整することで、反射画像の錠剤明度より透過画像の錠剤明度が低くなり、反射画像のラベル明度より透過画像のラベル明度が高く調整できる。そして、これらの反射画像および透過画像より生成される差分画像の錠剤明度は正値となりラベル明度は負値となり、錠剤明度とラベル明度は大きく分かれる。   That is, by adjusting the transmission illumination level and the reflection illumination level, the tablet brightness of the transmission image becomes lower than the tablet brightness of the reflection image, and the label brightness of the transmission image can be adjusted higher than the label brightness of the reflection image. And the tablet brightness of the difference image produced | generated from these reflected images and a transmission image becomes a positive value, a label brightness becomes a negative value, and a tablet brightness and a label brightness are divided | segmented largely.

よって、差分画像における錠剤明度と表示ラベルのラベル明度の分離度は小さくなり、二値化による画像処理を用いて表示ラベルの除去を行うことができる。   Therefore, the separation degree between the tablet lightness and the label lightness of the display label in the difference image becomes small, and the display label can be removed using image processing by binarization.

なお、図1に示すように、錠剤検査装置11は、さらに、二値化処理部25と、交差領域算出部26とを有する。そして、差分画像より薬包体21の表示ラベルおよび鏡面反射の除去を行い、錠剤の検査が行いやすい検査画像を生成する。この検査画像を、錠剤検査装置11に接続した表示部29に表示することで、より正確に薬包体21にある錠剤を監査することができる。   As shown in FIG. 1, the tablet inspection apparatus 11 further includes a binarization processing unit 25 and an intersection area calculation unit 26. Then, the display label and specular reflection of the medicine pack 21 are removed from the difference image, and an inspection image that facilitates tablet inspection is generated. By displaying this inspection image on the display unit 29 connected to the tablet inspection apparatus 11, the tablets in the medicine package 21 can be audited more accurately.

また、錠剤検査装置11は、錠剤カウント部27を有することで、検査画像より錠剤個数を算出し、薬包体21に適切な錠剤が入っているか否かを機械的に検査することもできる。   In addition, since the tablet inspection device 11 includes the tablet counting unit 27, the number of tablets can be calculated from the inspection image, and whether or not an appropriate tablet is contained in the medicine package 21 can be mechanically inspected.

また、錠剤検査装置11は、錠剤の配置場所と錠剤明度が既知のサンプル薬包体を使用することで、差分画像から得られる分離度を最小にする照明レベルに調整することができる。この場合は、錠剤検査装置11は、サンプル薬包体の錠剤位置情報およびラベル位置情報を記憶するサンプル位置情報記録部28を更に有し、分離度算出部16は、錠剤位置情報およびラベル位置情報を基にサンプル薬包体の錠剤領域およびラベル領域を特定し、錠剤領域とラベル領域の明度を用いて分離度を算出する。よって、サンプル薬包体の錠剤と表示ラベルとを取り間違えることがなく、正確に反射画像および透過画像における錠剤と表示ラベルを識別して、透過照明レベルの調整を行なうことができる。なお、錠剤の配置場所を既知にするためには、サンプル薬包体に錠剤を固定させておくことが考えられる。また、錠剤明度を既知にするためには、錠剤の外形形状を予め正確に求めておき、それに基づく明度を算出しておくことが考えられる。   Moreover, the tablet inspection apparatus 11 can adjust to the illumination level which makes the isolation | separation degree obtained from a difference image the minimum by using the sample arrangement | positioning medicine tablet body whose tablet arrangement | positioning location and tablet lightness are known. In this case, the tablet inspection apparatus 11 further includes a sample position information recording unit 28 that stores the tablet position information and label position information of the sample medicine pack, and the separation degree calculation unit 16 includes the tablet position information and label position information. The tablet region and the label region of the sample medicine package are specified based on the above, and the degree of separation is calculated using the brightness of the tablet region and the label region. Therefore, the tablet and the display label in the sample medicine pack are not mistaken, and the transmission illumination level can be adjusted by accurately identifying the tablet and the display label in the reflection image and the transmission image. In order to make the tablet location known, it is conceivable to fix the tablet to the sample medicine pack. In order to make the tablet lightness known, it is conceivable that the outer shape of the tablet is accurately obtained in advance and the lightness based on it is calculated.

次に、上述した反射画像および透過画像を用いて、表示ラベルを除去し検査画像を生成する際に用いる画像について、図4(a)〜図10を用いて説明する。   Next, an image used when generating the inspection image by removing the display label using the reflection image and the transmission image described above will be described with reference to FIGS.

図4(a)(b)は、本実施の形態1におけるカメラ部15で撮影した薬包体21の画像を示す図である。図4(a)は反射画像31を示す図であり、図4(b)は透過画像32を示す図である。   FIGS. 4A and 4B are diagrams showing images of the medicine pack 21 taken by the camera unit 15 according to the first embodiment. 4A is a diagram showing the reflected image 31, and FIG. 4B is a diagram showing the transmitted image 32.

図4(a)に示すように、反射画像31には、薬包体21に封入された錠剤を示す錠剤領域33と、薬包体21の表示ラベルを示すラベル領域34の画像とが、カラー画像として写っている。さらに、反射画像31には、薬包体21の透明フィルムによって、鏡面反射した白とび部35が存在する。白とび部35は、反射照明部13からの光により透明フィルム面で照明光が全て反射してしまう鏡面反射によって発生した領域である。白とび部35では、透明フィルムを透かして薬包体21の内部に照明光が届かなくなるため、白とび部35内に存在する錠剤の明度情報を見ることができない。反射照明部13はリング状の照明であって、反射照明部13によって薬包体21には周囲から光が照射される。また、錠剤(例えば、カプセル)は曲面を持つ。そのため、錠剤領域33の周縁は、錠剤領域33の中央に比べてやや明度が高くなっている。   As shown in FIG. 4A, the reflection image 31 includes a tablet region 33 showing a tablet enclosed in the medicine pack 21 and an image of a label region 34 showing a display label of the medicine pack 21 in color. It is shown as an image. Further, the reflected image 31 has a whiteout portion 35 that is mirror-reflected by the transparent film of the medicine pack 21. The whiteout portion 35 is a region generated by specular reflection in which the illumination light is totally reflected on the transparent film surface by the light from the reflective illumination portion 13. In the whiteout portion 35, since the illumination light does not reach the inside of the medicine package 21 through the transparent film, it is not possible to see the lightness information of the tablets existing in the whiteout portion 35. The reflection illumination unit 13 is ring-shaped illumination, and the medicine illumination body 21 is irradiated with light from the surroundings by the reflection illumination unit 13. A tablet (for example, a capsule) has a curved surface. Therefore, the peripheral edge of the tablet region 33 is slightly brighter than the center of the tablet region 33.

図4(b)に示すように、透過画像32には、錠剤領域33とラベル領域34の画像が濃淡画像として写っている。表示ラベルは、透過性インクより形成されているので、ラベル領域34には薄い影が写っている。錠剤は、光を通さないために、錠剤領域33には濃い影が写っている。そして、図4(b)の錠剤領域33は、濃淡のない影になっているが、実際には錠剤(例えば、カプセル)は曲面を持つため、錠剤領域33の周縁は錠剤領域33の中央に比べてやや明度が高い。また、透過画像32には、白色フィルム側より照明光が入るために反射画像31のように鏡面反射による白とび部35は存在しない。   As shown in FIG. 4B, in the transmission image 32, the images of the tablet region 33 and the label region 34 are shown as gray images. Since the display label is made of transmissive ink, a thin shadow appears in the label area 34. Since the tablet does not transmit light, the tablet region 33 has a dark shadow. The tablet region 33 in FIG. 4B is shaded without shading, but since the tablet (for example, capsule) actually has a curved surface, the periphery of the tablet region 33 is in the center of the tablet region 33. The brightness is slightly higher than that. Further, in the transmission image 32, since the illumination light enters from the white film side, the whiteout portion 35 caused by specular reflection does not exist unlike the reflection image 31.

ここで、従来手法でラベルを除去しようとした時には、二値化の際に周辺部が削れてしまう可能性が高い。それに対し、本実施の形態1のように図4(a)の反射画像31と図4(b)の透過画像32との差分画像を用いると、錠剤領域33の中央の明度と周辺部の明度差が小さくなるため、錠剤領域33の周縁の影響を小さくすることができる。   Here, when the label is to be removed by the conventional method, there is a high possibility that the peripheral portion is shaved during binarization. On the other hand, when the difference image between the reflection image 31 in FIG. 4A and the transmission image 32 in FIG. 4B is used as in the first embodiment, the lightness at the center of the tablet region 33 and the lightness at the peripheral portion. Since the difference is reduced, the influence of the peripheral edge of the tablet region 33 can be reduced.

図5は、本実施の形態1における薬包体21の差分画像36である。差分画像36では、錠剤領域33とラベル領域34の分離度は小さい。また、差分画像36において、錠剤領域33の明度は正の値であり、ラベル領域34の明度は負の値である。これは、反射画像31の錠剤明度より透過画像32の錠剤明度が低く、反射画像31のラベル明度より透過画像32のラベル明度が高くなるように、反射照明部13と透過照明部14との各照明レベルを調整しているためである。   FIG. 5 is a difference image 36 of the medicine pack 21 in the first embodiment. In the difference image 36, the degree of separation between the tablet region 33 and the label region 34 is small. In the difference image 36, the brightness of the tablet area 33 is a positive value, and the brightness of the label area 34 is a negative value. This is because the tablet lightness of the transmission image 32 is lower than the tablet lightness of the reflection image 31 and the label lightness of the transmission image 32 is higher than the label lightness of the reflection image 31. This is because the lighting level is adjusted.

また、差分画像36における錠剤領域33の画素ごとの明度は、透過画像32の錠剤領域33の明度のばらつきに比べると小さい。錠剤(例えば、カプセル)は曲面を持つために、照明光の反射によって透過画像32の錠剤領域33における明度は、錠剤領域33の中心部分の画素より周縁の画素が高い。   Further, the brightness of each pixel in the tablet area 33 in the difference image 36 is smaller than the variation in brightness of the tablet area 33 in the transmission image 32. Since a tablet (for example, a capsule) has a curved surface, the brightness in the tablet region 33 of the transmission image 32 is higher in the peripheral pixels than in the central portion of the tablet region 33 due to the reflection of illumination light.

図6(a)〜(d)は、曲面を持つ錠剤10の各画像における明度を示す図である。図6(a)はカプセル型の錠剤10を示す図であり、図6(b)は錠剤10の反射画像における画素ごとの明度を示す図であり、図6(c)は錠剤10の透過画像における画素ごとの明度を示す図であり、図6(d)は錠剤10の差分画像における画素ごとの明度を示す図である。   FIGS. 6A to 6D are diagrams showing the lightness in each image of the tablet 10 having a curved surface. 6A is a diagram showing the capsule-type tablet 10, FIG. 6B is a diagram showing the brightness for each pixel in the reflection image of the tablet 10, and FIG. 6C is a transmission image of the tablet 10. FIG. 6D is a diagram illustrating the brightness for each pixel in the difference image of the tablet 10.

図6(b)に示すように、カプセル型の錠剤10の反射画像における画素ごとの明度には、ばらつきがある。具体的には、錠剤10の中心部分の画素より周辺部分の画素の方が明度が高い。図6(c)に示すように、錠剤10の透過画像の錠剤領域の明度も、錠剤10の中心部分より周辺部分の方が高い。しかし、図6(d)に示すように差分画像では、このばらつきが抑えられている。   As shown in FIG. 6B, the brightness of each pixel in the reflected image of the capsule tablet 10 varies. Specifically, the pixels in the peripheral part have higher brightness than the pixels in the central part of the tablet 10. As shown in FIG. 6C, the brightness of the tablet region of the transmission image of the tablet 10 is also higher in the peripheral portion than in the central portion of the tablet 10. However, this variation is suppressed in the difference image as shown in FIG.

結果として、差分画像36における錠剤領域33の分離度は、透過画像32の錠剤領域33の分離度よりも小さくなり易い。   As a result, the separation degree of the tablet region 33 in the difference image 36 tends to be smaller than the separation degree of the tablet region 33 in the transmission image 32.

図7は、本実施の形態1における薬包体21の差分画像36を二値化した差分二値化画像37を示す図である。   FIG. 7 is a diagram showing a difference binarized image 37 obtained by binarizing the difference image 36 of the medicine pack 21 according to the first embodiment.

図7に示すように、明度の閾値を錠剤明度とラベル明度の間の所定の値に設定することで、ラベル領域34を除去することができる。   As shown in FIG. 7, the label region 34 can be removed by setting the lightness threshold value to a predetermined value between the tablet lightness and the label lightness.

ただし、差分二値化画像37には、白とび部35が残っている。薬包体21が鏡面反射の影響を受けることなく白とび部35が存在しなければ、この差分二値化画像37を検査画像として利用することができる。しかしながら、白とび部35が残っている場合、白とび部35の除去を行なう必要がある。実際の検査では、透明フィルムの状態を均一にすることは困難であるため、連続で薬包体21を検査していると、白とび部35が発生することになる。   However, the whiteout portion 35 remains in the difference binarized image 37. If the overburden part 35 does not exist without the medicine pack 21 being affected by the specular reflection, the difference binarized image 37 can be used as an inspection image. However, when the whiteout portion 35 remains, it is necessary to remove the whiteout portion 35. In the actual inspection, it is difficult to make the state of the transparent film uniform. Therefore, when the medicine pack 21 is inspected continuously, the overexposed portion 35 is generated.

白とび部35を除去するために、まず、図4(b)に示す透過画像32を二値化して、透過二値化画像を得る。   In order to remove the whiteout portion 35, first, the transmission image 32 shown in FIG. 4B is binarized to obtain a transmission binary image.

図8は、本実施の形態1における薬包体21の透過画像32を二値化した薬包体21の透過二値化画像46を示す図である。透過画像32は、鏡面反射の影響を受けていないため、透過画像32を二値化した透過二値化画像46には鏡面反射の影響はない。よって、透過二値化画像46に白とび部35は存在せず、錠剤領域33とラベル領域34だけが存在する。   FIG. 8 is a diagram showing a transmission binarized image 46 of the medicine pack 21 obtained by binarizing the transmission image 32 of the medicine pack 21 in the first embodiment. Since the transmission image 32 is not affected by the specular reflection, the transmission binarized image 46 obtained by binarizing the transmission image 32 is not affected by the specular reflection. Therefore, the whiteout portion 35 does not exist in the transmission binary image 46, and only the tablet region 33 and the label region 34 exist.

次に、透過二値化画像46の濃淡を反転する。つまり、錠剤領域33とラベル領域34の影を白く(明度を高く)、その他の部分を黒く(明度を低く)する。なお、透過二値化画像46に白とび部35はないので、透過二値化画像46の濃淡を反転した画像に白とび部35に相当する箇所はない。   Next, the density of the transmission binary image 46 is inverted. That is, the shadows of the tablet region 33 and the label region 34 are white (increased brightness), and the other portions are black (lower brightness). Note that since the whiteout portion 35 is not present in the transmission binary image 46, there is no portion corresponding to the whiteout portion 35 in the image obtained by inverting the density of the transmission binary image 46.

そして、透過二値化画像46を反転した反転画像と図7に示す差分二値化画像37の白色部分が重なる交差領域を算出し、交差領域画像を生成する。   Then, an intersecting area where the inverted image obtained by inverting the transparent binarized image 46 and the white portion of the difference binarized image 37 shown in FIG. 7 overlap is calculated, and an intersecting area image is generated.

図9は、本実施の形態1における薬包体21の差分二値化画像37および透過二値化画像46より生成した交差領域画像47を示す図である。   FIG. 9 is a diagram showing an intersecting region image 47 generated from the difference binarized image 37 and the transmission binarized image 46 of the medicine pack 21 in the first embodiment.

図9に示す交差領域画像47にある白い部分は、錠剤領域33である。なぜならば、差分二値化画像37と、透過二値化画像46の濃淡を反転した画像とで、錠剤領域33は白い部分になるためである。このように、交差領域画像47はラベル領域34の除去に加えて、白とび部35を除去しており、検査画像にある錠剤領域33の数を数えることで、薬包体21の中にある錠剤の数を数えることができる。さらに、錠剤の形状も判別することができる。   A white portion in the intersecting region image 47 shown in FIG. This is because the tablet region 33 is a white portion in the difference binarized image 37 and the image obtained by inverting the density of the transparent binarized image 46. Thus, in addition to the removal of the label area 34, the intersection area image 47 has the whiteout portion 35 removed, and the number of the tablet areas 33 in the inspection image is counted so that it is in the medicine pack 21. You can count the number of tablets. Furthermore, the shape of the tablet can also be determined.

なお、錠剤領域33の色彩を判別するために、反射画像31と交差領域画像47を合成した薬包体21の合成画像48を生成してもよい。   In addition, in order to discriminate the color of the tablet region 33, a composite image 48 of the medicine pack 21 obtained by combining the reflection image 31 and the cross region image 47 may be generated.

図10は、本実施の形態1における反射画像31と交差領域画像47を合成した薬包体21の合成画像48を示す図である。   FIG. 10 is a view showing a combined image 48 of the medicine pack 21 obtained by combining the reflected image 31 and the intersecting region image 47 in the first embodiment.

図10に示す合成画像48は、反射画像31と交差領域画像47とを重ね、交差領域画像47の錠剤領域33に相当する部分を、反射画像31より取り込んだものである。このように合成画像48を生成することで、ラベル領域34、白とび部35を除去した上で、錠剤領域33の色彩を判別することができる。   A composite image 48 illustrated in FIG. 10 is obtained by superimposing the reflection image 31 and the intersecting region image 47 and capturing the portion corresponding to the tablet region 33 of the intersecting region image 47 from the reflected image 31. By generating the composite image 48 in this way, it is possible to determine the color of the tablet region 33 after removing the label region 34 and the whiteout portion 35.

本実施の形態1の錠剤検査方法は、表示ラベルが施された薬包体21を反射照明部13で照らしてカメラ部15で撮影し反射画像31を取得する反射画像取得ステップと、薬包体21を透過照明部14で照らしてカメラ部15で撮影し透過画像32を取得する透過画像取得ステップと、を有する。さらに、反射画像31と透過画像32より差分画像生成部18で差分画像36を作成する差分画像生成ステップと、差分画像36を二値化した時に、差分画像36の錠剤領域33とラベル領域34を明確に分離できたかを示す分離度を算出する分離度算出ステップと、透過照明部14、反射照明部13、カメラ部15および差分画像生成部18の少なくとも1つの作動状態(作動レベル)を変更し、分離度算出ステップより得られる分離度が所定の値以下または最小の値である照明レベルに調整する明度調整ステップと、を有する。   The tablet inspection method according to the first embodiment includes a reflected image acquisition step of illuminating the medicine package 21 with the display label with the reflection illumination unit 13 and taking a photograph with the camera unit 15 to obtain a reflected image 31; A transmission image acquisition step of illuminating 21 with the transmission illumination unit 14 and capturing the transmission image 32 by photographing with the camera unit 15. Further, the difference image generation step for creating the difference image 36 by the difference image generation unit 18 from the reflected image 31 and the transmission image 32, and when the difference image 36 is binarized, the tablet area 33 and the label area 34 of the difference image 36 are displayed. A separation degree calculation step for calculating a separation degree indicating whether the separation is clearly performed, and at least one operation state (operation level) of the transmission illumination unit 14, the reflection illumination unit 13, the camera unit 15, and the difference image generation unit 18 are changed. And a brightness adjustment step of adjusting the illumination level so that the separation obtained from the separation degree calculation step is a predetermined value or less or a minimum value.

図11は、本実施の形態1における錠剤検査装置11の照明調整手順を示すフローチャートである。   FIG. 11 is a flowchart showing an illumination adjustment procedure of the tablet inspection apparatus 11 according to the first embodiment.

まず、照明レベルを調整するために、反射照明部13の反射照明レベルを最大レベルに設定する(ステップS01)。そして、透過照明部14の透過照明レベルを最大レベルに設定する(ステップS02)。次に、サンプル薬包体51を載置台12の検査位置に載置する。   First, in order to adjust the illumination level, the reflected illumination level of the reflected illumination unit 13 is set to the maximum level (step S01). And the transmitted illumination level of the transmitted illumination part 14 is set to the maximum level (step S02). Next, the sample medicine package 51 is placed at the inspection position of the placement table 12.

図12は、本実施の形態1におけるサンプル薬包体51を示す図である。サンプル薬包体51は、通常の薬包体21と同じ大きさであり、透明フィルムと薄い白色フィルムの間にサンプル錠剤52を封入している。ただし、サンプル錠剤52は、サンプル薬包体51内で動かないように白色フィルムに固定している。また、白色フィルムにはサンプル表示ラベル53とサンプル番号54が、透過性のある黒色インクで印刷されている。   FIG. 12 is a diagram showing a sample medicine pack 51 according to the first embodiment. The sample medicine package 51 is the same size as the ordinary medicine package 21, and a sample tablet 52 is enclosed between a transparent film and a thin white film. However, the sample tablet 52 is fixed to a white film so as not to move in the sample medicine package 51. Further, the sample display label 53 and the sample number 54 are printed on the white film with a transparent black ink.

なお、サンプル薬包体51としては、実際に検査される薬包体21に応じて、様々な条件の錠剤、表示ラベルのものを用いる。錠剤種類としては、カプセル、コーティング錠がある。また、錠剤の色も異なる色がある。また、2つの錠剤が重なったものがある。また、錠剤の方向が異なるように配置する。また、表示ラベルは、バーコード、図柄がある。   As the sample medicine pack 51, tablets and display labels having various conditions are used according to the medicine pack 21 to be actually inspected. Tablet types include capsules and coated tablets. There are also different colors of tablets. There are also two tablets that overlap. Moreover, it arrange | positions so that the direction of a tablet may differ. The display label includes a barcode and a design.

サンプル番号54である「102」がサンプル位置情報記録部28に入力されると、サンプル位置情報記録部28は、サンプル薬包体51の錠剤位置情報およびラベル位置情報を分離度算出部16へ送る。そして、分離度算出部16は、図11に示すように、サンプル薬包体51の錠剤位置情報およびラベル位置情報を取得する(ステップS03)。   When “102” which is the sample number 54 is input to the sample position information recording unit 28, the sample position information recording unit 28 sends the tablet position information and label position information of the sample medicine pack 51 to the separation degree calculation unit 16. . Then, as shown in FIG. 11, the degree-of-separation calculation unit 16 acquires the tablet position information and label position information of the sample medicine pack 51 (step S03).

その後、反射照明部13は、ステップS01で設定された照明レベルで照明光を照射し、サンプル薬包体51を照らす。サンプル薬包体51に反射照明部13からの光を照射した状態で、カメラ部15でサンプル薬包体51を撮影する。そして、差分画像生成部18はカメラ部15よりサンプル薬包体51の反射画像31を取得する(ステップS04)。   Thereafter, the reflective illumination unit 13 illuminates the sample medicine package 51 by irradiating illumination light at the illumination level set in step S01. The sample medicine pack 51 is photographed by the camera section 15 in a state where the sample medicine pack 51 is irradiated with light from the reflection illumination section 13. And the difference image generation part 18 acquires the reflected image 31 of the sample medicine pack 51 from the camera part 15 (step S04).

その後、反射照明部13の照明光を消し、ステップS02で設定された照明レベルで透過照明部14から照明光を照射し、サンプル薬包体51を照らす。サンプル薬包体51に透過照明部14からの光を照射した状態で、カメラ部15でサンプル薬包体51を撮影する。そして、差分画像生成部18はカメラ部15よりサンプル薬包体51の透過画像32を取得する(ステップS05)。   Thereafter, the illumination light of the reflection illumination unit 13 is turned off, and the illumination light is irradiated from the transmission illumination unit 14 at the illumination level set in step S02, and the sample medicine package 51 is illuminated. The sample medicine pack 51 is photographed by the camera section 15 in a state where the sample medicine pack 51 is irradiated with light from the transmission illumination section 14. And the difference image generation part 18 acquires the transmission image 32 of the sample medicine pack 51 from the camera part 15 (step S05).

そして、透過照明部14の照明光を消した後、差分画像生成部18は、反射画像31と透過画像32の差分を取り、サンプル薬包体51の差分画像36を生成する(ステップS06)。そして、分離度算出部16は、ステップS06で生成された差分画像36に対する分離度を算出する(ステップS07)。   Then, after the illumination light from the transmission illumination unit 14 is turned off, the difference image generation unit 18 calculates the difference between the reflection image 31 and the transmission image 32 and generates a difference image 36 of the sample medicine package 51 (step S06). Then, the degree-of-separation calculation unit 16 calculates the degree of separation for the difference image 36 generated in step S06 (step S07).

分離度算出部16で算出される分離度は、サンプル薬包体51の中にある複数の錠剤における錠剤明度の平均値と、サンプル薬包体51の中にある複数の表示ラベルにおけるラベル明度の平均値との乗算値である。サンプル薬包体51においては、ステップS03で5つある錠剤の位置情報と2つある表示ラベルの位置情報を取得しているために、これらの位置情報における錠剤領域33、ラベル領域34の明度を測定することで、5つある錠剤の錠剤明度と、2つある表示ラベルのラベル明度を測定することができる。そして、5つある錠剤の錠剤明度の平均値と、2つあるラベルのラベル明度の平均値とを乗算した値を分離度とする。このようにして、サンプル薬包体51の錠剤と表示ラベルとを取り間違えることがなく、正確に錠剤と表示ラベルを識別することができる。   The degree of separation calculated by the degree-of-separation calculating unit 16 is the average value of the tablet brightness in the plurality of tablets in the sample medicine pack 51 and the label brightness in the plurality of display labels in the sample medicine pack 51. This is the product of the average value. In the sample medicine package 51, since the position information of the five tablets and the position information of the two display labels are acquired in step S03, the brightness of the tablet region 33 and the label region 34 in these position information is set. By measuring, the tablet lightness of five tablets and the label lightness of two display labels can be measured. Then, a value obtained by multiplying the average value of the tablet lightness of the five tablets by the average value of the label lightness of the two labels is defined as the degree of separation. In this way, it is possible to accurately identify the tablet and the display label without mistaking the tablet of the sample medicine package 51 and the display label.

ステップS07で算出された分離度、および、この時の透過照明レベルは、分離度算出部16に記録される。   The degree of separation calculated in step S07 and the transmitted illumination level at this time are recorded in the degree of separation calculation unit 16.

そして、分離度が算出された後、分離度算出部16は透過照明レベルが最小レベルであるレベル1であるか否かを判定し(ステップS09)、透過照明レベルがレベル1でなければ、透過照明レベルを1つ下げる(ステップS10)。   After the separation degree is calculated, the separation degree calculation unit 16 determines whether or not the transmission illumination level is level 1, which is the minimum level (step S09). If the transmission illumination level is not level 1, transmission is performed. The illumination level is lowered by 1 (step S10).

そして、透過照明レベルを1つ下げた状態(例えば、透過照明レベルをレベル16よりレベル15にした状態)で、ステップS04〜ステップS07を行い、ステップS08で透過照明レベルと分離度を明度調整部17に記録する。   Then, in a state in which the transmitted illumination level is lowered by 1 (for example, in a state in which the transmitted illumination level is changed from level 16 to level 15), Steps S04 to S07 are performed. 17 is recorded.

透過照明レベルを1レベルずつ下げ、レベル1になるまで、ステップS10、ステップS04〜ステップS09を繰り返す。そして、透過照明レベルが最小レベルであるレベル1になると、ステップS08で明度調整部17に記録された複数の分離度より、分離度が最小となる透過照明レベルを抽出し、この透過照明レベルを、測定用の透過照明レベルとして設定する(ステップS11)。   The transmitted illumination level is lowered one level at a time, and step S10 and steps S04 to S09 are repeated until level 1 is reached. When the transmitted illumination level reaches level 1, which is the minimum level, the transmitted illumination level that minimizes the separation degree is extracted from the plurality of separation degrees recorded in the brightness adjustment unit 17 in step S08. The transmission illumination level for measurement is set (step S11).

このようにサンプル薬包体51を利用することで、錠剤検査装置11は自動的に最適な透過照明レベルを設定することができる。   As described above, by using the sample medicine package 51, the tablet inspection apparatus 11 can automatically set an optimal transmitted illumination level.

なお、図11のフローチャートを用いて説明した錠剤検査装置11の照明調整手順では、反射照明レベルを固定して、透過照明レベルを変化させることで、最適な照明レベルを算出している。しかし、透過照明レベルを固定して、反射照明レベルを変化させることで、最適な照明レベルを算出してもよい。どちらを用いるかは、それぞれの照明レベルを変化させた際の影響を予め調べておいて決定されることが望ましい。   In the illumination adjustment procedure of the tablet inspection apparatus 11 described with reference to the flowchart of FIG. 11, the optimum illumination level is calculated by changing the transmitted illumination level while fixing the reflected illumination level. However, the optimal illumination level may be calculated by fixing the transmitted illumination level and changing the reflected illumination level. It is desirable to determine which one to use by examining in advance the effect of changing each illumination level.

また、反射照明部13および透過照明部14の照明レベルを調整しなくとも、カメラ部15の作動レベルを、反射画像と透過画像を撮影する際に調整することで、反射画像31の錠剤明度より透過画像32の錠剤明度が低くなり、反射画像31のラベル明度より透過画像32のラベル明度が高くなるようにしてもよい。同様に、差分画像生成部18の作動レベルを調整してもよい。ここで、カメラ部15の作動レベルとは、カメラ部15のしぼり、シャッタースピード、またはゲイン値である。また、差分画像生成部18の作動レベルとは、差分画像生成部18での設定値である。   Further, without adjusting the illumination levels of the reflected illumination unit 13 and the transmitted illumination unit 14, the operating level of the camera unit 15 is adjusted when taking the reflected image and the transmitted image, so that the tablet brightness of the reflected image 31 can be obtained. The tablet brightness of the transmission image 32 may be lowered, and the label brightness of the transmission image 32 may be higher than the label brightness of the reflection image 31. Similarly, the operation level of the difference image generation unit 18 may be adjusted. Here, the operation level of the camera unit 15 is a reduction, shutter speed, or gain value of the camera unit 15. The operation level of the difference image generation unit 18 is a set value in the difference image generation unit 18.

なお、以上の説明では、差分画像36の分離度が最小となるように作動レベルを調整しているが、分離度を所定の値以下となるようにしてもよい。   In the above description, the operation level is adjusted so that the degree of separation of the difference image 36 is minimized, but the degree of separation may be set to a predetermined value or less.

なお、本実施の形態1では、反射照明部13および透過照明部14の照明光は同色としている。このような構成により、錠剤、表示ラベルの色によって、錠剤、表示ラベルの明度にばらつくがなく、適切な二値化の閾値を設定することができる。   In the first embodiment, the illumination lights of the reflection illumination unit 13 and the transmission illumination unit 14 are the same color. With such a configuration, it is possible to set an appropriate threshold for binarization without varying the brightness of the tablet and display label depending on the color of the tablet and display label.

以上説明した、本実施の形態1において、サンプル薬包体51を用いて錠剤検査装置11の照明レベルを調整し、設定された照明レベルで錠剤検査を行う方法について、図13を用いて説明する。   In the first embodiment described above, a method for adjusting the illumination level of the tablet inspection apparatus 11 using the sample medicine package 51 and performing the tablet inspection at the set illumination level will be described with reference to FIG. .

図13は、本実施の形態1における錠剤検査装置11を用いて行う錠剤検査の手順を示すフローチャートである。   FIG. 13 is a flowchart showing a procedure of tablet inspection performed using the tablet inspection apparatus 11 according to the first embodiment.

まず、薬包体21が複数個繋がった薬包帯を載置台12に置いた後、反射照明部13は、前述のように設定された照明レベルで照明光を発生し、検査位置にある薬包体21を照らす。薬包体21に反射照明部13からの照明を照射した状態で、カメラ部15で薬包体21を撮影する。そして、差分画像生成部18はカメラ部15より薬包体21の反射画像31を取得する(ステップS21)。   First, after placing a medicine bandage in which a plurality of medicine packages 21 are connected to the mounting table 12, the reflected illumination unit 13 generates illumination light at the illumination level set as described above, and the medicine package located at the inspection position. Illuminate the body 21. The medicine pack 21 is photographed by the camera unit 15 in a state in which the medicine pack 21 is irradiated with the illumination from the reflection illumination unit 13. And the difference image generation part 18 acquires the reflection image 31 of the medicine pack 21 from the camera part 15 (step S21).

その後、反射照明部13は照明光を消し、透過照明部14は、すでに設定された照明レベルで照明光を発生し、薬包体21を照らす。薬包体21に透過照明部14からの光を照射した状態で、カメラ部15で薬包体21を撮影する。そして、差分画像生成部18はカメラ部15より薬包体21の透過画像32を取得する(ステップS22)。   Thereafter, the reflective illumination unit 13 extinguishes the illumination light, and the transmission illumination unit 14 illuminates the medicine package 21 by generating illumination light at the already set illumination level. The medicine pack 21 is photographed by the camera unit 15 in a state in which the medicine pack 21 is irradiated with light from the transmission illumination unit 14. And the difference image generation part 18 acquires the transmission image 32 of the medicine pack 21 from the camera part 15 (step S22).

そして、透過照明部14の照明光を消した後、差分画像生成部18は、反射画像31と透過画像32の差分を取り薬包体21の差分画像36を生成する(ステップS23)。そして、差分画像36を二値化処理部25で二値化して(ステップS24)、ラベル領域34を除去する。この時、照明レベルを適切な値に設定しているので、錠剤領域33とラベル領域34の分離度は大きい。よって、差分画像36の二値化を行うことで、差分画像36より表示ラベルを除去した差分二値化画像37を生成することができる。   Then, after the illumination light of the transmission illumination unit 14 is turned off, the difference image generation unit 18 takes the difference between the reflection image 31 and the transmission image 32 and generates a difference image 36 of the medicine pack 21 (step S23). Then, the difference image 36 is binarized by the binarization processing unit 25 (step S24), and the label area 34 is removed. At this time, since the illumination level is set to an appropriate value, the degree of separation between the tablet region 33 and the label region 34 is large. Therefore, by performing binarization of the difference image 36, a difference binarized image 37 from which the display label is removed from the difference image 36 can be generated.

ただし、薬包体21が鏡面反射の影響を受けることで差分二値化画像37に白とび部35が発生することがある。この白とび部35を除去するために、ステップS22で取得した透過画像32を二値化する(ステップS25)。   However, the overburden part 35 may occur in the difference binarized image 37 due to the influence of the specular reflection on the medicine pack 21. In order to remove the whiteout portion 35, the transmission image 32 acquired in step S22 is binarized (step S25).

そして、ステップS25で透過画像32を二値化して得た透過二値化画像46を反転させ反転画像と差分二値化画像37の白色部分が重なる交差領域を算出し、交差領域画像47を生成する(ステップS26)。   Then, the transmission binarized image 46 obtained by binarizing the transparent image 32 in step S25 is inverted to calculate an intersecting region where the inverted image and the white portion of the difference binarized image 37 overlap to generate an intersecting region image 47. (Step S26).

図9に示す交差領域画像47にある白い部分は、錠剤領域33である。このように、交差領域画像47はラベル領域34の除去に加えて、白とび部35を除去しており、検査画像として薬包体21の中になる錠剤領域33の数と大きさを計測することができる。そして、錠剤カウント部27は、交差領域画像47における錠剤領域33の数を数える。この錠剤領域33の数を錠剤数として算出する(ステップS27)。   A white portion in the intersecting region image 47 shown in FIG. As described above, the crossing area image 47 is obtained by removing the whiteout portion 35 in addition to the removal of the label area 34 and measuring the number and size of the tablet areas 33 in the medicine pack 21 as the inspection image. be able to. Then, the tablet counting unit 27 counts the number of tablet regions 33 in the intersecting region image 47. The number of tablet regions 33 is calculated as the number of tablets (step S27).

さらに、錠剤カウント部27には、処方箋に基づいて、薬包体21に封入されているべき錠剤の総数が記録されている。そして、錠剤カウント部27は、記録されている処方箋に基づく錠剤の総数と、ステップS27で算出された錠剤数とが同数であるか否かをチェックする(ステップS28)。   Furthermore, the total number of tablets that should be enclosed in the medicine pack 21 is recorded in the tablet counting unit 27 based on the prescription. Then, the tablet counting unit 27 checks whether or not the total number of tablets based on the recorded prescription is the same as the number of tablets calculated in step S27 (step S28).

そして、処方箋に基づく錠剤の総数とステップS27で算出された錠剤数とが異なっていると、表示部29に、薬包体21に封入された錠剤数が異なる旨のメッセージを表示させる。また、処方箋に基づく錠剤の総数とステップS27で算出された錠剤数とが同数であれば、表示部29に、薬包体21に封入された錠剤数が同数である旨のメッセージを表示させる。   If the total number of tablets based on the prescription is different from the number of tablets calculated in step S27, a message indicating that the number of tablets enclosed in the medicine pack 21 is different is displayed on the display unit 29. If the total number of tablets based on the prescription and the number of tablets calculated in step S27 are the same, the display unit 29 displays a message indicating that the number of tablets enclosed in the medicine pack 21 is the same.

その後、載置台12のガイド部20が動き、別の薬包体21をカメラ部15の下方にある検査位置へ移動させる。そして、別の薬包体21の錠剤検査を行うためにステップS21〜ステップS28を繰り替えして、薬包体21の検査を行う。   Thereafter, the guide part 20 of the mounting table 12 moves, and another medicine pack 21 is moved to the inspection position below the camera part 15. And in order to perform the tablet test | inspection of another medicine pack 21, step S21-step S28 are repeated and the medicine pack 21 is test | inspected.

なお、上述した錠剤検査装置11を用いた検査方法では、錠剤カウント部27で自動的に薬包体21の錠剤の数が適切な錠剤数であるか否かのチェックを行なっているが、表示部29に、交差領域画像47を表示して、監査者の目で薬包体の錠剤をチェックするようにしてもよい。   In the inspection method using the tablet inspection apparatus 11 described above, the tablet counting unit 27 automatically checks whether the number of tablets in the medicine pack 21 is an appropriate number of tablets. The crossing region image 47 may be displayed on the unit 29 to check the medicine pack tablet with the eyes of the inspector.

なお、反射照明部13はドーム型照明とした構成であるとよい。なぜならば、薬包体21に対して均一光を照射することができ、薬包体21の鏡面反射の影響を抑え、差分画像36の白とび部35の発生を防ぐことができるためである。   In addition, the reflective illumination part 13 is good in the structure used as the dome shape illumination. This is because the medicine pack 21 can be irradiated with uniform light, the influence of the specular reflection of the medicine pack 21 can be suppressed, and the occurrence of the overexposure portion 35 of the difference image 36 can be prevented.

なお、カメラ部15は偏光フィルターを有する構成であるとよい。なぜならば、薬包体21に対する鏡面反射の影響を抑え、差分画像36の白とび部35の発生を防ぐことができるためである。   The camera unit 15 may have a configuration having a polarizing filter. This is because the influence of specular reflection on the medicine pack 21 can be suppressed and the occurrence of the overexposed portion 35 of the difference image 36 can be prevented.

なお、表示ラベルは、透過インクによる印刷物に限らず、透過性のあるシールであっても、本実施の形態1を用いて、表示ラベルを除去することができる。   Note that the display label is not limited to a printed matter using transmissive ink, and even if it is a permeable seal, the display label can be removed using the first embodiment.

本発明の錠剤検査装置は、正確に表示ラベルを除去することができるので、表示ラベルがある場合でも正確な錠剤計数を可能とする正確な調剤作業を行わなければならない薬局、病院施設等で利用する錠剤検査装置として有用である。   The tablet inspection apparatus of the present invention can accurately remove the display label, so that it can be used in pharmacies, hospital facilities, etc. that must perform accurate dispensing work that enables accurate tablet counting even when there is a display label. It is useful as a tablet inspection device.

11 錠剤検査装置
12 載置台
13 反射照明部
14 透過照明部
15 カメラ部
16 分離度算出部
17 明度調整部
18 差分画像生成部
20 ガイド部
21 薬包体
22 透明アクリル板
25 二値化処理部
26 交差領域算出部
27 錠剤カウント部
28 サンプル位置情報記録部
29 表示部
31 反射画像
32 透過画像
33 錠剤領域
34 ラベル領域
35 白とび部
36 差分画像
37 差分二値化画像
46 透過二値化画像
47 交差領域画像
48 合成画像
51 サンプル薬包体
52 サンプル錠剤
53 サンプル表示ラベル
54 サンプル番号
DESCRIPTION OF SYMBOLS 11 Tablet test | inspection apparatus 12 Mounting stand 13 Reflection illumination part 14 Transmission illumination part 15 Camera part 16 Separation degree calculation part 17 Lightness adjustment part 18 Difference image generation part 20 Guide part 21 Medicine package 22 Transparent acrylic board 25 Binarization process part 26 Crossing region calculation unit 27 Tablet counting unit 28 Sample position information recording unit 29 Display unit 31 Reflected image 32 Transparent image 33 Tablet region 34 Label region 35 Overexposure portion 36 Difference image 37 Difference binarized image 46 Transparent binarized image 47 Crossing Area image 48 Composite image 51 Sample medicine pack 52 Sample tablet 53 Sample display label 54 Sample number

Claims (10)

透過性を有する表示ラベルが施された薬包体を載置する載置台と、
前記載置台を照らす反射照明部と、
前記載置台を挟んで前記反射照明部の反対側より前記載置台を照らす透過照明部と、
カメラ部と、
前記反射照明部で照らされた前記薬包体を前記カメラ部で撮影した反射画像と、前記透過照明部で照らされた前記薬包体を前記カメラ部で撮影した透過画像と、の差分から差分画像を生成する差分画像生成部と、
二値化した前記差分画像の錠剤領域とラベル領域との分離度を算出する分離度算出部と、
前記分離度算出部より得られる分離度が所定の値以下になるように、前記透過照明部,前記反射照明部,前記カメラ部および前記差分画像生成部の少なくとも1つの作動状態を調整する明度調整部と、を備えた
錠剤検査装置。
A mounting table for mounting a medicine package with a display label having permeability;
A reflective illumination unit for illuminating the mounting table;
A transmission illumination unit that illuminates the mounting table from the opposite side of the reflective lighting unit across the mounting table;
A camera unit;
Difference from a difference between a reflected image obtained by photographing the medicine pack illuminated by the reflected illumination unit by the camera unit and a transmitted image obtained by photographing the medicine package illuminated by the transmitted illumination unit by the camera unit. A difference image generation unit for generating an image;
A degree-of-separation calculating unit for calculating the degree of separation between the tablet region and the label region of the binarized difference image;
Brightness adjustment for adjusting at least one operating state of the transmission illumination unit, the reflection illumination unit, the camera unit, and the difference image generation unit so that the separation degree obtained from the separation degree calculation unit is equal to or less than a predetermined value. And a tablet inspection device.
前記明度調整部は、前記透過照明部または前記反射照明部の少なくとも1つの作動状態である照明レベルを調整し、
前記分離度算出部は、前記錠剤領域における画素の明度の平均値である錠剤明度と、前記ラベル領域における画素の明度の平均値であるラベル明度とを乗算した乗算値から分離度を算出する
請求項1に記載の錠剤検査装置。
The brightness adjustment unit adjusts an illumination level that is at least one operating state of the transmission illumination unit or the reflection illumination unit,
The separation degree calculation unit calculates a separation degree from a multiplication value obtained by multiplying a tablet lightness that is an average value of pixel brightness in the tablet area and a label brightness that is an average value of pixel brightness in the label area. Item 2. The tablet inspection device according to Item 1.
サンプル薬包体の錠剤位置情報およびラベル位置情報を記憶するサンプル位置情報記録部を有し、
前記分離度算出部は、前記サンプル薬包体の錠剤位置情報およびラベル位置情報を基に特定した前記サンプル薬包体の差分画像における錠剤領域およびラベル領域の明度を用いて分離度を算出する
請求項1または請求項2に記載の錠剤検査装置。
A sample position information recording unit for storing the tablet position information and label position information of the sample medicine pack;
The degree-of-separation calculation unit calculates the degree of separation by using the brightness of the tablet region and the label region in the difference image of the sample medicine pack specified based on the tablet position information and the label position information of the sample medicine pack. The tablet inspection device according to claim 1 or 2.
前記反射照明部および前記透過照明部の照明光は同色である
請求項1〜3のいずれか1項に記載の錠剤検査装置。
The tablet inspection device according to any one of claims 1 to 3, wherein illumination light of the reflection illumination unit and the transmission illumination unit is the same color.
前記反射照明部はドーム型照明である
請求項1〜4のいずれか1項に記載の錠剤検査装置。
The tablet inspection apparatus according to claim 1, wherein the reflected illumination unit is a dome-shaped illumination.
前記カメラ部は偏光フィルターを有する
請求項1〜5のいずれか1項に記載の錠剤検査装置。
The tablet inspection apparatus according to claim 1, wherein the camera unit includes a polarizing filter.
透過性を有する表示ラベルが施された薬包体を載置する載置台と、前記載置台を照らす反射照明部と、前記載置台を挟んで前記反射照明部の反対側より前記載置台を照らす透過照明部と、を備えた錠剤検査装置を用いた錠剤検査方法であって、
前記反射照明部で照らした状態で前記薬包体をカメラ部で撮影した反射画像を取得する反射画像取得ステップと、
透過照明部で照らした状態で前記薬包体を前記カメラ部で撮影し透過画像を取得する透過画像取得ステップと、
前記反射画像と前記透過画像との差分から差分画像生成部で差分画像を生成する差分画像生成ステップと、
二値化した前記差分画像の錠剤領域とラベル領域の分離度を算出する分離度算出ステップと、
前記分離度が所定の値以下になるように、前記透過照明部,前記反射照明部,前記カメラ部および前記差分画像生成部の少なくとも1つの作動状態を調整する明度調整ステップと、を有する
錠剤検査方法。
A mounting table on which a medicine package with a display label having transparency is mounted, a reflective illumination unit that illuminates the previous mounting table, and an illumination of the previous mounting table from the opposite side of the reflective lighting unit across the previous mounting table A tablet inspection method using a tablet inspection device comprising a transmission illumination unit,
A reflected image acquisition step of acquiring a reflected image obtained by photographing the medicine pack with a camera unit in a state illuminated by the reflected illumination unit;
A transmission image acquisition step of photographing the medicine pack with the camera unit in a state illuminated by a transmission illumination unit and acquiring a transmission image;
A difference image generation step of generating a difference image in a difference image generation unit from the difference between the reflection image and the transmission image;
A degree-of-separation calculation step for calculating the degree of separation between the tablet region and the label region of the binarized difference image;
A brightness adjustment step of adjusting at least one operating state of the transmission illumination unit, the reflection illumination unit, the camera unit, and the difference image generation unit so that the degree of separation is a predetermined value or less. Method.
前記分離度算出ステップは、前記錠剤領域における画素の明度の平均値である錠剤明度と、前記ラベル領域における画素の明度の平均値であるラベル明度とを乗算した乗算値から分離度を算出する
請求項7に記載の錠剤検査方法。
The separation degree calculation step calculates a separation degree from a multiplication value obtained by multiplying a tablet brightness which is an average value of pixel brightness in the tablet area and a label brightness which is an average value of pixel brightness in the label area. Item 8. The tablet inspection method according to Item 7.
前記分離度算出部ステップは、予め記憶したサンプル薬包体の錠剤位置情報およびラベル位置情報を基に特定した前記サンプル薬包体の差分画像における錠剤領域およびラベル領域の明度を用いて分離度を算出する
請求項7または8に記載の錠剤検査方法。
The degree-of-separation calculation unit step calculates the degree of separation using the brightness of the tablet region and the label region in the difference image of the sample medicine pack specified based on the tablet position information and label position information of the sample medicine pack stored in advance. The tablet inspection method according to claim 7 or 8, wherein the tablet inspection method is calculated.
前記反射照明部および前記透過照明部の照明光は同色である
請求項7〜9のいずれか1項に記載の錠剤検査方法。
The tablet inspection method according to any one of claims 7 to 9, wherein illumination light of the reflection illumination unit and the transmission illumination unit is the same color.
JP2010225339A 2010-10-05 2010-10-05 Tablet inspection device and tablet inspection method Expired - Fee Related JP5747150B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010225339A JP5747150B2 (en) 2010-10-05 2010-10-05 Tablet inspection device and tablet inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010225339A JP5747150B2 (en) 2010-10-05 2010-10-05 Tablet inspection device and tablet inspection method

Publications (2)

Publication Number Publication Date
JP2012078265A true JP2012078265A (en) 2012-04-19
JP5747150B2 JP5747150B2 (en) 2015-07-08

Family

ID=46238669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010225339A Expired - Fee Related JP5747150B2 (en) 2010-10-05 2010-10-05 Tablet inspection device and tablet inspection method

Country Status (1)

Country Link
JP (1) JP5747150B2 (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012127827A1 (en) * 2011-03-24 2012-09-27 パナソニック株式会社 Tablet inspection device and tablet inspection method using same
JP2015536181A (en) * 2012-10-26 2015-12-21 バクスター・コーポレーション・イングルウッドBaxter Corporation Englewood Work station improvements for medical dose preparation systems
JP5951065B1 (en) * 2015-03-17 2016-07-13 三菱電機インフォメーションシステムズ株式会社 Dispensing imaging system and dispensing imaging program
KR20170001467A (en) * 2015-06-26 2017-01-04 (주)제이브이엠 Medicine packets inspection apparatus and method for inspecting medicine packets
JPWO2014188650A1 (en) * 2013-05-22 2017-02-23 パナソニックヘルスケアホールディングス株式会社 Tablet inspection device and tablet inspection method
USD790727S1 (en) 2015-04-24 2017-06-27 Baxter Corporation Englewood Platform for medical dose preparation
KR20170134832A (en) * 2016-05-26 2017-12-07 (주)제이브이엠 Control apparatus
JP2018138199A (en) * 2014-05-09 2018-09-06 株式会社湯山製作所 Medicine sorting device
US10089444B2 (en) 2012-10-26 2018-10-02 Baxter Corporation Englewood Image acquisition for medical dose preparation system
US10347374B2 (en) 2008-10-13 2019-07-09 Baxter Corporation Englewood Medication preparation system
JP2020076652A (en) * 2018-11-08 2020-05-21 日本電気硝子株式会社 Workpiece manufacturing method, workpiece inspection method and workpiece inspection device
US10818387B2 (en) 2014-12-05 2020-10-27 Baxter Corporation Englewood Dose preparation data analytics
KR20210089801A (en) * 2019-12-31 2021-07-19 (주)에스엘티지 Apparatus for inspecting appearance of capsule type products
US11107574B2 (en) 2014-09-30 2021-08-31 Baxter Corporation Englewood Management of medication preparation with formulary management
US11367533B2 (en) 2014-06-30 2022-06-21 Baxter Corporation Englewood Managed medical information exchange
US11575673B2 (en) 2014-09-30 2023-02-07 Baxter Corporation Englewood Central user management in a distributed healthcare information management system
WO2023032635A1 (en) * 2021-08-31 2023-03-09 日立チャネルソリューションズ株式会社 Medicament inspection device and medicament inspection method
US11948112B2 (en) 2015-03-03 2024-04-02 Baxter Corporation Engelwood Pharmacy workflow management with integrated alerts

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0621165A (en) * 1992-07-06 1994-01-28 Hitachi Ltd Method for discriminating quality of binarization of image
JPH07190945A (en) * 1993-12-27 1995-07-28 Toshiba Corp Mask inspection equipment
JPH07204253A (en) * 1994-01-24 1995-08-08 Sanyo Electric Co Ltd Tablet inspection system
JPH07209196A (en) * 1994-01-17 1995-08-11 Sanyo Electric Co Ltd Tablet inspection system
JP2004340770A (en) * 2003-05-16 2004-12-02 Sankyo:Kk Imaging inspection system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0621165A (en) * 1992-07-06 1994-01-28 Hitachi Ltd Method for discriminating quality of binarization of image
JPH07190945A (en) * 1993-12-27 1995-07-28 Toshiba Corp Mask inspection equipment
JPH07209196A (en) * 1994-01-17 1995-08-11 Sanyo Electric Co Ltd Tablet inspection system
JPH07204253A (en) * 1994-01-24 1995-08-08 Sanyo Electric Co Ltd Tablet inspection system
JP2004340770A (en) * 2003-05-16 2004-12-02 Sankyo:Kk Imaging inspection system

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10347374B2 (en) 2008-10-13 2019-07-09 Baxter Corporation Englewood Medication preparation system
WO2012127827A1 (en) * 2011-03-24 2012-09-27 パナソニック株式会社 Tablet inspection device and tablet inspection method using same
JP5496348B2 (en) * 2011-03-24 2014-05-21 パナソニック株式会社 Tablet inspection apparatus and tablet inspection method using the same
US11080541B2 (en) 2012-10-26 2021-08-03 Baxter Corporation Englewood Work station for medical dose preparation system
US10646405B2 (en) 2012-10-26 2020-05-12 Baxter Corporation Englewood Work station for medical dose preparation system
JP2019146992A (en) * 2012-10-26 2019-09-05 バクスター・コーポレーション・イングルウッドBaxter Corporation Englewood Improved work station for medical dose preparation system
US10089444B2 (en) 2012-10-26 2018-10-02 Baxter Corporation Englewood Image acquisition for medical dose preparation system
US9662273B2 (en) 2012-10-26 2017-05-30 Baxter Corporation Englewood Work station for medical dose preparation system
US10971257B2 (en) 2012-10-26 2021-04-06 Baxter Corporation Englewood Image acquisition for medical dose preparation system
US11620803B2 (en) 2012-10-26 2023-04-04 Baxter Corporation Englewood Work station for medical dose preparation
USD812768S1 (en) 2012-10-26 2018-03-13 Baxter Corporation Englewood Work station with platform for medical dose preparation
USD812769S1 (en) 2012-10-26 2018-03-13 Baxter Corporation Englewood Work station for medical dose preparation
JP2015536181A (en) * 2012-10-26 2015-12-21 バクスター・コーポレーション・イングルウッドBaxter Corporation Englewood Work station improvements for medical dose preparation systems
US10045912B2 (en) 2012-10-26 2018-08-14 Baxter Corporation Englewood Work station for medical dose preparation system
JPWO2014188650A1 (en) * 2013-05-22 2017-02-23 パナソニックヘルスケアホールディングス株式会社 Tablet inspection device and tablet inspection method
US9958400B2 (en) 2013-05-22 2018-05-01 Panasonic Healthcare Holdings Co., Ltd. Pill inspection apparatus and pill inspection method
JP2018138199A (en) * 2014-05-09 2018-09-06 株式会社湯山製作所 Medicine sorting device
US11367533B2 (en) 2014-06-30 2022-06-21 Baxter Corporation Englewood Managed medical information exchange
US11575673B2 (en) 2014-09-30 2023-02-07 Baxter Corporation Englewood Central user management in a distributed healthcare information management system
US11107574B2 (en) 2014-09-30 2021-08-31 Baxter Corporation Englewood Management of medication preparation with formulary management
US10818387B2 (en) 2014-12-05 2020-10-27 Baxter Corporation Englewood Dose preparation data analytics
US11948112B2 (en) 2015-03-03 2024-04-02 Baxter Corporation Engelwood Pharmacy workflow management with integrated alerts
JP2016171883A (en) * 2015-03-17 2016-09-29 三菱電機インフォメーションシステムズ株式会社 Compounding imaging system and compounding imaging program
JP5951065B1 (en) * 2015-03-17 2016-07-13 三菱電機インフォメーションシステムズ株式会社 Dispensing imaging system and dispensing imaging program
USD790727S1 (en) 2015-04-24 2017-06-27 Baxter Corporation Englewood Platform for medical dose preparation
KR102322987B1 (en) * 2015-06-26 2021-11-09 (주)제이브이엠 Medicine packets inspection apparatus and method for inspecting medicine packets
KR20170001467A (en) * 2015-06-26 2017-01-04 (주)제이브이엠 Medicine packets inspection apparatus and method for inspecting medicine packets
KR101971319B1 (en) * 2016-05-26 2019-04-24 (주)제이브이엠 Control apparatus
KR20170134832A (en) * 2016-05-26 2017-12-07 (주)제이브이엠 Control apparatus
JP2020076652A (en) * 2018-11-08 2020-05-21 日本電気硝子株式会社 Workpiece manufacturing method, workpiece inspection method and workpiece inspection device
JP7167641B2 (en) 2018-11-08 2022-11-09 日本電気硝子株式会社 Work manufacturing method and work inspection method
KR20210089801A (en) * 2019-12-31 2021-07-19 (주)에스엘티지 Apparatus for inspecting appearance of capsule type products
KR102324884B1 (en) 2019-12-31 2021-11-11 (주)에스엘티지 Apparatus for inspecting appearance of capsule type products
WO2023032635A1 (en) * 2021-08-31 2023-03-09 日立チャネルソリューションズ株式会社 Medicament inspection device and medicament inspection method

Also Published As

Publication number Publication date
JP5747150B2 (en) 2015-07-08

Similar Documents

Publication Publication Date Title
JP5747150B2 (en) Tablet inspection device and tablet inspection method
JP5496348B2 (en) Tablet inspection apparatus and tablet inspection method using the same
JP6100136B2 (en) Drug recognition apparatus and method
JP5414917B2 (en) Tablet inspection device and tablet inspection method
US9084714B2 (en) Device for counting the number of medicines in medicine packaging envelope
JP2006292419A (en) Defect inspection device and ptp packaging machine
JP4332122B2 (en) Appearance inspection device and PTP packaging machine
JP2006189354A (en) Visual inspection device and ptp packaging machine
KR20120109548A (en) Appearance inspection device
JP4048848B2 (en) Foreign object detection device in container and foreign object detection method in container
JP2007279064A (en) Visual inspection device for ptp encapsuled body
JP2014035185A (en) Inspection device and ptp packaging machine
JP3423055B2 (en) Tablet inspection system
TWI676798B (en) Inspection device
JP2001033390A (en) Visual examination apparatus of tablet and ptp packaging machine
JP2013148454A (en) Tablet checking apparatus
JP2005291939A (en) Apparatus and method for inspecting ptp sheet
JP4472499B2 (en) Defect inspection device and PTP packaging machine
KR20120109547A (en) Appearance inspection device
JPH10267865A (en) Method and device for inspecting ptp sheet
JP2006118951A (en) Illumination device for visual examination
JP3549752B2 (en) PTP sheet appearance inspection device and PTP packaging machine
JP4580122B2 (en) Detecting foreign matter in liquid
JP6857266B1 (en) Inspection equipment and packaging sheet manufacturing equipment and inspection method
JP7466613B1 (en) Inspection equipment and blister packing machines

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130522

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20130612

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131218

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20140108

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140204

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140407

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20140417

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A711

Effective date: 20141007

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150119

R151 Written notification of patent or utility model registration

Ref document number: 5747150

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees