JPH07200820A - Image recognition processing method - Google Patents

Image recognition processing method

Info

Publication number
JPH07200820A
JPH07200820A JP5334728A JP33472893A JPH07200820A JP H07200820 A JPH07200820 A JP H07200820A JP 5334728 A JP5334728 A JP 5334728A JP 33472893 A JP33472893 A JP 33472893A JP H07200820 A JPH07200820 A JP H07200820A
Authority
JP
Japan
Prior art keywords
image
objects
tablets
images
recognition processing
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.)
Withdrawn
Application number
JP5334728A
Other languages
Japanese (ja)
Inventor
Hitoshi Kihara
均 木原
Nobuo Kuchiki
伸夫 朽木
Yasuhiro Nagai
靖泰 永井
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 JP5334728A priority Critical patent/JPH07200820A/en
Publication of JPH07200820A publication Critical patent/JPH07200820A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To provide an image recognition processing method which can automatically and accurately detect the number of tablets contained in each medicine bag. CONSTITUTION:In e system which detects the number of tablets 9 each contained in each transparent medicine beg 1.5, the beg 15 set at a checking position is photographed by a CCD camera 2. The image acquired by the camera 2 is sent to an image recognition processor 3 which counts the number of tablets 9. In this image recognition processing, a contact part between the images of two tablets 9 is detected and both images are separated from each other at this detected contact pert. Thus, the images of tablets 9 contained in the beg 15 are separated from each other. Then, the number of connection components included in these separated images of tablets 9 are counted.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、複数の物体を撮影した
原画像に基づき、物体の個数を検出する画像認識処理方
法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image recognition processing method for detecting the number of objects based on original images obtained by photographing a plurality of objects.

【0002】[0002]

【従来の技術】従来、病院や薬局における錠剤包装業務
を自動化するべく、図1に示す如き錠剤包装装置(1)が
開発されている。該錠剤包装装置(1)は、複数種類の錠
剤が種類別に収納された錠剤供給ユニット(11)を具え、
該錠剤供給ユニット(11)から排出される各種の錠剤(9)
を、ベルトコンベア(12)(13)を経て透明の分包紙(14)内
へ自動的に投入し、分包機構(17)によって分包紙(14)を
一人分毎に封止するものである。又、分包紙(14)の搬送
路には、分包紙(14)の表面に患者名や用法等を自動的に
印字するための印字機構(図示省略)が配備される。この
様にして得られた分包紙(14)を封止部にて一人分毎に切
り離すことによって、図18に示す患者別の薬袋(15)が
得られる。該薬袋(15)は、患者名や用法等の印刷部(16)
を有し、その中には患者が一度に服用すべき複数種類の
錠剤(9)が必要数だけ封入されているので、便利であ
り、服用に間違いが生じる虞れもない。
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 (9) 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). By separating the packaging paper (14) thus obtained at the sealing portion for each person, the medicine bag (15) for each patient shown in FIG. 18 is obtained. The medicine bag (15) is provided with a printing section (16) for patient name, usage, etc.
In addition, since a necessary number of tablets (9) of a plurality of types to be taken at once by the patient are enclosed therein, it is convenient and there is no risk of mistakes in taking.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記錠
剤包装装置を用いた従来の包装作業においては、1包化
すべき複数の錠剤が正確に1つの薬袋内に封入されたこ
とを、検査員が目視によって確認しており、この煩雑な
検査作業によって包装作業全体の能率が低下する問題が
あった。
However, in the conventional packaging work using the above-mentioned tablet packaging apparatus, the inspector visually confirms that a plurality of tablets to be packaged are accurately enclosed in one medicine bag. However, there is a problem that the efficiency of the whole packaging work is lowered by this complicated inspection work.

【0004】ところで、広く画像認識の分野において、
複数の対象物体の画像に基づいて各物体の輪郭形状や特
徴部分を抽出する方式が種々提案されている(例えば特
公平1-30183〔G06F15-70〕、特公平2-4948〔G06F15-7
0〕、特公平3-57501〔G06F15−70〕等)。しか
しながら、図18に示す如き薬袋(15)内の錠剤(9)の検
査においては、錠剤どうしが互いに重なっていることが
多く、その重なり状態も区々である。この様な場合、従
来の画像認識方式を用いた個数の検出では、互いに重な
った2つの錠剤が1個にカウントされる虞れがあって、
正確な個数の検出が困難である。そこで本発明は、薬袋
内に封入された錠剤の個数を自動的に且つ正確に検出す
ることが出来る画像認識処理方法を提供することを目的
とする。
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.). However, in the inspection of the tablets (9) in the medicine bag (15) as shown in FIG. 18, the tablets are often overlapped with each other, and the overlapping states are also different. In such a case, in the detection of the number of tablets using the conventional image recognition method, there is a possibility that two tablets overlapping each other may be counted as one tablet,
It is difficult to detect the correct number. Therefore, it is an object of the present invention to provide an image recognition processing method capable of automatically and accurately detecting the number of tablets enclosed in a medicine bag.

【0005】[0005]

【課題を解決する為の手段】本発明に係る画像認識処理
方法は、第1ステップにて、複数の物体を撮影した原画
像を2値化する。第2ステップでは、2値化された画像
において、2つの物体が互いに接触し或いは交差する領
域の両端に位置する一対の接点を検出する。次に第3ス
テップにて、上記一対の接点を互いに連結して、2つの
物体の画像の境界線を作成する。そして、第4ステップ
にて、互いに接触する2つの物体の画像を境界線にて切
り離すことにより、複数の物体の画像を個々に分断す
る。その後、第5ステップにて、画像に含まれる連結成
分の個数をカウントする。
An image recognition processing method according to the present invention binarizes an original image obtained by photographing a plurality of objects in a first step. In the second step, a pair of contact points located at both ends of a region where two objects contact or intersect each other are detected in the binarized image. Next, in a third step, the pair of contact points are connected to each other to create a boundary line between the images of the two objects. Then, in a fourth step, the images of the plurality of objects are individually divided by separating the images of the two objects that are in contact with each other at the boundary. Then, in a fifth step, the number of connected components included in the image is counted.

【0006】本発明に係る他の画像認識処理方法は、第
1ステップにて、原画像にコントラスト強調を施し、第
2ステップにて、コントラストの強調された画像に基づ
いて、該画像のエッジを検出する。次に第3ステップに
て、検出されたエッジに細線化を施して有効な細線のみ
を抽出し、更に第4ステップにて、互いに接触する2つ
の物体の画像を前記有効細線にて切り離すことにより、
複数の物体の画像を個々に分断する。その後、第5ステ
ップにて、画像に含まれる連結成分の個数をカウントす
る。
In another image recognition processing method according to the present invention, in the first step, contrast enhancement is applied to the original image, and in the second step, the edge of the image is enhanced based on the contrast-enhanced image. To detect. Next, in the third step, the detected edges are thinned to extract only the effective thin lines, and in the fourth step, the images of the two objects contacting each other are separated by the effective thin lines. ,
Divide images of multiple objects individually. Then, in a fifth step, the number of connected components included in the image is counted.

【0007】[0007]

【作用】上記第1の画像認識処理方法においては、2つ
の物体が互いに接触し、或いは互いに重なって接触して
いる場合、これらの物体の画像の接触部には、例えば図
7に示すa点とb点や、c点とd点の如く、一対となる
接点が生じるため、この様な一対の接点を互いに連結す
れば、2つの物体の境界線が判明する。そこで、2つの
物体の画像を前記境界線にて切り離すことにより、複数
の物体の画像を個々に分断することが出来るのである。
従って、該画像に含まれる連結成分の個数をカウントす
れば、物体の個数を検出することが出来る。
In the first image recognition processing method, when two objects are in contact with each other or in contact with each other in an overlapping manner, the contact points of the images of these objects are, for example, point a shown in FIG. Since a pair of contact points such as point b and point c and point d occur, the boundary line between two objects can be identified by connecting such a pair of contact points to each other. Therefore, by separating the images of the two objects at the boundary line, it is possible to individually separate the images of the plurality of objects.
Therefore, the number of objects can be detected by counting the number of connected components included in the image.

【0008】上記第2の画像認識処理方法においては、
先ず画像にコントラスト変換を施すことによって、複数
の物体の輪郭と互いの接触部が他の画像部分に対して強
調されることになる。次に、コントラストの強調された
画像に基づいて該画像のエッジを検出することにより、
複数の物体の輪郭線と相互の境界線が判明する。これら
のエッジに細線化を施せば、ヒゲやノイズが除去され
て、有効な細線のみを抽出することが出来る。従って、
互いに接触する2つの物体の画像を前記有効細線の位置
にて切り離すことにより、薬袋内の複数の物体の画像を
個々に分断することが出来る。
In the second image recognition processing method,
First, by subjecting an image to contrast conversion, the contours of a plurality of objects and their contact portions are emphasized with respect to other image portions. Then, by detecting the edges of the image based on the contrast-enhanced image,
The contour lines of a plurality of objects and the boundary lines between them are found. If thinning is applied to these edges, beards and noises are removed, and only effective thin lines can be extracted. Therefore,
By separating the images of two objects in contact with each other at the position of the effective thin line, the images of a plurality of objects in the medicine bag can be individually divided.

【0009】[0009]

【発明の効果】本発明に係る画像認識処理方法によれ
ば、互いに接触し或いは重複した物体の画像が確実に切
り離されて、物体の個数が正確に検出される。
According to the image recognition processing method of the present invention, the images of objects which are in contact with each other or overlap with each other are reliably separated, and the number of objects is accurately detected.

【0010】[0010]

【実施例】以下、本発明を錠剤検査システムに実施した
一例について説明する。図1に示す如く、錠剤包装装置
(1)は従来と同様の構成を具えている。錠剤包装装置
(1)から排出される分包紙(14)は更に水平方向に搬送さ
れ、該搬送路の上方位置に、薬袋(15)の表面を撮影する
カメラ(2)が配置されている。又、該搬送路の下方位置
には、薬袋(15)の裏面を照明する平面型の照明具(21)が
配置されている。尚、カメラ(2)は41万画素を有する
白黒のCCDカメラである。
EXAMPLES An example of implementing the present invention in a tablet inspection system will be described below. As shown in Fig. 1, a tablet packing device
(1) has the same structure as the conventional one. Tablet packaging equipment
The packaging paper (14) discharged from (1) is further transported in the horizontal direction, and a camera (2) for photographing the surface of the medicine bag (15) is arranged above the transport path. Further, a planar illuminator (21) for illuminating the back surface of the medicine bag (15) is arranged at a position below the transport path. The camera (2) is a monochrome CCD camera having 410,000 pixels.

【0011】CCDカメラ(2)から得られる画像信号は
マイクロコンピュータ等から構成される画像認識処理装
置(3)へ送られて、薬袋(15)に封入されている錠剤(9)
の個数のカウントに供される。又、画像認識処理装置
(3)にはモニター(4)が接続されており、画像処理の過
程が映し出される。
The image signal obtained from the CCD camera (2) is sent to the image recognition processing device (3) composed of a microcomputer and the like, and the tablet (9) enclosed in the medicine bag (15).
It is used for counting the number of. Also, an image recognition processing device
A monitor (4) is connected to (3) to display the process of image processing.

【0012】図2は、画像認識処理装置(3)が実行する
一連の画像認識処理手続きを示しており、先ずステップ
S1にて、CCDカメラ(2)からの原画像を取り込む。
図8は画像認識処理装置(3)に取り込まれた原画像の一
例である。この例では、薬袋内に9個の錠剤が封入され
ており、この内の8個は互いに接触している。従って、
従来の方式では、個数のカウントが困難であったもので
ある。尚、図8の原画像には、錠剤の画像部分の周囲に
若干のノイズが混入している。
FIG. 2 shows a series of image recognition processing procedures executed by the image recognition processing device (3). First, in step S1, the original image from the CCD camera (2) is captured.
FIG. 8 is an example of an original image captured by the image recognition processing device (3). In this example, nine tablets are enclosed in the medicine bag, and eight of them are in contact with each other. Therefore,
In the conventional method, it is difficult to count the number. In the original image in FIG. 8, some noise is mixed around the image portion of the tablet.

【0013】次に図2のステップS2にて、原画像を所
定のスレッショルドレベルで2値化する。これによっ
て、原画像を構成する各画素は“0”又は“1”で表わ
されることになる。図9は、“0”を白、“1”を黒で
表わした2値画像を示している。該2値画像には、錠剤
の画像部分の周囲に、図8の原画像に含まれていたノイ
ズが残存したままである。
Next, in step S2 of FIG. 2, 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. 9 shows a binary image in which "0" is white and "1" is black. In the binary image, the noise included in the original image in FIG. 8 remains around the image portion of the tablet.

【0014】次に図2のステップS3にて、前記2値画
像に対して収縮及び膨張からなるノイズ除去処理(例え
ば「画像処理の基本技法」技術評論社発行、53〜56
頁参照)を施す。収縮、膨張処理は、画像中の連結成分
の境界画素を全て削除或いは増殖させる処理であって、
本実施例では、収縮処理を2回行なった後、膨張処理を
2回行なう。これによって、薬袋(15)表面の印字が画像
から削除されると共に、画像中の孤立点が除去される。
前記の例では、図9の原画像に含まれているノイズが除
去されることになる。
Next, in step S3 of FIG. 2, 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-56).
(See page). 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, after the contraction process is performed twice, the expansion process is performed twice. As a result, the printing on the surface of the medicine bag (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. 9 is removed.

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

【0016】その後、図2のステップS5にて、ラベル
の割り当てられた画像中の連結成分に対してチェインコ
ード化処理(例えば「画像処理の基本技法」技術評論社
発行、76〜78頁参照)を行なう。チェインコード化
処理とは、連結成分の輪郭または線分を追跡して、その
方向に“0”〜“7”の方向指数(チェインコード)を付
与する処理であって、錠剤検査においては、ラベルの割
り当てられた各画像について、錠剤の外形によって形成
される輪郭(外輪郭)と、互いに接触する複数の錠剤の間
に生じる隙間の輪郭(内輪郭)の追跡を行なう。そして、
夫々のラベルについてチェインコードを記録する。
Then, in step S5 of FIG. 2, chain coding processing is performed on the connected component in the image to which the label is assigned (see, for example, "Basic Techniques of Image Processing" published by Technical Review Company, pages 76-78). Do. 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. And
Record the chain code for each label.

【0017】次に、ラベルの割り当てられた各連結成分
について、記録されている輪郭線のチェインコードに基
づき、錠剤どうしの重なりによって生じる画像の接点を
検出する。図3は接点検出の手続きを表わしており、先
ず、ステップS61にて接点候補点を選出する。接点候
補点は、図4に例示する様にチェインコードが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パタ
ーン存在する。
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. FIG. 3 shows a contact detection procedure. First, contact candidate points are selected in step S61. As for the contact point candidate, the chain code is 0 → 6, as shown in FIG.
1 → 7, 2 → 0, 3 → 1, 4 → 2, 5 → 3, 6 → 4, 7
In the case of a combination of chain codes that changes abruptly like → 5 and changes from 0 → 6, 0 → 7 → 6 or 7 →
The change point is also set when one or two chain codes are present between the chain codes such as 7 → 6. Therefore, there are a total of 24 combinations of chain codes that should be changed.

【0018】次に図3のステップS62にて、接点候補
点において、前後5画素の輪郭線に基づいて該候補点を
中心とする方向変化の角度を計算する。例えば、図5
(a)の如く2つの錠剤の接触によって生じた接点候補点
であれば、方向変化の角度θは鋭角となるが、図5(b)
の如く1つの錠剤の輪郭線上に生じたノイズに起因する
接点候補点であれば、角度θは鈍角となる。従って、ス
テップS63にて、角度θを所定のしきい値(例えば1
20度)と比較して、しきい値よりも小さいときはステ
ップS64にて真の接点と判断し、しきい値以上のとき
はステップS65にて輪郭線上のノイズと判断する。
Next, in step S62 of FIG. 3, 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, in FIG.
In the case of the contact point candidate point generated by the contact of two tablets as shown in (a), the angle θ of the direction change is an acute angle, but FIG.
As described above, the angle θ is an obtuse angle if it is a contact point candidate point caused by noise generated on the contour line of one tablet. Therefore, in step S63, the angle θ is set to a predetermined threshold value (for example, 1
20 degrees), if it is smaller than the threshold value, it is determined to be a true contact point in step S64, and if it is equal to or larger than the threshold value, it is determined to be noise on the contour line in step S65.

【0019】図6(a)(b)は夫々、図5(a)(b)におけ
る方向変化点近傍の拡大図であって、丸印が図形を構成
する画素を表わしている。ここでは、5→3と変化する
チェインコードが接点候補点として検出され、該候補点
を中心とする前後5つ目の画素の開き角度を、方向変化
の角度として検出している。この場合、図6(a)の接点
候補点が真の接点と判別され、図6(b)の接点候補点は
輪郭線上のノイズと判断して無視される。
FIGS. 6 (a) and 6 (b) are enlarged views in the vicinity of the direction change points in FIGS. 5 (a) and 5 (b), and the circles represent the pixels forming the 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, the contact point candidate of FIG. 6A is determined to be a true contact point, and the contact point candidate of FIG. 6B is determined to be noise on the contour line and ignored.

【0020】錠剤の重なりによる真の接点については、
図7に示す如く互いに一対となる接点のペア(a,b)、
(c,d)が存在する。そこで、図2のステップS7に
て、ラベルの付された全ての連結成分について、このよ
うな接点ペアを作成する。接点ペアの作成には、例えば
下記の条件1〜3を満足する2つの接点を発見する方法
が採用される。 (条件1) ペアの判断をすべき2つの接点について、互
いの接点ベクトル(例えば図7の接点a、bについて
は、接点a、bにおける方向変化のベクトルA、B)の
なす角度θ1(0°≦θ1≦180°)が、所定のしきい値
(例えば150°)以上である。 (条件2) 注目する接点ベクトルと、その接点から他の
接点へ至る直線(例えば図7の接点a、bについては、
接点aから接点bへ至る直線E)のなす角度θ2が所定の
しきい値(例えば150°)以上である。 (条件3) 上記条件1及び2を満たす接点ペアの中で、
その2点間の距離が所定のしきい値(円形の錠剤の場合
は例えばその直径の0.3〜1.0倍)以下のもので、且
つ最小である。 図7の場合、接点aとbや、cとdは、ペアと判断され
るが、接点aとcや、aとdはペアとは判断されない。
Regarding the true contact point due to the overlapping of tablets,
As shown in FIG. 7, a pair of contacts (a, b), which are paired with each other,
(c, d) exists. Therefore, in step S7 of FIG. 2, such contact pairs are created for all labeled connected components. To create a contact pair, for example, a method of finding two contacts that satisfy the following conditions 1 to 3 is adopted. (Condition 1) The angle θ 1 between two contact points (for example, the contact points a and b in FIG. 7, the direction change vectors A and B for the contact points a and b in FIG. 7) between the two contact points to be judged as a pair θ 1 ( 0 ° ≤ θ 1 ≤ 180 °) is the predetermined threshold
(For example, 150 °) or more. (Condition 2) The contact point vector of interest and a straight line from that contact point to another contact point (for example, for contact points a and b in FIG. 7,
An angle θ 2 formed by a straight line E from the contact point a to the contact point b is equal to or larger than a predetermined threshold value (for example, 150 °). (Condition 3) Among the contact pairs that satisfy the above conditions 1 and 2,
The distance between the two points is equal to or less than a predetermined threshold value (for example, in the case of a circular tablet, 0.3 to 1.0 times the diameter), and is the minimum. In the case of FIG. 7, the contacts a and b or c and d are determined to be a pair, but the contacts a and c or a and d are not determined to be a pair.

【0021】全てのラベルについて接点ペアを作成した
後、図2のステップS8にて、ペアと判断された2つの
接点を互いに直線で結んで境界線を作成し、互いに連結
して1つのラベルが付されている図形要素を、該境界線
にて2つの錠剤の図形の連結成分に分離する。この処理
は、境界線上の画素“1”を“0”に置き換えることに
よって行なわれる。図10は、図9の2値画像の例にお
いて、互いに接触している2つの錠剤の接触部に夫々接
点ペアを作成し、これらの接点ペアを相互に連結して境
界線を作成した様子を表わし、図11は、2値画像を前
記境界線にて個々の錠剤の画像に分断した様子を表わし
ている。
After the contact pairs have been created for all the labels, in step S8 of FIG. 2, 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". FIG. 10 shows a state in which, in the example of the binary image of FIG. 9, 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. 11 shows a state in which the binary image is divided into images of individual tablets at the boundary line.

【0022】その後、図2のステップS9にて、個々の
錠剤の画像に分断された2値画像を対象として再ラベリ
ングを施す。そして、ステップS10にてラベル数をカ
ウントすることによって、錠剤の数量を認識するのであ
る。図11の例では、錠剤の個数が9個とカウントされ
る。その後、認識された錠剤の数量が所期の数量と一致
しているかどうかを判断し、不一致の場合は不良として
該薬袋を自動的に排出し、或いは不良の旨を該薬袋にマ
ーキングする。
Then, in step S9 of FIG. 2, 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 S10. In the example of FIG. 11, the number of tablets is counted as 9. Then, it is determined whether the recognized quantity of tablets matches the expected quantity, and if they do not match, the medicine bag is automatically discharged as defective, or the medicine bag is marked as defective.

【0023】上記画像認識処理方法によれば、特に錠剤
の重なり領域が小さい場合に正確な接点ペアの作成が行
なわれ、この結果、極めて高い精度で錠剤の数量を認識
することが出来る。
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.

【0024】図12は、図2のステップS3の収縮処理
にて、互いに重なった2つの錠剤の画像を効率的に分離
するための処理方法を表わしている。即ち、前述の境界
画素の削除に加え、図12に示す3×3画素の2値状態
が図示のパターンを有する場合に、二重丸を付した位置
の画素も同時に“0”とする。又、他の処理方法とし
て、図12のパターンが表われた場合、四角印を付した
位置の画素が“1”のときにのみ、二重丸を付した位置
の画素を“0”とする方法も可能である。この方法は、
図12のパターンが真に錠剤の重なりによって生じたパ
ターンかどうかを判断した後に二重丸の画素を収縮させ
ることを目的としている。この判断を加えることによっ
て、カプセルの錠剤の蓋の部分で生じるエッジを錠剤の
重なりと誤判断することを防止出来る。
FIG. 12 shows a processing method for efficiently separating the images of two tablets which overlap each other in the contraction processing of step S3 of FIG. That is, in addition to the deletion of the boundary pixel described above, when the binary state of 3 × 3 pixels shown in FIG. 12 has the illustrated pattern, the pixel at the position marked with a double circle is also set to “0” at the same time. As another processing method, when the pattern of FIG. 12 is displayed, the pixel at the position marked with a double circle is set to “0” only when the pixel at the position marked with a square is “1”. A method is also possible. This method
The purpose is to shrink the double circle pixels after determining whether or not the pattern of FIG. 12 is a pattern caused by truly overlapping 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 overlapping of the tablets.

【0025】更に、収縮処理においては、孤立点を除去
するため処理を追加することが可能であって、例えば注
目する画素の近傍8画素が全て“1”の場合、注目画素
を“0”とする方法の他、図13(a)(b)の如く近傍1
2画素または近傍8画素が全て“1”の場合、これらの
画素によって囲まれた画素を“1”とし、全て“0”の
場合は“0”とする方法が採用出来る。後者の方法は基
本的に連結2画素以下の孤立点を除去することを目的と
しているが、図13(c)に示す様な孤立点は意味のある
画素と判断して、除去しない。
Further, in the contraction processing, it is possible to add processing for removing isolated points. For example, when 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. 13C are judged to be meaningful pixels and are not removed.

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

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

【0028】次に、前記濃淡画像を2値化することな
く、ステップS12にてコントラスト変換を施す。この
際に用いる濃度変換式は周知のところである(例えば雑
誌「エレクトロニクスライフ」1989年2月号145〜153頁
参照)。これによって、錠剤の重なり部分の抽出が容易
となる。
Next, contrast conversion is performed in step S12 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.

【0029】続いて、図14のステップS13にてエッ
ジ検出フィルタ処理を施す。実施例では、種々のフィル
タ処理方法を検討した結果、最良の方法として、1次微
分のsobelフィルタを用いた処理(例えば雑誌「エ
レクトロニクスライフ」1988年12月号148〜155頁参照)
を採用した。これによって、錠剤の外形や錠剤間の重な
り領域が輪郭強調される。
Subsequently, edge detection filter processing is performed in step S13 of FIG. In the examples, as a result of examining various filter processing methods, as the best method, processing using a sobel filter of the first derivative (see, for example, magazine "Electronic Life", December 1988, pages 148 to 155).
It was adopted. As a result, the outline of the tablet and the overlapping area between the tablets are emphasized.

【0030】更にステップS14にて、輪郭強調された
画像に、所定のスレッショルドレベルによる2値化を施
して、輪郭(エッジ)のみを抽出する。
Further, in step S14, the contour-enhanced image is binarized by a predetermined threshold level to extract only contours (edges).

【0031】その後、ステップS15にて細線化を施
す。細線化は、幅のあるエッジ画像の幅方向の中心を通
る芯線を抽出する処理であって、本実施例では、Hildit
chのアルゴリズムを採用する(例えば田村「細線化法に
ついての諸考察」電子通信学会技術研究報告、1975年PR
L75-9966参照)。これによって、複数の錠剤の輪郭線と
重なり部分の境界線が線画像として得られる。
Then, in step S15, 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.

【0032】そして、ステップS16にて、上記線画像
からヒゲやノイズを除去する。除去の条件は次のとおり
である。 (1) 1画素の孤立点 (2) 分岐点や交差点を含まない、連結数20画素以下
の線 (3) 端点と分岐点または交差点の間の連結画素数が1
0以下の線
Then, in step S16, whiskers 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

【0033】更にステップS17にて、次の2値画像と
の差分抽出ステップ(S18)に必要な有効細線の選択を
行なう。これは、前述のステップS16によっても除去
されずに残存する長いヒゲやループ状の擬線を除去する
ための手続きであって、図15に、その具体的手順を表
わしている。先ずステップS21にて、上記線画像に基
づいて、内輪郭と外輪郭を抽出する。次にステップS2
2にて、これらの輪郭線を内側及び外側へ膨張させて、
サーチエリアを作成する。例えば図16の如く2つの円
形錠剤が重なっている線画像の場合、細線Lを囲んで2
重線M、Nを作成し、この間をサーチエリアとする。サ
ーチエリア外の線Eは対象外として、除去される。
Further, in step S17, the effective thin line necessary for the difference extraction step (S18) 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 S16 described above, and FIG. 15 shows a specific procedure thereof. First, in step S21, an inner contour and an outer contour are extracted based on the line image. Then step S2
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 overlap as shown in FIG.
The heavy lines M and N are created, and the area between them is used as the search area. The line E outside the search area is excluded from the target and is removed.

【0034】続いて図15のステップS23にて、サー
チエリア内の細線に存在する分岐点或いは交差点を検出
する。図16の例では、サーチエリア内の円で囲った位
置に分岐点が存在している。その後、図15のステップ
S24にて、分岐点或いは交差点から20画素以上の距
離をおいてサーチエリア外へ飛び出している線を有効細
線と判断する。図16の例では、図中のA及びDが有効
細線であって、他の線B、Cは無効細線として除去され
る。尚、線Dは本来無効とすべき細線であるが、錠剤の
数量認識においては後述の如く問題とならない。
Subsequently, in step S23 of FIG. 15, a branch point or an intersection existing in a fine line in the search area is detected. In the example of FIG. 16, a branch point exists at a position surrounded by a circle in the search area. After that, in step S24 of FIG. 15, the 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. 16, A and D in the figure are effective thin lines, and the other lines B and C are removed as ineffective 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.

【0035】有効細線の選択の後、図14のステップS
18にて、別途作成した2値原画像と有効細線の画像の
差分を抽出し、これによって互いに連結する2つの錠剤
の画像を切り離す。図17は、図16の例における差分
抽出の結果を表わしている。図示の如く2つの錠剤の画
像が有効細線によって切り離されている。尚、前記の線
Dが除去されずに残存したことによる影響が、図17の
2値画像に現われているが、数量の認識には問題となら
ない。
After selecting the effective thin line, step S in FIG.
At 18, 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. FIG. 17 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. Although the effect of the line D remaining without being removed appears in the binary image of FIG. 17, this does not cause any problem in recognizing the quantity.

【0036】その後、図14のステップS19にてラベ
リングを施し、更にステップS20にてラベル数をカウ
ントして、錠剤の数量を認識するのである。そして、認
識された錠剤の数量が所期の数量と一致しているかどう
かを判断し、不一致の場合は不良として該薬袋を自動的
に排出し、或いは不良の旨を該薬袋にマーキングする。
After that, labeling is performed in step S19 of FIG. 14, and the number of labels is counted in step S20 to recognize the number of tablets. Then, it is determined whether or not the recognized quantity of tablets matches the expected quantity, and if they do not match, the medicine bag is automatically discharged as defective, or the medicine bag is marked as defective.

【0037】上記の画像認識処理方法によれば、2つの
錠剤が大きく重なっている場合でも、重なり部分の近辺
から照明光が漏れて、エッジ検出によって確実に境界線
が検出されるから、画像の分離は確実に行なわれ、正確
な数量認識が実現される。又、図2の方法と図14の方
法を組み合わせることによって、錠剤の重なり状態の区
々な薬袋の検査も可能となる。
According to the above image recognition processing method, even when two tablets are largely overlapped with each other, 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. 2 and the method of FIG. 14, it is possible to inspect various medicine bags in the overlapping state of tablets.

【0038】尚、図2或いは図14の画像認識処理方法
に加え、分断された錠剤の2値画像の周囲長さや面積を
算出して、予め登録されている錠剤の種類別のデータと
比較することによって、数量認識の精度を更に上げ、或
いは錠剤の種類判別を行なうことも可能となる。
In addition to the image recognition processing method of FIG. 2 or 14, the peripheral length or area of the binary image of the divided tablet is calculated and compared with the data registered in advance for each type of tablet. As a result, the accuracy of quantity recognition can be further improved, or the type of tablet can be discriminated.

【0039】上記実施例の説明は、本発明を説明するた
めのものであって、特許請求の範囲に記載の発明を限定
し、或は範囲を減縮する様に解すべきではない。又、本
発明の各部構成は上記実施例に限らず、特許請求の範囲
に記載の技術的範囲内で種々の変形が可能である。例え
ば本発明は、上述の錠剤包装装置の錠剤検査のみなら
ず、広く複数物体の数量認識に応用出来るのは言うまで
もない。
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 limiting the scope. Further, the configuration of each part of the present invention is not limited to the above embodiment, but various modifications can be made within the technical scope described in the claims. For example, it goes without saying that the present invention can be widely applied to not only the above-described tablet inspection of the tablet packaging device but also the number recognition of a plurality of objects.

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

【図1】本発明を実施した錠剤検査システムの構成を示
す斜視図である。
FIG. 1 is a perspective view showing a configuration of a tablet inspection system embodying the present invention.

【図2】画像認識処理方法の手順を示すフローチャート
である。
FIG. 2 is a flowchart showing a procedure of an image recognition processing method.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

【図18】複数の錠剤が封入された薬袋の斜視図であ
る。
FIG. 18 is a perspective view of a medicine bag in which a plurality of tablets are enclosed.

【符号の説明】[Explanation of symbols]

(1) 錠剤包装装置 (11) 錠剤供給ユニット (14) 分包紙 (15) 薬袋 (2) CCDカメラ (21) 照明具 (3) 画像認識処理装置 (4) モニター (9) 錠剤 (1) Tablet packing device (11) Tablet supply unit (14) Packaging paper (15) Medicine bag (2) CCD camera (21) Lighting equipment (3) Image recognition processing device (4) Monitor (9) Tablet

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成6年3月4日[Submission date] March 4, 1994

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】請求項2[Name of item to be corrected] Claim 2

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0006[Correction target item name] 0006

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0006】本発明に係る他の画像認識処理方法は、第
1ステップにて、原画像にコントラスト強調を施し、第
2ステップにて、コントラストの強調された画像に基づ
いて、該画像のエッジを検出する。次に第3ステップに
て、検出されたエッジに細線化を施した後に有効な細線
のみを抽出し、更に第4ステップにて、互いに接触する
2つの物体の画像を前記有効細線にて切り離すことによ
り、複数の物体の画像を個々に分断する。その後、第5
ステップにて、画像に含まれる連結成分の個数をカウン
トする。
In another image recognition processing method according to the present invention, in the first step, contrast enhancement is applied to the original image, and in the second step, the edge of the image is enhanced based on the contrast-enhanced image. To detect. Next, in the third step, only the effective thin lines are extracted after thinning the detected edges, and in the fourth step, the images of the two objects contacting each other are separated by the effective thin lines. Thus, the images of the plurality of objects are individually divided. Then the fifth
In step, the number of connected components included in the image is counted.

【手続補正3】[Procedure 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0008[Correction target item name] 0008

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0008】上記第2の画像認識処理方法においては、
先ず画像にコントラスト変換を施すことによって、複数
の物体の輪郭と互いの接触部が他の画像部分に対して強
調されることになる。次に、コントラストの強調された
画像に基づいて該画像のエッジを検出することにより、
複数の物体の輪郭線と相互の境界線が判明する。これら
のエッジに細線化した後、ヒゲやノイズを除去し、有効
な細線のみを抽出する。これを用いて互いに接触する2
つの物体の画像を前記有効細線の位置にて切り離すこと
により、薬袋内の複数の物体の画像を個々に分断するこ
とが出来る。
In the second image recognition processing method,
First, by subjecting an image to contrast conversion, the contours of a plurality of objects and their contact portions are emphasized with respect to other image portions. Then, by detecting the edges of the image based on the contrast-enhanced image,
The contour lines of a plurality of objects and the boundary lines between them are found. After thinning these edges, remove beards and noises
Only fine lines are extracted. Use this to contact each other 2
By separating the images of one object at the position of the effective thin line, the images of a plurality of objects in the medicine bag can be individually divided.

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0012[Correction target item name] 0012

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0012】図2は、画像認識処理装置(3)が実行する
一連の画像認識処理手続きを示しており、先ずステップ
S1にて、CCDカメラ(2)からの原画像を取り込む。
図8は画像認識処理装置(3)に取り込まれた原画像の一
例である。この例では、薬袋内に9個の錠剤が封入され
ており、この内の8個は互いに接触している。従って、
従来の方式では、個数のカウントが困難であったもので
ある。尚、図8の原画像には、錠剤の画像部分の周囲
、分包紙の印字に起因する若干のノイズが混入してい
る。
FIG. 2 shows a series of image recognition processing procedures executed by the image recognition processing device (3). First, in step S1, the original image from the CCD camera (2) is captured.
FIG. 8 is an example of an original image captured by the image recognition processing device (3). In this example, nine tablets are enclosed in the medicine bag, and eight of them are in contact with each other. Therefore,
In the conventional method, it is difficult to count the number. It should be noted that in the original image of FIG. 8, some noise due to the printing of the packaging paper is mixed around the image portion of the tablet.

【手続補正5】[Procedure Amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0033[Correction target item name] 0033

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0033】更にステップS17にて、次の2値画像と
の差分抽出ステップ(S18)に必要な有効細線の選択を
行なう。これは、前述のステップS16によっても除去
されずに残存する長いヒゲやループ状の擬線を除去する
ための手続きであって、図15に、その具体的手順を表
わしている。先ずステップS21にて、原画像を2値化
した画像から内輪郭と外輪郭を抽出する。次にステップ
S22にて、これらの輪郭線を内側及び外側へ膨張させ
て、サーチエリアを作成する。例えば図16の如く2つ
の円形錠剤が重なっている線画像の場合、細線Lを囲ん
で2重線M、Nを作成し、この間をサーチエリアとす
る。サーチエリア外の線Eは対象外として、除去され
る。
Further, in step S17, the effective thin line necessary for the difference extraction step (S18) 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 S16 described above, and FIG. 15 shows a specific procedure thereof. First, in step S21, the original image is binarized.
The inner contour and the outer contour are extracted from the image . Next, in step S22, these contour lines are expanded inward and outward to create a search area. For example, in the case of a line image in which two circular tablets are overlapped as shown in FIG. 16, double lines M and N are created by enclosing a thin line L, and a space between them is set as a search area. The line E outside the search area is excluded from the target and is removed.

【手続補正6】[Procedure correction 6]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図16[Correction target item name] Fig. 16

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図16】 FIG. 16

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 複数の物体を撮影した原画像に基づき、
物体の個数を検出する画像認識処理方法であって、 前記原画像を2値化する第1ステップと、 2値化された画像において、2つの物体が互いに接触し
或いは交差する領域の両端に位置する一対の接点を検出
する第2ステップと、 上記一対の接点を互いに連結して、2つの物体の画像の
境界線を作成する第3ステップと、 互いに接触する2つの物体の画像を境界線にて切り離す
ことにより、複数の物体の画像を個々に分断する第4ス
テップと、 これによって得られた画像に含まれる連結成分の個数を
カウントする第5ステップとを有することを特徴とする
画像認識処理方法。
1. Based on original images obtained by photographing a plurality of objects,
An image recognition processing method for detecting the number of objects, comprising: a first step of binarizing the original image; and a position of the binarized image at both ends of a region where two objects contact or intersect each other. The second step of detecting a pair of contact points, and the third step of connecting the pair of contact points to each other to create a boundary line between the images of two objects, and the image of the two objects contacting each other as a boundary line. Image recognition processing characterized by including a fourth step of individually dividing the images of a plurality of objects by separating the plurality of objects, and a fifth step of counting the number of connected components included in the image obtained thereby. Method.
【請求項2】 複数の物体を撮影した原画像に基づき、
物体の個数を検出する画像認識処理方法であって、 前記原画像にコントラスト強調を施す第1ステップと、 コントラストの強調された画像に基づいて、該画像のエ
ッジを検出する第2ステップと、 検出されたエッジに細線化を施して有効な細線のみを抽
出する第3ステップと、 互いに接触する2つの物体の画像を前記有効細線にて切
り離すことにより、複数の物体の画像を個々に分断する
第4ステップと、 これによって得られた画像に含まれる連結成分の個数を
カウントする第5ステップとを有することを特徴とする
画像認識処理方法。
2. Based on original images obtained by photographing a plurality of objects,
An image recognition processing method for detecting the number of objects, comprising: a first step of applying contrast enhancement to the original image; a second step of detecting an edge of the image based on the image with enhanced contrast; A third step of thinning out the effective edges to extract only effective thin lines; and a step of individually dividing the images of a plurality of objects by separating the images of two objects in contact with each other by the effective thin lines. An image recognition processing method comprising: four steps; and a fifth step of counting the number of connected components included in the image obtained thereby.
JP5334728A 1993-12-28 1993-12-28 Image recognition processing method Withdrawn JPH07200820A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5334728A JPH07200820A (en) 1993-12-28 1993-12-28 Image recognition processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5334728A JPH07200820A (en) 1993-12-28 1993-12-28 Image recognition processing method

Publications (1)

Publication Number Publication Date
JPH07200820A true JPH07200820A (en) 1995-08-04

Family

ID=18280558

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5334728A Withdrawn JPH07200820A (en) 1993-12-28 1993-12-28 Image recognition processing method

Country Status (1)

Country Link
JP (1) JPH07200820A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6574580B2 (en) * 2000-02-11 2003-06-03 Scriptpro Llc Pharmacy pill counting vision system
WO2004072626A1 (en) * 2003-02-14 2004-08-26 Dijkstra Vereenigde Bedrijven B.V. Inspection device for loose objects, such as tablets
KR100451994B1 (en) * 1996-11-29 2004-11-16 가부시키가이샤 유야마 세이사쿠쇼 Drug Inspection Device
JP2012198848A (en) * 2011-03-23 2012-10-18 Burein:Kk Object identification device
JP2019203845A (en) * 2018-05-25 2019-11-28 共和機械株式会社 Dirty egg detection apparatus
CN110827933A (en) * 2018-08-14 2020-02-21 陈玉沛 Tablet taking assisting method realized by mobile device
JP6983451B1 (en) * 2021-04-22 2021-12-17 株式会社Anamorphosis Networks Counting method, counting system, and computer program for counting

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100451994B1 (en) * 1996-11-29 2004-11-16 가부시키가이샤 유야마 세이사쿠쇼 Drug Inspection Device
US6574580B2 (en) * 2000-02-11 2003-06-03 Scriptpro Llc Pharmacy pill counting vision system
WO2004072626A1 (en) * 2003-02-14 2004-08-26 Dijkstra Vereenigde Bedrijven B.V. Inspection device for loose objects, such as tablets
AU2003218836B2 (en) * 2003-02-14 2010-04-22 Hd Medi B.V. Inspection device for loose objects, such as tablets
US7796799B2 (en) 2003-02-14 2010-09-14 Hd Medi B.V. Inspection device for loose objects, such as tablets
JP2012198848A (en) * 2011-03-23 2012-10-18 Burein:Kk Object identification device
JP2019203845A (en) * 2018-05-25 2019-11-28 共和機械株式会社 Dirty egg detection apparatus
CN110827933A (en) * 2018-08-14 2020-02-21 陈玉沛 Tablet taking assisting method realized by mobile device
JP6983451B1 (en) * 2021-04-22 2021-12-17 株式会社Anamorphosis Networks Counting method, counting system, and computer program for counting
JP2022167756A (en) * 2021-04-22 2022-11-04 株式会社Anamorphosis Networks Counting method, counting system, and computer program for counting

Similar Documents

Publication Publication Date Title
JP3438925B2 (en) Tablet inspection system
JP3332543B2 (en) Tablet inspection system
EP1497787B1 (en) System and method for identifying and extracting character strings from captured image data
JPH08322912A (en) Tablet inspection system
EP1675066A1 (en) Face image candidate area search method, face image candidate area search system, and face image candidate area search program
JPH0757051A (en) Pattern recognition device
JPH0467234B2 (en)
JPS6077279A (en) Initiation of character image
EP1852693A1 (en) Method of inspecting granular material and inspection device for conducting that method
JPH09231342A (en) Method and device for inspecting tablet
US7328847B1 (en) Barcode data communication methods, barcode embedding methods, and barcode systems
JP3423055B2 (en) Tablet inspection system
JPH07200820A (en) Image recognition processing method
JPH08322913A (en) Tablet inspection system
Tan et al. Removal of interfering strokes in double-sided document images
KR101330567B1 (en) pill-detection method for pill box
Suntronsuk et al. Pill image binarization for detecting text imprints
KR100503724B1 (en) Finding objects in an image
JPH04106460A (en) Detecting method of defect
JP3410337B2 (en) Defect detection method and device, and recording medium recording defect detection control program
JPH096870A (en) Automatic detecting device for abnormal shade
JP4639840B2 (en) Inspection method for granular object and inspection apparatus using the same
US20170200383A1 (en) Automated review of forms through augmented reality
JP2963807B2 (en) Postal code frame detector
KR100854537B1 (en) System for reusing design information of products using two dimensional images of products and method therefor

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010306