Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0721825B2 - Image capture device - Google Patents
[go: Go Back, main page]

JPH0721825B2 - Image capture device - Google Patents

Image capture device

Info

Publication number
JPH0721825B2
JPH0721825B2 JP1190872A JP19087289A JPH0721825B2 JP H0721825 B2 JPH0721825 B2 JP H0721825B2 JP 1190872 A JP1190872 A JP 1190872A JP 19087289 A JP19087289 A JP 19087289A JP H0721825 B2 JPH0721825 B2 JP H0721825B2
Authority
JP
Japan
Prior art keywords
image
image data
data
memory
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1190872A
Other languages
Japanese (ja)
Other versions
JPH0354677A (en
Inventor
益司 中田
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.)
Nidec Instruments Corp
Original Assignee
Sankyo Seiki Manufacturing 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 Sankyo Seiki Manufacturing Co Ltd filed Critical Sankyo Seiki Manufacturing Co Ltd
Priority to JP1190872A priority Critical patent/JPH0721825B2/en
Publication of JPH0354677A publication Critical patent/JPH0354677A/en
Publication of JPH0721825B2 publication Critical patent/JPH0721825B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Input (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、画像取り込み装置に関するものであり、例え
ば、画像処理による対象物体の正否や良否の判別等に利
用可能なものである。
TECHNICAL FIELD The present invention relates to an image capturing device, and can be used, for example, for determining whether a target object is correct or defective by image processing.

(従来の技術) 画像取り込み装置は、画像処理装置等に対象物体の画像
信号を入力するために用いられる。画像取り込み装置に
対して対象物体が一定速度で相対移動するものであると
きは画像取り込み装置にラインスキャナが用いられ、相
対移動する上記物体の画像データを所定のタイミングで
取り込む。このとき、画像取り込み装置と物体との相対
速度が所定の速度と異なったり変動したりすると、物体
の像が歪んだ像として取り込まれることになるので、従
来のこの種の画像取り込み装置では物体の搬送に同期さ
せて画像取り込み装置を駆動するようにしている。
(Prior Art) An image capturing device is used to input an image signal of a target object to an image processing device or the like. When the target object moves relative to the image capturing device at a constant speed, a line scanner is used in the image capturing device to capture image data of the relative moving object at a predetermined timing. At this time, if the relative speed between the image capturing device and the object is different or fluctuates from the predetermined speed, the image of the object is captured as a distorted image. The image capturing device is driven in synchronization with the conveyance.

第8図、第9図は、従来のラインスキャナを用いた画像
取り込み装置の例を示す。第8図、第9図において、例
えば缶の蓋などの円形の対象物体21は、前後のプーリ3
1,32間に掛け渡されたベルト22の上に載せられて搬送さ
れる。物体21の搬送通路の上方には物体21を照明するた
めの照明光源23が配置されると共に、物体21からの反射
光路上にレンズ24とラインスキャナ25がこの順に配置さ
れている。レンズ24は物体21の像をラインスキャナ25上
に結像させる。ラインスキャナ25は例えばCCD等を用い
たラインセンサでなり、ラインスキャナ駆動回路26によ
り一定のタイミングで駆動され、これにより物体21の画
像データを一定のタイミングで取り込む。ラインスキャ
ナ25で取り込まれた物体21の画像データはラインスキャ
ナ駆動回路26を経てアナログ・デジタル変換器27でデジ
タル信号に変換され、メモリ28に記憶される。メモリ28
の動作はマイクロ・プロセシング・ユニット(MPU)29
によって制御され、また、MPU29は記憶された物体の画
像データに基づいて演算を行い、物体21の良否その他の
判定を行う。
8 and 9 show an example of an image capturing device using a conventional line scanner. In FIGS. 8 and 9, a circular target object 21 such as a can lid is a front and rear pulley 3
It is carried on a belt 22 that is stretched between 1 and 32. An illumination light source 23 for illuminating the object 21 is arranged above the transportation path of the object 21, and a lens 24 and a line scanner 25 are arranged in this order on the optical path reflected from the object 21. The lens 24 forms an image of the object 21 on the line scanner 25. The line scanner 25 is, for example, a line sensor using a CCD or the like, and is driven by the line scanner drive circuit 26 at a constant timing, whereby the image data of the object 21 is captured at a constant timing. The image data of the object 21 captured by the line scanner 25 is converted into a digital signal by the analog / digital converter 27 via the line scanner drive circuit 26 and stored in the memory 28. Memory 28
The operation of the micro processing unit (MPU) 29
Further, the MPU 29 performs a calculation based on the stored image data of the object to determine whether the object 21 is good or bad.

いま、第10図ないし第13図に示すように物体の搬送方向
をY、これに直交する方向をX、物体の半径をRとす
る。ベルト22による物体21の搬送速度が所定の速度であ
るとすれば、画像取り込み装置によって取り込まれ記憶
された物体の画像は、第10図に示すように物体21の形と
同じ画像になる。しかし、ベルト22の速度が所定の速度
より速すぎると、物体の画像は第11図に示すように搬送
方向に長く短径がRの楕円形になり、ベルト22の速度が
所定の速度より遅いと、物体の画像は第12図に示すよう
に搬送方向に直交する方向に長く長径がRの楕円形にな
る。また、搬送速度が途中で変動すると、第13図に示す
ように物体の画像が卵型等に歪む。
Now, as shown in FIGS. 10 to 13, the transport direction of the object is Y, the direction orthogonal thereto is X, and the radius of the object is R. Assuming that the conveyance speed of the object 21 by the belt 22 is a predetermined speed, the image of the object captured and stored by the image capturing device has the same image as the shape of the object 21 as shown in FIG. However, if the speed of the belt 22 is faster than the predetermined speed, the image of the object becomes elliptical with a long axis in the conveying direction and a short radius R as shown in FIG. 11, and the speed of the belt 22 is slower than the predetermined speed. Then, as shown in FIG. 12, the image of the object becomes an ellipse whose long axis is long in the direction orthogonal to the carrying direction and whose major axis is R. Also, if the transport speed fluctuates midway, the image of the object is distorted into an egg shape or the like as shown in FIG.

何れにせよ、ベルト22による物体の搬送速度が速すぎた
り遅かったり変動したりすると、画像取り込み装置で得
られる画像は歪んだものになり、正しい画像処理等を行
うことはできないので、従来の画像取り込み装置では、
画像取り込みのタイミングをベルト22による物体21の搬
送に同期させるようにしている。具体的には、第8図に
示すベルト22のプーリ31にロータリーエンコーダ33を取
付け、エンコーダ33からの信号に同期させてラインスキ
ャナ駆動回路26を動作させ、1ライン分ずつ画像を取り
込むようにしている。
In any case, if the conveyance speed of the object by the belt 22 is too fast, slow, or fluctuates, the image obtained by the image capturing device becomes distorted, and correct image processing cannot be performed. In the capture device,
The image capturing timing is synchronized with the conveyance of the object 21 by the belt 22. Specifically, a rotary encoder 33 is attached to the pulley 31 of the belt 22 shown in FIG. 8, and the line scanner drive circuit 26 is operated in synchronization with the signal from the encoder 33 so that images are captured line by line. There is.

(発明が解決しようとする課題) 上記従来の画像取り込み装置によれば、精度よく画像デ
ータを取り込もうとすれば、高分解能で高価なエンコー
ダを必要とし、また、搬送系に設けたエンコーダと画像
取り込み装置とをつなぐ必要があって構成が面倒であっ
た。
(Problems to be Solved by the Invention) According to the above-mentioned conventional image capturing device, in order to capture image data with high accuracy, an expensive encoder with high resolution is required, and the encoder provided in the transport system and the image capturing The configuration was troublesome because it needed to be connected to the device.

本発明は、かかる従来技術の問題点を解消するためにな
されたもので、搬送装置側にエンコーダを設けることな
く、かつ、搬送系と画像取り込み装置側とを独立させな
がら、精度の高い画像データを得ることができる画像取
り込み装置を提供することを目的とする。
The present invention has been made in order to solve the problems of the prior art, and provides highly accurate image data without providing an encoder on the transport device side and independently of the transport system and the image capturing device side. It is an object of the present invention to provide an image capturing device capable of obtaining the above.

(課題を解決するための手段) 本発明は、定まった形状の物体を相対移動させながら物
体の画像データを所定のタイミングで取り込むラインス
キャナと、物体の所定の搬送速度における画像データを
基準画像として記憶すると共にラインスキャナにより取
り込まれる画像データを記憶するメモリ手段と、記憶さ
れた画像データを上記基準画像と比較し、搬送速度の差
による上記取り込まれた画像データと上記基準画像との
搬送方向に関してのデータ位置の差を確認する認識部と
を有することを特徴とする。
(Means for Solving the Problem) According to the present invention, a line scanner that captures image data of an object at a predetermined timing while relatively moving an object of a fixed shape, and image data at a predetermined transport speed of the object as a reference image. Memory means for storing and storing image data captured by a line scanner, comparing the stored image data with the reference image, and regarding the transport direction between the captured image data and the reference image due to a difference in transport speed. And a recognition unit that confirms the difference between the data positions of.

(作用) 物体とラインスキャナとの相対速度が速すぎたり遅くな
ったりして取り込まれた画像データに歪みがあっても、
基準画像との比較によって両者の差を認識することがで
き、認識された差に基づいて画像データを補正すること
ができる。
(Function) Even if the relative speed between the object and the line scanner is too fast or slow and the captured image data is distorted,
The difference between the reference image and the reference image can be recognized, and the image data can be corrected based on the recognized difference.

(実施例) 以下、第1図ないし第7図を参照しながら本発明にかか
る画像取り込み装置の実施例について説明する。
(Embodiment) An embodiment of the image capturing apparatus according to the present invention will be described below with reference to FIGS. 1 to 7.

第1図に示す実施例は、定まった形状、例えば円形の缶
の上面又は瓶の蓋等を対象物体1とし、対象物体1の汚
れ、傷、印刷ずれ等の検査に用いられるものの例であ
る。物体1を搬送するベルト2、照明光源3、レンズ
4、ラインスキャナ5は、前述の従来例と同様の配置関
係になっている。なお、照明光源3は例えばLEDを直線
状に配列したもので構成することができる。ラインスキ
ャナ5は例えば1次元のCCDで構成され、ベルト2の幅
方向の1ラインの画像を取り込むことができる。ライン
スキャナ5はラインスキャナ駆動回路6によって所定の
タイミングで駆動され、ベルト2上を相対移動する物体
1の画像データを所定のタイミングで取り込む。取り込
まれた画像データはアナログ・デジタル変換器7で多値
のデジタル信号に変換され、入力画像メモリ8に記憶さ
れる。画像メモリ8には多値化された画像データが記憶
されるが、2値化された画像データを記憶するようにし
てもよい。入力画像メモリ8のデータ読み込み読み出し
動作はMPU9によって制御される。MPU9は、形状情報メモ
リ10、メモリ11、補正データメモリ12をそれぞれ制御す
る。形状情報メモリ10は、各種物体の所定の搬送速度に
おける画像データを基準画像として記憶している。MPU9
は上記基準画像の中から実際に取り扱う物体1の基準画
像を選択してメモリ11に記憶させ、この選択された基準
画像と上記入力画像メモリ8記憶された入力画像のデー
タとを比較する。MPU9は、物体1とラインスキャナ5と
の相対的な搬送速度の差による入力画像データと上記基
準画像との搬送方向に関してのデータ位置の差を演算し
認識する認識部を構成していて、認識されたデータ位置
の差を補正データとして補正メモリ12に記憶させる。こ
の補正データを用いて画像処理を行ってもよいし、補正
データを用いて入力画像を修正して画像処理に供するよ
うにしてもよい。特許請求の範囲でいうメモリ手段は、
入力画像メモリ8、形状情報メモリ10によって構成され
ている。
The embodiment shown in FIG. 1 is an example of a target object 1 having a fixed shape, for example, the upper surface of a can or a lid of a bottle, which is used to inspect the target object 1 for stains, scratches, print misalignment, and the like. . The belt 2, which conveys the object 1, the illumination light source 3, the lens 4, and the line scanner 5 have the same positional relationship as in the above-described conventional example. The illumination light source 3 can be configured by arranging LEDs linearly, for example. The line scanner 5 is composed of a one-dimensional CCD, for example, and can capture an image of one line in the width direction of the belt 2. The line scanner 5 is driven by the line scanner drive circuit 6 at a predetermined timing, and takes in the image data of the object 1 relatively moving on the belt 2 at a predetermined timing. The captured image data is converted into a multi-valued digital signal by the analog / digital converter 7 and stored in the input image memory 8. The image memory 8 stores multi-valued image data, but it may store binarized image data. The data reading / reading operation of the input image memory 8 is controlled by the MPU 9. The MPU 9 controls the shape information memory 10, the memory 11, and the correction data memory 12, respectively. The shape information memory 10 stores image data of various objects at a predetermined transport speed as a reference image. MPU9
Selects a reference image of the object 1 to be actually handled from the reference images and stores it in the memory 11, and compares the selected reference image with the data of the input image stored in the input image memory 8. The MPU 9 constitutes a recognition unit that calculates and recognizes a difference in data position between the input image data and the reference image in the conveyance direction due to a relative difference in conveyance speed between the object 1 and the line scanner 5. The difference between the determined data positions is stored in the correction memory 12 as correction data. Image processing may be performed using this correction data, or an input image may be corrected using the correction data and used for image processing. The memory means in the claims is,
It is composed of an input image memory 8 and a shape information memory 10.

次に、上記実施例による補正データの作成動作の概略を
説明する。対象物体1の外形が円形であるとするとその
搬送方向に沿った中心線より片側に着目して補正データ
を作成する。形状情報メモリ10には正確な搬送速度で入
力された画像の外形のデータが基準画像として記憶され
ている。基準画像の入力は、実際に物体1を所定の速度
で搬送しながら入力してもよいし、計算によって例えば
円の方程式によりXの値に対するYの値を記憶させても
よい。いま、第2図に示すように、形状情報メモリ10に
記憶されている基準画像をA、実際に物体1が搬送され
てきた場合の入力画像データをBとする。そこで、画像
データBから物体1の外形データのXの値を調べ、さら
にXが基準画像Aに対して増加傾向にあるか減少傾向に
あるかを調べ、そのXの値に対する正しいYの値を求
め、その値と実際の物体1の値との差を補正データとし
て補正データメモリ12に記憶する。
Next, the outline of the correction data creating operation according to the above-described embodiment will be described. If the outer shape of the target object 1 is circular, the correction data is created by focusing on one side of the center line along the carrying direction. The shape information memory 10 stores, as a reference image, data of the outer shape of an image input at an accurate transport speed. The reference image may be input while the object 1 is actually conveyed at a predetermined speed, or the value of Y with respect to the value of X may be stored by calculation, for example, by the equation of a circle. Now, as shown in FIG. 2, the reference image stored in the shape information memory 10 is A, and the input image data when the object 1 is actually conveyed is B. Therefore, the X value of the outer shape data of the object 1 is checked from the image data B, and whether X tends to increase or decrease with respect to the reference image A is checked, and the correct Y value for the X value is determined. The difference between the calculated value and the actual value of the object 1 is stored in the correction data memory 12 as correction data.

次に、上記補正データ作成を第3図ないし第7図を参照
しながらさらに具体的に説明する。
Next, the correction data creation will be described more specifically with reference to FIGS. 3 to 7.

第3図に示すステップ1においてスイッチをオンしてス
タートさせると、ベルトコンベア2が所定の搬送方向に
動作し、照明光源3がオンされてベルトコンベア2上を
照明する。
When the switch is turned on and started in step 1 shown in FIG. 3, the belt conveyor 2 operates in a predetermined conveying direction, the illumination light source 3 is turned on, and the belt conveyor 2 is illuminated.

ステップ2において、スイッチがオンされたことによ
り、MPU9にこの信号が入力され、この信号を受けてMPU9
からラインスキャナ駆動回路6を駆動させる信号が出力
される。そして、ラインスキャナ5が1ラインの画像デ
ータを取り込む。取り込まれた画像データはアナログ・
デジタル変換器7によって例えば8ビット256階調のデ
ジタルデータに変換される。
This signal is input to the MPU9 when the switch is turned on in step 2, and the MPU9 receives this signal.
Outputs a signal for driving the line scanner drive circuit 6. Then, the line scanner 5 takes in the image data of one line. The captured image data is analog
The digital converter 7 converts the digital data into 8-bit 256-gradation digital data, for example.

変換された画像データはステップ3において入力画像メ
モリ8のY=1の列に記憶される。ラインスキャナ5の
1ラインの1セルごとの画像データは、第5図に示すよ
うに入力画像データの1画素ごとに記憶される。
The converted image data is stored in the column of Y = 1 of the input image memory 8 in step 3. The image data for each cell of one line of the line scanner 5 is stored for each pixel of the input image data as shown in FIG.

次に、ステップ4で対象物体1がラインスキャナ5の画
像入力面上に来たかどうかを判断する。ここでは、ステ
ップ3の画像データを用いMPU9で物体1の検出を行う。
具体的には、第7図に示すように、画像データの中に敷
居値Th以上の値が記憶されているかどうか判断し、敷居
値以上の値が記憶されていると判断されれば物体1を検
出したことになるので、次のステップ5に進む。一方、
1ライン上の画像データ全部が敷居値より小さい場合
は、ラインスキャナ5により画像を入力する領域内に物
体1が来ていないと判断し、ステップ2に戻る。そし
て、新たに入力した1ラインの画像データをステップ3
のY=1の列に記憶する。即ち、Y=1の列の中に既に
記憶されている画像データが消え、新たに入力されたデ
ータに変わる。こうして物体1が来たと判断されたとき
は、第5図に示すように、入力画像メモリ8には、Y=
1の列に必ず実際の物体1の画像データの先端が記憶さ
れることになる。
Next, in step 4, it is determined whether or not the target object 1 has arrived on the image input surface of the line scanner 5. Here, the object 1 is detected by the MPU 9 using the image data of step 3.
Specifically, as shown in FIG. 7, it is determined whether or not a value greater than or equal to a threshold value Th is stored in the image data, and if it is determined that a value greater than or equal to the threshold value is stored, the object 1 Since it has been detected, the process proceeds to the next step 5. on the other hand,
If all the image data on one line is smaller than the threshold value, it is determined that the object 1 is not within the area where the image is input by the line scanner 5, and the process returns to step 2. Then, the newly input 1-line image data is processed in step 3
In the column of Y = 1. That is, the image data already stored in the column of Y = 1 disappears and is replaced by the newly input data. When it is judged that the object 1 has come in this way, as shown in FIG.
The leading edge of the image data of the actual object 1 is always stored in the column 1.

ステップ5では、ステップ4で物体1を検出した場合
に、次の1ラインの画像データをステップ1と同様に入
力し、デジタル信号に変換する。
In step 5, when the object 1 is detected in step 4, the image data of the next one line is input as in step 1 and converted into a digital signal.

ステップ6で、上記ステップ5での次の1ライン画像デ
ータを第4図に示すように入力画像メモリ8のY=2の
列に記憶する。ステップ5,6は繰返し実行され、1ライ
ンごとの入力画像データがそれぞれY=1の列から順次
Y=Nの列まで画像入力メモリ8に記憶されていく。
In step 6, the next 1-line image data in step 5 is stored in the Y = 2 column of the input image memory 8 as shown in FIG. Steps 5 and 6 are repeatedly executed, and the input image data for each line is sequentially stored in the image input memory 8 from the column of Y = 1 to the column of Y = N.

ステップ7において、書き込まれた画像データの列が最
後の列、即ちY=Nの列まで至ったときには、メモリエ
ンドとしてステップ8に進む。もし、書き込まれた画像
データの列が最後の列でないときはステップ5に戻り、
次の1ラインの画像データを入力し、入力画像メモリ8
の次のYの列に順次記憶させていく。なお、Y方向の最
終の列は、物体1のY方向の大きさよりも十分大きな値
になっている。
In step 7, when the row of the written image data reaches the last row, that is, the row of Y = N, the process proceeds to step 8 as a memory end. If the written image data row is not the last row, the procedure returns to step 5,
Input the image data of the next one line and input image memory 8
Are sequentially stored in the column of Y next to. The final row in the Y direction has a value sufficiently larger than the size of the object 1 in the Y direction.

ステップ8では、ステップ5からステップ7までの動作
により入力された画像データをMPU9で処理し、図におけ
る物体1の左エッジの位置のXの値を検出する。ここで
はまず、入力画像データの先端のX座標と形状情報メモ
リ10における基準画像の先端のX座標との対応関係を把
握するために、Y1のときのX座標即ち先端のX座標を検
出する。以下、Y2,Y3,・・・・のときの左エッジのX座標の
値を検出する。検出の仕方はステップ4で行った動作と
同様であり、第6図に示すように、Y=Hの列の画像デ
ータより、予め決められた敷居値以上の値が最初に出現
した位置のXの値X1を検出する。これによって(X1,H)の
座標が求められ、この座標を物体1の左エッジの位置と
してメモリに書き込む。物体1の右エッジにも同様にし
て求めることができる。
In step 8, the image data input by the operations of steps 5 to 7 is processed by the MPU 9, and the value of X at the position of the left edge of the object 1 in the figure is detected. Here, first, in order to grasp the correspondence between the X coordinate of the tip of the input image data and the X coordinate of the tip of the reference image in the shape information memory 10, the X coordinate at Y 1 , that is, the X coordinate of the tip is detected. . Hereinafter, the value of the X coordinate of the left edge when Y 2 , Y 3 , ... Is detected. The method of detection is the same as the operation performed in step 4, and as shown in FIG. 6, from the image data in the column Y = H, the X at the position where the value equal to or greater than the predetermined threshold value first appears. Find the value of X 1 . As a result, the coordinates (X 1 , H) are obtained, and these coordinates are written in the memory as the position of the left edge of the object 1. The right edge of the object 1 can be similarly obtained.

ステップ9ではステップ8で求めたXの値X1と一つ前の
列のXの値X0とを比較し、X1が物体1の上半分にあるか
下半分にあるかを判断する。即ち、第4図に示すよう
に、X1に対応するYの値は物体1の上半分と下半分の2
ヵ所となるので、このX1が、後述する形状情報メモリ10
の中のどのYの値となるかを決定する。X1>X0ならXの
値が増加状態であるから、このX1は物体1の上半分に位
置しているものと判断する。X1<X0ならXの値が減少状
態であるから、このX1は物体1の下半分に位置している
ものと判断する。
In step 9, the X value X 1 obtained in step 8 is compared with the X value X 0 of the immediately preceding column to determine whether X 1 is in the upper half or the lower half of the object 1. That is, as shown in FIG. 4, the value of Y corresponding to X 1 is 2 in the upper half and the lower half of the object 1.
This X 1 is the shape information memory 10 to be described later.
Which Y value in is to be determined. If X 1 > X 0, the value of X is increasing, so it is determined that this X 1 is located in the upper half of the object 1. If X 1 <X 0, the value of X is decreasing, so it is determined that this X 1 is located in the lower half of the object 1.

ステップ10では、ステップ8で求めたXの値X1に対応す
る形状情報メモリ10の中のY′方向の値Y1を読み出す。
いま、例えば第10図に示す画像データが基準画像のデー
タであるとすると、この基準画像データではY4のときX3
となっている。しかし、入力画像データが第11図に示す
ようなデータであるとすると、この入力画像データでは
Y6のときX3となっている。
In step 10, the value Y 1 in the Y ′ direction in the shape information memory 10 corresponding to the value X 1 of X obtained in step 8 is read.
Now, for example, assuming that the image data shown in FIG. 10 is the data of the reference image, in this reference image data, when Y 4 , X 3
Has become. However, if the input image data is the data shown in FIG. 11, the input image data is
It becomes X 3 when Y 6 .

なお、X座標は、取り込んだ画像データと形状情報メモ
リ10の基準画像の座標との対応関係はとれているものと
し、また、先頭のX座標は同じとする。
It is assumed that the X coordinate has a correspondence relationship between the captured image data and the coordinate of the reference image in the shape information memory 10, and the X coordinate at the beginning is the same.

形状情報メモリ10に基準画像のデータを記憶させる方法
として次の二つの方法が考えられる。
The following two methods are conceivable as a method of storing the reference image data in the shape information memory 10.

一つは、正確な物体の画像データを正確な搬送速度でそ
のまま記憶しておく方法である。
One is a method of storing accurate image data of an object as it is at an accurate transport speed.

他の一つは、対象物体の形状が円形の場合は、円の方程
式(X-A)2+(Y-B)2=r2を用いてYの値を求める方法であ
る。rは物体の半径であり、ステップ6の入力画像メモ
リ8の中で敷居値を超えたX方向の画素数の最大値を物
体の直径とし、この直径の半分の値を半径rとする。ま
た、(A,B)は中心の座標であり、Aの値は入力画像メ
モリ8のX方向の画素数の半分の値である。Bの値はB
=rである。上記式よりYを求める式 にする。ここで、 は下半分であり、 は上半分となる。
The other is a method of obtaining the value of Y using the equation (XA) 2 + (YB) 2 = r 2 of a circle when the shape of the target object is circular. r is the radius of the object, and the maximum value of the number of pixels in the X direction that exceeds the threshold value in the input image memory 8 in step 6 is the diameter of the object, and half the diameter is the radius r. Further, (A, B) is the center coordinate, and the value of A is half the number of pixels in the input image memory 8 in the X direction. The value of B is B
= R. Formula to obtain Y from the above formula To here, Is the lower half, Is the upper half.

ステップ11では、ステップ8で求めたXの値X1に対する
入力画像データのY方向の値と形状情報メモリ10のY′
方向の値との差を補正データメモリ12に記憶させる。補
正データとしては、上記のように両データの差としても
よいし、X1・・(Y′,Y)のようにそれぞれの値を記憶さ
せてもよい。
In step 11, the Y-direction value of the input image data with respect to the X value X 1 obtained in step 8 and Y ′ of the shape information memory 10 are set.
The difference from the direction value is stored in the correction data memory 12. As the correction data, the difference between the two data may be used as described above, or the respective values may be stored as X 1 ··· (Y ′, Y).

ステップ12では、ステップ8ないし11の動作を形状情報
メモリ10の中のY′方向の総てが終了するまで繰返し行
わせ、それぞれについて補正データをメモリ12に記憶さ
せる。
In step 12, the operations of steps 8 to 11 are repeated until all the Y'directions in the shape information memory 10 are completed, and the correction data is stored in the memory 12 for each.

ステップ13では、ステップ12が終了した信号が上記MPU9
に入力され、この信号により、このフローの動作は終了
する。
In step 13, the signal obtained after step 12 is the MPU9
, And the operation of this flow is ended by this signal.

なお、別のフローでは上記記憶された補正データを基に
して瓶の蓋の汚れ、傷、印刷ずれ等の検査を行う。この
場合、ステップ11のデータを次のように変換させて検査
を行う。
In another flow, the bottle lid is inspected for stains, scratches, print misalignment, etc. based on the stored correction data. In this case, the data in step 11 is converted as follows and the inspection is performed.

まず、物体全体の入力画像を修正する場合について説明
すると、上記ステップ11の補正データ又はX1・・(Y′,
Y)のデータにおいて、入力画像データのY′番目の列
に、X1を含んだY番目の1ライン分のデータを転送し、
これをY′の列総てについて行い、入力画像データを補
正する。ここで、X方向の値が同じ値となった場合に
は、前のデータ上に書き換えて処理するようにしてもよ
いし、前のデータとの平均をとるようにしてもよい。形
状情報メモリにおいてX方向の左エッジについて同じ値
が続く形状の場合は、Xの値に対応するYの列の値が一
つに決められないので、このような場合には、その間は
補正データメモリ上は空白データにしておき、次のライ
ンについて処理をしていき、ライン全体を処理したのち
空白部分を補間により処理する。ラインスキャナの分解
能を上げれば、上記のようなX方向の値が同じとなるよ
うなことを避けることができる。
First, the case of correcting the input image of the entire object will be described. The correction data of Step 11 or X 1 ··· (Y ′,
In the Y) data, the Y'th one line of data including X 1 is transferred to the Y'th column of the input image data,
This is done for all columns of Y'to correct the input image data. Here, when the values in the X direction are the same, the data may be rewritten on the previous data for processing, or may be averaged with the previous data. In the case where the shape information memory has a shape in which the same value continues for the left edge in the X direction, the value in the Y column corresponding to the X value cannot be determined as a single value. Blank data is left on the memory, the next line is processed, the entire line is processed, and then the blank part is processed by interpolation. By increasing the resolution of the line scanner, it is possible to prevent the above-mentioned values in the X direction from becoming the same.

次に、検査に必要な部分だけを修正する場合は、例え
ば、検査に必要な部分だけにウインドウを設定し、この
ウインドウの領域を修正するようにしてもよい。また、
対象物体の模様又はパターンについて補正する場合も、
設定したウインドウ内のデータを修正するようにしても
よい。
Next, in the case of modifying only the part necessary for the inspection, for example, the window may be set only for the part necessary for the inspection, and the area of this window may be modified. Also,
When correcting the pattern or pattern of the target object,
You may make it correct the data in the set window.

第1図の実施例中の補正データメモリ12は、前述のよう
に対象画像全体の補正データを記憶するようにしてもよ
いし、画像処理のために設定するウインドウの補正を行
うようにしてもよい。
The correction data memory 12 in the embodiment of FIG. 1 may store the correction data of the entire target image as described above, or may correct the window set for image processing. Good.

本発明にかかる画像取り込み装置を適用可能な対象物体
は、予め定まった形状のものであればよく、瓶の蓋など
の円形の物体のほか、菱形のものでもよい。また、四角
形の物体の場合は、物体とラインスキャナとが相対移動
するとき、物体の稜線がラインスキャナを斜めに横切る
ようにする。
The target object to which the image capturing apparatus according to the present invention can be applied may have a predetermined shape, and may be a circular object such as a bottle lid or a diamond object. Further, in the case of a quadrangular object, when the object and the line scanner relatively move, the ridge line of the object diagonally crosses the line scanner.

(発明の効果) 本発明によれば、メモリ手段に記憶された画像データを
基準画像と比較し、搬送速度の差による取り込まれた画
像データと基準画像との搬送方向に関してのデータ位置
の差を認識する認識部を設けたため、上記データ位置の
差によって入力画像を補正することができる。従って、
エンコーダ等の速度センサを用いて搬送速度と画像取り
込みとの同期をとる必要がなく、装置がコンパクトにな
ると共にコストが安くなるという効果を奏する。また、
搬送系と画像取り込み部とが独立するため、両者が離れ
た位置にある場合や物理的に接続が困難な場合などに有
効である。
(Effect of the Invention) According to the present invention, the image data stored in the memory means is compared with the reference image, and the difference in the data position between the captured image data and the reference image in the conveyance direction due to the difference in the conveyance speed is calculated. Since the recognition unit for recognizing is provided, the input image can be corrected by the difference in the data position. Therefore,
Since it is not necessary to synchronize the conveyance speed and the image capture by using a speed sensor such as an encoder, the device can be made compact and the cost can be reduced. Also,
Since the transport system and the image capturing section are independent of each other, it is effective when the two are located apart from each other or when physical connection is difficult.

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

第1図は本発明にかかる画像取り込み装置の実施例を機
構部分と共に示すブロック図、第2図は同上実施例によ
る補正データ作成原理を示す線図、第3図は上記実施例
の動作を示すフローチャート、第4図は上記実施例中の
入力画像メモリへの画像データの取り込みの様子を示す
概念図、第5図は同じく入力画像メモリへの物体の先端
のデータの取り込みの様子を示す概念図、第6図は物体
のエッジのデータ取り込みの様子を示す概念図、第7図
は物体のエッジ検出原理を示す線図、第8図は従来の画
像取り込み装置の例を機構部分と共に示すブロック図、
第9図は同上機構部分の側面図、第10図は所定の搬送速
度での入力画像データの例を示す線図、第11図は搬送速
度が速い場合の入力画像データの例を示す線図、第12図
は搬送速度が遅い場合の入力画像データの例を示す線
図、第13図は搬送速度が変動した場合の入力画像データ
の例を示す線図である。 1……物体、5……ラインスキャナ、8,9……メモリ手
段。
FIG. 1 is a block diagram showing an embodiment of an image capturing apparatus according to the present invention together with a mechanical portion, FIG. 2 is a diagram showing the principle of correction data creation according to the above embodiment, and FIG. 3 shows the operation of the above embodiment. FIG. 4 is a flow chart, and FIG. 4 is a conceptual diagram showing how the image data is loaded into the input image memory in the above embodiment, and FIG. 5 is a conceptual diagram showing how data of the tip of the object is loaded into the input image memory. , FIG. 6 is a conceptual diagram showing how the data of the edge of the object is captured, FIG. 7 is a diagram showing the principle of edge detection of the object, and FIG. 8 is a block diagram showing an example of a conventional image capturing device together with the mechanical portion. ,
FIG. 9 is a side view of the same mechanical part, FIG. 10 is a diagram showing an example of input image data at a predetermined conveying speed, and FIG. 11 is a diagram showing an example of input image data at a high conveying speed. FIG. 12 is a diagram showing an example of input image data when the transport speed is slow, and FIG. 13 is a diagram showing an example of input image data when the transport speed changes. 1 ... object, 5 ... line scanner, 8, 9 ... memory means.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】定まった形状の物体とラインスキャナとを
相対移動させながら上記物体の画像データを取り込み、
この画像データをメモリ手段に記憶させる画像取り込み
装置において、 上記ラインスキャナは、相対移動する上記物体の画像デ
ータを所定のタイミングで取り込むものであり、 上記メモリ手段は、上記物体の所定の搬送速度における
画像データを基準画像として記憶すると共に上記ライン
スキャナにより取り込まれる画像データを記憶するもの
であり、 上記メモリ手段に記憶された上記画像データを上記基準
画像と比較し、搬送速度の差による上記取り込まれた画
像データと上記基準画像との搬送方向に関してのデータ
位置の差を認識する認識部を有することを特徴とする画
像取り込み装置。
Claim: What is claimed is: 1. While moving an object having a fixed shape and a line scanner relative to each other, capturing image data of the object,
In the image capturing device for storing the image data in the memory means, the line scanner captures the image data of the relatively moving object at a predetermined timing, and the memory means operates at a predetermined transport speed of the object. The image data is stored as a reference image and the image data captured by the line scanner is stored. The image data stored in the memory means is compared with the reference image, and the image data is captured by a difference in transport speed. An image capturing device having a recognition unit that recognizes a difference in data position between the image data and the reference image in the transport direction.
JP1190872A 1989-07-24 1989-07-24 Image capture device Expired - Lifetime JPH0721825B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1190872A JPH0721825B2 (en) 1989-07-24 1989-07-24 Image capture device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1190872A JPH0721825B2 (en) 1989-07-24 1989-07-24 Image capture device

Publications (2)

Publication Number Publication Date
JPH0354677A JPH0354677A (en) 1991-03-08
JPH0721825B2 true JPH0721825B2 (en) 1995-03-08

Family

ID=16265160

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1190872A Expired - Lifetime JPH0721825B2 (en) 1989-07-24 1989-07-24 Image capture device

Country Status (1)

Country Link
JP (1) JPH0721825B2 (en)

Also Published As

Publication number Publication date
JPH0354677A (en) 1991-03-08

Similar Documents

Publication Publication Date Title
JPH096891A (en) Data symbol reading device and data symbol reading system
JP2000266691A (en) Visual examination apparatus
JP2021148593A (en) Inspection system, inspection result display method and display program
JP2000193601A (en) Surface defect inspection equipment
JPH11248641A (en) Surface defect inspection apparatus and surface defect inspection method
JPH1068607A (en) Three dimensional shape measuring method
JP3871944B2 (en) Appearance inspection device
JPH0425584B2 (en)
JPH1063846A (en) Appearance inspection device
JPH0721825B2 (en) Image capture device
JPS6226417B2 (en)
JP3216439B2 (en) Internal inspection equipment for circular containers
JPH1196378A (en) Load position/attitude recognizing device
JP2005274325A (en) Optical defect inspection method for metal strip
JP3119376B2 (en) Printing evaluation method and printing evaluation device
JPH0467887B2 (en)
JP4829594B2 (en) Image processing method and apparatus
JP3003229B2 (en) Work posture determination method
JPS6375507A (en) Measuring instrument for recessed hole
JP3130548B2 (en) Image processing device
JP2809297B2 (en) Moving object imaging apparatus and imaging method
JPH11108628A (en) Pattern matching processing device and image processing device
JP3029142B2 (en) Printing evaluation method and printing evaluation device
JP2694819B2 (en) Lead position detector
JPH06241745A (en) Visual inspection device and visual inspection method