JPH0587738A - Device for inspecting internal surface of circular container - Google Patents

Device for inspecting internal surface of circular container

Info

Publication number
JPH0587738A
JPH0587738A JP3249946A JP24994691A JPH0587738A JP H0587738 A JPH0587738 A JP H0587738A JP 3249946 A JP3249946 A JP 3249946A JP 24994691 A JP24994691 A JP 24994691A JP H0587738 A JPH0587738 A JP H0587738A
Authority
JP
Japan
Prior art keywords
circuit
container
point
image
projection
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
JP3249946A
Other languages
Japanese (ja)
Other versions
JP2874402B2 (en
Inventor
Koichi Toyama
公一 外山
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 JP3249946A priority Critical patent/JP2874402B2/en
Priority to EP97106885A priority patent/EP0791822A3/en
Priority to EP19920112088 priority patent/EP0523664A3/en
Priority to US07/914,332 priority patent/US5233199A/en
Publication of JPH0587738A publication Critical patent/JPH0587738A/en
Priority to US08/157,908 priority patent/US5412203A/en
Application granted granted Critical
Publication of JP2874402B2 publication Critical patent/JP2874402B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To eliminate such a trouble encountered in the course of the conventional internal surface inspection on beer tins that the inspection takes time, because the inspection only detects black and white contaminations by a differentiating method, etc., and respectively sets thresholds to numerous window areas into which an objective picture is divided. CONSTITUTION:Since, in order to inspect the depression, distortion, and contamination of the high luminance section of a beer tin, a picture edge detection circuit 6 and high luminance section discrimination circuit 11 which inspect the circularity of the outer and inner peripheries of a high luminance section on the internal surface of a beer tin are provided in addition to a defect detection circuit 7 and defect detection discriminating circuit 12 which inspect white contamination, the number of window areas is reduced. Prior to the circularity inspection, the position of the tin is specified by finding the mean value of mid-point coordinates between the fist rising point and last falling point on the binarized picture scanning line of the high luminance section at the mouth of the tin through the circuit 6 and connecting points are found by finding the vertical projection of the binarized picture of the high luminance section in the container connecting direction through a projection circuit 9 or 10 and searching the differential value of projection from the inside to the outside of the container through a processing area decision circuit 14.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は例えばコンベアなどで搬
送されるビール缶などの円形容器内面を検査し、異物・
ゴミ・傷などを検出する画像処理装置としての円形容器
内面検査装置に関する。なお以下各図において同一の符
号は同一もしくは相当部分を示す。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention inspects the inner surface of a circular container such as a beer can conveyed on a conveyor or the like, and
The present invention relates to a circular container inner surface inspection device as an image processing device for detecting dust, scratches, and the like. In the following figures, the same reference numerals indicate the same or corresponding parts.

【0002】[0002]

【従来の技術】図12は一例としてビール用アルミ缶の
容器を上面より観測した場合の高輝度部の説明図で、同
図(A)は缶容器の上面(画像)図、同図(B)は側断
面図である。そして102は容器、101はこの容器1
02を上方から照らすリング状の照明器、103は口部
の高輝度部、104は底部の高輝度部である。このよう
にリング照明器101を用いて容器102の内面に光線
を照射することにより、容器内部の口部と底部に夫々1
03,104のような高輝度部が発生する。特に缶など
のように容器内部に金属光沢のある場合は顕著である。
2. Description of the Related Art FIG. 12 is an explanatory view of a high-intensity part when an aluminum can container for beer is observed from above, as an example. FIG. 12A is a top view (image) of the can container and FIG. ) Is a side sectional view. 102 is a container, 101 is this container 1
A ring-shaped illuminator that illuminates 02 from above, 103 is a high-intensity part at the mouth, and 104 is a high-intensity part at the bottom. By thus irradiating the inner surface of the container 102 with light rays by using the ring illuminator 101, the mouth and the bottom of the container are respectively separated by one.
High brightness areas such as 03 and 104 occur. This is particularly noticeable when the inside of the container has a metallic luster such as a can.

【0003】図13(B)は容器102の上面画像(図
13(A))に対する走査線Q−Q1上の濃度変化を示
したものであるが、濃度変化の特徴よりW1〜W5の5
つの領域に分類される。第1の領域W1は口部高輝度部
103であり、第2の領域W2は濃度変化が比較的小さ
い容器側面上中部であり、第3の領域W3は図12で述
べた照明101による光線があまり届かないため、他の
領域より暗い容器側面下部であり、第4の領域W4は底
部高輝度部104であり、第5の領域W5は底部であ
る。
FIG. 13B shows changes in density on the scanning line Q-Q1 with respect to the top image of the container 102 (FIG. 13A).
It is divided into two areas. The first region W1 is the mouth high-intensity part 103, the second region W2 is the middle part on the side surface of the container where the concentration change is relatively small, and the third region W3 is the light beam from the illumination 101 described in FIG. Since it does not reach so much, it is a lower part of the side surface of the container that is darker than other areas, the fourth area W4 is the bottom high-intensity part 104, and the fifth area W5 is the bottom.

【0004】従来はこれらの領域W1〜W5にそれぞれ
ウィンドウを設け、領域の光学的な特性に応じて黒汚れ
(黒点)や白汚れ(白点)の不良を検出するためのしき
い値を設定していた。不良検出の方法としては例えば対
象画像の走査によって得られたアナログのビデオ信号
(アナログ濃淡画像信号)をA/D変換してなる8ビッ
トなどの多値の濃淡画像信号を所定のしきい値で2値化
する方法や、前記のビデオ信号を微分して欠陥信号を抽
出する微分法などが知られている。この微分法の場合、
対象物の外形の輪郭部でも微分信号が出るが輪郭部では
微分によって正方向パルス,負方向パルスのいずれか一
方が発生するのに対し、微小欠陥部では正方向パルスと
負方向パルスが同時に発生することを利用して欠陥部を
抽出することができる。
Conventionally, a window is provided in each of these areas W1 to W5, and a threshold value for detecting a defect of black stain (black spot) or white stain (white spot) is set according to the optical characteristics of the area. Was. As a method of detecting a defect, for example, an 8-bit multi-value grayscale image signal obtained by A / D conversion of an analog video signal (analog grayscale image signal) obtained by scanning a target image is set at a predetermined threshold value. A binarization method and a differentiation method of differentiating the video signal to extract a defect signal are known. For this differentiation method,
A differential signal is also generated in the contour portion of the outer shape of the object, but in the contour portion, either a positive direction pulse or a negative direction pulse is generated by differentiation, whereas a minute defect portion simultaneously generates a positive direction pulse and a negative direction pulse. It is possible to extract the defective portion by utilizing this.

【0005】即ちラスタ走査に基づくアナログ濃淡画像
信号を微分してなる信号P(x,y)についての着目点
(座標値x=i,y=j)における値P(i,j)と、
この着目点よりx方向走査線上の前,後に夫々所定の微
小のα画素,β画素だけ離れた点における値P(i−
α,j)、P(i+β,j)との間に、P(i,j)−
P(i−α,j)>TH1 であって且つ、P(i+
β,j)−P(i,j)>TH1 の関係があれば、
(但しTH1は所定のしきい値(正値)とする)着目点
における不良検出のための二値化関数値PD(i,j)
=1としてこの着目点を黒レベル不良の点とし、それ以
外の場合はPD(i,j)=0としてこの着目点を正常
の点とするものである。
That is, a value P (i, j) at a target point (coordinate value x = i, y = j) of a signal P (x, y) obtained by differentiating an analog grayscale image signal based on raster scanning,
The value P (i- at a point separated by a predetermined minute α pixel and β pixel from the point of interest on the x-direction scanning line, respectively.
between α, j) and P (i + β, j), P (i, j) −
P (i-α, j)> TH1 and P (i +
If there is a relation of β, j) -P (i, j)> TH1,
(However, TH1 is a predetermined threshold value (positive value)) Binarization function value PD (i, j) for defect detection at the point of interest
= 1, this point of interest is a black level defect point, and in other cases, PD (i, j) = 0 is set and this point of interest is a normal point.

【0006】[0006]

【発明が解決しようとする課題】しかしながら前述した
欠陥判別方法では容器内面の光学的特性により与えるべ
きしきい値TH1の最適値は変化する。従って従来手法
においては図13のウィンドウW1〜W5のように多く
の(この場合5つの)同心円状ウィンドウが必要である
と同時に、このウィンドウ別に異なるしきい値TH1
(さらには座標値α,β)を与える必要があり、ラスタ
走査を用いた場合、無駄走査時間が大きく、欠陥検査の
高速化のための支障となっていた。そこで本発明はこの
問題を解消できる円形容器内面検査装置を提供すること
を課題とする。
However, in the above-described defect discrimination method, the optimum value of the threshold value TH1 to be given changes depending on the optical characteristics of the inner surface of the container. Therefore, in the conventional method, many (five in this case) concentric windows like the windows W1 to W5 in FIG. 13 are required, and at the same time, a different threshold TH1 is set for each window.
(Furthermore, it is necessary to give the coordinate values α and β), and when raster scanning is used, a wasteful scanning time is long, which is an obstacle to speeding up defect inspection. Therefore, an object of the present invention is to provide a circular container inner surface inspection device that can solve this problem.

【0007】[0007]

【課題を解決するための手段】前記の課題を解決するた
めに、請求項1の円形容器内面検査装置は、所定の方向
(水平方向など)に相互に連接し得る軸対称の円形容器
(102など)の前記軸方向から(リング照明器101
などを介し)この円形容器の内面側を照明したうえ、T
Vカメラを介しこの軸方向からこの円形容器の照明面を
撮像し、不良検査手段(不良検出回路7、不良検出判定
回路12など)を介しこの撮像された画像を解析して前
記円形容器の内面の黒汚れおよび白汚れを検査する円形
容器内面検査装置において、前記撮像の画面走査によっ
て得られる画像信号(多値濃淡画像信号POなど)を前
記円形容器の口部高輝度部(103など)の2値画像を
得るように2値化し、この2値化画像信号を前記連接方
向に垂直な方向(Y方向など)に投影する手段(Y投影
回路10など)と、この投影に基づく投影画素量を差分
して差分投影画素量を求め、前記円形容器の内側から外
側(口部側)に向けて前記差分投影画素量を調べ、該画
素量が最初に負になる点(減少開始点PDなど)までの
区間内でこの差分投影画素量が所定のしきい値を越える
点(最大差分投影点ΔPMなど)を検出し、この検出点
の座標値に所定の補正値(βなど)を加算した座標値を
用いて前記連接の領域を分離する手段(処理領域決定回
路14など)を備えたものとする。
In order to solve the above-mentioned problems, the circular container inner surface inspection apparatus according to claim 1 has an axisymmetric circular container (102) which can be connected to each other in a predetermined direction (horizontal direction or the like). Etc.) from the axial direction (ring illuminator 101
After illuminating the inner surface of this circular container,
The illumination surface of the circular container is imaged from this axial direction via a V camera, and the imaged image is analyzed through defect inspection means (defect detection circuit 7, defect detection determination circuit 12, etc.) to analyze the inner surface of the circular container. In a circular container inner surface inspection device for inspecting black stains and white stains, an image signal (multi-value grayscale image signal PO or the like) obtained by the screen scanning of the imaging is stored in the mouth high brightness portion (103 or the like) of the circular container. A unit (Y projection circuit 10 or the like) for binarizing so as to obtain a binary image and projecting the binarized image signal in a direction (Y direction or the like) perpendicular to the connecting direction, and a projection pixel amount based on this projection. To obtain a difference projection pixel amount, check the difference projection pixel amount from the inner side of the circular container toward the outer side (mouth side), and check that the pixel amount becomes negative first (decrease start point PD, etc.). ) This difference within the interval up to A point where the amount of shadow pixels exceeds a predetermined threshold value (maximum difference projection point ΔPM, etc.) is detected, and a coordinate value obtained by adding a predetermined correction value (β, etc.) to the coordinate value of this detection point is used for the connection. It is assumed that a means for separating the areas (processing area determining circuit 14 etc.) is provided.

【0008】[0008]

【作用】高輝度部を2値化により切り出し、この切り出
しパターンの円形性を検査することにより、容器の変
形、へこみ等のほか、付着したゴミ等の高輝度部の黒点
も併せ検出し得るようにして不良検出の高精度化を行
う。そして同一のウィンドウ領域でこの円形性検査と従
来の不良検査手段による黒点,白点の検査とを並行して
実行する。これによりウィンドウ領域数を減じ処理を高
速化する。なおこの円形性検査に先立ち円形容器の位置
を特定するこめに、容器の口部高輝度部の容器連接の影
響のない領域の2値化画像信号の同一走査ライン上での
最初の立上り点と最後の立下り点との中点座標の平均値
を用いる。また検査領域を連接容器の領域から分離する
ために、容器の連接方向と垂直な方向への前記口部高輝
度部の2値画像の投影量を求め、さらに投影量の差分値
を容器の内部から外部へ向けて探索し、連接点を検出す
る。
[Function] By cutting out the high-intensity part by binarization and inspecting the circularity of this cut-out pattern, it is possible to detect not only deformation of the container, dents, etc., but also black spots in the high-intensity part such as dust adhering to the container. To improve the accuracy of defect detection. Then, in the same window area, this circularity inspection and the inspection of black dots and white dots by the conventional defect inspection means are executed in parallel. This reduces the number of window areas and speeds up the processing. In addition, prior to this circularity inspection, the position of the circular container should be specified so that the first rising point on the same scanning line of the binarized image signal in the region of the high brightness portion of the mouth of the container which is not affected by the container connection. The average value of the midpoint coordinates of the last falling point is used. Further, in order to separate the inspection area from the area of the connected container, the projection amount of the binary image of the mouth high-intensity part in the direction perpendicular to the connecting direction of the container is obtained, and the difference value of the projection amount is calculated as the inside of the container. From outside to the outside to detect contact points.

【0009】[0009]

【実施例】以下図1ないし図21に基づいて本発明の実
施例を説明する。図1は本発明の一実施例としてのハー
ドウェアのブロック図である。同図においてPOは図外
のTVカメラの画面をラスタ走査して得られるビデオ信
号をAD変換してなる多値(例えば8ビット)の濃淡画
像信号、1はこの多値濃淡画像信号POを入力し、多値
画面データとして記憶するフレームメモリ、3はこのフ
レームメモリに対するアドレス発生回路である。2はウ
ィンドウ別のマスクパターンが格納されているウィンド
ウメモリ、4はこのウィンドウメモリに対するアドレス
発生回路である。5はウィンドウゲート回路で、多値濃
淡画像信号POまたはフレームメモリ1から読出された
画像信号1aをウィンドウメモリ2からのマスクパター
ンデータ2aでマスクし、指定されたウィンドウ領域の
みの画像信号POまたは1aを通過させる回路である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of the present invention will be described below with reference to FIGS. FIG. 1 is a block diagram of hardware as an embodiment of the present invention. In the figure, PO is a multi-valued (e.g., 8-bit) grayscale image signal obtained by AD-converting a video signal obtained by raster-scanning the screen of a TV camera (not shown), and 1 is the multivalued grayscale image signal PO. The frame memory 3 for storing multi-valued screen data is an address generation circuit for this frame memory. Reference numeral 2 is a window memory in which a mask pattern for each window is stored, and 4 is an address generation circuit for this window memory. A window gate circuit 5 masks the multi-value grayscale image signal PO or the image signal 1a read from the frame memory 1 with the mask pattern data 2a from the window memory 2 to obtain the image signal PO or 1a only in the designated window region. It is a circuit that passes.

【0010】18は多値濃淡画像信号POまたはフレー
ムメモリ画像信号1aを切替え選択する画像入力切替ス
イッチであり、このスイッチ18は後述の位置ズレ量決
定回路13を動作させるために、最新の多値濃淡画像信
号POを該信号POのフレームメモリ1への入力と並行
して画像エッジ検出回路6へ与える役割を持つ。17は
画像出力切替スイッチで、ウィンドウゲート回路5を通
過した画像入力切替スイッチ18の出力画像信号を画像
エッジ検出回路6または不良検出回路7へ切替えて与え
るスイッチである。画像エッジ検出回路6は画像のエッ
ジ、具体的にはリング状の高輝度部の外端(外周点)と
内端(内周点)を検出する機能を持ち、この場合、後述
のように入力した画像信号を対象画像の位置検出や円形
性検査等のための所定のしきい値で2値化したうえ、画
像エッジとしてのこの2値化信号の立上り点の座標と立
下り点の座標とを自身内のメモリ(図8で後述する6A
〜6D)に格納する。11はこの画像エッジ検出回路6
によって検出された外周点または内周点の座標値に対し
後述のように円形性検査を行う回路である。
Reference numeral 18 denotes an image input changeover switch for switching and selecting the multivalued grayscale image signal PO or the frame memory image signal 1a. This switch 18 operates the latest multivalued value in order to operate a position shift amount determination circuit 13 described later. It has a role of supplying the grayscale image signal PO to the image edge detection circuit 6 in parallel with the input of the signal PO to the frame memory 1. Reference numeral 17 denotes an image output changeover switch, which is a switch for giving the output image signal of the image input changeover switch 18 that has passed through the window gate circuit 5 to the image edge detection circuit 6 or the defect detection circuit 7. The image edge detection circuit 6 has a function of detecting an edge of an image, specifically, an outer end (outer peripheral point) and an inner end (inner peripheral point) of a ring-shaped high brightness portion. The binarized image signal is binarized with a predetermined threshold value for position detection and circularity inspection of the target image, and the coordinates of the rising and falling points of this binarized signal as image edges are calculated. Internal memory (6A described later in FIG. 8)
~ 6D). Reference numeral 11 denotes the image edge detection circuit 6
This is a circuit for inspecting the circularity of the coordinate value of the outer peripheral point or the inner peripheral point detected by the method as described later.

【0011】13は対象画像に対して正しい位置にウィ
ンドウが発生するように、画像エッジ検出回路6が最新
の多値画像信号POを入力して検出した現実の対象画像
の中心の位置と予め設定されているウィンドウの中心の
位置とのズレを検出する回路である。7は従来の技術で
述べた微分法などで不良個所(黒点,白点など)を検出
し面積などを計数する不良検出回路、12はこの回路7
の検出結果を設定値と比較して良否を判定する不良検出
判定回路である。9はウィンドウゲート回路5を通過し
た多値画像信号POを用いて対象画像のX方向投影パタ
ーンを求めるX投影回路、10は同じく対象画像のY方
向投影パターンを求めるY投影回路、14はこの2つの
投影回路9,10の出力データを用いて他の容器画像と
連接していない対象容器画像の領域のみを求める回路で
ある。また15は高輝度部判定回路11および不良検出
判定回路12の判定結果を入力し総合的な判定を行う回
路、16はこの総合判定回路15の出力判定信号によっ
て良否の出力を行う出力回路である。
Numeral 13 is preset with the position of the center of the actual target image detected by the image edge detection circuit 6 by inputting the latest multi-valued image signal PO so that a window is generated at the correct position with respect to the target image. This is a circuit for detecting a deviation from the center position of the window being displayed. Reference numeral 7 is a defect detection circuit that detects defective points (black spots, white spots, etc.) by the differentiation method described in the prior art and counts the area, and 12 is this circuit 7.
Is a defect detection determination circuit that compares the detection result of 1 with the set value to determine acceptability. Reference numeral 9 is an X projection circuit that obtains the X-direction projection pattern of the target image using the multi-valued image signal PO that has passed through the window gate circuit 5. Reference numeral 10 is a Y projection circuit that similarly obtains the Y-direction projection pattern of the target image. This is a circuit that uses the output data of one projection circuit 9 and 10 to obtain only the region of the target container image that is not connected to another container image. Further, 15 is a circuit for inputting the judgment results of the high-luminance part judgment circuit 11 and the defect detection judgment circuit 12 to make a comprehensive judgment, and 16 is an output circuit for outputting a pass / fail according to the output judgment signal of the comprehensive judgment circuit 15. ..

【0012】最初に画像エッジ検出回路6による対象画
像の位置検出動作について説明する。図14は画像エッ
ジ検出回路6にて高輝度部を2値化した画像である。な
お同図において201はマスクパターン、102−2は
対象の容器102(102−1)に連接している容器で
ある。即ちこの場合、底部高輝度部104は図1のウィ
ンドウゲート回路5を介しマスクパターン201により
マスクされているものとする。このような2値画像にお
いて走査方向にA0,B0のような最初の立上がり点と
A1,B1のような最後の立下がり点を検出すると図1
4の太線部の座標点が得られる。しかし容器の連接があ
る場合はEの領域で座標点が不正確となってしまう。従
ってこの領域Eに含まれない前記太線部の座標点を水平
走査線で結ぶ線分のうち、なるべく長い線分A0−A
1,B0−B1附近の線分に着目して容器の位置検出を
行う必要がある。
First, the position detecting operation of the target image by the image edge detecting circuit 6 will be described. FIG. 14 is an image in which the high-luminance portion is binarized by the image edge detection circuit 6. In the figure, 201 is a mask pattern, and 102-2 is a container connected to the target container 102 (102-1). That is, in this case, it is assumed that the bottom high-intensity portion 104 is masked by the mask pattern 201 via the window gate circuit 5 in FIG. In such a binary image, if the first rising point such as A0 and B0 and the last falling point such as A1 and B1 are detected in the scanning direction, the result shown in FIG.
The coordinate points of the thick line portion 4 are obtained. However, when there are containers connected, the coordinate points in the area E become inaccurate. Therefore, of the line segments that connect the coordinate points of the thick line portion that are not included in this area E with the horizontal scanning line, the longest possible line segment A0-A
It is necessary to detect the position of the container by paying attention to the line segment near 1, B0-B1.

【0013】図15は図14で述べた線分A0−A1,
B0−B1附近の領域Eに含まれない同様な線分A01
−A11,…,A04−A14よりそれぞれの中点MA
(MA1…MA4)を求め、同様に線分B01−B1
1,…,B04−B14よりそれぞれの中点MB(MB
1…MB4)を求め、この中点MA1…MA4,MB1
…MB4の平均値を算出して容器中心の水平走査方向に
対する位置(X座標)を求めることを示したものであ
る。なおこの場合、容器中心のY座標は例えば図1のX
投影回路9によって求められたX方向投影パターンの
(上下の)両端の座標の平均値を求めることによって得
られる。
FIG. 15 shows the line segment A0-A1, described in FIG.
A similar line segment A01 not included in the area E near B0-B1
-A11, ..., A04-A14 from each midpoint MA
(MA1 ... MA4) is obtained, and the line segment B01-B1 is similarly obtained.
1, ..., B04-B14 from each midpoint MB (MB
1 ... MB4), and the midpoints MA1 ... MA4, MB1
... shows that the position (X coordinate) of the container center in the horizontal scanning direction is calculated by calculating the average value of MB4. In this case, the Y coordinate of the container center is, for example, the X coordinate of FIG.
It is obtained by calculating the average value of the coordinates of both ends (upper and lower) of the X-direction projection pattern obtained by the projection circuit 9.

【0014】図16は画像をフレームメモリ1aに入力
した後の処理として、走査方向を垂直(Y)方向に変え
前記と同様の方法にて位置検出を行った例である。即ち
容器の搬送方向が左右(X)方向であれば、上下(Y)
方向の走査に対しては容器が連接することがなく、図1
4のEに相当する領域を配慮する必要がなくなる。な
お、図15では直接、多値濃淡画像信号POを利用し得
るのに対して、図16の場合にはフレームメモリ1から
の画像信号1aを使用する必要があるため処理時間が遅
れ、対象画像の位置検出が不正確となる惧れがあるが、
図16の走査領域を局部に限定すれば、この遅れ時間を
最小限度に留めることができる。
FIG. 16 shows an example in which, as a process after the image is input to the frame memory 1a, the scanning direction is changed to the vertical (Y) direction and the position is detected by the same method as described above. That is, if the transport direction of the container is the left-right (X) direction, the vertical direction (Y)
The containers do not connect to each other in the direction scanning, and
It is not necessary to consider the area corresponding to E of 4. Note that in FIG. 15, the multi-value grayscale image signal PO can be directly used, whereas in the case of FIG. 16, the processing time is delayed because the image signal 1a from the frame memory 1 needs to be used, and the target image There is a possibility that the position detection of
If the scanning area in FIG. 16 is limited to a local area, this delay time can be minimized.

【0015】図17は高輝度部に着目した容器の位置検
出方法の他の例の説明図である。この例は同図(B)の
ようにカメラ203により斜め上部より容器102を撮
像したものであり、この場合、同図(A)のように口部
高輝度部103が2値画像として観測される。この検出
画像において同一水平走査ライン上での最初の立上がり
座標点A01…A04及び最後の立下がり点A11…A
14を求め、各線分A01−A11,…,A04−A1
4の中点の平均値MAを求めて水平方向の容器の位置を
特定し、さらにこの線分長がある設定値以下となる、限
界ラインLを求めて垂直方向の容器の位置(上端)20
4を特定するものである。このような位置検出方法は容
器の上端を予め位置決め用の点に選んだ場合に適用する
ことができる。
FIG. 17 is an explanatory view of another example of the container position detecting method focusing on the high brightness portion. In this example, as shown in FIG. 7B, the container 102 is imaged from the obliquely upper portion by the camera 203. In this case, the mouth high-intensity portion 103 is observed as a binary image as shown in FIG. It In this detected image, first rising coordinate points A01 ... A04 and last falling points A11 ... A on the same horizontal scanning line.
14 is obtained, and each line segment A01-A11, ..., A04-A1
The position of the container in the horizontal direction is determined by obtaining the average value MA of the midpoints of the four points, and further, the limit line L at which this line segment length is less than or equal to a set value is determined to determine the position (upper end) 20 of the container in the vertical direction.
4 is specified. Such a position detecting method can be applied when the upper end of the container is previously selected as a positioning point.

【0016】次に容器が連接した際の処理領域の決定動
作について述べる。図1の処理領域決定回路14はX投
影回路9とY投影回路10の情報を基にこの処理領域決
定のための演算をおこてう。図18はこの処理領域決定
の従来の手法を示したもので、同図(A)は容器全体が
2値化されるようなしきい値による2値画像である。な
おここで102−1は検査対象の容器、102−2は該
容器102−1に連接した容器である。この場合、容器
は水平方向に連接している。
Next, the operation of determining the processing area when the containers are connected will be described. The processing area determination circuit 14 of FIG. 1 performs a calculation for determining the processing area based on the information of the X projection circuit 9 and the Y projection circuit 10. FIG. 18 shows a conventional method for determining the processing area. FIG. 18A shows a binary image with a threshold value such that the entire container is binarized. Here, 102-1 is a container to be inspected, and 102-2 is a container connected to the container 102-1. In this case, the containers are connected horizontally.

【0017】図18(B)は同図(A)の画像の垂直方
向の投影画素量を算出したものであり、同図(C)は、
さらにその投影量(投影画素量)を差分したものであ
る。図18のような比較的明瞭なパターンにおいては図
18(C)の変化点より右側連接点PAおよび左側連接
点PBが検出され、連接した容器の分離が行われる。
FIG. 18B shows the amount of pixels projected in the vertical direction of the image of FIG. 18A, and FIG.
Furthermore, the difference is the projection amount (projection pixel amount). In the relatively clear pattern as shown in FIG. 18, the right side contact PA and the left side contact PB are detected from the change point of FIG. 18C, and the connected containers are separated.

【0018】図19は図18と同様な従来手法の説明図
で、連接箇所の検出が困難となる場合を示している。即
ち実際の検査画像においては図19(A)のように連接
した容器の一部分だけが2値画像として検出される場合
があり、投影パターンが同図(B)のようになり、差分
投影パターンが同図(C)のようになって容器の分離が
困難となる。
FIG. 19 is an explanatory view of a conventional method similar to FIG. 18, and shows a case where it is difficult to detect a connecting point. That is, in the actual inspection image, only a part of the containers connected as shown in FIG. 19A may be detected as a binary image, the projection pattern becomes as shown in FIG. 19B, and the difference projection pattern becomes It becomes difficult to separate the containers as shown in FIG.

【0019】図20は容器連接時の本発明に基づく処理
領域決定手法の説明図である。即ちこの場合、Y投影回
路10により先ず口部高輝度部103をリング状の検査
画像として検出するためのしきい値を設定し、多値濃淡
画像信号POを2値化して図20(A)のような2値画
像を得たのち、ごき2値画像について、その連接方向
(水平,X方向)に垂直なY方向の投影を算出して同図
(B)のような投影パターンを得る。次に処理領域決定
回路14は、図20(C)の矢印301のように対象容
器102−1の中央部より口部の方向へ図20(B)の
投影量(投影画素量)についての差分を演算し、同図
(C)のような差分投影パターンを得る。そして以下の
ように連接点を求める。
FIG. 20 is an explanatory view of a processing area determining method based on the present invention when the containers are connected. That is, in this case, the Y projection circuit 10 first sets a threshold value for detecting the mouth high-intensity portion 103 as a ring-shaped inspection image, binarizes the multi-value grayscale image signal PO, and then, FIG. After obtaining the binary image as shown in FIG. 7, the projection in the Y direction perpendicular to the connecting direction (horizontal, X direction) of the dusty binary image is calculated to obtain the projection pattern as shown in FIG. .. Next, the processing area determination circuit 14 determines the difference between the projection amount (projection pixel amount) in FIG. 20B from the central portion of the target container 102-1 to the mouth portion as indicated by an arrow 301 in FIG. 20C. Is calculated to obtain a differential projection pattern as shown in FIG. Then, the contact points are obtained as follows.

【0020】即ち右側連接点PAを求めるには、図20
(C)において容器側面の或る点P1より口部方向へ探
索を行い、この図の差分投影パターンのグラフが最初に
減少に転じる点(差分減少開始点と呼ぶ)PDまでの区
間における差分投影量が最大値となる点(最大差分投影
点という)ΔPMを求める。
That is, in order to obtain the right-side contact point PA, FIG.
In (C), a search is performed from a certain point P1 on the side surface of the container toward the mouth portion, and the differential projection in a section up to a point (referred to as a differential decrease start point) PD at which the graph of the differential projection pattern in FIG. The point where the amount becomes the maximum value (called the maximum difference projection point) ΔPM is obtained.

【0021】図21は図20(C)の点ΔPMの附近の
拡大図である。図21においてPMは口部高輝度部10
3における最大の投影量となる点(便宜上最大投影点と
いう)であり、ΔPMはこのこの最大投影点PMに相関
して次のように求まるPMの極く近傍の点である。即ち
対象容器102−1の中心より右(X)方向に取った画
素番号をk、画素番号kの位置の投影画素量をTkと
し、このTK と画素番号値が4画素分右方向に離れた点
の投影画素量TK+4との差分 ΔTK =TK+4 −TK を求めて差分投影パターンを得るものとすれば、ΔTK
のピークとなる点ΔPMは最大投影点PMの4画素内側
の点として定まる。本発明ではこの最大差分投影点ΔP
Mに所定の補正量βを加えた点を右側連接点PAとしこ
れを容器の連接を分離し処理領域を決定する座標とす
る。このように予め最大差分投影点ΔPMを求める理由
は、容器に対する照明の明るさによって口部高輝度10
3のリング状の幅が変動し、最大投影点PMはこの変動
の影響を受け易いのに対し、最大差分投影点ΔPMは安
定した座標点として検出されるためである。本発明では
以上のように、口部高輝度部103を利用して容器の内
部より口部方向へ連接点の探索を行うため、容器の連接
による影響を小さくすることができる。
FIG. 21 is an enlarged view near the point ΔPM in FIG. 20 (C). In FIG. 21, PM is the high brightness portion 10 of the mouth.
3 is a point having the maximum projection amount in 3 (for convenience, it is referred to as a maximum projection point), and ΔPM is a point very close to PM obtained in the following manner in correlation with this maximum projection point PM. That is, the pixel number taken in the right (X) direction from the center of the target container 102-1 is k, and the projected pixel amount at the position of the pixel number k is Tk. This T K and the pixel number value are separated by 4 pixels to the right. If a difference projection pattern is obtained by obtaining the difference ΔT K = T K + 4 −T K from the projected pixel amount T K + 4 of the other point, ΔT K
The point ΔPM that is the peak of is determined as a point inside 4 pixels of the maximum projection point PM. In the present invention, this maximum difference projection point ΔP
A point obtained by adding a predetermined correction amount β to M is defined as a right side contact PA, which is a coordinate for separating the container connection and determining the processing area. The reason why the maximum difference projection point ΔPM is obtained in advance in this way is that the mouth high brightness is 10 depending on the brightness of the illumination on the container.
This is because the ring-shaped width of 3 fluctuates and the maximum projection point PM is easily affected by this fluctuation, whereas the maximum difference projection point ΔPM is detected as a stable coordinate point. As described above, according to the present invention, since the mouth high-intensity portion 103 is used to search for the connecting contact from the inside of the container toward the opening, the influence of the connecting of the container can be reduced.

【0022】図4は容器内面に欠陥を持つ缶容器を上面
から観測した場合に高輝度部に表れる欠陥の影響を示す
図で、同図(A)は上面図、同図(B)は側断面図であ
る。容器102の口部に111のようなゴミが付着した
場合は同図(A)のように口部高輝度部103において
も円周のカケとなって検出される。また側面部に大きな
ヘコミ112がある場合は底部高輝度部104のゆがみ
として検知できる場合があり、一般にヘコミの場合はゴ
ミ付着等と異なりコントラスト差が小さいため、底部高
輝度部104の円形性検査により、ヘコミ112を検出
する方法は非常に有効である。
FIG. 4 is a diagram showing the influence of defects appearing in the high-brightness part when a can container having a defect on the inner surface of the container is observed from the upper surface. FIG. 4A is a top view and FIG. FIG. When dust such as 111 adheres to the mouth of the container 102, the mouth high-luminance portion 103 is also detected as a circumferential chip as shown in FIG. Also, if there is a large dent 112 on the side surface, it may be detected as a distortion of the bottom high-intensity part 104. Generally, in the case of a dent, the contrast difference is small unlike dust adhesion etc. Therefore, the method for detecting the dent 112 is very effective.

【0023】図5は高輝度部判定回路11による具体的
な円形性検出方法の説明図である。この図は良品容器の
高輝度部の外周点の座標の立上り側をx0j,立下り側
をx1j(但しj=1,2,──、つまりjはこの各点
の属する水平走査ラインの相対的なy座標値に相当する
パラメータである。)として表現したものである。最初
に良品容器の座標変化量xk+1 −xk を各々算出し、こ
の許容範囲を与える最大値(後述のmax(a,b))
および最小値(後述のmin(a,b))を夫々許容値
テーブルTBとしての後述(図6)の最大値テーブルT
B1,最小値テーブルTB2に記憶しておく。但しここ
でkは0jまたは1jである。この際、上端及び下端の
数ラインは画像の安定度が低いので除外するか若しくは
非常に大きな許容値を与える必要があるが、良品の座標
変化量よりxk+1 −x k の許容範囲を次のように定め
る。 min(a,b)−α<xk+1 −xk <max(a,b)+α ここでmax(a,b)は次に示すa,bの値のうちの
何れか大きい方の値としての最大値を意味し、min
(a,b)は同じくa,bの値のうちの何れか小さい方
の値としての最小値を意味するものである。 a=xk −xk-1 b=xk+2 −xk+1 またαはデジタル画像に変換した際の量子化誤差等を考
慮した検出感度を緩和するための固定値である。なお
a,bの与え方として a=xk-1 −xk-2 b=xk+3 −xk+2 とし、2ライン分の許容幅を持たせることも可能であ
る。
FIG. 5 shows a concrete example of the high-luminance part judgment circuit 11.
It is an explanatory view of a roundness detection method. This figure shows a non-defective container
The rising side of the coordinates of the outer peripheral point of the high-intensity part is x0j, and the falling side
X1j (where j = 1, 2, ──, that is, j is each point
Corresponds to the relative y coordinate value of the horizontal scanning line to which
It is a parameter. ) Is expressed as. the first
Amount of coordinate change of non-defective container xk + 1-XkAnd calculate
Maximum value that gives the allowable range of (max (a, b) described later)
And the minimum value (min (a, b) described later) are allowable values, respectively.
Maximum value table T described later (FIG. 6) as table TB
B1 is stored in the minimum value table TB2. But here
Where k is 0j or 1j. At this time, the upper and lower ends
Exclude some lines because the image stability is low or
It is necessary to give a very large tolerance, but good product coordinates
X from the amount of changek + 1-X kThe allowable range of
It min (a, b) -α <xk + 1-Xk<Max (a, b) + α Here, max (a, b) is one of the values of a and b shown below.
Means the maximum value, whichever is larger, min
(A, b) is also the smaller of the values of a and b
It means the minimum value of. a = xk-Xk-1 b = xk + 2-Xk + 1 Also, consider the quantization error when converting to a digital image.
It is a fixed value to ease the detection sensitivity. Note that
As the method of giving a and b, a = xk-1-Xk-2 b = xk + 3-Xk + 2 It is also possible to have an allowable width of 2 lines.
It

【0024】以上により高輝度部判定回路11では良品
容器の各ラインにおける許容値を図6に示す最大値テー
ブルTB1および最小値テーブルTB2として記憶して
おき、検査画像の座標変化量とこのテーブルTB1,T
B2内の許容値とを遂一比較して円形性の検査を行う。
なお予め記憶した良品容器の走査ライン数と検査画像の
走査ライン数が不一致である対策として、容器上端及び
下端より容器中央まで順番に前記の比較を行い、ライン
数の過不足は変化量の小さい中央部附近にて行う。即ち
良品学習時の許容値テーブルのライン数が少ない場合は
そのまま中央ラインの許容値をひきつづき用いて比較を
行う(図6参照)。なお図6においては上円と下円につ
いては同一の処理を2回行うものとして許容値テーブル
は1/2円周分のみ記憶する方式としている。
As described above, the high-luminance portion determination circuit 11 stores the allowable values in each line of the non-defective container as the maximum value table TB1 and the minimum value table TB2 shown in FIG. 6, and the coordinate change amount of the inspection image and this table TB1. , T
The circularity is inspected by comparing with the allowable value in B2.
As a measure against the number of scan lines of the non-defective container stored in advance and the number of scan lines of the inspection image, the above comparison is performed in order from the upper end and the lower end of the container to the center of the container. Perform near the center. That is, when the number of lines in the allowable value table at the time of learning good products is small, the allowable value of the center line is continuously used as it is for comparison (see FIG. 6). Note that, in FIG. 6, the same process is performed twice for the upper circle and the lower circle, and the allowable value table has a method of storing only a half circle.

【0025】前記は外周点の検査方法であったが、次に
内周点の検査方法について説明する。図7は高輝度部内
周の座標点の検出方法の説明図で、同図(A)は缶容器
の上面画像、同図(B)は同図(A)の走査線Q−Q1
上の濃淡画像信号の高輝度部を2値化した信号の変化を
示す。同図(B)の二値化信号の最初の立下り点121
に着目すると同図(A)の太線部121aのような座標
が検出される。内周点の座標はD−D1の区間であるの
で座標の変化量が反転するラインとしてD,D1をそれ
ぞれ求め内周の左半円の座標が求まる。同様にして最後
の立上り点122を検出することにより内周の右半円を
求め、以下は外周点と同様の方法で円形性の検査を行
う。
The above is the method for inspecting the outer peripheral points, but next, the method for inspecting the inner peripheral points will be described. 7A and 7B are explanatory diagrams of a method of detecting coordinate points on the inner periphery of the high-intensity portion. FIG. 7A is a top view image of a can container, and FIG. 7B is a scanning line Q-Q1 in FIG.
The change of the signal which binarized the high brightness part of the above-mentioned grayscale image signal is shown. The first falling point 121 of the binarized signal in FIG.
Focusing on, the coordinates such as the thick line portion 121a in FIG. Since the coordinates of the inner circumference point are in the section D-D1, D and D1 are respectively obtained as lines in which the amount of change in the coordinates is inverted, and the coordinates of the left semicircle of the inner circumference are obtained. Similarly, the last rising point 122 is detected to obtain the right semicircle of the inner circumference, and the circularity is inspected in the same manner as for the outer circumference point.

【0026】図8は図1の画像エッジ検出回路6の構成
をさらに詳しく示したものである。図8において6Aは
最初の立上り点を記憶するメモリ、6Bは最初の立下り
点を記憶するメモリ、6Cは最後の立上り点を記憶する
メモリ、6Dは最後の立下り点を記憶するメモリであ
る。このメモリ6Aと6Dのデータから外周検出を行う
ことができ、同じくメモリ6Bと6Cのデータから内周
検出を行うことができる。
FIG. 8 shows the configuration of the image edge detection circuit 6 of FIG. 1 in more detail. In FIG. 8, 6A is a memory for storing the first rising point, 6B is a memory for storing the first falling point, 6C is a memory for storing the last rising point, and 6D is a memory for storing the last falling point. .. The outer circumference can be detected from the data in the memories 6A and 6D, and the inner circumference can be detected from the data in the memories 6B and 6C.

【0027】本発明では、上述のような高輝度部内,外
周の円形性検査を行う際、容器の変形,へこみのほか高
輝度部へのゴミ付着等も検出できて不良検出精度が高ま
るので円形性検査と従来の不良検出回路による黒点,白
点の検査を並行実施することでウィンドウの数を削減す
ることができる。図3は本発明に基づくウィンドウの実
施例を示すもので、この図は図13(B)に対応する。
即ち図3においては図13の口部高輝度部103を含む
ウィンドウW1とこの隣接ウィンドウW2とを合わせて
新たな1つのウィンドウWN1とし、同じく図13の底
部高輝度部104を含むウィンドウW4とこれに隣接す
るウィンドウW3とを合わせて新たな他の1つのウィン
ドウWN2とし、さらに図13の底面中央部のウィンド
ウW5に対応する新符号のウィンドウWN3を合わせ3
つのウィンドウ領域WN1,WN2,WN3に区分して
領域数を減らすことができる。
According to the present invention, when the circularity inspection of the inside and the outside of the high-intensity part as described above is performed, deformation of the container, dents, dust adhesion to the high-intensity part, etc. can be detected, and the defect detection accuracy can be improved. It is possible to reduce the number of windows by performing the sexiness inspection and the black and white spot inspection by the conventional defect detection circuit in parallel. FIG. 3 shows an embodiment of a window according to the present invention, and this figure corresponds to FIG. 13 (B).
That is, in FIG. 3, the window W1 including the mouth high brightness portion 103 of FIG. 13 and the adjacent window W2 are combined into a new window WN1. Similarly, the window W4 including the bottom high brightness portion 104 of FIG. And a window W3 adjacent thereto to form another new window WN2, and a window WN3 having a new code corresponding to the window W5 in the center of the bottom surface of FIG.
The number of areas can be reduced by dividing the window areas WN1, WN2, and WN3.

【0028】図9は図1の動作手順を示すフローチャー
トである。次に図9を用いて図1の動作を説明する。な
お以下S1〜S13の符号は図9中のステップを示す。
まず画像出力切替スイッチ17を画像エッジ検出回路6
側に切替えると共に、画像入力切替スイッチ18をスル
ー側、つまり画像エッジ検出回路6が直接、多値画像信
号POを入力する側に切替え(S1)、対象画像の位置
ズレ検出を行う(S2)。また同時にX投影回路9,Y
投影回路10,処理領域決定回路14を介して、処理領
域の決定を行う(S3)。即ちステップS2では図1の
位置ズレ量決定回路13を介して容器画像の位置ズレ量
Δx,Δyを求め、正しい位置にウィンドウが発生でき
るように画像アドレス発生回路3へ平行位置ズレに関す
る補正量を与える。またステップS3では処理領域決定
回路14にて容器画像が他の容器画像に連接した際の分
離を行い、走査領域が連接する容器画像を含まないよう
走査範囲を切取る。
FIG. 9 is a flow chart showing the operation procedure of FIG. Next, the operation of FIG. 1 will be described with reference to FIG. The symbols S1 to S13 below indicate the steps in FIG.
First, the image output changeover switch 17 is set to the image edge detection circuit 6
At the same time as switching to the side, the image input changeover switch 18 is switched to the through side, that is, the side where the image edge detection circuit 6 directly inputs the multi-valued image signal PO (S1), and the positional deviation of the target image is detected (S2). At the same time, the X projection circuit 9 and Y
The processing area is determined through the projection circuit 10 and the processing area determination circuit 14 (S3). That is, in step S2, the positional deviation amounts Δx and Δy of the container image are obtained through the positional deviation amount determining circuit 13 of FIG. 1, and the correction amount relating to the parallel positional deviation is sent to the image address generating circuit 3 so that the window can be generated at the correct position. give. In step S3, the processing area determining circuit 14 separates the container image when the container image is connected to another container image, and cuts the scanning range so that the scanning area does not include the connected container image.

【0029】次に画像入力切替スイッチ18をフレーム
メモリ1側に切替え(S4)、フレームメモリ1の濃淡
画像データ1aを基に以下の良否判定処理を行うように
する。先ず対象缶の検査対象ウィンドウ領域を口部高輝
度部103を含むウィンドウWN1の領域とし、他のウ
ィンドウ領域WN2,WN3をマスクする(S5)。そ
して全てのウィンドウについての検査が終了するまでは
(S5A,分岐N)、ステップS6へ進む。ステップS
6では画像出力切替スイッチ17を不良検出回路7側に
切換え、不良検出回路7,不良検出判定回路12を介し
て、不良検出処理を行う(S7)。ここで不良検出回路
7は微分法などの手法により黒汚れ,白汚れを検出して
不良画素数を計測し、不良検出判定回路12はこの計測
された不良画素数を所定値と比較して良否の判別を行い
後述のステップで総合判定回路15へ出力を行う。
Next, the image input changeover switch 18 is switched to the side of the frame memory 1 (S4), and the following quality determination processing is performed based on the grayscale image data 1a of the frame memory 1. First, the inspection target window region of the target can is set as the region of the window WN1 including the mouth high-intensity portion 103, and the other window regions WN2 and WN3 are masked (S5). Then, until the inspection for all windows is completed (S5A, branch N), the process proceeds to step S6. Step S
In 6, the image output changeover switch 17 is switched to the defect detection circuit 7 side, and the defect detection processing is performed via the defect detection circuit 7 and the defect detection determination circuit 12 (S7). Here, the defect detection circuit 7 detects black stains and white stains by a method such as a differential method to measure the number of defective pixels, and the defect detection determination circuit 12 compares the measured number of defective pixels with a predetermined value to determine whether it is acceptable or not. Is performed and output to the comprehensive determination circuit 15 in a step described later.

【0030】次に画像出力切替スイッチ17を画像エッ
ジ検出回路6側に切換えてこの画像エッジ検出回路6を
再び動作させ、前述のように高輝度部の2値化を行って
前述した方法による外周,内周の座標点や外周円,内周
円の面積の計測を行い(S9)、高輝度部判定回路11
を介し円形性検査及び基準面積値との比較を行って良否
を判定し、後述のステップで総合判定回路15に判定結
果の出力を行う。総合判定回路15では高輝度部判定回
路11,不良検出判定回路12の何れかの判定が不良で
あれば(S10→S11,分岐Y)、出力回路16へ不
良品出力を指示する(S12)。他方、前記ステップS
11で良品であれば、再びステップS5へ戻り次の検査
対象領域を底部高輝度部104を含むウィンドウ領域W
N2とし、他の領域WN1,WN3をマスクして以下ス
テップS12までの手順を繰返す。このようにしてウィ
ンドウWN3までの全てのウィンドウについての検査が
終了したら(S5A,分岐Y)、総合判定回路15を介
し出力回路16へ良品出力を指示させる(S13)。
Next, the image output changeover switch 17 is switched to the image edge detecting circuit 6 side and the image edge detecting circuit 6 is operated again, and the high brightness portion is binarized as described above, and the outer circumference is obtained by the above-mentioned method. , The area of the inner circumference coordinate points, the outer circumference circle, and the inner circumference circle are measured (S9), and the high-luminance part determination circuit 11
A circularity inspection and comparison with a reference area value are performed to determine whether the quality is good, and the determination result is output to the comprehensive determination circuit 15 in a step described later. If the comprehensive judgment circuit 15 judges that either the high-luminance part judgment circuit 11 or the defect detection judgment circuit 12 is defective (S10 → S11, branch Y), the output circuit 16 is instructed to output a defective product (S12). On the other hand, the step S
If it is a non-defective product in step 11, the process returns to step S5 again, and the next inspection target region is the window region W including the bottom high-intensity portion 104.
N2 is set, the other regions WN1 and WN3 are masked, and the procedure up to step S12 is repeated. In this way, when the inspection of all windows up to the window WN3 is completed (S5A, branch Y), the output circuit 16 is instructed to output a non-defective product via the comprehensive determination circuit 15 (S13).

【0031】図2は図1の処理の高速化を計ったブロッ
ク回路図である。図2においては、図1の画像入力切替
スイッチ18を省略すると共にウィンドウ回路5を新た
な回路5Aとし、また画像エッジ検出回路6に相当する
回路を6−1,6−2と2つ設け、この一方の画像エッ
ジ検出回路6−2は多値画像信号POを(ウィンドウゲ
ート回路5Aを介し)直接入力してその検出結果を位置
ズレ量決定回路13に与えるようにし、さらに図1の画
像出力切換スイッチ17を省略して、フレームメモリの
出力画像信号1aを(ウィンドウゲート回路5Aを介
し)他方の画像エッジ検出回路6−1と不良検出回路7
とに並列に与えるようにし、高輝度判定回路11の処理
と不良検出回路11の処理とを同時に並行して実行させ
るようにしたものである。
FIG. 2 is a block circuit diagram for speeding up the processing of FIG. In FIG. 2, the image input changeover switch 18 of FIG. 1 is omitted, the window circuit 5 is replaced by a new circuit 5A, and two circuits 6-1 and 6-2 corresponding to the image edge detection circuit 6 are provided. The one image edge detection circuit 6-2 directly inputs the multi-valued image signal PO (via the window gate circuit 5A) to give the detection result to the position shift amount determination circuit 13, and further outputs the image shown in FIG. The changeover switch 17 is omitted, and the output image signal 1a of the frame memory (via the window gate circuit 5A) is supplied to the other image edge detection circuit 6-1 and the defect detection circuit 7.
And the processing of the high-brightness determination circuit 11 and the processing of the defect detection circuit 11 are simultaneously executed in parallel.

【0032】図10は図2の動作手順を示すフローチャ
ートで図9の手順よりスイッチ17,18の切替手順S
1,S4,S6,S8が省略されているほか、ステップ
S7の不良検出処理とステップS9の高輝度部の処理と
が並列化されている。
FIG. 10 is a flow chart showing the operation procedure of FIG. 2, which is a switching procedure S of the switches 17 and 18 from the procedure of FIG.
1, S4, S6, S8 are omitted, and the defect detection process of step S7 and the high-luminance part process of step S9 are parallelized.

【0033】図11は缶容器の底面形状が異なる場合の
底部高輝度部の説明図で、同図(A)は上面(画像)
図、同図(B)は側断面図である。この例では底部高輝
度部104は104−1,104−2と2つ発生してい
る。このように缶底部の形状により底部高輝度部はいく
つかの同心円状に発生することがある。このような場合
は底部領域を適当に分割し、ウィンドウを増やすことに
より対応する。図9,図10のステップS5はそのため
の条件分岐である。また底部領域は走査領域として小さ
いためウィンドウを多少増やしても処理の高速性を維持
することができる。
FIG. 11 is an explanatory view of the bottom high-intensity portion when the bottom shape of the can container is different, and FIG. 11 (A) shows the top surface (image).
FIG. 1B is a side sectional view. In this example, two bottom high brightness portions 104-1 and 104-2 are generated. As described above, depending on the shape of the bottom of the can, the high-intensity bottom part may occur in several concentric circles. In such a case, the bottom area is appropriately divided and the number of windows is increased. Step S5 in FIGS. 9 and 10 is a conditional branch for that purpose. Since the bottom area is small as a scanning area, the processing speed can be maintained even if the number of windows is increased.

【0034】[0034]

【発明の効果】本発明によれば、容器の口部高輝度部の
2値画像についての走査ライン上の最初の立上り点と最
後の立下り点との中点座標から容器の位置を特定し、さ
らに容器の連接方向と垂直な方向への前記口部高輝度部
の2値画像の投影量を求めてこの投影量の差分値を容器
の内側から外側へ向けて探索し、所定の条件で連接点を
検出して検出領域を連接容器の領域から分離したのち、
容器内面の高輝度部の円形性検査を行うことにしたの
で、この検査により缶容器の変形、へこみのほか高輝度
部へのゴミ付着等も検出でき検査精度を高めることがで
きる。従ってこの円形性検査と従来の不良検査手段によ
る黒点,白点の検査とを並行して実行することにより一
度に走査するウィンドウ領域の大きさを拡大し(換言す
ればウィンドウの数を削減し)、処理を高速化すること
ができる。
According to the present invention, the position of the container is specified from the midpoint coordinates of the first rising point and the last falling point on the scanning line for the binary image of the high brightness portion of the mouth of the container. Furthermore, the projection amount of the binary image of the mouth high-intensity part in the direction perpendicular to the connecting direction of the container is obtained, the difference value of this projection amount is searched from the inside of the container to the outside, and the predetermined value is satisfied. After detecting the contact point and separating the detection area from the area of the connecting container,
Since it has been decided to inspect the circularity of the high-intensity part on the inner surface of the container, this inspection can detect deformation of the can container, dents, and dust adhesion to the high-intensity part, thus improving the inspection accuracy. Therefore, the size of the window area scanned at one time is enlarged by executing this circularity inspection and the inspection of the black and white dots by the conventional defect inspection means in parallel (in other words, the number of windows is reduced). The processing can be speeded up.

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

【図1】本発明の第1の実施例としてのハードウェア構
成を示すブロック図
FIG. 1 is a block diagram showing a hardware configuration as a first embodiment of the present invention.

【図2】本発明の第2の実施例としてのハードウェア構
成を示すブロック図
FIG. 2 is a block diagram showing a hardware configuration as a second embodiment of the present invention.

【図3】円形容器内面の濃度変化と本発明に基づくウィ
ンドウ分割との関係を示す図
FIG. 3 is a diagram showing a relationship between a change in concentration on the inner surface of a circular container and window division according to the present invention.

【図4】容器内面の不良による高輝度部への影響を示す
FIG. 4 is a diagram showing an influence on a high-intensity part due to a defect on the inner surface of the container.

【図5】円形性検査のための高輝度部外周点を示す図FIG. 5 is a diagram showing outer peripheral points of a high-luminance portion for a circularity inspection.

【図6】円形性判定の説明図FIG. 6 is an explanatory diagram of circularity determination.

【図7】高輝度部内周点の検出方法の説明図FIG. 7 is an explanatory diagram of a method of detecting an inner peripheral point of a high brightness portion.

【図8】画像エッジ検出回路の細部構成を示すブロック
FIG. 8 is a block diagram showing a detailed configuration of an image edge detection circuit.

【図9】図1の動作手順を示すフローチャート9 is a flowchart showing the operation procedure of FIG.

【図10】図2の動作手順を示すフローチャートFIG. 10 is a flowchart showing the operation procedure of FIG.

【図11】円形容器の底面形状が異なる場合の容器内面
の高輝度部を示す図
FIG. 11 is a view showing a high-intensity part on the inner surface of the container when the bottom shape of the circular container is different.

【図12】円形容器内面の高輝度部を示す図FIG. 12 is a diagram showing a high-intensity part on the inner surface of a circular container.

【図13】円形容器内面の濃度変化と従来のウィンドウ
分割との関係を示す図
FIG. 13 is a diagram showing a relationship between a change in concentration on the inner surface of a circular container and conventional window division.

【図14】本発明の第1の実施例としての対象画像の位
置検出方法の説明図
FIG. 14 is an explanatory diagram of a target image position detection method according to the first embodiment of the present invention.

【図15】図14を補足する細部説明図15 is a detailed explanatory diagram supplementing FIG.

【図16】本発明の第2の実施例としての対象画像の位
置検出方法の説明図
FIG. 16 is an explanatory diagram of a target image position detection method as a second embodiment of the present invention.

【図17】本発明の第3の実施例としての対象画像の位
置検出方法の説明図
FIG. 17 is an explanatory diagram of a target image position detection method as the third embodiment of the present invention.

【図18】従来の容器連接点の検出方法の説明図FIG. 18 is an explanatory view of a conventional method for detecting a container contact point.

【図19】図18の検出方法では連接点が検出できない
例を示す図
FIG. 19 is a diagram showing an example in which a contact cannot be detected by the detection method of FIG.

【図20】本発明に基づく連接点の検出方法の説明図FIG. 20 is an explanatory diagram of a method for detecting a contact point based on the present invention.

【図21】図20の部分拡大図21 is a partially enlarged view of FIG.

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

PO 多値濃淡画像信号 1 フレームメモリ 1a フレームメモリ出力画像信号 2 ウィンドウメモリ 2a マスクパターンデータ 3 画像アドレス発生回路 4 ウィンドウアドレス発生回路 5 ウィンドウゲート回路 5A ウィンドウゲート回路 6 画像エッジ検出回路 6−1 画像エッジ検出回路 6−2 画像エッジ検出回路 6A 最初の立上り点メモリ 6B 最初の立下り点メモリ 6C 最後の立上り点メモリ 6D 最後の立下り点メモリ 7 不良検出回路 9 X投影回路 10 Y投影回路 11 高輝度部判定回路 12 不良検出判定回路 13 位置ズレ量決定回路 14 処理領域決定回路 15 総合判定回路 16 出力回路 17 画像出力切替スイッチ 18 画像入力切替スイッチ WN1 ウィンドウ WN2 ウィンドウ WN3 ウィンドウ 101 リング照明器 102(102−1,102−2) 容器 102−1 対象容器 102−2 連接容器 103 口部高輝度部 104 底部高輝度部 104−1 底部高輝度部 104−2 底部高輝度部 x01−x0j 外周点 x11〜x1j 外周点 TB(TB1,TB2)許容値テーブル TB1 最大値テーブル TB2 最小値テーブル 201 マスクパターン A0 最初の立上り点 B0 最初の立上り点 A1 最後の立下り点 B1 最後の立下り点 MA(MA1〜MA4) 中点 MB(MB1〜MB4) 中点 203 カメラ 204 上端位置 L 限界ライン PA 右側連接点 PB 左側連接点 PD 差分減少開始点 ΔPM 最大差分投影点 PM 最大投影点 β 補正量 PO multi-value grayscale image signal 1 frame memory 1a frame memory output image signal 2 window memory 2a mask pattern data 3 image address generation circuit 4 window address generation circuit 5 window gate circuit 5A window gate circuit 6 image edge detection circuit 6-1 image edge Detection circuit 6-2 Image edge detection circuit 6A First rising point memory 6B First falling point memory 6C Last rising point memory 6D Last falling point memory 7 Fault detection circuit 9 X projection circuit 10 Y projection circuit 11 High brightness Part determination circuit 12 Defect detection determination circuit 13 Position shift amount determination circuit 14 Processing area determination circuit 15 Overall determination circuit 16 Output circuit 17 Image output changeover switch 18 Image input changeover switch WN1 window WN2 window WN3 window 101 Ring Illuminator 102 (102-1, 102-2) Container 102-1 Target Container 102-2 Connection Container 103 Mouth High Brightness Section 104 Bottom High Brightness Section 104-1 Bottom High Brightness Section 104-2 Bottom High Brightness x01- x0j Outer peripheral point x11 to x1j Outer peripheral point TB (TB1, TB2) Allowable value table TB1 Maximum value table TB2 Minimum value table 201 Mask pattern A0 First rising point B0 First rising point A1 Last falling point B1 Last falling point MA (MA1 to MA4) Mid point MB (MB1 to MB4) Mid point 203 Camera 204 Upper end position L Limit line PA Right side contact point PB Left side contact point PD Difference reduction start point ΔPM Maximum difference projection point PM Maximum projection point β Correction amount

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.5 識別記号 庁内整理番号 FI 技術表示箇所 H04N 7/18 B 8626−5C ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 5 Identification code Office reference number FI technical display location H04N 7/18 B 8626-5C

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】所定の方向に相互に連接し得る軸対称の円
形容器の前記軸方向からこの円形容器の内面側を照明し
たうえ、TVカメラを介しこの軸方向からこの円形容器
の照明面を撮像し、不良検査手段を介しこの撮像された
画像を解析して前記円形容器の内面の黒汚れおよび白汚
れを検査する円形容器内面検査装置において、 前記撮像の画面走査によって得られる画像信号を前記円
形容器の口部高輝度部の2値画像を得るように2値化
し、この2値化画像信号を前記連接方向に垂直な方向に
投影する手段と、この投影に基づく投影画素量を差分し
て差分投影画素量を求め、前記円形容器の内側から外側
に向けて前記差分投影画素量を調べ、該画素量が最初に
負になる点までの区間内でこの差分投影画素量が所定の
しきい値を越える点を検出し、この検出点の座標値に所
定の補正値を加算した座標値を用いて前記連接の領域を
分離する手段を備えたことを特徴とする円形容器内面検
査装置。
1. An inner surface side of an axially symmetric circular container which can be connected to each other in a predetermined direction is illuminated from the axial direction, and an illumination surface of the circular container is illuminated from the axial direction via a TV camera. In a circular container inner surface inspection device for inspecting black stains and white stains on the inner surface of the circular container by imaging and analyzing the imaged image through a defect inspection means, the image signal obtained by the screen scanning of the imaging is Binarization is performed so as to obtain a binary image of the mouth high-intensity portion of the circular container, and means for projecting the binarized image signal in a direction perpendicular to the connecting direction and a projection pixel amount based on this projection Then, the differential projection pixel amount is obtained by examining the differential projection pixel amount from the inner side to the outer side of the circular container, and the difference projection pixel amount is set to a predetermined value within a section up to the point where the pixel amount first becomes negative. Detects points that exceed the threshold An apparatus for inspecting an inner surface of a circular container, comprising means for separating the connecting region by using a coordinate value obtained by adding a predetermined correction value to the coordinate value of the detection point.
JP3249946A 1991-07-15 1991-09-30 Circular container inner surface inspection device Expired - Fee Related JP2874402B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP3249946A JP2874402B2 (en) 1991-09-30 1991-09-30 Circular container inner surface inspection device
EP97106885A EP0791822A3 (en) 1991-07-15 1992-07-15 A cylindrical Containers inner surface tester
EP19920112088 EP0523664A3 (en) 1991-07-15 1992-07-15 A cylindrical container's inner surface tester
US07/914,332 US5233199A (en) 1991-07-15 1992-07-15 Cylindrical container's inner surface tester
US08/157,908 US5412203A (en) 1991-07-15 1993-11-24 Cylindrical container inner surface tester

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3249946A JP2874402B2 (en) 1991-09-30 1991-09-30 Circular container inner surface inspection device

Publications (2)

Publication Number Publication Date
JPH0587738A true JPH0587738A (en) 1993-04-06
JP2874402B2 JP2874402B2 (en) 1999-03-24

Family

ID=17200535

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3249946A Expired - Fee Related JP2874402B2 (en) 1991-07-15 1991-09-30 Circular container inner surface inspection device

Country Status (1)

Country Link
JP (1) JP2874402B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6760489B1 (en) 1998-04-06 2004-07-06 Seiko Epson Corporation Apparatus and method for image data interpolation and medium on which image data interpolation program is recorded

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6760489B1 (en) 1998-04-06 2004-07-06 Seiko Epson Corporation Apparatus and method for image data interpolation and medium on which image data interpolation program is recorded

Also Published As

Publication number Publication date
JP2874402B2 (en) 1999-03-24

Similar Documents

Publication Publication Date Title
US8090190B2 (en) Method and apparatus for reviewing defects
US5233199A (en) Cylindrical container&#39;s inner surface tester
JP3493979B2 (en) Method and apparatus for inspecting defects on inspected surface
JP2874402B2 (en) Circular container inner surface inspection device
JPH0572141A (en) Circular container inside surface inspecting device
JPH05126750A (en) Apparatus for inspecting inner surface of circular
JP3055322B2 (en) Circular container inner surface inspection device
JPH11118730A (en) Method and apparatus for inspecting defect on surface to be inspected
JPH03175343A (en) Method for extracting flaw by inspection appearance
US5412203A (en) Cylindrical container inner surface tester
JP3044951B2 (en) Circular container inner surface inspection device
JP3044961B2 (en) Circular container inner surface inspection device
JP3216439B2 (en) Internal inspection equipment for circular containers
JPH0769276B2 (en) Container inner surface inspection device
JPH0518909A (en) Apparatus for inspecting inner surface of circular container
JP3055323B2 (en) Circular container inner surface inspection device
JP3508518B2 (en) Appearance inspection method
JP3391163B2 (en) Circular container inner surface inspection device
JPH109835A (en) Surface flaw inspection apparatus
US5453612A (en) Container inner surface tester employing a television camera and digitized image to scan for defects
JPH07140092A (en) Picture inspection system
JP2988059B2 (en) Circular container inner surface inspection device
JPH09161056A (en) Inspecting method for inner surface of circular container
US5338000A (en) Cylindrical container inner surface tester based on an image processing technology
JPH0963547A (en) Inspecting method for can opening

Legal Events

Date Code Title Description
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

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080114

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090114

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100114

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees