JP3976961B2 - Appearance inspection method for goods - Google Patents
Appearance inspection method for goods Download PDFInfo
- Publication number
- JP3976961B2 JP3976961B2 JP28301299A JP28301299A JP3976961B2 JP 3976961 B2 JP3976961 B2 JP 3976961B2 JP 28301299 A JP28301299 A JP 28301299A JP 28301299 A JP28301299 A JP 28301299A JP 3976961 B2 JP3976961 B2 JP 3976961B2
- Authority
- JP
- Japan
- Prior art keywords
- article
- image
- calculating
- appearance
- capsule
- 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.)
- Expired - Lifetime
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、長円(楕円)形状の物品の外観、例えば外形や表面の異常等を検査する方法に関するものである。
【0002】
【従来の技術】
従来、物品の外観検査は、目視により行われていたが、検査コストや正確さの問題等から、最近では画像処理を利用した検査装置が用いられるようになってきている。画像処理を利用した外観検査方法とは、一般に、先ず物品の表面をカメラで撮像し、その画像の各画素のコントラストを予め設定したしきい値(一般に256階調に分類した中の1つの値)と比較して2値化し、この結果から例えば暗と判定された画素数を計算することにより不良品の検査を行うものである。
【0003】
ところで、例えば錠剤などの場合、その表面には、他の表面とはコントラストの異なる文字等が印刷されている場合があり、この場合、文字等を識別しないようなしきい値を設定すると、文字等よりもコントラストの低い(明度の高い)欠陥は検出することができないという問題がある。
【0004】
そこで、特開平4−36643号公報には、以下に示す装置が提案されている。すなわち、撮像した領域をコントラストに応じて複数の領域に分割し、各分割した領域をそれぞれ予め設定した所定のしきい値によって2値化し、この結果から総合的に判定するようにしたものである。
【0005】
【発明が解決しようとする課題】
しかしながら、この装置の場合、先ず撮像した領域をコントラストに応じて複数の領域に分割する作業が困難であるとともに、煩雑でもあり、また高精度の検査を行おうとしてしきい値を決めると、誤検知の原因になり実ラインでの使用に障害が発生する可能性もある。また、検査対象が長円形や楕円形の物品の場合は、回転することにより種々の方向を向いているのが通常なので、回転パターマッチングの処理は時間的に不可能に近い。
【0006】
本発明の課題は、高精度の検査を行っても安定した検査が行える物品の外観検査方法の提供にある。
【0007】
【課題を解決するための手段】
本発明は、上記課題を解決するため、次のような手段を採用した。
すなわち、本発明は、長円形状をした物品のための外観検査方法であって、物品の映像を入力する映像取込処理と、物品の外形を抽出するソーベル処理と、ソーベル処理された 物品映像のエッジを複数の直線サーチで検出するエッジ検出処理と、エッジ検出処理で得られた同一直線状のエッジ2点間の中点をそれぞれ算出する処理と、これら中点を通る直線を算出して、この直線と物品映像の外形との交点から物品の長軸寸法を演算する処理と、この長軸中心線上を等分に分割した座標を算出する処理と、物品映像の短軸寸法と同じ直径の円でその中心を前記分割座標に合わせ、物品映像の長軸端部から対向する端部までサーチして、物品の外観検査を行うことを特徴としている。
【0008】
【発明の実施の形態】
以下、図面を参照して、本発明の実施形態について説明する。なお、以下に示す実施形態は、長円形状をしたカプセル剤の検査に適用した場合の例である。
【0009】
図1は、本発明の実施形態をフローチャートで示したものである。
一般に、錠剤やカプセル剤の外観検査は、コンベア上に被検査物を整列させて搬送し、それを上方からカメラで撮像し、画像処理装置により画像処理して外観の良否の判別を行っている。PTP包装薬剤の場合は、透明プラスチック板に形成された凹部に錠剤やカプセル剤等の薬剤を入れてその上からアルミニウム箔を貼り付けて薬剤の封入を行うものである。そこで、未だアルミニウム箔を貼っていない状態のときに、凹部に入っている薬剤の外観を検査を行うと、位置が揃っているので都合が良い。
【0010】
本実施形態においても、従来と同様に画像処理装置を用いて行うが、検査処理の方法に特徴を有するものである。その方法は、図1に示すように、先ず、S21で透明プラスチック板の凹部に入れられているカプセル剤を裏側から照明して、カメラで撮像することにより映像取込処理を行う。
【0011】
続いて、取り込まれた映像の照度が適正か否かが判断される(S22)。照度が適正でない場合は、以後の処理における判定が不正確になるので、検査工程の進行は停止(NG4)する。この場合、照明装置の調整を必要とする。
【0012】
照度が適正の場合は、カプセル剤の有無の確認が行われる(S23)。錠剤が入っていない場合は、欠陥品であるので、検査工程の進行は停止する(NG3)。カプセル剤が入っている場合は、その映像がソーベル処理される(S24)。ソーベル処理されると、カプセル剤の外形Bが抽出されて、図2(a)に示すようなものとなる。
【0013】
次に、カプセル剤の傾きと長さを計測する(S25)。そのためには、図2(a)に示すように、ソーベル処理されたカプセル剤映像のエッジを2本(この例では2本だが2本以上あればよい)の平行直線Nでサーチして検出する。
【0014】
次に、図2(b)に示すように、エッジ検出処理で得られた同一直線状のエッジK1,K2、K3,K4の2点間の中点O1,O2をそれぞれ算出する。
【0015】
続いて、図2(c)に示すように、これら中点を通る直線Jを算出して、この直線とカプセル剤映像の外縁との交点からカプセル剤の長軸寸法(J1−J2)を演算する(図2(d)参照)。
【0016】
ここで、カプセル剤の長さが、適正なものか否かが判断され(S26)、不良品の場合は排除される(NG2)。カプセル剤の長さが適正の場合、S27で長軸中心線上を等分に分割した座標J3を算出する(図2(e)参照)。
【0017】
続いて、図3に示すように、カプセル剤の短軸寸法と同じ直径の円でその中心を前記分割座標J3に合わせ、カプセル剤の長軸端部から対向する端部までサーチして、カプセル剤の外観(この場合は外形)検査を行う(S27)。外形に凹み等の異常があれば(S28)、不良品と判定される(NG1)。具体的な判定手法としては、例えば、サーチした円上の各画素について、予め設定したしきい値と比較していき、1つの円形サーチのうち、予め設定されたしきい値から外れた画素がある円形を“画素不良あり”として記憶する。これらの結果から、予め定めていた範囲、例えば連続して10個続けば不良品とか、あるいは不良画素ありが何個あれば不良品であるとかから最終的な良否の判定を行う。
【0018】
このように、この検査方法では、先ずカプセル剤の長さを検査して良否を判定し、続いて円の位置を一定間隔でずらしながらカプセル剤の端から端までサーチして外形の不良を検査していく。このため、高精度の検査を行った場合も安定した検査が行える。
【0019】
なお、上記の実施形態では、薬剤の外観検査方法について示したが、これに限らず、長円形(楕円形も含む)の物品の外観検査であれば適応することができる。
【0020】
【発明の効果】
以上説明したように、本発明によると、個々の円形サーチ上での検出数及び長さ、サーチ判定結果の連続性等の多くの良否判定基準を設定し、最終的な不良判定が行えるので、高精度の検査を行った場合も安定した検査が可能である。また、面積計測等を行わないため、全て多値化画像処理を行えるため、より一層の検出精度向上を得ることができる。
【0021】
また、対象が長円形や楕円形の物品の場合でも回転角度に合わせて円形サーチを連続的に行うことができるので、擬似的回転パターンマッチングを高速で実現することができる。
【図面の簡単な説明】
【図1】 本発明の実施形態のフローチャートである。
【図2】 カプセル剤の傾き、長さを計測し、その長さを均等分割することを説明するための図である。
【図3】 カプセル剤の検査サーチ方法を示す図である。
【符号の説明】
B カプセル剤のソーベル処理後の映像[0001]
BACKGROUND OF THE INVENTION
The present invention, the appearance of the long circle (ellipse) shape of the article, to a method for inspecting the example of contour and surface abnormality.
[0002]
[Prior art]
Conventionally, an appearance inspection of an article has been performed by visual inspection. However, recently, an inspection apparatus using image processing has been used due to problems such as inspection cost and accuracy. In general, an appearance inspection method using image processing is a method in which the surface of an article is first imaged with a camera, and the contrast of each pixel of the image is set to a preset threshold value (generally one value classified into 256 gradations). ) And binarized, and for example, the number of pixels determined to be dark is calculated from the result, thereby inspecting defective products.
[0003]
By the way, in the case of a tablet, for example, the surface may be printed with characters or the like having a contrast different from that of other surfaces. There is a problem that a defect having a lower contrast (high brightness) cannot be detected.
[0004]
Japanese Patent Laid-Open No. 4-36643 proposes the following apparatus. That is, the imaged area is divided into a plurality of areas in accordance with the contrast, and each divided area is binarized by a predetermined threshold value set in advance, and comprehensively determined from the result. .
[0005]
[Problems to be solved by the invention]
However, in the case of this apparatus, it is difficult to divide the imaged area into a plurality of areas according to the contrast, and it is complicated. If a threshold value is determined in order to perform a high-precision inspection, an error will occur. This may cause detection and cause a failure in use on the actual line. In addition, when the object to be inspected is an oval or elliptical article, since it is usually directed in various directions by rotating, the process of rotating pattern matching is almost impossible in terms of time.
[0006]
An object of the present invention is to provide an appearance inspection method for an article that can perform a stable inspection even when a high-precision inspection is performed.
[0007]
[Means for Solving the Problems]
In order to solve the above problems, the present invention employs the following means.
That is, the present invention is an appearance inspection method for an ellipse-shaped article, in which an image capturing process for inputting an image of the article, a Sobel process for extracting the outer shape of the article, and a sobel-processed article image are performed. Edge detection processing that detects multiple edges by multiple line searches, processing to calculate the midpoint between two points of the same straight edge obtained by edge detection processing, and calculating a straight line that passes through these midpoints , A process for calculating the major axis dimension of the article from the intersection of the straight line and the outer shape of the article image, a process for calculating coordinates obtained by equally dividing the major axis center line, and the same diameter as the minor axis dimension of the article image This is characterized in that the center of the article is aligned with the division coordinates and the appearance of the article is inspected by searching from the long axis end of the article image to the opposite end.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. In addition, embodiment shown below is an example at the time of applying to the test | inspection of an oval-shaped capsule.
[0009]
FIG. 1 is a flowchart showing an embodiment of the present invention.
In general, the appearance inspection of tablets and capsules is performed by aligning and inspecting an object to be inspected on a conveyor, picking it up with a camera, and performing image processing with an image processing apparatus to determine whether the appearance is good or bad. . In the case of a PTP-packed drug, a drug such as a tablet or a capsule is put into a recess formed on a transparent plastic plate, and an aluminum foil is attached thereon to enclose the drug. Therefore, when the appearance of the medicine in the recess is inspected when the aluminum foil is not yet applied, it is convenient because the positions are aligned.
[0010]
In this embodiment, the image processing apparatus is used as in the prior art, but has a feature in the inspection processing method. As shown in FIG. 1 , first, in step S <b> 21, an image capturing process is performed by illuminating the capsule placed in the concave portion of the transparent plastic plate from the back side and imaging with a camera.
[0011]
Subsequently, it is determined whether or not the illuminance of the captured image is appropriate (S22). If the illuminance is not appropriate, the determination in the subsequent processing becomes inaccurate, so the progress of the inspection process is stopped (NG4). In this case, adjustment of the lighting device is required.
[0012]
If the illuminance is appropriate, the presence or absence of the capsule is confirmed (S23). When there is no tablet, it is a defective product, so the progress of the inspection process is stopped (NG3). If a capsule is contained, the image is subjected to Sobel processing (S24). When the Sobel process is performed, the outer shape B of the capsule is extracted and becomes as shown in FIG .
[0013]
Next, the inclination and length of the capsule are measured (S25). For this purpose, as shown in FIG. 2A, the edges of the Sobel-processed capsule image are searched and detected by two parallel straight lines N (two in this example, but two or more). .
[0014]
Next, as shown in FIG. 2B, midpoints O1 and O2 between two points of the same straight edges K1, K2, K3, and K4 obtained by the edge detection process are respectively calculated.
[0015]
Subsequently, as shown in FIG. 2 (c), a straight line J passing through these midpoints is calculated, and the major axis dimension (J1-J2) of the capsule is calculated from the intersection of this straight line and the outer edge of the capsule image. (See FIG. 2 (d)).
[0016]
Here, it is determined whether or not the length of the capsule is appropriate (S26), and if it is a defective product, it is excluded (NG2). If the length of the capsule is appropriate, a coordinate J3 obtained by equally dividing the long axis center line in S27 is calculated (see FIG. 2 (e)).
[0017]
Subsequently, as shown in FIG. 3 , a circle having the same diameter as the minor axis dimension of the capsule is centered on the division coordinate J3 and searched from the major axis end to the opposite end of the capsule. The appearance (in this case, the outer shape) of the agent is inspected (S27). If there is an abnormality such as a dent in the outer shape (S28), it is determined as a defective product (NG1). As a specific determination method, for example, each pixel on the searched circle is compared with a preset threshold value, and pixels out of the preset threshold value in one circular search are detected. A certain circle is stored as “pixel defective”. From these results, a final pass / fail judgment is made based on a predetermined range, for example, a defective product if 10 are continued or a defective product if there are many defective pixels.
[0018]
In this way, in this inspection method, first, the length of the capsule is inspected to determine whether it is good or bad, and then the capsule is searched from end to end while shifting the position of the circle at regular intervals to inspect the outer shape. I will do it. For this reason, stable inspection can be performed even when high-precision inspection is performed.
[0019]
In the above embodiment showed the appearance inspection method for drugs, not limited to this and can be adapted if visual inspection of the articles of the oval (including elliptical).
[0020]
【The invention's effect】
As described above, according to the present invention, it is possible to set many pass / fail judgment criteria such as the number and length of detections on individual circular searches, continuity of search judgment results, etc., so that final defect judgment can be performed. Stable inspection is possible even when high-precision inspection is performed. In addition, since no area measurement or the like is performed, all multi-value image processing can be performed, so that further improvement in detection accuracy can be obtained.
[0021]
In addition, even when the object is an oval or elliptical article, a circular search can be continuously performed in accordance with the rotation angle, so that pseudo rotation pattern matching can be realized at high speed.
[Brief description of the drawings]
FIG. 1 is a flowchart of an embodiment of the present invention.
FIG. 2 is a diagram for explaining the measurement of the inclination and length of a capsule and equally dividing the length.
FIG. 3 is a diagram showing a capsule inspection search method.
[Explanation of symbols]
B Capsule after sobel processing
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP28301299A JP3976961B2 (en) | 1999-10-04 | 1999-10-04 | Appearance inspection method for goods |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP28301299A JP3976961B2 (en) | 1999-10-04 | 1999-10-04 | Appearance inspection method for goods |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2001108624A JP2001108624A (en) | 2001-04-20 |
JP3976961B2 true JP3976961B2 (en) | 2007-09-19 |
Family
ID=17660093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP28301299A Expired - Lifetime JP3976961B2 (en) | 1999-10-04 | 1999-10-04 | Appearance inspection method for goods |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3976961B2 (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3779790B2 (en) * | 1997-03-05 | 2006-05-31 | 株式会社常盤産業 | Inspection method for sealed package |
JP2003215047A (en) * | 2002-01-17 | 2003-07-30 | Ckd Corp | Visual inspection apparatus and ptp packaging machine equipped with the same |
JP2004077495A (en) * | 2003-10-21 | 2004-03-11 | Ckd Corp | Visual inspection device |
DE102005049958A1 (en) * | 2005-10-19 | 2007-04-26 | Boehringer Ingelheim Pharma Gmbh & Co. Kg | 100% optical semiquantitative filling control of pharmaceutical capsules on capsule filling machines |
JP5352444B2 (en) * | 2009-12-28 | 2013-11-27 | ライオンエンジニアリング株式会社 | Appearance inspection apparatus, surface inspection apparatus, and appearance inspection method |
CN102101111B (en) * | 2010-12-03 | 2012-11-21 | 哈尔滨工业大学 | Optical detection-based E type magnet sorting method |
KR101330567B1 (en) | 2012-02-08 | 2013-11-18 | (주)제이브이엠 | pill-detection method for pill box |
JP6002486B2 (en) * | 2012-07-18 | 2016-10-05 | 株式会社日立ハイテクノロジーズ | Pattern measuring method and pattern measuring apparatus |
JP6381948B2 (en) * | 2014-04-16 | 2018-08-29 | 株式会社松岡機械工作所 | Tablet front / back determination method, tablet front / back determination apparatus, tablet score detection apparatus, and tablet printing apparatus |
CN106247969B (en) * | 2016-09-21 | 2018-11-02 | 哈尔滨工业大学 | A kind of deformation detecting method of the industrial magnetic core element based on machine vision |
-
1999
- 1999-10-04 JP JP28301299A patent/JP3976961B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2001108624A (en) | 2001-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9329135B2 (en) | Means for inspecting glass containers for defects | |
US7414716B2 (en) | Machine for inspecting glass containers | |
US7329855B2 (en) | Optical inspection of glass bottles using multiple cameras | |
JP6370177B2 (en) | Inspection apparatus and inspection method | |
US7816639B2 (en) | Machine for inspecting glass containers at an inspection station using an addition of a plurality of illuminations of reflected light | |
US5926268A (en) | System and method for stress detection in a molded container | |
US7330251B2 (en) | Method and apparatus for producing reference image in glass bottle inspecting apparatus | |
KR20160090359A (en) | Surface defect detection method and surface defect detection device | |
EP3401672B1 (en) | Flaw detection device and flaw detection method | |
JP3976961B2 (en) | Appearance inspection method for goods | |
JP2006308437A (en) | Device and method for inspecting foreign matter | |
CN101566582A (en) | Medicine bottle label information online detection system in powder injection production based on mechanical vision | |
US20040247193A1 (en) | Method and apparatus for article inspection | |
US7541572B2 (en) | Machine for inspecting rotating glass containers with light source triggered multiple times during camera exposure time | |
EP3399302A1 (en) | Egg surface inspection apparatus | |
KR20140053019A (en) | Apparatus for inspecting bottle can thread | |
US7876951B2 (en) | Machine for inspecting glass containers | |
JP2017166957A (en) | Defect detection device, defect detection method and program | |
EP1916514B1 (en) | Machine for inspecting glass containers | |
JP2019215206A (en) | Surface inspection device and surface inspection method | |
EP1916515B1 (en) | Machine for inspecting glass containers | |
JP5974575B2 (en) | Mouth inspection device and mouth inspection method | |
JP2973663B2 (en) | Bottle mouth appearance inspection method | |
CN113533376A (en) | Glass bottle breakage defect detection system and detection method | |
JP2013134099A (en) | Foreign substance inspection device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060703 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20070115 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070227 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070425 |
|
TRDD | Decision of grant or rejection written | ||
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20070516 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070522 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070620 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100629 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3976961 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100629 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130629 Year of fee payment: 6 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160629 Year of fee payment: 9 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
EXPY | Cancellation because of completion of term |