JPS62192638A - Inspecting method for colored capsule - Google Patents

Inspecting method for colored capsule

Info

Publication number
JPS62192638A
JPS62192638A JP61034283A JP3428386A JPS62192638A JP S62192638 A JPS62192638 A JP S62192638A JP 61034283 A JP61034283 A JP 61034283A JP 3428386 A JP3428386 A JP 3428386A JP S62192638 A JPS62192638 A JP S62192638A
Authority
JP
Japan
Prior art keywords
capsule
signal
cap
white
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP61034283A
Other languages
Japanese (ja)
Other versions
JPH0546898B2 (en
Inventor
Hiroyuki Morimoto
森本 広行
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP61034283A priority Critical patent/JPS62192638A/en
Publication of JPS62192638A publication Critical patent/JPS62192638A/en
Publication of JPH0546898B2 publication Critical patent/JPH0546898B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Sorting Of Articles (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To automatically inspect a colored capsule by a black-and-white image device by comparing the difference in level value between video signals of a TV camera corresponding to specific areas no both sides of the capsule to be inspected with a specific set value, and deciding whether or not the capsule is normal. CONSTITUTION:While a video signal and a horizontal synchronizing signal are inputted to a front area peak holding circuit 1 and a rear area peak holding circuit 2 in parallel, a front area prescribing signal is inputted to the circuit 1 and a rear area prescribing signal is inputted to the circuit 2. Then, peak-held values of the areas on every horizontal scan are outputted from the circuits 1 and 2 to a differentiator 3, which outputs their difference. This difference value is inputted to comparators 4 and 5, so that only the difference value smaller than an upper threshold value is outputted as a level-H signal from only the comparator 4 and the difference value larger than a lower threshold value is outputted from the comparator 5. Then in case the outputs of the comparators 4 and 5 are both H, an AND circuit 6 outputs H and this permissible value signal is inputted to a counter 7 together with a vertical synchronizing signal and a clock signal and the output of the counter 7 is compared 8, in case the result is positive, a conforming article decision signal is outputted.

Description

【発明の詳細な説明】[Detailed description of the invention] 【発明の属する技術分野】[Technical field to which the invention pertains]

この発明は、カプセル特に薬剤用色付きカプセルのボデ
ィおよびキャップの色の組み合わせを、それぞれの色の
明度に基づく光電撮像とその画像処理によって、基準の
色の組み合わせと比較し、基準と同じか異なるかにより
、良・不良を判定する検査方法に関する。
This invention compares the color combination of the body and cap of a capsule, particularly a colored pharmaceutical capsule, with a standard color combination by photoelectric imaging based on the brightness of each color and its image processing, and determines whether it is the same or different from the standard. This invention relates to an inspection method for determining whether it is good or bad.

【従来技術とその問題点】[Prior art and its problems]

はじめに、色付きキャップの検査方法に関する関連事項
や背景の事情などについて説明する。 まず、カプセル検査一般について述べる。 一般に、カプセルは製薬会社で空カプセルに薬剤を充填
し、目視検査後製品となって出荷される。 カプセルの不良は、空カプセル製造会社での製造工程と
製薬会社での薬剤充填工程とで主に発生する。 空カプセル製造時に発生する外観不良は数十種類程度あ
るが、その発生割合は非常に少ないものである。それで
も物の性質上、これら外観不良品を取り除くために、女
子作業員が全数目視で検査している。 また、空カプセルに薬剤を充填後にも女子作業員が全数
を目視検査している。不良の発見はこのときの方が多い
。カプセルのボディに薬剤を充填しキャップを結合する
するとき、無理な力がかかるからである。カプセルが円
筒状であるため機械的にこれを回転させながら女子作業
者は目視検査している。したがって、目が疲労しやすく
、不良内容によっては非常に検出しにくい項目もある。 製薬会社で発生する不良、つまり、空カプセルに薬剤を
充填するときに発生するものの多くは、「ささくれ」、
「へこみ」である。「ささくれ」とは、カプセルのボデ
ィとキャップとを結合するとき、両者の開口部の端面同
士が当たってどちらかが切れ、相手側の外側か内側かに
入り込んだ状態のものである。また、「へこみ」は文字
どおり先端部分などの一部がへこんだものである。 外観不良には、このほか、「割れ」:いわゆる割れの生
じたもの、「穴あき」:穴がおいて充填物が吹き出して
いるもの、「異物付着コニ表面に異物(油、ごみ等)が
付着しているもの、「ダブルキャップ」:ボディ側にも
キャンプが装着されているもの、「異種カプセル」:異
なる号数および色のカプセル、などがある。 自動外観検査の技術的問題の一つは照明問題である。照
明のしかたを上手にやることによって表面の欠陥を検知
しやすい形に際立たせることができる。逆に、照明のし
かたが不適当であれば外観上の欠陥が見えなくなったり
する。 上述した「異種カプセル」の内の色付きカプセル、つま
り、この発明の主題である対象の外は、技術的にほぼ解
決されている。 次に、色付きカプセルについて説明する。薬剤用カプセ
ルでは、世界共通の約40種類の標準色が用いられ、ボ
ディ、キャップのそれぞれの色を同じにしたものや、変
えたもの、つまり2色調カプセルなどがある。そして同
時に、表面に社名コードや商品コード番号を印刷するこ
ともある。色付きカプセルを用いる目的は、識別を容易
にすること、製剤の商品価値を高めることなどである。 もちろん、法令で許可されている色素以外の使用は禁止
される。 さて、カプセルの色の組み合わせを自動的に検査するた
めに、カラーTVカメラで撮像し、その映像信号に基づ
いて画像処理するのであれば、正確であり、ある意味で
は筒車である。しかし、設備の経済性・操作性から実用
上問題がある。 そこで、白・黒TVカメラで撮像し、その映像信号に基
づいて画像処理する方法を前提として、色の識別のため
に、色の3属性(色調、明度、彩度)の中の明度を代用
品質としてとる□ことが試みられてきた。 この場合、ボ°ディとキャップのそれぞれの色の境目で
あるキャップ開口端部に着目するが、このキャップ開口
端部には、別の不良として、「ささくれ」や欠けの発生
することがある。そして、色の組み合わせの検査に、上
述した「ささくれJが関連するので、次に、「ささくれ
」とこれに適した照明方式とについて説明する。 まず、普通のカプセルの形状は第9図に示した通りであ
る。第9図(a)はキャップ20Cの側面図で、CIは
周囲に設けられ、内側に突出した突起、C2は一部内側
に突出した凸部である。第9図(b)はボディ20Bの
側面図で、B1は縁の近(の周囲に設けられた溝、B3
は空気抜きとしての凹みである。 第9図(C)は薬剤充填前の、キャップとボディとの仮
結合した状態の一部破断した側面図で、キャツブ20C
の凸部C2とボディ20Bの溝B1とが嵌り合い、空カ
プセル時の相互の離脱を防止している。 第9図!dlは薬剤充填後の両者の結合状態を示してお
り、キャップ20Cの突起C1がボディ20Bの溝B1
とはまり合うとともに、空気抜きB3の作用で薬剤を高
速で充填する場合でもキャップ20Cが圧縮空気により
離脱することはない。 つぎに、問題の「ささくれ」の態様について、第10図
、第11図を参照しながら述べる。第10図はボディ側
が「ささくれ」状態になったもの、第11図はキャップ
側が「ささくれ」状態になったものである。なお、見や
すくするために、キャップ。 ボディに設けられている突起、溝と薬剤の図示とは省略
した。 第10図において、ボディ20B、キャップ20Cの開
口部端面が両者の結合時に多少ずれて当たると、どちら
か弱い方、この場合はボディ20B側が相手によって切
られ、結合のために挿入されるにしたがって、この切れ
目は伸びる。その結果、図の20bの部分がキャップ2
0Cの外側にかぶさるように突き出る。この20bを「
ささくれ」というのであるが、この図のように細い平行
な帯状になることもあるし、両辺がある角度をもつこと
もあり様々である。第11図は前の例と異なり、キャッ
プ20Gの方が切られ、「ささくれ」20Cがボディ2
0Bの内側にもぐり込゛む形をとっている。 いずれにしても、薬剤充填時の方がこの「ささくれ」を
生じやすい。薬剤のためにボディ2OBの端縁部は固く
なり、かつ多少変形しているから、ここにキャップ20
Cを結合しようとすると、端縁部同士が食い違った状態
で当たり、そのままいずれか弱い方が切れるからである
。 さて次に、この「ささくれ」の検査に用いられる照明方
式の従来例を、第5図、第6図を参照しながら説明する
。第5図は照明装置の側面図とこれを含むカプセル自動
外観検査装置全体の構成図、第6図は照明装置の横断面
図である。 カプセル自動外観検査装置は、主としてカプセル搬送部
、照明部、撮像・判定部からなっている。 カプセル搬送部は、検査対象であるカプセル20を供給
箇所から検査位置まで搬送するものであり、ここでは搬
送ドラム21で代表して示しである。22は位置検知器
で、カプセル20が検査位置にあることを検知し、その
信号をつぎに述べる光源用電源に送るものである。 照明部は、光源部と反射・透過部とから主として構成さ
れている。まず、光源部について述べる。 31は円環状光源で円環状のストロボ放電管である。 37はこれに電力を供給する光源用電源で、前記位置検
知器22と接続されている。 つぎに、反射・透過部であるが、32は反射部材で円環
状光源の外周を包む形をなし、その下方が開口していて
透過型光拡散部材32Aで閉鎖されている。33は円筒
状の透過型光拡散部材で円環状光源31と同軸に配置さ
れ、下方の開口部は対象であるカプセル20の直ぐ上方
に位置し、上方の開口部には反射型光拡散部材34が取
り付けられている。 この反射型光拡散部材34はカプセル20に面した側が
反射面で、かつ中心部に孔が設けである。 また、この円筒状の透過型光拡散部材33には、第7図
に示したように、その外周面の一部に中空部33aが設
けられ、円環状光源31からの直射光がカプセル20に
照射するようになっている。 35は部分遮光部材で、前記円筒状の透過型光拡散部材
33の外側に取り付けられている。この部分遮光部材3
5は、第8図に示したように、その外周面下端のカプセ
ル軸方向に当たる2箇所が、切り   −欠き部35a
 、 35bとなっている。 以上の円環状光源311反射部材32.透過型反射部材
331部分遮光部材35を平面図で示したものが第6図
で、それぞれが同心円状に配置されている。 おわりに、撮像・判定部はTVカメラ231画画像処理
回路24剰 以上のような構成であるから、この作用は次のようにな
る。 円環状光源31の光は反射部材32によってあらゆる方
向から中心軸に向かう。そして、まず部分遮光部材35
の切欠き部以外で遮光されるため、カプセル20の軸方
向を主な方向として斜め下方に向かう光だけに制限され
る。 したがって、第8図の部分遮光部材35八を用いた場合
には、カプセル20の軸方向を主な方向とする斜め下方
に向かう光は、第5図の右側からのものは比較的強く、
左側からのものは比較的弱い。 つまり、左右不均衡なものである。 次に、第7図のような透過型光拡散性部材33Aを用い
ることによって、円環状光源31から中空部33aを通
ってカプセル20に直接照射する比較的強い光と、あら
ゆる方向に拡散されてカプセル20に照射する比較的弱
い光とになる。 また、円環状光源31から下方に向かう光は、円帯状の
透過型光拡散部材32Aによってあらゆる方向に拡散し
、その一部がカプセル20を斜め上方から照射すること
になる。 以上やや詳しく説明したように、「ささくれ」の検査の
ためには、方向性をもった強調照明と、あらゆる方向に
一様な強さの拡散照明との複合照明が適切である。 一方、色の組み合わせ検査に関しては、拡散照明が好適
である。次にその理由を説明する。 第12図(alに示した色付きカプセル20(ボディ2
0B、キャンプ20C)を、拡散照明の下で、TVカメ
ラで図の横方向に水平走査したときの一つの映像信号を
、第12図(b)、第12図(C1で示す。なお、第1
2図(blはキャップ20Cが白色、ボディ2OBが赤
色の場合、第12図(C1はキャップ20C,ボディ2
0Bともに白色の場合である。白色の方が赤色より明度
が大きいために、それぞれの映像信号レベルには図示し
たように差が生じる。なお、第12図(b)および第1
2図(C)で、映像信号の中間位置にある小さな突起は
、キャップ20Cの開口端部での反射によるわずかな増
分である。 したがって、映像信号を、キャップ20Cとボディ2O
Bとの境目の位置で1次微分処理すると、第12図(b
lの白・赤の場合と第12図(C1の白・白の場合とで
差異を生じ、識別が可能となる。 しかし、拡散照明だけによっては、キャンプ20Cとボ
ディ20Bとが同色の場合の、例えば白・白の組み合わ
せの場合の「ささくれ」は識別し難い。 逆に、色の組み合わせ検査にとって、強調照明は次に述
べるような理由で不適当である。 第13図(a)に示した色付きカプセル20(ボディ2
0B、キャップ20C)を、矢印方向からの強調照明の
下に、TVカメラで図の横方向に水平走査したときの一
つの映像信号を、第13図(b)、第13図(e)で示
す。 なお、第13図(b)はキャップ20Cが白色、ボディ
20Bが赤色の場合、第13117(C1はキャンプ2
0C,ボディ20Bともに白色の場合である。 映像信号の所々に突起が生じているのは、強調照明によ
る部分的な強い反射光によるものである。 特に、キャップ20Cの開口端面で比較的強い反射が起
こり、映像信号はこの箇所で大きいピーク値を示す。ま
た、強調照明の方向が左右逆になると、図示しないが、
キャンプ20Cの開口端面の部分に陰が生じるため、映
像信号に鋭い凹部が生じる。 なお、映像信号のピーク部分の特徴把握は2次微分する
ことによっておこなう。 したがって、いずれにしても、強調照明の下でのキャッ
プ20C開目端面での反射光影響のため、色の組み合わ
せの差異は識別できない。つまり、検査は不可能である
。 なお、強調照明によって、「ささくれ」の方は、以下に
述べるように良く識別できる。 すなわち、カプセル20に直接照射する円環状光源31
からの光(強調照明)によって、「ささくれ」部でどの
ような反射がおこなわれ、TVカメラにどのような形で
その情報が入力されるかについて第10図、第11図を
参照しながら述べる。 前記の円環状光源31からの直射光が、カプセル20の
キャップ側、矢印P、R方向がら当たるが、逆の側、矢
印Q、  S方向から当たるかにより、キャップの開口
端面を直射するか、または逆に開口端面の背面方向から
照射するかになる。 前者の場合には、TVカメラ23は前記キャップ開口端
面角部からの強い反射光を受ける。したがって、第10
図のようなボディ側の一部が切れてキャップ側に乗り上
げる形の「ささくれ」20bがあると、この部分におい
て、他の正常な開口端面角部からのものより弱い反射光
がTVカメラ23に入力される。この両者の差により「
ささくれ」の存在とその程度が検知できる。 また、後者の場合には、TVカメラ23は前記キャップ
開口端面の所に生じた陰影をとらえることになる。した
がって、第10図のような「ささくれ」20bがあると
、この部分において、他の正常な開口端面の所に生じた
ものより位置のずれた陰影が生じるか、または陰影がほ
とんどなくなるかである。そして、「ささくれ」20b
の端面角部で強い反射光がある。 一方、第11図のようなキャンプ側の一部が切れてボデ
ィ側の内側にもぐり込む形の「ささくれ」20cの場合
には、矢印R方向の光により「ささくれ」部では、他の
正常な端面からのものより弱い反射光となる。また、逆
に矢印S方向の光によっては、「ささくれ」20Cの先
端であるボディ端面角部からの強い反射光が得られる。 「ささくれ」20cの根元であるキャンプ端面では陰影
なしの状態になる。これに対し、もちろん正常なキャッ
プ端面では陰影を生じる。 元来、従来の照明装置の狙いは、カプセルの「ささくれ
」不良を検知しやすくするために、換言すれば「ささく
れ」不良を際立たせるために、■キャンプ端面に向かい
、またはその背面方向から、光源からの直射光を強く当
てるとともに、■この強い直射光であるがゆえの強調を
緩和するために、あらゆる方向に一様な強さの拡散光を
併用する□ことにある。 そして実際面では、カプセルの色の組み合わせ不良、つ
まり色に関する「異種カプセル」の事例は、「ささくれ
」不良のそれに比べると極端に少ないから、複合照明の
中で、「ささくれ」検知に適した強調照明要素の方が拡
散照明要素より強く織り込まれる。したがって、それだ
けカプセルの色の組み合わせの識別がしにくい事情にあ
る。
First, we will explain related matters and background circumstances regarding the colored cap inspection method. First, we will discuss capsule testing in general. Generally, empty capsules are filled with drugs at pharmaceutical companies, and after visual inspection, the products are shipped. Capsule defects mainly occur during the manufacturing process at empty capsule manufacturing companies and during the drug filling process at pharmaceutical companies. There are several dozen types of appearance defects that occur during the production of empty capsules, but their occurrence rate is extremely small. However, due to the nature of the product, all items are visually inspected by female workers in order to remove items with poor appearance. In addition, female workers visually inspect all empty capsules after filling them with drugs. This is when more defects are discovered. This is because excessive force is applied when filling the capsule body with the drug and attaching the cap. Since the capsule is cylindrical, the female worker visually inspects it while mechanically rotating it. Therefore, the eyes are easily fatigued, and some items are extremely difficult to detect depending on the content of the defect. Many of the defects that occur at pharmaceutical companies, that is, those that occur when filling empty capsules with drugs, are "hangnails",
It is a "dent". A "hangnail" is a condition in which when the capsule body and the cap are connected, the end surfaces of the openings of the two parts touch each other, causing one of them to break and enter either the outside or the inside of the other. Also, a ``dent'' literally means that a portion of the tip, such as the tip, is depressed. In addition to this, appearance defects include ``cracks'': cracks that have formed, ``holes'': where there is a hole and the filling material has blown out, and ``foreign objects (oil, dirt, etc.) on the surface of the cover. There are things that are attached, ``double caps'': those with a camp attached to the body side, ``heterogeneous capsules'': capsules with different numbers and colors, etc. One of the technical problems of automatic visual inspection is the lighting problem. By using good lighting techniques, surface imperfections can be highlighted in a way that makes them easier to detect. Conversely, if the lighting is inappropriate, defects in appearance may become invisible. Colored capsules among the above-mentioned "different types of capsules", that is, those other than the subject matter of this invention, have almost been technically solved. Next, colored capsules will be explained. Approximately 40 standard colors are used around the world for pharmaceutical capsules, and there are capsules with the same body and cap colors, and capsules with different colors, such as two-tone capsules. At the same time, a company name code or product code number may be printed on the surface. The purpose of using colored capsules is to facilitate identification and increase the commercial value of the formulation. Of course, the use of dyes other than those permitted by law is prohibited. Now, in order to automatically inspect the color combination of the capsule, if an image is taken with a color TV camera and the image is processed based on the video signal, it is accurate and in a sense it is an hour wheel. However, there are practical problems in terms of the economy and operability of the equipment. Therefore, based on the method of capturing an image with a black and white TV camera and processing the image based on the video signal, brightness among the three color attributes (tone, brightness, and saturation) is used as a substitute for color identification. Attempts have been made to consider □ as quality. In this case, attention is focused on the cap opening end, which is the boundary between the colors of the body and the cap, and "hangnails" or chips may occur at this cap opening end as other defects. Since the above-mentioned "hangnail J" is related to the inspection of color combinations, next, "hangnail" and an illumination method suitable for this will be explained. First, the shape of a normal capsule is as shown in FIG. FIG. 9(a) is a side view of the cap 20C, where CI is a protrusion provided on the periphery and protrudes inwardly, and C2 is a convex portion partially protruding inwardly. FIG. 9(b) is a side view of the body 20B, where B1 is a groove provided near the edge, B3
is a recess for air vent. FIG. 9(C) is a partially cutaway side view of the temporarily connected state of the cap and body before drug filling, and shows the cap 20C.
The convex portion C2 and the groove B1 of the body 20B fit together to prevent the capsule from separating from each other when the capsule is empty. Figure 9! dl shows the state of connection between the two after filling the drug, and the protrusion C1 of the cap 20C is aligned with the groove B1 of the body 20B.
In addition, the cap 20C will not come off due to compressed air even when the medicine is filled at high speed due to the action of the air vent B3. Next, the aspect of the problematic "hangnail" will be described with reference to FIGS. 10 and 11. Fig. 10 shows a case where the body side is in a "hangnail" state, and Fig. 11 shows a case where the cap side is in a "hangnail" state. In addition, to make it easier to see, please use the cap. Illustrations of the protrusions, grooves, and drugs provided on the body are omitted. In FIG. 10, if the opening end surfaces of the body 20B and the cap 20C touch each other with some deviation when they are connected, the weaker one, in this case the body 20B side, is cut by the other party, and as they are inserted for connection, This cut will grow. As a result, the part 20b in the figure is the cap 2.
It protrudes to cover the outside of 0C. This 20b is “
There are various types of hangnails, such as they can be thin parallel strips as shown in this figure, or they can have angles on both sides. In Figure 11, unlike the previous example, the cap 20G is cut off, and the "hangnail" 20C is cut off on the body 2.
It takes the form of crawling inside 0B. In any case, this "hangnail" is more likely to occur during drug filling. The edge of the body 2OB has become hard due to the drug and is slightly deformed, so the cap 20 is inserted here.
This is because if you try to join C, the edges will hit each other with different edges, and the weaker one will break. Next, a conventional example of an illumination method used for inspecting this "hangnail" will be explained with reference to FIGS. 5 and 6. FIG. 5 is a side view of the illumination device and a block diagram of the entire automatic capsule visual inspection apparatus including the illumination device, and FIG. 6 is a cross-sectional view of the illumination device. The capsule automatic visual inspection device mainly consists of a capsule transport section, an illumination section, and an imaging/judgment section. The capsule conveyance section conveys the capsules 20 to be inspected from the supply point to the inspection position, and is represented here by a conveyance drum 21. Reference numeral 22 denotes a position detector that detects that the capsule 20 is at the inspection position and sends the signal to the light source power source, which will be described below. The illumination section mainly includes a light source section and a reflection/transmission section. First, the light source section will be described. 31 is an annular light source, which is an annular strobe discharge tube. Reference numeral 37 denotes a light source power source that supplies power to this, and is connected to the position detector 22. Next, regarding the reflection/transmission part, 32 is a reflection member that wraps around the outer periphery of the annular light source, and the lower part thereof is open and closed by a transmission type light diffusion member 32A. Reference numeral 33 denotes a cylindrical transmission type light diffusion member arranged coaxially with the annular light source 31, the lower opening is located directly above the target capsule 20, and the upper opening has a reflection type light diffusion member 34. is installed. This reflective light diffusing member 34 has a reflective surface on the side facing the capsule 20, and has a hole in the center. Further, as shown in FIG. 7, this cylindrical transmission type light diffusing member 33 is provided with a hollow portion 33a in a part of its outer peripheral surface, so that direct light from the annular light source 31 enters the capsule 20. It is designed to irradiate. Reference numeral 35 denotes a partial light shielding member, which is attached to the outside of the cylindrical transmission type light diffusing member 33. This partial light shielding member 3
5, as shown in FIG. 8, two places on the lower end of the outer peripheral surface in the capsule axial direction are notches 35a.
, 35b. The above-described annular light source 311 reflecting member 32. FIG. 6 is a plan view showing the transmissive reflective member 331 and the partial light shielding member 35, each of which is arranged concentrically. In conclusion, since the imaging/judgment section has a configuration that includes 231 TV cameras and 24 image processing circuits, the operation is as follows. The light from the annular light source 31 is directed toward the central axis from all directions by the reflecting member 32. First, the partial light shielding member 35
Since the light is blocked by areas other than the notch, the light is limited to only light directed diagonally downward with the axial direction of the capsule 20 being the main direction. Therefore, when the partial light shielding member 358 shown in FIG. 8 is used, the light directed diagonally downward with the main direction of the axis of the capsule 20 from the right side of FIG. 5 is relatively strong;
The one from the left side is relatively weak. In other words, the left and right sides are unbalanced. Next, by using a transmission type light diffusing member 33A as shown in FIG. 7, relatively strong light is emitted from the annular light source 31 directly to the capsule 20 through the hollow part 33a, and light is diffused in all directions. The light that irradiates the capsule 20 is relatively weak. Further, the light directed downward from the annular light source 31 is diffused in all directions by the annular transmissive light diffusing member 32A, and a portion of the light illuminates the capsule 20 obliquely from above. As explained in more detail above, for the inspection of hangnails, combined illumination consisting of directional emphasis illumination and diffused illumination with uniform intensity in all directions is appropriate. On the other hand, for color combination inspection, diffused illumination is suitable. Next, the reason will be explained. Colored capsule 20 (body 2
12(b) and 12(C1). 1
Figure 2 (bl is for cap 20C, body 2OB is red), Figure 12 (C1 is for cap 20C, body 2
This is the case where both 0B are white. Since the brightness of white is greater than that of red, the respective video signal levels differ as shown. In addition, FIG. 12(b) and
In FIG. 2(C), the small protrusion at the middle position of the video signal is a slight increase due to reflection at the open end of the cap 20C. Therefore, the video signal is transmitted between the cap 20C and the body 2O.
When first-order differential processing is performed at the position of the boundary with B, Figure 12 (b
There is a difference between the white/red case of C1 and the white/white case of C1 in FIG. For example, "hangnails" in the case of a combination of white and white are difficult to identify.On the other hand, for color combination inspection, enhanced lighting is inappropriate for the following reasons.As shown in Figure 13(a). 20 colored capsules (body 2
Figures 13(b) and 13(e) show one video signal obtained by horizontally scanning the cap 0B and cap 20C with a TV camera in the horizontal direction of the figure under emphasized illumination from the direction of the arrow. show. In addition, in FIG. 13(b), when the cap 20C is white and the body 20B is red, No. 13117 (C1 is Camp 2
This is a case where both 0C and body 20B are white. The reason why protrusions appear in some places in the video signal is due to partially strong reflected light from the emphasis illumination. In particular, relatively strong reflection occurs at the opening end face of the cap 20C, and the video signal exhibits a large peak value at this location. Also, if the direction of the emphasis illumination is reversed left and right, although not shown,
Since a shadow is created at the opening end surface of the camp 20C, a sharp recess is created in the video signal. Note that the characteristics of the peak portion of the video signal are understood by second-order differentiation. Therefore, in any case, differences in color combinations cannot be discerned due to the influence of reflected light on the open end face of the cap 20C under enhanced illumination. In other words, inspection is impossible. It should be noted that by using enhanced illumination, "hangnails" can be better identified as described below. That is, the annular light source 31 directly irradiates the capsule 20.
With reference to Figures 10 and 11, we will explain how the light (emphasizing lighting) is reflected at the hangnail part and how that information is input to the TV camera. . The direct light from the annular light source 31 hits the cap side of the capsule 20 in the directions of arrows P and R, but depending on whether it hits the capsule 20 from the opposite side or in the directions of arrows Q and S, it may directly hit the opening end surface of the cap. Or, conversely, the light may be irradiated from the back side of the opening end face. In the former case, the TV camera 23 receives strong reflected light from the corner of the end face of the cap opening. Therefore, the 10th
If there is a "hangnail" 20b in the form of a part of the body side being cut off and riding up on the cap side as shown in the figure, the reflected light from this part is weaker than that from other normal opening end corners, and is reflected to the TV camera 23. is input. Due to the difference between the two,
The presence and extent of hangnails can be detected. Moreover, in the latter case, the TV camera 23 will capture the shadow produced at the end face of the cap opening. Therefore, if there is a "hangnail" 20b as shown in FIG. 10, a shadow will appear in this area that is shifted from the position of the other normal opening end surface, or the shadow will almost disappear. . And “hangnail” 20b
There is strong reflected light at the corner of the end face. On the other hand, in the case of a "hangnail" 20c in which a part of the camping side is cut off and goes inside the body side as shown in Fig. 11, the light in the direction of arrow R will cause the "hangnail" to appear on the other normal end surface. The reflected light is weaker than that from the outside. Conversely, depending on the light in the direction of the arrow S, strong reflected light can be obtained from the corner of the body end face, which is the tip of the "hangnail" 20C. There is no shading at the end of the camp, which is the base of the "hangnail" 20c. On the other hand, of course, a normal end face of the cap produces a shadow. Originally, the aim of conventional lighting devices was to make it easier to detect "hangnail" defects on the capsule, or in other words, to highlight the "hangnail" defects. In addition to applying strong direct light from a light source, □ also using diffused light with uniform intensity in all directions in order to reduce the emphasis caused by this strong direct light. In reality, cases of poor capsule color combinations, that is, cases of ``different types of capsules'' regarding color, are extremely rare compared to cases of ``hangnail'' defects. Lighting elements are more strongly woven than diffuse lighting elements. Therefore, it is difficult to distinguish the color combinations of the capsules.

【発明の目的】[Purpose of the invention]

この発明の目的は、従来のものがもつ以上の問題点を解
消し、白・黒TVカメラを用い、色の明度に基づいてな
される、色付きカプセルのボディとキャップそれぞれの
色の組み合わせの検査方法を提供することにある。
The purpose of this invention is to solve the problems of the conventional method, and to inspect the color combination of the body and cap of a colored capsule based on the brightness of the color using a black and white TV camera. Our goal is to provide the following.

【発明の要点】[Key points of the invention]

上述の目的を達成するための本発明の要点は、次のよう
な考え方に基づいている。 すなわち、明度に基づいて色の組み合わせを検査する箇
所を、カプセルのキャップ開口端部から少し離れた位置
に、すなわちカプセルのキャップ開口端面の、軸方向に
沿った両側にそれぞれ設定する。そして、この両側の検
出箇所に対応する映像信号レベルの差をとり、この差の
値を基準の色の組み合わせの差(設定値)と比較して良
・不良を判定する□というものである。 したがって、この発明の構成は次のとおりである。カプ
セルの色の組み合わせを検査する箇所を、キャップ開口
端面を挟んで、カプセルの軸方向にとった両側の2箇所
の所定領域とする。この所定領域は、カプセルの軸方向
にとった所定横幅と、カプセル外径に若干の余裕を含め
た所定縦幅とをもつ。そして、白・黒TVカメラの水平
走査の方向をカプセルの軸の方向に一致させる。このT
Vカメラの映像信号を前記横幅についてそれぞれピーク
ホールドして、両側各所定領域のピークホールド値を求
める。この各ピークホールド値の差を、基準の色付きカ
プセルの組み合わせによって定められた設定値と比較す
る。そして、この各値の差が、設定値以内であれば良、
設定値を超えれば不良と判定する。□ また、照明として強調照明要素を含ませると、カプセル
のキャップ開口端部の「ささくれ」の検査も同時に可能
となる。 なお、上述した所定領域において映像信号のピークホー
ルド値を求めたことで、カプセル表面に黒色ないしは暗
色で印刷された文字、マークなどの影響を除去すること
ができる。
The gist of the present invention for achieving the above object is based on the following idea. That is, the locations where color combinations are tested based on brightness are set at positions slightly apart from the cap opening end of the capsule, that is, on both sides of the cap opening end surface of the capsule along the axial direction. Then, the difference between the video signal levels corresponding to the detection points on both sides is taken, and the value of this difference is compared with the reference color combination difference (set value) to determine whether it is good or bad. Therefore, the configuration of the present invention is as follows. The locations where the color combination of the capsule is inspected are two predetermined areas on both sides of the capsule in the axial direction, with the cap opening end face in between. This predetermined region has a predetermined width in the axial direction of the capsule and a predetermined vertical width including a slight margin in the outer diameter of the capsule. Then, the horizontal scanning direction of the black and white TV camera is made to coincide with the direction of the axis of the capsule. This T
The video signal of the V camera is peak-held for each of the widths, and the peak-hold values for each predetermined area on both sides are determined. The difference between these peak hold values is compared with a set value determined by a reference combination of colored capsules. It is good if the difference between these values is within the set value.
If it exceeds the set value, it is determined to be defective. □ Also, by including a highlighting lighting element as illumination, it is also possible to simultaneously inspect for "hangnails" at the opening end of the capsule cap. Note that by determining the peak hold value of the video signal in the above-mentioned predetermined area, it is possible to remove the influence of characters, marks, etc. printed in black or dark colors on the capsule surface.

【発明の実施例】[Embodiments of the invention]

この発明の実施例を、以下に図を参照しながら説明する
。 第1図は被検査カプセルに関する映像信号のピークホー
ルド領域を示す平面図で、20は色付きカプセル、20
Cはそのキャップ、20Bはそのボディ。 200はキャンプ20Cの開口端面、U、  Vはそれ
ぞれキャップ20C,ボディ2OBを部分的に含んで選
んだ前領域、後領域、x、  yはそれぞれ撮像装置で
ある白・黒TVカメラの水平走査方向、垂直走査方向で
ある。 そして、識別すべき色の組み合わせは、白色キャンプ・
赤色ボディと白色キャンプ・白色ボディとをそれぞれ基
準とする場合を例に説明する。なお、カプセルの搬送は
必ずキャップ側が搬送方向の先頭になるように斉整され
るので、赤色キャップ・白色ボディの組み合わせは容易
に識別される。 また、撮像に関しての照明は色付きカプセルの検査とし
ては、拡散照明1強調照明または両者の複合照明のいず
れであってもよいが、「ささくれ」検査のために少なく
とも強調照明要素を含めである。 次に、各水平走査ごとの領域U、 Vにおける映像信号
のピークホールド値を縦軸に、垂直走査時間を横軸に、
それぞれとって表した図を、キャンプが白色、ボディが
赤色の場合について示したものが第2図である。すなわ
ち、−1は白色キャンプに、R1は赤色ボディにそれぞ
れ対応する。この場合、映像信号のレベルは色の明度に
対応している。 なお、U、V領域における映像信号のピークホールド値
をとるようにした理由は、印刷されたマークや文字(黒
色ないしは暗色が普通である)がある場合、この影°響
を除去するためである。 カプセルを真上から見たときがもっとも明るく、直径方
向の両端にいくほど暗くなるから、第2図(alのよう
にWl、R1ともほぼ中央部で上方に凸な曲線をなす。 図で中央やや右寄りにピーク状部分があるが、これは強
調照明によって部分的光沢部からの反射光が強くあられ
れることを示している。 次に、第2図(a)の旧からR1を差し引いた値を示し
たものが第2図(b)の曲線で、この図には同時に、白
色キャップ・赤色ボディ、白色キャップ・白色ボディの
各組み合わせに対する2値化のための上・下各しきい値
、に2.Kl 、G2.G1を示しである。 さて第2図(C)は、第2図(b)のU、  V各領域
に関するピークホールド値の差が、白色キャップ・赤色
ボディの組み合わせに対する上・下各しきい値の範囲内
にあるものをR2同じく範囲外にあるものをLとして表
した図である。第2図(d)は、第2図(b)のU、 
 V各領域に関するピークホールド値の差が、白色キャ
ップ・白色ボディの組み合わせに対する上・下各しきい
値の範囲内にあるものをR1同じく範囲外にあるものを
Lとして表した図である。 前記第2図(C)、第2図(d+の意味するところは、
次のとおりである。すなわち、基準の色の組み合わせが
、白色キャップ・赤色ボディの場合には、第2図(bl
のピークホールド値の差の曲線に対して、下・上各しき
い値に1.に2の物差しを当てる。そうすると、部分的
に光沢があって映像信号にピークがあるかもしれないが
、しきい値Kl、に2の範囲内にあるものは、第2図(
C)のレベルHに対応する区間で、垂直走査周期の大部
分を占めている。したがって、検査すべき色の組み合わ
せで、レベル■]に対応する区間の垂直走査周期に対す
る割合が、あらかじめ定められた値以上なら、白色キャ
ップ・赤色ボディと判定できる。 また逆に、基準の色の組み合わせが、白色キャップ・白
色ボディの場合には、第2図(b)のピークホールド値
の差の曲線に対して、下・上各しきい値G1.G2の物
差しを当てる。そうすると、部分的に光沢があって映像
信号にピークがあり、変則的な箇所がでるか“もしれな
いが、しきい値Gl、G2の範囲内にあるものは、第2
図(d)のレベルHに対応する区間で、垂直走査周囲の
掻く一部分を占めているに過ぎない。したがって、検査
すべき色の組み合わせが第2図(a)のように白キャッ
プ・赤ボディの場合には、レベルHに対応する区間の、
垂直走査周囲に対する割合があらかじめ定められた値以
下であるから、白色キャップ・白色ボディとは判定され
ない。 次に、被検査カプセルが白キャンプ・白ボディの場合を
見てみると、領域U、Vに関する、水平走査ごとの映像
信号のピークホールド値を縦軸に、垂直走査時間を横軸
にとると、第3図(alのWl、W2のようになる。そ
して、前記−1,W2の差は第3図(b)のようになる
。これに、第2図(blと同様に、白色キャンプ・赤色
ボディ、白色キャンプ・白色ボディの各組み合わせに対
する2値化のための上・上各しきい値、K2.Kl 、
G2.Glを重ねてみる。 そうすると、第3図(blのU・■各領域に関するピー
クホールド値の差が、白色キャップ・赤色ボディの組み
合わせに対する上・上各しきい値に2.に1の範囲内に
あるものをH1同じく範囲外にあるものをLとして表し
た図、第3図(C1が得られる。 また同様に、第3図(b)のU−V各領域に関するピー
クホールド値の差が、白色キャップ・白色ボディの組み
合わせに対する上・上各しきい値G2.G1の範囲内に
あるものをH1同じく範囲外にあるものをLとして表し
た図、第3図(d)が得られる。 すなわち、基準の色の組み合わせが、白色キャップ・赤
色ボディの場合には、第3図(b)のピークホールド値
の差の曲線に対して、下・1各しきい値に2.Klの物
差しを当てる。そうすると、部分的に光沢があって映像
信号にピークがあるかもしれないが、しきい値Kl、に
2の範囲内にあるものは、第3図(C)のレベルHに対
応する区間で、垂直走査周期の極く一部分を占めている
だけである。したがって、検査すべき色の組み合わせで
ある第3図(a)の−1、−2の場合は、基準の組み合
わせとは異なると判定できる。 また逆に、基準の色の組み合わせが、白色キャップ・白
色ボディの場合には、第3図(blのピークホールド値
の差の曲線に対して、下・1各しきい値Gl 、 G2
の物差しを当てる。そうすると、部分的に光沢があって
映像信号にピークがあり、変則的な箇所がでるかもしれ
ないが、しきい値Gl、G2の範囲内にあるものは、第
3図(d)のレベルHに対応する区間で、垂直走査周期
の大部分を占めている。 したがって、検査すべき色の組み合わせが第3図(al
のように白キャップ・白ボディの場合には、レベルHに
対応する区間の、垂直走査周期に対する割合があらかじ
め定められた値以上であるから、白色キャップ・白色ボ
ディと判定されることになる。 次に、第4図の色付カプセル自動外観検査装置の画像処
理・判定機能を示すブロック回路図に基づいて、この装
置の動作を詳細に説明する。なお、このブロック回路図
は、第5図の画像処理回路24と判定回路25との機能
を示すものである。 第4図で、1は前領域Uのピークホールド値を抽出する
ための回路、2は同じく後領域Vのピークホールド値を
抽出する回路、3は2個の入力値の差を出力する差分器
、4.5.8は2個の入力の大きさを比較し、正ならレ
ベルHを、負ならレベルLをそれぞれ出力する比較器、
6は2個の入力のどちらもがレベルHならHを出力する
、いわゆるAND回路であ名。7はカウンタで、ある状
態の合計持続期間を計数する機能をもつ。 次に、各種信号の入出力の流れ状態を、上述した各回路
の結合関係とともに説明する。まず、映像信号と水平同
期信号とが、それぞれ前領域ピークホールド回路1.後
領域ピークホールド回路2に並行して入力され、同時に
前領域ピークホールド回路1には前領域規定信号が、後
領域ピークホールド回路2には後領域規定信号がそれぞ
れ入力される。 この前領域規定信号と後領域規定信号とは、映像信号の
内で前頭域U、後領域Vに属するものだけを取り込むた
めの信号で、各ピークホールド回路の、図示してない入
力部の0N−OFFスイッチを作動させるものである。 したがって、各水平走査ごとのU、 V各領域のピーク
ホールド値が、前領域ピークホールド回路1.後領域ピ
ークホールド回路2から出力される。 この両ピークホールド値を入力して、差分器3はその差
の値を出力する。 この差の値は、次に比較器4.5に入力されるが、この
比較器4には上しきい値が、比較器5には下しきい値が
それぞれ同時に入力される。したがって、比較器4から
は、上しきい値より小さい前記差の値だけが、レベルH
信号として出力され、同様に比較器5からは、下しきい
値より大きい前記差の値だけが、レベルH信号として出
力されることになる。 次に、前記比較器4.5からの出力のいずれもがHのと
きだけ、ANDN0回路よって、■]とじて出力される
。つまり、上しきい値と下しきい値との範囲内にあるも
のだけが出力されるわけで、その意味でこの出力は許容
値であることを表す信号□許容値信号□である。 この許容値信号は、垂直同期信号、クロック信号ととも
にカランタフに入力される。ここでは、許容値信号の回
数が計数され、クロック信号によって時間的変換をうけ
て許容値状態の合計期間を出力することになる。しかも
、この合計をとる期間は垂直同期信号によって規定され
る1垂直走査周期つまり、1フレ一ム周期の間である。 このようにしてカウンタ7の出力は、許容値である期間
−許容値期間−を表す信号である。 この許容値期間は、比較器8によって、良・不良判定の
設定値ともいうべき期間しきい値と比較され、正の場合
だけ良判定信号が出力される。 上述したように、白・黒TVカメラの映像信号を基準の
色付きカプセルのキャンプ、ボディ各色の組み合わせに
基づいて、所定の上・下しきい値と期間しきい値とを設
定することによって画像処理し、被検査色付きカプセル
の色の組み合わせの良・不良を判定することができる。 なお、照明条件として拡散照明と強調照明との複合照明
であれば、カプセルの色の組み合わせはもちろん、キャ
ップの「ささくれ」不良も同時に検査でき、実用上極め
て有効である。
Embodiments of the invention will be described below with reference to the drawings. FIG. 1 is a plan view showing a peak hold area of a video signal regarding a capsule to be inspected, in which 20 is a colored capsule;
C is the cap, 20B is the body. 200 is the opening end surface of the camp 20C, U and V are the front and rear regions selected to partially include the cap 20C and the body 2OB, respectively, and x and y are the horizontal scanning directions of the white and black TV cameras, respectively, which are the imaging devices. , in the vertical scanning direction. The color combination to be identified is white camp.
An example will be explained in which a red body and a white camp/white body are used as standards. Note that the capsules are always transported so that the cap side is at the top in the transport direction, so the combination of red cap and white body can be easily identified. Further, the illumination for imaging may be either diffuse illumination, one emphasis illumination, or a combination of both for inspection of colored capsules, but at least an emphasis illumination element is included for "hangnail" inspection. Next, the peak hold value of the video signal in areas U and V for each horizontal scan is plotted on the vertical axis, and the vertical scanning time is plotted on the horizontal axis.
Figure 2 shows the respective diagrams when the camp is white and the body is red. That is, -1 corresponds to the white camp, and R1 corresponds to the red body. In this case, the level of the video signal corresponds to the brightness of the color. The reason for taking the peak hold value of the video signal in the U and V regions is to remove the influence of printed marks or characters (usually black or dark colors). . It is brightest when the capsule is viewed directly from above, and it gets darker toward both ends in the diametrical direction, so as shown in Figure 2 (al), both Wl and R1 form an upwardly convex curve at approximately the center. There is a peak-shaped part slightly to the right, which indicates that the reflected light from the partially glossy part is strongly affected by the emphasis illumination.Next, the value obtained by subtracting R1 from the old value in Fig. 2 (a). The curve shown in FIG. 2(b) shows the upper and lower threshold values for binarization for each combination of white cap/red body, white cap/white body, 2.Kl and G2.G1 are shown in Figure 2 (C). Figure 2 (C) shows the difference in peak hold values for each region U and V in Figure 2 (b) for the combination of white cap and red body. This is a diagram in which R2 represents those within the range of the upper and lower thresholds, and L represents those outside the range.
V is a diagram in which the difference in peak hold values for each region is within the upper and lower threshold ranges for the combination of white cap and white body as R1, and that outside the range as L. The meaning of FIG. 2 (C) and FIG. 2 (d+ is as follows)
It is as follows. In other words, if the standard color combination is a white cap and a red body, the color combination shown in Figure 2 (bl
For the peak hold value difference curve, 1. is applied to each of the lower and upper threshold values. Apply the 2nd ruler to . In this case, there may be some gloss and a peak in the video signal, but if the threshold value Kl is within the range of 2, then the threshold value Kl is within the range of 2 as shown in Figure 2 (
This section corresponds to level H in C) and occupies most of the vertical scanning period. Therefore, in the combination of colors to be inspected, if the ratio of the section corresponding to level 1 to the vertical scanning period is equal to or greater than a predetermined value, it can be determined that the object is a white cap/red body. Conversely, when the reference color combination is white cap and white body, the lower and upper threshold values G1. Apply G2's ruler. In this case, there may be some parts that are glossy and the video signal has a peak, and some irregular parts may appear, but those within the range of the thresholds Gl and G2 are
This is the section corresponding to level H in FIG. 3(d), which occupies only a portion of the vertical scanning periphery. Therefore, if the color combination to be inspected is white cap/red body as shown in Fig. 2(a), in the section corresponding to level H,
Since the ratio to the vertical scanning periphery is less than a predetermined value, it is not determined to be a white cap/white body. Next, looking at the case where the capsule to be inspected is a white camp/white body, the vertical axis is the peak hold value of the video signal for each horizontal scan, and the horizontal axis is the vertical scanning time. , Wl and W2 in Fig. 3 (al).Then, the difference between -1 and W2 becomes as shown in Fig. 3 (b). In addition, as in Fig. 2 (bl), the white camp・Upper and upper threshold values for binarization for each combination of red body, white camp, and white body, K2.Kl,
G2. Try overlapping Gl. Then, as shown in Figure 3 (Figure 3), if the difference in peak hold values for each region of bl is within the range of 1 to 2 for the upper and upper thresholds for the combination of white cap and red body, then Figure 3 (C1) is obtained, in which the outside of the range is expressed as L. Similarly, the difference in peak hold values for each UV region in Figure 3 (b) is determined by the difference between the white cap and white body. Figure 3(d) is obtained, in which upper and upper threshold values G2 and G1 are expressed as H1 for the combination, and L is outside the range. If the combination is a white cap and a red body, apply a 2.Kl ruler to each of the lower and 1 thresholds on the peak hold value difference curve in Figure 3 (b). Although the video signal may be glossy and have a peak, if the threshold Kl is within the range of 2, the vertical scanning period is the section corresponding to level H in Figure 3(C). Therefore, in the case of -1 and -2 in Fig. 3(a), which are the color combinations to be inspected, it can be determined that they are different from the reference combination. In addition, when the reference color combination is white cap and white body, in Figure 3 (for the curve of the difference in peak hold value of bl, the lower and 1 threshold values Gl, G2
Apply the measuring stick. In this case, the video signal may be partially glossy and have peaks, and irregular areas may appear, but those within the range of thresholds Gl and G2 are at level H as shown in Figure 3(d). , which occupies most of the vertical scanning period. Therefore, the color combinations to be tested are shown in Figure 3 (al
In the case of a white cap/white body, as in the case of the white cap/white body, the ratio of the section corresponding to level H to the vertical scanning period is greater than or equal to a predetermined value, so it is determined to be a white cap/white body. Next, the operation of the colored capsule automatic appearance inspection apparatus will be explained in detail based on the block circuit diagram shown in FIG. 4 showing the image processing and determination functions of the apparatus. Note that this block circuit diagram shows the functions of the image processing circuit 24 and determination circuit 25 in FIG. 5. In Figure 4, 1 is a circuit for extracting the peak hold value of the front area U, 2 is a circuit that also extracts the peak hold value of the rear area V, and 3 is a difference device that outputs the difference between the two input values. , 4.5.8 is a comparator that compares the magnitude of two inputs and outputs level H if positive and level L if negative,
6 is a so-called AND circuit that outputs H if both of its two inputs are at level H. 7 is a counter, which has a function of counting the total duration of a certain state. Next, the input/output flow state of various signals will be explained together with the coupling relationship of each circuit described above. First, a video signal and a horizontal synchronizing signal are respectively input to the front area peak hold circuit 1. The signals are input in parallel to the rear region peak hold circuit 2, and at the same time, the front region definition signal is input to the front region peak hold circuit 1, and the rear region definition signal is input to the rear region peak hold circuit 2. The front region defining signal and the rear region defining signal are signals for capturing only those belonging to the frontal region U and the rear region V of the video signal, and are input to the 0N input section (not shown) of each peak hold circuit. - Activates the OFF switch. Therefore, the peak hold values of the U and V regions for each horizontal scan are determined by the previous region peak hold circuit 1. It is output from the rear region peak hold circuit 2. These two peak hold values are input, and the differentiator 3 outputs the difference value. This difference value is then input to the comparator 4.5, to which the upper threshold value and the lower threshold value are simultaneously input, respectively, to the comparator 5. Therefore, only the difference value smaller than the upper threshold value is output from the comparator 4 at the level H.
Similarly, only the difference value larger than the lower threshold value is outputted from the comparator 5 as an H level signal. Next, only when both of the outputs from the comparators 4.5 are H, the ANDN0 circuit outputs as ■]. In other words, only those within the range between the upper threshold value and the lower threshold value are output, and in this sense, this output is a signal □Tolerance value signal□ indicating that it is an allowable value. This tolerance signal is input to the carantuff together with the vertical synchronization signal and the clock signal. Here, the number of tolerance signals is counted and subjected to time conversion by a clock signal to output the total duration of the tolerance state. Moreover, the period during which this sum is taken is one vertical scanning period defined by the vertical synchronizing signal, that is, one frame period. In this way, the output of the counter 7 is a signal representing the period of the permissible value - the permissible value period. This allowable value period is compared with a period threshold value, which can also be called a set value for good/bad judgment, by a comparator 8, and a good judgment signal is output only if it is positive. As described above, image processing is performed by setting predetermined upper and lower thresholds and period thresholds based on the camp of the colored capsule and the combination of each color of the body based on the image signals of the black and white TV cameras. It is possible to judge whether the color combination of the colored capsule to be inspected is good or bad. Note that if the illumination conditions are a combination of diffused illumination and emphasized illumination, it is possible to simultaneously inspect not only the combination of capsule colors but also defects such as hangnails in the cap, which is extremely effective in practice.

【発明の効果】【Effect of the invention】

この発明の要点は次のとおりである。すなわち、カプセ
ルの色の組み合わせを検出する箇所を、キャップ開口端
面を挟んで、カプセルの軸方向にとった前後の2箇所の
所定領域□カプセルの軸方向にとった所定横幅と、カプ
セル外径に若干の余裕を含めた所定縦幅とをもつ領域□
とする。そして、白・黒TVカメラの水平走査の方向を
カプセルの軸の方向に一致させ、カプセルの明度に対応
する、TVカメラの映像信号を前記横幅についてそれぞ
れピークホールドする。この各ピークホールド値の差を
、基準の色付きカプセルの組み合わせによって定められ
る上・下しきい値と比較し、この前後各値の差が、上・
下しきい値以内であれば良、上・下しきい値を超えれば
不良と判定する。 したがって、この発明によれば、従来のものに比べ次の
ようなすぐれた効果がある。 (1)  従来、カラーTVカメラを含むカラー画像装
置でないと困難とされてきた色付きカプセルの色の組み
合わせの自動検査を、白・黒画像装置によって可能にし
た。その結果、従来、設備のコスト高のために採算がと
りにくく普及の隘路になっていたこの問題の解決により
、色付きカプセル検査の自動化が大きく前進することに
なる。 (2)シかも実施態様によれば、同じ照明条件の下で、
色付きカプセルの色の組み合わせの検査と、「ささくれ
」の検査とが同時に可能となるので、照明装置をはじめ
検査装置全体が重装備になることを抑えることができる
。 (3)  カプセル製造ラインの自動化の障害であった
検査工程の完全な自動化の実現により、カプセル製造ラ
イン全体の生産能力が著しく向上される。 (4)  画像処理の手続きが比較的簡単であるから、
故障のおそれを増したり、処理速度を犠牲にしたすする
ことがなく、かつ増分コストを低く抑えることができる
The main points of this invention are as follows. In other words, the points where the combination of colors of the capsule are detected are two predetermined areas in the front and back in the axial direction of the capsule with the cap opening end face in between □ A predetermined width in the axial direction of the capsule and the outside diameter of the capsule. An area with a specified vertical width including some margin □
shall be. Then, the horizontal scanning directions of the black and white TV cameras are made to coincide with the direction of the axis of the capsule, and the video signals of the TV cameras corresponding to the brightness of the capsule are peak-held for each of the widths. The difference between these peak hold values is compared with the upper and lower threshold values determined by the combination of reference colored capsules, and the difference between the values before and after the upper and lower thresholds is calculated.
If it is within the lower threshold, it is determined to be good, and if it exceeds the upper and lower thresholds, it is determined to be defective. Therefore, the present invention has the following superior effects compared to the conventional one. (1) Automatic inspection of the color combinations of colored capsules, which was conventionally considered difficult to do without a color imaging device including a color TV camera, has become possible using a black-and-white imaging device. As a result, the automation of colored capsule inspection will make great progress by solving this problem, which has hitherto been unprofitable due to the high cost of equipment and has been a barrier to widespread use. (2) According to an embodiment, under the same lighting conditions,
Since it is possible to simultaneously inspect the color combination of colored capsules and inspect for hangnails, it is possible to prevent the entire inspection device, including the lighting device, from becoming heavily equipped. (3) The production capacity of the entire capsule manufacturing line will be significantly improved by completely automating the inspection process, which has been an obstacle to automating the capsule manufacturing line. (4) The image processing procedure is relatively simple;
It does not increase the risk of failure or sacrifice processing speed, and incremental costs can be kept low.

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

第1図は被検査カプセルのピークホールド領域を示す平
面図、 第2図は、キャ゛ツブが白色、ボディが赤色の場合の、
映像信号、差信号および2値化信号の説明図、第3図は
、キャンプが白色、ボディも白色の場合の映像信号、差
信号および2値化信号の説明図、第4図は、この発明に
係る実施例を適用した色付きカプセル自動外観検査装置
の画像処理・判定機能を示すブロック回路図、 第5図はこの発明に係る実施例の対象である色付きカプ
セル自動外観検査装置の全体構成図と照明部の断面図、 第6図は同じく照明部の平面図、 第7図は前記外観検査装置の透過形光拡散部材を示す斜
視図、 第8図は前記外観検査装置の部分遮光部材を示す斜視図
、 第9図は、薬剤カプセルのキャップ・ボディおよびこれ
らを嵌め合わせたときの各側面図、第10図、第11図
は、2つの態様の「ささくれ」状態を示す縦断面図と平
面図、 第12図(a)は色付きカプセルの側面図、第12図(
blは、拡散照明の下での、白色キャンプ・赤色ボディ
の組み合わせにおける1水平走査線分の映像信号図、 第12図(C)は、同じく白色キャップ・白色ボディの
組み合わせにおける1水平走査線分の映像信号図、第1
3図(alは、矢印P方向の強調照明の下での色付きカ
プセルの側面図、 第13図(blは、前記強調照明の下での、白色キャッ
プ・赤色ボディの組み合わせにおけるl水平走査線分の
映像信号図、 第13図(C)は、同じ(白色キヤ・ノブ・白色ボディ
の組み合わせにおける1水平走査線分の映像信号図であ
る。 符号説明 G1:白色キャップ・白色ボディの組み合わせに対する
下しきい値、 G2:同じく上しきい値、 に1:白色キャップ・赤色ボディの組み合わせに対する
下しきい値、 K2:同じく上しきい値、 −1:白色キャッ゛プの前領域に関する、各水平走査ご
との映像信号のピークホールド値を縦軸に、垂直走査時
間を横軸にとって表した曲線、託:白色ボディの後領域
に関する、各水平走査ごとの映像信号のピークホールド
値を縦軸に、垂直走査時間を横軸にとって表した曲線、 R1:赤色ボディの後領域に関する、各水平走査ごとの
映像信号のピークホールド値を縦軸に、垂直走査時間を
横軸にとって表した曲線、 U:前領域、■:後領域、 l:前領域ピークホールド回路、 2:後領域ピークホールド回路、 3:差分器、4,5.8:比較器、6:へND回路、7
:カウンタ、20:色付きカプセル、20B二色付きボ
ディ、20C:色付きキャップ、20D:キャップ開口
端面。 托;人りi癒と山口 上 第 1 已 12関 gj!3rA 第 5図 第6閃 第7図 5b ギ 8関 fal              fb1軍9項 窩10頃 vfII 図
Figure 1 is a plan view showing the peak hold area of the capsule to be inspected. Figure 2 is a plan view of the capsule to be inspected when the capsule is white and the body is red.
An explanatory diagram of a video signal, a difference signal, and a binary signal; FIG. 3 is an explanatory diagram of a video signal, a difference signal, and a binary signal when the camp is white and the body is also white; FIG. 4 is an explanatory diagram of the present invention. FIG. 5 is a block circuit diagram showing the image processing/judgment function of the automatic visual inspection device for colored capsules to which the embodiment according to the present invention is applied; FIG. FIG. 6 is a plan view of the illumination section; FIG. 7 is a perspective view of a transmissive light diffusion member of the visual inspection device; FIG. 8 is a partial light shielding member of the visual inspection device. FIG. 9 is a perspective view, FIG. 9 is a side view of the cap and body of the drug capsule and when these are fitted together, and FIGS. 10 and 11 are a longitudinal cross-sectional view and a plan view showing two embodiments of the "hangnail" state. Figure 12(a) is a side view of the colored capsule, Figure 12(a) is a side view of the colored capsule;
bl is a video signal diagram for one horizontal scanning line in the combination of white camp and red body under diffused illumination, and Figure 12 (C) is a video signal diagram for one horizontal scanning line in the combination of white cap and white body. Video signal diagram, 1st
Figure 3 (al is a side view of the colored capsule under emphasis illumination in the direction of arrow P, Figure 13 (bl is l horizontal scanning line segment in the combination of white cap and red body under the emphasis illumination) Figure 13 (C) is a video signal diagram for one horizontal scanning line in the same combination of white can, knob, and white body. Threshold value, G2: Same upper threshold value, 1: Lower threshold value for the combination of white cap and red body, K2: Same upper threshold value, -1: Each horizontal value regarding the area in front of the white cap A curve representing the peak hold value of the video signal for each scan on the vertical axis and the vertical scanning time on the horizontal axis; R1: A curve that represents the vertical scanning time on the horizontal axis, R1: A curve that represents the peak hold value of the video signal for each horizontal scan regarding the rear area of the red body on the vertical axis, and vertical scanning time on the horizontal axis, U: Front Area, ■: Rear area, l: Front area peak hold circuit, 2: Rear area peak hold circuit, 3: Differentiator, 4, 5.8: Comparator, 6: ND circuit, 7
: Counter, 20: Colored capsule, 20B Two-color body, 20C: Colored cap, 20D: Cap opening end surface.托;Hitori Ihei and Yamaguchi Kami 1st 12th Seki gj! 3rA Figure 5 Figure 6 Figure 7 Figure 5b Gi 8 Guan fal fb1 army 9 section fossa around 10 vfII Figure

Claims (1)

【特許請求の範囲】 1)色付きカプセルの、互いに嵌め合わされたボディお
よびキャップの色の組み合わせを、照明下で、前記カプ
セルの円筒部表面のほぼ法線方向を光軸とする白・黒T
Vカメラを用い、前記それぞれの色の明度に基づいて検
出し、良否を検査する方法において、前記各色の検出箇
所を前記カプセルのキャップ開口端面を挟んでカプセル
の軸方向にとった、両側2箇所の所定領域とし、被検査
カプセルに関するこの両側各所定領域に対する前記TV
カメラの各映像信号のレベル値の差を、所定設定値と比
較して良・不良を判定するようにしたことを特徴とする
色付きカプセルの検査方法。 2)特許請求の範囲第1項記載の方法において、照明は
、少なくとも、カプセル軸と前記TVカメラの光軸との
なす平面にほぼ平行で、かつ前記TVカメラ側からほぼ
一方向にカプセルを照射する光であることを特徴とする
色付きカプセルの検査方法。 3)特許請求の範囲第1項または第2項記載の方法にお
いて、所定領域は、前記TVカメラの光軸方向から見た
とき、カプセルの軸方向にとった所定横幅と、少なくと
もカプセル外径寸法の縦幅とをもつ方形であることを特
徴とする色付きカプセルの検査方法。 4)特許請求の範囲第1項ないしは第3項のいずれかの
項に記載の方法において、両側各所定領域に対する各映
像信号は、カプセル軸の方向についてのピークホールド
値であることを特徴とする色付きカプセルの検査方法。
[Scope of Claims] 1) The color combination of the body and cap fitted together of the colored capsule is determined under illumination by a white/black T whose optical axis is approximately normal to the surface of the cylindrical portion of the capsule.
In the method of detecting and inspecting quality based on the brightness of each color using a V-camera, the detection points of each color are set at two locations on both sides in the axial direction of the capsule across the cap opening end surface of the capsule. and the TV for each predetermined area on both sides of the capsule to be inspected.
1. A method for inspecting colored capsules, characterized in that the difference in level values of each video signal of a camera is compared with a predetermined set value to determine whether the capsule is good or bad. 2) In the method according to claim 1, the illumination illuminates the capsule at least substantially parallel to a plane formed by the capsule axis and the optical axis of the TV camera, and in substantially one direction from the TV camera side. A method for inspecting colored capsules characterized by using light that 3) In the method according to claim 1 or 2, the predetermined region has a predetermined width in the axial direction of the capsule and at least the capsule outer diameter dimension when viewed from the optical axis direction of the TV camera. A method for inspecting a colored capsule, characterized in that it is rectangular with a vertical width of . 4) In the method according to any one of claims 1 to 3, each video signal for each predetermined area on both sides is a peak hold value in the direction of the capsule axis. How to test colored capsules.
JP61034283A 1986-02-19 1986-02-19 Inspecting method for colored capsule Granted JPS62192638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61034283A JPS62192638A (en) 1986-02-19 1986-02-19 Inspecting method for colored capsule

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61034283A JPS62192638A (en) 1986-02-19 1986-02-19 Inspecting method for colored capsule

Publications (2)

Publication Number Publication Date
JPS62192638A true JPS62192638A (en) 1987-08-24
JPH0546898B2 JPH0546898B2 (en) 1993-07-15

Family

ID=12409829

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61034283A Granted JPS62192638A (en) 1986-02-19 1986-02-19 Inspecting method for colored capsule

Country Status (1)

Country Link
JP (1) JPS62192638A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0532259A2 (en) * 1991-09-09 1993-03-17 Ikegami Tsushinki Co., Ltd. A method of and an apparatus for picking up an image of the surface of an object to be inspected
CN105241890A (en) * 2015-08-27 2016-01-13 任红霞 Capsule real-time inspection method with double detection
WO2018173334A1 (en) * 2017-03-23 2018-09-27 Ckd株式会社 Inspection device, ptp packaging machine, and ptp sheet manufacturing method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0532259A2 (en) * 1991-09-09 1993-03-17 Ikegami Tsushinki Co., Ltd. A method of and an apparatus for picking up an image of the surface of an object to be inspected
EP0532259A3 (en) * 1991-09-09 1995-01-18 Ikegami Tsushinki Kk
CN105241890A (en) * 2015-08-27 2016-01-13 任红霞 Capsule real-time inspection method with double detection
WO2018173334A1 (en) * 2017-03-23 2018-09-27 Ckd株式会社 Inspection device, ptp packaging machine, and ptp sheet manufacturing method

Also Published As

Publication number Publication date
JPH0546898B2 (en) 1993-07-15

Similar Documents

Publication Publication Date Title
US5444480A (en) Method of inspecting solid body for foreign matter
AU672094B2 (en) Apparatus for inspecting a bottom border portion of a transparent glass vessel for a foreign article
US20040150815A1 (en) Flaw detection in objects and surfaces
CA1261026A (en) Bottle mouth defect inspection apparatus
JPH09169392A (en) Image type capping state tester
US4682220A (en) Apparatus for detecting containers having a deviating property
US5187573A (en) Inspection method and apparatus
US4487322A (en) Method for inspecting glass containers
EP1006350A1 (en) Method for detecting defects in bottles
JP3929647B2 (en) Tablet appearance inspection device and PTP packaging machine
JPH07159337A (en) Fault inspection method for semiconductor element
JPS62192638A (en) Inspecting method for colored capsule
JP3155106B2 (en) Bottle seal appearance inspection method and apparatus
JP4580122B2 (en) Detecting foreign matter in liquid
JP2000230909A (en) Apparatus for inspecting flaw of heat insulating material
JPH0549185B2 (en)
CN210071691U (en) Check standard bottle
JPH04216445A (en) Device for inspecting bottle
JPH11271240A (en) Inspection method for foreign matter on inner surface of paper cup container
JP2723983B2 (en) Cap tightening angle inspection device
JPH11165717A (en) Sheet package inspection apparatus
JPH10221041A (en) Method for inspecting defect
JPH07286934A (en) Method for detecting liquid leak from liquid-filled container
JPH0313850A (en) Image processing method in wafer-defect inspection
JPH11218502A (en) Inspection apparatus for defect of article