JPH0241789B2 - - Google Patents
Info
- Publication number
- JPH0241789B2 JPH0241789B2 JP59075341A JP7534184A JPH0241789B2 JP H0241789 B2 JPH0241789 B2 JP H0241789B2 JP 59075341 A JP59075341 A JP 59075341A JP 7534184 A JP7534184 A JP 7534184A JP H0241789 B2 JPH0241789 B2 JP H0241789B2
- Authority
- JP
- Japan
- Prior art keywords
- section
- image
- point
- data
- slit light
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
- G06T7/521—Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Optics & Photonics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
- Image Input (AREA)
Description
【発明の詳細な説明】
(a) 発明の技術分野
本発明は、物体を構成する面上にスリツト光を
照射して得られたスリツト光像情報に基づいて、
前記面の3次元空間上における傾きと座標を算出
する画像処理装置に関するものである。Detailed Description of the Invention (a) Technical Field of the Invention The present invention is based on slit light image information obtained by irradiating slit light onto a surface constituting an object.
The present invention relates to an image processing device that calculates the inclination and coordinates of the surface in three-dimensional space.
(b) 技術の背景
例えば、ロボツトの移動、あるいはロボツトに
作業を行なわせようとする場合、ロボツトの作業
領域内の物体の3次元的な位置・姿勢・形状を知
ることが必要となる。すなわち3次元物体認識が
必要で、特にロボツトから対象物までの距離と対
象物の面の傾き情報を得ることが重要な課題とな
つている。(b) Background of the technology For example, when moving a robot or having a robot perform a task, it is necessary to know the three-dimensional position, posture, and shape of objects within the robot's work area. That is, three-dimensional object recognition is necessary, and in particular, obtaining information about the distance from the robot to the object and the inclination of the object's surface is an important issue.
(c) 従来技術と問題点
従来、3次元空間内の物体を撮影して得られた
画像情報から前記物体の面情報を抽出するセグメ
ンテーシヨンの方法として距離情報を利用したも
のがある。(c) Prior Art and Problems Conventionally, there is a method of segmentation that uses distance information to extract surface information of an object from image information obtained by photographing the object in three-dimensional space.
例えば、スリツト光を3次元空間上に照射する
と共に、走査させ、このスリツト光像をTVカメ
ラ等により受光し、その位置情報から距離情報を
求めることが行なわれている。 For example, a three-dimensional space is irradiated with slit light and scanned, an image of the slit light is received by a TV camera, etc., and distance information is obtained from the position information.
しかしながら、この方法は、TVカメラの撮影
画面内の全ての点の距離を計測する必要があり、
物体までの距離を求めるのに非常に長い時間を必
要とするという欠点を有する。 However, this method requires measuring the distances of all points within the TV camera's shooting screen.
It has the disadvantage that it takes a very long time to find the distance to the object.
すなわち、距離情報を得てから平面領域の抽
出、面の傾き、さらに領域の統合といつたセグメ
ンテーシヨンまでの処理を実行するには、より一
層多くの計算時間が必要となり、ロボツトを実時
間制御することができないという欠点があつた。 In other words, much more calculation time is required to perform processing from obtaining distance information to segmentation, such as extracting a plane region, inclination of the surface, and integrating the regions, which means that the robot cannot be run in real time. The disadvantage was that it could not be controlled.
(d) 発明の目的
本発明の目的は、前述した従来の欠点に鑑み、
3次元空間内の物体の面の傾きと座標情報を短時
間に算出することのできる画像処理装置を提供す
ることにある。(d) Purpose of the invention In view of the above-mentioned conventional drawbacks, the purpose of the present invention is to
An object of the present invention is to provide an image processing device that can calculate the inclination and coordinate information of a surface of an object in a three-dimensional space in a short time.
(e) 発明の構成
そして、この目的は、3次元空間上の物体を撮
影する撮影手段と、前記撮影手段により得られた
画像情報に基づいて前記物体を構成する面を抽出
する面抽出部と、前記面抽出部により得られた面
情報に基づいて所望の面上のみにスリツト光を照
射する照射部と、前記所望の面上のみに照射され
るスリツト光像を撮影して得られたスリツト光像
情報に基づいて前記面の傾きと3次元空間座標を
算出する面情報算出部と含んで成る画像処理装置
を提供すること
により達成される。(e) Structure of the Invention The object is to provide a photographing means for photographing an object in a three-dimensional space, and a surface extraction section for extracting a surface constituting the object based on image information obtained by the photographing means. , an irradiation section that irradiates slit light only onto a desired surface based on the surface information obtained by the surface extraction section; and a slit light image obtained by photographing a slit light image irradiated only onto the desired surface. This is achieved by providing an image processing device that includes a surface information calculation section that calculates the inclination and three-dimensional spatial coordinates of the surface based on optical image information.
(f) 発明の実施例
以下、本発明に係かる画像処理装置の実施例を
図面を用いて詳細に説明する。(f) Embodiments of the Invention Hereinafter, embodiments of the image processing apparatus according to the present invention will be described in detail with reference to the drawings.
第1図は、本発明に係かる画像処理装置の実施
例を説明するための図である。 FIG. 1 is a diagram for explaining an embodiment of an image processing apparatus according to the present invention.
図において、1はTVカメラ、2はA/D変換
器、3は濃淡画像処理部、4は直線抽出部、5は
領域抽出部、6は面傾度・距離計測部、8はスキ
ヤニング機構制御部である。 In the figure, 1 is a TV camera, 2 is an A/D converter, 3 is a grayscale image processing section, 4 is a straight line extraction section, 5 is an area extraction section, 6 is a surface inclination/distance measurement section, and 8 is a scanning mechanism control section. It is.
また、SW,SW,SWはそれぞれ切換ス
イツチであつて、例えば中央処理装置CPU21
からの制御信号により切換えられる。 Further, SW, SW, and SW are respective changeover switches, and for example, the central processing unit CPU21
It is switched by a control signal from.
第1図に示される画像処理装置の動作について
説明する。 The operation of the image processing apparatus shown in FIG. 1 will be explained.
その動作は、次の3つの処理に分れる。 The operation is divided into the following three processes.
(1) TVカメラ1により3次元空間を撮影して得
られた画像情報中から計測すべき物体を構成す
る面を抽出する
(2) 得られた面内に十字スリツト光を照射する
(3) 面の傾き及び座標を算出するために、面上に
照射されたスリツト光の傾き、十字スリツト光
のクロス点を検出する
である。(1) Extract the surface that constitutes the object to be measured from the image information obtained by photographing a three-dimensional space with the TV camera 1. (2) Irradiate the cross slit light within the obtained surface. (3) In order to calculate the inclination and coordinates of the surface, the inclination of the slit light irradiated onto the surface and the cross point of the cross slit light are detected.
まず、(1)のTVカメラ1により3次元空間を撮
影して得られた画像情報中から計測すべき物体を
構成する面を抽出する処理について説明する。 First, a description will be given of the process (1) of extracting a surface constituting an object to be measured from image information obtained by photographing a three-dimensional space with the TV camera 1.
まず、切換スイツチSWを“1”側とした状
態で、TVカメラ1により3次元空間を撮影し、
得られたアナログ画像信号をA/D変換器2によ
りデイジタル画像信号に変換した後に、濃淡画像
処理部3に入力する。 First, with the changeover switch SW set to the "1" side, a three-dimensional space is photographed with the TV camera 1,
The obtained analog image signal is converted into a digital image signal by the A/D converter 2 and then input to the grayscale image processing section 3.
濃淡画像処理部3の動作について以下に説明す
る。 The operation of the grayscale image processing section 3 will be explained below.
第2図は、濃淡画像処理部3を説明するための
図である。 FIG. 2 is a diagram for explaining the grayscale image processing section 3. As shown in FIG.
その基本構成は、第1空間フイルタ演算部1
2、第2空間フイルタ演算部13、極点抽出部1
4、閾値処理部15、雑音除去部16であり、第
1空間フイルタ演算部12と第2空間フイルタ演
算部13は切換スイツチ部17により直列または
並列に接続され、並列接続状態の場合には絶対値
演算部18が挿入される。 Its basic configuration is a first spatial filter calculation section 1
2. Second spatial filter calculation unit 13, pole extraction unit 1
4, a threshold processing unit 15 and a noise removal unit 16, the first spatial filter calculation unit 12 and the second spatial filter calculation unit 13 are connected in series or in parallel by a changeover switch unit 17, and in the case of a parallel connection state, the absolute A value calculation section 18 is inserted.
第1空間フイルタ演算部12及び第2空間フイ
ルタ演算部13は同一構成であり、その詳細は第
1空間フイルタ演算部12により、フイルタサイ
ズが3×3の場合について代表的に説明する。 The first spatial filter calculating section 12 and the second spatial filter calculating section 13 have the same configuration, and the details thereof will be representatively explained in the case where the first spatial filter calculating section 12 has a filter size of 3×3.
空間フイルタ演算部では、次式(1)で与えられる
演算を行なうものである。 The spatial filter calculation section performs the calculation given by the following equation (1).
Ym、n=1
〓i=-1
1
〓j=-1
Xm+1、n+1
・fi、j/H …(1)
ここで、Xm、n、Ym、nは、第3図に示す
如く、各々画面上m行n列の画素の濃淡レベル値
のフイルタリング前後の値を示し、fi、jは荷重
係数、Hは正規化係数である。このフイルタは
Ym、nの値を注目画素Xm、nとその周囲8画
素Xm+1、n+1(i=1、0、−1、j=1、
0、−1ただしi=j=0を除く)との重み(fi、
j)付け演算によつて決定するものであり、第4
図に示す如く、fi、jの値の選び方によつてフイ
ルタの特性を様々に変えることができる。Ym, n= 1 〓 i=-1 1 〓 j=-1 Xm+1, n+1 ・fi, j/H...(1) Here, Xm, n, Ym, n are each screen The values before and after filtering of the gray level value of the pixel in the upper m rows and n columns are shown, fi and j are weighting coefficients, and H is a normalization coefficient. This filter is
The value of Ym,n is calculated from the pixel of interest Xm,n and its surrounding 8 pixels Xm+1, n+1 (i=1, 0, -1, j=1,
0, -1 except i=j=0) and the weight (fi,
j) It is determined by an addition operation, and the fourth
As shown in the figure, the characteristics of the filter can be changed in various ways by selecting the values of fi and j.
したがつて、荷重係数fi、jを第3図ロの如く
定め、正規化係数HをH=16と定めるとき、
Ym、nは次式(2)により求められる。 Therefore, when the loading coefficients fi and j are determined as shown in Figure 3B, and the normalization coefficient H is determined as H=16,
Ym and n are determined by the following equation (2).
Ym、n=1/16(Xn-1,o-1×1+Xn,n-1×2+Xn+1,o
-1×1
+Xn-1,o×2+Xn,o×4+Xn+1,o×2+Xn-1,o+1×1
+Xn,o+1×2+Xn+1,o+1×1)…(2)
第2図において、第1空間フイルタ演算部12
と第2空間フイルタ演算部13が切換スイツチ部
17により直列接続されている場合について説明
する。このとき、1段目の第1空間フイルタ演算
部12を平滑化フイルタ用に、2段目の第2空間
フイルタ演算部13を画像強調フイルタ(ハイパ
ス、ラプラシアン)用に用い、TVカメラの走査
信号と同期させることによつて、リアルタイムで
画像雑音の低減と対象の輪郭線抽出を行なうこと
ができる。 Ym, n=1/16 (X n-1,o-1 ×1+X n,n-1 ×2+X n+1,o
-1 ×1 +X n-1,o ×2+X n,o ×4+X n+1,o ×2+X n-1,o+1 ×1
+X n,o+1 ×2 +X n+1,o+1 ×1)...(2) In FIG.
A case will be described in which the second spatial filter calculation section 13 and the second spatial filter calculation section 13 are connected in series by the changeover switch section 17. At this time, the first spatial filter calculation unit 12 in the first stage is used for a smoothing filter, the second spatial filter calculation unit 13 in the second stage is used for an image enhancement filter (high pass, Laplacian), and the scanning signal of the TV camera is By synchronizing with , it is possible to reduce image noise and extract the outline of the object in real time.
さて、前記(1)式の演算を実現するためのハード
構成について説明する。この空間フイルタ演算部
は第5図に示す如く、データシフト回路30、乗
算回路31、加算回路32、割算回路33の4つ
の部分から構成される。 Now, the hardware configuration for realizing the calculation of equation (1) above will be explained. As shown in FIG. 5, this spatial filter calculation section is composed of four parts: a data shift circuit 30, a multiplication circuit 31, an addition circuit 32, and a division circuit 33.
データシフト回路30は1画面分の画像データ
に対して3×3の空間フイルタリング処理を実行
するために、第6図に示す如く、2行+3画素の
データをシフトレジスタを用いて記憶格納し、次
段の乗算回路31にXm+1、n+j(i=1、
0、−1、j=1、0、−1)の9画素を送出する
機能を持つている。 The data shift circuit 30 stores and stores data of 2 rows + 3 pixels using a shift register, as shown in FIG. 6, in order to perform 3×3 spatial filtering processing on image data for one screen. , Xm+1, n+j (i=1,
It has a function of transmitting nine pixels (0, -1, j=1, 0, -1).
第6図において、1行p画素、2q濃淡レベルの
画面データの場合について説明する。第1図の
A/D変換器2により1画素qビツトで表示され
たデータを、1段目は3画素分、2段目及び3段
目はp画素分のシフトレジスタを用いて保持す
る。 In FIG. 6, the case of screen data with 1 row of p pixels and 2 q gray levels will be described. The data displayed by the A/D converter 2 in FIG. 1 with q bits per pixel is held using shift registers for 3 pixels in the first stage and p pixels in the second and third stages.
そして各段の最後の3画素については、次段の
乗算回路31へ同時に各画素のデータを送出でき
るようにラツチまたはフリツプフロツプR1〜R
9を縦続接続するかシリアル・イン−パラレル・
アウトのシフトレジスタを使用することにより9
画素の送出が実現できる。そして2段目及び3段
目は(p−3)画素分のシフトレジスタ34,3
5を使用して送出分以外の画素のデータを保持す
る。そしてこのデータシフト回路30は、TVカ
メラ1の走査信号により1画素ずつシフトする。 The last three pixels of each stage are connected to latches or flip-flops R1 to R1 so that the data of each pixel can be simultaneously sent to the multiplier circuit 31 of the next stage.
9 in cascade or serial-in-parallel
9 by using the out shift register.
Pixel transmission can be realized. The second and third stages are shift registers 34 and 3 for (p-3) pixels.
5 is used to hold data of pixels other than those sent. The data shift circuit 30 shifts one pixel at a time according to the scanning signal of the TV camera 1.
乗算回路31は、第7図に示す如く、データシ
フト回路30から送出された9画素の各々に対し
てあらかじめ設定した荷重係数fi,j(i=−1、0、
1、j=−1、0、1)を乗じて次式(3)を求める
機能を有する。 As shown in FIG. 7, the multiplier circuit 31 applies weighting coefficients f i,j (i=-1, 0,
1, j=-1, 0, 1) to obtain the following equation (3).
Wn+i,o+j=Xn+i,o+j×fi,j …(3)
(i=−1、0、1、j=−1、0、1)
そのために、第7図に示す如く、第1乗算器3
6〜第9乗算器44の9個の乗算器を用い、第1
乗算器36には荷重係数f-1,1が設定されておりデ
ータシフト回路30より送出された画素Xn-1,o-1
との乗算が行なわれる。そして第2乗算器37に
は荷重係数f-1,0が設定されておりデータシフト回
路30より送出された画素Xn-1,oとの乗算が行な
われる。このようにして第7図に示す乗算回路3
6〜44により前記(3)式における乗算を行なうこ
とができる。W n+i,o+j =X n+i,o+j ×f i,j …(3) (i=-1, 0, 1, j=-1, 0, 1) Therefore, the seventh As shown in the figure, the first multiplier 3
Using nine multipliers, 6th to 9th multipliers 44, the first
A weighting coefficient f -1,1 is set in the multiplier 36, and the pixel X n-1,o-1 sent out from the data shift circuit 30
Multiplication is performed. A weighting coefficient f -1,0 is set in the second multiplier 37, and multiplication with the pixel X n-1,o sent from the data shift circuit 30 is performed. In this way, the multiplication circuit 3 shown in FIG.
6 to 44 can perform the multiplication in equation (3) above.
加算回路32は、前記乗算回路31で演算され
た9個の値Wn+i,o+j(i=−1、0、1、j=−
1、0、1)から、これらの和である次式(4)を求
める加算機能を有する。 The adder circuit 32 calculates the nine values W n+i,o+j (i=-1, 0, 1, j=-
1, 0, 1), it has an addition function that calculates the following equation (4), which is the sum of these.
Zn,o=1
〓i=-1
1
〓i=-1
Wn+i,o+j …(4)
(i=−1、0、1、j=−1、0、1)
そのために第8図に示す如く、第1加算器45
〜第8加算器52を使用している。Z n,o = 1 〓 i=-1 1 〓 i=-1 W n+i,o+j …(4) (i=-1, 0, 1, j=-1, 0, 1) Therefore As shown in FIG. 8, the first adder 45
~8th adder 52 is used.
さらに割算回路33は、前記乗算回路31及び
加算回路32における乗算演算、加算演算により
増加した濃淡レベルZn,oを、第2図の画像メモリ
19及びモニタ用TV(図示しない)の濃淡レベ
ルの範囲に収まるように、正規化係数Hで割り、
Y=Zn,o/H(=(1)式) …(5)
を求めるものである。ここで正規化係数Hは、実
現し易さから1
〓i=-1
1
〓j=-1
fi,jに近くそれより大きな
2(k=0、1、2…)の値に選ぶ。この割算回
路33は第9図に示す如く、第1データセレクタ
53〜第8データセレクタ60により構成されて
おり、前記(5)式の演算を行なうことにより前記(1)
式の最終演算結果のYn,oが得られるものである。
この第9図は、8ビツトの濃淡画素を前記の如く
乗算演算及び加算演算により16ビツトの濃淡レベ
ルのデータZn,oになつたものを8ビツトデータ
Yn,oに減らすときの例であつて、第1データセレ
クタ53には16ビツトデータZn,oのうち2〜9ビ
ツトを入力し、第2データセレクタ54には16ビ
ツトデータZn,oのうち3〜10ビツトを入力し、以
下同様にして第3データセレクタ55には4〜11
ビツトを入力し、第4データセレクタ56には5
〜12ビツトを、第5データセレクタ57には6〜
13ビツトを、第6データセレクタ58には7〜14
ビツトを、第7データセレクタ59には8〜15ビ
ツトを、第8データセレクタ60には9〜16ビツ
トをそれぞれ入力する。そしてセレクタライン
SLより伝達された3ビツトの選択信号に応じて
各データセレクタ53〜60は、前記8ビツト入
力のうち第1番目〜第8番目のいずれか1つのビ
ツトを選択出力する。例えば27でZn,oを商する場
合にはそれぞれのデータセレクタ53〜60より
第1番目のビツトを出力するように各データセレ
クタ53〜60が制御されるので、第1データセ
レクタ53からは2〜9ビツトのうちの第1番目
のビツトすなわち16ビツトのうちの2ビツト目が
出力され、第2データセレクタ54からは3〜10
ビツトのうちの3ビツト目が出力され、第3デー
タセレクタ55からは4〜11ビツトのうちの第1
番目のビツトすなわち16ビツトのうちの4ビツト
目が出力され、以下同様にして第8データセレク
タ60からは9〜16ビツトのうちの9ビツト目が
出力されることになり、この結果各データセレク
タ53〜60より16ビツトのZn,oを27で商した値
である2〜9ビツトを出力することになる。 Furthermore, the division circuit 33 converts the gray level Z n,o increased by the multiplication operation and addition operation in the multiplication circuit 31 and the addition circuit 32 to the gray level Z n,o of the image memory 19 and the monitor TV (not shown) in FIG. It divides by the normalization coefficient H so that it falls within the range of Y=Z n,o /H (=Equation (1))...(5). Here, the normalization coefficient H is selected to be a value of 2 (k=0, 1, 2, . . . ) close to and larger than 1 〓 i=-1 1 〓 j=-1 f i,j for ease of implementation. As shown in FIG. 9, this division circuit 33 is composed of a first data selector 53 to an eighth data selector 60.
The final calculation result of the equation Y n,o is obtained.
Figure 9 shows 8-bit data obtained by multiplying and adding 8-bit gray pixels to 16-bit gray level data Zn,o.
In this example , 2 to 9 bits of the 16-bit data Z n,o are input to the first data selector 53, and the 16-bit data Z n, o is input to the second data selector 54. Input 3 to 10 bits of o , and similarly input 4 to 11 bits to the third data selector 55.
5 bits are input to the fourth data selector 56.
~12 bits, 6~ to the fifth data selector 57
13 bits, and 7 to 14 bits to the sixth data selector 58.
8 to 15 bits are input to the seventh data selector 59, and 9 to 16 bits are input to the eighth data selector 60. and selector line
In response to the 3-bit selection signal transmitted from the SL, each data selector 53-60 selects and outputs any one of the 1st to 8th bits among the 8-bit inputs. For example, when quoting Z n,o by 2 7 , each data selector 53 to 60 is controlled to output the first bit from each data selector 53 to 60. The first bit of 2 to 9 bits, that is, the 2nd bit of 16 bits, is output, and the second data selector 54 outputs 3 to 10 bits.
The third bit out of the bits is output, and the third data selector 55 outputs the first bit out of the 4th to 11th bits.
The 4th bit of the 16 bits is output, and the 9th bit of the 9th to 16th bits is output in the same way from the 8th data selector 60. As a result, each data selector From 53 to 60, 2 to 9 bits, which is the value obtained by multiplying 16 bits Z n,o by 27 , are output.
同様にしてZn,oを27で商する場合には各データ
セレクタ53〜60から第2番目のビツト、すな
わち16ビツトのデータよりその3〜10ビツトを出
力すればよく、25で商する場合には各データセレ
クタ53〜60より第3番目のビツトを出力させ
て16ビツトのデータよりその4〜11ビツトを出力
させればよい。このようにしてN番目のデータセ
レクタには16ビツトデータのうち215-N〜28-Nビ
ツト目を入力し、割る数2Kに対応してセレクタラ
インにkの値をセツトすることにより割算を高速
に実現することができる。 Similarly, when Zn ,o is multiplied by 27 , it is sufficient to output the second bit from each data selector 53 to 60, that is, 3 to 10 bits of 16-bit data, and the quotient is 25 . In this case, it is sufficient to output the third bit from each data selector 53 to 60 and output the fourth to 11th bits from the 16-bit data. In this way, the 215-N to 28-N bits of the 16-bit data are input to the Nth data selector, and the value of k is set in the selector line corresponding to the dividing number 2K . Division can be realized at high speed.
このように、データセレクタを用いることによ
り割算の高速化をはかることができる。 In this way, by using the data selector, it is possible to speed up division.
第2図における第1空間フイルタ演算部12と
第2空間フイルタ演算部13の荷重係数を適当に
選ぶことにより画像上のランダムな雑音の低減の
明るさの急変部の強調を行なうことができる。 By appropriately selecting the weighting coefficients of the first spatial filter calculating section 12 and the second spatial filter calculating section 13 in FIG. 2, it is possible to reduce random noise on the image and emphasize sudden changes in brightness.
この荷重係数は、例えば荷重係数保持部22の
荷重係数テーブルによりCPU21によつて取り
出すことができる。 This load coefficient can be retrieved by the CPU 21 from the load coefficient table of the load coefficient holding section 22, for example.
例えば第10図aの原画に対して平滑化+ラプ
ラシアン処理を施した後の様子を同図bに示す。 For example, FIG. 10b shows the state after smoothing + Laplacian processing is applied to the original image in FIG. 10a.
第10図a−1は光が右斜め上方から円柱の物
体74に当ている場合であり、同図a−2はそれ
を真上から見たときの図、同図a−3は、同図a
−2中の。X−Yで示す1次元方向の明るさの変
化を示したものである。 Figure 10 a-1 shows the case where the light hits the cylindrical object 74 from diagonally upward to the right, Figure 10 a-2 shows the cylindrical object 74 viewed from directly above, and Figure 10 a-3 shows the same a
-2 in. It shows a change in brightness in a one-dimensional direction indicated by X-Y.
また第10図b−1は平滑化+ラプラシアン演
算後の濃淡レベルの3次元表示であり、同図b−
2はそれを真上から眺めたときの等明線を示して
いる。さらに同図b−3は、同図b−2のX−Y
で示す1次元方向の断面を示している。 In addition, Fig. 10b-1 is a three-dimensional display of the gradation level after smoothing + Laplacian calculation;
2 shows isobright lines when viewed from directly above. Furthermore, b-3 in the same figure is X-Y in b-2 in the same figure.
This shows a cross section in the one-dimensional direction indicated by .
ここで閾値処理によつて第5図b−1から対象
の輪郭線を抽出することについて説明する。 Here, extraction of the target outline from FIG. 5b-1 by threshold processing will be explained.
スライスレベルとして、A、B、Cの3レベル
を選び、2値化すると、第11図a〜cに示すよ
うに各々異なつた輪郭線が得られる。第11図a
ではレベルが高過ぎて輪郭に途切れが生じるし、
同図cではレベルが低過ぎて太くなつてしまう。 When three levels A, B, and C are selected as slice levels and binarized, different contour lines are obtained as shown in FIGS. 11a to 11c. Figure 11a
Then the level would be too high and the outline would be broken,
In c of the same figure, the level is too low and becomes thick.
そのため得られた輪郭線に対して改めて途切れ
の修復あるいは細線化処理が必要になる。これら
の処理はアルゴリズムが複雑で時間のかかるもの
であるため、リアルタイム処理には適さない。 Therefore, it is necessary to repair the discontinuity or thin the contour line again. These processes are not suitable for real-time processing because their algorithms are complex and time-consuming.
また、丁度よいスライスレベルが設定できれば
第11図bに示すようにきれいに2値化すること
ができるが、原画の濃淡レベルは対象物体の表面
状態・色・形、照明条件、レンズの明るさ、絞り
等で毎回異なるため、適当なスライスレベルを見
つけることは困難である。結局閾値処理だけで対
象を一連の線画として抽出し、S/N比のよい画
像を得ることは困難である。 In addition, if you can set just the right slice level, you can achieve clear binarization as shown in Figure 11b, but the shading level of the original image depends on the surface condition, color, and shape of the target object, lighting conditions, and lens brightness. It is difficult to find an appropriate slice level because it differs each time due to the aperture, etc. After all, it is difficult to extract an object as a series of line drawings and obtain an image with a good S/N ratio using only threshold processing.
そこで、まず極点抽出処理により輪郭候補点の
抽出を行なう。 Therefore, contour candidate points are first extracted by extreme point extraction processing.
この極点抽出動作原理を第12図を用いて説明
する。尚、説明の簡略化のため、第12図aの原
画像Pが図示状態の1次元方向の濃度分布を有す
る場合について、その極点Rを求める例について
説明する。 The principle of this polar point extraction operation will be explained using FIG. 12. In order to simplify the explanation, an example will be described in which the extreme point R is determined in the case where the original image P in FIG. 12a has the one-dimensional density distribution as shown.
原画像Pを左に一画素Δだけシフトし左シフト
画像をPL(同図c)とし、右に一画素Δだけシフ
トした右シフト画像をPR(同図e)とする。そし
て原画像Pと左シフト画像PLを比較して原画像
の方が濃度が大きいか等しい(以下これをP≧
PLとする)部分QL(同図d)を抽出し、また原画
像Pと右シフト画像PRを比較して原画像の方が
濃度が大きいか等しい(以下これをP≧PRとす
る)部分QR(同図f)を抽出する。 The original image P is shifted to the left by one pixel Δ and the left-shifted image is designated as P L (c in the figure), and the right-shifted image in which the original image P is shifted by one pixel Δ to the right is designated as P R (FIG. 2e). Then, the original image P and the left-shifted image P L are compared, and the density of the original image is greater or equal (hereinafter, this is referred to as P≧
P _ _ _ ) Extract the part Q R (f in the same figure).
このとき求める極点(極大点)Rは少なくとも
両隣りの画素より大きいか等しいレベルであると
考えられるので、第12図hのように部分QLで
かつQRのところを抽出することにより極点Rを
求めることができる。ただし、P=PL=PRのと
きは除外する。 The extreme point (maximum point) R found at this time is considered to be at least larger than or equal to the neighboring pixels on both sides, so by extracting the portion Q L and Q R as shown in Fig. 12h, the extreme point R can be found. However, the case where P=P L =P R is excluded.
ところで、第12図gのLに示す如きパターン
で極点が存在するとき、X方向の走査のみではパ
ターンLの極点辺11,13は抽出できるものの、
極点辺12,14は抽出することができないので、
これをY方向にも走査することにより極点辺12,
14を抽出することができる。 By the way , when there are poles in a pattern as shown in L in FIG.
Since the pole edges 1 2 and 1 4 cannot be extracted,
By scanning this also in the Y direction, the pole side 1 2 ,
1 4 can be extracted.
したがつて、例えば第12図iに示す如き画素
A〜Iを有する抽出ウインドウW′を使用すれば
D、E、Fにより2次元の濃淡画像のX方向の極
点を、C、E、Gにより45゜の斜方向の極点を、
A、E、Iにより135゜の斜方向の極点をそれぞれ
抽出できる。 Therefore, if we use an extraction window W' having pixels A to I as shown in FIG. The diagonal pole of 45° is
The 135° diagonal poles can be extracted using A, E, and I, respectively.
いま、第12図jに示す1フレームを第2図の
走査信号発生部20により出力された同期信号に
応じて走査線h0,h1,h2…により順次走査し、各
画素を前記の如く比較処理することにより水平、
垂直、45゜、135゜方向の極点を順次抽出すること
ができる。 Now, one frame shown in FIG. 12j is sequentially scanned by scanning lines h 0 , h 1 , h 2 . horizontally by comparative processing,
Pole points in the vertical, 45°, and 135° directions can be sequentially extracted.
以上説明した処理を行なう第2図に示される極
点抽出部14は、第13図に示す如く、データシ
フト回路62とデータ比較回路63から構成され
ている。 The polar point extraction section 14 shown in FIG. 2, which performs the processing described above, is comprised of a data shift circuit 62 and a data comparison circuit 63, as shown in FIG.
データシフト回路62は、第14図に詳記する
ように、2行+3画素のデータをシフトレジスタ
を用いて順次保持し、次段のデータ比較回路63
に対して画素A〜Iの9画素を送出する機能を有
し、第6図に示すデータシフト回路と同様に構成
されている。第1空間フイルタ演算部12及び第
2空間フイルタ演算部13よりなる空間フイルタ
61の出力は、レジスタr1〜r9、P−3ビツ
ト長のシフトレジスタ回路62に入力され、これ
により各レジスタr1〜r9より画素A〜Iが出
力され、データ比較回路63に入力されることに
なる。 As detailed in FIG. 14, the data shift circuit 62 sequentially holds data of 2 rows + 3 pixels using a shift register, and the data comparison circuit 63 of the next stage
It has a function of transmitting nine pixels A to I relative to each other, and is configured similarly to the data shift circuit shown in FIG. The output of the spatial filter 61 consisting of the first spatial filter calculation unit 12 and the second spatial filter calculation unit 13 is input to registers r1 to r9 and a shift register circuit 62 with a P-3 bit length. The pixels A to I are outputted from the data comparison circuit 63 and inputted to the data comparison circuit 63.
このデータ比較回路63は、第15図に示す如
く、比較C−1〜C−8、オア回路OR−1〜
OR−9、アンド回路AN−1〜AN−4、ナンド
回路NAN−1〜NAN−4、ピーク・レジスタ
PR等により構成されている。そして比較器C−
1により空間フイルタ処理データであるレジスタ
r4,r5の画素DとEが比較され、比較器C−
2により同じく画素FとEが比較される。 As shown in FIG. 15, this data comparison circuit 63 includes comparisons C-1 to C-8, OR circuits OR-1 to
OR-9, AND circuit AN-1 to AN-4, NAND circuit NAN-1 to NAN-4, peak register
It is made up of PR, etc. and comparator C-
1, pixels D and E of registers r4 and r5, which are spatial filter processing data, are compared, and the comparator C-
2, pixels F and E are similarly compared.
したがつて画素Eが水平方向(X方向)の極点
の場合にはE>D、E>F、D≠E≠Fであるの
でOR−2,OR−3及びNAN−1よりいずれも
「1」が出力され、OR−1より「1」が出力さ
れるので、ピークレジスタPRに水平方向のピー
ク値としての画素Eが保持され、これが極点とし
て出力されることになる。 Therefore, if pixel E is the pole in the horizontal direction (X direction), E>D, E>F, and D≠E≠F, so from OR-2, OR-3, and NAN-1, all of them are "1". " is output, and "1" is output from OR-1, so the pixel E as the horizontal peak value is held in the peak register PR, and this is output as the extreme point.
また比較器C−3では画素BとEが比較され、
比較器C−4では画素EとHが比較されるので、
画素Eが垂直方向の極点の場合には、AN−2よ
り「1」が出力され、OR−1より「1」が出力
されるのでピークレジスタPRに画素Eが保持さ
れることになる。同様に比較C−5,C−6によ
り45゜対角方向の画素C、E、Gが比較され画素
Eが極点の場合にはAN−3から「1」が出力さ
れ、比較器C−7,C−8により135゜対角方向の
画素A、E、Iが比較され、画素Eがこの135゜対
角方向での極点の場合にはAN−4から「1」が
出力されることになる。 Furthermore, the comparator C-3 compares pixels B and E,
Comparator C-4 compares pixels E and H, so
When pixel E is a vertical pole, AN-2 outputs "1" and OR-1 outputs "1", so that pixel E is held in peak register PR. Similarly, pixels C, E, and G in the 45° diagonal direction are compared by comparisons C-5 and C-6, and if pixel E is the pole, "1" is output from AN-3, and comparator C-7 , C-8 compares pixels A, E, and I in the 135° diagonal direction, and if pixel E is the pole in this 135° diagonal direction, "1" is output from AN-4. Become.
したがつて、画素Eが水平、垂直、45゜、135゜
対角方向のいずれか1つの方向での極点の場合に
はOR−1は「1」を出力する。このとき切替回
路200が上位装置からの切替信号によりOR−
1からの信号を出力するように切替られているの
で、ピークレジスタPRに画素Eが保持され、極
点として出力されることになる。このようにして
注目画素Eが極点の場合、これを抽出することが
できる。 Therefore, when the pixel E is the extreme point in any one of the horizontal, vertical, 45°, and 135° diagonal directions, OR-1 outputs "1". At this time, the switching circuit 200 is switched to OR- by the switching signal from the host device.
Since it is switched to output the signal from 1, pixel E is held in the peak register PR and is output as the pole. In this way, if the pixel of interest E is an extreme point, it can be extracted.
閾値処理部15は、第16図に示す如く、デー
タシフト回路と閾値回路からなり、データシフト
回路62は極点抽出処理部のそれと同じ回路を用
いる。後者は比較器66、アンド回路67、レジ
スタ68を有し、比較器66にてあらかじめ設定
したスライスレベルと注目画素(例えばE)との
比較を行ない、注目画素がスライスレベルより大
きな濃度のときに比較器66は「1」を出力し、
アンド回路67をオン状態にする。この信号によ
り注目画素Eのレベルを制御することによつてあ
るレベル以上で水平、垂直、45゜,135゜の各方向
に極点になつている画素だけを抽出することがで
きる。従つて、第17図に示すような円形の物体
と三角形の物体が重なつている場合を撮影して得
られた画像に対して、輪郭抽出処理を施した場合
に生じる途切れN0がなくなる。 As shown in FIG. 16, the threshold processing section 15 consists of a data shift circuit and a threshold circuit, and the data shift circuit 62 uses the same circuit as that of the pole extraction processing section. The latter has a comparator 66, an AND circuit 67, and a register 68, and the comparator 66 compares a preset slice level with the pixel of interest (for example, E), and when the pixel of interest has a density greater than the slice level, Comparator 66 outputs "1",
The AND circuit 67 is turned on. By controlling the level of the pixel of interest E using this signal, it is possible to extract only those pixels that are at a certain level or higher and are extreme points in each of the horizontal, vertical, 45°, and 135° directions. Therefore, the discontinuity N0 that occurs when contour extraction processing is performed on an image obtained by photographing a case where a circular object and a triangular object overlap as shown in FIG. 17 is eliminated.
このようにして、極点抽出部14により輪郭候
補点の抽出を行ない、閾値処理部15により閾値
処理を行なう。 In this way, the extreme point extraction section 14 extracts contour candidate points, and the threshold processing section 15 performs threshold processing.
すなわち、輪郭抽出対象物体の輪郭は、原画上
で明るさの急変している部分に対応していると考
えられる。したがつて、ラプラシアン・フイルタ
(2次微分)またはグラジエント・フイルタ(1
次微分、境界線抽出)適用後のデータでは、対象
の輪郭に対応している部分は、他の部分よりもレ
ベルが高い。 In other words, the contour of the object to be contour extracted is considered to correspond to a portion of the original image where the brightness is rapidly changing. Therefore, a Laplacian filter (second derivative) or a gradient filter (1
In the data after applying (order differentiation, boundary line extraction), the part corresponding to the contour of the object has a higher level than other parts.
そこで、フイルタリング後のデータに対して、
水平、垂直、45゜対角及び135゜対角方向の極点処
理を行ない、原画上で明るさの急変している輪郭
候補点の抽出をする。尚、前記4方向でなく、2
方向でもよい。 Therefore, for the data after filtering,
Pole processing is performed in the horizontal, vertical, 45° diagonal, and 135° diagonal directions to extract contour candidate points whose brightness changes suddenly on the original image. In addition, instead of the four directions mentioned above, there are two directions.
It can also be a direction.
これだけであると、外的要因による背景ノイズ
が沢山抽出されてしまう。 If this is all that is done, a lot of background noise due to external factors will be extracted.
しかし背景ノイズのレベルは、通常、対象の輪
郭点より低いレベルであるので、閾値処理によつ
て除去することができる。 However, since the level of background noise is usually lower than the contour points of interest, it can be removed by thresholding.
すなわち、そのスライスレベルは、極点抽出処
理によつて抽出された輪郭候補点列が途切れない
程度で、背景ノイズが除去できる位でよい。 That is, the slice level may be such that the sequence of contour candidate points extracted by the extreme point extraction process is not interrupted and that background noise can be removed.
また、この閾値処理は極点抽出処理と並行して
行なえるため、極点抽出部14と閾値処理部15
を並列配置することによつて高速化できる。 In addition, since this threshold processing can be performed in parallel with the extreme point extraction processing, the extreme point extraction section 14 and the threshold processing section 15
The speed can be increased by arranging them in parallel.
この結果、水平、垂直、45゜対角及び135゜対角
方向の極点で、かつ一定のスライスレベル以上の
点が2値画像として輪郭候補点として抽出でき
る。 As a result, points at the extreme points in the horizontal, vertical, 45° diagonal, and 135° diagonal directions and at a certain slice level or higher can be extracted as contour candidate points as a binary image.
ところで、閾値処理部15における閾値処理に
おいてスライスレベルを輪郭候補点列が途切れな
いように設定したので、第18図に示す如く、多
少のひげ状のノイズN1や数画素以下の孤立ノイ
ズN2が残つてしまう。 By the way, in the threshold processing in the threshold processing unit 15, the slice level was set so that the contour candidate point sequence was not interrupted, so that some whisker-like noise N1 and isolated noise N2 of several pixels or less remained as shown in FIG. I get tired.
そこで、2値画像として抽出された輪郭候補点
列が少なくとも8連結のつながりで閉ループを構
成していると仮定し、3×3の局所ウインドウ内
の論理演算によつて、ひげ状のノイズや孤立ノイ
ズの除去を行なう。これらの各ノイズの除去は雑
音除去部16により行なう。 Therefore, assuming that the contour candidate point sequence extracted as a binary image constitutes a closed loop with at least 8 connections, we can eliminate whisker-like noise and isolated Perform noise removal. Removal of each of these noises is performed by the noise removal section 16.
雑音除去部16の詳細構造を説明するに先立ち
その動作原理について説明する。 Before explaining the detailed structure of the noise removal section 16, its operating principle will be explained.
第19図〜に示す如く、3×3のウインド
ウWの中心における注目画素Eが雑音でない場合
には必ず閉ループ画像である。そして閉ループ画
像は連続的であることから、この閉ループ画像は
ウインドウWを必ず横切ることになり、ウインド
ウW内の周辺画素のうち少なくとも2つは閉ルー
プがそを上の画素でなければならないといえる。
そして前記前提条件を加味すると、前記閉ループ
画像上の2つの周辺画素は相隣接しない一関係に
なつていなければならないといえる。 As shown in FIGS. 19-19, if the pixel of interest E at the center of the 3×3 window W is not noise, it is always a closed-loop image. Since the closed-loop image is continuous, the closed-loop image always crosses the window W, and it can be said that at least two of the surrounding pixels within the window W must be pixels above which the closed loop is located.
Considering the above preconditions, it can be said that the two peripheral pixels on the closed loop image must have a non-adjacent relationship.
これらのことから、注目画素Eが閉ループ画像
上の画素であるためには、注目画素Eが状態1で
ある場合において少なくとも相隣接しない2つの
周辺画素が状態1であることが必要になる。この
条件に該当するものは16通りあり、各場合をウイ
ンドウWによつて表したものが第19図に示され
ている。 From these facts, in order for the pixel of interest E to be a pixel on a closed-loop image, when the pixel of interest E is in state 1, at least two neighboring pixels that are not adjacent to each other must be in state 1. There are 16 cases that meet this condition, and each case is represented by a window W in FIG. 19.
この場合において、説明を単純化するために、
閉ループ画像が角部を備えているものについては
前記角部に対応した画素は閉ループ画像上の画素
でないものとして扱うことを前提とする。 In this case, to simplify the explanation,
If the closed-loop image has a corner, it is assumed that the pixel corresponding to the corner is treated as not a pixel on the closed-loop image.
この後、第19図に示すウインドウW内の基本
パターンが生じないパターンを調べ、数画素程度
の雑音やひげ状の雑音を除去するための雑音除去
条件として設定する。 Thereafter, a pattern in which the basic pattern does not occur within the window W shown in FIG. 19 is examined and set as a noise removal condition for removing noise of several pixels or whisker-like noise.
この場合、第一の雑音除去条件としては、第2
0図aのウインドウWにおいて、同図bの〜
に示すように、注目画素Eが状態1である場合に
おいて、少なくともウインドウWの相隣接する二
辺に沿う周辺画素が状態0であること、すなわ
ち、ウインドウWの上辺11及び左辺12に沿う周
辺画素A、B、C、D、Gが状態0、ウインドウ
Wの左辺12及び下辺13に沿う周辺画素A、D、
G、H、Iが状態0、ウインドウWの下辺13及
び右辺14に沿う周辺画素G、H、I、F、Cが
状態0、ウインドウWの右辺14及び上辺11に沿
う周辺画素I、F、C、B、Aが状態0のいずれ
かであることが挙げられる。 In this case, as the first noise removal condition, the second
In the window W in Figure 0a, ~ in Figure b
As shown in , when the pixel of interest E is in state 1, at least the surrounding pixels along two adjacent sides of window W are in state 0, that is, along the top side 1 1 and left side 1 2 of window W. Surrounding pixels A, B, C, D, G are in state 0, peripheral pixels A, D, along left side 1 2 and bottom side 1 3 of window W,
G, H, I are in state 0, peripheral pixels along lower side 1 3 and right side 1 4 of window W G, H, I, F, C are in state 0, peripheral pixels along right side 1 4 and upper side 1 1 of window W One example is that I, F, C, B, and A are in any state 0.
第二の条件としては、第20図c〜に示す
ように、注目画素が状態1である場合において、
少なくともウインドウWの一辺に沿う周辺画素と
これに隣接する周辺画素とが状態0であり且つ前
記ウインドウWの対向辺中央に位置する周辺画素
が状態1であること、例えば、ウインドウWの上
辺11に沿う周辺画素A、B、C及びこれに隣接
する周辺画素D、Fが状態0であり且つウインド
ウWの下辺13中央に位置する周辺画素Hが状態
1であること等が挙げられる。 The second condition is that when the pixel of interest is in state 1, as shown in FIG.
At least the peripheral pixels along one side of the window W and the peripheral pixels adjacent thereto are in the state 0, and the peripheral pixels located at the center of the opposite side of the window W are in the state 1, for example, the upper side of the window W 1 1 For example, peripheral pixels A, B, and C along the line and peripheral pixels D and F adjacent thereto are in state 0, and peripheral pixel H located at the center of the lower side 13 of window W is in state 1.
尚、第20図において×印を付した画素は状態
1若しくは状態0のいずれでもよいことを示して
いる。 Note that the pixels marked with an x in FIG. 20 indicate that they may be in either state 1 or state 0.
したがつて、2値画像を移動するウインドウW
内のパターンが前記第一及び第二の雑音除去条件
のいずれかに合致したとすれば、注目画素Eが状
態1であるとしても、当該注目画素Eは閉ループ
画像の画素ではなく、雑音として検出されること
になり、これを「0」とすることによりこの雑音
は有効に除去されるとになる。 Therefore, the window W for moving the binary image
If the pattern within meets either of the first and second noise removal conditions, even if the pixel of interest E is in state 1, the pixel of interest E is not detected as a pixel of a closed-loop image but as noise. By setting this to "0", this noise can be effectively removed.
例えば、第18図に示すように、4画素以下の
画素がかたまつた雑音N2が存在する場合には、
第一の雑音除去条件で取り除かれ、閉ループ画像
からのびるひげ状の雑音N1が存在する場合に
は、第二の雑音除去条件で取り除かれることにな
る。 For example, as shown in FIG. 18, when there is noise N2 in which four or fewer pixels are clustered together,
If there is whisker-like noise N1 extending from the closed-loop image that is removed under the first noise removal condition, it will be removed under the second noise removal condition.
前述したような雑音除去方法を実施するための
回路の一例を第21図に示し、以下においてこれ
を説明する。 An example of a circuit for carrying out the noise removal method as described above is shown in FIG. 21, and will be described below.
この雑音除去部16は、第21図に示す如く、
空間フイルタ・閾値処理部69からの2値画像が
入力されるデータシフト回路70と論理演算回路
71から構成されている。 As shown in FIG. 21, this noise removal section 16
It is comprised of a data shift circuit 70 to which the binary image from the spatial filter/threshold processing section 69 is input, and a logic operation circuit 71.
第1空間フイルタ演算部12、第2空間フイル
タ演算部13、極点抽出部14、閾値処理部15
等よりなる空間フイルタ・閾値処理部69の出力
は、第22図に示す如く、レジスタR1′〜R
9′、N−3ビツト長のシフトレジスタ72,7
3により構成されるデータシフト回路70に入力
され、これにより各レジスタR1′〜R9′に画素
A〜Iが出力され、論理演算回路71に入力され
る。 First spatial filter calculation unit 12, second spatial filter calculation unit 13, pole extraction unit 14, threshold processing unit 15
As shown in FIG. 22, the output of the spatial filter/threshold processing section 69 consisting of
9', N-3 bit length shift register 72,7
3, pixels A to I are outputted to each register R1' to R9', and inputted to a logic operation circuit 71.
ここで、論理演算回路71は、第23図に示す
如く構成され、第20図b,cの第一の雑音除去
条件若しくは第二の雑音除去条件を満足したとき
に注目画素Eのレベルを状態0として出力し、そ
れ以外のときには注目画素Eのレベルを状態1の
ま出力するものであり、論理演算回路71からは
雑音除去した2値画像データが順次得られること
になる。 Here, the logic operation circuit 71 is configured as shown in FIG. 23, and changes the level of the target pixel E to the state when the first noise removal condition or the second noise removal condition shown in FIGS. 20b and 20c is satisfied. In other cases, the level of the target pixel E is output as 1, and the logical operation circuit 71 sequentially obtains binary image data from which noise has been removed.
そして、前記論理演算回路71は、具体的には
以下の論理式(a)乃至(d)を満足するように構成され
ている。 Specifically, the logical operation circuit 71 is configured to satisfy the following logical expressions (a) to (d).
E^1
{(A∪B∪C∪D∪G)∩(A∪D∪G∪H∪I)
∩(G∪H∪I∪F∪C)∩(A∪B∪C∪F∪
I)}∩E
={(A∪B∪C∪D∪G)∩(A∪D∪G∪G∪H
∪I)∩
(G∪H∪I∪C∪F∪I)∩(A∪B∪C∪C∪
F∪I)}∩E
={(X1∪X2)∩(X2∪X3)∩(X3∪X4)∩(X4∪X1
)}∩E…(a)
E^2=〔{(A∪B∪C∪D∪F)∪}∩{(A∪D
∪G∪B∪H)∪}∩
{(D∪F∪G∪H∪I)∪}∩{(C∪F∪I∪
B∪H)∪)〕∩E
=〔{(X1∪D∪F)∪}∩{(X2∪B∪H)∪
}∩
{(X3∪D∪F)∪}∩{(X4∪B∪H)∪}
〕∩E…(b)
E^=E^1∩E^2 …(c)
X1=A∪B∪C、X2=A∪D∪G、X3=G∪H∪I、X4
=C∪F∪I…(d)
(a)乃至(d)式において、A乃至Iは画素A乃至I
のデータを示し、、、、は画素B、D、
F、Hの反転データを示し、E^1及びE^2はそれぞ
れ第一の雑音除去条件及び第二の雑音除去条件を
満足するか否かを示す指標値、E^は注目レベルE
が雑音であるか否かを示す指標値である。E^ 1 {(A∪B∪C∪D∪G)∩(A∪D∪G∪H∪I)
∩(G∪H∪I∪F∪C)∩(A∪B∪C∪F∪
I)}∩E = {(A∪B∪C∪D∪G)∩(A∪D∪G∪G∪H
∪I)∩ (G∪H∪I∪C∪F∪I)∩(A∪B∪C∪C∪
F∪I)}∩E = {(X 1 ∪X 2 )∩(X 2 ∪X 3 )∩(X 3 ∪X 4 )∩(X 4 ∪X 1
)}∩E…(a) E^ 2 = [{(A∪B∪C∪D∪F)∪}∩{(A∪D
∪G∪B∪H)∪}∩ {(D∪F∪G∪H∪I)∪}∩{(C∪F∪I∪
B∪H)∪)]∩E = [{(X 1 ∪D∪F)∪}∩{(X 2 ∪B∪H)∪
}∩ {(X 3 ∪D∪F)∪}∩{(X 4 ∪B∪H)∪}
〕∩E…(b) E^=E^ 1 ∩E^ 2 …(c) X 1 = A∪B∪C, X 2 = A∪D∪G, X 3 = G∪H∪I, X 4
=C∪F∪I...(d) In formulas (a) to (d), A to I are pixels A to I.
represents the data of pixels B, D,
Indicates the inverted data of F and H, E^ 1 and E^ 2 are index values indicating whether the first noise removal condition and the second noise removal condition are satisfied, respectively, and E^ is the attention level E
This is an index value indicating whether or not is noise.
この論理式を満足する論理演算回路71の具体
構成を第23図に示す。第23図において、OR
−1′乃至OR−14′はオア回路、AN−1′乃至
AN−3′はアンド回路、NT−1′乃至NT−
4′はノツト回路である。 A specific configuration of the logical operation circuit 71 that satisfies this logical formula is shown in FIG. In Figure 23, OR
-1' to OR-14' are OR circuits, AN-1' to
AN-3' is an AND circuit, NT-1' to NT-
4' is a knot circuit.
例えば、注目画素Eと他の画素が、第20図b
に示す条件の場合には、OR−1′,OR−2′
からそれぞれ「0」が出力されるので、OR−
7′も「0」を出力し、この結果AN−1′,AN
−3′が「0」を出力し、それ故注目画素Eは
「0」となつて出力される。 For example, if the pixel of interest E and other pixels are
In the case of the conditions shown in, OR-1', OR-2'
Since “0” is output from each, OR−
7' also outputs "0", resulting in AN-1', AN
-3' outputs "0", so the pixel of interest E is output as "0".
また、第20図cに示す条件の場合には、
OR−1′,OR−5′がそれぞれ「0」を出力し、
ノツト回路NT−1′も「0」を出力するのでオ
ア回路OR−11′が「0」を出力する。この結
果、AN−2′,AN−3′が「0」を出力するの
で、注目画素Eは「0」となつて出力されること
になる。このような制御は、前記他の回路と同様
に、第2図の走査信号発生部20より出力される
水平同期信号に同期して順次行なわれることにな
る。 Furthermore, in the case of the conditions shown in Figure 20c,
OR-1' and OR-5' each output "0",
Since the NOT circuit NT-1' also outputs "0", the OR circuit OR-11' outputs "0". As a result, AN-2' and AN-3' output "0", so the pixel E of interest is output as "0". Similar to the other circuits described above, such control is performed sequentially in synchronization with the horizontal synchronizing signal output from the scanning signal generating section 20 of FIG. 2.
このようにして論理演算回路71により、第2
0図b,cに示す条件、すなわちウインドウWの
上辺と右辺、右辺と下辺、下辺と左辺あるいは左
辺と上辺に画素が存在しない場合(雑音除去条件
1)、また上辺と左右に画素がなく下にある、左
辺と上下になくて右にある、下辺と左右になくて
左にある場合(雑音除去条件2)に注目画素を雑
音とみなしてこれを除去することができる。 In this way, the logic operation circuit 71 performs the second
The conditions shown in Figure 0 b and c, that is, when there are no pixels on the top and right sides of the window W, on the right and bottom sides, on the bottom and left sides, or on the left and top sides (noise removal condition 1); If the pixel of interest is not above or below the left side but to the right, or to the left of the bottom side rather than to the left or right (noise removal condition 2), the pixel of interest can be regarded as noise and removed.
このようにして雑音の除去された対象の輪郭点
を抽出し、TVカメラ上でのその抽出された輪郭
点の座標を求めることができる。 In this way, the contour points of the object from which noise has been removed can be extracted, and the coordinates of the extracted contour points on the TV camera can be determined.
尚、このようにして得られた輪郭点の座標情報
(Xi、Yi)は、濃度レベル情報と共に、画像メモ
リ19内に格納される。 The coordinate information (Xi, Yi) of the contour point thus obtained is stored in the image memory 19 together with the density level information.
尚、濃淡画像処理部3で求められた輪郭点座標
(Xi、Yi)は、アドレスジエネレータ7によつ
て、直線抽出部4に対して輪郭アドレスのみが出
力される。 Note that for the contour point coordinates (Xi, Yi) obtained by the grayscale image processing section 3, only the contour address is outputted to the straight line extraction section 4 by the address generator 7.
次に、切換スイツチSWを“1”側にセツト
する。そしてこれにより直線抽出部4は前述の濃
淡画像処理部3で得られた輪郭点座標に対応して
Hough平面θ−ρにθをパラメータとして写像
し、ヒストグラムを作成する。 Next, set the changeover switch SW to the "1" side. As a result, the straight line extracting section 4 extracts
A histogram is created by mapping onto the Hough plane θ-ρ with θ as a parameter.
この処理について説明する。 This process will be explained.
第1図において、75はFirst In First Out
(FIFO)式のデータバツフアであつて、濃淡画像
処理部3より出力された輪郭アドレスが順次格納
される。76はρ計算部であつて、データバツフ
ア75に格納された各輪格アドレス(Xi、Yi)
を読出して、次式の演算を行なう。 In Figure 1, 75 is First In First Out
It is a (FIFO) type data buffer, and the contour addresses output from the grayscale image processing section 3 are sequentially stored. 76 is a ρ calculation unit which calculates each ring address (Xi, Yi) stored in the data buffer 75.
is read out and the calculation of the following equation is performed.
ρn=Xicosθn+Yisinθn
θn=nπ/512、n=0〜511
77はFirst In First Out(FIFO)式のデータ
バツフアであつて、ρ計算部76により求められ
たρnとθnが格納される。78はヒストグラム作
成部であつて、データバツフア76に格納された
ρnとθnをアドレスとしてヒストグラムメモリ7
9を読出し、“1”を加算して再度同じアドレス
に加算した結果を書き込む処理を行なう。ρn=Xicosθn+Yisinθn θn=nπ/512, n=0 to 511 77 is a first-in-first-out (FIFO) type data buffer in which ρn and θn calculated by the ρ calculation unit 76 are stored. 78 is a histogram creation unit which uses ρn and θn stored in the data buffer 76 as addresses to write the histogram memory 7.
9 is read, "1" is added, and the result of the addition is written again to the same address.
第24図にρ計算部76の詳細回路図を示す。 FIG. 24 shows a detailed circuit diagram of the ρ calculation section 76.
図において、80はクロツクパルスにより順次
後述するcosθテーブル81及びsinθテーブル82
のアドレスθnを発生するアドレスカウンタ、8
1はcosθテーブルであつて、nπを512等分した値
が格納されている。82はsinθテーブルであつ
て、nπを512等分した値が格されている。83は
データバツフア75からの輪郭アドレスのうちの
Xiアドレスが格納されるレジスタ、84はデー
タバツフア75からの輪郭アドレスのうちのYi
アドレスが格納されるレジスタ、85はcosθテー
ブルからの値が格納されるレジスタ、86はsinθ
テーブルからの値が格納されるレジスタ、87は
レジスタ83とレジスタ84に格納された値とを
乗算する乗算器、88はレジスタ85とレジスタ
86に格納された値とを乗算する乗算器、89は
乗算器87の乗算結果を格納するレジスタ、90
は乗算器88の乗算結果を格納するレジスタ、9
1はレジスタ89とレジスタ90に格納された値
とを加算する加算器、92は加算器91の加算結
果を格納するレジスタ、93はアドレスカウンタ
80の出力するアドレスθnを遅延する遅延器9
3であつて、レジスタ92に格納された内容を同
期をとつてデータバツフア76に格納するための
ものである。 In the figure, 80 indicates a cosθ table 81 and a sinθ table 82, which will be described later, in sequence by a clock pulse.
an address counter that generates the address θn of 8
1 is a cosθ table in which values obtained by dividing nπ into 512 equal parts are stored. 82 is a sinθ table in which values obtained by dividing nπ into 512 equal parts are listed. 83 is one of the contour addresses from the data buffer 75.
A register 84 stores the Xi address, Yi of the contour address from the data buffer 75.
A register in which the address is stored, 85 is a register in which the value from the cosθ table is stored, 86 is sinθ
87 is a multiplier that multiplies the values stored in register 83 and register 84; 88 is a multiplier that multiplies the values stored in register 85 and register 86; 89 is a register in which the value from the table is stored; a register 90 for storing the multiplication result of the multiplier 87;
is a register that stores the multiplication result of the multiplier 88;
1 is an adder that adds the values stored in register 89 and register 90, 92 is a register that stores the addition result of adder 91, and 93 is a delay device 9 that delays address θn output from address counter 80.
3 for synchronizing the contents stored in the register 92 and storing it in the data buffer 76.
以上説明した構成とすることにより、クロツク
パルスの入力と共に、輪郭アドレスに対してn個
(512個)のθ−ρ平面上の座標を求めることがで
きる。そしてこれを各輪郭アドレス毎に繰り返し
て実行することにより濃淡画像処理部3で得れた
輪郭点座標に対するハフ変換画像が得られる。 With the configuration described above, n (512) coordinates on the .theta.-.rho. plane can be determined for the contour address at the same time as the clock pulse is input. By repeating this process for each contour address, a Hough transform image for the contour point coordinates obtained by the grayscale image processing section 3 is obtained.
そして、このようにして得られたハフ変換画像
を前述したように、ヒストグラム作成部78によ
りヒストグラムメモリ79上に格納する。 Then, the Hough transform image obtained in this manner is stored on the histogram memory 79 by the histogram creation section 78, as described above.
以上の処理を行なうことによりヒストグラムメ
モリ79上に各輪郭点に対応するハフ変換画像の
ヒストグラムが格納される。 By performing the above processing, the histogram of the Hough transformed image corresponding to each contour point is stored on the histogram memory 79.
このヒストグラムメモリ79上のヒストグラム
の個数の高い点が物体の面を構成する線分に対応
するが、ノイズの多い画面では、物体の面を構成
する1本の線分に対応して複数個のヒストグラム
の個数の高い点が表れる。 A point with a high number of histograms on this histogram memory 79 corresponds to a line segment that makes up the surface of the object, but on a screen with a lot of noise, a point with a high number of histograms corresponds to a line segment that makes up the surface of the object. Points with a high number of histograms appear.
そこで、各線分に対応するピーク点のみを抽出
する必要である。 Therefore, it is necessary to extract only the peak points corresponding to each line segment.
以下にこのピーク点の抽出処理について説明す
る。 This peak point extraction process will be explained below.
まず、第1図において、直線抽出部4にさらに
ヒストグラムメモリ79の内容を読出すためのメ
モリ読出部93を設け、この出力を切換スイツチ
SWの入力“2”側に接続する。 First, in FIG. 1, the straight line extracting section 4 is further provided with a memory reading section 93 for reading out the contents of the histogram memory 79, and this output is sent to the selector switch.
Connect to the SW input “2” side.
したがつて、ピーク点抽出処理を行なう際には
切換スイツチSWを“2”側に切換える。 Therefore, when performing the peak point extraction process, the changeover switch SW is switched to the "2" side.
そして、ヒストグラムメモリ79内に格納され
ているハフ変換画像を濃淡画像処理部3に入力せ
しめ、このハフ変換画像に対して前述した濃淡画
像処理部3の処理を行なうことによりピーク候補
点を抽出する。但し、極点抽出処理において、第
15図の切替回路200をアンド回路AN−5を
出力するように切替えておくことにより、4方向
とも極大となるピークを出力する。 Then, the Hough transform image stored in the histogram memory 79 is input to the grayscale image processing section 3, and peak candidate points are extracted by performing the above-described processing of the grayscale image processing section 3 on this Hough transform image. . However, in the extreme point extraction process, by switching the switching circuit 200 in FIG. 15 to output the AND circuit AN-5, peaks that are maximum in all four directions are output.
そして、得られたピーク候補点に基づいてピー
ク点の統合処理を行なうために切換スイツチを
“2”側に切換え、直線抽出部4に設けられたピ
ーク点統合演算部94に入力する。 Then, in order to perform peak point integration processing based on the obtained peak candidate points, the changeover switch is switched to the "2" side, and the peak point candidate points are input to the peak point integration calculation section 94 provided in the straight line extraction section 4.
ピーク点統合演算部94では入力されてくるピ
ーク候補点のうち近接するピーク候補点を統合し
輪郭線に対応するピーク点のみを抽出する。 The peak point integration calculation unit 94 integrates adjacent peak candidate points among the input peak candidate points and extracts only the peak points corresponding to the contour line.
このピーク点を抽出処理について説明する。 The process of extracting this peak point will be explained.
第25図はピーク点の抽出処理を説明するため
の図である。図において、閾値演算部95は第2
図中の閾値処理部15に対応し、画像メモリ96
は同図中の画像メモリ19に対応する。尚、第2
5図において、第2図中に図示の雑音除去部16
については図示しない。 FIG. 25 is a diagram for explaining the peak point extraction process. In the figure, the threshold calculation unit 95
An image memory 96 corresponds to the threshold processing section 15 in the figure.
corresponds to the image memory 19 in the figure. Furthermore, the second
5, the noise removal section 16 shown in FIG.
are not shown.
閾値演算部95は、所定の閾値レベル以上のピ
ーク候補点Xi(i=1〜N)を抽出する。抽出さ
れたピーク候補点Xiは、その座標情報Xx i、Xy i及
び濃度レベルXL iと共に、画像メモリ96に格納
される。 The threshold calculation unit 95 extracts peak candidate points Xi (i=1 to N) that are equal to or higher than a predetermined threshold level. The extracted peak candidate point Xi is stored in the image memory 96 along with its coordinate information X x i , X y i and density level X Li .
ピーク点統合演算部94は、クラスタリング演
算部97、最大値演算部98、メモリ99,10
0とから構成される。 The peak point integration calculation unit 94 includes a clustering calculation unit 97, a maximum value calculation unit 98, and memories 99 and 10.
It consists of 0.
クラスタリング演算部97は、閾値演算部95
が抽出したN個のピーク候補点について、クラス
分類を行なうものである。すなわち、Hough変
換によつて得られるヒストグラムは、第26図図
示ab平面の如く、ノイズ等のために1つの山の
ピーク近傍に他のピークが現れることが多く、複
数のピークが1本の直線に対応する場合が少なく
ない。そのため、ピーク候補点Xiについて、そ
れぞれ同じ山に属するものであるかどうかを分類
することができれば、直線に1対1に対応する正
しいピークが抽出することができる。尚、分類結
果のクラスタ数Ncは、クラスタリング演算部9
7の起動時には、未知である。 The clustering calculation unit 97 includes a threshold calculation unit 95
Class classification is performed for the N peak candidate points extracted. In other words, in the histogram obtained by Hough transformation, other peaks often appear near the peak of one mountain due to noise etc., as shown in the a-b plane shown in Figure 26, and multiple peaks form a single straight line. In many cases, this corresponds to Therefore, if it is possible to classify peak candidate points Xi as to whether they belong to the same mountain or not, it is possible to extract correct peaks that correspond one-to-one to the straight line. In addition, the number of clusters Nc of the classification result is determined by the clustering calculation unit 9.
7 is unknown at startup.
クラスタリング演算部97は、例えば第27図
図示の如く、順序付け演算部101と、クラス分
類演算部102と、評価基準演算部103と閾値
更新部104とからなる。第5図中の画像メモリ
19及びメモリ99は第25図に対応する。 The clustering calculation section 97 includes, for example, as shown in FIG. 27, an ordering calculation section 101, a class classification calculation section 102, an evaluation criterion calculation section 103, and a threshold value updating section 104. Image memory 19 and memory 99 in FIG. 5 correspond to FIG. 25.
画像メモリメモリ19、メモリ105、メモリ
99は同じメモリでもよい。 Image memory memory 19, memory 105, and memory 99 may be the same memory.
順序付け演算部101は画像メモリ19を参照
し、各点X1,X2,…,Xnの濃度レベルXL iの
大小を比較して、各点を濃度レベルの大きい純に
並べ換え、結果を画像メモリ19に格納する。 The ordering calculation unit 101 refers to the image memory 19, compares the density levels X L i of each point X1, X2,..., Store in.
クラス分類演算部102は、順序付け演算部1
01によつて順序付けされた点Y1,Y2,…,
Ynについて、先頭から順番に他の点とのユーク
リツド距離を演算し、その距離と閾値とを比較す
ることによつて、閾値以下の距離のものにラベル
付けを行ない、クラス分類するものである。 The class classification calculation unit 102 includes the ordering calculation unit 1
Points Y1, Y2,..., ordered by 01
For Yn, the Euclidean distance from other points is calculated in order from the beginning, and by comparing the distance with a threshold value, those having a distance less than the threshold value are labeled and classified into classes.
評価基準演算部103は、クラス分類演算部1
02によつて分類された各クラス内の分散を平均
的に最小にする評価基準を導入して、その評価基
準を演算するものである。 The evaluation criterion calculation unit 103 is the class classification calculation unit 1
In this method, an evaluation criterion is introduced that minimizes the variance within each class classified by 02 on average, and the evaluation criterion is calculated.
閾値処理部104は、評価基準が、より小さな
値になるようにクラス分類に用いる閾値の更新を
行なうものである。閾値を変化させることによつ
て、クラス分類演算部102による異なる分類結
果を得ることができるようになる。 The threshold processing unit 104 updates the threshold used for class classification so that the evaluation standard becomes a smaller value. By changing the threshold value, different classification results can be obtained by the class classification calculation unit 102.
第28図乃至第31図を参照して、順序付け演
算部101、クラス分類演算部102、評価基準
演算部103および閾値更新部104の処理内容
について説明する。 The processing contents of the ordering calculation section 101, the class classification calculation section 102, the evaluation criterion calculation section 103, and the threshold value updating section 104 will be explained with reference to FIGS. 28 to 31.
順序付け演算部101は、例えば第28図図示
の如く処理する。すなわち、ループカウンタjを
1からN−1まで、またループカウンタiを1か
らN−jまで変化させつつ、隣接するXi、Xi+
1の濃度レベルXL iとXL i+1との大小を比較する。 The ordering calculation unit 101 performs processing as shown in FIG. 28, for example. That is, while changing the loop counter j from 1 to N-1 and the loop counter i from 1 to N-j, the adjacent Xi, Xi+
The density levels X L i of 1 and X L i+1 are compared in size.
濃度レベルXL i+1が濃度レベルXL iよりも大きい
場合には、点Xiと点Xi+1の位置を交換する。こ
の繰り返し処理によつて、画像メモリ19の内容
は、メモリ105のように濃度レベルの昇順に並
べられることになる。もちろん、他の各種ソーテ
イング手段を用いてもよい。 If the density level X L i+1 is greater than the density level X L i , the positions of the points Xi and X i+1 are exchanged. Through this repeated process, the contents of the image memory 19 are arranged in ascending order of density level like the memory 105. Of course, various other sorting means may also be used.
クラス分類演算部102は、例えば第29図図
示の如く処理する。まず、濃度レベルが最大の
Y1を第1のクラスの中心C1とする。そして、C
1とその他のピーク点Yj(j=2、3、…N)と
のユークリツド距離Dj1、
Dj1=|Yj−C1|
=√(x j−x 1)2+(y j−y 1)2)
を求める。この距離Dj1が閾値Tmより小さいと
き、YjはY1と同じ第1のクラスに属するものと
する。 The class classification calculation unit 102 performs processing as shown in FIG. 29, for example. First, the concentration level is the highest.
Let Y1 be the center C1 of the first class. And C
1 and other peak points Yj ( j = 2 , 3,... N ) seek. When this distance Dj1 is smaller than the threshold Tm, it is assumed that Yj belongs to the same first class as Y1.
次に、第(k−1)のクラスまで分類できたと
して、第1のクラスから第(k−1)までのクラ
スに属さない点の中で、濃度レベルが最大の点
Yiを第kクラスの中心Ckとする。そして、Ckと
その他の点Yj(j=1+1〜N)とのユークリツ
ド距離Djkを求める。 Next, assuming that classification is possible up to the (k-1)th class, the point with the highest concentration level among the points that do not belong to the classes from the first class to the (k-1)th class
Let Yi be the center Ck of the k-th class. Then, the Euclidean distance Djk between Ck and other points Yj (j=1+1 to N) is determined.
Djk=|Yj−Ck|
=√(x j−x k)2+(y j−x k)2)
この結果、距離Djkが閾値Tmより小さいとき、
Yjは第kクラスに属するものとする。Djk= |Yj−Ck| =√( x j − x k ) 2 + ( y j − x k ) 2 ) As a result, when the distance Djk is smaller than the threshold Tm,
It is assumed that Yj belongs to the k-th class.
k=k+1として、同様に処理を繰り返し、す
べてのYjがいずれかのクラスに属したならば、
クラス分類を終了する。すなわち、未分数の点の
中で、濃度レベルの最大のものを、新たなクラス
の中心として、順番に分類を行なつていく。 Repeat the process in the same way with k=k+1, and if all Yj belong to one of the classes,
Finish classification. That is, among the unfractioned points, the one with the highest density level is taken as the center of a new class, and classification is performed in order.
評価基準演算部103は、例えば第30図図示
の如く処理する。すなわち、各クラス内の分散が
平均的に最も小さくなるようにクラスタリングが
良いクラスタリングであるとして、次式で表わす
ような評価基準Jmを導入する。 The evaluation criterion calculation unit 103 performs processing as shown in FIG. 30, for example. That is, assuming that clustering is good clustering so that the variance within each class is minimized on average, an evaluation criterion Jm expressed by the following equation is introduced.
Jm=〓〓|Yj−mk|2
mk=1/Nk〓〓Yj
ここで、Ncはクラスの数、Nkは第kクラスの
ピーク点数、〓kは第kクラスのサンプル集合で
ある。この評価基準Jmの演算を実行し、結果を
閾値更新部104へ伝達する。Jm=〓〓|Yj−mk| 2 mk=1/N k 〓〓Yj Here, Nc is the number of classes, N k is the number of peak points of the k-th class, and 〓k is the sample set of the k-th class. The calculation of this evaluation standard Jm is executed and the result is transmitted to the threshold updating unit 104.
閾値更新部104は、例えば第31図図示の如
く処理する。すなわち、評価基準Jmが、ある所
定値εJ以下、あるいは前回のJn=1との差分djがあ
る所定値εdJ以下になるまで、閾値Tmを徐々に
変化させ、再度クラス分類演算部102を起動す
る。 The threshold value updating unit 104 performs processing as shown in FIG. 31, for example. That is, the threshold value Tm is gradually changed until the evaluation standard Jm becomes less than or equal to a certain predetermined value ε J or the difference dj from the previous J n=1 becomes less than or equal to a certain predetermined value εd J , and the class classification calculation unit 102 Start.
評価基準Jmまたは前回との差分djが十分に小
さな値となつたとき、良いクラスタリングが実行
できたとして、すべてのクラスタリング処理を終
了する。 When the evaluation criterion Jm or the difference dj from the previous time becomes a sufficiently small value, it is assumed that good clustering has been performed, and all clustering processing is terminated.
Hough変換等の2次元ヒストグラムにおける
点をクラスタリングするような場合、各点はクラ
ス内の最大値を中心に分布している。そこで、前
記のように、すべての対象点を予め大きさの順に
並べ換かえておくことによつて、クラスタリング
時のクラスの中心を最初から最大値に選ぶことが
でき、例えばヒストグラム空間における座標の順
番に中心点を想定した場合等に比べて、良いクラ
スタリングを得ることができる。したがつて、最
終的に満足できるクラスタリングを得るまでの閾
値の更新回数を大幅に減少させることができる。 When clustering points in a two-dimensional histogram such as Hough transformation, each point is distributed around the maximum value within the class. Therefore, as mentioned above, by sorting all target points in order of size in advance, the center of the class during clustering can be selected from the beginning with the maximum value. Better clustering can be obtained compared to cases where center points are assumed in order. Therefore, the number of times the threshold is updated until finally satisfactory clustering is obtained can be significantly reduced.
最大値演算部98は、クラスタリング演算部9
7が出力したメモリ99のクラスタリング結果を
参照し、各クラスの最大値Zi(i=1〜Nc)を求
めるものである。クラスタリング演算部97が第
27図図示の如く構成される場合、メモリ99上
のピーク候補点Yiは、濃度レベルの昇順に並ん
でいる。 The maximum value calculation unit 98 is the clustering calculation unit 9
The maximum value Zi (i=1 to Nc) of each class is determined by referring to the clustering results of the memory 99 outputted by 7. When the clustering calculation unit 97 is configured as shown in FIG. 27, the peak candidate points Yi on the memory 99 are arranged in ascending order of density level.
したがつて、i=1の方向からサーチすること
によつて、容易に各クラスの最大値Ziが求められ
る。 Therefore, by searching from the direction of i=1, the maximum value Zi of each class can be easily found.
すなわち、例えば第32図図示の如く、クラス
番号kを1からNcまで変化させ、各クラス対応
に最初に現れたピーク候補点を抽出する。 That is, for example, as shown in FIG. 32, the class number k is changed from 1 to Nc, and the peak candidate point that appears first for each class is extracted.
このようにして、メモリ100に得られた各ク
ラスの最大値Ziが、Hough変換のヒストグラム
等の場合、直線に1対1に対応するピーク点とな
る。 In this way, the maximum value Zi of each class obtained in the memory 100 becomes a peak point that corresponds one-to-one to a straight line in the case of a Hough transform histogram or the like.
以上の処理を行なうことにより各線分に対応す
るピーク点のみを抽出することができる。 By performing the above processing, only the peak points corresponding to each line segment can be extracted.
このようにして得られたピーク点(θi、ρi)に
基づいて、直線方程式を計算する。 A linear equation is calculated based on the peak points (θi, ρi) obtained in this way.
この計算は、第2図の直線抽出部4内の直線方
程式計算部106により行なう。 This calculation is performed by the linear equation calculation section 106 in the straight line extraction section 4 shown in FIG.
この直線方程式の算出処理のためのフローチヤ
ートを第33図に示す。 A flowchart for calculating this linear equation is shown in FIG. 33.
図に示されるように、得られたピーク点(θi、
ρi、i=1〜M)について直線方程式
Y=aiX+bi
に基づいて、
ai=−cosθi/sinθi
bi=ρi/sinθi
を算出する。 As shown in the figure, the obtained peak point (θi,
ρi, i=1 to M), ai=−cosθi/sinθi bi=ρi/sinθi is calculated based on the linear equation Y=aiX+bi.
尚、cosθi=0の場合は、 Y=ρi/sinθi=ci また、sinθi=0の場合は、 X=ρi/cosθi=di を算出する。 In addition, if cosθi=0, Y=ρi/sinθi=ci Also, if sinθi=0, X=ρi/cosθi=di Calculate.
そしてこの直線方程式計算部106により得ら
れたai、bi、ci、diは、領域抽出部5へ出力され
る。 The ai, bi, ci, and di obtained by the linear equation calculating section 106 are output to the region extracting section 5.
領域抽出部5は入力された前記各値に基づいて
領域の抽出を行なう。 The area extraction unit 5 extracts an area based on each of the input values.
この領域抽出の処理について説明する。 This area extraction process will be explained.
第2図において、107は線分抽出部、108
は閉ループ抽出部、109は投影点計算部であ
る。 In FIG. 2, 107 is a line segment extraction unit, 108
109 is a closed-loop extraction unit, and 109 is a projection point calculation unit.
まず、線分抽出部107の動作を第34図に示
すフローチヤートを用いて説明する。 First, the operation of the line segment extraction section 107 will be explained using the flowchart shown in FIG.
線分抽出部107には、直線方程式計算部10
6により得られた傾き、切片情報および濃淡画像
処理部3内の画像メモリ19内に格納された輪郭
点座標が入力される。 The line segment extraction unit 107 includes a linear equation calculation unit 10.
The slope and intercept information obtained in step 6 and the contour point coordinates stored in the image memory 19 in the grayscale image processing section 3 are input.
そして、第35図に示すように、入力された輪
郭点座標をXY平面上に展開すると共に、傾きと
切片に基づいた直線をXY平面上に擬似的に発生
せしめる。 Then, as shown in FIG. 35, the input contour point coordinates are developed on the XY plane, and a straight line based on the slope and the intercept is generated in a pseudo manner on the XY plane.
そして、この直線上に沿つてK×Lマトリツク
スからなるウインドウを走査させる。 Then, a window consisting of a K×L matrix is scanned along this straight line.
このウインドウ内に存在する輪郭点の数を、ウ
インドウ内の例えば左上端から順次走査してウイ
ンドウ内の各座標に対応する画像メモリ19内に
輪郭点が格納されているか否かを調べる。 The number of contour points existing within this window is sequentially scanned from, for example, the upper left corner of the window to check whether contour points are stored in the image memory 19 corresponding to each coordinate within the window.
そして、輪郭点であつた場合には、カウンタ
CONTを“1”づつ加算し、輪郭点ではない場
合には、次のウインドウ内の座標位置に移動す
る。 Then, if it is a contour point, the counter
Add CONT by "1", and if it is not a contour point, move to the coordinate position in the next window.
そしてこの処理を順次繰り返し、ウインドウ演
算回路内の右下端まで実行する。そして処理終了
後のカウンタCONTの値が所定値T以上ならば、
その座標を直線上の注目点座標(xi、yi)として
メモリ内に記憶する。このウインドウ処理を実行
する回路がウインドウ演算回路である。 This process is then sequentially repeated until it reaches the lower right end of the window calculation circuit. If the value of the counter CONT after the processing is over the predetermined value T,
The coordinates are stored in memory as the coordinates (xi, yi) of the point of interest on the straight line. A circuit that executes this window processing is a window calculation circuit.
この処理を直線のXY平面上での終了位置まで
行ない、そして次の直線をXY平面上に擬似的に
発生させ、同様の処理を順次繰り返して行なうこ
とにより、メモリ内に線分座標を格納する。 This process is performed until the end position of the straight line on the XY plane, and then the next straight line is generated in a pseudo manner on the XY plane, and the same process is repeated in sequence to store the line segment coordinates in memory. .
そして、各線分座標に基づいて、各線分の端点
Aと端点B及びその線分の長さLを抽出し、第3
6図に示す線分表を作成する。 Then, based on the coordinates of each line segment, the end point A and end point B of each line segment and the length L of the line segment are extracted, and the third
Create the line segment table shown in Figure 6.
次に、閉ループ抽出部108の動作について第
37図に示すフローチヤートを用いて説明する。 Next, the operation of the closed loop extraction section 108 will be explained using the flowchart shown in FIG. 37.
まず、各線分の端点A、B、長さLを前記線分
表から抽出し、長さLが長い順番に並べ換かえる
と共に、長い順番に番号を付与する。 First, the end points A, B, and length L of each line segment are extracted from the line segment table, rearranged in descending order of length L, and assigned numbers in descending order.
そして、この長さが最大の線分の一方の端点A
を基準として、半径R以内に端点を有する線分を
捜す。端点が存在しない場合は、半径Rを少し大
きくし、同様に線分を捜す。半径Rが所定値以上
(Rmax)大きくしても、線分が発見できない場
合は、この線分は除外(例えば無効フラグ“1”
を付与)する。半径R以内に他の線分の端点を見
付けることができた場合は、この線分に連続する
線分No.を付与し、そして見付けられた線分の他方
の端点を基準として同様の操作を繰り返して実行
する。 Then, one end point A of the line segment with the maximum length
Search for a line segment that has an end point within radius R using as a reference. If there is no endpoint, the radius R is made slightly larger and a line segment is searched in the same way. If a line segment cannot be found even if the radius R is increased by more than a predetermined value (Rmax), this line segment is excluded (for example, the invalid flag is set to “1”).
). If the end point of another line segment can be found within the radius R, assign a continuous line segment number to this line segment, and perform the same operation using the other end point of the found line segment as a reference. Execute repeatedly.
そして、最初の線分に戻つたとき、この操作を
終了し、一つの閉ループが抽出される。この閉ル
ープは、第38図に示されるように、各閉ループ
毎に、線分No.を格納する。 Then, when returning to the first line segment, this operation is completed and one closed loop is extracted. This closed loop stores line segment numbers for each closed loop, as shown in FIG.
これを繰り返すことにより、3次元空間内の閉
ループをすべて抽出することができる。 By repeating this, all closed loops in the three-dimensional space can be extracted.
投影点計算部109は、閉ループ抽出部108
により得られた各閉ループ領域の重心を計算を行
なう。 The projection point calculation unit 109 includes a closed loop extraction unit 108
The center of gravity of each closed loop region obtained by is calculated.
以上説明したようにして、投影面の抽出処理を
行なうことができる。 As explained above, the projection plane extraction process can be performed.
次に、(2)の得られた面内に十字スリツト光を照
射する処理について説明する。 Next, the process (2) of irradiating cross slit light within the obtained plane will be explained.
尚、スリツト光の投影の処理を第39図のフロ
ーチヤートに示す。 Incidentally, the process of projecting the slit light is shown in the flowchart of FIG.
ここでは、便宜上投影面内の重心座標へ十字ス
リツト光のクロス点を照射させるものとする。 Here, for convenience, it is assumed that the cross point of the cross slit light is irradiated to the center of gravity coordinates in the projection plane.
第2図において、スキヤニング機構制御部7は
スキヤニングコントローラ110と、赤外域の波
長の十字スリツト光を照射する十字スリツト光プ
ロジエクタ112を駆動するモータ111とを含
んで構成される。 In FIG. 2, the scanning mechanism control section 7 includes a scanning controller 110 and a motor 111 that drives a cross slit light projector 112 that emits cross slit light having a wavelength in the infrared region.
まず、スキヤニングコントローラ110は、十
字スリツト光のクロス点が領域抽出部7の投影点
計算部109で求められた所望の閉ループ領域の
重心座標となるようにモータ111を駆動制御し
て、十字スリツト光プロジエクタ112を移動さ
せる。 First, the scanning controller 110 drives and controls the motor 111 so that the cross point of the cross-shaped slit light becomes the barycentric coordinate of the desired closed-loop area calculated by the projection point calculation unit 109 of the area extraction unit 7, and Move the optical projector 112.
また、これと同時に、十字スリツト光像のS/
N比を向上させ、スリツト像検出を容易にするた
めにTVカメラ1の前面に可視光カツトフイルタ
を装着する。尚、これは光学的に分離できるもの
であれば何でもよい。これは、第2図に示す分離
機構113により行なう。また分離機構113は
図示しない上位の中央処理装置からの信号に基づ
いて動作する。さらに、切換スイツチを“1”
側に、切換スイツチを“1”側にセツトし、面
傾度・距離計測部6の回路構成を十字スリツト光
のラフなクロス点を求める回路構成に切換える。 At the same time, the S/ of the cross slit optical image is
A visible light cut filter is attached to the front of the TV camera 1 in order to improve the N ratio and facilitate slit image detection. Note that any material may be used as long as it can be optically separated. This is done by the separation mechanism 113 shown in FIG. Further, the separation mechanism 113 operates based on a signal from a higher-level central processing unit (not shown). Furthermore, set the changeover switch to “1”
Then, the changeover switch is set to the "1" side, and the circuit configuration of the surface inclination/distance measuring section 6 is changed to a circuit configuration for determining the rough crossing point of the cross slit light.
この状態で、TVカメラ1により3次元空間を
撮影し、スリツト像を得る。そして前述したよう
に、濃淡画像処理部3により、このスリツト像の
骨格線座標(輪郭点座標に対応)を抽出する。 In this state, a three-dimensional space is photographed by the TV camera 1 to obtain a slit image. Then, as described above, the gradation image processing section 3 extracts the skeleton line coordinates (corresponding to contour point coordinates) of this slit image.
濃淡画像処理部3により得られた骨格線座標に
基づいて、面傾度・距離計測部6内のラフなクロ
ス点計算部114により、十字スリツト光のおお
まかなクロス点座標を算出する。 Based on the skeleton line coordinates obtained by the gray scale image processing section 3, the rough cross point calculation section 114 in the surface inclination/distance measurement section 6 calculates the rough cross point coordinates of the cross slit light.
この処理を第40図を用いて説明する。 This process will be explained using FIG. 40.
まず、抽出されたスリツト光の骨格線座標の中
からX座標の最小値Xmin、最大値Xman及びY
座標の最小値Ymin、最大値Ymaxを求める。 First, from among the skeleton line coordinates of the extracted slit light, the minimum value Xmin of the X coordinate, the maximum value Xman, and the Y
Find the minimum value Ymin and maximum value Ymax of the coordinates.
そしてラフなクロス点(Xc、Yc)として、 Xc=(Xmin+Xmax)/2 Yc=(Ymin+Ymax)/2 を算出する。 And as a rough cross point (Xc, Yc), Xc=(Xmin+Xmax)/2 Yc=(Ymin+Ymax)/2 Calculate.
そして、ラフなクロス点計算部114により得
られたラフなクロス点(Xc、Yc)に基づいて、
スキヤニングコントローラ110がモータ111
を駆動制御して、ラフなクロス点が投影面内の重
心座標の近傍に十字スリツト光プロジエクタ11
2を移動させる。 Then, based on the rough cross points (Xc, Yc) obtained by the rough cross point calculation unit 114,
The scanning controller 110 is the motor 111
The cross slit light projector 11 is driven and controlled so that the rough cross point is near the center of gravity coordinates in the projection plane.
Move 2.
次に、このラフなクロス点が重心座標の近傍の
所定領域内に入つたら、切換スイツチSWを
“1”側へ、切換スイツチSWを“2”側へ切
換える。 Next, when this rough cross point falls within a predetermined area near the center of gravity coordinates, the changeover switch SW is changed to the "1" side and the changeover switch SW is switched to the "2" side.
ここで、ラフなクロス点が重心座標の近傍の所
定領域内へ入つたことの検出は、例えば、重心座
標に所定値を加算して得られた小領域の座標と、
ラフなクロス点計算部114により得られたクロ
ス点(Xc、Yc)とを比較することにより簡単に
行なうことができる。この処理は、例えば、前述
したような分離機構113、切換スイツチSW
、SW、SWを切換制御する図示しない上
位の中央処理装置により行なう。 Here, detecting that the rough cross point has entered a predetermined area near the center of gravity coordinates is performed using, for example, the coordinates of a small area obtained by adding a predetermined value to the center of gravity coordinates,
This can be easily done by comparing the cross points (Xc, Yc) obtained by the rough cross point calculation unit 114. This process is performed, for example, by the separation mechanism 113, the changeover switch SW, etc.
, SW, and SW are controlled by a host central processing unit (not shown).
次に、切換スイツチSWを“1”側へ切換え
ることにより、濃淡画像処理部3により得られた
スリツト光像の骨格線座標が直線抽出部4に入力
される。 Next, by switching the changeover switch SW to the "1" side, the skeleton line coordinates of the slit light image obtained by the grayscale image processing section 3 are input to the straight line extraction section 4.
直線抽出部4は、前述の処理と同様にして、入
力された骨格線座標に基づいて、ハフ変換による
骨格線座標のハフ平面への写像を行なつて、ヒス
トグラムを作成する。 The straight line extraction unit 4 creates a histogram by mapping the skeleton line coordinates onto the Hough plane by Hough transformation based on the input skeleton line coordinates, in the same way as in the process described above.
このようにして得られたヒストグラムに基づい
て、スリツト光の傾きを検出し、正確なスリツト
光のクロス点を算出する。 Based on the histogram obtained in this manner, the inclination of the slit light is detected, and an accurate cross point of the slit light is calculated.
第2図のスリツト光傾き検出部115は、スリ
ツト光の傾きを検出するものである。 The slit light inclination detecting section 115 shown in FIG. 2 detects the inclination of the slit light.
以下に、スリツト光の傾きの検出処理について
説明する。 The process of detecting the inclination of the slit light will be described below.
このスリツト光の傾きの検出の手法は、第41
図に示すように、所定の座標系(同図a)におけ
る直線Y=a0・X+b0上の各点
P1:(X1、Y1)
P2:(X2、Y2)
P3:(X3、Y3)
P4:(X4、Y4)
についてハフ変換を施して新たな座標系(同図
b)に展開すると、当該座標系において、前記各
点に対応して、
b=−X1・a+Y1
b=−X2・a+Y2
b=−X3・a+Y3
b=−X4・a+Y4
が得られ、前記各直線が当該座標系において、点
(a0、b0)で交わるようになることを利用したも
のである。 This method of detecting the inclination of the slit light is described in the 41st
As shown in the figure, each point P1: (X1, Y1) P2: (X2, Y2) P3: (X3, Y3) P4 on the straight line Y = a 0 · : (X4, Y4) is subjected to Hough transformation and expanded to a new coordinate system (b in the same figure). In the coordinate system, corresponding to each point, b=-X1・a+Y1 b=-X2・a+Y2 This method takes advantage of the fact that b=-X3.a+Y3 b=-X4.a+Y4 and that the straight lines intersect at the point (a 0 , b 0 ) in the coordinate system.
第42図は、スリツト傾き検出部115の詳細
回路図である。 FIG. 42 is a detailed circuit diagram of the slit inclination detection section 115.
このスリツト傾き検出部115は、直線抽出部
4のヒストグラムメモリ79内の頻度データを検
索し、当該頻度データが最大となる点座標データ
〔θ(max)、ρ(max)〕
を求めるものであるが、本実施例では、対象とな
る線画像が十字スリツト光に対応して2つ存在す
ることから、それぞれの線画像に対して前記点座
標データ
〔θ1(max)、ρ1(max)〕
〔θ2(max)、ρ2(max)〕
を求めることになる。そして当該十字スリツトに
対応した線画像から得られる前記2つの頻度のピ
ーク点は、一般にθに関して離れたものであり、
十字スリツト光を投影する十字スリツト光プロジ
エクタ112と当該スリツト光を撮影するTVカ
メラ1の相対的な位置関係を調整して、前記θ1
(max)とθ2(max)との関係を常に、
0<θ1(max)<π/2≦θ2(max)≦π …(6)
|tanθ1(max)|<1≦|tanθ2(max)| …(7)
となる条件に設定することが可能である。 This slit inclination detection section 115 searches the frequency data in the histogram memory 79 of the straight line extraction section 4 and obtains point coordinate data [θ(max), ρ(max)] where the frequency data is maximum. However, in this embodiment, since there are two target line images corresponding to the cross slit light, the point coordinate data [θ1 (max), ρ1 (max)] [θ1 (max), ρ1 (max)] is used for each line image. θ2(max), ρ2(max)]. The two frequency peak points obtained from the line image corresponding to the cross slit are generally separated with respect to θ,
By adjusting the relative positional relationship between the cross slit light projector 112 that projects the cross slit light and the TV camera 1 that photographs the slit light, the θ1
(max) and θ2(max) is always expressed as 0<θ1(max)<π/2≦θ2(max)≦π …(6) |tanθ1(max)|<1≦|tanθ2(max)| …(7) It is possible to set the condition as follows.
そこで、第42図に示すスリツト傾き検出部1
15は、特に前記(6)の条件を満足するように、十
字スリツト光プロジエクタ112とTVカメラ1
を配置した場合のものである。 Therefore, the slit inclination detection section 1 shown in FIG.
15 is a cross slit optical projector 112 and a TV camera 1 so as to satisfy the condition (6) above.
This is the case when .
第42図において、116は前記新たな極座標
系での点座標データρj、θjを順次出力するアドレ
スジエネレータであり、このアドレスジエネレー
タ116からのρjはレジスタ117aに、同θjは
レジスタ117bにそれぞれ順次図示しないクロ
ツクジエネレータからのクロツクパルスに同期し
て格納されるようになつている。 In FIG. 42, 116 is an address generator that sequentially outputs point coordinate data ρj and θj in the new polar coordinate system, ρj from this address generator 116 is sent to a register 117a, and θj is sent to a register 117b, respectively. The data are sequentially stored in synchronization with clock pulses from a clock generator (not shown).
また、アドレスジエネレータ116からの点座
標データθj、ρjは、ヒストグラムメモリ79に伝
送され、このヒストグラムメモリ79から当該点
座標(θj、ρj)に対応した頻度データf(θj、ρj)
が読み出されると共に、当該頻度データが前記ク
ロツクパルスに同期してレジスタ117cに格納
されるようになつている。118はレジスタ11
7bに格納したθjと所定値θt=(π/2)とを比
較して
θj<θt=(π/2)
となる時にHレベル信号を出力する比較器であ
る。 Further, the point coordinate data θj, ρj from the address generator 116 is transmitted to the histogram memory 79, and from this histogram memory 79, frequency data f(θj, ρj) corresponding to the point coordinates (θj, ρj) are transmitted.
is read out, and the frequency data is stored in the register 117c in synchronization with the clock pulse. 118 is register 11
This comparator compares θj stored in 7b with a predetermined value θt=(π/2) and outputs an H level signal when θj<θt=(π/2).
また、119は第1の最大値検出回路、120
は第2の最大値検出回路であり、各最大値検出回
路119,120は、それぞれレジスタ117c
に格納した頻度データを再び格納するレジスタ1
19b、同120bと、この各レジスタ119
b,120bの頻度データと前記レジスタ117
cからの頻度データとを比較する比較器119
a、同120aを有しており、各比較器119
a,120aはレジスタ117cの頻度データが
レジスタ119b,120bの頻度データを上回
る時にHレベル信号を出力するようになつてお
り、前記レジスタ119bは比較器118,11
9aの出力信号及びクロツクパルスのアンドゲー
トG22によるアンド信号に同期して作動するよ
うになると共に、前記レジスタ120bは比較器
118のインバータG24による反転信号、比較
器120aからの出力信号及びクロツクパルスの
アンドゲーG23によるアンド信号に同期して作
動するようになつている。121a,121bは
レジスタ119bと同様にアンドゲートG23の
出力信号に同期して作動するレジスタであり、レ
ジスタ121a,122aはそれぞれタイミング
でレジスタ117a内のρjを格納し、レジスタ1
21b,122bはそれぞれのタイミングでレジ
スタ117b内のθjを格納するようになつてい
る。 Further, 119 is a first maximum value detection circuit, 120
is a second maximum value detection circuit, and each maximum value detection circuit 119, 120 has a register 117c.
Register 1 to store again the frequency data stored in
19b, 120b, and each register 119
b, 120b frequency data and the register 117
A comparator 119 that compares the frequency data from c.
a, 120a, and each comparator 119
a, 120a outputs an H level signal when the frequency data in the register 117c exceeds the frequency data in the registers 119b, 120b, and the register 119b outputs an H level signal when the frequency data in the register 117c exceeds the frequency data in the registers 119b, 120b.
The register 120b operates in synchronization with the AND signal from the AND gate G22 of the output signal of the comparator 118, the output signal from the comparator 120a, and the AND gate G22 of the clock pulse. It operates in synchronization with the AND signal. Similar to register 119b, 121a and 121b are registers that operate in synchronization with the output signal of AND gate G23, and registers 121a and 122a each store ρj in register 117a at the timing, and
21b and 122b are designed to store θj in the register 117b at respective timings.
そして、123a,123bはそれぞれレジス
タ121a,121bとレジスタ122aと12
2bに格納したθj、ρjを
a=−(cosθj/sinθj)
b=ρjsinθj
に従つてa、bに変換する変換器であり、極座標
データ(θj、ρj)を直交座標デー(a、b)に変
換するものである。 And, 123a and 123b are registers 121a and 121b and registers 122a and 12, respectively.
This is a converter that converts θj and ρj stored in 2b into a and b according to a=-(cosθj/sinθj) b=ρjsinθj, and converts polar coordinate data (θj, ρj) into orthogonal coordinate data (a, b). It is something that converts.
以上説明した構成において、その動作を説明す
る。 The operation of the configuration described above will be explained.
すなわち、アドレスジエネレータ116は、順
次θj、ρjを出力し、(θj、ρj)で指定されるヒスト
グラムメモリ79内の頻度データf(θj、ρj)を、
θj<π/2の領域ではレジスタ117cを介して
レジスタ119bに格納し、さらにレジスタ11
9bの頻度データを順次大きな値のものに更新し
ていく。 That is, the address generator 116 sequentially outputs θj and ρj, and converts the frequency data f(θj, ρj) in the histogram memory 79 specified by (θj, ρj) into
In the region θj<π/2, the data is stored in the register 119b via the register 117c, and then stored in the register 119b.
The frequency data of 9b is updated to larger values in sequence.
また、π/2≦θj<πの領域では、当該頻度デ
ータf(θj、ρj)がレジスタ117cを介してレ
ジスタ120bに格納され、さらにレジスタ12
0bの頻度データは前記同様に順次大きな値もの
ものに更新されていく。この時、レジスタ119
bの更新のタイミングで当該ρj、θjがそれぞれレ
ジスタ117a,117bを介してレジスタ12
1a,121bに格納され、また、レジスタ12
0bの更新のタイミングで当該ρj、θjが前記と同
様にレジスタ117a,117bを介してレジス
タ122a,122bに格納される。前記のよう
な処理がすべての(θj、ρj)(j=1〜N)につ
いて行なわれると、最終的にレジスタ117bに
格納されている頻度データはθj<π/2の領域に
おける最大値となり、レジスタ120bに格納さ
れている頻度データは、π/2<θj≦πの領域に
おける最大値となる。 Further, in the region of π/2≦θj<π, the frequency data f(θj, ρj) is stored in the register 120b via the register 117c, and further in the register 120b.
The frequency data of 0b is updated to successively larger values in the same manner as described above. At this time, register 119
At the timing of updating b, the corresponding ρj and θj are updated to the register 12 via registers 117a and 117b, respectively.
1a and 121b, and is stored in register 12
At the timing of updating 0b, ρj and θj are stored in registers 122a and 122b via registers 117a and 117b in the same manner as described above. When the above processing is performed for all (θj, ρj) (j=1 to N), the frequency data finally stored in the register 117b becomes the maximum value in the region θj<π/2, The frequency data stored in the register 120b has a maximum value in the region of π/2<θj≦π.
それに伴ない、レジスタ121a,121bの
内容がθj<π/2の領域において頻度が最大とな
るρ(max1)θ(max1)となると共に、レジス
タ122a,122bの内容がπ/2≦θj<πの
領域において頻度が最大となるρ(max2)、θ
(max2)となり、その時の変換器123aの変
換出力a(max1)、b(max1)が、十字スリツト
光に対応した一方の骨格線を示す直線方程式
Y=a0・X+b0
における各a0、b0となると同時に、その時の変換
器123bの変換出力a(max2)、b(max2)
が、十字スリツト光に対応した一方の骨格線を示
す直線方程式
Y=a0′・X+b0′
における各a0′、b0′になる。 Accordingly, the contents of registers 121a and 121b become ρ(max1)θ(max1), which has a maximum frequency in the region θj<π/2, and the contents of registers 122a and 122b become ρ/2≦θj<π ρ(max2), θ where the frequency is maximum in the region
(max2), and the conversion outputs a(max1) and b(max1) of the converter 123a at that time are each a0 in the linear equation Y= a0・X+ b0 , which indicates one skeleton line corresponding to the cross slit light, At the same time when b becomes 0 , the conversion outputs a(max2) and b(max2) of the converter 123b at that time
are a 0 ′ and b 0 ′ in the linear equation Y=a 0 ′·X+b 0 ′, which indicates one skeleton line corresponding to the cross slit beam.
したがつて、前記a(max1)、a(max2)が、
求める十字スリツト光に対応した各線画像の傾き
となる。 Therefore, the a(max1) and a(max2) are
This is the slope of each line image corresponding to the desired cross slit light.
このようにして得られた2つの直線方程式に基
づいて連立方程式をたて、これの解であるX、Y
を十字スリツト光のクロス点として算出する。 A simultaneous equation is created based on the two linear equations obtained in this way, and its solution is X, Y
is calculated as the cross point of the cross slit light.
この連立方程式をたて、これの解を求める処理
は、面傾度・距離計測部6のクロス点計算部12
4で行なう。 The process of forming this simultaneous equation and finding its solution is carried out by the cross point calculation unit 12 of the surface inclination/distance measurement unit 6.
Do it in 4.
そして、このクロス点計算部124により得ら
れたクロス点(X、Y)に基づいて、スキヤニン
グコントローラ110がモータ111を駆動制御
して、クロス点(X、Y)が投影面内の重心座標
となるように十字スリツト光プロジエクタ112
を移動させる。 Then, based on the cross point (X, Y) obtained by the cross point calculation unit 124, the scanning controller 110 drives and controls the motor 111, so that the cross point (X, Y) is located at the center of gravity coordinates in the projection plane. Cross slit optical projector 112 so that
move.
尚、前述の説明にあつては、十字スリツト光の
クロス点を閉ループ領域の重心座標に位置付ける
場合について説明しているが、本発明はこれに限
定されるものでなく、閉ループ領域内のどの場所
であつてもよい。 In the above description, the cross point of the cross slit light is positioned at the center of gravity coordinates of the closed loop region, but the present invention is not limited to this, and the cross point of the cross slit light is positioned at the coordinates of the center of gravity of the closed loop region. It may be.
ただし、閉ループ領域の重心とした場合には、
十字スリツト光を照射した際に、十字スリツト光
が閉ループ領域内からはみ出す可能性も少なく、
また、十字スリツト光のクロス点を照射する位置
を決定する場合に、重心座標が最も計算し易いた
めにこれを利用しているに過ぎない。 However, if the center of gravity of the closed loop region is
When the cross slit light is irradiated, there is less possibility that the cross slit light will protrude from the closed loop area.
Furthermore, when determining the position to be irradiated with the cross point of the cross slit light, the center of gravity coordinates are simply used because they are the easiest to calculate.
以上説明した処理を実行することにより、閉ル
ープ画像の領域内にスリツト光を照射することが
できる。 By executing the processing described above, it is possible to irradiate the slit light within the region of the closed-loop image.
次に、(3)の面の傾き及び座標を算出するため
に、面上に照射されたスリツト光の傾き、十字ス
リツト光のクロス点を検出する処理を説明する。 Next, the process of detecting the inclination of the slit light irradiated onto the surface and the cross point of the cross slit light in order to calculate the inclination and coordinates of the surface in (3) will be explained.
第43図は十字スリツト光プロジエクタ112
とTVカメラ1の空間配置関係を示す斜視図であ
り、第44図は、第43図の空間配置におけるキ
ヤリブレーシヨン時の座標関係を示し、第45図
は、第43図の空間配置におけるTVカメラ1の
撮影面上の像の座標を示し、第46図は、3次元
物体が任意の傾きを有するときの座標関係を示す
図である。 FIG. 43 shows a cross slit optical projector 112.
44 is a perspective view showing the spatial arrangement relationship between the TV camera 1 and the TV camera 1; FIG. 44 shows the coordinate relationship during calibration in the spatial arrangement of FIG. 43; and FIG. The coordinates of the image on the photographing surface of the camera 1 are shown, and FIG. 46 is a diagram showing the coordinate relationship when a three-dimensional object has an arbitrary inclination.
このような構成において、十字スリツト光プロ
ジエクタ112の座標系Op−XpYpZpについて
光軸をZpとし、これに直交するようにXp、Yp軸
を定める。一方TVカメラ1の座標系Oc−
XcYcZcについて撮像面の横軸をXc、縦軸をYc
に選び、Zcをこれらに直交するように定める
(第44図参照)。 In such a configuration, the optical axis of the coordinate system Op-XpYpZp of the cross-slit optical projector 112 is defined as Zp, and the Xp and Yp axes are determined to be orthogonal to this. On the other hand, the coordinate system Oc− of TV camera 1
Regarding XcYcZc, the horizontal axis of the imaging plane is Xc, and the vertical axis is Yc.
and set Zc to be orthogonal to these (see Figure 44).
そして座標系Op−XpYpZpが座標系Oc−
XcYcZcに対して、Zc軸回りにα、Yc軸回りに
β、Xc軸回りにγ回転しているとする。 And the coordinate system Op−XpYpZp is the coordinate system Oc−
Assume that XcYcZc is rotated by α around the Zc axis, β around the Yc axis, and γ around the Xc axis.
この関係は、基準点において予めキヤリブレー
シヨンしておくことにより既知であるとする。 It is assumed that this relationship is known by performing calibration at the reference point in advance.
そしてその関係は、以下の式で表現される。 The relationship is expressed by the following formula.
Xp
Yp
Zp=H〓(α、β、γ)Xc
Yc
Zc …(8)
H〓=cosα cosβ、
−sinα cosγ+cosα sinβ sinγ、
sinα sinγ+cosα sinβ cosγ、
sinα cosβ、
cosα cosγ+sinα sinβ sinγ、
−cosα sinγ+sinα sinβ cosγ、
−sinβ
cosβ sinγ
cosβ cosγ …(9)
次に、任意の傾きをもつ物体面π1に、十字ス
リツト光プロジエクタ112とTVカメラ1を、
それぞれ基準面からオイラー角αp、βp、γp、αc、
βc、γcだけ回転させてS〓、T〓のスリツト光を投影
したときのe〓とf〓の導出を第46図を参照しつつ行
なう。 Xp Yp Zp=H〓(α, β, γ) , −sinβ cosβ sinγ cosβ cosγ …(9) Next, the cross slit optical projector 112 and the TV camera 1 are placed on the object plane π1 with an arbitrary inclination.
Euler angles α p , β p , γ p , α c , respectively from the reference plane
Referring to FIG. 46, we will derive e〓 and f〓 when the slit beams of S〓 and T〓 are projected by rotating β c and γ c .
ここで、解析を容易にするために第44図に示
すように、Xp軸上にsのスリツトをYp軸上にt
のスリツトを考える。 Here, in order to facilitate the analysis, as shown in Fig. 44, a slit of s is placed on the Xp axis, and a slit of t is placed on the Yp axis.
Consider the slit.
まず、十字スリツト光プロジエクタ112と
TVカメラの回転後の座標系をそれぞれOp−
XpYpZpとOc−XcYcZcとする。 First, the cross slit optical projector 112 and
The coordinate system after rotation of the TV camera is Op−
Let XpYpZp and Oc−XcYcZc.
Op′−Xp′Yp′Zp′はOp−XpYpZpに対して、
Xp′
Yp′
Zp′=H〓(αp、βp、γp)Xp
Yp
Zp …(10)
また、Oc′−Xc′Yc′Zc′はOc−XcYcZcに対し
て
Xc′
Yc′
Zc′=H〓(αc、βc、γc)Xc
Yc
Zc …(11)
であり、この式は、
Xc
Yc
Zc=H〓′(αc、βc、γc)Xc′
Yc′
Zc′ …(12)
と書き替えられる。ここでH〓′のダツシユ“′”は
H〓の転置行列を示す。従つて、Op′−
Xp′Yp′Zp′はOc′−Xc′Yc′Zc′に対して、
Xp′
Yp′
Yp′
Zp′=H〓(αp、βp、γp)・H〓(α、β、γ)・H〓
′(αc、βc、γc)Xc′
Yc′
Zc′ …(13)
ここで、
H〓0=H〓(αp、βp、γp)
・H〓(α、β、γ)・H〓′(αc、βc、γc)
= h11 h12 h13
h21 h22 h23
h31 h32 h33 …(14)
であると仮定する。 Op′−Xp′Yp′Zp′ is for Op−XpYpZp, Xp′ Yp′ Zp′=H〓(α p , β p , γ p ) Yc′Zc′ is Xc′ Yc′ Zc′=H〓(α c , β c , γ c )Xc Yc Zc …(11) for Oc − ′(α c , β c , γ c )Xc′ Yc′ Zc′ …(12) Here, the needle “′” of H〓′ is
Indicates the transposed matrix of H〓. Therefore, Op′−
Xp′Yp′Zp ′ is for Oc′ − Xc′Yc′Zc ′. )・H〓
′ ( α c , β c , γ c ) , γ)・H〓′(α c , β c , γ c ) = h11 h12 h13 h21 h22 h23 h31 h32 h33 …(14).
一方、物体面上の投影像e〓はOp′−Xp′Yp′Zp′系
のXp′Zp′平面上にあるので、
e〓⊥jp′(e〓・jp′)=0 …(15)
但し、
e〓=Xeic′+Yejc′+Zekc′
jp′=h21ic′+h22jc′+h23Kc′ …(16)
式(16)を式(15)に代入すると、
Xeh21+Yeh22+Zeh23=0 …(17)
測定できないZeは、
∴Ze=−Xeh21+Yeh22/h23 …(18)
但し、h23≠0とする。また、物体面上の投影
像f〓は、Op′−Xp′Yp′Zp′系のYp′Zp′平面内にあ
る
ので、
f〓⊥ip′(f〓・ip′)=0 …(18)
但し、
f〓=Xfic′+Yfjc′+Zfkc′
ip′=h11ic′+h12jc′+h13Kc′ …(20)
を上式に代入すると、
Xfh11+Yfh12+Zfh13=0 (21)
測定できないZfは、
∴Zf=−Xfh11+Yfh12/h13 …(22)
但し、h13≠0とする。 On the other hand, the projected image e〓 on the object plane is on the Xp′Zp′ plane of the Op′−Xp′Yp′Zp′ system, so e〓⊥jp′(e〓・jp′)=0 …(15) However, e〓=Xeic′+Yejc′+Zekc′ jp′=h21ic′+h22jc′+h23Kc′…(16) Substituting equation (16) into equation (15), Xeh21+Yeh22+Zeh23=0…(17) Ze that cannot be measured is ∴ Ze=−Xeh 21 +Yeh 22 /h 23 (18) However, h23≠0. Also, the projected image f〓 on the object plane is within the Yp′Zp′ plane of the Op′−Xp′Yp′Zp′ system, so f〓⊥ip′(f〓・ip′)=0 …(18 ) However, f〓=Xfic′+Yfjc′+Zfkc′ ip′=h11ic′+h12jc′+h13Kc′ …(20) Substituting into the above equation, Xfh11+Yfh12+Zfh13=0 (21) Zf that cannot be measured is ∴Zf=−Xfh 11 +Yfh 12 /h 13 …(22) However, h13≠0.
最後に、π1の面ベクトルの導出を行なうと面
ベクトルπ〓はe〓とf〓との外積で与えられる。 Finally, when deriving the surface vector of π1, the surface vector π〓 is given by the cross product of e〓 and f〓.
従つて、
π〓=e〓×f〓
= ic jc Kc
Xe Ye Ze
Xf Yf Zf …(23)
=(YeZf−YfZe)ic+(XfZe−XeZf)jc
+(XeYf−XfYe)Kc …(24)
=uic+vjc+wKc …(25)
従つて、π1のOc′−Xc′Yc′Zc′系に対する方向
余弦は、
である。 Therefore, π〓=e〓×f〓 = ic jc Kc Xe Ye Ze uic+vjc+wKc…(25) Therefore, the direction cosine of π1 for the Oc′−Xc′Yc′Zc′ system is It is.
以上説明した面の傾き及び座標を算出するため
に、面上に照射されたスリツト光の傾き、十字ス
リツト光のクロス点を検出する処理を行なう位置
姿勢制御部125と面傾度・距離計測部126の
動作を第47図、第48図に示すフローチヤート
を参照しつつ、説明する。 In order to calculate the inclination and coordinates of the surface described above, a position/orientation control unit 125 and a surface inclination/distance measurement unit 126 perform processing to detect the inclination of the slit light irradiated onto the surface and the cross point of the cross slit light. The operation will be explained with reference to the flowcharts shown in FIGS. 47 and 48.
図において、キヤリブレーシヨン時には、基準
点に設置された十字スリツト光プロジエクタ11
2とTVカメラ1の各座標系のキヤリブレーシヨ
ンを行なう。 In the figure, during calibration, a cross slit optical projector 11 installed at a reference point is used.
Calibration of each coordinate system of 2 and TV camera 1 is performed.
ここでは、解析上簡単化のため、直交する2本
のスリツト光を基準面π0に投影する。 Here, to simplify the analysis, two orthogonal slit beams are projected onto the reference plane π 0 .
そして、スリツト傾き検出部125により得ら
れた各線画像の傾きである前記a(max1)、a
(max2)が、e〓、f〓の傾きに対応するので、これか
らX、Y成分すなわち、Xe、Ye、Xf、Yfを求
めることができる。予め、TVカメラと十字スリ
ツト光プロジエクタの相対的位置関係をキヤリブ
レーシヨンによつて校正しておけば、その位置関
係を変更しない限り、キヤリブレーシヨンを再度
行なう必要はない。 Then, a(max1), which is the slope of each line image obtained by the slit slope detection unit 125, and a
Since (max2) corresponds to the slope of e〓, f〓, the X and Y components, that is, Xe, Ye, Xf, and Yf can be obtained from this. If the relative positional relationship between the TV camera and the cross-shaped slit light projector is calibrated in advance, there is no need to perform calibration again unless the positional relationship is changed.
次に任意の面の傾きを導出する場合について説
明する。十字スリツト光プロジエクタ112と
TVカメラ1を制御して向きを目標点に向ける。 Next, the case of deriving the inclination of an arbitrary surface will be explained. Cross slit optical projector 112
The TV camera 1 is controlled and directed to the target point.
これは、前述した動作と同様である。また、ク
ロス点計算部124により十字スリツト光のクロ
ス点が求められているので、このクロス点より十
字スリツト光プロジエクタ112の基準点からの
回転角度を読取ることができる。また、TVカメ
ラの回転角度も図示しない中央処理装置からの制
御信号によりTVカメラを回転駆動するとすれ
ば、容易に読取り可能である。 This is similar to the operation described above. Further, since the cross point of the cross slit light beam is determined by the cross point calculation unit 124, the rotation angle of the cross slit light projector 112 from the reference point can be read from this cross point. Further, the rotation angle of the TV camera can be easily read if the TV camera is rotationally driven by a control signal from a central processing unit (not shown).
面傾度・距離計測部126では、α、β、γ、
αp、βp、γp、αc、βc、γcからH0を求める。次
に、スリツト傾き検出部125からのe〓、f〓に基づ
いてX、Y成分の長さを算出する。 In the surface inclination/distance measurement unit 126, α, β, γ,
Find H 0 from αp, βp, γp, αc, βc, and γc. Next, the lengths of the X and Y components are calculated based on e〓 and f〓 from the slit inclination detection section 125.
さらに、式(18)、(22)を用いてZe、Zfを導
出して、式(24)、(25)からu、v、wを求め、
式(26)からπ1の方向余弦を導出する。 Furthermore, Ze and Zf are derived using equations (18) and (22), and u, v, and w are obtained from equations (24) and (25),
Derive the direction cosine of π1 from equation (26).
また、得られたクロス点座標より距離を求める
ことができる。 Further, the distance can be determined from the obtained cross point coordinates.
以下にTVカメラ系Oc−XcYcZcと十字スリツ
ト光プロジエクタ系Op−XpYpZpの相対的位置
関係が予め分つているとき、投影された十字スリ
ツト像の中心点を計算することによつて、距離を
求める方法について第49図を用いて説明する。 Below is a method for finding the distance by calculating the center point of the projected cross-slit image when the relative positional relationship between the TV camera system Oc-XcYcZc and the cross-slit optical projector system Op-XpYpZp is known in advance. This will be explained using FIG. 49.
説明を簡略化するため、3次元空間をTVカメ
ラ座標のXcZc平面及びYcZc平面で説明する。 To simplify the explanation, the three-dimensional space will be explained using the XcZc plane and the YcZc plane of TV camera coordinates.
第49図aはXcZc平面、第49図bはYcZc平
面を示す。 FIG. 49a shows the XcZc plane, and FIG. 49b shows the YcZc plane.
ここで、計測点、つまり十字スリツト光の投影
像のクロス点をP(X0、Y0、Z0)、十字スリツト
光プロジエクタ112の位置をQ(Xq、Yq、
Zq)、TVカメラ1の焦点距離をFとする。また、
XcZc平面上で十字スリツト光プロジエクタの光
軸ZpとXcのなす角をθ、YcZc平面上で十字スリ
ツト光プロジエクタの光軸ZpとYcのなす角をψ
とする。 Here, the measurement point, that is, the cross point of the projected image of the cross slit light is P (X0, Y0, Z0), and the position of the cross slit light projector 112 is Q (Xq, Yq,
Zq), and the focal length of the TV camera 1 is F. Also,
On the XcZc plane, the angle between the optical axis Zp and Xc of the cross slit optical projector is θ, and on the YcZc plane, the angle between the optical axis Zp and Yc of the cross slit optical projector is ψ
shall be.
さらに、撮像面上におけるPの像をRとし、そ
の座標を(Xs、Ys、−F)とする。 Further, let the image of P on the imaging plane be R, and let its coordinates be (Xs, Ys, -F).
このとき、XcZc平面上で直線PQ、PRは次の
ように表現できる。 At this time, the straight lines PQ and PR can be expressed as follows on the XcZc plane.
PQ:Z0=(X0−Xq)tanθ+Zq …(26)
PR:Z0=(−F/Xs)X0 …(27)
式(26)と(27)より、PのX、Z座標は、
X0=−Zq−Xqtanθ/F0+XstanθXs …(28)
Z0=−F/XsX0 …(29)
また、YcZc平面上で直線PQ、PRは次のよう
に表現できる。PQ:Z0=(X0−Xq)tanθ+Zq…(26) PR:Z0=(−F/Xs)X0…(27) From equations (26) and (27), the Zq−Xqtanθ/F 0 +X s tan θXs (28) Z0=−F/X s X0 (29) Moreover, the straight lines PQ and PR can be expressed as follows on the YcZc plane.
PQ:Z0=(Y0−Yq)tanψ+Zq …(30)
PR:Z0=−F/YsY0 …(31)
式(30)と(31)より、PのY、Z座標は、
Y0=−Zq−Yqtanψ/F0+YstanψYs …(32)
Z0=−F/YsY0 …(33)
そして、スリツト傾き検出部で求められた撮像
面上での十字スリツト光のクロス点座標(Xc、
Yc)をTVカメラ系座標に変換した(Xs、Ys)
を求め、TVカメラと十字スリツト光プロジエク
タの位置関係からθ、ψ、Xq、YqおよびTVカ
メラのレンズの焦点距離Fを知り、この値を式
(28)、(32)、(29)、(33)に代入することにより
、
物体までの距離を求めることができる。PQ:Z0=(Y0−Yq)tanψ+Zq…(30) PR:Z0=−F/YsY0…(31) From equations (30) and (31), the Y and Z coordinates of P are: Y0=−Zq−Yqtanψ /F 0 +YstanψYs...(32) Z0=-F/YsY0...(33) Then, the cross point coordinates (Xc,
Yc) converted to TV camera system coordinates (Xs, Ys)
Find out θ, ψ, Xq, Yq and the focal length F of the TV camera lens from the positional relationship between the TV camera and the cross-shaped slit light projector. 33), by substituting
You can find the distance to an object.
Z0については、式(29)と(33)のいずれを
用いてもよい。 Regarding Z0, either equation (29) or (33) may be used.
(g) 発明の効果
以上説明したように、本発明によれば、3次元
空間上の物体を撮影して得られた閉ループ領域毎
にその面の傾き及び座標を求めるので、3次元物
体認識に必要なセグメンテーシヨンが高速に行な
え、ロボツトの眼として有効なツールとなる。(g) Effects of the Invention As explained above, according to the present invention, the inclination and coordinates of the surface are determined for each closed-loop area obtained by photographing an object in three-dimensional space, which makes it possible to recognize three-dimensional objects. The necessary segmentation can be performed at high speed, making it an effective tool as a robot's eye.
第1図は本発明に係かる画像処理装置の実施例
説明図、第2図は濃淡画像処理部の説明図、第3
図、第4図は荷重係数の説明図、第5図は空間フ
イルタ演算部の説明図、第6図はデータシフト回
路の説明図、第7図は乗算回路の説明図、第8図
は加算回路の説明図、第9図は割算回路の説明
図、第10図は物体及びその輪郭抽出状態説明
図、第11図はスライスレベルを変えたときの出
力説明図、第12図は輪郭抽出動作原理の説明
図、第13図は極点抽出部の説明図、第14図は
データシフト回路の説明図、第15図はデータ比
較回路の説明図、第16図は閾値処理部の説明
図、第17図、第18図は輪郭抽出処理を施した
場合の効果の説明図、第19図は輪郭部データ説
明図、第20図は雑音除去条件説明図、第21図
は雑音除去部の説明図、第22図はデータシフト
回路の説明図、第23図は論理演算回路の説明
図、第24図はρ計算部の説明図、第25図はピ
ーク点抽出処理の説明図、第26図はHough変
換により得られるヒストグラムム、第27図はク
ラスタリング演算部、第28図は順序付け演算部
の説明図、第29図はクラス分類演算部の説明
図、第30図は評価基準演算部の説明図、第31
図は閾値更新部の説明図、第32図は最大値演算
部の処理説明図、第33図は直線方程式算出処理
のフローチヤート、第34図は線分抽出部の説明
図、第35図は線分抽出部の処理説明図、第36
図、第38図は線分表、第37図は閉ループ処理
部の動作フローチヤート、第39図はスリツト光
の投影処理説明図、第40図はラフなクロス点計
算部の処理説明図、第41図はスリツト光の傾き
検出の手法説明図、第42図はスリツト傾き検出
部の説明図、第43図は十字スリツト光プロジエ
クタとTVカメラの空間配置関係を示す斜視図、
第44図はキヤリブレーシヨン時の座標関係を示
す図、第45図は第43図の空間配置における
TVカメラの撮影面上の像の座標を示す図、第4
6図は3次元物体が任意の傾きを有するときの座
標関係を示す図、第47図、第48図は面の傾き
及び座標を算出するための処理を説明する動作フ
ローチヤート、第49図は十字スリツト光のクロ
ス点座標から物体までの距離を求める方法の説明
図である。
図において、1はTVカメラ、2はA/D変換
器、3は濃淡画像処理部、4は直線抽出部、5は
領域抽出部、6は面傾度・距離計測部、8はスキ
ヤニング機構制御部、112は十字スリツト光プ
ロジエクタ、113は分離機構、SW,SW,
SWは切換スイツチである。
FIG. 1 is an explanatory diagram of an embodiment of an image processing apparatus according to the present invention, FIG. 2 is an explanatory diagram of a grayscale image processing section, and FIG.
Figure 4 is an explanatory diagram of the load coefficient, Figure 5 is an explanatory diagram of the spatial filter calculation section, Figure 6 is an explanatory diagram of the data shift circuit, Figure 7 is an explanatory diagram of the multiplication circuit, and Figure 8 is an explanatory diagram of the addition circuit. An explanatory diagram of the circuit, Fig. 9 is an explanatory diagram of the division circuit, Fig. 10 is an explanatory diagram of the object and its contour extraction state, Fig. 11 is an explanatory diagram of the output when changing the slice level, and Fig. 12 is the outline extraction An explanatory diagram of the operating principle, FIG. 13 is an explanatory diagram of the pole extraction section, FIG. 14 is an explanatory diagram of the data shift circuit, FIG. 15 is an explanatory diagram of the data comparison circuit, FIG. 16 is an explanatory diagram of the threshold value processing section, Figures 17 and 18 are diagrams explaining the effects of contour extraction processing, Figure 19 is a diagram explaining contour data, Figure 20 is a diagram explaining noise removal conditions, and Figure 21 is an explanation of the noise removal section. Fig. 22 is an explanatory diagram of the data shift circuit, Fig. 23 is an explanatory diagram of the logic operation circuit, Fig. 24 is an explanatory diagram of the ρ calculation section, Fig. 25 is an explanatory diagram of the peak point extraction process, and Fig. 26 is an explanatory diagram of the data shift circuit. is a histogram obtained by Hough transformation, FIG. 27 is a clustering calculation section, FIG. 28 is an illustration of an ordering calculation section, FIG. 29 is an illustration of a class classification calculation section, and FIG. 30 is an explanation of an evaluation criterion calculation section. Figure, No. 31
Fig. 32 is an explanatory diagram of the threshold value updating section, Fig. 32 is an explanatory diagram of the processing of the maximum value calculation section, Fig. 33 is a flowchart of the linear equation calculation process, Fig. 34 is an explanatory diagram of the line segment extraction section, and Fig. 35 is an explanatory diagram of the processing of the maximum value calculation section. Processing explanatory diagram of line segment extraction unit, No. 36
38 is a line segment table, FIG. 37 is an operation flowchart of the closed loop processing section, FIG. 39 is an explanatory diagram of slit light projection processing, FIG. 40 is a processing explanatory diagram of the rough cross point calculation section, Fig. 41 is an explanatory diagram of the method of detecting the inclination of the slit light, Fig. 42 is an explanatory diagram of the slit inclination detection unit, Fig. 43 is a perspective view showing the spatial arrangement relationship between the cross-shaped slit light projector and the TV camera,
Figure 44 is a diagram showing the coordinate relationship during calibration, and Figure 45 is a diagram showing the spatial arrangement of Figure 43.
Diagram showing the coordinates of the image on the shooting surface of the TV camera, No. 4
6 is a diagram showing the coordinate relationship when a three-dimensional object has an arbitrary inclination, FIGS. 47 and 48 are operation flowcharts explaining the process for calculating the inclination and coordinates of a surface, and FIG. FIG. 3 is an explanatory diagram of a method for determining the distance to an object from the cross point coordinates of cross slit light. In the figure, 1 is a TV camera, 2 is an A/D converter, 3 is a grayscale image processing section, 4 is a straight line extraction section, 5 is an area extraction section, 6 is a surface inclination/distance measurement section, and 8 is a scanning mechanism control section. , 112 is a cross-slit optical projector, 113 is a separation mechanism, SW, SW,
SW is a changeover switch.
Claims (1)
前記撮影手段により得られた画像情報に基づいて
前記物体を構成する面を抽出する面抽出部と、前
記面抽出部により得られた面情報に基づいて所望
の面上のみにスリツト光を照射する照射部と、前
記所望の面上のみに照射されるスリツト光像を撮
影して得られたスリツト光像情報に基づいて前記
面の傾きと3次元空間座標を算出する面情報算出
部と含んで成る画像処理装置。1. Photographing means for photographing objects in three-dimensional space;
a surface extraction section that extracts a surface constituting the object based on image information obtained by the photographing means; and a surface extraction section that irradiates only a desired surface with slit light based on the surface information obtained by the surface extraction section. an irradiation unit; and a surface information calculation unit that calculates the inclination and three-dimensional spatial coordinates of the surface based on slit light image information obtained by photographing a slit light image irradiated only onto the desired surface. An image processing device consisting of:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59075341A JPS60218166A (en) | 1984-04-14 | 1984-04-14 | Picture processor |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP59075341A JPS60218166A (en) | 1984-04-14 | 1984-04-14 | Picture processor |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS60218166A JPS60218166A (en) | 1985-10-31 |
| JPH0241789B2 true JPH0241789B2 (en) | 1990-09-19 |
Family
ID=13573456
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP59075341A Granted JPS60218166A (en) | 1984-04-14 | 1984-04-14 | Picture processor |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS60218166A (en) |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH077444B2 (en) * | 1986-09-03 | 1995-01-30 | 株式会社東芝 | Connected component extractor for 3D images |
| JPS6444581A (en) * | 1987-08-04 | 1989-02-16 | Fmc Corp | Method and apparatus for inspecting component part |
| EP0471196A3 (en) * | 1990-08-13 | 1994-09-07 | Siemens Ag | Image analysis method |
| JP3859571B2 (en) | 2002-10-17 | 2006-12-20 | ファナック株式会社 | 3D visual sensor |
| JP4346297B2 (en) | 2002-10-22 | 2009-10-21 | 株式会社東芝 | X-ray computed tomography apparatus, image processing apparatus, and image processing method |
-
1984
- 1984-04-14 JP JP59075341A patent/JPS60218166A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS60218166A (en) | 1985-10-31 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP3443735B1 (en) | Quotidian scene reconstruction engine | |
| Pusztai et al. | Accurate calibration of LiDAR-camera systems using ordinary boxes | |
| EP0506327B1 (en) | A system and method for ranking and extracting salient contours for target recognition | |
| US7046840B2 (en) | 3-D reconstruction engine | |
| CN111080662A (en) | Lane line extraction method, device and computer equipment | |
| EP3382645B1 (en) | Method for generation of a 3d model based on structure from motion and photometric stereo of 2d sparse images | |
| US20050008220A1 (en) | Method, apparatus, and program for processing stereo image | |
| CN107025663A (en) | It is used for clutter points-scoring system and method that 3D point cloud is matched in vision system | |
| CN107680125A (en) | The system and method that three-dimensional alignment algorithm is automatically selected in vision system | |
| Wei | Converting 2d to 3d: A survey | |
| US6980210B1 (en) | 3D stereo real-time sensor system, method and computer program therefor | |
| CN113284081A (en) | Depth map super-resolution optimization method and device, processing equipment and storage medium | |
| Farnes et al. | Autofocus measurement for electronic components using deep regression | |
| CN107067441A (en) | Camera marking method and device | |
| JPH0241789B2 (en) | ||
| CN106600552A (en) | Texture image completion method and device | |
| EP0356727A2 (en) | Symmetrie-based target position measurement | |
| CN117612153A (en) | Three-dimensional target recognition and positioning method based on image and point cloud information completion | |
| Kokovkina et al. | The algorithm of EKF-SLAM using laser scanning system and fisheye camera | |
| CN111383262A (en) | Occlusion detection method, system, electronic terminal and storage medium | |
| EP4372310A1 (en) | 3d calibration method and apparatus for multi-view phase shift profilometry | |
| JP3151472B2 (en) | Method for generating three-dimensional object image | |
| Karaca et al. | Ground-based panoramic stereo hyperspectral imaging system with multiband stereo matching | |
| CN114998980B (en) | Iris detection method and device, electronic equipment and storage medium | |
| EP0353644A2 (en) | Configurable correlation windows for the direct measurement of differential field distortion |