JPH08322913A - Tablet inspection system - Google Patents

Tablet inspection system

Info

Publication number
JPH08322913A
JPH08322913A JP15683395A JP15683395A JPH08322913A JP H08322913 A JPH08322913 A JP H08322913A JP 15683395 A JP15683395 A JP 15683395A JP 15683395 A JP15683395 A JP 15683395A JP H08322913 A JPH08322913 A JP H08322913A
Authority
JP
Japan
Prior art keywords
medicine package
tablet
tablets
vibration
inspection system
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
JP15683395A
Other languages
Japanese (ja)
Inventor
Nobuo Kuchiki
伸夫 朽木
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP15683395A priority Critical patent/JPH08322913A/en
Publication of JPH08322913A publication Critical patent/JPH08322913A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Image Analysis (AREA)
  • Medical Treatment And Welfare Office Work (AREA)
  • Medical Preparation Storing Or Oral Administration Devices (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE: To correctly check tablets enclosed in a chartula in a tablet inspection system which is connected to a tablet wrapping device for enclosing plural tablets in a light transmitting chartula according to prescription information and adapted to inspect the tablets by recognizing the images of the tablets in the chartula discharged from the device. CONSTITUTION: An inspection apparatus 3 comprises a transport mechanism 4 for transporting a chartula 15 discharged from a tablet wrapping device 1 to a designated inspection position, a vibration applying mechanism 5 for applying vibration to a chartula to be fed into the inspection position to eliminate overlapping of tablets, a CCD camera 7 for photographing the chartula in the inspecting position, an image recognition processing circuit 31 for processing images obtained from the CCD camera 7 to recognize the tablets in the chartula, and a determining circuit 32 for comparing the result of image recognition with prescription information concerning each chartula to determine abnormality.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、薬包内に封入された錠
剤を自動的に検査する錠剤検査システムに関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tablet inspection system for automatically inspecting tablets enclosed in a medicine package.

【0002】[0002]

【従来の技術】従来、病院や薬局における錠剤包装業務
を自動化するべく、図1に示す如き錠剤包装装置(1)が
開発されている。該錠剤包装装置(1)は、複数種類の錠
剤が種類別に収納された錠剤供給ユニット(11)を具え、
該錠剤供給ユニット(11)から排出される各種の錠剤(10)
を、ベルトコンベア(12)(13)を経て透明の分包紙(14)内
へ自動的に投入し、分包機構(17)によって分包紙(14)を
一人分毎に封止するものである。又、分包紙(14)の搬送
路には、分包紙(14)の表面に患者名や用法等を自動的に
印字するための印字機構(図示省略)が配備される。
2. Description of the Related Art Conventionally, a tablet packing apparatus (1) as shown in FIG. 1 has been developed in order to automate tablet packing operations in hospitals and pharmacies. The tablet packaging device (1) includes a tablet supply unit (11) in which a plurality of types of tablets are stored according to type,
Various tablets (10) discharged from the tablet supply unit (11)
Automatically into the transparent packing paper (14) via the belt conveyors (12) (13), and the packing mechanism (17) seals the packing paper (14) for each person. Is. In addition, a printing mechanism (not shown) for automatically printing the patient name, usage, etc. on the surface of the packaging paper (14) is provided in the transport path of the packaging paper (14).

【0003】この様にして得られた分包紙(14)を切断・
整列装置(16)によって一人分毎に切り離すことによっ
て、患者別の薬包(15)が得られる。該薬包(15)は、患者
名や用法等の印刷部を有し、その中には患者が一度に服
用すべき複数種類の錠剤(10)が必要数だけ封入されてい
るので、便利であり、服用に間違いが生じる虞れもな
い。
The packaging paper (14) thus obtained is cut and
The individual medicine packages (15) can be obtained by separating each person by the aligning device (16). The medicine package (15) has a printing part for the patient name, usage, etc., and is convenient because it contains a plurality of types of tablets (10) to be taken by the patient at one time. There is no risk of mistakes in taking the drug.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、錠剤包
装装置においては、錠剤供給ユニット(11)からベルトコ
ンベア(12)上に所定個数の錠剤(10)を排出する際、ある
程度の確率で個数に誤りが生じる。又、分包紙(14)への
投入時に個数の誤りが生じる虞れもある。この結果、処
方箋の指示とは異なる個数の錠剤(10)を含んだ薬包(15)
が作製されることがある。この問題に対し、従来は、錠
剤包装装置(1)から排出される薬包(15)を検査員が目視
によって確認し、処方箋の記載と比較することによっ
て、異常の有無を確認していた。そして、異常が発見さ
れたときは、その薬包(15)を排除するのである。この目
視による確認及び排除の作業は煩雑であり、包装作業全
体の能率を低下させる原因となっていた。
However, in the tablet packing apparatus, when a predetermined number of tablets (10) are discharged from the tablet supply unit (11) onto the belt conveyor (12), there is a certain probability of an error in the number of tablets. Occurs. Further, there is a possibility that the number of sheets may be wrong when the sheets are put into the packaging paper (14). As a result, the medicine package (15) containing the number of tablets (10) different from the prescription instructions
May be created. With respect to this problem, conventionally, an inspector visually confirms the medicine package (15) discharged from the tablet packaging device (1) and compares it with the description on the prescription to confirm the presence or absence of abnormality. When an abnormality is found, the medicine package (15) is removed. This visual confirmation and elimination work is complicated and has been a cause of reducing the efficiency of the entire packaging work.

【0005】ところで、広く画像認識の分野において、
複数の対象物体の画像に基づいて各物体の輪郭形状や特
徴部分を抽出する方式が種々提案されている(例えば特
公平1-30183〔G06F15-70〕、特公平2-4948〔G06F15-7
0〕、特公平3-57501〔G06F15-70〕等)。そこで、この様
な画像認識技術を錠剤の検査に応用することによって、
検査を自動化することが考えられる。
By the way, widely in the field of image recognition,
Various methods have been proposed for extracting the contour shape and the characteristic part of each object based on the images of a plurality of target objects (for example, Japanese Patent Publication 1-30183 [G06F15-70], Japanese Patent Publication 2-4948 [G06F15-7].
0], Japanese Patent Publication No. 3-57501 [G06F15-70], etc.). Therefore, by applying such image recognition technology to tablet inspection,
It is possible to automate the inspection.

【0006】しかしながら、薬包内の錠剤の検査におい
ては、錠剤どうしが互いに重なっていることが多く、そ
の重なり状態も様々である。特に重なりが大きい場合に
は、従来の画像認識技術を用いた錠剤の検査では、互い
に重なった2つの錠剤の画像を2つの錠剤として識別す
ることが困難であり、正確な検査結果を得ることが出来
ない。
However, in the inspection of the tablets in the medicine package, the tablets are often overlapped with each other, and the overlapped states are also various. Particularly when the overlap is large, it is difficult to identify an image of two tablets that overlap each other as two tablets by an inspection of a tablet using a conventional image recognition technique, and it is possible to obtain an accurate inspection result. Can not.

【0007】本発明の目的は、薬包内に封入された錠剤
を正確に検査することが出来る錠剤検査システムを提供
することである。
It is an object of the present invention to provide a tablet inspection system capable of accurately inspecting a tablet enclosed in a medicine package.

【0008】[0008]

【課題を解決する為の手段】本発明に係る錠剤検査シス
テムは、錠剤包装装置から排出される薬包を所定の検査
位置まで搬送する搬送手段と、錠剤包装装置から排出さ
れて検査位置へ送り込まれるべき薬包、或いは検査位置
の薬包に対して振動を付加して、薬包内の錠剤の重なり
を除去するための振動付加機構と、検査位置の薬包を撮
影する撮像手段と、撮像手段から得られる画像を処理し
て薬包内の錠剤を認識する画像認識処理手段と、各薬包
についての画像認識の結果と処方箋情報とを比較して、
異常を判定する判定手段とを具えている。
A tablet inspection system according to the present invention comprises a conveying means for conveying a medicine package discharged from a tablet packing device to a predetermined inspection position, and a discharging means discharged from the tablet packing device and sent to the inspection position. A vibration adding mechanism for applying vibration to the medicine package to be inspected or the medicine package at the inspection position to remove the overlap of the tablets in the medicine package, an imaging means for photographing the medicine package at the inspection position, and an imaging Image recognition processing means for recognizing the tablets in the medicine package by processing the image obtained from the means, and comparing the result of the image recognition and the prescription information for each medicine package,
And a judging means for judging an abnormality.

【0009】具体的構成に於いて、振動付加機構は、薬
包内の錠剤に対して垂直方向或いは水平方向の振動を与
えるものであって、例えば、薬包を載せたコンベアベル
トに振動を与える振動発生源を具え、或いは、薬包を載
せたコンベアベルトの移動経路を周期的に屈曲させるガ
イド機構を具えている。
In a specific configuration, the vibration adding mechanism applies vertical or horizontal vibration to the tablets in the medicine package, and for example, applies vibration to the conveyor belt on which the medicine package is placed. It has a vibration source or a guide mechanism for periodically bending the movement path of the conveyor belt on which the medicine package is placed.

【0010】又、具体的構成に於いて、錠剤検査システ
ムは、撮像手段による薬包の撮影中は振動付加機構を停
止させる制御手段を具えている。
Further, in a concrete configuration, the tablet inspection system includes a control means for stopping the vibration adding mechanism during the photographing of the medicine package by the image pickup means.

【0011】又、搬送手段は、薬包が検査位置に到達し
た時点で一定時間だけ停止する間欠送り機能を具えてい
る。更に又、薬包が検知位置に到達した時点を検知する
ためのセンサ手段を装備し、該センサ手段の検知信号に
よって振動付加機構や間欠送り機構が制御される。
Further, the carrying means has an intermittent feeding function of stopping for a predetermined time when the medicine package reaches the inspection position. Furthermore, a sensor means for detecting the time when the medicine package reaches the detection position is provided, and the vibration adding mechanism and the intermittent feeding mechanism are controlled by the detection signal of the sensor means.

【0012】[0012]

【作用】上記本発明の錠剤検査システムに於いては、錠
剤包装装置から排出された薬包が所定の検査位置まで搬
送される過程で、或いは検査位置に到達した状態で、振
動付加機構によって薬包内の錠剤に振動が付加される。
これによって、互いに重なっていた複数の錠剤は互いに
引き離されことになる。
In the tablet inspection system of the present invention, the medicine is discharged by the vibration adding mechanism while the medicine package discharged from the tablet packaging device is conveyed to the predetermined inspection position or when the medicine package reaches the inspection position. Vibration is applied to the tablets in the packet.
As a result, the tablets that have overlapped with each other are separated from each other.

【0013】その後、検査位置にて薬包内の錠剤の画像
が撮影され、その画像に所定の画像認識処理を施すこと
により、薬包内の錠剤の個数や種別が認識される。ここ
で、薬包内の錠剤どうしの重なりは軽微であり、互いに
僅かに重なり、単に接触し、或いは離間しているので、
画像認識処理は正確に行なわれる。
After that, an image of the tablets in the medicine package is photographed at the inspection position, and a predetermined image recognition process is performed on the image to recognize the number and types of tablets in the medicine package. Here, the overlap of the tablets in the medicine package is slight, and the tablets slightly overlap each other, and are simply in contact with each other or separated from each other.
The image recognition process is performed accurately.

【0014】そして、各薬包についての画像認識の結果
と処方箋情報とを比較することによって、異常の判定が
行なわれ、異常が判定されたときは、例えば当該薬包に
ついて警告を発する。
Then, by comparing the result of the image recognition for each medicine package with the prescription information, the abnormality is determined, and when the abnormality is determined, for example, a warning is issued for the medicine package.

【0015】振動付加機構の具体的構成に於いて、薬包
を載せたコンベアベルトに振動発生源によって垂直方向
或いは水平方向の振動を与えれば、コンベアベルトを介
して錠剤に振動が伝えられる。又、薬包を載せたコンベ
アベルトの移動経路を垂直面内で上下に、或いは水平面
内で左右に屈曲させることによって、薬包内の錠剤に
は、進行方向の転換に伴う振動力が加わる。
In the concrete structure of the vibration adding mechanism, when vibration is applied to the conveyor belt on which the medicine package is placed in the vertical or horizontal direction by the vibration source, the vibration is transmitted to the tablets via the conveyor belt. Further, by bending the moving path of the conveyor belt carrying the medicine package up and down in the vertical plane or left and right in the horizontal plane, a vibration force is applied to the tablets in the medicine package along with the change of the traveling direction.

【0016】又、撮像手段による薬包の撮影中は振動付
加機構を停止させることによって、撮影中の薬包が振動
することはなく、これによって正常な撮影が可能とな
る。
Further, by stopping the vibration adding mechanism during the photographing of the medicine package by the image pickup means, the medicine package during the photographing does not vibrate, which enables the normal photographing.

【0017】又、搬送手段に間欠送り機構を具えれば、
薬包が検査位置に到達した時点で薬包は静止するので、
正常な撮影が可能となる。更に又、センサ手段によって
搬送中の薬包の位置を検知すれば、該検知信号に基づい
て振動付加機構や間欠送り機構を停止させるタイミング
の制御が可能である。
Further, if the conveying means is provided with an intermittent feeding mechanism,
Since the medicine package is stationary when it reaches the inspection position,
Normal shooting is possible. Furthermore, if the position of the medicine package being conveyed is detected by the sensor means, it is possible to control the timing of stopping the vibration adding mechanism and the intermittent feeding mechanism based on the detection signal.

【0018】[0018]

【発明の効果】本発明に係る錠剤検査システムにおいて
は、錠剤包装装置から排出される薬包内に錠剤どうしの
重なりがあったとしても、振動の付加によって重なりが
解き放されるので、その後の錠剤の画像撮影に基づく異
常判定は正確なものとなる。
In the tablet inspection system according to the present invention, even if there is an overlap between tablets in the medicine package discharged from the tablet packaging apparatus, the overlap is released by the addition of vibration. The abnormality determination based on the image capturing becomes accurate.

【0019】[0019]

【実施例】図1は、本発明の錠剤検査システムを表わし
ており、錠剤包装装置(1)の出口に検査装置(3)が接続
されている。錠剤包装装置(1)は、制御用コンピュータ
(2)からの制御信号Cによって制御される。
1 shows a tablet inspection system according to the present invention, in which an inspection device (3) is connected to an outlet of a tablet packaging device (1). The tablet packing device (1) is a control computer.
It is controlled by the control signal C from (2).

【0020】錠剤包装装置(1)の具体的構成は、図2に
示す従来装置と同様であって、錠剤供給ユニット(11)
は、処方箋情報に従って複数の錠剤(10)をベルトコンベ
ア(12)上に排出し、これらの錠剤(10)は、ベルトコンベ
ア(13)を経て分包紙(14)内へ自動的に投入される。その
後、分包機構(17)によって分包紙(14)が一人分毎に封止
される。更に、該分包紙(14)は切断・整列装置(16)を経
て、一人分毎の薬包(15)に切り離され、これらの薬包(1
5)は、後段工程へ伸びる半透明のコンベアベルト(44)上
に整列状態で載置される。
The specific structure of the tablet packaging device (1) is similar to that of the conventional device shown in FIG.
Ejects a plurality of tablets (10) onto the belt conveyor (12) according to the prescription information, and these tablets (10) are automatically loaded into the packaging paper (14) via the belt conveyor (13). It After that, the packaging mechanism (17) seals the packaging paper (14) for each person. Further, the packaging paper (14) is cut through the cutting and aligning device (16) into individual medicine packages (15), and these medicine packages (1
5) is placed in an aligned state on a semitransparent conveyor belt (44) extending to the subsequent step.

【0021】図1の如く、切断・整列装置(16)の出口に
は、搬送機構(4)を構成する前記コンベアベルト(44)が
連結されており、該コンベアベルト(44)上の薬包(15)
は、振動付加機構(5)による振動付加工程、光学センサ
(6)による薬包検出工程、及びCCDカメラ(7)を用い
た画像認識処理工程を経て、最終的に仕分け装置(9)へ
送り込まれる。
As shown in FIG. 1, the conveyor belt (44) constituting the transfer mechanism (4) is connected to the outlet of the cutting / aligning device (16), and the medicine package on the conveyor belt (44) is connected. (15)
Is a vibration adding process by the vibration adding mechanism (5), an optical sensor
After passing through the medicine package detecting step (6) and the image recognition processing step using the CCD camera (7), it is finally sent to the sorting device (9).

【0022】搬送機構(4)は、例えば図示の如くモータ
(41)が連繋する原動ローラ(42)と従動ローラ(43)によっ
て、コンベアベルト(44)を水平方向に駆動するものであ
る。ここで、モータ(41)はドライブ回路(40)から駆動電
流の供給を受ける。
The transfer mechanism (4) is, for example, a motor as shown in the figure.
The driving roller (42) and the driven roller (43) connected to each other (41) drive the conveyor belt (44) in the horizontal direction. Here, the motor (41) is supplied with a drive current from the drive circuit (40).

【0023】振動付加機構(5)は、例えば動力源として
モータ(51)を具え、コンベアベルト(44)上の薬包(15)に
振動を与えることにより、薬包(15)内の錠剤どうしの重
なりを解き放すものである。これは、後述する画像認識
処理による錠剤の個数の検出において、その検出精度を
高めるための予備処理となる。
The vibration adding mechanism (5) has, for example, a motor (51) as a power source, and vibrates the medicine package (15) on the conveyor belt (44) to cause the tablets in the medicine package (15) to interact with each other. It releases the overlapping of. This is a preliminary process for increasing the detection accuracy in detecting the number of tablets by the image recognition process described later.

【0024】振動付加機構(5)の具体的構成としては、
図1に模式的に示す様にコンベアベルト(44)の裏面に対
して垂直方向の振動を与える構成の他、図3乃至図6に
示す構成が採用可能である。図3に示す振動付加機構
(5)は、コンベアベルト(44)が段違いローラ列(52)に挟
まれて、その移動経路が上下方向に変動しており、コン
ベアベルト(44)の移動に伴って、該コンベアベルト(44)
上の薬包(15)に垂直方向の振動を与えるものである。
As a concrete constitution of the vibration adding mechanism (5),
As shown in FIG. 1 schematically, it is possible to adopt the configuration shown in FIGS. 3 to 6 in addition to the configuration in which the back surface of the conveyor belt (44) is vibrated in the vertical direction. Vibration adding mechanism shown in FIG.
In (5), the conveyor belt (44) is sandwiched between the differently arranged roller rows (52), and the movement path thereof fluctuates in the vertical direction. With the movement of the conveyor belt (44), the conveyor belt (44) )
This is to give vertical vibration to the upper medicine package (15).

【0025】又、図4に示す振動付加機構(5)は、コン
ベアベルト(44)の裏面に圧電振動子(53)を接触させて配
置しており、該圧電振動子(53)を駆動回路(54)によって
駆動することにより、該コンベアベルト(44)上の薬包(1
5)に垂直方向の振動を与えるものである。
Further, the vibration adding mechanism (5) shown in FIG. 4 has a piezoelectric vibrator (53) arranged in contact with the back surface of the conveyor belt (44), and the piezoelectric vibrator (53) is arranged in a drive circuit. Driven by (54), the medicine package (1
It gives vertical vibration to 5).

【0026】又、図5に示す振動付加機構(5)は、水平
面内で可撓性を有するコンベアベルト(45)を採用し、該
コンベアベルト(45)は、その両側に配置された屈曲ガイ
ド(55)(56)に案内されて、水平面内を屈曲した経路で移
動する。これに伴って、コンベアベルト(45)上の薬包(1
5)には水平方向の振動が与えられる。尚、該コンベアベ
ルト(45)の両側部には、薬包(15)の脱落を防止するため
のガイド片(46)(46)が立設されている。
Further, the vibration applying mechanism (5) shown in FIG. 5 employs a conveyor belt (45) having flexibility in a horizontal plane, and the conveyor belt (45) has bending guides arranged on both sides thereof. Guided by (55) and (56), it moves along a curved path in the horizontal plane. Along with this, the medicine package (1
Horizontal vibration is applied to 5). It should be noted that guide pieces (46) (46) for preventing the medicine package (15) from falling off are provided upright on both sides of the conveyor belt (45).

【0027】更に図6に示す振動付加機構(5)は、ガイ
ド片(46)(46)を具えたコンベアベルト(45)の両側面に、
夫々圧電振動子(57)を接触させて配置しており、該圧電
振動子(57)を駆動することによって、該コンベアベルト
(45)上の薬包(15)に水平方向の振動を与えるものであ
る。
Further, the vibration adding mechanism (5) shown in FIG. 6 is provided with the guide pieces (46) (46) on both sides of the conveyor belt (45).
The piezoelectric vibrators (57) are arranged in contact with each other, and by driving the piezoelectric vibrators (57), the conveyor belt
(45) It gives a horizontal vibration to the medicine package (15).

【0028】薬包検出工程では、図1に示す光学センサ
(6)によって、薬包(15)に予め印刷されている検出マー
クが光学的に検出されて、該検出信号が検査装置(3)へ
供給される。
In the medicine package detecting step, the optical sensor shown in FIG.
By (6), the detection mark preprinted on the medicine package (15) is optically detected, and the detection signal is supplied to the inspection device (3).

【0029】画像認識処理工程には、図7に示す如くコ
ンベアベルト(44)上の薬包(15)を撮影すべきCCDカメ
ラ(7)が下向き配置されている。又、コンベアベルト(4
4)を挟んでCCDカメラ(7)の下方位置には照明器(71)
が上向きに設置されており、半透明のコンベアベルト(4
4)を通して薬包(15)を裏面から照明する。
In the image recognition processing step, as shown in FIG. 7, the CCD camera (7) for photographing the medicine package (15) on the conveyor belt (44) is arranged downward. In addition, the conveyor belt (4
The illuminator (71) is located below the CCD camera (7) across the 4).
Are installed facing up, and a semi-transparent conveyor belt (4
Illuminate the medicine package (15) from the back side through 4).

【0030】CCDカメラ(7)から得られる画像信号は
マイクロコンピュータ等から構成さる検査装置(3)へ送
られて、薬包(15)に封入されている錠剤(10)の個数がカ
ウントされる。検査装置(3)にはディスプレイ(8)が接
続されており、後述する画像処理の過程や、異常の判定
された薬包(15)については、その旨の警告メッセージと
共に、該薬包(15)の画像が映し出される。
The image signal obtained from the CCD camera (7) is sent to the inspection device (3) composed of a microcomputer and the like, and the number of tablets (10) enclosed in the medicine package (15) is counted. . A display (8) is connected to the inspection device (3), and with respect to a process of image processing described later and a medicine package (15) determined to be abnormal, the medicine package (15) is accompanied by a warning message to that effect. ) Image is displayed.

【0031】検査装置(3)は、図1に示す如く画像認識
処理回路(31)、判定回路(32)及び制御回路(33)を具えて
いる。画像認識処理回路(31)は、CCDカメラ(7)から
の画像信号を受けてこれに画像認識処理を施すものであ
る。判定回路(32)は、画像認識処理回路(31)によって検
知された錠剤の個数と制御用コンピュータ(2)から得ら
れる処方箋情報Iとを比較して、異常を判定するもので
ある。異常判定信号NGは、制御用コンピュータ(2)及
び制御回路(33)へ供給される。制御回路(33)は、判定回
路(32)からの判定結果、光学センサ(6)からの検出信
号、画像認識処理回路(31)からの画像認識処理信号等を
受けて、前述の搬送機構(4)、振動付加機構(5)、CC
Dカメラ(7)、ディスプレイ(8)、仕分け装置(9)等の
動作を制御するものである。
The inspection device (3) comprises an image recognition processing circuit (31), a judgment circuit (32) and a control circuit (33) as shown in FIG. The image recognition processing circuit (31) receives an image signal from the CCD camera (7) and performs image recognition processing on the image signal. The judgment circuit (32) judges the abnormality by comparing the number of tablets detected by the image recognition processing circuit (31) with the prescription information I obtained from the control computer (2). The abnormality determination signal NG is supplied to the control computer (2) and the control circuit (33). The control circuit (33) receives the determination result from the determination circuit (32), the detection signal from the optical sensor (6), the image recognition processing signal from the image recognition processing circuit (31), etc. 4), vibration adding mechanism (5), CC
It controls the operations of the D camera (7), the display (8), the sorting device (9) and the like.

【0032】仕分け装置(9)は、検査装置(3)によって
異常が判定された薬包(15)と、異常の判定されなった薬
包(15)とを仕分けして、異常のある薬包(15)は排除し、
異常のない薬包(15)のみを後段へ排出するものである。
The sorting device (9) sorts the medicine package (15) whose abnormality has been determined by the inspection device (3) and the medicine package (15) which has not been determined to be abnormal, and which has an abnormality. Eliminate (15),
Only the normal medicine package (15) is discharged to the subsequent stage.

【0033】図8は、上述の検査装置(3)の動作を表わ
している。先ずステップS1にて、制御用コンピュータ
(2)から判定回路(32)へ処方箋情報をダウンロードした
後、ステップS2にて、搬送機構(4)及び振動付加機構
(5)の駆動を開始する。次にステップS3にて、光学セ
ンサ(6)によって、薬包(15)に予め印刷されている検出
マークが検出されたどうかを判断し、YESのときは、
更にステップS4にて所定時間が経過したかどうか、即
ち光学センサ(6)の下方位置を通過した薬包(15)がCC
Dカメラ(7)の下方位置まで搬送されたかどうかを判断
する。
FIG. 8 shows the operation of the above-mentioned inspection device (3). First, in step S1, a control computer
After downloading the prescription information from (2) to the determination circuit (32), in step S2, the transport mechanism (4) and the vibration adding mechanism are added.
Start driving (5). Next, in step S3, it is judged whether or not the detection mark printed in advance on the medicine package (15) is detected by the optical sensor (6).
Further, in step S4, it is determined whether the predetermined time has passed, that is, the medicine package (15) that has passed the position below the optical sensor (6) is CC
It is determined whether or not it has been conveyed to a position below the D camera (7).

【0034】ステップS4にてYESと判断されたとき
は、ステップS5にて搬送機構(4)及び振動付加機構
(5)を停止させ、CCDカメラ(7)の下方位置、即ち検
査位置の薬包(15)が静止した状態で、ステップS6の画
像認識処理回路(31)による画像認識処理へ移行する。画
像認識処理の具体的手続きについては後述する。
If YES is determined in step S4, the transport mechanism (4) and the vibration adding mechanism are determined in step S5.
When (5) is stopped and the medicine package (15) at the lower position of the CCD camera (7), that is, the inspection position is stationary, the image recognition processing by the image recognition processing circuit (31) in step S6 is performed. The specific procedure of the image recognition process will be described later.

【0035】画像認識処理の終了後、ステップS7に
て、判定回路(32)は、ダウンロードされた処方箋情報と
画像認識処理によって得られた錠剤の個数とを比較し
て、両者の間にエラー(不一致)があるかを判断し、YE
SのときはステップS8に移行する。これによって、制
御回路(33)及び制御用コンピュータ(2)に対し、異常判
定信号NGが発せられ、これに応じて制御回路(33)は、
ディスプレイ(8)に、当該薬包(15)について異常が判定
された旨の警告メッセージを表示させる。又、制御用コ
ンピュータ(2)は、錠剤包装装置(1)に対し、異常のあ
った薬包(15)についての再包装指示を発する。
After the image recognition processing is completed, in step S7, the judgment circuit (32) compares the downloaded prescription information with the number of tablets obtained by the image recognition processing, and an error ( It is judged whether there is (mismatch) and YE
If S, the process proceeds to step S8. As a result, the abnormality determination signal NG is issued to the control circuit (33) and the control computer (2), and the control circuit (33) accordingly responds to the abnormality determination signal NG.
The display (8) displays a warning message indicating that an abnormality has been determined for the medicine package (15). Further, the control computer (2) issues a repacking instruction to the tablet packaging device (1) regarding the abnormal medicine package (15).

【0036】ステップS7にてNOと判断されたとき
は、ステップS9にて全ての薬包についての検査が終了
したかどうかを判断し、NOのときは、ステップS2へ
戻って検査を繰り返すのである。
When NO is determined in step S7, it is determined in step S9 whether or not the inspection for all medicine packages is completed. When NO is determined, the process returns to step S2 and the inspection is repeated. .

【0037】図9は、画像認識処理回路(31)が実行する
一連の画像認識処理手続きを示しており、先ずステップ
S11にて、CCDカメラ(7)からの原画像を取り込
む。図15は画像認識処理回路(31)に取り込まれた原画
像の一例である。この例では、薬包内に9個の錠剤が封
入されており、この内の8個は互いに接触している。
尚、図15の原画像には、錠剤の画像部分の周囲に若干
のノイズが混入している。
FIG. 9 shows a series of image recognition processing procedures executed by the image recognition processing circuit (31). First, in step S11, the original image from the CCD camera (7) is captured. FIG. 15 shows an example of the original image captured by the image recognition processing circuit (31). In this example, nine tablets are enclosed in the medicine package, and eight of them are in contact with each other.
In the original image in FIG. 15, some noise is mixed around the image portion of the tablet.

【0038】次に図9のステップS12にて、原画像を
所定のスレッショルドレベルで2値化する。これによっ
て、原画像を構成する各画素は“0”又は“1”で表わ
されることになる。図16は、“0”を白、“1”を黒
で表わした2値画像を示している。該2値画像には、錠
剤の画像部分の周囲に、図15の原画像に含まれていた
ノイズが残存したままである。
Next, in step S12 of FIG. 9, the original image is binarized at a predetermined threshold level. As a result, each pixel forming the original image is represented by "0" or "1". FIG. 16 shows a binary image in which “0” is represented by white and “1” is represented by black. In the binary image, the noise included in the original image of FIG. 15 remains around the image portion of the tablet.

【0039】次に図9のステップS13にて、前記2値
画像に対して収縮及び膨張からなるノイズ除去処理(例
えば「画像処理の基本技法」技術評論社発行、53〜5
6頁参照)を施す。収縮、膨張処理は、画像中の連結成
分の境界画素を全て削除或いは増殖させる処理であっ
て、本実施例では、収縮処理を2回行なった後、膨張処
理を2回行なう。これによって、薬包(15)表面の印字が
画像から削除されると共に、画像中の孤立点が除去され
る。前記の例では、図16の原画像に含まれているノイ
ズが除去されることになる。
Next, in step S13 of FIG. 9, noise removal processing consisting of contraction and expansion of the binary image (for example, "basic technique of image processing", published by Technical Review Co., 53-5).
See page 6). The contraction / expansion process is a process of deleting or multiplying all the boundary pixels of the connected components in the image. In this embodiment, the contraction process is performed twice and the expansion process is performed twice. As a result, the printing on the surface of the medicine package (15) is deleted from the image and the isolated points in the image are removed. In the above example, the noise included in the original image of FIG. 16 is removed.

【0040】続いて、図9のステップS14にて、ノイ
ズ除去処理を経た2値画像に対してラベリング処理(例
えば「画像処理の基本技法」技術評論社発行、45〜4
9頁参照)を施す。ラベリング処理とは、画像データ中
に隣接する画素が存在する場合、それらの画像群を1つ
のグループと見なして、ラベルを割り当てる処理であっ
て、上下左右のいずれかに隣接画素が存在するときに1
グループと見なす4連結ラベリングと、上下左右及び斜
め方向のいずれかに隣接画素が存在する場合に1グルー
プと見なす8連結ラベリングがある。錠剤検査において
は、図形分離の点で優れた4連結ラベリングが有効であ
る。
Subsequently, in step S14 of FIG. 9, labeling processing is performed on the binary image that has been subjected to the noise removal processing (for example, "basic technique of image processing" published by Technical Review Co., Ltd., 45-4).
See page 9). The labeling process is a process in which, when adjacent pixels are present in the image data, those image groups are regarded as one group, and a label is assigned. 1
There are 4-connected labeling that is regarded as a group, and 8-connected labeling that is regarded as 1 group when adjacent pixels exist in any of up, down, left, right, and diagonal directions. In tablet inspection, 4-connection labeling, which is excellent in terms of figure separation, is effective.

【0041】その後、ステップS15にて、ラベルの割
り当てられた画像中の連結成分に対してチェインコード
化処理(例えば「画像処理の基本技法」技術評論社発
行、76〜78頁参照)を施す。チェインコード化処理
とは、連結成分の輪郭または線分を追跡して、その方向
に“0”〜“7”の方向指数(チェインコード)を付与す
る処理であって、錠剤検査においては、ラベルの割り当
てられた各画像について、錠剤の外形によって形成され
る輪郭(外輪郭)と、互いに接触する複数の錠剤の間に生
じる隙間の輪郭(内輪郭)の追跡を行なう。そして、夫々
のラベルについてチェインコードを記録する。
After that, in step S15, the chain coding process (for example, "Basic technique of image processing", published by Technical Review Co., Ltd., pages 76 to 78) is applied to the connected components in the image to which the label is assigned. The chain coding process is a process of tracing the contour or line segment of the connected component and giving a direction index (chain code) of “0” to “7” in that direction. With respect to each of the images assigned to, the contour (outer contour) formed by the outer shape of the tablet and the contour (inner contour) of a gap formed between a plurality of tablets in contact with each other are tracked. Then, the chain code is recorded for each label.

【0042】次に、ラベルの割り当てられた各連結成分
について、記録されている輪郭線のチェインコードに基
づき、錠剤どうしの重なりによって生じる画像の接点を
検出する。
Next, for each connected component to which a label is assigned, the contact point of the image caused by the overlapping of tablets is detected based on the recorded chain code of the contour line.

【0043】図10は接点検出の手続きを表わしてお
り、先ず、ステップS21にて接点候補点を選出する。
接点候補点は、図11に例示する様にチェインコードが
0→6、1→7、2→0、3→1、4→2、5→3、6
→4、7→5のように急激に変化する点であって、0→
6と変化するチェインコードの組合せの場合、0→7→
6や7→7→6のようにチェインコード間に1つ又は2
つのチェインコードが存在するときも変化点とする。従
って、変化点とすべきチェインコードの組合せは全部で
24パターン存在する。
FIG. 10 shows the procedure of contact detection. First, in step S21, contact candidate points are selected.
The contact candidate points have chain codes 0 → 6, 1 → 7, 2 → 0, 3 → 1, 4 → 2, 5 → 3, 6 as illustrated in FIG.
→ 4, 7 → 5 It is a point that changes rapidly, and 0 →
In the case of a combination of 6 and changing chain code, 0 → 7 →
1 or 2 between chain codes like 6 or 7 → 7 → 6
It is also a change point when two chain codes exist. Therefore, there are a total of 24 combinations of chain codes that should be changed.

【0044】次に図10のステップS22にて、接点候
補点において、前後5画素の輪郭線に基づいて該候補点
を中心とする方向変化の角度を計算する。例えば、図1
2(a)の如く2つの錠剤の接触によって生じた接点候補
点であれば、方向変化の角度θは鋭角となるが、図12
(b)の如く1つの錠剤の輪郭線上に生じたノイズに起因
する接点候補であれば、角度θは鈍角となる。従って、
ステップS23にて、角度θを所定のしきい値(例えば
120°)と比較して、しきい値よりも小さいときはス
テップS24にて真の接点と判断し、しきい値以上のと
きはステップS25にて輪郭線上のノイズと判断する。
Next, in step S22 of FIG. 10, at the contact point candidate, the angle of change in direction around the candidate point is calculated based on the contour lines of the front and rear 5 pixels. For example, FIG.
If the contact point is a contact point generated by the contact of two tablets as shown in 2 (a), the angle θ of the direction change is an acute angle.
If the contact point candidate is caused by noise generated on the contour line of one tablet as shown in (b), the angle θ is an obtuse angle. Therefore,
In step S23, the angle θ is compared with a predetermined threshold value (for example, 120 °), and if it is smaller than the threshold value, it is determined to be a true contact point in step S24. In S25, it is determined that the noise is on the contour line.

【0045】図13(a)(b)は夫々、図12(a)(b)に
おける方向変化点近傍の拡大図であって、丸印が図形を
構成する画素を表わしている。ここでは、5→3と変化
するチェインコードが接点候補点として検出され、該候
補点を中心とする前後5つ目の画素の開き角度を、方向
変化の角度として検出している。この場合、図13(a)
の接点候補点が真の接点と判断され、図13(b)の接点
候補点は輪郭線上のノイズと判断して無視される。
FIGS. 13 (a) and 13 (b) are enlarged views in the vicinity of the direction change points in FIGS. 12 (a) and 12 (b), and circles represent pixels forming a figure. Here, a chain code that changes from 5 to 3 is detected as a contact point candidate point, and the opening angle of the fifth pixel before and after the candidate point as the center is detected as the direction change angle. In this case, Fig. 13 (a)
The contact candidate point of is judged to be a true contact, and the contact candidate point of FIG. 13B is judged to be noise on the contour line and ignored.

【0046】錠剤の重なりによる真の接点については、
図14に示す如く互いに一対となる接点のペア(a,
b)、(c,d)が存在する。そこで、図9のステップS
17にて、ラベルの付された全ての連結成分について、
このような接点ペアを作成する。接点ペアの作成には、
例えば下記の条件1〜3を満足する2つの接点を発見す
る方法が採用される。
Regarding the true contact point due to the overlapping of tablets,
As shown in FIG. 14, a pair of contacts (a,
b) and (c, d) are present. Therefore, step S in FIG.
At 17, for all labeled connected components,
Create such contact pairs. To create a contact pair,
For example, a method of discovering two contact points satisfying the following conditions 1 to 3 is adopted.

【0047】(条件1) ペアの判断をすべき2つの接点
について、互いの接点ベクトル(例えば図14の接点
a、bについては、接点a、bにおける方向変化のベク
トルA、B)のなす角度θ1(0°≦θ1≦180°)が、
所定のしきい値(例えば150°)以上である。
(Condition 1) The angle formed by the contact points of the two contact points to be judged as a pair (for example, for the contact points a and b in FIG. 14, the direction change vectors A and B at the contact points a and b). θ 1 (0 ° ≤ θ 1 ≤ 180 °) is
It is equal to or more than a predetermined threshold value (for example, 150 °).

【0048】(条件2) 注目する接点ベクトルと、その
接点から他の接点へ至る直線(例えば図14の接点a,
bについては、接点aから接点bに至る直線E)のなす
角度θ2が所定のしきい値(例えば150°)以上であ
る。
(Condition 2) A contact vector of interest and a straight line from that contact to another contact (for example, contact a in FIG. 14,
Regarding b, the angle θ 2 formed by the straight line E from the contact point a to the contact point b is not less than a predetermined threshold value (for example, 150 °).

【0049】(条件3) 上記条件1及び2を満たす接点
ペアの中で、その2点間の距離が所定のしきい値(円形
の錠剤の場合は例えばその直径の0.3〜1.0倍)以下
のもので、且つ最小である。
(Condition 3) In the contact point pair satisfying the above conditions 1 and 2, the distance between the two points has a predetermined threshold value (in the case of a circular tablet, for example, its diameter is 0.3 to 1.0). It is less than or equal to 2 times) and the minimum.

【0050】図14の場合、接点aとbや、cとdは、
ペアと判断されるが、接点aとcや、aとdはペアとは
判断されない。
In the case of FIG. 14, the contact points a and b and c and d are
Although it is determined to be a pair, the contact points a and c or a and d are not determined to be a pair.

【0051】全てのラベルについて接点ペアを作成した
後、図9のステップS18にて、ペアと判断された2つ
の接点を互いに直線で結んで境界線を作成し、互いに連
結して1つのラベルが付されている図形要素を、該境界
線にて2つの錠剤の図形の連結成分に分離する。この処
理は、境界線上の画素“1”を“0”に置き換えること
によって行なわれる。
After the contact pairs have been created for all the labels, in step S18 of FIG. 9, the two contacts determined to be a pair are connected to each other by a straight line to create a boundary line. The attached graphic element is separated into the connected components of the two tablet graphics at the boundary line. This processing is performed by replacing the pixel "1" on the boundary with "0".

【0052】図17は、図16の2値画像の例におい
て、互いに接触している2つの錠剤の接触部に夫々接点
ペアを作成し、これらの接点ペアを相互に連結して境界
線を作成した様子を表わし、図18は、2値画像を前記
境界線にて個々の錠剤の画像に分断した様子を表わして
いる。
FIG. 17 is a diagram showing an example of the binary image shown in FIG. 16, in which contact pairs are created at the contact portions of two tablets that are in contact with each other, and these contact pairs are interconnected to create a boundary line. FIG. 18 shows a state in which the binary image is divided into images of individual tablets at the boundary line.

【0053】その後、図9のステップS19にて、個々
の錠剤の画像に分断された2値画像を対象として再ラベ
リングを施す。そして、ステップS20にてラベル数を
カウントすることによって、錠剤の数量を認識するので
ある。図18の例では、錠剤の個数が9個とカウントさ
れる。
Then, in step S19 of FIG. 9, relabeling is performed on the divided binary image of the image of each tablet. Then, the number of tablets is recognized by counting the number of labels in step S20. In the example of FIG. 18, the number of tablets is counted as 9.

【0054】上記画像認識処理方式によれば、特に錠剤
の重なり領域が小さい場合に正確な接点ペアの作成が行
なわれ、この結果、極めて高い精度で錠剤の数量を認識
することが出来る。
According to the image recognition processing method described above, an accurate contact pair is created especially when the overlapping area of tablets is small, and as a result, the number of tablets can be recognized with extremely high accuracy.

【0055】図19は、図9のステップS13の収縮処
理にて、互いに重なった2つの錠剤の画像を効率的に分
離するための処理方法を表わしている。即ち、前述の境
界画素の削除に加え、図19に示す3×3画素の2値状
態が図示のパターンを有する場合に、二重丸を付した位
置の画素も同時に“0”とする。
FIG. 19 shows a processing method for efficiently separating the images of two tablets which overlap each other in the contraction processing of step S13 of FIG. That is, in addition to the deletion of the boundary pixels described above, when the binary state of 3 × 3 pixels shown in FIG. 19 has the illustrated pattern, the pixels at the positions with double circles are also set to “0” at the same time.

【0056】又、他の処理方法として、図19のパター
ンが表われた場合、四角印を付した位置の画素が“1”
のときにのみ、二重丸を付した位置の画素を“0”とす
る方法も可能である。この方法は、図19のパターンが
真に錠剤の重なりによって生じたパターンかどうかを判
断した後に二重丸の画素を収縮させることを目的として
いる。この判断を加えることによって、カプセルの錠剤
の蓋の部分で生じるエッジを錠剤の重なりと誤判断する
ことを防止できる。
As another processing method, when the pattern of FIG. 19 is displayed, the pixel at the position marked with a square is "1".
It is also possible to set the pixel at the position marked with a double circle to "0" only in the case of. This method is intended to shrink the double circle pixels after determining whether or not the pattern of FIG. 19 is truly a pattern caused by the overlapping of tablets. By adding this determination, it is possible to prevent erroneous determination that the edge generated in the capsule lid portion of the capsule is the tablet overlap.

【0057】更に、収縮処理においては、孤立点を除去
するため処理を追加することが可能であって、例えば注
目する画素の近傍8画素が全て“1”の場合、注目画素
を“0”とする方法の他、図20(a)(b)の如く近傍1
2画素または近傍8画素が全て“1”の場合、これらの
画素によって囲まれた画素を“1”とし、全て“0”の
場合は“0”とする方法が採用出来る。後者の方法は基
本的に連結2画素以下の孤立点を除去することを目的と
しているが、図20(c)に示す様な孤立点は意味のある
画素と判断して、除去しない。
Further, in the contraction process, it is possible to add a process for removing isolated points. For example, if all 8 pixels in the vicinity of the pixel of interest are "1", the pixel of interest is set to "0". In addition to the above method, as shown in FIGS.
A method can be adopted in which when two pixels or eight neighboring pixels are all "1", a pixel surrounded by these pixels is "1", and when all are "0". The latter method basically aims to remove the isolated points of two or less connected pixels, but the isolated points as shown in FIG. 20C are judged to be meaningful pixels and are not removed.

【0058】上述の図9に示す画像認識処理方式は、特
に錠剤の重なり領域が小さい場合に有効であるが、図2
1は、錠剤の重なり領域が大きい場合に有効な画像認識
処理方式の手順を表わしている。従って、図9の方法で
接点ペアの検出に失敗したとき、図21の方法で画像の
分離を行なえば、確実な数量認識が可能となる。
The image recognition processing method shown in FIG. 9 described above is particularly effective when the overlapping area of the tablets is small.
Reference numeral 1 represents the procedure of the image recognition processing method which is effective when the tablet overlapping area is large. Therefore, when the detection of the contact point pair fails by the method of FIG. 9, if the images are separated by the method of FIG. 21, the reliable quantity recognition becomes possible.

【0059】先ずステップS31にて、CCDカメラ
(7)から512画素×512ラインの濃淡画像を取り込
む。この場合も、図1の如く照明器(71)による照明は薬
包(15)の下方から行なう。これは、薬包(15)の上方から
の照明を採用した場合、薬包表面での反射によって錠剤
の画像情報が欠落したり、表面に刻みが入った錠剤やカ
プセルの錠剤の場合に、刻みやカプセルの段部がエッジ
として検出される欠点があるからである。
First, in step S31, a CCD camera
A grayscale image of 512 pixels × 512 lines is taken in from (7). Also in this case, the illumination by the illuminator (71) is performed from below the medicine package (15) as shown in FIG. This is because when the illumination from above the medicine package (15) is adopted, the image information of the tablet is lost due to the reflection on the surface of the medicine package, or in the case of tablets with knurled surfaces or capsule tablets This is because the step portion of the capsule is detected as an edge.

【0060】次に、前記濃淡画像を2値化することな
く、ステップS32にてコントラスト変換を施す。この
際に用いる濃度変換式は周知のところである(例えば雑
誌「エレクトロニクスライフ」1989年2月号145〜153頁
参照)。これによって、錠剤の重なり部分の抽出が容易
となる。
Next, contrast conversion is performed in step S32 without binarizing the grayscale image. The density conversion formula used in this case is well known (see, for example, the magazine "Electronic Life", February 1989, pages 145-153). This facilitates extraction of the overlapping portion of the tablet.

【0061】続いて、ステップS33にてエッジ検出フ
ィルタ処理を施す。実施例では、種々のフィルタ処理方
法を検討した結果、最良の方法として、1次微分のso
belフィルタを用いた処理(例えば雑誌「エレクトロ
ニクスライフ」1988年12月号148〜155頁参照)を採用し
た。これによって、錠剤の外形や錠剤間の重なり領域が
輪郭強調される。更にステップS34にて、輪郭強調さ
れた画像に、所定のスレッショルドレベルによる2値化
を施して、輪郭(エッジ)のみを抽出する。
Subsequently, in step S33, edge detection filter processing is performed. In the embodiment, as a result of examining various filter processing methods, as the best method, the first derivative so
A process using a bel filter (see, for example, the magazine "Electronic Life", December 1988, pages 148 to 155) is adopted. As a result, the outline of the tablet and the overlapping area between the tablets are emphasized. Further, in step S34, the contour-enhanced image is binarized at a predetermined threshold level to extract only the contour (edge).

【0062】その後、ステップS35にて細線化を施
す。細線化は、幅のあるエッジ画像の幅方向の中心を通
る芯線を抽出する処理であって、本実施例では、Hildit
chのアルゴリズムを採用する(例えば田村「細線化法に
ついての諸考察」電子通信学会技術研究報告、1975年PR
L75-9966参照)。これによって、複数の錠剤の輪郭線と
重なり部分の境界線が線画像として得られる。
Then, in step S35, thinning is performed. The thinning is a process of extracting a core line passing through the center of the widthwise edge image in the width direction.
Adopt ch algorithm (for example, Tamura “Various considerations on thinning method” IEICE Technical Report, 1975 PR
See L75-9966). As a result, the boundary line of the overlapping portion with the contour lines of the plurality of tablets is obtained as a line image.

【0063】そして、ステップS36にて、上記線画像
からヒゲやノイズを除去する。除去の条件は次のとおり
である。 (1) 1画素の孤立点 (2) 分岐点や交差点を含まない、連結数20画素以下
の線 (3) 端点と分岐点または交差点の間の連結画素数が1
0以下の線
Then, in step S36, the mustache and noise are removed from the line image. The conditions for removal are as follows. (1) 1-pixel isolated point (2) Lines that do not include branch points or intersections and have 20 or fewer connected pixels (3) The number of connected pixels between an end point and a branch point or intersection is 1
Lines less than 0

【0064】更にステップS37にて、次の2値画像と
の差分抽出ステップ(S38)に必要な有効細線の選択を
行なう。これは、前述のステップS36によっても除去
されずに残存する長いヒゲやループ状の擬線を除去する
ための手続きであって、図22に、その具体的手順を表
わしている。
Further, in step S37, an effective thin line necessary for the difference extraction step (S38) with the next binary image is selected. This is a procedure for removing long whiskers and loop-like pseudo-rays that remain without being removed even in step S36 described above, and FIG. 22 shows a specific procedure thereof.

【0065】先ずステップS41にて、上記線画像に基
づいて、内輪郭と外輪郭を抽出する。次にステップS4
2にて、これらの輪郭線を内側及び外側へ膨張させて、
サーチエリアを作成する。例えば図23の如く2つの円
形錠剤が重なっている線画像の場合、細線Lを囲んで二
重線M、Nを作成し、この間をサーチエリアとする。サ
ーチエリア外の線Eは対象外として、除去される。
First, in step S41, an inner contour and an outer contour are extracted based on the line image. Then step S4
At 2, inflate these contour lines inward and outward,
Create a search area. For example, in the case of a line image in which two circular tablets are overlapped as shown in FIG. 23, a double line M, N is created surrounding a thin line L, and the area between them is used as a search area. The line E outside the search area is excluded from the target and is removed.

【0066】続いて図22のステップS43にて、サー
チエリア内の細線に存在する分岐点或いは交差点を検出
する。図23の例では、サーチエリア内の円で囲った位
置に分岐点が存在している。
Then, in step S43 of FIG. 22, a branch point or an intersection existing in the fine line in the search area is detected. In the example of FIG. 23, a branch point exists at a position surrounded by a circle in the search area.

【0067】その後、図22のステップS44にて、分
岐点或いは交差点から20画素以上の距離をおいてサー
チエリア外へ飛び出している線を有効細線と判断する。
図23の例では、図中のA及びDが有効細線であって、
他の線B、Cは無効細線として除去される。尚、線Dは
本来無効とすべき細線であるが、錠剤の数量認識におい
ては後述の如く問題とならない。
After that, in step S44 of FIG. 22, a line protruding from the search area at a distance of 20 pixels or more from the branch point or the intersection is determined to be an effective thin line.
In the example of FIG. 23, A and D in the figure are effective thin lines,
The other lines B and C are removed as invalid thin lines. The line D is a thin line that should be invalidated originally, but it does not pose a problem in recognizing the number of tablets as described later.

【0068】有効細線の選択の後、図21のステップS
38にて、別途作成した2値原画像と有効細線の画像の
差分を抽出し、これによって互いに連結する2つの錠剤
の画像を切り離す。
After selecting the effective thin line, step S in FIG.
At 38, the difference between the separately created binary original image and the image of the effective thin line is extracted, thereby separating the images of the two tablets that are connected to each other.

【0069】図24は、図23の例における差分抽出の
結果を表わしている。図示の如く2つの錠剤の画像が有
効細線によって切り離されている。尚、前記の線Dが除
去されずに残存したことによる影響が、図24の2値画
像に現われているが、数量の認識には問題とならない。
その後、図21のステップS39にてラベリングを施
し、更にステップS40にてラベル数をカウントして、
錠剤の数量を認識するのである。
FIG. 24 shows the result of the difference extraction in the example of FIG. As shown, the images of the two tablets are separated by an effective thin line. The effect of the line D remaining without being removed appears in the binary image in FIG. 24, but this does not cause any problem in recognizing the quantity.
Then, labeling is performed in step S39 of FIG. 21, and the number of labels is counted in step S40.
It recognizes the quantity of tablets.

【0070】上記の画像認識処理方式によれば、2つの
錠剤が大きく重なっている場合でも、重なり部分の近辺
から照明光が漏れて、エッジ検出によって確実に境界線
が検出されるから、画像の分離は確実に行なわれ、正確
な数量認識が実現される。又、図19の方式と図21の
方式を組み合わせることによって、錠剤の重なり状態の
区々な薬包の検査も可能となる。
According to the above image recognition processing method, even when two tablets are largely overlapped, the illumination light leaks from the vicinity of the overlapped portion and the boundary line is surely detected by the edge detection. Separation is ensured and accurate quantity recognition is realized. Further, by combining the method of FIG. 19 and the method of FIG. 21, it becomes possible to inspect various medicine packages in the overlapping state of tablets.

【0071】尚、図19或いは図21の画像認識処理方
式に加え、分断された錠剤の2値画像の周囲長さや面
積、その他の形状的特徴データを算出して、予め登録さ
れている錠剤の種類別のデータと比較することによっ
て、数量認識の精度を更に上げ、或いは錠剤の種類判別
を行なうことも可能となる。
In addition to the image recognition processing method of FIG. 19 or FIG. 21, the peripheral length and area of the binary image of the divided tablet, and other shape characteristic data are calculated to calculate the registered tablet in advance. By comparing with the data for each type, it is possible to further improve the accuracy of quantity recognition or determine the type of tablet.

【0072】上述の錠剤検査システムによれば、錠剤包
装装置(1)から排出される薬包(15)内の複数の錠剤(10)
が互いに重なっている場合でも、振動付加機構(5)によ
ってこれらの錠剤(10)に振動が与えられることにより、
重なり合った錠剤どうしが引き離される。この結果、画
像認識処理による数量認識が更に正確なものとなる。
According to the above-mentioned tablet inspection system, a plurality of tablets (10) in the medicine package (15) discharged from the tablet packing device (1).
Even when the tablets overlap with each other, by vibrating these tablets (10) by the vibration adding mechanism (5),
Overlapping tablets are pulled apart. As a result, the quantity recognition by the image recognition processing becomes more accurate.

【0073】又、上述の錠剤検査システムによれば、処
方箋情報と個数の一致しない薬包(15)が自動的に検出さ
れて、該薬包(15)は仕分け装置(9)にて排除されるの
で、従来の目視による検査及び手作業による排除は不要
である。然も、該薬包(15)については、錠剤包装装置
(1)に対して再包装指令が発せられるので、異常の有無
に拘わらず、常に処方箋で指示されている全ての薬包(1
5)が得られることになる。
Further, according to the above-mentioned tablet inspection system, the medicine package (15) whose number does not match the prescription information is automatically detected, and the medicine package (15) is eliminated by the sorting device (9). Therefore, conventional visual inspection and manual exclusion are not required. Of course, for the medicine package (15), a tablet packing device
Since a repacking order is issued to (1), regardless of whether there is an abnormality, all medicine packages (1
5) will be obtained.

【0074】上記実施例の説明は、本発明を説明するた
めのものであって、特許請求の範囲に記載の発明を限定
し、或は範囲を減縮する様に解すべきではない。又、本
発明の各部構成は上記実施例に限らず、特許請求の範囲
に記載の技術的範囲内で種々の変形が可能であることは
勿論である。
The above description of the embodiments is for explaining the present invention, and should not be construed as limiting the invention described in the claims or reducing the scope. The configuration of each part of the present invention is not limited to the above-mentioned embodiment, and it goes without saying that various modifications can be made within the technical scope described in the claims.

【0075】例えば、振動付加工程を挟んでCCDカメ
ラを2台設置し、1台目のCCDカメラを用いた画像認
識処理によって異常が判定された薬包については、次の
振動付加工程で振動を与えた後、2台目のCCDカメラ
を用いた画像認識処理を行なって、再度、異常を確認す
る二重チェック方式を採用することが出来る。この場
合、1回目の画像認識処理によって異常が判定されなか
った薬包は、次の振動付加工程で振動を与えることな
く、仕分け装置へ送り込むことが出来る。尚、この二重
チェックは、画像認識処理工程と振動付加工程を同じ位
置で行なう構成とすれば、1台のカメラによって行なう
ことが可能である。
For example, with respect to the medicine package in which two CCD cameras are installed with the vibration adding step interposed therebetween and the abnormality is judged by the image recognition processing using the first CCD camera, the vibration is applied in the next vibration adding step. It is possible to adopt a double-check method in which the image recognition processing using the second CCD camera is performed after the application, and the abnormality is checked again. In this case, the medicine package that has not been determined to be abnormal by the first image recognition process can be sent to the sorting device without being vibrated in the next vibration adding step. This double check can be performed by one camera if the image recognition processing step and the vibration adding step are configured to be performed at the same position.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明に係る錠剤検査システムの構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a configuration of a tablet inspection system according to the present invention.

【図2】錠剤包装装置の構成を示す一部破断斜視図であ
る。
FIG. 2 is a partially cutaway perspective view showing the configuration of the tablet packaging device.

【図3】振動付加機構の一構成例を示す側面図である。FIG. 3 is a side view showing a configuration example of a vibration adding mechanism.

【図4】振動付加機構の他の構成例を示す側面図であ
る。
FIG. 4 is a side view showing another configuration example of the vibration adding mechanism.

【図5】振動付加機構の更に他の構成例を示す平面図で
ある。
FIG. 5 is a plan view showing still another configuration example of the vibration adding mechanism.

【図6】振動付加機構の更に他の構成例を示す平面図で
ある。
FIG. 6 is a plan view showing still another configuration example of the vibration adding mechanism.

【図7】画像認識処理工程の機器配置を示す斜視図であ
る。
FIG. 7 is a perspective view showing a device arrangement in an image recognition processing step.

【図8】薬包の検査手続きを示すフローチャートであ
る。
FIG. 8 is a flowchart showing an inspection procedure of a medicine package.

【図9】画像認識処理の手続きを示すフローチャートで
ある。
FIG. 9 is a flowchart showing a procedure of image recognition processing.

【図10】接点検出の手順を示すフローチャートであ
る。
FIG. 10 is a flowchart showing a procedure of contact detection.

【図11】接点候補点の選出方法を説明する図である。FIG. 11 is a diagram illustrating a method of selecting contact point candidate points.

【図12】真の接点とノイズの判別方法を説明する図で
ある。
FIG. 12 is a diagram illustrating a method of discriminating between a true contact point and noise.

【図13】接点を中心とする方向変化角度の算出方法を
説明する図である。
FIG. 13 is a diagram illustrating a method of calculating a direction change angle around a contact point.

【図14】接点ペアの判別方法を説明する図である。FIG. 14 is a diagram illustrating a method of discriminating contact pairs.

【図15】複数の錠剤の原画像を示す図である。FIG. 15 is a diagram showing original images of a plurality of tablets.

【図16】図15の例における2値画像を示す図であ
る。
16 is a diagram showing a binary image in the example of FIG.

【図17】同上の例において接点ペアが作成された状態
を示す図である。
FIG. 17 is a diagram showing a state in which a contact pair is created in the above example.

【図18】同上の例において複数の錠剤の画像が分断さ
れた状態を示す図である。
FIG. 18 is a diagram showing a state in which images of a plurality of tablets are divided in the above example.

【図19】収縮処理において、図形分離の効率化を図る
方法を説明する図である。
FIG. 19 is a diagram illustrating a method of increasing the efficiency of figure separation in the contraction processing.

【図20】収縮処理において、孤立点除去の効率化を図
る方法を説明する図である。
FIG. 20 is a diagram illustrating a method for improving the efficiency of isolated point removal in the contraction processing.

【図21】他の画像認識処理の手順を示すフローチャー
トである。
FIG. 21 is a flowchart showing the procedure of another image recognition process.

【図22】有効細線の選択手順を示すフローチャートで
ある。
FIG. 22 is a flowchart showing a procedure for selecting an effective thin line.

【図23】分岐点や交差点に生じるヒゲや擬線を除去す
る方法を説明する図である。
FIG. 23 is a diagram illustrating a method of removing a beard or a pseudo line generated at a branch point or an intersection.

【図24】有効細線との差分抽出によって得られた2値
画像を示す図である。
FIG. 24 is a diagram showing a binary image obtained by extracting a difference from an effective thin line.

【符号の説明】 (1) 錠剤包装装置 (2) 制御用コンピュータ (3) 検査装置 (4) 搬送機構 (5) 振動付加機構 (6) 光学センサ (7) CCDカメラ (8) ディスプレイ (9) 仕分け装置 (10) 錠剤 (15) 薬包[Explanation of symbols] (1) Tablet packing device (2) Control computer (3) Inspection device (4) Conveying mechanism (5) Vibration adding mechanism (6) Optical sensor (7) CCD camera (8) Display (9) Sorting equipment (10) Tablets (15) Medicine packages

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】 光透過性の薬包内に処方箋情報に従った
複数の錠剤を封入するための錠剤包装装置に接続し、該
装置から排出される薬包内の錠剤の画像を認識すること
によって、錠剤の検査を行なう錠剤検査システムであっ
て、 錠剤包装装置から排出される薬包を所定の検査位置まで
搬送する搬送手段と、 錠剤包装装置から排出されて検査位置へ送り込まれるべ
き薬包、或いは検査位置の薬包に対して振動を付加し
て、薬包内の錠剤の重なりを除去するための振動付加機
構と、 検査位置の薬包を撮影する撮像手段と、 撮像手段から得られる画像を処理して薬包内の錠剤を認
識する画像認識処理手段と、 各薬包についての画像認識の結果と処方箋情報とを比較
して、異常を判定する判定手段とを具えたことを特徴と
する錠剤検査システム。
1. A tablet packaging device for enclosing a plurality of tablets according to prescription information in a light-transmitting medicine package, and recognizing an image of the tablet in the medicine package discharged from the device. A tablet inspection system for inspecting tablets by means of: a conveying means for conveying a medicine package discharged from a tablet packaging device to a predetermined inspection position; and a medicine package to be discharged from the tablet packaging device and sent to the inspection position. Alternatively, a vibration adding mechanism for applying vibration to the medicine package at the inspection position to remove the overlap of the tablets in the medicine package, an imaging unit for photographing the medicine package at the inspection position, and an imaging unit An image recognition processing means for recognizing a tablet in a medicine package by processing an image and a judging means for judging an abnormality by comparing the result of image recognition for each medicine package with prescription information are characterized. And tablet inspection system.
【請求項2】 振動付加機構は、薬包内の錠剤に対して
垂直方向の振動を与える請求項1に記載の錠剤検査シス
テム。
2. The tablet inspection system according to claim 1, wherein the vibration adding mechanism applies vertical vibration to the tablet in the medicine package.
【請求項3】 振動付加機構は、薬包内の錠剤に対して
水平方向の振動を与える請求項1に記載の錠剤検査シス
テム。
3. The tablet inspection system according to claim 1, wherein the vibration adding mechanism applies horizontal vibration to the tablets in the medicine package.
【請求項4】 振動付加機構は、薬包を載せたコンベア
ベルトに振動を与える振動発生源を具えている請求項2
又は請求項3に記載の錠剤検査システム。
4. The vibration adding mechanism comprises a vibration generating source for vibrating a conveyor belt carrying a medicine package.
Alternatively, the tablet inspection system according to claim 3.
【請求項5】 振動付加機構は、薬包を載せたコンベア
ベルトの移動経路を周期的に屈曲させるガイド機構を具
えている請求項2又は請求項3に記載の錠剤検査システ
ム。
5. The tablet inspection system according to claim 2, wherein the vibration adding mechanism includes a guide mechanism that periodically bends the movement path of the conveyor belt on which the medicine package is placed.
【請求項6】 撮像手段による薬包の撮影中は振動付加
機構を停止させる制御手段を具ている請求項1乃至請求
項5の何れかに記載の錠剤検査システム。
6. The tablet inspection system according to claim 1, further comprising control means for stopping the vibration adding mechanism during imaging of the medicine package by the imaging means.
【請求項7】 搬送手段は、薬包が検査位置に到達した
時点で一定時間だけ停止する間欠送り機能を具えている
請求項1乃至請求項6の何れかに記載の錠剤検査システ
ム。
7. The tablet inspection system according to claim 1, wherein the conveying means has an intermittent feeding function of stopping for a certain period of time when the medicine package reaches the inspection position.
【請求項8】 薬包が検知位置に到達した時点を検知す
るためのセンサ手段を具えている請求項6又は請求項7
に記載の錠剤検査システム。
8. A sensor means for detecting the time when the medicine package reaches the detection position.
Tablet inspection system described in.
JP15683395A 1995-05-30 1995-05-30 Tablet inspection system Pending JPH08322913A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15683395A JPH08322913A (en) 1995-05-30 1995-05-30 Tablet inspection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15683395A JPH08322913A (en) 1995-05-30 1995-05-30 Tablet inspection system

Publications (1)

Publication Number Publication Date
JPH08322913A true JPH08322913A (en) 1996-12-10

Family

ID=15636361

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15683395A Pending JPH08322913A (en) 1995-05-30 1995-05-30 Tablet inspection system

Country Status (1)

Country Link
JP (1) JPH08322913A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4886915B1 (en) * 2011-09-06 2012-02-29 株式会社Windy Packaging drug inspection system
JP2012065995A (en) * 2010-09-27 2012-04-05 Hitachi Aloka Medical Ltd Ultrasonic diagnostic apparatus
WO2012147907A1 (en) * 2011-04-28 2012-11-01 株式会社湯山製作所 Medicine checking device and apparatus for separately packaging medicines
JP2013017745A (en) * 2011-07-13 2013-01-31 Hitachi Aloka Medical Ltd Drug audit support apparatus
JP2013109691A (en) * 2011-11-24 2013-06-06 Canon Inc Image processing device, image processing method, and image processing program
JP2014213069A (en) * 2013-04-26 2014-11-17 パナソニックヘルスケア株式会社 Tablet inspection device and packaging device
WO2014203656A1 (en) * 2013-06-19 2014-12-24 富士フイルム株式会社 Drug information acquisition device and method
JP2015123975A (en) * 2013-12-25 2015-07-06 キヤノンマーケティングジャパン株式会社 Tablet feeder, control method of tablet feeder, and program
JP2016504141A (en) * 2013-01-25 2016-02-12 センシドーズ エービー Weighing distribution device
JP2017130811A (en) * 2016-01-20 2017-07-27 シャープ株式会社 Image processing apparatus, image processing method, image processing program, and recording medium
JP2017225832A (en) * 2012-01-11 2017-12-28 パナソニックヘルスケアホールディングス株式会社 Medicine supply device
JP2019155143A (en) * 2012-10-03 2019-09-19 株式会社湯山製作所 Medicinal agent inspection system, winding device, feed device, and holder
WO2021166823A1 (en) * 2020-02-21 2021-08-26 富士フイルム富山化学株式会社 Drug identification device and drug identification method

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012065995A (en) * 2010-09-27 2012-04-05 Hitachi Aloka Medical Ltd Ultrasonic diagnostic apparatus
US8943779B2 (en) 2011-04-28 2015-02-03 Yuyama Mfg. Co., Ltd. Medicine inspection device, and medicine packaging device
WO2012147907A1 (en) * 2011-04-28 2012-11-01 株式会社湯山製作所 Medicine checking device and apparatus for separately packaging medicines
JP5196337B1 (en) * 2011-04-28 2013-05-15 株式会社湯山製作所 Drug inspection device and drug packaging device
CN103596540A (en) * 2011-04-28 2014-02-19 株式会社汤山制作所 Medicine checking device and apparatus for separately packaging medicines
US9233767B2 (en) 2011-04-28 2016-01-12 Yuyama Mfg. Co., Ltd. Medicine inspection device, and medicine packaging device
US8966863B2 (en) 2011-04-28 2015-03-03 Yuyama Mfg. Co., Ltd. Medicine inspection device, and medicine packaging device
JP2013017745A (en) * 2011-07-13 2013-01-31 Hitachi Aloka Medical Ltd Drug audit support apparatus
JP4886915B1 (en) * 2011-09-06 2012-02-29 株式会社Windy Packaging drug inspection system
JP2013109691A (en) * 2011-11-24 2013-06-06 Canon Inc Image processing device, image processing method, and image processing program
JP2017225832A (en) * 2012-01-11 2017-12-28 パナソニックヘルスケアホールディングス株式会社 Medicine supply device
JP2019155143A (en) * 2012-10-03 2019-09-19 株式会社湯山製作所 Medicinal agent inspection system, winding device, feed device, and holder
US10961004B2 (en) 2012-10-03 2021-03-30 Yuyama Mfg. Co., Ltd. Medicinal agent inspection system, winding device, feed device, and holder
JP2016504141A (en) * 2013-01-25 2016-02-12 センシドーズ エービー Weighing distribution device
JP2014213069A (en) * 2013-04-26 2014-11-17 パナソニックヘルスケア株式会社 Tablet inspection device and packaging device
JP2015002795A (en) * 2013-06-19 2015-01-08 富士フイルム株式会社 Medicine information acquisition device and method
WO2014203656A1 (en) * 2013-06-19 2014-12-24 富士フイルム株式会社 Drug information acquisition device and method
CN105338945A (en) * 2013-06-19 2016-02-17 富士胶片株式会社 Drug information acquisition device and method
US9922419B2 (en) 2013-06-19 2018-03-20 Fujifilm Corporation Drug information acquisition device and method
JP2015123975A (en) * 2013-12-25 2015-07-06 キヤノンマーケティングジャパン株式会社 Tablet feeder, control method of tablet feeder, and program
JP2017130811A (en) * 2016-01-20 2017-07-27 シャープ株式会社 Image processing apparatus, image processing method, image processing program, and recording medium
WO2021166823A1 (en) * 2020-02-21 2021-08-26 富士フイルム富山化学株式会社 Drug identification device and drug identification method

Similar Documents

Publication Publication Date Title
JPH08322912A (en) Tablet inspection system
JP3332543B2 (en) Tablet inspection system
JP3438925B2 (en) Tablet inspection system
EP2702978A1 (en) Medicine checking device and apparatus for separately packaging medicines
JPH08322913A (en) Tablet inspection system
JPH09231342A (en) Method and device for inspecting tablet
JP3423055B2 (en) Tablet inspection system
JP3658326B2 (en) Foreign object inspection apparatus and method in liquid-filled container
CN111776392B (en) Labeling device, labeling system, labeling method and storage medium
JP7141445B2 (en) Drug determination device and method for detecting boundary concave portion
JP2005227257A (en) Inspection device for peripheral surface of cylindrical container
JP2000009447A (en) Apparatus and method for detecting fault of tape carrier
JPH07200820A (en) Image recognition processing method
JPH06201611A (en) Method for detecting defect of sheetlike printed matter
JP2009167016A (en) Foreign matter removing device, laser printing system, laser print inspection system, and method therefor
JP2002267612A (en) Device and system for inspecting foreign matter in liquid filled in transparent container or the like
JP6816463B2 (en) Saddle stitch inspection equipment and method
JP3278518B2 (en) Method and apparatus for detecting structural and / or pattern defects of an object
WO2023243134A1 (en) Tablet inspection device and tablet inspection method
JP3245771B2 (en) Printing inspection device
WO2023223579A1 (en) Visual inspection assistance device
JPH08101016A (en) Method and device for detecting position of label on tire
JP3290021B2 (en) Bottle color recognition method
JP2002087564A (en) Conveying device
JP2005337894A (en) Label inspection device and inspection method