JPH0312254B2 - - Google Patents

Info

Publication number
JPH0312254B2
JPH0312254B2 JP12016681A JP12016681A JPH0312254B2 JP H0312254 B2 JPH0312254 B2 JP H0312254B2 JP 12016681 A JP12016681 A JP 12016681A JP 12016681 A JP12016681 A JP 12016681A JP H0312254 B2 JPH0312254 B2 JP H0312254B2
Authority
JP
Japan
Prior art keywords
circuit
dirt
scanning direction
paper cup
cup
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
Application number
JP12016681A
Other languages
Japanese (ja)
Other versions
JPS5821547A (en
Inventor
Juji Kobayashi
Takao Okada
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.)
Dai Nippon Printing Co Ltd
Ikegami Tsushinki Co Ltd
Original Assignee
Dai Nippon Printing Co Ltd
Ikegami Tsushinki 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 Dai Nippon Printing Co Ltd, Ikegami Tsushinki Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP12016681A priority Critical patent/JPS5821547A/en
Publication of JPS5821547A publication Critical patent/JPS5821547A/en
Publication of JPH0312254B2 publication Critical patent/JPH0312254B2/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)

Description

【発明の詳細な説明】 本発明は、自動表面検査装置に関するものであ
り、更に詳細に述べるならば、紙カツプの内側表
面の自動検査に特に効果のある自動表面検査装置
に関するものであり、ここで、用語「紙カツプ」
は、紙又は紙と同様な性質をもつ材料で作られた
カツプを意味するものであり、表面が被覆処理さ
れたものも含むものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an automatic surface inspection device, and more specifically, to an automatic surface inspection device that is particularly effective in automatically inspecting the inner surface of paper cups. So, the term "paper cup"
means a cup made of paper or a material with similar properties to paper, and also includes a cup whose surface has been coated.

紙カツプは通常、自動販売機の容器として用い
られる外、各種食品の容器として広く用いられて
いる。これらの用途では、容器内面に虫、毛髪、
油等が付着していた場合、食品の容器として使用
できないのはもちろんであるが、チツプかす等の
一般に無害なものの場合でも、使用に際し厭がら
れる傾向に有る。このようなため、成型された紙
カツプの内面汚れ検査の要求は高く、必要に応じ
て人間による目視検査が行なわれて来た。経験を
積んだ人間の判断力は自由度に富み、検査項目が
多岐にわたる場合であつても、その処理時間、精
度、経済性において優れているが、反面、個人に
よつてバラツキがあること、先入観によつて左右
されやすいこと、この時々の気分によつて左右さ
れやすいこと、疲労による汚れの見逃しがないと
はいえず一定のペースで長時間作業を続行できな
い等の欠点がある。そこで、検査の自動化が望ま
れてきた。なぜならば、人間による目視検査の代
りに自動検査装置が使用できるならば、検査結果
に一定の精度と客観性を確保することができ、併
せて省力化と長時間連続運転を可能にすることが
できる。
Paper cups are commonly used as containers for vending machines and are widely used as containers for various foods. In these applications, insects, hair,
Of course, if there is oil or the like on the container, it cannot be used as a food container, but even in the case of something generally harmless, such as chips, there is a tendency to be reluctant to use it. For this reason, there is a high demand for inspecting the inner surface of molded paper cups for dirt, and visual inspections have been carried out by humans as necessary. Experienced people have a high degree of freedom in judgment and are superior in terms of processing time, accuracy, and economy even when testing items are wide-ranging. It has disadvantages such as being easily influenced by preconceptions, being easily influenced by one's mood at the moment, and not being able to continue working at a constant pace for long periods of time because it cannot be said that dirt will be overlooked due to fatigue. Therefore, automation of testing has been desired. This is because if automatic inspection equipment can be used in place of human visual inspection, it will be possible to ensure a certain level of accuracy and objectivity in the inspection results, and at the same time it will save labor and enable long-term continuous operation. can.

紙カツプの自動検査装置のためには、紙カツプ
を搬送して検査位置に位置づけるための搬送装置
と、その紙カツプを表面検出してその検出データ
を処理して合否を判定する検出処理装置とが必要
と思われる。
An automatic paper cup inspection device requires a transport device to transport the paper cup and position it at the inspection position, a detection processing device to detect the surface of the paper cup and process the detection data to determine pass/fail. seems to be necessary.

まず、搬送装置を考えてみるに、ガラスびんを
検査位置で自転させながらレーザー光を当ててキ
ズからの散乱光を検出するガラスびんの自動検査
装置に使用されている特開昭50−57291号公報に
開示されるような回転テーブル型搬送装置が思い
浮かぶ。この回転テーブル型搬送装置は、回転テ
ーブルにびんを送り込むフイーダスクリユー及び
スターホイール、回転テーブルにのせられたびん
を自動させるための摩擦ベルト等を具備している
が、それら全てがびんに相当な力で接触するよう
になされている。しかし、紙カツプは、ガススび
んに比べて機械的な強度が小さく、そのような相
当な力で接触されると、変形し、極端な場合では
やぶれてしまう。従つて、搬送装置は、紙カツプ
に強い力を作用させるものであつてはならない。
一方、固定された表面検査装置によつて紙カツプ
の内面を検査するには、紙カツプを常に決つた位
置に位置づける必要があり、また、表面検査装置
が1つであれば、その決つた位置で紙カツプを回
転させる必要がある。しかし、上述した如きガラ
スびん用の搬送装置は、びんの側面を摩擦ベルト
でこすつて回転させるようになされており、紙カ
ツプは変形又は押しつぶされてしまい、またたと
え変形しなくとも、紙カツプのテーパ面により浮
き上がつたり又は中心軸が大きく傾いたりする。
このように紙カツプが変形したり、浮き上がつた
り、中心軸が大きく傾斜したりしては、紙カツプ
の表面を検査パターンと正確に照合できない。こ
のように従来の搬送装置は、紙カツプの特殊性に
は応えられず、紙カツプには全く使用できない。
First, considering the conveyance device, JP-A No. 50-57291 is used in an automatic glass bottle inspection device that detects scattered light from scratches by shining a laser beam on the glass bottle while rotating it at the inspection position. A rotary table type conveying device as disclosed in the publication comes to mind. This rotary table type conveyor is equipped with a feeder screw and star wheel to feed the bottles onto the rotary table, a friction belt to automatically move the bottles placed on the rotary table, etc., all of which correspond to bottles. It is designed to make contact with a certain amount of force. However, paper cups have less mechanical strength than gas bottles, and when contacted with such considerable force, they deform and, in extreme cases, break. Therefore, the conveying device must not apply strong force to the paper cup.
On the other hand, in order to inspect the inner surface of a paper cup with a fixed surface inspection device, it is necessary to always position the paper cup in a fixed position. You need to rotate the paper cup. However, the above-mentioned transport device for glass bottles rotates the bottle by rubbing the side of the bottle with a friction belt, and the paper cup is deformed or crushed, and even if it is not deformed, the paper cup is The tapered surface may cause uneven lifting or the center axis may be tilted significantly.
If the paper cup is deformed, lifted up, or has a large inclination, the surface of the paper cup cannot be accurately compared with the inspection pattern. As described above, conventional conveying devices cannot meet the special characteristics of paper cups and cannot be used for paper cups at all.

更に、紙カツプが検査ステーシヨンに到達した
とき、紙カツプを自転させる方法では、紙カツプ
が所定速度で自転するまでに時間がかかる。しか
し、この加速のための時間は、紙カツプの表面検
査の高速化を図るためにはない方が好ましい。そ
こで、予じめ加速する方法等が考えられるが、従
来の方法では構造が複雑になり好ましくない。
Furthermore, in the method of rotating the paper cup when it reaches the inspection station, it takes time for the paper cup to rotate at a predetermined speed. However, it is preferable that this acceleration time not be provided in order to speed up the surface inspection of the paper cup. Therefore, a method of accelerating in advance can be considered, but the conventional method is undesirable because the structure becomes complicated.

次に検出処理装置を考える。近年の画像処理技
術の進歩により、被検査物体の外表面上の小さい
欠点も検出し判別することもできるようになつ
た。しかし、紙カツプの内側表面は、見にくいだ
けでなく、例えば大きさが0.1mm程度の極めて小
さい汚れも検出する必要がある。しかしながら、
従来は、そのような極めて小さい欠点は、雑音と
の区別が困難であつたために確実な検出及び判別
ができなかつた。これを可能にするには、撮像カ
メラのような表面検出装置の分解能を上げるだけ
でなく、雑音を有効に除去し、微小欠点を強調し
て明瞭なコントラストをつけることが必要であ
る。又、紙カツプの画像情報中には、バツクグラ
ウンドだけでなく、継ぎ目、マーク、凹凸等の欠
点ではない情報も存在するので、これらを効果的
に分離することも必要である。また、紙カツプの
内面の画像の処理のように大量の画像データを処
理する必要がある場合、従来通常コンピユータを
使用している。しかし、コンピユータを使用する
ときは、ソフトウエアにより処理が行なわれるの
で、処理速度が遅くなり、高速処理には適さな
い。
Next, consider the detection processing device. Recent advances in image processing technology have made it possible to detect and distinguish even small defects on the outer surface of an object to be inspected. However, the inner surface of a paper cup is not only difficult to see, but it is also necessary to detect extremely small dirt, for example, about 0.1 mm in size. however,
Conventionally, such extremely small defects could not be reliably detected and discriminated because it was difficult to distinguish them from noise. To make this possible, it is necessary not only to increase the resolution of surface detection devices such as imaging cameras, but also to effectively remove noise and emphasize minute defects to provide clear contrast. Furthermore, since the image information of the paper cup includes not only the background but also information that is not a defect such as seams, marks, and irregularities, it is necessary to effectively separate these. Furthermore, when it is necessary to process a large amount of image data, such as processing an image of the inner surface of a paper cup, a computer has conventionally been used. However, when a computer is used, processing is performed by software, which slows down the processing speed and is not suitable for high-speed processing.

更に紙カツプを詳細にみるならば、紙カツプに
は、上端エツジ、側面底面間継目、側面継目が少
くともあり、場合によれば、底面にストロー用の
穴が設けられ剥離容易な金属箔で塞がれている。
しかし、これらの継目、エツジ、穴は、紙カツプ
の撮像により検出されるが、それらは汚れではな
いので、汚れと区別されねばならない。そのよう
な場合、継目等の部分に相当する検出データを不
感帯処理即ちマスク処理する方法がとられる。そ
して、マスク処理を確実にするためには、紙カツ
プの位置の不正確さや表面検査装置のずれがあつ
ても継目等をマスクできるようにマスクの範囲を
ある程度広くせざるを得ない。しかし、このよう
にすれば、ほんとの汚れ部分までマスクされて検
出できず、十分信頼できる汚れ検出ができない。
換言するならば、従来は、被検査面にマスクすべ
き部分があると、マスク処理のために汚れ検出処
理がなされない部分ができるので、完全な汚れ検
出ができなかつた。
Furthermore, if we look at the paper cup in detail, we can see that the paper cup has at least a top edge, a seam between the sides and the bottom, and a side seam, and in some cases, the bottom has a hole for a straw and is made of metal foil that can be easily peeled off. It's blocked.
However, these seams, edges, and holes, which are detected by imaging the paper cup, are not dirt and must be distinguished from dirt. In such a case, a method is used in which detection data corresponding to portions such as seams is subjected to dead zone processing, that is, mask processing. In order to ensure reliable mask processing, the range of the mask must be widened to some extent so that even if there is an inaccuracy in the position of the paper cup or a misalignment of the surface inspection device, seams and the like can be masked. However, with this method, even the actual dirt is masked and cannot be detected, making it impossible to detect dirt with sufficient reliability.
In other words, in the past, if there was a portion of the surface to be inspected that should be masked, there would be a portion where the stain detection process was not performed due to the masking process, making complete stain detection impossible.

また、紙カツプの側面継目が表面検査装置の主
走査方向に沿うように紙カツプを位置づけると、
ほかの上端エツジや側面底面間継目は、主走査方
向に直交することになる。しかし、従来は、その
ように主走査方向に沿うマスクすべき部分と、そ
れと直交する方向に沿うマスクすべき部分とを効
果的にマスク処理すると共に、汚れ検出処理がな
されない部分なく全表面に対して汚れ検出を行な
つて汚れを完全に検出できる方法がなかつた。
Also, if the paper cup is positioned so that the side seam of the paper cup is along the main scanning direction of the surface inspection device,
The other top edges and the seams between the side and bottom surfaces are perpendicular to the main scanning direction. However, in the past, in addition to effectively masking the parts that should be masked along the main scanning direction and the parts that should be masked along the direction perpendicular to the main scanning direction, the entire surface was covered with no parts that were not subjected to dirt detection processing. However, there is no method that can completely detect dirt.

また、検出データをマスク処理するには、マス
クパターンと検出データとを照合するための基準
軸が必要である。しかし、紙カツプの表面の内で
基準軸となるものを検出してから、紙カツプ全体
を検出していたのでは、検出のための時間が長く
なり、高速処理に適さない。
Furthermore, in order to mask the detected data, a reference axis is required for comparing the mask pattern and the detected data. However, detecting the entire paper cup after detecting the reference axis on the surface of the paper cup takes a long time for detection, and is not suitable for high-speed processing.

そこで、本発明は、紙カツプを変形させること
なく正確に検査位置に位置づけることができる搬
送装置と、紙カツプ内面を撮像して微小な欠点ま
でも正確且つ高速度で検出できる検出処理装置と
を有する自動表面検査装置を提供せんとするもの
である。
Therefore, the present invention has developed a transport device that can accurately position a paper cup at an inspection position without deforming it, and a detection processing device that can image the inner surface of a paper cup and detect even minute defects accurately and at high speed. An object of the present invention is to provide an automatic surface inspection device having the following features.

本発明のもう1つの目的は紙カツプを変形させ
ることなく正確に検査位置に位置づけることがで
き、そして検査位置において加速時間を必要とす
ることなく定速度で自転させることができる搬送
装置を有する自動表面検査装置を提供せんとする
ことである。
Another object of the present invention is to provide an automatic paper cup with a transport device capable of positioning the paper cup accurately in an inspection position without deforming it and allowing it to rotate at a constant speed at the inspection position without requiring acceleration time. The object of the present invention is to provide a surface inspection device.

また、本発明のもう1つの目的は、紙カツプの
搬送時も自転時も、紙カツプを変形させることな
く且つ偏心や浮き上がりを起こすことなく確実に
保持できる搬送装置を有する自動表面検査装置を
提供せんとするものである。
Another object of the present invention is to provide an automatic surface inspection device having a conveying device that can reliably hold paper cups without deforming them, causing eccentricity or lifting, both during conveyance and rotation. This is what I am trying to do.

更に、本発明のもう1つの目的は、完全にマス
ク処理される領域をなくして汚れ検出を確実に行
なう検出処理装置を有する自動表面検査装置を提
供せんとするものである。
Still another object of the present invention is to provide an automatic surface inspection system having a detection processing system that eliminates areas that are completely masked to ensure contamination detection.

また、本発明のもう1つの目的は、側面継目の
上部折れ曲り部のマスクパターンに対しては、リ
フアレンスメモリはそのマスクパターンの部分だ
けでよいようにし、かつリアルタイム処理を可能
にして、構成の簡単な自動表面検査装置を提供せ
んとするものである。
Another object of the present invention is to enable reference memory for the mask pattern of the upper bent portion of the side seam only for that mask pattern, and to enable real-time processing. The present invention aims to provide a simple automatic surface inspection device.

更にまた、本発明のもう1つの目的は、マスク
処理するための基準軸の検出前の検出データも有
効に利用して、紙カツプの自動検出時間を最小に
した検出処理装置を有する自動表面検査装置を提
供せんとするものである。
Furthermore, another object of the present invention is to provide an automatic surface inspection system having a detection processing device that minimizes the time required for automatic paper cup detection by effectively utilizing detection data before detection of a reference axis for mask processing. The aim is to provide the equipment.

即ち、本発明による自動表面検査装置は、検出
ステーシヨンに紙カツプを位置づける紙カツプ搬
送装置と、検出ステーシヨンの紙カツプを表面検
出する表面検出装置と、検出データを処理して汚
れを判別する検出処理装置とから構成される。そ
して、搬送装置は、間欠駆動される回転式の割出
しテーブルと、該割出しテーブルの周辺に配置さ
れ該割出しテーブルに対して自転できるように支
持され、紙カツプの下部をぴつたりと受ける凹部
を有するカツプホルダと前記割出しテーブルの回
転軸に対して回転自在に且つ同軸関係に装着され
て連続駆動される太陽歯車と、前記カツプホルダ
の自転軸に固定されて前記太陽歯車と歯合する遊
星歯車と、前記カツプホルダに紙カツプを供給す
る供給手段が配置された供給ステーシヨンと、前
記カツプホルダに紙カツプを保持して検査する検
査ステーシヨンと、紙カツプを該カツプホルダか
ら合否の結果に基づいて放出する振分放出手段と
を具備し、前記カツプホルダに保持された紙カツ
プが、前記割出しテーブルの回転により該割出し
テーブルと一緒に公転すると共に、前記太陽歯車
の連続回転により前記遊星歯車を介して前記割出
しテーブルの回転と独立して定速自転させられる
ようになつている。そして、表面検出装置は、前
記検査ステーシヨンにおいて自転する紙カツプを
照明する照明手段と、該紙カツプの自転軸とほぼ
共面関係にある走査線に沿つて紙カツプを走査す
るように配置され且つ固体撮像素子から構成され
るラインセンサとを具備し、アナログ画素信号を
出力する。
That is, the automatic surface inspection device according to the present invention includes a paper cup transport device that positions a paper cup at a detection station, a surface detection device that detects the surface of the paper cup at the detection station, and a detection process that processes detection data to determine dirt. It consists of a device. The conveyance device includes a rotary indexing table that is driven intermittently, and is arranged around the indexing table and supported so as to be able to rotate relative to the indexing table, and tightly receives the lower part of the paper cup. A cup holder having a concave portion, a sun gear that is rotatably and coaxially mounted on the rotation axis of the index table and continuously driven, and a planet that is fixed to the rotation axis of the cup holder and meshes with the sun gear. a supply station in which a gear is disposed, a supply means for supplying a paper cup to the cup holder; an inspection station for holding and inspecting a paper cup in the cup holder; and discharging the paper cup from the cup holder based on a pass/fail result. distributing and discharging means, the paper cup held in the cup holder is rotated together with the indexing table by the rotation of the indexing table, and is also transported through the planetary gear by the continuous rotation of the sun gear. It is adapted to rotate at a constant speed independently of the rotation of the index table. The surface detection device is arranged to scan the paper cup along a scanning line substantially coplanar with the rotation axis of the paper cup, and an illumination means for illuminating the paper cup rotating on its own axis in the inspection station. It is equipped with a line sensor composed of a solid-state image sensor, and outputs an analog pixel signal.

そして、また、検出処理装置は、前面表面検出
装置から出力されるアナログ画素信号を受けて波
形整形しデジタル変換して出力する前処理部と、
該前処理部からのデジタル画素信号を受けて汚れ
検出を行うデータ処理部とを具備しており、該デ
ータ処理部は、前記前処理部からのデジタル画素
信号を受けて主走査方向の画素データを副走査方
向の画素データに変換する検出軸変換回路と、前
記検出軸変換回路からのデジタル画素信号を受け
て主走査方向における基準軸を検出する主走査方
向基準座標設定回路と、前記前処理部からのデジ
タル画素信号を受けて副走査方向における基準軸
を検出する副走査方向基準座標設定回路と、前記
前処理部からのデジタル画素信号を受けて副走査
方向における基準軸を検出する副走査方向基準座
標設定回路と、前記前処理部からのデジタル画素
信号を受けて汚れ検出対象から外すべき部分のパ
ターン情報を作成するマスクパターン回路と、前
記前処理部からのデジタル画素信号を受けてマス
クすべき部分については前記マスクパターン回路
からのマスク情報を受けてマスク処理を行いなが
ら主走査方向の汚れ検出処理を行う第1の判定回
路を有する主走査方向汚れ検出回路と、前記検出
軸変換回路からのデジタル画素信号を受けてマス
クすべき部分については前記マスクパターン回路
からのマスク情報を受けてマスク処理を行いなが
ら副走査方向の汚れ検出処理を行う2の判定回路
を有する副走査方向汚れ検出回路と、前記第1及
び第2の判定回路からの汚れ情報を受けて総合的
な合否判定を行う総合判定回路とを具備する検出
処理装置と、前記の総合的な判定結果に基づき、
前記紙カツプ搬送装置の振分放出装置によつて良
品と不良品を分別するようになされている。
The detection processing device also includes a preprocessing section that receives the analog pixel signal output from the front surface detection device, shapes the waveform, converts it into digital data, and outputs the signal.
and a data processing section that receives digital pixel signals from the preprocessing section and performs dirt detection, and the data processing section receives digital pixel signals from the preprocessing section and processes pixel data in the main scanning direction. a detection axis conversion circuit that converts the pixel data into sub-scanning direction pixel data; a main scanning direction reference coordinate setting circuit that receives the digital pixel signal from the detection axis conversion circuit and detects a reference axis in the main scanning direction; and the preprocessing. a sub-scanning direction reference coordinate setting circuit that receives digital pixel signals from the preprocessing section and detects a reference axis in the sub-scanning direction; and a sub-scanning direction reference coordinate setting circuit that receives digital pixel signals from the preprocessing section and detects a reference axis in the sub-scanning direction. a direction reference coordinate setting circuit; a mask pattern circuit that receives digital pixel signals from the preprocessing section to create pattern information of portions to be excluded from dirt detection targets; and a mask pattern circuit that receives digital pixel signals from the preprocessing section to create a mask. For the parts to be detected, a main scanning direction dirt detection circuit having a first judgment circuit that performs a dirt detection process in the main scanning direction while performing mask processing in response to mask information from the mask pattern circuit, and the detection axis conversion circuit. For the part to be masked by receiving digital pixel signals from the mask pattern circuit, the sub-scanning direction dirt detection circuit has a judgment circuit 2 that performs a dirt detection process in the sub-scanning direction while performing masking processing in response to mask information from the mask pattern circuit. a detection processing device comprising a circuit and a comprehensive judgment circuit that receives contamination information from the first and second judgment circuits and makes a comprehensive pass/fail judgment, and based on the comprehensive judgment result,
A sorting and discharging device of the paper cup conveying device is used to separate non-defective products from defective products.

以上の如き自動表面検査装置において、紙カツ
プ搬送装置は、紙カツプの下部をぴつたり受ける
凹部を有するカツプホルダにより紙カツプを保持
するので、紙カツプに強い外力を加えて変形させ
るようなことが全くなく、紙カツプをカツプホル
ダにより検査位置に搬送してそこで自転させるこ
とができる。そして、その際、紙カツプが浮き上
がつたり、自転軸に対して偏心したりすることも
ない。
In the automatic surface inspection device as described above, the paper cup conveying device holds the paper cup using a cup holder having a recess that tightly receives the lower part of the paper cup, so there is no possibility of deforming the paper cup by applying strong external force. Instead, the paper cup can be transported by the cup holder to the inspection position and rotated there. At that time, the paper cup does not lift up or become eccentric with respect to the axis of rotation.

更に、前記カツプホルダに保持された紙カツプ
が、前記割出しテーブルの回転により該割出しテ
ーブルと一緒に公転して検査ステーシヨンに位置
づけられると共に、前記太陽歯車の連続回転によ
り前記遊星歯車を介して前記割出しテーブルの回
転と独立して定速自転させるようになされている
ので、検査位置での紙カツプの自転のための加速
時間が全く不要となり、高速処理が可能となる。
Furthermore, the rotation of the indexing table causes the paper cup held in the cup holder to revolve together with the indexing table and to be positioned at the inspection station, and the continuous rotation of the sun gear causes the paper cup to be positioned at the inspection station via the planetary gears. Since the paper cup is rotated at a constant speed independently of the rotation of the indexing table, there is no need for acceleration time for the rotation of the paper cup at the inspection position, making high-speed processing possible.

更に、本発明による自動表面検査装置の検出処
理装置は、主走査方向と副走査方向の両方におい
て汚れ検出処理しているので、汚れの検出を確実
に行うことができ、更に、走査方向に直角な継目
は汚れとして検出されるのでマスクする必要はあ
るが、平行な継目は汚れとしては検出されないの
で、マスクすることなく処理を行つている。従つ
て、主走査方向と副走査方向の汚れ検出のいずれ
においてもマスクされる部分がなくなるので、両
方向の汚れ検出を総合することにより、マスクさ
れた部分を実質的になくすることができ、汚れを
もれなく検出できる。
Furthermore, since the detection processing device of the automatic surface inspection apparatus according to the present invention performs dirt detection processing in both the main scanning direction and the sub-scanning direction, it is possible to reliably detect dirt. Parallel seams are detected as dirt and therefore need to be masked, but parallel seams are not detected as dirt and are therefore processed without being masked. Therefore, there is no masked part in both the main scanning direction and the sub-scanning direction when detecting dirt, so by integrating the dirt detection in both directions, the masked part can be virtually eliminated and the dirt cannot be detected. can be detected without exception.

本発明による自動表面検査装置の一実施例にお
いては、搬送装置のカツプホルダの底には、その
自転軸の中空室に連通する穴が形成され、該自転
軸の中空室は、真空源に連通して、紙カツプがカ
ツプホルダに確実に吸着保持されるようになされ
ている。そしてまた、前記カツプホルダに受け入
れられた紙カツプを該カツプホルダに押し入れて
適切に位置づけるための押込み機構が設けられて
いる。そして、この紙カツプ押込み機構は、ピス
トンシリンダ装置と、該ピストンシリンダ装置に
より駆動されて上下する押込み円板とを有するよ
うに構成されている。
In one embodiment of the automatic surface inspection device according to the present invention, a hole is formed in the bottom of the cup holder of the conveying device, which communicates with a hollow chamber of the rotating shaft, and the hollow chamber of the rotating shaft communicates with a vacuum source. Thus, the paper cup is reliably held by suction on the cup holder. A pushing mechanism is also provided for pushing and properly positioning a paper cup received in the cup holder. This paper cup pushing mechanism is constructed to include a piston cylinder device and a pushing disk that is driven up and down by the piston cylinder device.

更に、本発明の好ましい実施例においては、搬
送装置は、割出しテーブルの周囲には、少なくと
も供給ステーシヨンと検査ステーシヨンと放出ス
テーシヨンの順で設けられ、前記供給手段は前記
供給ステーシヨンに設けられ、前記カツプホルダ
の底には穴が形成され、該カツプホルダの自転軸
には、前記カツプホルダの底の前記穴に連通し且
つ放射方向に延びる連通孔とを有する中空室が形
成され、前記割出しテーブルには、前記カツプホ
ルダの自転軸を回転自在に保持し且つ前記放射方
向孔を囲む環状チヤンネルを有するボス部材が固
定され、更に、前記割出しテーブルの公転軸に
は、前記環状チヤンネルと連通する孔を有する第
1の環状部材が固定され、そして、該第1の環状
部材の孔と選択的に連通するように該第1の環状
部材側に開放して周方向に延びる中空室が形成さ
れた第2の環状部材が、前記公転軸を回転自在に
受け入れて装置のフレームに固定支持され、前記
第2環状部材の中空室は、供給ステーシヨンと検
査ステーシヨンとに対応するように周方向に広が
りそして真空源に接続された真空室と、放出ステ
ーシヨンとに対応するように周方向に広がりそし
て圧力源に接続された高圧室とに分かれて、紙カ
ツプは、供給ステーシヨンにおいてカツプホルダ
に供給されると、カツプホルダに吸着保持されそ
のあとも検査ステーシヨンまで吸着保持され続
け、そして、放出ステーシヨンに達するとカツプ
ホルダから放出されるようになされている。この
ようにすることにより、紙カツプを確実吸着保持
できまた、放出ステーシヨンで確実に放出でき
る。また、供給ステーシヨンと検査ステーシヨン
との間に押込みステーシヨンを設けて、カツプホ
ルダに吸着保持された紙カツプを該カツプホルダ
に押し入れて適切に位置づけるための押込み機構
をそこに設けて、紙カツプを更に確実にカツプホ
ルダ内に位置づけるようにしてもよい。
Furthermore, in a preferred embodiment of the invention, the conveying device is provided around the indexing table at least in the order of a supply station, an inspection station and a discharge station, the supply means being provided in the supply station, and A hole is formed in the bottom of the cup holder, a hollow chamber having a communication hole communicating with the hole in the bottom of the cup holder and extending in a radial direction is formed in the rotation axis of the cup holder, and the index table is formed with a hole in the rotation axis of the cup holder. , a boss member is fixed that rotatably holds the rotation axis of the cup holder and has an annular channel surrounding the radial hole, and further has a hole communicating with the annular channel on the revolution axis of the indexing table. A second annular member is fixed to the first annular member, and a second annular member is provided with a hollow chamber that is open to the first annular member and extends in the circumferential direction so as to selectively communicate with the hole of the first annular member. An annular member rotatably receives the revolution axis and is fixedly supported by the frame of the apparatus, and a hollow chamber of the second annular member extends in the circumferential direction so as to correspond to the supply station and the inspection station, and a vacuum source. a vacuum chamber connected to the dispensing station and a high-pressure chamber extending circumferentially and connected to a pressure source corresponding to the ejection station. After being suctioned and held, the cup continues to be suctioned and held until it reaches the inspection station, and when it reaches the discharge station, it is discharged from the cup holder. By doing this, the paper cup can be reliably held by suction and can be reliably ejected from the ejection station. Additionally, a pushing station is provided between the supply station and the inspection station, and a pushing mechanism is provided there for pushing the paper cup suctioned and held into the cup holder and positioning it appropriately. It may also be positioned within the cup holder.

また、放出ステーシヨンを、不良品排出ステー
シヨンと良品送出しステーシヨンとに分け、前記
第2の環状部材の前記高圧室を、不良品排出ステ
ーシヨンに対応するように周方向に広がり第1の
弁を介して圧力源に接続された第1高圧室と、良
品送出しステーシヨンに対応するように周方向に
広がり第2の弁を介して圧力源に接続された第2
高圧室とに分けて、前記第1の弁と第2の弁を選
択的に開くことによつて紙カツプを振り分けられ
るようにしてもよい。
In addition, the discharge station is divided into a defective product discharge station and a non-defective product delivery station, and the high pressure chamber of the second annular member is expanded in the circumferential direction so as to correspond to the defective product discharge station and is connected to the first valve. a first high-pressure chamber connected to a pressure source via a second valve, and a second high-pressure chamber extending circumferentially and connected to a pressure source via a second valve so as to correspond to the good product delivery station.
The first valve and the second valve may be selectively opened to separate paper cups into high-pressure chambers, thereby allowing paper cups to be sorted.

更に、本発明による自動表面検査装置の一実施
例においては、表面検出装置の前記照明手段は、
点光源と集光用シリンドリカルレンズとを具備
し、走査方向に細長い領域に光を集中させるよう
になされている。別の実施例にあつては、前記照
明手段は、点光源と集光用の円筒形反射鏡とを具
備し、走査方向に細長い領域に光を集中させるよ
うになされている。更に別の実施例にあつては、
前記照明手段は、棒状光源と、集光用の円形凸レ
ンズとを具備し、走査方向に細長い領域に光を集
中させるようになされている。
Furthermore, in one embodiment of the automatic surface inspection device according to the invention, the illumination means of the surface detection device comprises:
It is equipped with a point light source and a condensing cylindrical lens, and is designed to concentrate light on a narrow and narrow area in the scanning direction. In another embodiment, the illumination means includes a point light source and a cylindrical reflecting mirror for condensing light, and is configured to concentrate the light in an elongated area in the scanning direction. In yet another embodiment,
The illumination means includes a rod-shaped light source and a circular convex lens for condensing light, and is configured to concentrate light on an elongated area in the scanning direction.

また、前記照明手段は、紙カツプの側面継目部
分に陰ができるように前記ラインセンサと紙カツ
プの自転軸とを含む面から外れた位置に置かれて
いる。
Further, the illumination means is placed at a position away from a plane including the line sensor and the rotation axis of the paper cup so as to cast a shadow on the side seam of the paper cup.

更に、本発明による自動表面検査装置において
は、表面検出装置は、紙カツプは斜め上方から撮
像するように配置され、紙カツプの検査面の撮像
用レンズの光軸に対するあおりの方向と反対の方
向に前記ラインセンサの結像面があおられて、被
写界深度が深くなるようになされる。
Further, in the automatic surface inspection device according to the present invention, the surface detection device is arranged so as to image the paper cup from diagonally above, and the surface detection device is arranged so as to image the paper cup from diagonally above. The imaging plane of the line sensor is agitated to deepen the depth of field.

また、紙カツプのエツジや継目の中で主走査方
向に平行で最も検出し易いのは、紙カツプの側面
継目であるので、前記副走査方向基準座標設定回
路は、紙カツプの側面継目を基準軸として検出す
る。そして、本発明の好ましい実施例において
は、前記副走査方向基準座標設定回路は、入力デ
ジタル画素信号を各走査線ごとに合計する回路
と、前記合計値より一定値を差引く基準線強調回
路と、前記基準線強調回路出力の動的平均値を計
算する回路と、前記基準線強調回路出力から動的
平均値を差引く減算器と、前記減算器出力と基準
値を加算する加算器とを具備し、この加算器出力
が0又は負のとき、その走査線を基準線とする。
一方、前記主走査方向基準座標軸設定回路は、各
走査開始後、画像信号が暗を表わす状態から明を
表わす状態に変るときを検出して、紙カツプの上
端エツジと側面底面間継目とをマスク処理させる
ための信号を前記第1の判定回路に出力する。
Furthermore, among the edges and seams of a paper cup, the side seam of the paper cup is the easiest to detect in parallel to the main scanning direction, so the sub-scanning direction reference coordinate setting circuit uses the side seam of the paper cup as the reference Detected as an axis. In a preferred embodiment of the present invention, the sub-scanning direction reference coordinate setting circuit includes a circuit that totals input digital pixel signals for each scanning line, and a reference line emphasis circuit that subtracts a certain value from the total value. , a circuit that calculates a dynamic average value of the output of the reference line emphasis circuit, a subtracter that subtracts the dynamic average value from the output of the reference line emphasis circuit, and an adder that adds the output of the subtracter and the reference value. When the adder output is 0 or negative, the scanning line is used as the reference line.
On the other hand, the main scanning direction reference coordinate axis setting circuit detects when the image signal changes from a dark state to a bright state after each scan starts, and masks the seam between the top edge and the side and bottom surfaces of the paper cup. A signal for processing is output to the first determination circuit.

更にまた、本発明による装置の実施例において
は、前記前処理回路は、デジタル画素信号Eに対
して座標において隣接する上下左右の画素につい
てのデジタル画素信号の和g1を求める第1の加算
器と、デジタル画素信号Eに対して座標において
斜めに隣接する右上、右下、左上、左下の画素に
ついてのデジタル画素信号の和g2を求める第2の
加算器と、選択によりg1又は(g1+g2)/2を周
辺データgとして出力する第1の演算回路と、重
み付け係数Kを与える係数回路と、周辺データg
と重み付け係数Kとデジタル画素信号Eとを受け
て、輪郭強調信号(K+4)−g/Kと平滑化信号 KE+g/K+4を演算する第2の演算回路と、輪郭強調 信号と平滑化信号とを選択的に出力する選択回路
とを具備する輪郭強調兼平滑化回路を有してい
る。
Furthermore, in an embodiment of the device according to the present invention, the preprocessing circuit includes a first adder that calculates the sum g 1 of digital pixel signals for pixels on the upper, lower, left, and right sides that are adjacent to each other in terms of coordinates with respect to the digital pixel signal E. and a second adder that calculates the sum g 2 of the digital pixel signals for the pixels at the upper right, lower right, upper left, and lower left that are diagonally adjacent in coordinates to the digital pixel signal E, and g 1 or (g 1 + g 2 )/2 as peripheral data g, a coefficient circuit that provides weighting coefficient K, and peripheral data g.
a second calculation circuit which receives the weighting coefficient K and the digital pixel signal E and calculates the contour emphasis signal (K+4)-g/K and the smoothed signal KE+g/K+4; and the contour emphasis signal and the smoothed signal. The contour emphasizing and smoothing circuit includes a selection circuit for selectively outputting the output.

更に、本発明の自動表面検出装置の実施例にお
いては、前記主走査方向及び副走査方向の汚れ検
出回路は、入力デジタル画素信号の第1の動的平
均値を求める第1動的平均値回路と、入力信号か
ら前記第1の動的平均値を差引く減算器と、この
減算器出力を十分に深い第1のスレツシヨルドで
スライスして濃度の高い汚れを検出する回路と、
前記減算器出力から第2の動的平均値を求める第
2の動的平均値回路と、この第2の動的平均値を
第1のスレツシヨルドより浅い第2のスレツシヨ
ルドでスライスして濃度の低い汚れの範囲を検出
する回路と、この汚れの範囲を拡大する回路と、
この拡大した範囲を検査区間として前記減算器出
力を十分に浅い第3のスレツシヨルドでスライス
して濃度の低い汚れを検出するように構成した汚
れ情報抽出回路を具備している。
Furthermore, in the embodiment of the automatic surface detection device of the present invention, the dirt detection circuit in the main scanning direction and the sub-scanning direction includes a first dynamic average value circuit for calculating a first dynamic average value of input digital pixel signals. a subtracter that subtracts the first dynamic average value from the input signal; and a circuit that slices the output of the subtracter at a sufficiently deep first threshold to detect highly concentrated dirt.
a second dynamic average value circuit that calculates a second dynamic average value from the subtracter output; and a second dynamic average value circuit that slices the second dynamic average value with a second threshold shallower than the first threshold to obtain a low concentration. A circuit that detects the range of dirt, a circuit that expands the range of dirt,
A dirt information extraction circuit is provided, which is configured to detect low-density dirt by slicing the subtracter output at a sufficiently shallow third threshold using this expanded range as an inspection section.

このような汚れ情報抽出回路を使用することに
より、濃い汚れも淡い汚れも確実に検出できる。
By using such a dirt information extraction circuit, both dark and light dirt can be reliably detected.

また、側面継目の上部折れ曲り部のマスクパタ
ーンは、第1のリフアレンスメモリに蓄えてお
き、前記汚れ検出回路は、紙カツプの走査開始か
ら前記第1のリフアレンスメモリのマスクパター
ンの副走査方向の長さに相当する時間だけで遅れ
て汚れ検出を開始するようにしている。このた
め、上記のマスクパターンを記録するリフアレン
スメモリは、そのマスクパターンをカバーするだ
けの容量ですみ、処理はリアルタイムで行うこと
ができる。
Further, the mask pattern of the upper bent portion of the side seam is stored in a first reference memory, and the dirt detection circuit performs sub-scanning of the mask pattern in the first reference memory from the start of scanning the paper cup. The stain detection is started with a delay of only a time corresponding to the length in the direction. Therefore, the reference memory that records the mask pattern has a capacity that is sufficient to cover the mask pattern, and processing can be performed in real time.

更に、本発明による自動表面検出装置の好まし
い実施例においては、マスクパターンの位置が副
走査方向基準軸によつて決まる検査範囲に対して
は、別に汚れ情報メモリとマスク照合回路を設
け、副走査方向基準軸信号を受けるまでは前記第
1及び第2判定回路からの汚れ情報を前記汚れ情
報メモリに記憶させておき、副走査方向基準軸検
出後は前記第1及び第2の判定回路においてマス
クパターン情報に基づいてマスク処理を行いつつ
汚れ情報の検出を行つて総合判定回路に出力し、
被検査物体の全範囲の走査完了後に前記汚れ情報
メモリ内の汚れ情報とそれに対応するリフアレン
スメモリ内のマスクパターンとを前記マスク照合
回路によつて照合し、該照合回路からの汚れ情報
を総合判定回路に出力する。このようにすれば、
基準軸の検出後に紙カツプを一回転させる必要が
なくなり、紙カツプの表面検出の時間を短縮で
き、更に速い検査をすることができる。そして、
この場合に、前記汚れ情報メモリに記憶された汚
れ情報と、それに対応する前記リフアレンスメモ
リ内のマスクパターンとの照合は、アドレス番号
の高い方から低い方へ順に実行されるようにする
と、簡単な回路構成で処理を行うことができる。
Furthermore, in a preferred embodiment of the automatic surface detection device according to the present invention, a dirt information memory and a mask matching circuit are separately provided for the inspection range where the position of the mask pattern is determined by the sub-scanning direction reference axis, and the sub-scanning direction Until the direction reference axis signal is received, the dirt information from the first and second determination circuits is stored in the dirt information memory, and after the sub-scanning direction reference axis is detected, the dirt information is stored in the first and second determination circuits as a mask. Performs mask processing based on pattern information, detects dirt information, and outputs it to a comprehensive judgment circuit,
After completion of scanning the entire range of the object to be inspected, the dirt information in the dirt information memory and the corresponding mask pattern in the reference memory are compared by the mask matching circuit, and the dirt information from the matching circuit is integrated. Output to the judgment circuit. If you do this,
It is no longer necessary to rotate the paper cup once after detecting the reference axis, and the time required to detect the surface of the paper cup can be shortened, allowing for faster inspection. and,
In this case, it is possible to simplify the comparison between the dirt information stored in the dirt information memory and the corresponding mask pattern in the reference memory by performing it in order from the highest address number to the lowest address number. Processing can be performed with a simple circuit configuration.

以下、添付図面を参照して本発明による自動表
面検査装置の実施例を説明する。第1図は、本発
明による紙カツプ内面を検査するための自動表面
検査装置の斜視図である。この自動表面検査装置
は、紙カツプを受けてそれを検査位置に搬送して
そこで自転させる搬送装置10と、紙カツプの内
面を検出してその検出データを処理して合否を判
定する検出処理装置12とを具備している。そし
て、検出処理装置12は、紙カツプの内面を検出
する表面検出装置14と、その表面検出装置14
からの検出データを処理して微小な欠点の有無を
判別する処理判別装置16とを有している。
Embodiments of an automatic surface inspection apparatus according to the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a perspective view of an automatic surface inspection device for inspecting the inner surface of a paper cup according to the present invention. This automatic surface inspection device includes a conveying device 10 that receives a paper cup, conveys it to an inspection position, and rotates it there, and a detection processing device that detects the inner surface of the paper cup and processes the detected data to determine pass/fail. 12. The detection processing device 12 includes a surface detection device 14 that detects the inner surface of the paper cup;
It has a processing determination device 16 that processes detection data from and determines the presence or absence of minute defects.

搬送装置10を第2図から第4図に示す。第2
図は、搬送装置10の頂面図であり、第3図は、
第2図の一部省略正面図であり、第4図は、第2
図の線−でみた断面図である。
The conveying device 10 is shown in FIGS. 2 to 4. Second
The figure is a top view of the conveyance device 10, and FIG.
Fig. 4 is a partially omitted front view of Fig. 2;
It is a sectional view taken along the line - in the figure.

第3図及び第4図からわかるように、搬送装置
10は、紙カツプ20の外形とほぼ同一形状同一
寸法の内形の凹部を有するカツプホルダ22を有
している。このカツプホルダ22は、紙カツプを
位置ずれ起こすことなくぴつたり保持できる高
さ、例えば紙カツプの少くとも下半分以上を収容
できる高さがあることが好ましい。このカツプホ
ルダ22に紙カツプを保持させれば、カツプホル
ダ22を回転させることにより紙カツプを一緒に
回転させることができる。更に、カツプホルダ2
2の凹部は、紙カツプの外形と同一形状、同一寸
法であるので、カツプホルダの中心を紙カツプの
中心軸と正確に一致させることができ、紙カツプ
をその中心軸を中心に自転させることができる。
As can be seen from FIGS. 3 and 4, the conveying device 10 has a cup holder 22 having a recessed portion having an inner shape that is approximately the same shape and size as the outer shape of the paper cup 20. As shown in FIGS. The cup holder 22 preferably has a height that allows it to tightly hold a paper cup without causing any displacement, for example, a height that accommodates at least the lower half of the paper cup. If this cup holder 22 holds a paper cup, by rotating the cup holder 22, the paper cup can be rotated together. Furthermore, cup holder 2
Since the concave portion 2 has the same shape and dimensions as the outer shape of the paper cup, the center of the cup holder can be accurately aligned with the central axis of the paper cup, and the paper cup can be rotated around its central axis. can.

カツプホルダ22は、第2図に示す如く、円形
の割出しテーブル24の周辺に、等角度間隔で例
えば6個配置される。割出しテーブル24は、搬
送装置10のフレーム26に回転自在に支持され
た回転軸28に固定されている。そして、割出し
テーブル24の周囲には、60度の間隔で6個のボ
ス30が固定され、そのボス30に、軸受32を
介して自転軸34が回転自在に支持されている。
その自転軸34の上端には、フランジ36が形成
されており、そのフランジ36にカツプホルダ2
2がネジ38で固着されている。従つて、カツプ
ホルダ22は、紙カツプの大きさや形状にあわせ
て交換することができる。また、カツプホルダ2
2は、割出しテーブル24の周囲において自転可
能である。
As shown in FIG. 2, for example, six cup holders 22 are arranged around the circular indexing table 24 at equal angular intervals. The indexing table 24 is fixed to a rotating shaft 28 that is rotatably supported by the frame 26 of the conveying device 10. Six bosses 30 are fixed around the indexing table 24 at intervals of 60 degrees, and an autorotation shaft 34 is rotatably supported by the bosses 30 via bearings 32.
A flange 36 is formed at the upper end of the rotation shaft 34, and a cup holder 2 is attached to the flange 36.
2 is fixed with a screw 38. Therefore, the cup holder 22 can be replaced according to the size and shape of the paper cup. In addition, cup holder 2
2 is rotatable around the index table 24.

第2図において、は、供給ステーシヨンであ
り、は、紙カツプを確実にカツプホルダ内に押
し込むための押込みステーシヨンであり、は、
検査ステーシヨンであり、は、予備ステーシヨ
ンであり、は、不良品排出ステーシヨンであ
り、は、送り出しステーシヨンである。従つ
て、割出しテーブルの間欠的回転により検査ステ
ーシヨンに到達したカツプホルダ22は、検出装
置が走査型であるので、そこで自転させる必要が
ある。一方、高速検査のためには、検査ステーシ
ヨンにおいてカツプホルダ22を自転させてから
定速度回転に達するまでの時間は、できる限り少
なくしなければならない。そこで、前述した如
く、検査ステーシヨンの1つ前のステーシヨンに
おいて、カツプホルダに予じめ自転を与えて加速
する方法が考えられる。その一つの手段として、
検査ステーシヨンでカツプホルダ22のフランジ
40の周面に摩擦接触して自転させる摩擦車と同
様なものを検査ステーシヨンの1つの前のステー
シヨンにも設けることが考えられる。しかしなが
らこのような方法は、摩擦部分が消耗して摩擦車
の頻繁な交換が必要となるほか、構造が複雑とな
り、好ましくない。
In FIG. 2, is a feeding station, is a pushing station for firmly pushing the paper cup into the cup holder, and is a
is an inspection station, is a spare station, is a defective product discharge station, and is a delivery station. Therefore, the cup holder 22 that has reached the inspection station due to the intermittent rotation of the indexing table must be rotated there because the detection device is of the scanning type. On the other hand, for high-speed inspection, the time from when the cup holder 22 rotates on its own axis until it reaches constant rotation speed at the inspection station must be minimized as much as possible. Therefore, as described above, a method of accelerating the cup holder by giving it rotation on its own axis in advance at a station one station before the inspection station can be considered. As one means of doing so,
It is conceivable to provide a friction wheel similar to the one in frictional contact with the circumferential surface of the flange 40 of the cup holder 22 to rotate the cup holder 22 at a station preceding one of the inspection stations. However, such a method is not preferable because the friction portion is worn out, requiring frequent replacement of the friction wheel, and the structure becomes complicated.

そこで、本実施例においては、カツプホルダに
遊星歯車42を取付け、その遊星歯車42を第5
図に示す如く位置関係においた太陽歯車44によ
り回転させる。即ち、第4図に示す如く、自転軸
34の下端に遊星歯車42を固定し、その遊星歯
車42と歯合する太陽歯車44を、軸受46を介
して回転軸28に装着する。そして、その太陽歯
車44と一緒に回転する歯車48も軸受46を介
して同じく回転軸28に装着して、太陽歯車44
と歯車48とが、回転軸28に対して回転自在、
即ち、回転軸28から独立して回転できるように
される。そして、歯車48は、フレーム26に回
転自在に支持されている回転軸50に固定された
歯車52に歯合している。かくして、回転軸50
が回転すると、歯車52及び48を介して太陽歯
車44が回転軸28から独立して回転し、更に遊
星歯車42を介してカツプホルダが自転する。
Therefore, in this embodiment, the planetary gear 42 is attached to the cup holder, and the planetary gear 42 is attached to the fifth gear.
It is rotated by a sun gear 44 placed in a positional relationship as shown in the figure. That is, as shown in FIG. 4, a planetary gear 42 is fixed to the lower end of the rotating shaft 34, and a sun gear 44 meshing with the planetary gear 42 is mounted on the rotating shaft 28 via a bearing 46. A gear 48 that rotates together with the sun gear 44 is also attached to the rotating shaft 28 via a bearing 46.
and the gear 48 are rotatable with respect to the rotating shaft 28,
That is, it is made to be able to rotate independently from the rotating shaft 28. The gear 48 meshes with a gear 52 fixed to a rotating shaft 50 rotatably supported by the frame 26. Thus, the rotating shaft 50
When the cup holder rotates, the sun gear 44 rotates independently of the rotating shaft 28 via the gears 52 and 48, and the cup holder rotates on its own axis via the planetary gear 42.

このようにして、太陽歯車を一定速度で回転さ
せるならば、遊星歯車42即ちカツプホルダ22
は、割出しテーブル24の間欠的回転中も定速で
自転しており、そして、割出しテーブル24が静
止するとそのステーシヨンで同じ定速度で自転す
る。なお、割出しテーブル24の間欠的回転の方
向と回転速度が太陽歯車44の回転の方向と回転
速度と同じであるときは、割出しテーブルの回転
時には遊星歯車42即ちカツプホルダ22は割出
しテーブルに対しては回転しないが依然として定
速度で自転していることに変わりなく、割出しテ
ーブルの静止と共にそのステーシヨンで同じ定速
度で自転する。かくして、カツプホルダの自転の
ための加速時間は全く不要となり、高速検査が可
能となる。
In this way, if the sun gear is rotated at a constant speed, the planetary gear 42 or cup holder 22
rotates at a constant speed even during the intermittent rotation of the indexing table 24, and when the indexing table 24 comes to rest, rotates at the same constant speed at that station. Note that when the direction and rotational speed of the intermittent rotation of the indexing table 24 are the same as the rotational direction and rotational speed of the sun gear 44, the planetary gear 42, that is, the cup holder 22, is not connected to the indexing table when the indexing table rotates. Although it does not rotate, it still rotates at a constant speed, and when the indexing table comes to rest, it rotates at the same constant speed at that station. In this way, no acceleration time is required for the rotation of the cup holder, making high-speed inspection possible.

そして、このような搬送装置においては、割出
しテーブルの静止期間中にカツプホルダを少くと
も1回転以上自転させる必要がある。そのため
に、通常、割出しテーブルの回転とカツプホルダ
の自転とに一定の関係をもたせる方法がとられ
る。その一つの手段として、同一駆動源から適当
な歯車比の歯車を介して回転軸28と50を駆動
して、割出しテーブルの静止期間中にカツプホル
ダが必ず1回自転するようにする。この方法によ
れば、駆動源の数を少なくでき、割出しテーブル
とカツプホルダの相互の動作関係も歯車比により
正確に決定でき都合がよい。
In such a conveying device, it is necessary to rotate the cup holder at least one revolution while the indexing table is stationary. To this end, a method is usually used in which the rotation of the indexing table and the rotation of the cup holder have a certain relationship. One means for this is to drive the rotary shafts 28 and 50 from the same drive source through gears with appropriate gear ratios so that the cup holder always rotates once during the period when the indexing table is stationary. According to this method, the number of driving sources can be reduced, and the mutual operational relationship between the indexing table and the cup holder can be accurately determined by the gear ratio, which is convenient.

しかし、検出処理装置12の汚れ検出感度の調
整その他の保守を考慮するならば、割出しテーブ
ルを静止したままでカツプホルダを、実際の検査
時と同一速度で回転させられることが好ましい。
そこで、図示の実施例にあつては、回転軸28
は、間欠駆動のためのカムインデツクス機構53
a、駆動軸53b、減速比可変型の減速機構53
c及びベルト53dを介して交流モータ53eに
結合され、回転軸50は、減速歯車54aを介し
て連続回転用の直流モータ54bに結されてい
る。しかし、同一駆動源で歯車を介して回転軸5
0を駆動しそして別の歯車とクラツチを介して回
転軸28を駆動するようにして、クラツチの解放
によりカツプホルダのみを連続自転できるように
してもよい。
However, when considering adjustment of the dirt detection sensitivity of the detection processing device 12 and other maintenance, it is preferable to be able to rotate the cup holder at the same speed as during actual inspection while keeping the indexing table stationary.
Therefore, in the illustrated embodiment, the rotating shaft 28
is a cam index mechanism 53 for intermittent drive.
a, drive shaft 53b, variable reduction ratio reduction mechanism 53
The rotary shaft 50 is connected to an AC motor 53e via a belt 53d and a reduction gear 54a, and a continuous rotation DC motor 54b. However, with the same drive source, the rotating shaft 5
0 and the rotary shaft 28 through another gear and a clutch, so that only the cup holder can be continuously rotated by releasing the clutch.

供給ステーシヨンの上部には、紙カツプ集積
筒56が配置されている。この紙カツプ集積筒5
6の下部には、4個一組のカツプ供給スクリユー
58が設けられ、それらは、軸60、スプロケツ
ト62及びチエーン64により同期回転させられ
る。更に、1つのカツプ供給スクリユーの軸60
は、スプロケツト66、チエーン68、スプロケ
ツト70及び軸72を介して、割出しテーブルの
動きと同期して駆動されるモータ74により駆動
される。かくして、モータ74の動作によりカツ
プ供給用スクリユー58が4固同期回転して、紙
カツプ集積筒56内の紙カツプの上端フランジ部
(第4図において参照番号76で図示)をスクリ
ユーの谷の部分に巻き込みながら、各紙カツプを
1つ1つ分離して、供給ステーシヨンに停止し
ているカツプホルダ上に供給する。
A paper cup stacking cylinder 56 is arranged at the top of the supply station. This paper cup accumulation tube 5
A set of four cup feed screws 58 are provided at the bottom of the cup 6 and are rotated synchronously by a shaft 60, a sprocket 62 and a chain 64. Furthermore, one cup feeding screw shaft 60
is driven via sprocket 66, chain 68, sprocket 70 and shaft 72 by motor 74 which is driven in synchronization with the movement of the index table. Thus, the cup supplying screw 58 rotates synchronously with four rotations due to the operation of the motor 74, and the upper end flange portion (indicated by reference numeral 76 in FIG. 4) of the paper cup in the paper cup stacking tube 56 is transferred to the valley portion of the screw. While winding up the paper cups, each paper cup is separated one by one and fed onto a cup holder stopped at a feeding station.

カツプ供給用スクリユー58によつてカツプホ
ルダに供給される紙カツプを、確実にカツプホル
ダ内におさめ且つ保持するために、図示の実施例
においては、カツプホルダ側から紙カツプを真空
吸着する。そのために、カツプホルダ22の底に
穴78が形成され、その穴78と連通するように
自転軸34の中心軸部に中空部50が形成され、
更に、その中空部80から放射状に延びる孔82
が形成されている。そして、それら孔82を囲む
ような環状チヤンネル84がボス30に形成さ
れ、その環状チヤンネル84にホース86の一端
が接続されている。そのホース86の他端は、回
転軸28に固定された環状部材88に60度の等角
度間隔であけられた孔90に接続されている。そ
の孔90に面する側に開放した中空室が形成され
たもう1つの環状部材92が軸受94を介して回
転軸28に装着されている。この環状部材92
は、フレーム26に固定されたアーム96の水平
アーム部の先端部に固定されている。そして、環
状部材92の中空室は、第6図に示す如く、供給
ステーシヨン、押込みステーシヨン、検査ス
テーシヨン及び予備ステーシヨンの4つのス
テーシヨンに対応するように周方向に広がる真空
室98と、不良品排出ステーシヨンに対応する
位置にある第1高圧室100と、送出しステーシ
ヨンに対応する位置にある第2高圧室102と
に分けられている。真空室98は、ホース104
を介して真空源(不図示)に接続され、第1高圧
室100は、ホース106と電磁弁108を介し
て圧縮空気源(不図示)に接続され、そして、第
2高圧室102は、ホース109と電磁弁110
を介して同様に圧縮空気源(不図示)に接続され
ている。
In order to ensure that the paper cup fed to the cup holder by the cup feeding screw 58 is received and retained within the cup holder, in the illustrated embodiment, the paper cup is vacuum suctioned from the cup holder side. For this purpose, a hole 78 is formed in the bottom of the cup holder 22, and a hollow portion 50 is formed in the central shaft portion of the rotation shaft 34 so as to communicate with the hole 78.
Furthermore, holes 82 extend radially from the hollow portion 80.
is formed. An annular channel 84 surrounding the holes 82 is formed in the boss 30, and one end of a hose 86 is connected to the annular channel 84. The other end of the hose 86 is connected to holes 90 formed in an annular member 88 fixed to the rotating shaft 28 at equal angular intervals of 60 degrees. Another annular member 92 having an open hollow chamber formed on the side facing the hole 90 is attached to the rotating shaft 28 via a bearing 94 . This annular member 92
is fixed to the tip of a horizontal arm portion of an arm 96 fixed to the frame 26. As shown in FIG. 6, the hollow chamber of the annular member 92 includes a vacuum chamber 98 that extends in the circumferential direction to correspond to four stations: a supply station, a pushing station, an inspection station, and a spare station, and a defective product discharge station. It is divided into a first high pressure chamber 100 located at a position corresponding to the delivery station, and a second high pressure chamber 102 located at a position corresponding to the delivery station. The vacuum chamber 98 is connected to the hose 104
The first high pressure chamber 100 is connected to a compressed air source (not shown) via a hose 106 and a solenoid valve 108, and the second high pressure chamber 102 is connected to a source of compressed air (not shown) via a hose 106 and a solenoid valve 108. 109 and solenoid valve 110
is likewise connected to a source of compressed air (not shown) via.

かくして、自転軸34の中空部80は、自転軸
34が回転していても、孔82を介して環状チヤ
ンネル84に連通しており、そして、ホース86
が接続された環状部材88の孔90は、割出しテ
ーブルの回転に応じて、真空室98と第1及び第
2の高圧室100及び102のいずれかに連通す
る。従つて、カツプホルダが供給ステーシヨン
から予備ステーシヨンまでの間にあるときは、
カツプホルダ内は穴78を介して負圧にされる。
それ故、供給ステーシヨンにおいて、カツプ供
給スクリユー58から供給される紙カツプは、カ
ツプホルダ内に吸引されて、確実に受け入れられ
少くとも不良品排出ステーシヨンまで保持され続
ける。
Thus, the hollow portion 80 of the rotation shaft 34 is in communication with the annular channel 84 via the hole 82 even when the rotation shaft 34 is rotating, and the hollow portion 80 of the rotation shaft 34 is in communication with the annular channel 84 through the hole 82
A hole 90 in the annular member 88 to which the indexing table is connected communicates with the vacuum chamber 98 and either of the first and second high pressure chambers 100 and 102 according to the rotation of the indexing table. Therefore, when the cup holder is between the supply station and the reserve station,
Negative pressure is established in the cup holder through hole 78.
Therefore, at the supply station, paper cups fed from the cup supply screw 58 are drawn into the cup holder to ensure that they are received and retained at least until the reject station.

そのようにカツプホルダ内に入つた紙カツプ
は、次の押し込みステーシヨンにおいて、押込
み機構112によつてカツプホルダ内に押込めら
れる。これは、紙カツプがカツプホルダ内に正し
く密着保持されていないとき、紙カツプを押し込
むことにより紙カツプをカツプホルダ内に正しく
位置づけ密着させるためのものである。従つて、
真空吸引により紙カツプをカツプホルダ内に正し
く位置づけ密着させることができる場合は、押込
み機構はなくともよい。反対に、供給ステーシヨ
ンでは真空吸着せず紙カツプを落下させるだけ
で、押込みステーシヨンで紙カツプを押し込んで
適切な位置に保持させるようにしてもよい。
The paper cup thus placed in the cup holder is pushed into the cup holder by the pushing mechanism 112 at the next pushing station. This is for, when the paper cup is not properly held in close contact with the cup holder, to position the paper cup in the cup holder properly and bring it into close contact by pushing the paper cup. Therefore,
If the paper cup can be properly positioned and brought into close contact with the cup holder by vacuum suction, the pushing mechanism may be omitted. Conversely, the supply station may simply drop the paper cup without vacuum suction, and the push station may push the paper cup into place to hold it in place.

この押込み機構112は、例えば、第7図に示
す如く、ケース114に内容されたピストンシリ
ンダ装置のピストン棒116に三角板118を固
定し、その頂点に押込み円板120を先端に取り
付けた軸122を固定して構成することができ
る。三角板118の残りの2点は、ケース114
の上方フランジ124に固定された案内棒126
に滑動自在に支持されている。従つて、ピストン
シリンダ装置を動作させることにより、押込み円
板が上下して、カツプホルダ内の紙カツプをカツ
プホルダの底まで確実に押し込んで、正しく密着
保持されるようにすることができる。
For example, as shown in FIG. 7, this pushing mechanism 112 has a triangular plate 118 fixed to a piston rod 116 of a piston cylinder device contained in a case 114, and a shaft 122 having a pushing disk 120 attached to its tip. Can be fixed and configured. The remaining two points of the triangular plate 118 are the case 114
A guide rod 126 fixed to the upper flange 124 of the
is slidably supported. Therefore, by operating the piston-cylinder device, the push-in disk moves up and down, and the paper cup in the cup holder can be reliably pushed to the bottom of the cup holder so that it can be properly held in close contact with the paper cup.

押込みステーシヨンを通過した紙カツプは、検
査ステーシヨンで検査され、更に予備ステーシ
ヨンを通過して不良品排出ステーシヨンに到
達する。検査の結果不良品と判断された場合、電
磁弁108が開放されて、第1高圧室100を介
してカツプホルダ22の底部に圧縮空気が導入さ
れ、その結果、紙カツプはカツプホルダ22から
放出され不良品排出ダクト128を通つて排出さ
れる。反対に、検査の結果、良品と判断される
と、紙カツプは、不良品排出ステーシヨンを通
過して、送出しステーシヨンに到達する。割出
しテーブルの休止期間ごとに付勢される電磁弁1
10がそのとき開放されて、第2高圧室102を
介してカツプホルダ22の底部に圧縮空気が導入
され、紙カツプは、カツプホルダ22から送出し
ダクト130を通つて送り出される。
The paper cup that has passed through the push-in station is inspected at an inspection station, and further passes through a preliminary station to reach a defective product discharge station. If the inspection results indicate that the product is defective, the solenoid valve 108 is opened and compressed air is introduced into the bottom of the cup holder 22 through the first high pressure chamber 100, and as a result, the paper cup is ejected from the cup holder 22 and is not defective. The non-defective products are discharged through the discharge duct 128. On the other hand, if the paper cup is determined to be non-defective as a result of the inspection, it passes through the defective product discharge station and reaches the delivery station. Solenoid valve 1 energized every time the indexing table is idle
10 is then opened, compressed air is introduced into the bottom of the cup holder 22 via the second high pressure chamber 102, and the paper cup is delivered from the cup holder 22 through the delivery duct 130.

以上述べてきた搬送装置により検査ステーシヨ
ンに位置づけられた紙カツプが自転している間に
紙カツプの内面を観察するために表面検出装置1
4がある。まず表面検出方法として代表的なもの
は、次の3つがあると考えられる。即ち、工業用
テレビカメラを使用するもの、レーザー光を走査
して反射光を感光手段で検出するもの、そして、
固体撮像素子からなるラインセンサを使用するも
のの3つである。
A surface detection device 1 is used to observe the inner surface of the paper cup while the paper cup positioned on the inspection station is rotating by the conveyance device described above.
There are 4. First, there are three typical surface detection methods as follows. That is, one uses an industrial television camera, one scans laser light and detects the reflected light with photosensitive means, and
Three of them use line sensors made of solid-state image sensors.

工業用テレビカメラを使用する場合は、全体を
一度に検出でき、また従来ある撮像装置を利用で
き、価格的に有利であるといえるが、ビジコン等
の撮像管を利用した場合、残像の問題が生じる。
つまり検査対象の紙カツプが連続的に移動した場
合は、画像信号がボケを含み、実質的に解像力が
低下して細い汚れが検出不可能となる。この残像
の問題を解決するには、光源を閃光キセノンラン
プ等の瞬間的に発光する光源を用いて画像を停止
させるか、又は搬送装置にインデツクス機構を用
い間欠的に搬送移動を行い、紙カツプを検査位置
で静止させて撮像する必要がある。このようにし
た場合、第8A図のように紙カツプ20の中心の
垂直上方よりカメラ132で撮像すると、底は正
面から撮像することになるが、カツプ側面の像は
大きな傾斜で斜め方向から撮像することになり、
側面の汚れに対する検出能力即ち解像力は著しく
低下する。
When using an industrial TV camera, it is possible to detect the entire object at once, and it can be said that it is advantageous in terms of cost because it allows the use of conventional imaging equipment.However, when using an imaging tube such as a vidicon, there is the problem of afterimages. arise.
In other words, if the paper cup to be inspected moves continuously, the image signal will include blur, and the resolution will substantially drop, making it impossible to detect fine stains. To solve this afterimage problem, you can use a light source that emits instantaneous light such as a flash xenon lamp to stop the image, or use an indexing mechanism in the conveyance device to intermittently move the paper cup. It is necessary to keep the object still at the inspection position and take the image. In this case, if the camera 132 takes an image from vertically above the center of the paper cup 20 as shown in FIG. 8A, the bottom will be imaged from the front, but the image of the side of the cup will be taken from a diagonal direction with a large inclination. I decided to do it,
The ability to detect dirt on the side surface, that is, the resolution, is significantly reduced.

この問題は、第8B図のようにカツプ20の中
心軸に対し斜め上方から撮像し、側面に対する画
角を大きく取り、側面での汚れ検出能力が大きく
することにより解決することができる。しかしな
がら、このようにした場合、1つのカメラではカ
ツプの内側側面全体を撮像することはできない。
そこで、カツプの中心軸に対し斜め上方で且つ第
8C図に示すようにカツプの中心軸に対して等角
度に互に隔離された少なくとも3つのカメラ2か
ら撮像することが考えられる。このようなカメラ
配置とすれば、検出能力は向上出来るが、カメラ
を3台使用することになり、映像信号が3種得ら
れるため、信号処理の電気系も同一のものが3台
必要となり、装置全体の構成が大形化する。特に
カツプ上端部のエツジ部分についての信号処理、
側部継目部分についての信号処理、底部−側部間
の継目部分についての信号処理、濃度に関する検
出能力の向上等の高性能が求められると予想され
る回路の複雑化大形化が避けられないと思われる
以上、上記のように同一の信号処理回路が3台必
要となれば、価格が相当なものとなることは予想
に難くない。更に、たとえカメラのカツプの中心
軸に対して斜め方向に配置したとしても、第8D
図に示すようにそのカメラがとらえる視野の中心
部に位置するカツプの内側面部分20Aの両側の
側面部分20Bは、視野の端にいくに従いカメラ
の光軸に対する角度が小さくなり、汚れの検出能
力が大幅に低下してゆくのが避けられない。従つ
て、カツプ全体に対して検出能力を一定すること
はできない。
This problem can be solved by taking an image from diagonally above the central axis of the cup 20, as shown in FIG. 8B, by increasing the angle of view with respect to the sides, and by increasing the ability to detect dirt on the sides. However, in this case, one camera cannot image the entire inner side of the cup.
Therefore, it is conceivable to take images from at least three cameras 2 diagonally above the central axis of the cup and spaced apart from each other at equal angles with respect to the central axis of the cup, as shown in FIG. 8C. With this camera arrangement, the detection ability can be improved, but since three cameras are used and three types of video signals are obtained, three of the same signal processing electrical systems are required. The overall configuration of the device becomes larger. Signal processing, especially for the edge part at the top of the cup.
It is expected that high performance will be required, such as signal processing for the side joint, signal processing for the joint between the bottom and sides, and improved concentration detection ability, making it inevitable that the circuit will become more complex and larger. Given this, it is not hard to predict that if three identical signal processing circuits are required as described above, the cost will be considerable. Furthermore, even if the camera cup is disposed obliquely to the center axis, the 8th D.
As shown in the figure, the inner surface portion 20A of the cup located at the center of the field of view captured by the camera and the side surface portions 20B on both sides of the cup become smaller in angle with respect to the optical axis of the camera toward the edge of the field of view, and the dirt detection ability is It is inevitable that there will be a significant decline in Therefore, the detection ability cannot be made constant for the entire cup.

レーザーを使用した方法、例えばフライングス
ポツト方式では、レーザービームを細く絞り、カ
ツプを自転させながらカツプ内面をそのレーザー
ビーム上下に走査して、カツプ内面全体を走査
し、その反射光のレベルから汚れの有無、程度を
検出判別することが考えられる。このようなレー
ザ方式は、カツプを検出位置で自転させる装置が
必要であるが、信号処理回路が一系統で足り、カ
ツプの自転方向には検出能力のムラがない等、工
業用テレビカメラを使用する場合より優れてい
る。
In the method using a laser, for example, the flying spot method, the laser beam is narrowed down and the inside of the cup is scanned up and down while the cup rotates, scanning the entire inside of the cup and detecting dirt based on the level of reflected light. It is conceivable to detect and determine the presence and extent. This type of laser method requires a device to rotate the cup at the detection position, but one signal processing circuit is sufficient, and there is no uneven detection ability in the direction of rotation of the cup, so an industrial television camera is used. It's better if you do.

しかしながら、レーザーを使用する方法は、次
のような欠点がある。第1は、光学走査のために
振動ミラー、回転ミラー等の機械振動系が必要と
なるが、それらの調整寿命等に問題があることで
ある。第2は、レーザー光は単色光のためある種
の色の汚れが検出不可能となることである。第3
は、レーザー光源自身の寿命が比較的短いことで
ある。第4は、レーザー方式の場合検出信号とそ
の検出された紙カツプ内面上の位置との関係を正
確に決定することが困難であるため、画素間の位
置関係を利用した処理が難かしいことである。
However, the method using a laser has the following drawbacks. First, mechanical vibration systems such as vibrating mirrors and rotating mirrors are required for optical scanning, but there are problems with their adjustment life. Second, since laser light is monochromatic, certain colored stains cannot be detected. Third
The main reason is that the laser light source itself has a relatively short lifetime. Fourth, in the case of the laser method, it is difficult to accurately determine the relationship between the detection signal and its detected position on the inner surface of the paper cup, making it difficult to process using the positional relationship between pixels. be.

そこで、CCDやBBD等の固体撮像素子からな
るラインセンサを考えてみる。このような一次元
固体撮像素子を、前述の如きレーザービームの走
査方向に沿つて配置するならば、(1)光学系に可動
部分が無くなり、(2)光源のランプ以外は固体素子
で構成でき寿命が長く、性能の経時変化が少なく
安定化を図れ、(3)検出に用いる光の波長範囲が広
いため特定の波長に関し検出が不可能となること
はなく、(4)各画素の位置関係が明確なために紙カ
ツプの継目等の不感帯等の処理が正確に行え、不
感帯の幅を小さくできる、等の利点が考えられ
る。
Therefore, let's consider a line sensor consisting of a solid-state image sensor such as a CCD or BBD. If such a one-dimensional solid-state image sensor is arranged along the scanning direction of the laser beam as described above, (1) there will be no moving parts in the optical system, and (2) everything except the light source lamp can be constructed from solid-state elements. (3) The wavelength range of the light used for detection is wide, so detection of specific wavelengths is not impossible, (4) The positional relationship of each pixel is Since this is clear, dead zones such as seams of paper cups can be treated accurately, and the width of the dead zones can be reduced, among other advantages.

それ故、表面検出装置14には、固体撮像素子
からなるラインセンサを使用する。
Therefore, a line sensor consisting of a solid-state image sensor is used as the surface detection device 14.

そして、ラインセンサにより、紙カツプが1回
自転する間に紙カツプの内面全てを検査するため
には、第9A図に示す如く、ラインセンサ134
と対物レンズ136とを含むカメラ138を、検
査ステーシヨンに位置する紙カツプ20の斜上方
から、紙カツプの自転軸140が通る紙カツプの
底の点140Aと紙カツプのカメラから遠い側の
上端142とをを視野に含むように俯瞰する角度
と位置に配置する。そして更に、カメラ138内
のラインセンサ134は、第9B図に示す如く、
ラインセンサ134の長手軸と紙カツプの自転軸
140とを含む面142が紙カツプの側面に対し
て直角にあるように位置させる。このような配置
により、第8B図に関連して述べた如くカツプの
自転により、ラインセンサ134は紙カツプの内
面全体を撮像でき、且つ側面の汚れに対する検出
能力を高めることができる。第9A図に示す如
く、カメラの光軸146と直角な面と紙カツプの
側面及び底面のなす角度をそれぞれγ及びδとす
ると、側面及び底面の分解能は、被検査面が光軸
に直角にある場合に比べてcos γ及びcos δの割
で低下するのは避けられない。この場合、紙カツ
プの側面及び底面に対する分解能を同等にするに
は、γ=δとするようにカメラを位置づける。し
かしながら、紙カツプを自転させながら紙カツプ
の側面と底面とを軸方向に走査する場合、底面は
側面より走査線密度は高くなる。従つて、紙カツ
プの側面及び底面に対する汚れの検出能力を実質
的に等しくするには、δをγより多少大きくする
と良い。
In order to inspect the entire inner surface of the paper cup while the paper cup rotates once, the line sensor 134 is used as shown in FIG. 9A.
A camera 138 including a camera 138 and an objective lens 136 is aimed from diagonally above the paper cup 20 located at the inspection station, at a point 140A at the bottom of the paper cup through which the rotation axis 140 of the paper cup passes, and at an upper end 142 of the paper cup on the side far from the camera. Place the camera at an angle and position that provides a bird's-eye view. Furthermore, as shown in FIG. 9B, the line sensor 134 in the camera 138 is
The line sensor 134 is positioned so that a plane 142 including the longitudinal axis of the paper cup and the rotation axis 140 of the paper cup is perpendicular to the side surface of the paper cup. With this arrangement, as described in connection with FIG. 8B, the line sensor 134 can image the entire inner surface of the paper cup due to the rotation of the cup, and can improve the ability to detect dirt on the side surface. As shown in FIG. 9A, if the angles formed by the surface perpendicular to the optical axis 146 of the camera and the side and bottom surfaces of the paper cup are γ and δ, respectively, then the resolution of the side and bottom surfaces is calculated as follows: It is inevitable that cos γ and cos δ will be lower than in a certain case. In this case, in order to equalize the resolution for the side and bottom surfaces of the paper cup, the camera is positioned so that γ=δ. However, when the side and bottom surfaces of the paper cup are scanned in the axial direction while the paper cup is rotating, the scanning line density on the bottom surface is higher than on the side surface. Therefore, in order to substantially equalize the ability to detect dirt on the side and bottom surfaces of a paper cup, it is preferable to make δ somewhat larger than γ.

しかし、いずれにしても、紙カツプの側面と底
面とがなす角度は、直角かまたはそれより多少大
きな角度に過ぎないので、紙カツプを斜め上方か
らラインセンサで検出しても、角度γ及びδは、
45度前後とならざるを得ない。従つて、被検査面
がカメラの光軸146に対して直角である場合に
比べて分解能の低下は避けられない。そこで、そ
のような分解能の低下は、例えばラインセンサの
素子数の増大で補う。被検査面がカメラの光軸に
直交している時と同等の分解能を得るには、被検
査面がカメラの光軸に直交しているときのライン
センサの素子数の少くとも、√2倍の素子数が必
要である。
However, in any case, the angle between the side surface and the bottom surface of the paper cup is only a right angle or a slightly larger angle. teeth,
It has to be around 45 degrees. Therefore, a reduction in resolution is inevitable compared to the case where the surface to be inspected is perpendicular to the optical axis 146 of the camera. Therefore, such a decrease in resolution is compensated for by increasing the number of elements in the line sensor, for example. To obtain the same resolution as when the surface to be inspected is perpendicular to the optical axis of the camera, the number of elements in the line sensor when the surface to be inspected is perpendicular to the optical axis of the camera must be at least √2 times. The number of elements is required.

ここでラインセンサによる分解能を考えるなら
ば、ラインセンサの素子数が主走査方向の分解能
を決定し、紙カツプの自転速度とラインセンサの
走査周期が、副走査方向の分解能を決定する。実
施例においては、紙カツプを0.25秒で自転させ
て、素子数1024のラインセンサを主走査周波数
5.5KHzで駆動して、普通の紙カツプの場合主走
査方向及び副走査方向共0.1mm/ビツトから0.3
mm/ビツトの解像度が得られた。このとき得られ
る画像情報の周波数は約6MHzとなり、画像情報
は約167ns/ビツトの高速で出力されるが、これ
らの速度は十分処理できるものである。
If we consider the resolution of the line sensor here, the number of elements in the line sensor determines the resolution in the main scanning direction, and the rotation speed of the paper cup and the scanning period of the line sensor determine the resolution in the sub-scanning direction. In the example, a paper cup is rotated in 0.25 seconds, and a line sensor with 1024 elements is set at the main scanning frequency.
Driven at 5.5KHz, for ordinary paper cups, the speed ranges from 0.1mm/bit to 0.3mm/bit in both the main and sub-scanning directions.
A resolution of mm/bit was obtained. The frequency of the image information obtained at this time is about 6 MHz, and the image information is output at a high speed of about 167 ns/bit, which can be processed sufficiently.

しかし、カメラの光軸に対して紙カツプの検査
される側面も底面も傾斜しているので、これらの
面の像をラインセンサ上にぼけを生じることなく
結像させるには、第9A図に示す如く、被写界深
度Dが必要とされる。この被写界深度Dは、紙カ
ツプの深さとカメラの光軸の紙カツプに対する傾
斜とによつて必要とされる深度が変化するが、い
ずれにしても相当な深度が求められることに変り
はないであろう。そして、被写界深度Dは、カメ
ラのカツプからの距離、使用レンズの焦点距離、
絞り値によつて変わり、被写界深度Dを長くする
には、焦点距離の長いレンズを深く絞つて使用す
る必要がある。しかしながら、絞りの深さにより
十分な被写界深度を得るには、絞りをあたかもピ
ンホールカメラのピンホールのように絞らねばな
らず、必要な光量が極めて大きくなり、実際的で
ない。反面、通常の絞り値の場合、通常の大きさ
の形状の紙カツプを斜め上方から撮像するとする
と、必要な被写界深度は±40mmとなる。しかし、
カメラは紙カツプから1mに満たない比較的近い
距離に位置づけざるを得ないので、そのような被
写界深度を可能とする極めて焦点距離の長い、例
えば数mのレンズを使用することはできない。従
つて、絞り値とレンズの選択とによつて被写界深
度の問題を解決することはできない。反対に、必
要光量を抑えるためには絞りはできる限り開いた
方がよい。そこで、小さな絞り値で即ち絞を開い
て且つ被写界深度を大きくとれるように、第10
図に示す如く、レンズ136に対する紙カツプの
検査面148の傾斜方向即ちあおり方向と反対の
方向に、ラインセンサの受光面150をあおる。
However, since both the side and bottom surfaces of the paper cup to be inspected are inclined with respect to the optical axis of the camera, in order to form images of these surfaces on the line sensor without blurring, the method shown in Figure 9A is required. As shown, a depth of field D is required. The required depth of field D varies depending on the depth of the paper cup and the inclination of the camera's optical axis relative to the paper cup, but in any case, a considerable depth is required. Probably not. The depth of field D is determined by the distance from the camera's cup, the focal length of the lens used,
It varies depending on the aperture value, and in order to increase the depth of field D, it is necessary to use a lens with a long focal length and stop the aperture deeply. However, in order to obtain a sufficient depth of field by adjusting the depth of the aperture, the aperture must be narrowed down like a pinhole in a pinhole camera, which requires an extremely large amount of light, which is impractical. On the other hand, in the case of a normal aperture value, if an image of a paper cup of normal size is to be imaged from diagonally above, the required depth of field is ±40 mm. but,
Since the camera has to be positioned at a relatively close distance of less than 1 meter from the paper cup, it is not possible to use a lens with a very long focal length, for example several meters, which would enable such depth of field. Therefore, the problem of depth of field cannot be solved by aperture value and lens selection. On the other hand, in order to reduce the amount of light required, it is better to open the aperture as much as possible. Therefore, in order to be able to open the aperture and obtain a large depth of field with a small aperture value,
As shown in the figure, the light-receiving surface 150 of the line sensor is tilted in a direction opposite to the tilting direction, that is, tilting direction, of the inspection surface 148 of the paper cup relative to the lens 136.

今、レンズ136の焦点距離をfとすると、光
軸146上での倍率がMとなるようにするには、
光軸146と検査面148との交点Oをレンズの
前主点Hからf+f/Mに位置させる。このと
き、光軸上の結像点O′は、レンズの後主点H′か
らf+(f×M)に位置する。そこで、受光面1
50は、その結像点O′を通るように配置する。
この状態において、検査面148とレンズ136
の前主面とのなす角がβであれば、受光面150
は、受光面150とレンズ136の後主面とのな
る角αが、tan α=Mtanβを満足するようにあ
おる。これにより、ピンボケがなく結像させるこ
とができる。このとき検査面148のレンズ13
6から最も遠い点Pの像が形成される受光面15
0上の点P′での倍率は、 M/1+M/f×PQ×sinβ となり、検査面148のレンズ136に最も近い
点Qの像が形成される受光面150上の点Q′で
の倍率は、 M/1−M/f×OQ×sinβ となる。このように検査面上の場所により倍率が
多少異なることとなり、これが歪となるが、これ
は汚れ検査にとつて何らの支障にはならない。表
面検査の目的は、表面の汚れや傷の有無の判別で
あり、汚れや傷の大きさを正確に知る必要はな
い。従つて、汚れや傷の存在を検出できれば足
り、倍率の多少の違いは問題とならない。なお、
倍率の違いの問題を解決するには、結像面150
の素子の密度をP′に向うに従い高めればよい。ま
た、検査面148を、紙カツプの側面又は底面の
いずれにあわせてもよいが、走査方向長の長い方
にあわせるのが好ましい。しかし、結果的には紙
カツプの側面及び底面のいずれかが第10図の検
査面148から外れるが、それはほとんど問題に
はならない。
Now, if the focal length of the lens 136 is f, then in order to make the magnification on the optical axis 146 M,
The intersection O between the optical axis 146 and the inspection surface 148 is located at f+f/M from the front principal point H of the lens. At this time, the imaging point O' on the optical axis is located f+(f×M) from the rear principal point H' of the lens. Therefore, the light receiving surface 1
50 is arranged so as to pass through the imaging point O'.
In this state, the inspection surface 148 and the lens 136
If the angle formed with the front principal surface of is β, then the light receiving surface 150
is adjusted so that the angle α between the light receiving surface 150 and the rear principal surface of the lens 136 satisfies tan α=Mtan β. Thereby, it is possible to form an image without being out of focus. At this time, the lens 13 on the inspection surface 148
A light receiving surface 15 on which an image of the point P farthest from 6 is formed.
The magnification at point P' on 0 is M/1 + M/f x PQ x sinβ, which is the magnification at point Q' on light receiving surface 150 where the image of point Q closest to lens 136 on inspection surface 148 is formed. is M/1-M/f×OQ×sinβ. In this way, the magnification varies somewhat depending on the location on the inspection surface, which causes distortion, but this does not pose any problem in stain inspection. The purpose of surface inspection is to determine the presence or absence of dirt or scratches on the surface, and it is not necessary to know the exact size of the dirt or scratches. Therefore, it is sufficient to detect the presence of dirt or scratches, and a slight difference in magnification does not matter. In addition,
To solve the problem of difference in magnification, the imaging plane 150
It is sufficient to increase the density of elements toward P'. Further, the inspection surface 148 may be aligned with either the side surface or the bottom surface of the paper cup, but it is preferable to align it with the longer one in the scanning direction. However, as a result, either the side surface or the bottom surface of the paper cup will come off the inspection surface 148 in FIG. 10, but this will hardly be a problem.

このようにして、紙カツプの内面をピンボケを
生じることなく検出できる。そして、人間の目で
見て汚れと感じるものをラインセンサにより同様
に検出できるようにするには、センサの分光感度
スペクトルを人間の目の視感度スペクトルにでき
る限り近づけることが好ましい。しかし、センサ
の分光感度スペクトルは、光電変換素子により決
まつている。その代り照明光のスペクトルは変え
ることが可能である。そこで、光源としてハロゲ
ンランプやタングステンランプ等の色温度が
2500゜Kから3200゜Kのものを使用し、適当なフイ
ルタを介して照明し、センサの分光感度スペクト
ルの内の人間の視感度スペクトルに比べてレベル
の低い波長の光成分の割合を自然光スペクトルに
おけるその割合に比べて高くなるようにする。
In this way, the inner surface of the paper cup can be detected without being out of focus. In order to enable the line sensor to similarly detect what the human eye perceives as dirt, it is preferable to make the spectral sensitivity spectrum of the sensor as close as possible to the visibility spectrum of the human eye. However, the spectral sensitivity spectrum of the sensor is determined by the photoelectric conversion element. Instead, the spectrum of the illumination light can be varied. Therefore, as a light source, the color temperature of halogen lamps, tungsten lamps, etc.
A light source of 2500°K to 3200°K is used, illuminated through an appropriate filter, and the proportion of light components with wavelengths that are lower than the human visual sensitivity spectrum within the spectral sensitivity spectrum of the sensor is calculated from the natural light spectrum. The ratio should be higher than that in

以上のようにして紙カツプ内面を検出すると
き、検出される紙カツプ内面部分に明るさにむら
があつてはならない。そこで、カメラ138と同
一方向から照明することが好ましい。一方、後述
する検出データの処理のために紙カツプの継目の
位置を検出しておく必要がある。そのために、継
目部分に陰ができるようにカメラの光軸から離れ
た位置から光を当てる。例えば、第11図に示す
如く、カメラの光軸146に対して紙カツプの継
目部分152においてカメラ側に位置するシート
154の側から光が当たるように照明する。この
時の光軸146と照明光とのなる角度をθとし
て、シート154の厚さとtとしたとき、陰の幅
xはt・tanθで表わされる。そして、継目の陰が
ラインセンサに十分検出されるようにするには、
ラインセンサ上での継目の陰の像の幅が、ライン
センサの検出領域の幅の少くとも2倍あることが
好ましい。このようにすれば、確実に継目の陰と
ラインセンサが検出することができる。
When detecting the inner surface of a paper cup as described above, there must be no unevenness in brightness on the detected inner surface of the paper cup. Therefore, it is preferable to illuminate from the same direction as the camera 138. On the other hand, it is necessary to detect the position of the seam of the paper cup in order to process the detection data, which will be described later. To do this, light is applied from a position away from the camera's optical axis so that the seam is shaded. For example, as shown in FIG. 11, the light is illuminated so that the sheet 154 located on the camera side is illuminated at the seam 152 of the paper cup with respect to the optical axis 146 of the camera. When the angle between the optical axis 146 and the illumination light at this time is θ, and the thickness of the sheet 154 is t, the width x of the shadow is expressed as t·tanθ. In order to ensure that the line sensor can sufficiently detect the shadow of the seam,
Preferably, the width of the shadow image of the seam on the line sensor is at least twice the width of the detection area of the line sensor. In this way, the line sensor can reliably detect the shadow of the seam.

そして、光源の光度は、レンズの明るさ、絞
り、ラインセンサの感度、光源と被写体との距
離、被写体とラインセンサとの距離、ラインセン
サの各光電素子の走査間隔等から決められる。ラ
インセンサが画像処理に必要なレベルの検出信号
を出力するようにするには、1個のカツプ当りの
検出時間を0.25秒とすると、カツプ内面の照度は
25〜35万ルツクス程度必要である。また、照明に
むらがあると、いわゆるシエーデングと同様な状
態となり、暗い部分における検出精度が悪くな
る。特に、側面と底面とは、同一平面にはないの
で、同一方向のみからの照明では、側面と底面で
明るさに差が生じる。そこで、例えば、第9A図
の場合と同様に、側面と底面とのなす角度の2等
分線と平行に照明の中心軸が位置するように紙カ
ツプを斜め上方から照明する。いずれにしても、
検査対象の紙カツプには、大小があり、高さと直
径の割合の異なるものもあるので、それぞれのカ
ツプに応じて照明の方向を決める。
The luminous intensity of the light source is determined from the brightness of the lens, the aperture, the sensitivity of the line sensor, the distance between the light source and the subject, the distance between the subject and the line sensor, the scanning interval of each photoelectric element of the line sensor, etc. In order for the line sensor to output a detection signal at the level required for image processing, if the detection time per cup is 0.25 seconds, the illuminance on the inside of the cup is
Approximately 250,000 to 350,000 Lutx is required. Furthermore, if the illumination is uneven, a state similar to so-called shading occurs, and detection accuracy in dark areas deteriorates. In particular, since the side surfaces and the bottom surface are not on the same plane, illumination from only the same direction causes a difference in brightness between the side surface and the bottom surface. For example, as in the case of FIG. 9A, the paper cup is illuminated obliquely from above so that the central axis of illumination is positioned parallel to the bisector of the angle formed by the side surface and the bottom surface. In any case,
Paper cups to be inspected come in various sizes, and some have different ratios of height and diameter, so the direction of illumination is determined depending on each cup.

また、ラインセンサの撮像範囲は縦長である。
従つて、その縦長の撮像範囲を均一に照明できる
方向から集中的に照明すれば効率的である。
Furthermore, the imaging range of the line sensor is vertically long.
Therefore, it is efficient to intensively illuminate the vertically elongated imaging range from a direction that can uniformly illuminate the area.

そこで、例えば、第12A図に示す如く数キロ
ワツトの点光源156からの光をシリンドリカル
凸レンズ158で集光して楕円形の領域160を
照明する。または、第12B図に示す如く、点光
源156からの光を球面凸レンズ162で集光し
たあと円柱面状の反射面164で反射する。この
場合も、楕円形の領域160が照明される。更に
また、数キロワツトの複写機用ハロゲンランプの
ような棒状光源166からの光を球面凸レンズ1
62で集光して、照明面をレンズの焦点近くにお
く。この場合も、楕円領域160が照明できる。
For example, as shown in FIG. 12A, light from a point light source 156 of several kilowatts is focused by a cylindrical convex lens 158 to illuminate an elliptical area 160. Alternatively, as shown in FIG. 12B, light from a point light source 156 is focused by a spherical convex lens 162 and then reflected by a cylindrical reflecting surface 164. Again, an elliptical area 160 is illuminated. Furthermore, light from a rod-shaped light source 166 such as a halogen lamp for a copying machine of several kilowatts is passed through a spherical convex lens 1.
The light is focused at 62 and the illumination surface is placed near the focal point of the lens. In this case as well, the elliptical area 160 can be illuminated.

なお、図示の実施例においては、第12B図の
方式を採用して、第1図に示す処理判別装置16
内に点光源156と球面凸レンズ162を配置
し、それからの光を穴168を通して外に出し、
カバーの傾斜面170に取付けられた円柱面状の
反射面によつて、搬送装置10の検査ステーシヨ
ンに位置する紙カツプを照明している。かくし
て、検査ステーシヨンにおいて紙カツプが自転す
る間に、ラインセンサから構成される表面検査装
置14は、紙カツプの内面を検査する。
In the illustrated embodiment, the method shown in FIG. 12B is adopted, and the process discriminating device 16 shown in FIG.
A point light source 156 and a spherical convex lens 162 are arranged inside, and the light from them is emitted outside through a hole 168.
A cylindrical reflective surface attached to the inclined surface 170 of the cover illuminates the paper cup located at the inspection station of the transport device 10. Thus, while the paper cup rotates on its axis at the inspection station, the surface inspection device 14, which is comprised of a line sensor, inspects the inner surface of the paper cup.

なお、カラーで被検査体を識別することが好ま
しい場合は、公知の方法によりR・C・B又は
Y・I・Qの画像信号を得ればよく、それは当業
者には容易であろう。
If it is preferable to identify the object to be inspected in color, it is sufficient to obtain R.C.B or Y.I.Q image signals by a known method, which would be easy for those skilled in the art.

このようにして検出された紙カツプの内面のデ
ータは、第13図のブロツク図に示すような処理
判別装置16により処理され、汚れの有無が判別
される。
The data on the inner surface of the paper cup detected in this way is processed by a processing determining device 16 as shown in the block diagram of FIG. 13, and the presence or absence of dirt is determined.

ここで紙カツプの内面を考えるならば、前述し
た如く、第14A図に示すように紙カツプ20の
上端エツジ172、フランジ174、側部継目部
分176、側部底部間継目178、容易に剥離で
きる金属箔で塞がれた穴180等があり、検出デ
ータに基づく処理判別のときそれらを汚れと誤判
定しないように、それらの部分に相当する検出デ
ータに対しては不感帯処理をする必要がある。そ
して、その不感帯の幅は、光学系の振動、紙カツ
プの位置のずれ、自転時の偏心等を皆無にできな
い以上、余裕をみて広くとる必要がある。しか
し、そのような広い不感帯を設けてデータ処理を
行うと、継目部分等に近い所に汚れがあつても、
不感帯に含まれて検出されない可能性が大きい。
If we consider the inner surface of the paper cup, as described above, as shown in FIG. There are holes 180 etc. that are covered with metal foil, and in order to avoid misjudging them as dirt when processing is determined based on the detection data, it is necessary to perform dead zone processing on the detection data corresponding to those parts. . The width of the dead zone needs to be wide enough to allow for vibrations of the optical system, misalignment of the paper cup, eccentricity during rotation, etc., which cannot be completely eliminated. However, if data processing is performed with such a wide dead zone, even if there is dirt near the joint,
There is a high possibility that it will be included in the dead zone and will not be detected.

具体的に考えるために、第14A図に示すよう
な紙カツプに対して単純な不感帯処理を行う場合
の不感帯を第14B図に示す。第14B図の展開
図は、紙カツプの中心軸が自転軸から少しずれて
いるためにエツジ72や継目178が多少波打つ
ている場合を示している。
To consider this more specifically, FIG. 14B shows a dead zone when a simple dead zone process is performed on a paper cup as shown in FIG. 14A. The developed view of FIG. 14B shows a case where the center axis of the paper cup is slightly deviated from the axis of rotation, so that the edges 72 and seams 178 are somewhat wavy.

視野に対して上端エツジ部分172は、汚れが
なくとも、暗部と明部との境であり、誤判定する
可能性がある。また、カツプ上端フランジ174
(カール部分又はカール部分を押圧して平らにさ
れた部分)は、加工上表面に凹凸が多く、側面に
対する場合と同程度で汚れ検出をした場合、それ
ら凹凸が汚れと誤判定される。従つて、上端エツ
ジとフランジとを含む不感帯172Dを設ける必
要がある。同様に、側部と底部との継目178に
対しても、比較的幅の広い不感帯178Dを設け
る必要がある。更に、底の穴180に対しても不
感帯を設ける必要がある。この底の穴180は、
検査開始位置に対してランダムな位置にあるの
で、穴180が出現する可能性がある部分を全て
カバーする不感帯180Dを設ける。
Even if the upper edge portion 172 in the field of view is clean, it is the boundary between the dark and bright areas, and there is a possibility of misjudgment. Additionally, the cup upper end flange 174
(A curled part or a part made flat by pressing a curled part) has many irregularities on the surface due to processing, and when stains are detected at the same level as for the side surface, these irregularities are incorrectly determined to be stains. Therefore, it is necessary to provide a dead zone 172D that includes the upper edge and the flange. Similarly, it is necessary to provide a relatively wide dead zone 178D at the joint 178 between the side and bottom portions. Furthermore, it is necessary to provide a dead zone for the bottom hole 180 as well. This bottom hole 180 is
Since the dead zone 180D is located at a random position with respect to the inspection start position, a dead zone 180D is provided that covers all parts where the hole 180 may appear.

このような不感帯処理をしたのでは、検出デー
タの相当部分が不感帯処理される結果となり、汚
れを見逃す可能性が高い。更に、側面の継目17
6に対しても不感帯176Dを設けて不感帯処理
をする必要であるが、前述した如く、従来、側面
継目に対する有効な不感帯処理方法がなかつた。
そのため、紙カツプの内面検査の自動処理は、今
まで実用化されなかつた。
If such dead zone processing is performed, a considerable portion of the detected data will be subjected to dead zone processing, and there is a high possibility that dirt will be overlooked. Furthermore, the side seam 17
It is also necessary to provide a dead zone 176D for the side seam 6 to perform dead zone treatment, but as described above, there has been no effective dead zone treatment method for side seams.
Therefore, automatic processing for inspecting the inner surface of paper cups has not been put to practical use until now.

処理判定装置16は、その問題を解決して確実
な汚れ検査を可能としたものである。
The processing determination device 16 solves this problem and makes reliable stain inspection possible.

処理判定装置16は、主走査方向(ラインセン
サ走査方向)と副走査方向(紙カツプの自転方
向)の両方においてそれぞれ汚れ検出を行う。そ
して、上端エツジ、フランジ、側部継目、側部底
部間継目等の如く方向性のあるものに対する不感
帯処理は、主走査方向及び副走査方向のいずれか
一方のみの汚れ検出において行い、必ずいずれか
一方の走査方向の汚れ検出においては不感帯処理
されないようにして、完全な不感帯が存在しない
ようにする。また、主走査方向と副走査方向との
両方で汚れ検出を実施するので、側部継目に対し
ても不感帯処理を行うことができる。なお、底の
穴については、側部継目との位置関係がほぼ一定
していることに着目して、継目を検出してその継
目と一定位置にある底部の部分のみをマスクし
て、不必要な部分に対してまでも不感帯処理しな
いようにすると好ましい。
The processing determination device 16 performs dirt detection in both the main scanning direction (line sensor scanning direction) and the sub-scanning direction (rotation direction of the paper cup). Dead zone processing for directional objects such as top edges, flanges, side seams, side bottom seams, etc. is performed when contamination is detected only in either the main scanning direction or the sub-scanning direction. In stain detection in one scanning direction, dead zone processing is not performed so that no dead zone exists. Furthermore, since stain detection is performed in both the main scanning direction and the sub-scanning direction, dead zone processing can also be performed on the side seams. Regarding the hole at the bottom, focusing on the fact that the positional relationship with the side seam is almost constant, the seam is detected and only the part of the bottom that is at a certain position with the seam is masked. It is preferable not to perform dead zone processing even on the most sensitive parts.

紙カツプの中心軸が自転軸から偏心している
と、各主走査ごとに紙カツプの上端エツジを示す
画像信号のアドレス(例えばラインセンサの素子
の端から数えたアドレス番号)は変化する。従つ
て、上端エツジを不感帯処理するに当り、画像信
号のアドレスを基準とすると不感帯を広くとらね
ばならない。そこで、不感帯を最小とするため
に、各走査開始後に暗から明に変化した部分が上
端エツジ部分と判断し、それを基準にして検査対
象領域の始点を決め、検査開始アドレスを上端エ
ツジの変動に追従して変化させる。これにより、
上端エツジに対する不感帯を最小にする。
If the central axis of the paper cup is eccentric from the rotation axis, the address of the image signal indicating the upper edge of the paper cup (for example, the address number counted from the edge of the line sensor element) changes every main scan. Therefore, when performing dead zone processing on the upper edge, the dead zone must be widened based on the address of the image signal. Therefore, in order to minimize the dead zone, the part that changes from dark to bright after the start of each scan is determined to be the top edge part, and based on this, the starting point of the inspection target area is determined, and the inspection start address is set as the top edge part. change according to. This results in
Minimize the dead zone for the top edge.

このようにして、走査区間内に検査領域を設定
して、その範囲についてのみ汚れ検出する。かく
して、紙カツプの中心軸が自転軸に対して偏心し
ていても、検査領域内の上端エツジの位置が常に
一定するので、不感帯を狭くとることができる。
In this way, an inspection area is set within the scanning section, and stains are detected only in that area. In this way, even if the central axis of the paper cup is eccentric with respect to the rotational axis, the position of the upper edge within the inspection area is always constant, so the dead zone can be kept narrow.

以上述べた処理を行う判定処理装置16は、第
13図に示す如く、前処理部200とデータ処理
部202とを有している。そして、データ処理部
202には、表示装置204が接続され、更に、
搬送装置10に付属する振分制御装置206が接
続されている。この振分制御装置206は、デー
タ処理部202が不良信号を出力した時、その不
良と判定された紙カツプが搬送装置10の不良品
排出ステーシヨンに送られてきたとき、弁10
8を開放させて、圧縮空気により排出ダクト12
8を通して排出する。そして、振分制御装置20
6は、紙カツプがあるかどうかに関係なく、カツ
プホルダが送出してステーシヨンにきたとき、
弁110を開いて圧縮空気のその送出しステーシ
ヨンにあるカツプホルダの底から送る。そのと
き、検査に合格した紙カツプがあれば、それは、
送出しダクト130を通つて送り出される。
The determination processing device 16 that performs the processing described above includes a preprocessing section 200 and a data processing section 202, as shown in FIG. A display device 204 is connected to the data processing unit 202, and further,
A distribution control device 206 attached to the transport device 10 is connected. When the data processing unit 202 outputs a defective signal and the paper cup determined to be defective is sent to the defective product discharging station of the conveyance device 10, the distribution control device 206 controls the valve 10.
8 and discharge duct 12 with compressed air.
Discharge through 8. And the distribution control device 20
6, when the cup holder is sent out and comes to the station, regardless of whether there is a paper cup or not,
Valve 110 is opened to direct compressed air from the bottom of the cup holder at its delivery station. At that time, if there is a paper cup that passes the inspection, it is
It is sent out through delivery duct 130.

N個の、例えば1024個の固体撮像素子で構成さ
れるラインセンサを具備する表面検出装置14
は、クロツク回路208からのクロツク信号に同
期して直列に読み出され、プリアンプ210で増
幅されて、前処理部200に入力される。この前
処理部200は、波形整形回路212、A/D変
換回路214、輪郭強調兼平滑化回路216とを
含んでいる。
A surface detection device 14 equipped with a line sensor composed of N pieces, for example, 1024 solid-state image sensors.
are read out in series in synchronization with the clock signal from the clock circuit 208, amplified by the preamplifier 210, and input to the preprocessing section 200. This preprocessing section 200 includes a waveform shaping circuit 212, an A/D conversion circuit 214, and an edge enhancement/smoothing circuit 216.

ラインセンサで一走査したときのN画素分のア
ナログ信号は、被検査面の凹凸、照明の不均一、
被検査面からラインセンサの各素子までの光路長
の違い等により、第15A図に示すようなシエー
デング、いわゆるパラボラ歪等の歪を有してい
る。これら歪は、一走査にわたつてみると一走査
にわたつて緩やかに変化するだけであるので、波
形整形回路212は、平均的な包絡線を追尾して
第15B図に示す如く補正する。
Analog signals for N pixels when one scan is performed with a line sensor are caused by unevenness of the surface to be inspected, non-uniform illumination, etc.
Due to differences in optical path length from the surface to be inspected to each element of the line sensor, distortions such as shading, so-called parabolic distortion, etc., as shown in FIG. 15A occur. Since these distortions only change slowly over one scan, the waveform shaping circuit 212 tracks the average envelope and corrects it as shown in FIG. 15B.

A/D変換回路214は、第15B図に示すよ
うに歪を修正された各アナログ画素信号をそのレ
ベルに応じて、1画素当り6ビツトから8ビツト
のデジタル画素信号に変換する。この際、被写体
の画像情報には出現しないような、背景の黒や純
白に相当するアナログ画素信号のレベルを切り捨
て、第16図に示すように被写体の画像情報に出
現するアナログ画素信号レベル即ち中間調に相当
する信号レベル部分のみに全階調を割当てるよう
にデジタル化すると効率的である。1画素当り6
ビツト使用すると、64階調に分けることができ
る。
The A/D conversion circuit 214 converts each distortion-corrected analog pixel signal into a 6-bit to 8-bit digital pixel signal per pixel according to its level, as shown in FIG. 15B. At this time, the level of the analog pixel signal corresponding to the background black or pure white, which does not appear in the image information of the subject, is discarded, and as shown in Figure 16, the analog pixel signal level that appears in the image information of the subject, that is, the intermediate It is efficient to digitize so that all gradations are assigned only to the signal level portion corresponding to the tone. 6 per pixel
Using bits, it can be divided into 64 gradations.

輪郭強調兼平滑化回路216は、輪郭強調と平
滑化のいずれか一方を選択的に行うものである。
The contour enhancement/smoothing circuit 216 selectively performs either contour enhancement or smoothing.

第17A図に示す如き中間調の汚れDを線Sに
沿つて走査すると、その画素信号レベルは第17
B図の如くなり、境界部が不鮮明である。
When a halftone stain D as shown in FIG. 17A is scanned along the line S, the pixel signal level is 17th.
As shown in Figure B, the boundary is unclear.

輪郭強調は、そのようなコントラストの不鮮明
な境界付近の濃度変化を第17C図に示すように
急峻なものとして汚れ情報の範囲を明確にし、汚
れ情報の抽出が容易かつ完全にできるようにする
ことを目的としている。この処置により、色が薄
く小さな汚れはコントラストが強化され、抽出し
やすくなる。輪郭強調の理論によれば画像f(x,
y)に対しラプラシアン ▽2f(x,y)=∂2f(x,y)/∂x2 +∂2f(x,y)/∂y2 ……(1) を求めれば、このラプラシアンが、輪郭の強調さ
れた函数を与えることが知られている。しかし、
本実施例においては、輪郭強調処理すべき画素の
情報とそれに隣接する周囲の画素の情報との差を
もつて輪郭情報としている。即ち、第18図に示
す如き3列3画素の中央画素Eについては、上下
左右の画素情報B・H・D・Fを考慮するとき
は、4EからB・H・D・Fの和を差引き、これ
に45゜の方向の画素情報A・I・C・Gも考慮に
入れるときは、4Eから8画素の和の2分の1を
差引き、この値を輪郭情報とするのである。輪郭
を強調した画像情報は、Eにこの輪郭情報を加え
ることにより得られる。このようにすれば、Eが
白の部分ではますます白く、黒の部分ではますま
す黒くなる効果を生じ、輪郭がはつきりしてく
る。このとき、Eに係数K掛けて重みを加えても
よい。このときの画像情報はKEに輪郭情報を加
え、これをKで割ることによつて得られる。
Contour enhancement makes the range of dirt information clear by sharpening the density change near the boundary where the contrast is unclear, as shown in FIG. 17C, so that the dirt information can be extracted easily and completely. It is an object. This treatment enhances the contrast of small, pale stains and makes them easier to extract. According to the theory of contour enhancement, the image f(x,
If we find the Laplacian ▽ 2 f (x, y) = ∂ 2 f (x, y) / ∂x 2 + ∂ 2 f (x, y) / ∂y 2 ...(1) for is known to give a function with enhanced contours. but,
In this embodiment, the difference between the information of a pixel to be subjected to contour enhancement processing and the information of surrounding pixels adjacent thereto is used as contour information. In other words, for the center pixel E of 3 pixels in 3 rows as shown in FIG. When pixel information A, I, C, and G in the 45-degree direction is also taken into account, one-half of the sum of eight pixels is subtracted from 4E, and this value is used as contour information. Image information with enhanced contours can be obtained by adding this contour information to E. In this way, an effect is produced in which E becomes increasingly white in white areas and increasingly black in black areas, and the outline becomes more prominent. At this time, a weight may be added by multiplying E by a coefficient K. Image information at this time can be obtained by adding contour information to KE and dividing this by K.

平滑化は、第19A図に示すように紙面ノイズ
及び光電変換系その他の系で発生する瞬発的ノイ
ズ等を第19B図に示すように除去し、汚れ情報
の抽出に誤検出がないようにするものである。こ
の場合も、輪郭強調の方法と同様に3画素3列の
情報の中央の画素情報Eのレベルを周囲の4画素
又は8画素の情報の算術平均をとつて決定する。
又、Eに対してKなる重みを考慮し、KEに4画
素又は8画素の2分の1を加え、K+4で除すよ
うにしてもよい。
Smoothing is performed by removing paper surface noise and instantaneous noise generated in the photoelectric conversion system and other systems as shown in Fig. 19A, as shown in Fig. 19B, to avoid false detection when extracting dirt information. It is something. In this case, as in the method of contour enhancement, the level of the central pixel information E of the information of three columns of three pixels is determined by taking the arithmetic average of the information of the surrounding four or eight pixels.
Alternatively, considering the weight K for E, 1/2 of 4 pixels or 8 pixels may be added to KE and divided by K+4.

このような輪郭強調と平滑化は、検査する物品
の表面状態によつて適宜使い分け、次の処理回路
において処理しやすいデータを得るようにする。
すなわち、紙カツプの内面検査のときのように瞬
発性ノイズを発生しないような表面に色の薄い汚
れがついているようなときは、輪郭強調のみでよ
い。しかし、瞬発性ノイズの発生が多く見られる
ような表面にコントラストのはつきりした汚れが
ついているような物品は平滑化のみでよい。な
お、紙面ノイズのように振幅が小さな雑音があ
り、汚れのコントラストもはつきりしていないと
きは、輪郭強調と平滑化を併用することが考えら
れる。
Such contour enhancement and smoothing are used appropriately depending on the surface condition of the article to be inspected, so as to obtain data that is easy to process in the next processing circuit.
That is, when there is light dirt on the surface that does not generate instantaneous noise, such as when inspecting the inner surface of a paper cup, only outline enhancement is sufficient. However, for articles whose surfaces are stained with high-contrast stains and which often cause instantaneous noise, only smoothing is required. Note that when there is noise with a small amplitude, such as paper noise, and the contrast of dirt is not sharp, it is possible to use edge enhancement and smoothing together.

以下、第20図のブロツク図によつて輪郭強調
兼平滑化回路216の回路構成と動作を説明す
る。入力情報f(t)の一走査分の画素数がNで
あるので、合計で(N+1)ドツトのシフトレジ
スタを構成する(N−1)ドツトのシフトレジス
タ218と1ドツトのシフトレジスタ220、2
22のNドツト目のシフトレジスタ220から、
同じ(N+1)ドツトシフトレジスタを構成する
シフトレジスタ224、226、228のシフト
レジスタ224の入力に接続し、同様にNドツト
目のシフトレジスタ226の出力から次の(N+
1)シフトレジスタの内のシフトレジスタ230
の入力に接続する。これら3つの(N+1)ドツ
トシフトレジスタの(N−1)ドツト目、Nドツ
ト目、(N+1)ドツトからそれぞれ出力A・
B・C、D・E・F、G・H・Iを得る。このよ
うに構成することにより、連続して送られてくる
入力情報f(t)の最新の部分から、相隣る3本
の走査線の3画素分の情報の出力を得ることがで
きる。入力情報は次々と送られてくるので、各画
素とも順次I・H・G・F・E・D・C・B・A
の部分に出力される。このようにして得られた3
画素3列の画像情報は加算回路234と236へ
送られる。加算回路234は、上下、左右の4画
素につき g1=B+H+D+F ……(2) を求め、45゜の方向の4画素につき、加算回路2
36が g2=A+I+C+G ……(3) を求める。周辺8画素を考慮するときは、g1とg2
は加算回路238によつて加算される。しかし、
4画素のみを考慮するときは、周辺画素数選択信
号がローレベル(以下Lと称す)となりアンド回
路240をオフにしてg2を遮断するので加算回路
238の出力はg1のみとなる。加算回路238の
出力(g1+g2)とはそのまま選択回路242に加
えられる外、除算回路224によつて定数2で割
つた後選択回路242に加えられる。周辺画素数
選択信号をLにすればg1とg1/2が選択回路34
に加えられ、この内g1のみが選択されてその出力
gは g=g1=(B+H+D+F) ……(4) となる。周辺画素数選択信号をハイレベル(以下
Hと称す)とすれば、アンドゲート240は開く
ので、(g1+g2)と(g1+g2)/2が選択回路2
42に加えられ、その内(g1+g2)/2のみが選
択されてgは g=(g1+g2)/2 ={(B+H+D+F)+(A+I+C+
G)}/2 ……(5) となる。一方、乗算回路246には画素情報Eと
定数4が入力されて、4Eが演算され、この4Eと
gが減算回路248に加えられ、輪郭情報△E △E=4E−g ……(6) が得られる。他方、乗算回路250には画素情報
Eと重み付け係数Kが加えられて、KEが求めら
れ、このKEと△Eが加算回路252に加えられ
(KE+△E)が求められる。この(KE+△E)
の除算回路254に加えられ、重み付け係数Kで
割つて、Kなる重みを付けたときの輪郭強調の画
素情報 F(t)=1/K(KE+△E)= (K+4)E−g/K ……(7) が得られる。このF(t)は、選択器256の選
択入力をHとしたとき選択器256から出力され
る。平滑化の演算は、乗算回路250によつて作
つたKEとgを加算回路258に加えて(KE+
g)を求め、この(KE+g)と加算回路260
によつて得られた(K+4)を除算回路262に
加え、Kなる重みを付けたときの平滑化された画
素情報 F(t)=KE+g/K+4 ……(8) を得る。このF(t)は、選択器256の選択入
力をLにしたときに出力される。4画素と8画
素、平滑化と強調化、重み付けの選択は、物品の
表面状態により手動によつて選択してもよく、自
動的に選択することにしてもよい。
The circuit configuration and operation of the edge enhancement/smoothing circuit 216 will be explained below with reference to the block diagram of FIG. Since the number of pixels for one scan of the input information f(t) is N, the (N-1) dot shift register 218 and the 1-dot shift register 220, 2 constitute a total of (N+1) dot shift registers.
From the 22nd N-th shift register 220,
It is connected to the input of the shift register 224 of the shift registers 224, 226, and 228 that constitute the same (N+1) dot shift register, and similarly, the output of the N-th dot shift register 226 is connected to the input of the shift register 224 of the shift register 224, 226, and 228 that constitute the same (N+1) dot shift register.
1) Shift register 230 among shift registers
Connect to the input of Outputs A and 1 are output from the (N-1)th dot, Nth dot, and (N+1) dot of these three (N+1) dot shift registers, respectively.
Obtain B・C, D・E・F, G・H・I. With this configuration, it is possible to obtain output information for three pixels of three adjacent scanning lines from the latest part of input information f(t) that is continuously sent. Since the input information is sent one after another, each pixel is sequentially I, H, G, F, E, D, C, B, A.
is output in the section. 3 obtained in this way
Image information for three columns of pixels is sent to adder circuits 234 and 236. The adder circuit 234 calculates g 1 =B+H+D+F...(2) for the four pixels on the top, bottom, left and right sides, and calculates g 1 =B+H+D+F...(2) for the four pixels in the 45° direction.
36 calculates g 2 =A+I+C+G...(3). When considering the surrounding 8 pixels, g 1 and g 2
are added by addition circuit 238. but,
When considering only four pixels, the peripheral pixel number selection signal becomes low level (hereinafter referred to as L), turns off the AND circuit 240, and cuts off g2 , so that the output of the adder circuit 238 is only g1 . The output (g 1 +g 2 ) of the adder circuit 238 is not only applied to the selection circuit 242 as is, but also divided by a constant 2 by the division circuit 224 and then added to the selection circuit 242 . When the peripheral pixel number selection signal is set to L, g 1 and g 1 /2 are selected by the selection circuit 34.
Among them, only g 1 is selected and its output g becomes g=g 1 =(B+H+D+F) . . . (4). When the peripheral pixel number selection signal is set to high level (hereinafter referred to as H), the AND gate 240 is opened, so that (g 1 +g 2 ) and (g 1 +g 2 )/2 are connected to the selection circuit 2.
42, of which only (g 1 + g 2 )/2 is selected, and g is g=(g 1 +g 2 )/2 = {(B+H+D+F)+(A+I+C+
G)}/2 ...(5). On the other hand, the pixel information E and the constant 4 are input to the multiplication circuit 246, 4E is calculated, and this 4E and g are added to the subtraction circuit 248, and the contour information △E △E=4E−g...(6) is obtained. On the other hand, the pixel information E and the weighting coefficient K are added to the multiplication circuit 250 to obtain KE, and this KE and ΔE are added to the addition circuit 252 to obtain (KE+ΔE). This (KE+△E)
Pixel information for contour enhancement when added to the division circuit 254, divided by the weighting coefficient K, and given a weight of K F(t)=1/K(KE+ΔE)=(K+4)E−g/K ...(7) is obtained. This F(t) is output from the selector 256 when the selection input of the selector 256 is set to H. The smoothing operation is performed by adding KE and g produced by the multiplication circuit 250 to the addition circuit 258 (KE+
g) and add this (KE+g) to the addition circuit 260.
(K+4) obtained by is added to the division circuit 262 to obtain smoothed pixel information F(t)=KE+g/K+4 (8) when weighted by K. This F(t) is output when the selection input of the selector 256 is set to L. The selection of 4 pixels and 8 pixels, smoothing, emphasis, and weighting may be made manually or automatically depending on the surface condition of the article.

以上の如く前処理された1画素当り6ビツト乃
至8ビツトのデジタル画素信号は、データ処理部
202に送られる。
The digital pixel signal of 6 to 8 bits per pixel, which has been preprocessed as described above, is sent to the data processing section 202.

データ処理部202は、検査する物品の情報を
検出する汚れ情報検出回路264、266と、こ
の汚れ情報を蓄積するメモリ268と、検査対象
面上の継ぎ目、マーク、文字等、傷又は汚れと誤
認される部分を除去するためのマスクパターン作
成するマスクパターン回路270と、マスクパタ
ーンの位置を定めたり、検出範囲を区分するとき
の基準座標を作る基準座標設定回路272,27
4と、得られた情報の正否の判定を行う総合判定
回路276と、マスクパターンと汚れ情報との照
合を行うマスク照合回路294等によつて構成さ
れる。そして、汚れ情報検出回路と基準座標設定
回路は、それぞれ主走査方向と副走査方向に対し
て設けられている。
The data processing unit 202 includes dirt information detection circuits 264 and 266 that detect information about the article to be inspected, a memory 268 that stores this dirt information, and a joint, mark, character, etc. on the surface to be inspected that is misidentified as a scratch or dirt. a mask pattern circuit 270 that creates a mask pattern for removing the portion to be detected, and reference coordinate setting circuits 272 and 27 that create reference coordinates for determining the position of the mask pattern and dividing the detection range.
4, a comprehensive determination circuit 276 that determines whether the obtained information is correct or not, and a mask verification circuit 294 that performs verification between the mask pattern and dirt information. The dirt information detection circuit and the reference coordinate setting circuit are provided for the main scanning direction and the sub-scanning direction, respectively.

前処理部200において波形整形回路212で
波形歪の補正、輪郭強調兼平滑化回路216で雑
音振幅の平滑化を行つているが、雑音は完全に除
去することができず、残留する波形歪や雑音が存
在するのは避けられない。そこで汚れ情報検出回
路264,266においては、汚れ情報抽出回路
278,280において効果的に残留する波形歪
と雑音を除去する外、雑音の中に埋れている薄い
汚れも確実に抽出する。更に誤り情報補正回路2
82,284において残留する雑音等の孤立点及
び許容範囲内の小さな汚れを除去し、位相補正回
路286,288によつて最も位相の遅れている
回路に位相合せを行い、そして、判定回路29
0,292において許容範囲内のやや大きな汚れ
を除去し、マスクパターンとの照合を行つて物品
の良否の判定をするように構成している。
In the preprocessing unit 200, the waveform shaping circuit 212 corrects the waveform distortion, and the contour enhancement/smoothing circuit 216 smooths the noise amplitude, but the noise cannot be completely removed, and residual waveform distortion and The existence of noise is unavoidable. Therefore, the dirt information detection circuits 264 and 266 not only effectively remove the waveform distortion and noise remaining in the dirt information extraction circuits 278 and 280, but also reliably extract thin dirt buried in the noise. Furthermore, error information correction circuit 2
82 and 284 remove isolated points such as residual noise and small dirt within an allowable range, phase adjustment is performed to the circuit with the most phase delay using phase correction circuits 286 and 288, and determination circuit 29
Slightly large stains within the allowable range are removed at 0.292, and the quality of the article is determined by comparing it with the mask pattern.

汚れ情報抽出回路278,280は、動的平均
値を求め、適当なスレツシヨルドを設定すること
により、歪と雑音の影響を軽減し、又コントラス
トの小さい汚れも明瞭に検出することができるよ
うにするものである。ここで、動的平均値とは、
ある画素の濃度情報に対し、その近傍の1次元又
は2次元の領域の区間平均をいう。仮に1次元の
場合について考え、第21A図に示すakなる情報
の前後にnなる画素範囲を想定すれば、情報ak
ついての動的平均値Akは次式にて表され、それ
を第21A図にAkで示す。
The dirt information extraction circuits 278 and 280 calculate a dynamic average value and set an appropriate threshold to reduce the effects of distortion and noise, and also make it possible to clearly detect dirt with low contrast. It is something. Here, the dynamic average value is
For density information of a certain pixel, it refers to the interval average of a one-dimensional or two-dimensional area in the vicinity of the density information. If we consider a one-dimensional case and assume a pixel range of n before and after the information a k shown in Figure 21A, the dynamic average value A k for the information a k is expressed by the following equation, which can be expressed as It is indicated by A k in FIG. 21A.

Ak=1/2noa i=-n+1 K+i ……(9) この動的平均値は、波形歪を表わしているものと
みなすことができるので、原情報との差dkは、 dk=ak−Ak ……(10) 第21B図の如くなり、波形歪を除去した信号
とみなすことができる。そのように得られたdk
第22A図に示すようにまず十分に深いスレツシ
ヨルドTHIでスライスして第22B図に示すよう
に振幅の大きなピークSIを検出する。これは濃い
汚れに相当する。他方、第23A図に示すような
広い範囲の薄い汚れDはピーク値が低いのでTHI
によつてはスライスされないが、レベルが同一方
向に片寄つている。そこで、dkに対し再び動的平
均値 Dk=1/2ddd i=-d+1 K+i ……(11) を第23B図の如く求め、THIより浅いスレツシ
ヨルドTH2でスライスすれば、第23C図の如く
A′なる区間が得られる。このA′は、実際の汚れ
の範囲より小さく出ているので、拡大して第23
D図の如きAなる領域を求める。このAの範囲を
検査区間とし、dkに対して第23E図に示す如き
十分に浅いスレツシヨルドTH3でスライスすれ
ば、第23F図のように薄い汚れS2を検出でき
る。このとき雑音Nは、検査区間Aにないので検
出されない。従つて、薄い汚れのみ検出できる。
A k = 1/2n oa i=-n+1 K+i ...(9) This dynamic average value can be regarded as representing waveform distortion, so the difference d k from the original information is , d k = a k −A k (10) as shown in FIG. 21B, and can be regarded as a signal from which waveform distortion has been removed. The thus obtained d k is first sliced at a sufficiently deep threshold T HI as shown in FIG. 22A, and a peak S I with a large amplitude is detected as shown in FIG. 22B. This corresponds to heavy dirt. On the other hand, thin dirt D in a wide range as shown in Fig. 23A has a low peak value, so T HI
It is not sliced, but the levels are skewed in the same direction. Therefore, for d k , the dynamic average value D k = 1 / 2d dd i=-d+1 K+ i . For example, as shown in Figure 23C.
An interval A′ is obtained. This A' is smaller than the actual dirt range, so it is enlarged to the 23rd area.
Find area A as shown in diagram D. If this range A is set as an inspection section and dk is sliced at a sufficiently shallow threshold T H3 as shown in FIG. 23E, a thin stain S 2 can be detected as shown in FIG. 23F. At this time, the noise N is not detected because it is not in the inspection section A. Therefore, only light dirt can be detected.

上記処理において用いるスレツシヨルドTH1
TH2,TH3は、どの程度の濃さの汚れを汚れとし
て検出するかを決めるものであり、物品の表面の
性質と汚れの規格によつて、適当な値に設定でき
るようにしておくことが好ましい。
Threshold T H1 used in the above processing,
T H2 and T H3 determine the density of dirt to be detected as dirt, and should be set to appropriate values depending on the nature of the surface of the article and the dirt standard. is preferred.

汚れ情報抽出回路278,280は、上述した
如き検出デぶタ処理を行い、更に、汚れと思われ
るものを検出したので、以降の処理を容易にする
ために各画素当りの汚れ情報を2値化して出力す
る。
The dirt information extraction circuits 278 and 280 perform the detection data processing as described above, and furthermore, since what seems to be dirt is detected, dirt information for each pixel is converted into binary data to facilitate subsequent processing. Convert and output.

汚れ抽出回路278,280から出力される2
値化汚れ情報は、既にノイズは相当除去されてい
るが、依然として第24図に示す如く孤立的なノ
イズ294や欠け296が存在し、更には、孤立
的ノイズや欠けよりも大きいが汚れとはみられな
い程度のしみや欠けも存在する。
2 output from the dirt extraction circuits 278 and 280
Although a considerable amount of noise has already been removed from the digitized dirt information, there are still isolated noises 294 and chips 296 as shown in FIG. There are also stains and chips that cannot be seen.

誤り情報補正回路282、284は、上述した
ノイズや欠け等を除去するものである。孤立点の
除去は理論的な処理で行うことができる。例え
ば、座標点(I、J)の画素の汚れ情報の値をF
(I、J)とし、次式によつてG(I、J)を求め
る。
The error information correction circuits 282 and 284 are for removing the above-mentioned noise, chipping, etc. Isolated points can be removed by theoretical processing. For example, the value of the dirt information of the pixel at the coordinate point (I, J) is F
(I, J), and find G(I, J) using the following formula.

G(I、J)=(I−1、J)・(I++1、
J)・ (I、J−1)・(I、J+i) ……(12) 但し、(I、J)はF(I、J)の補数であ
る。
G(I, J) = (I-1, J)・(I++1,
J)・(I, J−1)・(I, J+i) ……(12) However, (I, J) is the complement of F(I, J).

黒を1、白を0とするとき、G(I、J)=1で
あつてF(I、J)=1ならば、点(I、J)は孤
立した“しみ”であるとして除去する。同様にし
て、“欠け”も除去することができる。検査対象
物品の表面によつては、上記の“しみ”又は“欠
け”のいずれかに重みを付けて検出することもで
きる。孤立点より大きな汚れや欠けは、メツシユ
フイルタによつて判定して除去する。メツシユフ
イルタは、第25A図及び第25B図に示すよう
に、画素f(i、j)に隣接する画素間の連続性
を求めることによつてその大きさを判定し、所定
の大きさ以下のものはこれを汚れでないとして除
去するものである。第25A図の主走査方向フイ
ルタ及び第25B図の副走査方向フイルタは、そ
れぞれ主走査方向又は副走査方向の汚れ情報検出
回路の誤り情報補正回路に用い、いずれも図示す
るように隣接する画素つき、2次元的な調査をす
るが、主走査方向フイルタは主走査方向に長く、
副走査方向フイルタは副走査方向に長く連続性を
調査する点で相異する。このメツシユフイルタに
より、汚れでないと判断するしみや欠けの大きさ
は、物品の性質により又汚れの規格によつて異な
るので、何段階かに設定できるようになつている
ことが好ましい。
When black is 1 and white is 0, if G (I, J) = 1 and F (I, J) = 1, then point (I, J) is considered to be an isolated "spot" and is removed. . Similarly, "chips" can also be removed. Depending on the surface of the article to be inspected, either the above-mentioned "stains" or "chips" can be weighted and detected. Dirt or chips larger than isolated points are determined and removed by a mesh filter. As shown in FIGS. 25A and 25B, the mesh filter determines the size of a pixel f (i, j) by determining the continuity between adjacent pixels, and detects pixels that are smaller than a predetermined size. This is considered to be non-contamination and removed. The main scanning direction filter shown in FIG. 25A and the sub-scanning direction filter shown in FIG. , a two-dimensional investigation is performed, but the main scanning direction filter is long in the main scanning direction.
The sub-scanning direction filter is different in that it investigates continuity over a long period in the sub-scanning direction. With this mesh filter, it is preferable to be able to set the size of a stain or chip in several stages, since the size of a stain or chip that is determined to be non-contamination varies depending on the nature of the article and the standard of the stain.

位相補正回路286及び288は、汚れ情報検
出回路、マスクパターン回路270、基準座標、
設定回路272,274の内、通常最も位相の遅
れる副走査方向基準座標設定回路272に位相を
合せて、以降の信号処理のために全ての系統の位
相を合わせる。
The phase correction circuits 286 and 288 include a dirt information detection circuit, a mask pattern circuit 270, a reference coordinate,
Of the setting circuits 272 and 274, the sub-scanning direction reference coordinate setting circuit 272, which is usually the most delayed in phase, is matched in phase, and the phases of all systems are matched for subsequent signal processing.

判定回路290、292は、誤り情報補正回路
282,284により除去された汚れより大きな
汚れを検出し、それより小さい規格外れの汚れを
除去して汚れデータを出力する。例えば主査方向
5画素、それと直角な方向3画素、合計15画素に
ついて各画素間の連続性を検査する。例えば、15
画素全てが汚れを示していたときには、汚れとし
て検出する。しかし、汚れと判定するためにサン
プルする画素の範囲と数、並びに汚れと判断する
基準となる汚れを示す画素の数は、検査対象及び
検出精度に応じて変わるものである。これら判定
回路は、リフアレンスメモリからマスクパターン
データが送られてくるまでは、汚れと判断できる
汚れ以外の汚れを除去した汚れデータを、汚れ情
報圧縮回路298によつて圧縮して、汚れ情報メ
モリ268に蓄える。この圧縮は、メモリの容量
を節約するためである。副走査方向基準座標設定
回路272が基準軸を検出すると、リフアレンス
メモリ300は、マスクパターンデータを判定回
路290、292に出力する。リフアレンスメモ
リ300からマスクパターンデータを受けると、
判定回路290,292は、汚れ情報とマスク照
合して、マスクされなかつた部分について前述し
た如き規格以上の汚れがあるかどうか検出する。
そして、汚れの検出結果は、総合判定回路276
に送られる。総合判定回路276は、汚れの有無
を判定し、又は、汚れの量が基準量より多いかど
うか判定して、良否を決定して良否判定信号を振
分制御装置206に出力する。
The determination circuits 290 and 292 detect stains larger than the stains removed by the error information correction circuits 282 and 284, remove smaller non-standard stains, and output stain data. For example, the continuity between each pixel is checked for 5 pixels in the main scanning direction and 3 pixels in the direction perpendicular thereto, for a total of 15 pixels. For example, 15
When all pixels show dirt, it is detected as dirt. However, the range and number of pixels to be sampled to determine dirt, and the number of pixels exhibiting dirt that serve as a reference for determining dirt, vary depending on the object to be inspected and detection accuracy. Until the mask pattern data is sent from the reference memory, these determination circuits compress dirt data from which dirt other than dirt that can be determined to be dirt has been removed by the dirt information compression circuit 298 and store it in the dirt information memory 268. Store in. This compression is to save memory capacity. When the sub-scanning direction reference coordinate setting circuit 272 detects the reference axis, the reference memory 300 outputs mask pattern data to the determination circuits 290 and 292. Upon receiving mask pattern data from the reference memory 300,
The determination circuits 290 and 292 compare the stain information with the mask to detect whether or not there is stain exceeding the above-mentioned standard in the unmasked portion.
Then, the dirt detection result is sent to the comprehensive judgment circuit 276.
sent to. The comprehensive judgment circuit 276 judges whether there is dirt or not, or judges whether the amount of dirt is greater than a reference amount, determines pass/fail, and outputs a pass/fail judgment signal to the distribution control device 206.

以上のように、汚れ情報検出回路264,26
6と、付属の判定回路290,292は機能する
が、副走査方向汚れ情報検出回路266は、第1
段として検出軸変換回路302を有している。
As described above, the dirt information detection circuits 264 and 26
6 and the attached judgment circuits 290 and 292 function, but the sub-scanning direction dirt information detection circuit 266
A detection axis conversion circuit 302 is provided as a stage.

この検出軸変換回路302は、第26図に示す
如く、主走査方向の一走査の画素数がNであるの
で、Nドツトのシフトレジスタ304をn個直列
に接続して構成されるレジスタを有している。そ
して、n個のシフトレジスタ304の出力の動的
平均をとつて、n個のシフトレジスタ304の中
央のシフトレジスタの出力の画素の動的平均値と
して出力する。シフトレジスタ304は、主走査
方向の1走査分の画素を記憶しているので、n個
のシフトレジスタ304の出力は、副走査方向n
個の画素に相当する。そして、第1シフトレジス
タから順次画素信号が入力されてシフトされ更新
されるので、副走査方向にn個の画素信号にわた
つて動的平均をとつた画素信号が主走査方向の順
番に得られる。そのように副走査方向に動画平均
をとつた画素信号は、汚れ情報抽出回路280に
出力される。従つて、この検出軸変換回路は、座
標軸を直角変換する代り、副走査方向の動的平均
をとつて主走査方向にデータを出力するものであ
る。
As shown in FIG. 26, this detection axis conversion circuit 302 has a register configured by connecting n N-dot shift registers 304 in series, since the number of pixels in one scan in the main scanning direction is N. are doing. Then, the dynamic average of the outputs of the n shift registers 304 is taken and output as the dynamic average value of the output pixels of the central shift register of the n shift registers 304. Since the shift register 304 stores pixels for one scan in the main scanning direction, the outputs of the n shift registers 304 are
pixels. Since pixel signals are sequentially input from the first shift register, shifted and updated, pixel signals obtained by dynamically averaging n pixel signals in the sub-scanning direction can be obtained in order in the main-scanning direction. . The pixel signals obtained by averaging the moving image in the sub-scanning direction are output to the dirt information extraction circuit 280. Therefore, instead of orthogonally converting the coordinate axes, this detection axis conversion circuit takes a dynamic average in the sub-scanning direction and outputs data in the main scanning direction.

基準座標設定回路272,274は、検査表面
を幾つかに区分するとき、マスクパターンを含む
部分を他の部分から切離して照合するとき、マス
クパターンの位置が検出された情報のどの位置に
来るか特定されないときに、基準軸を与えるもの
である。この必要性は、物品の形状、マスクパタ
ーンの位置と数、走査の方法等で異なるが、マス
クの必要の全くない物品,必要はあつてもマスク
すべき部分が必ず一定の位置に来る物品に対して
はその必要性は少い。このような座標軸の検出に
は、検査物品の情報中、確実に検出できる何らか
の基準線、例えば物品の縁、折れ目、切り目、凹
凸線、継ぎ目、印刷してある線等で且つ主走査又
は副走査方向に平行なものを利用することができ
る。得られた主走査方向又は副走査方向の座標情
報は、その目的に応じて汚れ情報検出回路の判定
回路、汚れ情報メモリ、リフアレンスメモリ等に
配分する。自準座標軸の検出は、座標軸とする線
が、他と十分にコントラストがあり、多小の屈曲
が主走査方向又は副走査方向に対する傾きをカバ
ーできる程度の太さがあり、且つ明確に識別でき
るときは、簡単なスライス回路を利用することが
できる。バツクグラウンドその他の歪が多いとき
は、汚れ情報抽出回路において説明した動的平均
値をとり、入力情報との差分値について検出すれ
ばよい。主走査方向に平行な座標軸即ち副走査方
向における基準軸の検出には、前処理を行つた画
像情報をそのまま入力すればよく、副走査方向に
平行な座標軸即ち主走査方向における基準軸の検
出には、検出軸変換回路302の出力を入力すれ
ばよい。継ぎ目のように極めて細く又はコントラ
ストも低い線の場合でもパターン投影の技術を利
用して検出することができる。
The reference coordinate setting circuits 272 and 274 determine where the position of the mask pattern corresponds to the detected information when dividing the inspection surface into several parts or when separating and comparing the part containing the mask pattern from other parts. It provides a reference axis when it is not specified. This necessity differs depending on the shape of the article, the position and number of mask patterns, the scanning method, etc., but it applies to articles that do not require a mask at all, and articles where the masked part is always in a fixed position even if it is necessary. In contrast, there is little need for this. In order to detect such coordinate axes, some reference line that can be reliably detected in the information of the inspection item, such as the edge of the item, fold, cut, uneven line, seam, printed line, etc., and One parallel to the scanning direction can be used. The obtained coordinate information in the main scanning direction or the sub-scanning direction is distributed to a determination circuit of a dirt information detection circuit, a dirt information memory, a reference memory, etc., depending on the purpose. Detection of self-referenced coordinate axes requires that the line used as the coordinate axis has sufficient contrast with other lines, is thick enough to cover small and large bends and tilts with respect to the main scanning direction or sub-scanning direction, and can be clearly identified. In some cases, a simple slicing circuit can be used. When there is a lot of background or other distortion, it is sufficient to take the dynamic average value explained in the dirt information extraction circuit and detect the difference value from the input information. To detect the coordinate axis parallel to the main scanning direction, that is, the reference axis in the sub-scanning direction, it is sufficient to input the preprocessed image information as is. The output of the detection axis conversion circuit 302 may be input. Even lines that are extremely thin or have low contrast, such as seams, can be detected using pattern projection technology.

主走査方向の基準座標設定回路274は、例え
ば、前述した如く主走査方向の各走査の開始直後
に検出される暗から明に変化した所を上端エツジ
として検出し、これを基準線上の点として利用す
ることができる。この基準点の情報は判定回路2
90,292、リフアレンスメモリ300、及び
汚れ情報メモリ268に出力する。
For example, the reference coordinate setting circuit 274 in the main scanning direction detects, as described above, the place where the dark changes to light detected immediately after the start of each scan in the main scanning direction as the upper edge, and sets this as a point on the reference line. can be used. Information on this reference point is determined by the judgment circuit 2.
90, 292, reference memory 300, and dirt information memory 268.

第27図は、副走査方向の基準座標設定回路2
72として使用できる継目検出回路の概略構成例
を示すものである。第14A図に示す如き紙カツ
プの側面を展開すると、第28A図の如くなる。
その継目Sに沿つて走査すると、継目Sの部分を
走査したときの一走査分の画素信号rのレベル
は、第28B図の如く全体的に多少低くなる。し
かし、汚れDを走査したときの一走査分の画素信
号は、その汚れDの部分のみだけレベルが下がる
だけである。そこで、継目検出回路の投影パター
ン回路306は、一走査分の画素信号の総和を第
28C図の如く求める。このようにすることによ
り、継目部分の1走査分の画素信号は、継目部分
以外の部分の走査線上にたとえ黒い汚れがあつた
としても、継目部分以外の一走査分の総和よりは
レベルがはつきりと低くなり、判別可能となる。
FIG. 27 shows the reference coordinate setting circuit 2 in the sub-scanning direction.
72 shows a schematic configuration example of a seam detection circuit that can be used as a seam detection circuit. When the side surface of the paper cup shown in FIG. 14A is unfolded, it becomes as shown in FIG. 28A.
When scanning along the seam S, the level of the pixel signal r for one scan when scanning the seam S portion becomes somewhat lower overall as shown in FIG. 28B. However, when the dirt D is scanned, the level of the pixel signal for one scan is reduced only by the dirt D portion. Therefore, the projection pattern circuit 306 of the seam detection circuit calculates the sum of pixel signals for one scan as shown in FIG. 28C. By doing this, the level of the pixel signal for one scan of the seam area is lower than the sum of the pixel signals for one scan other than the seam area, even if there is black dirt on the scan line of the area other than the seam area. It becomes very low and can be distinguished.

このようにして得られた各走査線ごとの総和信
号は、基準線強調回路308に入力される。この
基準線強調回路は、第28C図の如きスライスレ
ベルTH4で入力信号をスライスしてコントラス
トを強くする。そのようにして得られた信号fv
受ける基準線検出回路310は、その信号の動的
平均値Avを求めて、差rv rv=fv−Av ……(12) を求め、rvが負になりその絶対値が基準値(スレ
ツシヨルド値VT)と等しいか又は大きいとき、
基準線と判定する。そして、アドレス回路312
は、その基準線の副走査方向のアドレスを出力す
る。
The sum signal for each scanning line obtained in this way is input to the reference line emphasis circuit 308. This reference line enhancement circuit slices the input signal at a slice level TH 4 as shown in FIG. 28C to enhance the contrast. The reference line detection circuit 310 that receives the signal f v thus obtained calculates the dynamic average value A v of the signal, and calculates the difference r v r v = f v − A v (12). , r v becomes negative and its absolute value is equal to or larger than the reference value (threshold value V T ),
Determine it as the reference line. And address circuit 312
outputs the address of the reference line in the sub-scanning direction.

第29図は、基準線検出回路の具体的構成例で
あり、副走査方向基準座標設定回路272として
使用できるように、紙コツプの側面継目を検出す
る場合を例にとつて説明する。
FIG. 29 shows a specific configuration example of the reference line detection circuit, and will be described by taking as an example a case where the side seam of a paper tip is detected so that it can be used as the sub-scanning direction reference coordinate setting circuit 272.

入力情報は、加算器314に印加され、その出
力は、ラツチ316,318に順次送られ、そし
て、ラツチ318の出力は、加算器314に入力
される。かくして、入力情報は、加算器314と
ラツチ316,318によつて加算されるが、ラ
ツチ316,318は1主走査ごとにリセツトさ
れるので、一走査線ごとの画素情報の総計がラツ
チ316より得られる。その総計信号は、次に、
減算器320によつて一定数を引かれてコントラ
ストを強め、前述したデータfvを求める。これを
2nドツトのシフトレジスタ322に加え、加算
器324によつて各ドツトの和を求め、除算器3
26によつて2nで割ることにより2n画素の動的
平均値Avを求められる。次に(12)式に示すように
シフトレジスタ322中央値のfvから、減算器3
28によつてAvを引き、その差rvを求める。基
準線すなわち継ぎ目の位置ではrvが負になるの
で、加算器330に、このrvとスレツシヨルド値
VTを加え、和(rv+VT)≦0なるときは求める継
ぎ目であると判定する。
The input information is applied to adder 314, its output is sent sequentially to latches 316 and 318, and the output of latch 318 is input to adder 314. Thus, the input information is added by adder 314 and latches 316 and 318, but since latches 316 and 318 are reset every main scan, the total pixel information for each scan line is added by latch 316. can get. That aggregate signal is then
A constant number is subtracted by a subtracter 320 to enhance the contrast and obtain the aforementioned data fv . this
In addition to the 2n dot shift register 322, the adder 324 calculates the sum of each dot, and the divider 3
By dividing 2n by 26, the dynamic average value A v of 2n pixels can be obtained. Next, as shown in equation (12), from the median value f v of the shift register 322, the subtracter 3
Subtract A v by 28 and find the difference r v . Since r v is negative at the reference line, that is, the position of the seam, the adder 330 stores this r v and the threshold value.
V T is added, and when the sum (r v +V T )≦0, it is determined that the seam is the desired seam.

紙コツプの内面検査は自転によつて行われ、1
周を超えて回転させるので、2回目の継ぎ目を検
出することがある。1回目の継ぎ目を検出したと
きは、カウンタ332の0端子がHとなり、アン
ドゲート334が開き、継ぎ目1出力ラインから
継目検出信号が出力される。2回目の継ぎ目を検
出したときはカウンタ332の0端子がLとなり
1端子がHになるので、アンドゲート336が開
き、継ぎ目2出力ラインから継目検出信号が出力
される。
The inner surface inspection of the paper cup is performed by rotating it on its axis.
Since it is rotated beyond the circumference, a second seam may be detected. When the first seam is detected, the 0 terminal of the counter 332 becomes H, the AND gate 334 opens, and a seam detection signal is output from the seam 1 output line. When the second seam is detected, the 0 terminal of the counter 332 becomes L and the 1 terminal becomes H, so the AND gate 336 opens and a seam detection signal is output from the seam 2 output line.

マスクパターン回路270は、マスクパターン
を抽出する回路338と、位相補正を行う回路3
40とマスクパターンの範囲を拡大する回路34
2と、マスクパターン情報全体を圧縮する回路3
44と、圧縮処理されたマスクパターンの情報を
蓄積するリフアレンスメモリ300から構成され
ている、マスクパターンは、通常検査を開始する
に先立つて、傷や汚れのない検査対象物品のマス
クすべき部分を黒く塗り潰したり穴を空けたりし
てコントラストを強く付け、これを撮像した情報
から作成する。このようにすると、得られた情報
は白黒で十分のレベル差があるから、マスクパタ
ーン抽出回路338は、簡単なスライス回路によ
つて構成することができる。位相補正回路340
の必要性は、汚れ情報検出回路において述べた如
く、他の回路で処理されたデータと位相を合わせ
るためである。マスクパターンは、物品表面の限
られた部分にあるときが多い。このようなとき、
リフアレンスメモリ300はその部分だけでよ
い。又、マスクパターンが幾つかあるときは、そ
れぞれのパターンにつきリフアレンスメモリを設
けることもできる。更に、マスクパターンが全画
面に及ぶようなときは、マスクパターン情報の圧
縮を行いメモリの節約を行うこともできる。マス
クパターン情報圧縮回路344はこのために設け
たものである。
The mask pattern circuit 270 includes a circuit 338 for extracting a mask pattern and a circuit 3 for performing phase correction.
40 and a circuit 34 for expanding the range of the mask pattern.
2, and a circuit 3 that compresses the entire mask pattern information.
44 and a reference memory 300 that stores information on the compressed mask pattern.The mask pattern consists of a reference memory 300 that stores information on the compressed mask pattern, and the mask pattern is a part of the object to be inspected that is free from scratches or dirt and is to be masked before starting the normal inspection. This is created from the information captured by painting it black or making holes to add strong contrast. In this way, the obtained information has a sufficient level difference between black and white, so the mask pattern extraction circuit 338 can be configured by a simple slice circuit. Phase correction circuit 340
This is necessary to match the phase with data processed by other circuits, as described in the dirt information detection circuit. The mask pattern is often located on a limited portion of the surface of the article. At times like this,
The reference memory 300 only needs to be used for that part. Further, when there are several mask patterns, a reference memory can be provided for each pattern. Furthermore, when the mask pattern covers the entire screen, the mask pattern information can be compressed to save memory. The mask pattern information compression circuit 344 is provided for this purpose.

汚れ情報の中にはマスクすべき部分も含まれて
いるので、この部分を確実にマスクしなければな
らないが、検査する物品の不同、回転偏差等の原
因より、マスクパターンと汚れ情報中のマスクす
べき部分は必ずしも一致しない。このときは、マ
スクすべき部分の情報を汚れ情報と誤認するの
で、予めマスクパターンの範囲をある程度拡大し
ておき、確実にマスクが行えるようにすることが
好ましい。マスクパターン範囲拡大回路はこのた
めに設けたものである。
Contamination information includes areas that should be masked, so these areas must be masked reliably, but due to reasons such as inconsistency in inspected items and rotational deviation, it is difficult to match the mask pattern to the mask in the contamination information. The parts that should be done do not necessarily match. In this case, the information on the portion to be masked may be mistaken as dirt information, so it is preferable to expand the range of the mask pattern to some extent in advance to ensure masking. The mask pattern range enlarging circuit is provided for this purpose.

マスク照合回路294は、後述するように、副
走査方向の基準座標軸が検出された後において、
走査開始より座標軸検出に至るまでの間汚れ情報
メモリ268に蓄えられていたデータとマスクパ
ターンとの照合を行い、マスクパターンの部分を
除去し、マスクされなかつた部分について判定回
路と同様に、良否又は汚れの量を検出し、この結
果を総合判定回路に送る。
As will be described later, after the reference coordinate axes in the sub-scanning direction are detected, the mask matching circuit 294 performs
The mask pattern is compared with the data stored in the dirt information memory 268 from the start of scanning until the detection of the coordinate axes. Alternatively, the amount of dirt is detected and the result is sent to the comprehensive judgment circuit.

次に汚れの方向性と検出の難易について説明
し、次いでこれに関連して主走査方向及び副走査
方向の継目のマスク及び継目の付近における汚れ
の検出法について説明する。第30図に例示する
ように汚れDの形状が走査方向Sに対して直角な
細長い形をしているときは、動的平均値は汚れの
ある箇所において明瞭なレベル差を生じ、汚れと
して検出されやすくなる。一方、汚れDの形状が
走査方向Sに沿つた細長い形をしているときは、
動的平均値をとつても明瞭なコントラストを生ぜ
ず検出されにくくなる。このような形状の汚れ
は、前に説明したパターン投影の方法によらない
と検出が困難である。従つて、紙カツプのエツジ
172及び側面と底面間の継目178は、主走査
方向の走査によつて検出されるので、主走査方向
の汚れ検出回路においては、上記の継目をマスク
して検出を行う。同様な理由によつて、側面の主
走査方向の継目176は副走査方向の汚れ検出回
路によりマスクを行つて検出を行う必要がある。
他方、継ぎ目のコントラストは小さく細いので、
長手方向の走査によつては前述した薄い汚れより
も検出しにくい。カツプの上端エツジ172も、
主走査方向の走査において、暗部から明部へのコ
ントラストをはつきりさせるため十分な照明をか
けるので、エツジ内部のコントラストは小さくな
り、継目同様に薄い汚れより検出しにくい。そこ
で、汚れ検出法において説明したスレツシヨルド
を調整して薄い汚れは検出できてもエツジ部分の
コントラスト及び継目は検出しないようにする。
このようにすれば、主走査方向の汚れ検出におい
てマスクされたエツジ172及び側面と底面の継
目178、副走査方向の汚れ検出においてマスク
された側面の基準線部分176の汚れは、それぞ
れ副走査方向及び主走査方向の汚れ検出において
はマスクしない。これにより、その部分の汚れを
効果的に検出することができる。これに反し、側
面継目の上部折れ曲り部176Aは、主走査及び
副走査の汚れ検出においてマスクする必要があ
る。
Next, the directionality of dirt and the difficulty of detecting it will be explained, and then, in connection with this, a mask for the seam in the main scanning direction and the sub-scanning direction and a method for detecting dirt in the vicinity of the seam will be explained. When the shape of the dirt D is elongated at right angles to the scanning direction S, as shown in FIG. become more susceptible to On the other hand, when the shape of the dirt D is elongated along the scanning direction S,
Even if the dynamic average value is taken, no clear contrast will be produced and it will be difficult to detect. It is difficult to detect stains having such a shape without using the pattern projection method described above. Therefore, since the edges 172 and the seams 178 between the sides and the bottom of the paper cup are detected by scanning in the main scanning direction, the contamination detection circuit in the main scanning direction masks the seams for detection. conduct. For the same reason, the seam 176 on the side surface in the main scanning direction must be detected by being masked by a dirt detection circuit in the sub-scanning direction.
On the other hand, the seam contrast is small and thin, so
Depending on the longitudinal scan, it is more difficult to detect than the thin dirt described above. The upper edge 172 of the cup is also
During scanning in the main scanning direction, sufficient illumination is applied to enhance the contrast from dark to bright areas, so the contrast inside the edges is small and, like seams, is harder to detect than thin stains. Therefore, the threshold described in the stain detection method is adjusted so that although light stains can be detected, the contrast of edge portions and seams are not detected.
In this way, the dirt on the edge 172 and the seam 178 between the side surface and the bottom surface that are masked in the detection of dirt in the main scanning direction, and the reference line portion 176 on the side surface that is masked in the detection of dirt in the sub-scanning direction, can be removed in the sub-scanning direction. Also, no masking is performed in the detection of dirt in the main scanning direction. This makes it possible to effectively detect dirt in that area. On the other hand, the upper bent portion 176A of the side seam needs to be masked in main scanning and sub-scanning dirt detection.

第31図は、第14図Aに示す紙カツプを1回
転以上回転させながら、側面継目に沿つて走査し
て得られた展開図であり、第32図は、各部回路
間の関連動作を説明するための系統図であり、そ
れら図面と更に第13図を参照して主要な回路動
作を説明する。
FIG. 31 is a developed view obtained by scanning the paper cup shown in FIG. 14A along the side seam while rotating it one or more revolutions, and FIG. 32 illustrates the related operations between each circuit. 13, and the main circuit operations will be explained with reference to these drawings and FIG. 13.

マスクパターンを作成するときは、汚れ情報検
出回路264,266は使用しない。まず、コン
トラストをはつきりつけられた紙カツプを検査ス
テーシヨンのカツプホルダに装着して自転させ
る。そして、マスクパターン回路270のマスク
パターン作成端子M0がハイレベルにされ、モー
ド選択ゲート350,352はそれぞれセレクト
1および2によつてM0モードにされ、カウンタ
362からのアドレス信号CN0がリフアレンスメ
モリ300A,300Bに書込される状態にな
る。
When creating a mask pattern, the dirt information detection circuits 264 and 266 are not used. First, a paper cup coated with contrast is attached to the cup holder of the testing station and rotated. Then, the mask pattern generation terminal M 0 of the mask pattern circuit 270 is set to high level, the mode selection gates 350 and 352 are set to the M 0 mode by selects 1 and 2, respectively, and the address signal CN 0 from the counter 362 is reset. The data will be written to the arrangement memories 300A and 300B.

かくして、紙カツプの側面継目の位置に関係な
く、走査が行なわれる。この開始点を第31図の
走査線aとする。そして、走査が進み、第1回目
の側面継目176上を走る走査線bに達すると、
副走査方向基準座標設定回路272として働く第
29図の如き継目検出回路の継目1出力ラインに
ハイレベルの継目検出信号を出力する。その結
果、アンドゲート354が開き、フリツプフロツ
プ356がセツトされ、オアゲート358を介し
てアンドゲート360の一方の入力がハイレベル
に保持される。それにより、1主走査当り1パル
ス発生する主走査クロツクが、そのアンドゲート
360を介してアツプダウンカウンタ362のカ
ウントアツプ入力UPに印加される。かくして、
このカウンタ362は、側面継目176を基準と
して副走査方向にみた各主走査のアドレスをカウ
ントし、そのアドレスカウントは、モード選択ゲ
ート350,352を介してリフアレンスメモリ
300A,300Bに副走査方向アドレス信号を
出力する。それらリフアレンスメモリには、各主
走査で得られる画素信号の主走査方向のアドレス
を規定するための主走査方向アドレス信号もライ
ン364を介して供給されている。このとき、リ
フアレンスメモリ300A,300Bは、R/W
ラインを介して書き込みモードになされている。
Thus, scanning is performed regardless of the position of the side seam of the paper cup. This starting point is defined as scanning line a in FIG. 31. Then, as the scanning progresses and reaches the scanning line b running on the first side seam 176,
A high-level seam detection signal is output to the seam 1 output line of the seam detection circuit shown in FIG. 29, which serves as the sub-scanning direction reference coordinate setting circuit 272. As a result, AND gate 354 is opened, flip-flop 356 is set, and one input of AND gate 360 is held high via OR gate 358. As a result, a main scanning clock that generates one pulse per main scanning is applied to the count-up input UP of the up-down counter 362 via the AND gate 360. Thus,
This counter 362 counts the address of each main scan when viewed in the sub-scanning direction with the side seam 176 as a reference, and the address count is stored as a sub-scanning direction address in the reference memories 300A, 300B via mode selection gates 350, 352. Output a signal. A main scanning direction address signal for defining the address in the main scanning direction of the pixel signal obtained in each main scanning is also supplied to these reference memories via a line 364. At this time, the reference memories 300A and 300B are R/W
The line has been put into write mode.

一方、マスクパターンを検出して得られるパタ
ーン情報は、マスクパターン抽出回路338から
位相補正回路340を介して、シフトレジスタ3
66に入力される。この実施例においてマスクパ
ターン情報は、白が1を表わすハイレベル信号、
黒が0を表わすローレベル信号である。シフトレ
ジスタ366は、一主走査分のNビツトのシフト
レジスタをn個直列に接続し、各シフトレジスタ
の出力をアンドゲート368に接続して構成され
ている。
On the other hand, pattern information obtained by detecting the mask pattern is transmitted from the mask pattern extraction circuit 338 to the shift register 3 via the phase correction circuit 340.
66. In this embodiment, the mask pattern information includes a high level signal in which white represents 1;
Black is a low level signal representing 0. The shift register 366 is constructed by connecting n N-bit shift registers for one main scan in series, and connecting the output of each shift register to an AND gate 368.

このようにすることにより、副走査方向のn個
の画素がすべて白にならないとオンにならないの
で、副走査方向の黒の範囲すなわちマスクが副走
査方向に拡大されたことになる。この出力はmビ
ツトのシフトレジスタ370に加えられ、その各
段の出力がアンドゲート372に加えられてい
る。この結果、同様にしてマスクが主走査方向に
拡大されたことになる。従つて、シフトレジスタ
366,370及びアンドゲート368,372
によつてマスクが平面的に拡大される。これらが
第13図のマスクパターン範囲拡大回路342を
構成する。この処置を受けた情報はリフアレンス
メモリ300A,300Bに送られる。両メモリ
とも書込みモードになつているので書込みが行わ
れる。この書込みのとき、メモリ容量を節約する
ために情報の圧縮を行う。圧縮は、アドレス周波
数を画像周波数のm分の1にすることによつて行
う。このようにしておくと、メモリには入力情報
のm個に1個の割合で書込まれるのでm分の1に
圧縮されたことになる。紙カツプにおける実施例
では、4分の1が適当である。なお、リフアレン
スメモリ300Aは、側面継目の上部折れ曲り部
176Aのマスクパターンを記憶し、リフアレン
スメモリ300Bは、側面底面継目178より底
面側の穴180のマスクパターンを記憶する。
By doing this, the black range in the sub-scanning direction, that is, the mask, is expanded in the sub-scanning direction, since it will not turn on unless all n pixels in the sub-scanning direction become white. This output is applied to an m-bit shift register 370, and the output of each stage is applied to an AND gate 372. As a result, the mask is similarly enlarged in the main scanning direction. Therefore, shift registers 366, 370 and AND gates 368, 372
The mask is enlarged two-dimensionally. These constitute the mask pattern range enlarging circuit 342 in FIG. Information that has undergone this treatment is sent to reference memories 300A and 300B. Since both memories are in write mode, writing is performed. During this writing, information is compressed to save memory capacity. Compression is performed by reducing the address frequency to 1/m of the image frequency. If this is done, one piece of input information will be written to the memory at a rate of one piece for every m pieces of input information, so the data will be compressed to 1/m pieces. In the paper cup embodiment, one quarter is suitable. The reference memory 300A stores the mask pattern of the upper bent portion 176A of the side seam, and the reference memory 300B stores the mask pattern of the hole 180 on the bottom side of the side bottom seam 178.

書込みが進み、側面継目176の検出から所定
数の主走査が終了して側面継目の折り曲げ部17
6Aの上端を少し過ぎた走査線Cに達すると、リ
フアレンスメモリ300Aのチツプセレクト入力
CS1に書き込み停止信号が入力されて、リフアレ
ンスメモリ300Aの書き込みが停止される。そし
て、2回目の側面継目が検出されると、副走査方
向基準座標設定回路272を構成する第29図に
示す如き継目検出回路が、継目2出力ラインにハ
イレベルの継目検出信号を出力する。その結果、
アンドゲート374が開き、その時のカウンタ3
62の内容即ち紙カツプのちようど1回転分の画
面の長さを示すアドレスがラツチ376に書き込
まれる。更に書き込みが進み、2回目の継目検出
から所定の長さだけ更に書き込まれて走査線fに
達すると、リフアレンスメモリ300Bのチツプ
セレクト入力CS2に書き込み停止信号が入力さ
れ、リフアレンスメモリ300Bの書き込みが停
止される。これで、マスクパターンがリフアレン
スメモリ300A,300Bに記憶される。
As the writing progresses, a predetermined number of main scans are completed from the detection of the side seam 176, and the bent portion 17 of the side seam is detected.
When reaching scanning line C, which is a little past the upper end of 6A, the chip select input of reference memory 300A is activated.
A write stop signal is input to CS 1 , and writing to the reference memory 300A is stopped. When the second side seam is detected, the seam detection circuit shown in FIG. 29, which constitutes the sub-scanning direction reference coordinate setting circuit 272, outputs a high-level seam detection signal to the seam 2 output line. the result,
AND gate 374 opens and counter 3 at that time
62, ie, the address indicating the length of the screen for one rotation of the paper cup, is written into latch 376. The writing progresses further, and when the predetermined length is further written from the second seam detection and reaches the scanning line f, a write stop signal is input to the chip select input CS 2 of the reference memory 300B, and the write stop signal is input to the chip select input CS 2 of the reference memory 300B. Writing is stopped. The mask pattern is now stored in the reference memories 300A and 300B.

次に、紙カツプの汚れ情報検出の概要について
説明する。一般に、汚れ情報検出を行うときは、
できるだけリアルタイム処理、すなわち検出した
データをバツフアメモリにストアすることなく、
直ちに所定の処理を施して出力するようにするこ
とが、高速演算を行うためには是非必要なことで
ある。第31図を参照するに、側面で主走査方向
の継目176のある部分Yはマスクすべき部分が
ないのでリアルタイム処理が可能である。側面で
上部の折れ曲つている継目176Aのある部分X
は、継目部分をマスクする必要があるが、後述す
るように、汚れ情報検出回路を副走査方向基準軸
である主走査方向の側面継目176より側面継目
の折れ曲がり部の走査に必要な時間遅れてスター
トさせることにより、必ず上記基準線検出後にマ
スクすべき部分の走査が行われるようにできるの
で、リアルタイム処理が可能である。又、このと
きのメモリは、継目の折れ曲り部分だけでよい。
底面の部分Zに空いている穴180は、上記基準
線に対して一定の位置にあるので、基準線検出後
はリアルタイム処理が可能であるが、走査開始か
ら基準線検出までは、汚れ情報メモリをメモリ2
68に蓄えておき、走査完了後マスク照合回路2
94において、穴のマスクパターンを記録してあ
るリフアレンスメモリ300Bと照合してマスク
処理を行い、判定をするように構成する。汚れ情
報メモリ268の容量は、基準線の直後から走査
を開始した場合を考えれば、1回転分必要であ
る。
Next, an overview of paper cup dirt information detection will be explained. Generally, when detecting dirt information,
Real-time processing as much as possible, that is, without storing detected data in buffer memory,
It is absolutely necessary to perform predetermined processing and output immediately in order to perform high-speed calculations. Referring to FIG. 31, since there is no part to be masked at the side Y where there is a seam 176 in the main scanning direction, real-time processing is possible. Part X where the seam 176A is bent at the top on the side
However, as will be described later, the contamination information detection circuit is delayed by the time required to scan the bent portion of the side seam from the side seam 176 in the main scanning direction, which is the reference axis in the sub-scanning direction. By starting, the scanning of the portion to be masked can be performed without fail after the reference line is detected, so real-time processing is possible. Further, the memory at this time is only needed at the bent portion of the seam.
Since the hole 180 in the bottom part Z is at a constant position with respect to the reference line, real-time processing is possible after the reference line is detected, but from the start of scanning until the reference line is detected, the dirt information memory is memory 2
68, and after scanning is completed, the mask verification circuit 2
At step 94, the mask pattern of the hole is compared with the reference memory 300B in which it is recorded, mask processing is performed, and a determination is made. The capacity of the dirt information memory 268 is sufficient for one rotation if scanning is started immediately after the reference line.

上端エツジ172と側面底面間の継目178
は、カツプの寸法が各種のカツプによつて正確に
定つているので、主走査方向の汚れ情報検出回路
264は、主走査方向基準座標設定回路274か
らの信号によつてマスキングを行う。このとき、
マスクする幅は紙カツプの寸法精度に対して安全
な値とすればよい。
Seam 178 between top edge 172 and bottom side surface
Since the size of the cup is accurately determined by each type of cup, the main scanning direction dirt information detection circuit 264 performs masking based on the signal from the main scanning direction reference coordinate setting circuit 274. At this time,
The masking width may be set to a value that is safe for the dimensional accuracy of the paper cup.

側面継目の上部折れ曲り部は、基準線検出後で
あればリフアレンスメモリ300Aのマスクパタ
ーンを読み出して照合しリアルタイム処理でマス
クすることができるが、走査がこの折れ曲り部に
かかつて開始されるときは、ほとんど1周しない
と基準線が検出されない。従つてそれからマスク
処理をすると処理終了までは更に1周しなければ
ならず、合計2画面の走査をする必要がある。カ
ツプを回転させて走査を行うようなときは、2画
面分の走査をすることは可能であるが、それだけ
処理時間を要することになる。又、1画面分の情
報を蓄えておくメモリを準備し、1画面走査完了
後このメモリ内の情報を処理することも可能であ
る。この場合は、一画面の走査ですむ利点はある
が、そのために1画面分のメモリを必要とする問
題点がある。第32図の回路は、この問題点を巧
に処理し、ほぼ一画面の走査でよくかつ一且一画
面分の情報を記憶するためのメモリは必要としな
いよう構成したものである。すなわち、汚れ情報
検出動作の開始を、少くとも側面継目の垂直部分
検出から側面継目折れ曲り部の上端の走査終了ま
でに必要な時間だけ継目検出走査の開始から遅ら
す。このようにすることにより、側面継目の上部
から継目検出の走査が開始されても、汚れ情報検
出は上部継目の折れ曲り部を過ぎてから開始され
るので、この折れ曲り部は必ず基準線検出後に検
出される。折れ曲り部は後述するように基準線検
出後において、リフアレンスメモリとリアルタイ
ムで照合することができる。かくして、側面は、
上記の措置によつて、基準線に対しどこから走査
が始つても、リアルタイムで検出された汚れ情報
を処理することができる。
The upper bent part of the side seam can be masked in real time by reading out the mask pattern in the reference memory 300A and collating it after the reference line has been detected, but scanning is started only at this bent part. At that time, the reference line is not detected until almost one revolution. Therefore, if mask processing is performed after that, it is necessary to perform one more round until the processing is completed, and it is necessary to scan two screens in total. When scanning is performed by rotating the cup, it is possible to scan two screens, but this increases the processing time. It is also possible to prepare a memory for storing information for one screen and process the information in this memory after one screen is scanned. In this case, there is an advantage that only one screen needs to be scanned, but there is a problem that a memory for one screen is required for this purpose. The circuit shown in FIG. 32 skillfully deals with this problem, and is configured so that it is sufficient to scan almost one screen and no memory is required to store information for one screen. That is, the start of the dirt information detection operation is delayed from the start of the seam detection scan by at least the time required from the detection of the vertical portion of the side seam to the end of scanning of the upper end of the bent portion of the side seam. By doing this, even if seam detection scanning starts from the top of the side seam, dirt information detection will start after passing the bend of the top seam, so this bend will always be detected by the reference line. will be detected later. The bent portion can be checked against the reference memory in real time after the reference line is detected, as will be described later. Thus, the sides are
By taking the above measures, it is possible to process the detected dirt information in real time, no matter where the scanning starts with respect to the reference line.

底面には、穴180のマスクパターンが種類に
よつて決まる場所に大きく広がつているので、上
記のような方法は採用することができない。上記
の場所は、側面継目を基準として一定の場所にあ
けられているので、この基準線を検出すればリア
ルタイムで照合が可能であるが、そのためには基
準線検出後更に1画面分走査する必要がある。本
願においては、底面についてのマスクパターン照
合のときも検出情報が1画面だけで間に合うよう
にし、かつできるだけ処理速度を早くするよう構
成している。すなわち、走査開始と同時に上端の
折れ曲がり部Xおよび側面Yはリアルタイムで検
出を行い、底面Zは汚れの大きさの判定を完了し
た情報を圧縮して汚れ情報メモリに蓄えておく。
継目が検出されると、上記のXおよびZのマスク
すべき部分が判明するので、リフアレンスメモリ
AおよびBの0番地を呼び出し、リアルタイムで
検出された汚れ情報との合照を行いつつ汚れ検出
を行う。汚れ検出を開始してから1画面分走査が
完了すると、汚れ情報メモリに蓄えてあつた情報
と、それに該当するリフアレンスメモリBのマス
ク情報とを照合する。
On the bottom surface, the mask pattern of the holes 180 is spread out in locations determined by the type, so the above method cannot be adopted. The above location is drilled at a fixed location based on the side seam, so if this reference line is detected, verification can be done in real time, but in order to do so, it is necessary to scan an additional screen after detecting the reference line. There is. In the present application, even when performing mask pattern matching on the bottom surface, only one screen is sufficient for detecting information, and the processing speed is made as fast as possible. That is, at the same time as scanning starts, the bending part X at the top end and the side surface Y are detected in real time, and information on the size of the dirt on the bottom surface Z is compressed and stored in the dirt information memory.
When the seam is detected, the above-mentioned X and Z parts to be masked are known, so addresses 0 of reference memories A and B are called and dirt detection is performed while comparing with the dirt information detected in real time. conduct. When scanning for one screen is completed after starting dirt detection, the information stored in the dirt information memory is compared with the corresponding mask information in the reference memory B.

次に第32図を参照して、汚れ検出動作のとき
に検出された情報のマスク及び処理の具体例を説
明する。
Next, with reference to FIG. 32, a specific example of masking and processing of information detected during the stain detection operation will be described.

表面検出動作には、まず基準線検出が開始され
る(第31図の線g)。次いで側面継目の折れ曲
り部の走査に必要な時間が経過すると(第31図
の線a)、マスクパターン回路の検出データ蓄積
モード端子M1がハイレベルとなり、モード選択
ゲート350,352,378は、それぞれセレ
クト1・2・3によりM1モードにされ、カウン
タ406からのアドレス信号CN1がリフアレンス
メモリAに、カウンタ404からのアドレス信号
CN2がリフアレンスメモリBに、カウンタ362
からのアドレス信号CN0が汚れ情報メモリに出力
される。このとき、リフアレンスメモリ300
A,300Bは読出しモードに、汚れ情報メモリ
268は書込みモードになる。検出データ蓄積モ
ード端子M1がハイレベルとなるので、オアゲー
ト358を介してアンドゲート360の一方の入
力がハイレベルとなり、カウンタ362は、主走
査クロツクをカウントする。それによりマスクパ
ターン書き込みのときと同様に副走査方向のアド
レス信号が、汚れ情報メモリ268に送られる。
In the surface detection operation, reference line detection is first started (line g in FIG. 31). Next, when the time required to scan the bent portion of the side seam has elapsed (line a in FIG. 31), the detection data storage mode terminal M1 of the mask pattern circuit becomes high level, and the mode selection gates 350, 352, and 378 are turned on. , are set to M1 mode by selects 1, 2, and 3, respectively, and the address signal CN 1 from the counter 406 is sent to the reference memory A, and the address signal from the counter 404 is sent to the reference memory A.
CN 2 is in reference memory B, counter 362
The address signal CN 0 from is output to the dirt information memory. At this time, the reference memory 300
A and 300B are in read mode, and dirt information memory 268 is in write mode. Since the detected data accumulation mode terminal M1 becomes high level, one input of AND gate 360 becomes high level via OR gate 358, and counter 362 counts the main scanning clock. As a result, the address signal in the sub-scanning direction is sent to the dirt information memory 268 in the same way as when writing the mask pattern.

一方、判定回路290,292からのそれぞれ
汚れと判定された汚れ情報のみを含む検出データ
は、オア回路380で合成され、シフトレジスタ
382に入力される。この検出データは、白が0
を表わすローレベル信号で、黒が1を表わすハイ
レベル信号となつており、マスクパターン情報と
反対のハイレベル信号となつている。従つて、判
定回路290,292から出力される検出データ
のいずれかが黒を表していれば、黒とみなされて
オア回路380より出力される。また、この検出
データの黒白と信号レベルとの関係は、マスクパ
ターン情報と反対の関係にあるので、検出データ
とマスクパターン情報との論理積をとれば、汚れ
が判別できる。即ち、マスクパターン情報が黒の
とき、それを表わす信号はローレベルであるの
で、検出データに関係なく、検出データとマスク
パターン情報の論理積もローレベルとなり、検出
データはマスクされる。一方、マスクパターン情
報が白のとき、それを表わす信号はハイレベルで
あるので、検出データとマスクパターン情報の論
理積は、検出データの状態と同じとなり、汚れの
黒を表わすハイレベル信号であればハイレベル信
号が得られ、汚れと最終的に判別できる。
On the other hand, detection data containing only dirt information determined to be dirt from the determination circuits 290 and 292 is combined by an OR circuit 380 and input to a shift register 382. In this detection data, white is 0.
This is a low level signal representing 1, and black is a high level signal representing 1, and is a high level signal opposite to mask pattern information. Therefore, if either of the detection data output from the determination circuits 290, 292 represents black, it is regarded as black and is output from the OR circuit 380. Furthermore, since the relationship between the black and white of this detection data and the signal level is opposite to that of the mask pattern information, stains can be determined by calculating the logical product of the detection data and the mask pattern information. That is, when the mask pattern information is black, the signal representing it is at a low level, so the AND of the detected data and the mask pattern information also becomes a low level, regardless of the detected data, and the detected data is masked. On the other hand, when the mask pattern information is white, the signal representing it is high level, so the AND of the detection data and mask pattern information is the same as the state of the detection data, and even if it is a high level signal representing black dirt. In this case, a high level signal is obtained, and it can be finally determined that it is dirt.

シフトレジスタ382は、一主走査分のNビツ
トのシフトレジスタをn個直列に接続し、その各
シフトレジスタの出力をオアゲート384に接続
して構成されている。そして、オアゲート384
の出力は、mビツトのシフトレジスタ386に加
えられ、そのシフトレジスタ386の各段の出力
がオアゲート388に加えられている。これによ
り、副走査方向に相隣るn個の画素の内1つでも
黒であれば黒と判定され、更に、主走査方向に相
隣るm個の画素の内1つでも黒であれば黒と判定
されて、汚れの範囲が拡大され、汚れ情報メモリ
268に圧縮されて記憶されるときに汚れ情報が
失なわれないようにされる。汚れ情報メモリ26
8は、オアゲート388からのデータを記憶する
が、マスクパターンのリフアレンスメモリへの書
き込みと同様に、アドレス周波数を画像周波数の
m分の1にすることによつて、m分の1に圧縮し
て記憶する。
The shift register 382 is constructed by connecting n N-bit shift registers for one main scan in series, and connecting the output of each shift register to an OR gate 384. And or gate 384
The output of is applied to an m-bit shift register 386, and the output of each stage of the shift register 386 is applied to an OR gate 388. As a result, if even one of the n pixels adjacent to each other in the sub-scanning direction is black, it is determined to be black, and furthermore, if even one of the m pixels adjacent to each other in the main scanning direction is black When it is determined that the image is black, the range of the stain is expanded and the stain information is not lost when compressed and stored in the stain information memory 268. Dirt information memory 26
8 stores the data from the OR gate 388, but compresses it to 1/m by reducing the address frequency to 1/m of the image frequency, similar to writing the mask pattern to the reference memory. memorize it.

このようにして、走査が進むに従い汚れ情報メ
モリ268にデータが記憶されてゆく。そして、
第1回目の側面継目が検出されると(第31図の
線b)、副走査方向基準座標設定回路272の継
目検出回路が継目1出力ラインにハイレベルの継
目検出信号を出力し、アンドゲート390の出力
がハイレベルになり、ラツチ392がカウンタ3
62の副走査方向のアドレス即ち、汚れ情報メモ
リ268内の側面継目のアドレスを記憶する。
In this way, data is stored in the dirt information memory 268 as scanning progresses. and,
When the first side seam is detected (line b in FIG. 31), the seam detection circuit of the sub-scanning direction reference coordinate setting circuit 272 outputs a high-level seam detection signal to the seam 1 output line, and the AND gate The output of 390 becomes high level, and the latch 392 becomes the counter 3.
62 in the sub-scanning direction, that is, the address of the side seam in the dirt information memory 268.

更に、アンドゲート394も開き、フリツプフ
ロツプ396がセツトされ、アンドゲート400
及び402の一つの入力がハイレベルに保持され
る。それにより、アツプダウンカウンタ404の
カウントアツプ入力UPに主走査クロツクが印加
され、カウント404はアドレスをカウントする
同時に、カウンタ406は、主走査クロツクをカ
ウントする。カウンタ404からのカウント信号
は、リフアレンスメモリ300Bに側面継目から
の副走査方向のアドレスとして供給され、カウン
タ406からのカウント信号は、同様にリフアレ
ンスメモリ300Aに側面継目からの副走査方向
のアドレス信号として供給される。
Additionally, AND gate 394 is also opened, flip-flop 396 is set, and AND gate 400 is set.
and one input of 402 is held at high level. As a result, the main scanning clock is applied to the count-up input UP of the up-down counter 404, and at the same time as the counter 404 counts addresses, the counter 406 counts the main scanning clock. The count signal from the counter 404 is supplied to the reference memory 300B as an address in the sub-scanning direction from the side seam, and the count signal from the counter 406 is similarly supplied to the reference memory 300A as an address in the sub-scanning direction from the side seam. Supplied as a signal.

リフアレンスメモリ300A,300Bから読
み出されるマスクパターン情報P1,P2は判定回
路290,292に出力され、判定回路は、第3
1図の走査線bから右側へマスクパターン情報と
検出データとをリアルタイムで照合して更に汚れ
を判別し、汚れ検出結果を総合判定回路276に
出力する。
The mask pattern information P 1 and P 2 read from the reference memories 300A and 300B are output to the determination circuits 290 and 292, and the determination circuit
The mask pattern information and the detection data are collated in real time from the scanning line b in FIG.

リフアレンスメモリ300Aに記憶されている
全情報P1が読み出し終るカウントにカウンタ4
06が達すると、デコーダ408がアンドゲート
402にローレベルの信号を出力し、カウンタ4
06のアドレス信号の送り出しを停止される。
The counter 4 counts up until all the information P1 stored in the reference memory 300A is read out.
06, the decoder 408 outputs a low level signal to the AND gate 402, and the counter 4
Sending of the address signal of 06 is stopped.

このようにして、紙カツプの1回転分の走査が
終了すると、即ち、第31図の走査線dまで走査
されると、検出データ蓄積モード端子M1がロー
レベルとなり、後処理モード端子M2がハイレベ
ルとなる。これにより、判定回路のリアルタイム
処理は終了する。更に、モード選択ゲート35
2,378は、M2モードになることによつて、
カウンタ362からのアドレス信号CN0がリフア
レンスメモリBに、カウンタ404からのアドレ
ス信号CN2が汚れ情報メモリに出力される。
In this way, when one rotation of the paper cup is completed, that is, when the scanning line d in FIG . becomes high level. This ends the real-time processing of the determination circuit. Furthermore, the mode selection gate 35
2,378 by entering M2 mode,
Address signal CN 0 from counter 362 is output to reference memory B, and address signal CN 2 from counter 404 is output to dirt information memory.

後処理モード端子M2がハイレベルとなつて、
フリツプフロツプ356,396がリセツトさ
れ、そして、検出データ蓄積モード端子M1がロ
ーレベルとなつてアンドゲート360,400が
閉じられることにより、カウンタ362,404
は、カウントを停止する。更に、カウンタ36
2,404のラツチ端子Lに、ラツチ書き込み信
号が印加され、ラツチ376に書き込まれていた
マスクパターン情報の中の第2回目継目のアドレ
ス番号が、カウンタ362に書き込まれ、そし
て、ラツチ392に書き込まれていた汚れ情報メ
モリ268中の第1回目の継目のアドレス番号が
カウンタ404に書き込まれる。更に、アンドゲ
ート410,412の一方の入力は、後処理モー
ド端子M2に接続されているので、ハイレベルと
なつており、主走査クロツクは、カウンタ36
2,404のカウントダウン入力DOWNに印加
される。そして、それらカウンタ362,404
から出力される順次若くなつてゆくアドレス番号
は、リフアレンスメモリ300Bと、汚れ情報メ
モリ268に送られる。その結果、リフアレンス
メモリ300Bは、第31図において走査線eか
ら左へマスクパターンを読み出してゆき、汚れ情
報メモリ268は、第31図において走査線bか
ら左へ汚れ情報を読み出してゆく。それにより、
マスク照合回路294を構成するアンド回路41
4は、継目より左側のマスクパターンと汚れ情報
とを照合してマスクされなかつた領域に汚れがあ
つたときは、汚れを表わすハイレベルの信号を出
力する。そして、この照合動作は、カウンタ40
4のアドレス番号が0となるまで行なわれる。従
つて、マスクパターンの走査線eからdまでと、
汚れ情報の走査線bからaまでとが照合される。
かくして、汚れ情報の走査線aからdまでが、走
査線bからdまでとdからeまでのマスクパター
ンでマスク処理される。
Post-processing mode terminal M2 becomes high level,
The flip-flops 356 and 396 are reset, and the detection data accumulation mode terminal M1 goes low and the AND gates 360 and 400 are closed, so that the counters 362 and 404 are reset.
stops counting. Furthermore, the counter 36
A latch write signal is applied to latch terminal L of latch 2,404, and the address number of the second seam in the mask pattern information written in latch 376 is written to counter 362, and then written to latch 392. The address number of the first seam in the dirt information memory 268 is written into the counter 404. Furthermore, one input of the AND gates 410 and 412 is connected to the post-processing mode terminal M2 , so it is at a high level, and the main scanning clock is connected to the counter 36.
2,404 is applied to the countdown input DOWN. And those counters 362, 404
The address numbers outputted from the address numbers that become smaller in sequence are sent to the reference memory 300B and the dirt information memory 268. As a result, the reference memory 300B reads the mask pattern from the scanning line e to the left in FIG. 31, and the dirt information memory 268 reads the dirt information from the scanning line b to the left in FIG. Thereby,
AND circuit 41 forming mask matching circuit 294
4 compares the mask pattern on the left side of the seam with the dirt information, and if dirt is found in the unmasked area, outputs a high level signal representing dirt. This verification operation is performed by the counter 40.
This process continues until the address number 4 becomes 0. Therefore, from scanning lines e to d of the mask pattern,
Scan lines b to a of the stain information are compared.
In this way, the scanning lines a to d of dirt information are masked using the mask patterns of scanning lines b to d and d to e.

以上述べた如き処理によれば、いかなる位置か
ら走査が開始されても、1回の走査でマスクパタ
ーンとの照合をすることができるので、走査に要
する時間を短縮でき、高速処理をすることができ
る。特に、マスクすべき部分の位置が基準線に対
して一定位置関係にある物品がランダムな向きに
置かれて一方向に動くコンベヤによつて搬送され
る場合のように1回しか撮像できないときに、効
果がある。
According to the above-described processing, no matter where scanning starts, it can be matched with the mask pattern in one scan, so the time required for scanning can be shortened and high-speed processing can be achieved. can. This is especially true when images can only be taken once, such as when an article whose part to be masked is in a fixed positional relationship with respect to the reference line is placed in a random orientation and transported by a conveyor that moves in one direction. ,effective.

総合判定回路276は、主走査方向と副走査方
向の判定回路290,292とマスク照合回路2
94からの良、否の判定結果を総合し、総合的な
判定をして結果を表示装置204及び振分制御装
置206に出力する。この総合判定は、判定回路
とマスク照合回路が良、不良だけの判定であるの
で、いずれかが不良判定であつたときは不良とす
る。
The comprehensive judgment circuit 276 includes judgment circuits 290 and 292 in the main scanning direction and sub-scanning direction, and the mask matching circuit 2.
The pass/fail judgment results from 94 are integrated, a comprehensive judgment is made, and the results are output to the display device 204 and the distribution control device 206. In this comprehensive judgment, only the judgment circuit and the mask matching circuit judge whether it is good or bad, so if either one of them is judged to be bad, it is determined to be defective.

表示装置204は、個々の不良品の汚れ個数、
汚れの総量等のプリントアウト、不良品のモニタ
による観察等がある。これらの方法は、ユーザの
必要性に応じて適当なものを選択すればよく、い
ずれも公知の技術によつて構成することができ
る。次に監視用モニタを使用した実施例について
説明する。第33図はその系統図で、前処理をし
ただけの画像と、汚れ部分の画像と、マスクパタ
ーンと、汚れの全画像を表示選択回路416によ
り選択してモニタ418に表示できるものであ
る。前処理部の出力は位相補正回路420によつ
て位相を補正され、監視用メモリ422を経てモ
ニタ418に出力される。良品のみの場合は、上
記の画像が次々と映出されている。主走査方向又
は副走査方向の判定回路からは、オア回路424
を介して汚れの大きさの判定の済んだ画像が次々
と送られて監視用メモリ422に蓄えられてい
る。この判定回路のいずれかから不良の信号が総
合判定回路に送られると、総合判定回路から監視
用メモリに対して制御信号が送られ、前述の前処
理をしただけの画像を切替えて、不良とされた汚
れ部分の画像を所定の時間映出する。必要がある
ときは表示選択回路416を操作し手動によつて
静止画像としても観察することができる。マスク
パターンと汚れの全画像も手動によつて映出でき
るようになつている。マスクパターンを映出する
のは、書入れたパターンがどんなものであるか確
認するもので、汚れの全画像は不良となつた物品
の画像の全領域にわたる汚れの分布を観察するた
めのものである。この全画像は圧縮を受けている
ので、詳細な画像は判定回路からの部分画像によ
る必要がある。
The display device 204 displays the number of soiled items of each defective product,
This includes printing out the total amount of dirt, etc., and observing defective products using a monitor. An appropriate method may be selected depending on the needs of the user, and any of these methods can be configured using known techniques. Next, an embodiment using a monitoring monitor will be described. FIG. 33 is a system diagram showing the system in which an image that has undergone only preprocessing, an image of a dirty portion, a mask pattern, and a whole image of dirt can be selected by the display selection circuit 416 and displayed on the monitor 418. The output of the preprocessing section has its phase corrected by a phase correction circuit 420, and is outputted to a monitor 418 via a monitoring memory 422. In the case of only non-defective products, the above images are displayed one after another. From the judgment circuit in the main scanning direction or sub-scanning direction, an OR circuit 424
Images whose size of dirt has been determined are sent one after another through the monitor 422 and stored in the monitoring memory 422. When a defective signal is sent from one of these judgment circuits to the comprehensive judgment circuit, a control signal is sent from the general judgment circuit to the monitoring memory, which switches the image that has undergone the above preprocessing and determines that it is defective. The image of the contaminated area is displayed for a predetermined period of time. When necessary, the display selection circuit 416 can be operated to manually view the image as a still image. All images of the mask pattern and dirt can also be displayed manually. The purpose of projecting the mask pattern is to confirm what the written pattern is, and the purpose of displaying the entire image of the stain is to observe the distribution of the stain over the entire area of the image of the defective item. be. Since this entire image has been compressed, detailed images must be obtained from partial images from the determination circuit.

良品と不良品の振分けは、総合判定回路からの
不良信号によつて振分制御装置206を動作させ
て行う。検査が開始されてから良、不良の振分け
をするまでの時間は、それぞれのシステムによつ
て定められるのであるから、振分制御装置はそれ
ぞれのシステムによつて、公知の適当な手段を使
用することができる。次にその実施例を第34図
を参照して説明する。紙カツプの搬送装置は既に
述べた如く円形で、周辺の6箇所に紙カツプを挿
入するカツプホルダを設け、6分の1回転ずつ間
欠的に公転せしめると同時に自転を行い、公転停
止中に紙カツプの供給、押込み、検査、不良品排
出、良品排出の諸動作を行うようになつている。
そこで、公転が停止すると、総合判定回路276
からの判定信号が2段のシフトレジスタ426に
送られ、シフトレジスタは1ステツプ進み、シフ
トレジスタ426からは2ステツプ前のデータが
出力される。即ち、検査された紙カツプが検出ス
テーシヨンから不良品排出ステーシヨンに到達し
たとき、シフトレジスタ426から総合判定信号
が出力される。不良のときはシフトレジスタ42
6の出力が緩衝兼駆動増幅器428を経て電磁弁
108へ供給され、不良品排出が行われる。良品
のときはシフトレジスタの出力が出ないので、物
品は次のステツプにおいて良品として排出され
る。
The distribution of good products and defective products is performed by operating the distribution control device 206 based on the defect signal from the comprehensive determination circuit. Since the time from the start of the inspection until the classification of good and defective items is determined by each system, the distribution control device uses a known appropriate means depending on each system. be able to. Next, the embodiment will be explained with reference to FIG. 34. As mentioned above, the paper cup conveyance device is circular, with cup holders installed at six locations around the periphery to insert the paper cup, and the paper cup is rotated intermittently at 1/6 revolutions at a time while simultaneously rotating on its axis. It performs various operations such as feeding, pushing, inspecting, discharging defective products, and discharging non-defective products.
Therefore, when the revolution stops, the comprehensive judgment circuit 276
The judgment signal from 2 is sent to the two-stage shift register 426, the shift register advances by one step, and the shift register 426 outputs data two steps earlier. That is, when the inspected paper cup reaches the defective product discharge station from the detection station, the shift register 426 outputs a comprehensive judgment signal. When defective, shift register 42
The output of No. 6 is supplied to the solenoid valve 108 via the buffer/drive amplifier 428, and defective products are discharged. When the item is good, there is no output from the shift register, so the item is discharged as a good item in the next step.

なお、以上述べた実施例において、高速性をそ
れほど求められない場合は、汚れ情報メモリ26
8、マスク照合回路294、汚れ情報圧縮回路2
98を設けなくてよい。この場合は、側面継目を
検出したあと紙カツプを1回転自転させて、判定
回路290,292により側面継目検出後の1回
転分の検出データのマスク処理をリアルタイムで
実行する。これにより、前述した如く紙カツプの
汚れ検出処理の終了までに紙カツプを最大限2回
転自転させる必要があるが、反面汚れ情報メモリ
268等が不要になる利点がある。
In the embodiments described above, if high speed is not required, the dirt information memory 26
8. Mask verification circuit 294, dirt information compression circuit 2
98 need not be provided. In this case, after detecting the side seam, the paper cup is rotated one rotation, and the determination circuits 290 and 292 perform mask processing in real time on the detection data for one rotation after the side seam has been detected. As a result, as described above, it is necessary to rotate the paper cup two revolutions at most before the paper cup stain detection process is completed, but on the other hand, there is an advantage that the stain information memory 268 and the like are not required.

以上述べたことから明らかなように、本発明の
上述した実施例においては、搬送装置は、紙カツ
プを変形させることなく正確に検査位置に位置づ
けることができ、そして、検査位置において紙カ
ツプを変形させたり偏心や浮き上がりを起こすこ
となく加速時間を必要とすることなく、定速で自
転させることができ、処理判別装置は、紙カツプ
のエツジや継目に対してマスク処理する一方、完
全にマスク処理する部分がないので、汚れだけで
微小な汚れまで確実に高速検出することができ
る。
As is clear from the foregoing, in the above-described embodiments of the present invention, the conveying device can accurately position the paper cup at the inspection position without deforming it, and deform the paper cup at the inspection position. The paper cup can be rotated at a constant speed without causing eccentricity or lifting, and without requiring acceleration time. Since there is no part to remove dirt, even the smallest dirt can be reliably detected at high speed.

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

第1図は、本発明による紙カツプの自動表面検
査装置の実施例の概略斜視図、第2図は、本発明
による搬送装置の実施例の頂面図、第3図は、第
2図の搬送装置の一部省略正面図、第4図は、第
2図の線−でみた部分断面図、第5図は、太
陽歯車と遊星歯車との関係を示す図、第6図は、
第2図の線−でみた断面図、そして、第7図
は、紙カツプ押込み機構の斜視図、第8A図は、
紙カツプを直上から撮像する場合の紙カツプとカ
メラの配置図、第8B図は、紙カツプを斜め上方
から撮像する場合の紙カツプとカメラの配置図、
第8C図は、紙カツプを三方から撮像する場合の
紙カツプとカメラの配置図、第8D図は、紙カツ
プを斜め上方から撮像した場合に得られる像の概
略図、第9A図は、紙カツプを斜め上方から撮像
した場合の紙カツプとカメラの光軸との関係を示
す側面図、第9B図は、第9A図の撮像配置の頂
面図、第10図は、カメラの光軸に傾斜している
検査面に対する傾斜結像面の関係を示す図、第1
1図は、紙カツプの継目に陰をつくる照明方向を
示す図、第12A図、第12B図及び第12C図
は、紙カツプの検査面を照明する手段の概略構成
図、第13図は、検出処理装置の構成を示すブロ
ツク図、第14A図は、紙カツプの概略斜視図、
第14B図は、第14A図の紙カツプに対するマ
スクパターンを示す展開図、第15A図及び第1
5B図は、検出されたアナログ画素信号と波形整
形された信号の一走査分のレベル変形を示すグラ
フ、第16図は、アナログ画素信号と、それから
変換されるデジタル画素信号との関係を示すグラ
フ、第17A図、第17B図及び第17C図は、
輪郭強調処理の効果を示す図、第18図は、輪郭
強調処理及び平滑化処理するときにサンプルされ
る画素の位置関係を示す図、第19A図及び第1
9B図は、平滑化処理の効果を示す図、第20図
は、輪郭強調兼平滑化回路の構成を示すブロツク
図、第21A図及び第21B図は、動的平均の効
果を示す波形図、第22A図及び第22B図は、
動的平均処理をされた画素信号と濃い汚れを検出
するためスレツシヨルドとの関係と検出された汚
れ信号とを示す波形図、第23A図から第23F
図は、淡い汚れを検出するための信号処理を示す
波形図、第24図は、画像情報内の“欠け”や
“しみ”を示す図、第25A図及び第25B図は、
メツシユフイルタ処理のときにサンプルされる画
素の範囲を示すグラフ、第26図は、検出軸変換
回路に使用されるシフトレジスタ回路の構成図、
第27図は、基準線検出回路の概略構成を示すブ
ロツク図、第28A図、第28B図及び第28C
図は、紙カツプの側面継目の検出の際の信号処理
過程を示す紙カツプの側面の展開図と波形図、第
29図は、基準線検出回路の具体的構成を示すブ
ロツク図、第30図は走査方向と汚れの方向性に
関する説明図、第31図は、紙カツプの走査とマ
スク処理及び汚れ検出との関係を示す展開図、第
32図は、各部回路の関連動作を説明するための
ブロツク図、第33図は、表示装置の構成例を示
すブロツク図、そして第34図は、振分制御装置
の構成例を示すブロツク図である。 10…搬送装置、12…検出処理装置、14…
表面検出装置、16…処理判別装置、20…紙カ
ツプ、22…カツプホルダ、24…割出しテーブ
ル、26…搬送装置のフレーム、28…回転軸、
30…ボス、34…自転軸、42…遊星歯車、4
4…太陽歯車、48,52…歯車、50…回転
軸、53e,54b,74…モータ、56…カツ
プ集積筒、58…カツプ供給スクリユー、78…
穴、80…中空室、82…放射方向孔、84…環
状チヤンネル、86…ホース、88,92…環状
部材、90…孔、96…アーム、98…真空室、
100,102…高圧室、108,110…電磁
弁、112…押込み機構、132…カメラ、13
4…ラインセンサ、136…対物レンズ、138
…カメラ、148…検査面、150…結像面、1
52…紙カツプの継目、156…点光源、158
…シリンドリカル凸レンズ、160…集中照明領
域、162…球面凸レンズ、164…円筒面状反
射面、172…紙カツプの上端エツジ、174…
紙カツプの上端フランジ、176…紙カツプの側
面継目、178…紙カツプの側面底面継目、18
0…紙カツプの底部穴、200…前処理部、20
2…データ処理部、204…表示装置、206…
振分制御装置、208…クロツク、210…プリ
アンプ、212…波形整形回路、214…A/D
変換回路、216…輪郭強調兼平滑化回路、26
4…主走査方向汚れ情報検出回路、266…副走
査方向汚れ情報検出回路、268…汚れ情報メモ
リ、270…マスクパターン回路、272…副走
査方向基準座標設定回路、274…主走査方向基
準座標設定回路、276…総合判定回路、294
…マスク照合回路。
FIG. 1 is a schematic perspective view of an embodiment of an automatic paper cup surface inspection device according to the present invention, FIG. 2 is a top view of an embodiment of a conveying device according to the present invention, and FIG. 4 is a partial sectional view taken along the line - in FIG. 2, FIG. 5 is a diagram showing the relationship between the sun gear and the planetary gears, and FIG. 6 is a partially omitted front view of the conveyance device.
2 is a sectional view taken along the line 2, FIG. 7 is a perspective view of the paper cup pushing mechanism, and FIG. 8A is a
Fig. 8B is a layout diagram of a paper cup and a camera when the paper cup is imaged from directly above;
Fig. 8C is a layout diagram of the paper cup and the camera when the paper cup is imaged from three sides, Fig. 8D is a schematic diagram of the image obtained when the paper cup is imaged from diagonally above, and Fig. 9A is a diagram of the arrangement of the paper cup and the camera when the paper cup is imaged from three sides. A side view showing the relationship between the paper cup and the optical axis of the camera when the cup is imaged from diagonally above. Figure 9B is a top view of the imaging arrangement shown in Figure 9A. Diagram 1 showing the relationship between the inclined imaging plane and the inclined inspection plane.
1 is a diagram showing the direction of illumination that creates a shadow on the seam of a paper cup; FIGS. 12A, 12B, and 12C are schematic diagrams of the means for illuminating the inspection surface of the paper cup; and FIG. A block diagram showing the configuration of the detection processing device, FIG. 14A is a schematic perspective view of a paper cup,
Figure 14B is a developed view showing the mask pattern for the paper cup in Figure 14A, Figure 15A and
Figure 5B is a graph showing the level deformation of the detected analog pixel signal and the waveform-shaped signal for one scan, and Figure 16 is a graph showing the relationship between the analog pixel signal and the digital pixel signal converted from it. , FIG. 17A, FIG. 17B, and FIG. 17C,
FIG. 18 is a diagram showing the effect of contour enhancement processing, FIG. 19A is a diagram showing the positional relationship of pixels sampled when performing contour enhancement processing and smoothing processing,
FIG. 9B is a diagram showing the effect of smoothing processing, FIG. 20 is a block diagram showing the configuration of the contour enhancement/smoothing circuit, FIGS. 21A and 21B are waveform diagrams showing the effect of dynamic averaging, Figures 22A and 22B are
23A to 23F are waveform diagrams showing the relationship between the pixel signal subjected to dynamic averaging processing, the threshold for detecting deep dirt, and the detected dirt signal; FIG.
The figure is a waveform diagram showing signal processing for detecting light dirt, FIG. 24 is a diagram showing "chips" and "stains" in image information, and FIGS. 25A and 25B are
A graph showing the range of pixels sampled during mesh filter processing, FIG. 26 is a configuration diagram of a shift register circuit used in the detection axis conversion circuit,
FIG. 27 is a block diagram showing the schematic configuration of the reference line detection circuit, FIGS. 28A, 28B, and 28C.
The figure shows a developed diagram and a waveform diagram of the side surface of a paper cup showing the signal processing process when detecting the side seam of a paper cup, FIG. 29 is a block diagram showing the specific configuration of the reference line detection circuit, and FIG. 30 31 is a developed diagram showing the relationship between paper cup scanning, mask processing, and stain detection. FIG. 32 is an explanatory diagram for explaining the related operations of each circuit. FIG. 33 is a block diagram showing an example of the configuration of the display device, and FIG. 34 is a block diagram showing an example of the configuration of the distribution control device. 10... Conveyance device, 12... Detection processing device, 14...
Surface detection device, 16... Processing discrimination device, 20... Paper cup, 22... Cup holder, 24... Indexing table, 26... Frame of transport device, 28... Rotating shaft,
30...Boss, 34...Rotation axis, 42...Planetary gear, 4
4... Sun gear, 48, 52... Gear, 50... Rotating shaft, 53e, 54b, 74... Motor, 56... Cup accumulating tube, 58... Cup supply screw, 78...
Hole, 80... Hollow chamber, 82... Radial hole, 84... Annular channel, 86... Hose, 88, 92... Annular member, 90... Hole, 96... Arm, 98... Vacuum chamber,
100, 102... High pressure chamber, 108, 110... Solenoid valve, 112... Pushing mechanism, 132... Camera, 13
4...Line sensor, 136...Objective lens, 138
...Camera, 148...Inspection surface, 150...Imaging surface, 1
52... Seam of paper cup, 156... Point light source, 158
...Cylindrical convex lens, 160...Concentrated illumination area, 162...Spherical convex lens, 164...Cylindrical reflective surface, 172...Top edge of paper cup, 174...
Top flange of paper cup, 176... Side seam of paper cup, 178... Side bottom seam of paper cup, 18
0...Bottom hole of paper cup, 200...Pretreatment section, 20
2...Data processing unit, 204...Display device, 206...
Distribution control device, 208...Clock, 210...Preamplifier, 212...Waveform shaping circuit, 214...A/D
Conversion circuit, 216... Contour enhancement and smoothing circuit, 26
4... Main scanning direction dirt information detection circuit, 266... Sub scanning direction dirt information detection circuit, 268... dirt information memory, 270... Mask pattern circuit, 272... Sub scanning direction reference coordinate setting circuit, 274... Main scanning direction reference coordinate setting Circuit, 276... Comprehensive judgment circuit, 294
...Mask matching circuit.

Claims (1)

【特許請求の範囲】 1 間歇駆動される回転式の割出しテーブルと、
該割出しテーブルの周辺に配置され該割出しテー
ブルに対して自転できるように支持され、かつ紙
カツプの下部をぴつたりと受ける凹部を有するカ
ツプホルダと、前記割出しテーブルの回転軸に対
して回転自在に且つ同軸関係に装着されて連続駆
動される太陽歯車と、前記カツプホルダの自転軸
に固定されて前記太陽歯車と歯合する遊星歯車
と、前記カツプホルダに紙カツプを供給する供給
手段が配置された供給ステーシヨンと、前記カツ
プホルダに紙カツプを保持して検査する検査ステ
ーシヨンと、紙カツプを該カツプホルダから合否
の結果に基づいて放出する振分放出手段とを具備
し、前記カツプホルダに保持された紙カツプが、
前記割出しテーブルの回転により該割出しテーブ
ルと一緒に公転すると共に、前記太陽歯車の連続
回転により前記遊星歯車を介して前記割出しテー
ブルの回転と独立して定速自転させられるように
なされた紙カツプ搬送装置と、 前記検査ステーシヨンにおいて自転する紙カツ
プを照明する照明手段と、該紙カツプの自転軸と
ほぼ共面関係にある走査線に沿つて紙カツプを走
査するように配置され、かつ固体撮像素子から構
成されるラインセンサとを具備し、アナログ画素
信号を出力する表面検出装置と、 前記表面検出装置から出力されるアナログ画素
信号を受けて波形整形しデジタル変換して出力す
る前処理部と、該前処理部からのデジタル画素信
号を受けて汚れ検出を行うデータ処理部とを具備
しており、該データ処理部は、前記前処理部から
のデジタル画素信号を受けて主走査方向の画素デ
ータを副走査方向の画素データに変換する検出軸
変換回路と、前記検出軸変換回路からのデジタル
画素信号を受けて主走査方向における基準軸を検
出する主走査方向基準座標設定回路と、前記前処
理部からのデジタル画素信号を受けて副走査方向
における基準軸を検出する副走査方向基準座標設
定回路と、前記前処理部からのデジタル画素信号
を受けて汚れ検出対象から外すべき部分のパター
ン情報を作成するマスクパターン回路と、前記前
処理部からのデジタル画素信号を受けてマスクす
べき部分については前記マスクパターン回路から
のマスク情報を受けてマスク処理を行いながら主
走査方向の汚れ検出処理を行う第1の判定回路を
有する主走査方向汚れ検出回路と、前記検出軸変
換回路からのデジタル画素信号を受けてマスクす
べき部分については前記マスクパターン回路から
のマスク情報を受けてマスク処理を行いながら副
走査方向の汚れ検出処理を行う2の判定回路を有
する副走査方向汚れ検出回路と、前記第1及び第
2の判定回路からの汚れ情報を受けて総合的な合
否判定を行う総合判定回路とを具備する検出処理
装置と、 前記の総合的な判定結果に基づき、前記紙カツ
プ搬送装置の振分放出装置によつて良品と不良品
を分別することを特徴とする紙カツプの自動表面
検査装置。 2 前記割出しテーブルと前記太陽歯車とは、そ
れぞれ独立したモータで駆動されることを特徴と
する特許請求の範囲第1項記載の紙カツプの自動
表面検査装置。 3 前記カツプホルダの底には、その自転軸の中
空室に通過する穴が形成され、該自転軸の中空室
は、真空源に連通して、紙カツプがカツプホルダ
に吸着保持されるようになされていることを特徴
とする特許請求の範囲第1項又は第2項記載の紙
カツプの自動表面検査装置。 4 前記割出しテーブルの休止期間に、前記カツ
プホルダに受け入れられた紙カツプを該カツプホ
ルダに押し入れて適切に位置づけるための押込み
機構が設けられていることを特徴とする特許請求
の範囲第1項から第3項までのいずれかに記載の
紙カツプの自動表面検査装置。 5 前記押込み機構は、ピストンシリンダ装置
と、該ピストンシリンダ装置により駆動されて上
下する押込み円板とを有していることを特徴とす
る特許請求の範囲第4項記載の紙カツプの自動表
面検査装置。 6 前記割出しテーブルの周囲には、少なくとも
供給ステーシヨンと検査ステーシヨンと放出ステ
ーシヨンとの順で設けられ、前記供給手段は前記
供給ステーシヨンに設けられ、前記カツプホルダ
の底には穴が形成され、該カツプホルダの自転軸
には、前記カツプホルダの底の前記穴に連通し且
つ放射方向に延びる連通孔とを有する中空室が形
成され、前記割出しテーブルには、前記カツプホ
ルダの自転軸を回転自在に保持し且つ前記放射方
向孔を囲む環状チヤンネルを有するボス部材が固
定され、更に、前記割出しテーブルの公転軸に
は、前記環状チヤンネルと連通する孔を有する第
1の環状部材が固定され、そして、該第1の環状
部材の孔と選択的に連通するように該第1の環状
部材側に開放して周方向に延びる中空室が形成さ
れた第2の環状部材が、前記公転軸を回転自在に
受け入れて装置のフレームに固定支持され、前記
第2環状部材の中空室は、供給ステーシヨンと検
査ステーシヨンとに対応するように周方向に広が
りそして真空源に接続された真空室と、放出ステ
ーシヨンとに対応すように周方向に広がりそして
圧力源に接続された高圧室とに分かれて、紙カツ
プは、供給ステーシヨンにおいてカツプホルダに
供給されると、カツプホルダに吸着保持されその
あとも検査ステーシヨンまで吸着保持され続け、
そして、放出ステーシヨンに達するとカツプホル
ダから放出されるようになされたことを特徴とす
る特許請求の範囲第1項又は第2項記載の紙カツ
プの自動表面検査装置。 7 供給ステーシヨンと検査ステーシヨンとの間
に押込みステーシヨンがあり、カツプホルダに吸
着保持された紙カツプを該カツプホルダに押し入
れて適切に位置づけるための押込み機構が設けら
れていることを特徴とする特許請求の範囲第6項
記載の紙カツプの自動表面検査装置。 8 放出ステーシヨンは、不良品排出ステーシヨ
ンと良品送出しステーシヨンとを含み、前記第2
の環状部材の前記高圧室は、不良品排出ステーシ
ヨンに対応するように周方向に広がり第1の弁を
介して圧力源に接続された第1高圧室と、良品送
出しステーシヨンに対応するように周方向に広が
り第2の弁を介して圧力源に接続された第2高圧
室とに分かれ、前記第1の弁と第2の弁を選択的
に開くことによつて紙カツプを振り分けられるよ
うになされたことを特徴とする特許請求の範囲第
6項又は第7項記載の紙カツプの自動表面検査装
置。 9 前記照明手段は、点光源と集光用シリンドリ
カルレンズとを具備し、走査方向に細長い領域に
光を集中させるようになされていることを特徴と
する特許請求の範囲第1項から第8項のいずれか
に記載された紙カツプの自動表面検査装置。 10 前記照明手段は、点光源と集光用の円筒形
反射鏡とを具備し、走査方向に細長い領域に光を
集中させるようになされていることを特徴とする
特許請求の範囲第1項から第8項のいずれかに記
載された紙カツプの自動表面検査装置。 11 前記照明手段は、棒状光源と、集光用の円
形凸レンズとを具備し、走査方向に細長い領域に
光を集中させるようになされていることを特徴と
する特許請求の範囲第1項から第8項のいずれか
に記載された紙カツプの自動表面検査装置。 12 前記照明手段は、紙カツプの側面継目部分
に陰ができるように前記ラインセンサと紙カツプ
の自転軸とを含む面から外れた位置に置かれてい
ることを特徴とする特許請求の範囲第1項から第
11項のいずれかに記載の紙カツプの自動表面検
査装置。 13 前記表面検査装置において、紙カツプの検
査面の撮像用レンズの光軸に対するあおりの方向
と反対の方向に前記ラインセンサの結像面があお
られて、被写界深度が深くなるようになされてい
ることを特徴とする特許請求の範囲第1項から第
12項のいずれかに記載の紙カツプの自動表面検
査装置。 14 前記検出軸変換回路は、ドツト数が主走査
方向の一走査の画素数Nであるシフトレジスタn
個を直列に接続し、各シフトレジスタの出力画素
データを動的平均回路に加え、該動的平均回路の
出力をn個のシフトレジスタの中央のシフトレジ
スタとして出力するようにした、特許請求の範囲
第1項記載の自動表面検査装置。 15 前記副走査方向基準座標設定回路は、紙カ
ツプの側面継目を基準軸として検出する特許請求
の範囲第1項から第14項のいずれかに記載の紙
カツプの自動表面検査装置。 16 前記副走査方向基準座標設定回路は、入力
デジタル画素信号を各走査線ごとに合計する回路
と、前記合計値より一定値を差引く基準線強調回
路と、前記基準線強調回路出力の動的平均値を計
算する回路と、前記基準線強調回路出力から動的
平均値を差引く減算器と、前記減算器出力と基準
値を加算する加算器とを具備し、この加算器出力
が0又は負とき、その走査線を基準線とする特許
請求の範囲第15項記載の自動表面検査装置。 17 前記主走査方向基準座標軸設定回路は、各
走査開始後、画像信号が暗を表わす状態から明を
表わす状態に変るときを検出して、紙カツプの上
端エツジと側面底面間継目とをマスク処理させる
ための信号を前記第1の判定回路に出力すること
を特徴とする特許請求の範囲第1項から第16項
のいずれかに記載の紙カツプの自動表面検査装
置。 18 前記前処理回路は、デジタル画素信号Eに
対して座標において隣接する上下左右の画素につ
いてのデジタル画素信号の和g1を求める第1の加
算器と、デジタル画素信号Eに対して座標におい
て斜めに隣接する右上、右下、左上、左下の画素
についてのデジタル画素信号の和g2を求める第2
の加算器と、選択によりg1又は(g1+g2)/2を
周辺データgとして出力する第1の演算回路と、
重み付け係数Kを与える係数回路と、周辺データ
gと重み付け係数Kとデジタル画素信号Eとを受
けて、輪郭強調信号(K+4)−g/Kと平滑化信号 KE+g/K+4を演算する第2の演算回路と、輪郭強調 信号と平滑化信号とを選択的に出力する選択回路
とを具備する輪郭強調兼平滑化回路を有している
ことを特徴とする特許請求の範囲第1項から第1
7項のいずれかに記載の紙カツプの自動表面検査
装置。 19 前記主走査方向及び副走査方向の汚れ検出
回路は、入力デジタル画素信号の第1の動的平均
値を求める第1動的平均値回路と、入力信号から
前記第1の動的平均値を差引く減算器と、この減
算器出力を十分に深い第1のスレツシヨルドでス
ライスして濃度の高い汚れを検出する回路と、前
記減算器出力から第2の動的平均値を求める第2
の動的平均値回路と、この第2の動的平均値を第
1のスレツシヨルドより浅い第2のスレツシヨル
ドでスライスして濃度の低い汚れの範囲を検出す
る回路と、この汚れの範囲を拡大する回路と、こ
の拡大した範囲を検査区間として前記減算器出力
を十分に浅い第3のスレツシヨルドでスライスし
て濃度の低い汚れを検出するように構成した汚れ
情報抽出回路を具備していることを特徴とする特
許請求の範囲第1項から第18項までのいずれか
に記載の自動表面検査装置。 20 前記主走査方向の汚れ検出回路は主走査方
向と直交又は斜交するマスクすべき部分のみマス
クする手段を有し、副走査方向の汚れ検出回路は
副走査方向と直交又は斜交するマスクすべき部分
のみをマスクする手段を有することを特徴とする
特許請求の範囲第19項記載の自動表面検査装
置。 21 側面継目の上部折れ曲り部のマスクパター
ンは、第1のリフアレンスメモリに蓄えておき、
前記汚れ検出回路は、紙カツプの走査開始から前
記第1のリフアレンスメモリのマスクパターンの
副走査方向の長さに相当する時間だけで遅れて汚
れ検出を開始することを特徴とする特許請求の範
囲第1項から第20項までのいずれかに記載の紙
カツプの自動表面検査装置。 22 マスクパターンの位置が副走査方向基準軸
によつて決まる検査範囲に対しては、別に汚れ情
報メモリとマスク照合回路を設け、副走査方向基
準軸信号を受けるまでは前記第1及び第2判定回
路からの汚れ情報を前記汚れ情報メモリに記憶さ
せておき、副走査方向基準軸検出後は前記第1及
び第2の判定回路においてマスクパターン情報に
基づいてマスク処理を行いつつ汚れ情報の検出を
行つて総合判定回路に出力し、被検査物体の全範
囲の走査完了後に前記汚れ情報メモリ内の汚れ情
報とそれに対応するリフアレンスメモリ内のマス
クパターンとを前記マスク照合回路によつて照合
し、該照合回路からの汚れ情報を総合判定回路に
出力するようにしたことを特徴とする特許請求の
範囲第1項から第21項までのいずれかに記載の
自動表面検査装置。 23 前記汚れ情報メモリに記憶された汚れ情報
と、それに対応する前記リフアレンスメモリ内の
マスクパターンとの照合は、アドレス番号の高い
方から低い方へ順に行なわれることを特徴とする
特許請求の範囲第22項に記載の紙カツプの自動
表面検査装置。
[Claims] 1. A rotary indexing table that is driven intermittently;
a cup holder disposed around the indexing table, supported so as to be able to rotate relative to the indexing table, and having a concave portion that tightly receives the lower part of the paper cup; and a cup holder that rotates relative to the rotation axis of the indexing table. A sun gear that is freely and coaxially mounted and driven continuously, a planetary gear that is fixed to the rotation axis of the cup holder and meshes with the sun gear, and a supply means for supplying paper cups to the cup holder are arranged. the paper cup held in the cup holder; Katsupu is
As the indexing table rotates, it revolves together with the indexing table, and as the sun gear continues to rotate, it rotates at a constant speed through the planetary gears independently of the rotation of the indexing table. a paper cup transport device; an illumination means for illuminating the paper cup rotating on its axis in the inspection station; A surface detection device comprising a line sensor composed of a solid-state image sensor and outputting an analog pixel signal; and a preprocessing device that receives the analog pixel signal output from the surface detection device, shapes its waveform, converts it into a digital signal, and outputs it. and a data processing section that receives digital pixel signals from the preprocessing section and performs dirt detection, and the data processing section receives digital pixel signals from the preprocessing section and detects dirt in the main scanning direction. a detection axis conversion circuit for converting pixel data into pixel data in the sub-scanning direction; a main-scanning direction reference coordinate setting circuit for detecting a reference axis in the main-scanning direction in response to a digital pixel signal from the detection-axis conversion circuit; a sub-scanning direction reference coordinate setting circuit that receives digital pixel signals from the pre-processing section to detect a reference axis in the sub-scanning direction; and a sub-scanning direction reference coordinate setting circuit that receives digital pixel signals from the pre-processing section and detects a reference axis in the sub-scanning direction; A mask pattern circuit generates pattern information, and for areas to be masked by receiving digital pixel signals from the preprocessing section, dirt is detected in the main scanning direction while receiving mask information from the mask pattern circuit and performing mask processing. A main scanning direction contamination detection circuit having a first judgment circuit that performs processing, and a masking process for a portion to be masked by receiving a digital pixel signal from the detection axis conversion circuit by receiving mask information from the mask pattern circuit. a sub-scanning direction dirt detection circuit having two judgment circuits that perform dirt detection processing in the sub-scanning direction while performing the above-mentioned dirt detection processing; a detection processing device comprising a judgment circuit; and a sorting and discharging device of the paper cup conveying device to separate non-defective items from defective items based on the comprehensive judgment result. Surface inspection equipment. 2. The automatic paper cup surface inspection apparatus according to claim 1, wherein the indexing table and the sun gear are each driven by independent motors. 3. A hole is formed in the bottom of the cup holder to pass through the hollow chamber of the rotating shaft, and the hollow chamber of the rotating shaft is communicated with a vacuum source so that the paper cup is held by suction on the cup holder. An automatic surface inspection device for paper cups according to claim 1 or 2, characterized in that: 4. The invention further comprises a pushing mechanism for pushing a paper cup received into the cup holder into the cup holder to properly position it during a period when the indexing table is not in use. An automatic surface inspection device for paper cups according to any of items up to 3. 5. The automatic surface inspection of paper cups according to claim 4, wherein the pushing mechanism includes a piston cylinder device and a pushing disk that moves up and down by being driven by the piston cylinder device. Device. 6. Around the indexing table, at least a supply station, an inspection station, and a discharge station are provided in the order, the supply means is provided in the supply station, and a hole is formed in the bottom of the cup holder, and the cup holder is provided with a hole. A hollow chamber having a communication hole communicating with the hole in the bottom of the cup holder and extending in a radial direction is formed in the rotation axis of the cup holder, and the index table rotatably holds the rotation axis of the cup holder. A boss member having an annular channel surrounding the radial hole is fixed to the indexing table, and a first annular member having a hole communicating with the annular channel is fixed to the revolution axis of the indexing table. A second annular member having a hollow chamber opened to the first annular member and extending in the circumferential direction so as to selectively communicate with the hole of the first annular member is rotatable about the revolution axis. The second annular member is fixedly received and supported on the frame of the apparatus, and the hollow chamber of the second annular member extends circumferentially to accommodate a supply station and a test station, and a vacuum chamber connected to a vacuum source and a discharge station. The paper cup is divided into a high-pressure chamber correspondingly extending in the circumferential direction and connected to a pressure source, and when the paper cup is fed to the cup holder at the supply station, it is held by suction on the cup holder and thereafter held by suction until it reaches the inspection station. continue,
The automatic surface inspection device for paper cups according to claim 1 or 2, wherein the paper cup is ejected from the cup holder upon reaching the ejection station. 7. Claims characterized in that there is a pushing station between the supply station and the inspection station, and a pushing mechanism is provided for pushing the paper cup suctioned and held in the cup holder into the cup holder and positioning it appropriately. The automatic surface inspection device for paper cups according to item 6. 8. The discharge station includes a defective product discharge station and a non-defective product delivery station, and
The high pressure chamber of the annular member includes a first high pressure chamber that extends in the circumferential direction and is connected to a pressure source via a first valve so as to correspond to a defective product discharge station, and a first high pressure chamber that corresponds to a good product delivery station. It is divided into a second high pressure chamber extending in the circumferential direction and connected to a pressure source via a second valve, and paper cups can be sorted by selectively opening the first valve and the second valve. An automatic surface inspection device for paper cups as claimed in claim 6 or 7, characterized in that the apparatus is made by: 9. Claims 1 to 8, characterized in that the illumination means includes a point light source and a condensing cylindrical lens, and is configured to concentrate light in an elongated area in the scanning direction. An automatic surface inspection device for paper cups described in any of the above. 10. The illumination means comprises a point light source and a cylindrical reflecting mirror for condensing light, and is configured to concentrate light in an elongated area in the scanning direction. An automatic surface inspection device for paper cups as described in any of Item 8. 11. Claims 1 to 1, characterized in that the illumination means includes a rod-shaped light source and a circular convex lens for condensing light, and is configured to concentrate light in an elongated area in the scanning direction. An automatic surface inspection device for paper cups as described in any of Item 8. 12. Claim 1, characterized in that the illumination means is placed at a position away from a plane containing the line sensor and the rotation axis of the paper cup so as to cast a shadow on the side seam of the paper cup. An automatic surface inspection device for paper cups according to any one of items 1 to 11. 13 In the surface inspection device, the imaging surface of the line sensor is tilted in a direction opposite to the direction in which the inspection surface of the paper cup is tilted with respect to the optical axis of the imaging lens, so that the depth of field is deepened. An automatic surface inspection device for paper cups according to any one of claims 1 to 12. 14 The detection axis conversion circuit includes a shift register n whose number of dots is the number N of pixels in one scan in the main scanning direction.
n shift registers are connected in series, the output pixel data of each shift register is added to a dynamic averaging circuit, and the output of the dynamic averaging circuit is output as a central shift register of n shift registers. Automatic surface inspection device according to scope 1. 15. The automatic paper cup surface inspection apparatus according to claim 1, wherein the sub-scanning direction reference coordinate setting circuit detects a side seam of the paper cup as a reference axis. 16 The sub-scanning direction reference coordinate setting circuit includes a circuit that totals input digital pixel signals for each scanning line, a reference line emphasis circuit that subtracts a certain value from the total value, and a dynamic control circuit for the output of the reference line emphasis circuit. The circuit includes a circuit that calculates an average value, a subtracter that subtracts the dynamic average value from the output of the reference line emphasis circuit, and an adder that adds the output of the subtracter and the reference value, and the output of the adder is 0 or 0. 16. The automatic surface inspection apparatus according to claim 15, wherein when negative, the scanning line is used as a reference line. 17 After the start of each scan, the main scanning direction reference coordinate axis setting circuit detects when the image signal changes from a dark state to a bright state, and performs mask processing on the top edge and the seam between the side and bottom surfaces of the paper cup. 17. The automatic paper cup surface inspection apparatus according to claim 1, wherein a signal for determining the surface of a paper cup is output to the first determination circuit. 18 The preprocessing circuit includes a first adder that calculates the sum g1 of digital pixel signals for pixels on the upper, lower, left, and right sides of the digital pixel signal E that are adjacent to each other in coordinates; The second step is to calculate the sum g2 of the digital pixel signals for the upper right, lower right, upper left, and lower left pixels adjacent to
a first arithmetic circuit that outputs g 1 or (g 1 +g 2 )/2 as peripheral data g depending on the selection;
A second operation that receives a coefficient circuit that provides a weighting coefficient K, peripheral data g, a weighting coefficient K, and a digital pixel signal E, and calculates an edge enhancement signal (K+4)-g/K and a smoothed signal KE+g/K+4. Claims 1 to 1 include an edge enhancement/smoothing circuit comprising a circuit and a selection circuit that selectively outputs an edge enhancement signal and a smoothed signal.
The automatic surface inspection device for paper cups according to any one of Item 7. 19 The dirt detection circuit in the main scanning direction and the sub-scanning direction includes a first dynamic average value circuit that calculates a first dynamic average value of input digital pixel signals, and a first dynamic average value circuit that calculates the first dynamic average value from the input signal. a subtracter for subtracting; a circuit for slicing the output of the subtracter at a sufficiently deep first threshold to detect high-density dirt; and a second circuit for calculating a second dynamic average value from the output of the subtracter;
a dynamic average value circuit, a circuit for slicing this second dynamic average value with a second threshold shallower than the first threshold to detect a range of dirt with low concentration, and a circuit for enlarging the range of this dirt. and a dirt information extraction circuit configured to slice the output of the subtracter at a sufficiently shallow third threshold using this expanded range as an inspection section to detect low-density dirt. An automatic surface inspection device according to any one of claims 1 to 18. 20 The dirt detection circuit in the main scanning direction has a means for masking only the portion to be masked that is perpendicular or oblique to the main scanning direction, and the dirt detection circuit in the sub-scanning direction has means for masking only the portion to be masked that is perpendicular or oblique to the sub-scanning direction. 20. The automatic surface inspection apparatus according to claim 19, further comprising means for masking only the desired portion. 21 The mask pattern of the upper bend of the side seam is stored in the first reference memory,
The dirt detection circuit starts dirt detection with a delay of a time corresponding to the length of the mask pattern in the first reference memory in the sub-scanning direction from the start of scanning the paper cup. An automatic surface inspection device for paper cups according to any one of items 1 to 20. 22 For the inspection range where the position of the mask pattern is determined by the sub-scanning direction reference axis, a dirt information memory and a mask matching circuit are separately provided, and the first and second judgments are performed until the sub-scanning direction reference axis signal is received. The dirt information from the circuit is stored in the dirt information memory, and after the reference axis in the sub-scanning direction is detected, the dirt information is detected while performing mask processing based on the mask pattern information in the first and second determination circuits. and outputting it to a comprehensive judgment circuit, and after completion of scanning the entire range of the object to be inspected, the dirt information in the dirt information memory and the corresponding mask pattern in the reference memory are collated by the mask matching circuit; 22. The automatic surface inspection apparatus according to claim 1, wherein the dirt information from the verification circuit is output to a comprehensive judgment circuit. 23. Claims characterized in that the dirt information stored in the dirt information memory and the corresponding mask pattern in the reference memory are compared in order from the highest address number to the lowest address number. The automatic surface inspection device for paper cups according to item 22.
JP12016681A 1981-07-31 1981-07-31 Automatic surface inspection apparatus for paper cups Granted JPS5821547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12016681A JPS5821547A (en) 1981-07-31 1981-07-31 Automatic surface inspection apparatus for paper cups

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12016681A JPS5821547A (en) 1981-07-31 1981-07-31 Automatic surface inspection apparatus for paper cups

Publications (2)

Publication Number Publication Date
JPS5821547A JPS5821547A (en) 1983-02-08
JPH0312254B2 true JPH0312254B2 (en) 1991-02-19

Family

ID=14779573

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12016681A Granted JPS5821547A (en) 1981-07-31 1981-07-31 Automatic surface inspection apparatus for paper cups

Country Status (1)

Country Link
JP (1) JPS5821547A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07248300A (en) * 1994-03-09 1995-09-26 Kyoritsu Denko Kk Part inspection device
JP4641120B2 (en) * 2001-06-08 2011-03-02 大日本印刷株式会社 Square paper cup appearance inspection device
JP2005265488A (en) * 2004-03-17 2005-09-29 Nidec Tosok Corp Inspection method using polar coordinates developed image
JP7081086B2 (en) * 2017-05-25 2022-06-07 大日本印刷株式会社 Inspection equipment, inspection method

Also Published As

Publication number Publication date
JPS5821547A (en) 1983-02-08

Similar Documents

Publication Publication Date Title
JPH0312253B2 (en)
US4969746A (en) Component inspection apparatus and method
JP3612444B2 (en) Container inspection apparatus and method using single area array sensor and alternating strobe light source
JP3754003B2 (en) Defect inspection apparatus and method
WO2012158674A1 (en) Inspecting and sorting small manufactured objects at a plurality of inspection stations
US20080093538A1 (en) Machine for inspecting glass containers
US20100208980A1 (en) Apparatus and method for detecting defects in wafer manufacturing
US6433293B1 (en) Method and device for detecting dirt as present on articles, for example eggs
US20110007149A1 (en) Machine For Inspecting Glass Containers At An Inspection Station Using An Addition Of A Plurality Of Illuminations Of Reflected Light
WO2011071035A1 (en) Appearance inspection device
JP2000180382A (en) Visual examination apparatus
JP4589101B2 (en) Surface inspection method and apparatus
JP5654486B2 (en) Appearance inspection device
JPH07218451A (en) Device for optically inspecting steel plate for surface flaw
JPH0312254B2 (en)
JP2003215055A (en) Inspection apparatus
JPH0634573A (en) Bottle inspector
JPH0862155A (en) Object 0bserving apparatus
JP5425387B2 (en) Machine for inspecting glass containers
JP3810599B2 (en) Defect detection device
JPH06118026A (en) Method for inspecting vessel inner surface
US20060051086A1 (en) Method for photographically recording a cylindrical, especially plate-shaped object
JP2000111491A (en) Appearance inspection apparatus
JPH06160289A (en) Inner face inspection equipment for circular vessel
JP3314249B2 (en) Appearance inspection device for deep bottom goods