JP2833249B2 - Line detector - Google Patents

Line detector

Info

Publication number
JP2833249B2
JP2833249B2 JP3064970A JP6497091A JP2833249B2 JP 2833249 B2 JP2833249 B2 JP 2833249B2 JP 3064970 A JP3064970 A JP 3064970A JP 6497091 A JP6497091 A JP 6497091A JP 2833249 B2 JP2833249 B2 JP 2833249B2
Authority
JP
Japan
Prior art keywords
white line
edge
detected
detection
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP3064970A
Other languages
Japanese (ja)
Other versions
JPH04299710A (en
Inventor
昌宏 美尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP3064970A priority Critical patent/JP2833249B2/en
Publication of JPH04299710A publication Critical patent/JPH04299710A/en
Application granted granted Critical
Publication of JP2833249B2 publication Critical patent/JP2833249B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Closed-Circuit Television Systems (AREA)
  • Traffic Control Systems (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、車両の自動運転等のた
めに、道路に沿って設けられたガイドラインを検出する
ライン検出装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a line detecting device for detecting a guide line provided along a road for automatic driving of a vehicle or the like.

【0002】[0002]

【従来の技術】従来より、運転者の負担を軽くするため
に、各種の運転制御装置が車両に搭載されている。この
中でハンドル操作も自動的に行う自動運転が研究されて
おり、通常の自動車においても自動運転ができるような
機構を搭載することが検討されている。
2. Description of the Related Art Conventionally, various driving control devices have been mounted on vehicles in order to reduce the burden on the driver. Among them, automatic driving that automatically operates a steering wheel is being studied, and mounting of a mechanism that enables automatic driving even in a normal automobile is being studied.

【0003】この自動運転のためには、車両の走路(道
路)に対する位置を常時把握し、車両が走路に沿って走
行するように制御しなければならない。
[0003] For this automatic driving, the position of the vehicle with respect to the runway (road) must be constantly grasped and controlled so that the vehicle runs along the runway.

【0004】そして、この走路の検出の方法として走路
に沿って形成されている白線をテレビカメラによって撮
影し、この白線の位置から車両の走路に対する位置を検
出することが提案されている。
[0004] As a method of detecting the track, it has been proposed that a white line formed along the track is photographed by a television camera, and the position of the vehicle relative to the track is detected from the position of the white line.

【0005】道路には、通常センターライン、車線を分
割するライン等が設けられており、自動運転のための位
置検出を、白線検出によって行えば、道路側における設
備を非常に簡単なものとできると考えられる。
A road is usually provided with a center line, a line dividing a lane, and the like. If the position detection for automatic driving is performed by detecting a white line, facilities on the road side can be made very simple. it is conceivable that.

【0006】例えば、特開昭63−40913号公報に
は、車両に搭載したCCDカメラを用いて、前方の白線
を検出する方法が開示されている。すなわち、この例に
おいては、CCDカメラによって得られた路面の輝度が
所定値以上の部分を白線と判定する。通常の道路はアス
ファルト等の黒い部分に白線が形成されており、白線の
部分の輝度はその他の部分より十分大きいため、これに
よって白線が検出できる。
For example, JP-A-63-40913 discloses a method of detecting a front white line using a CCD camera mounted on a vehicle. That is, in this example, a portion where the brightness of the road surface obtained by the CCD camera is equal to or more than a predetermined value is determined as a white line. In a normal road, a white line is formed in a black portion such as asphalt, and the luminance of the white line portion is sufficiently higher than that of the other portions, so that the white line can be detected.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、車両の
走行においては、車両の姿勢が大きく変化する場合もあ
る。そして、このような場合に、従来の装置では、白線
が視野から外れ、これを見失ってしまう場合がある。
However, when the vehicle is running, the posture of the vehicle may change greatly. In such a case, in the conventional apparatus, the white line may be out of the field of view and may be lost.

【0008】これを解消するためには、CCDカメラの
視野を広げることが考えられる。しかし、視野角を広げ
ると、複数の車線を有する道路において、複数の白線が
視野に入ることになる。すなわち、一車線の幅を約3.
7mの場合には、4m幅の路面を視野とすれば2本の白
線が写り、8m幅の路面を視野とすれば3本の白線が写
ることになる。このため、複数の白線を検出し、検出し
た複数の白線の中から自車両が沿うべき白線を常に判別
することが必要となる。そこで、これらの処理に要する
時間が長くなり、このデータを自動運転などの利用する
場合に、リアルタイムな処理が行えないという問題点が
あった。特に、二値化処理をすべてデータについて行な
った後、白線検出の処理を行なう場合には、二値化処理
のループが終了するまで次の処理を行なわない。このた
め、処理時間がさらに長くなってしまうという問題点が
あった。
To solve this problem, it is conceivable to widen the field of view of the CCD camera. However, when the viewing angle is widened, a plurality of white lines enter a view on a road having a plurality of lanes. That is, the width of one lane is set to about 3.
In the case of 7 m, two white lines appear when the road surface is 4 m wide, and three white lines appear when the road surface is 8 m wide. For this reason, it is necessary to detect a plurality of white lines and to always determine a white line along which the vehicle should follow from among the detected plurality of white lines. Therefore, there is a problem that the time required for these processes becomes long, and when this data is used for automatic driving or the like, real-time processing cannot be performed. In particular, when the white line detection processing is performed after all the binarization processing is performed on data, the next processing is not performed until the loop of the binarization processing ends. For this reason, there is a problem that the processing time is further increased.

【0009】関連技術 本発明者は、上記問題点を解決するために、特願平2−
285410号において、二値化処理を行ないながら、
白線検出を行なうことについて提案した。これによっ
て、処理の高速化を図ることができる。そして、この提
案の方法では、左エッジを検出した後、右エッジ検出の
ループに入り、検出した左エッジと右エッジの間を白線
と認識する。また、この方法では、エッジ検出の精度を
上げるため、路面から白線(または白線から路面)に変
化した後、変化後の状態が継続するかを判定している。
そして、変化後の状態が継続しない場合には、検出した
エッジを無効としていた。しかし、白線のかすれなどに
起因して誤って路面と判定した場合には、次にもう一度
路面から白線への変化を検出する場合が多い。この場合
には、その後また白線の状態が継続するため、ここに不
要なエッジが検出され、これが有効なエッジとして残る
ことになる。そこで、検出した白線の左右エッジの数が
異なり白線検出不能となったり、白線でない部分を白線
と判断してしまうなどの問題を生じる場合があった。
Related Art In order to solve the above problems, the present inventor has disclosed Japanese Patent Application No. Hei.
In 285410, while performing the binarization process,
It is proposed to perform white line detection. Thereby, the processing can be speeded up. Then, in the proposed method, after detecting the left edge, the process enters a right edge detection loop and recognizes a white line between the detected left edge and right edge. Further, in this method, in order to increase the accuracy of edge detection, it is determined whether the state after the change is continued after the road surface changes to a white line (or a white line to a road surface).
If the changed state does not continue, the detected edge is invalidated. However, when the road is erroneously determined to be a road due to blurring of a white line, a change from the road to a white line is often detected again. In this case, since the state of the white line continues thereafter, an unnecessary edge is detected here, and this remains as a valid edge. Therefore, there have been cases where the number of left and right edges of the detected white line is different, the white line cannot be detected, or a portion other than the white line is determined as a white line.

【0010】発明の目的 本発明は上記課題に鑑みなされたものであり、二値化処
理を行ないながらライン検出処理を行ない、高速のライ
ン検出処理を行うことができるとともに、ラインのかす
れなどに起因する誤検出を防止することができるライン
検出装置を提供することを目的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned problems, and performs a line detection process while performing a binarization process, thereby performing a high-speed line detection process. It is an object of the present invention to provide a line detection device that can prevent erroneous detection.

【0011】[0011]

【課題を解決するための手段】本発明に係るライン検出
装置は、車両に搭載され、道路に沿って設けられたガイ
ドラインを検出するライン検出装置であって、所定範囲
の道路を撮影し、この撮影結果についての輝度信号を出
力するカメラと、このカメラから出力される輝度信号を
所定のしきい値を用いて順次二値化して出力する二値化
手段と、この二値化手段から出力される二値化データを
順次処理し、そのデータの変化状態より、路面からガイ
ドラインへのエッジ及びガイドラインから路面への2種
類の方向のエッジをそれぞれ検出するエッジ検出手段
と、このエッジ検出手段おいて1つの方向のエッジを
検出した場合に、その検出したエッジについて二値化デ
ータの変化した後の状態が所定時間継続したか否かを判
定する継続判定手段と、この継続判定手段において、継
続時間が所定以下であると判定された場合には、その判
定の対象となった1つの方向の検出エッジを無効にする
と共に、次に検出され他の方向の変化のエッジについ
ても無効とする無効エッジ判定手段と、この無効エッジ
判定手段において、無効と判定されなかった検出エッジ
に基づいてガイドラインを認識するガイドライン認識手
段と、を有することを特徴とする。
SUMMARY OF THE INVENTION A line detecting device according to the present invention is a line detecting device mounted on a vehicle and detecting a guide line provided along a road. A camera that outputs a luminance signal regarding the photographing result, a binarizing unit that sequentially binarizes and outputs the luminance signal output from the camera using a predetermined threshold value, and a binarizing unit that outputs the luminance signal output from the binarizing unit. Binarized data is sequentially processed, and two types of edges from the road surface to the guideline and from the guideline to the road surface
Edge detecting means for detecting the edge direction of a class, respectively, this when the edge detection means Oite one direction of an edge on the detected state is a predetermined time after a change in binary data for the detected edges a continuation determining means for determining whether to continue, in the continuation determining means, when the duration time is determined to be below a predetermined, that determine
With Disable one direction of the detection edge becomes constant eligible, then the invalid edge determination means for disabling for other direction edge of change of those found in the ineffective edge determination means, and invalid And a guideline recognizing means for recognizing the guideline based on the detected edge not determined.

【0012】[0012]

【作用】本発明に係るライン検出装置においては、カメ
ラで得られた画像信号を順次二値化処理し、得られた二
値化データの変化状態からエッジを検出する。従って、
二値化処理を行ないながらエッジ検出を行なうことがで
き、ライン検出を高速に行なうことができる。さらに、
二値化データの変化後の状態からエッジが有効か否かを
判定し、ラインのかすれなどに起因する誤検出を防止で
きる。特に、1つのエッジを誤検出した場合には、これ
に対応したもう1つのエッジ誤検出が存在するが、この
誤検出エッジも無効とするため、エッジ検出の際の誤検
出を効果的に防止することができる。
In the line detecting apparatus according to the present invention, the image signal obtained by the camera is sequentially binarized, and an edge is detected from the change state of the obtained binarized data. Therefore,
Edge detection can be performed while performing binarization processing, and line detection can be performed at high speed. further,
Whether the edge is valid or not is determined from the state after the change of the binarized data, so that erroneous detection due to blurring of a line or the like can be prevented. In particular, when one edge is erroneously detected, there is another edge erroneous detection corresponding thereto, but this erroneously detected edge is also invalidated, thereby effectively preventing erroneous detection during edge detection. can do.

【0013】[0013]

【実施例】以下、本発明に係るライン検出装置につい
て、図面に基づいて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a line detecting apparatus according to the present invention will be described with reference to the drawings.

【0014】図1は本発明に係るライン検出装置の構成
を示すブロック図であり、CCDカメラ10を有してい
る。このCCDカメラ10はレンズ12、絞り14から
なる光学系と、一次元に配置された光電変換素子を有す
るCCDリニアセンサ16からなっている。そのCCD
カメラ10は、車両の前方の画像を得ることができる位
置に取り付けられ、CCDリニアセンサ16から出力さ
れる各光電素子毎の輝度に関する情報をシリアル信号と
して出力する。
FIG. 1 is a block diagram showing the configuration of a line detection device according to the present invention, and has a CCD camera 10. The CCD camera 10 comprises an optical system including a lens 12 and an aperture 14, and a CCD linear sensor 16 having a one-dimensionally arranged photoelectric conversion element. The CCD
The camera 10 is mounted at a position where an image in front of the vehicle can be obtained, and outputs information on the luminance of each photoelectric element output from the CCD linear sensor 16 as a serial signal.

【0015】そして、このCCDカメラ10には、白線
検出ECU20が接続されている。この白線検出ECU
20はCCDカメラ10から入力される信号を増幅する
と共に波形をなまらせるアンプ22、AD変換器24、
CPU26、CPU26の動作についてのプログラムを
記憶するROM28、CPU26の処理の際に記憶エリ
アとして使用するRAM30、入出力動作のためのI/
O部32からなっている。そして、この白線検出ECU
20によって検出された白線についての情報が車両制御
ECU40に供給され、この車両制御ECU40が車両
の操舵等を制御し、検出した白線に沿った車両の走行が
行われるよう制御する。
A white line detection ECU 20 is connected to the CCD camera 10. This white line detection ECU
Reference numeral 20 denotes an amplifier 22 for amplifying a signal input from the CCD camera 10 and blunting a waveform, an AD converter 24,
A CPU 26, a ROM 28 for storing a program relating to the operation of the CPU 26, a RAM 30 used as a storage area for processing by the CPU 26, and an I / O
It consists of an O part 32. And this white line detection ECU
Information about the white line detected by the control unit 20 is supplied to the vehicle control ECU 40. The vehicle control ECU 40 controls the steering of the vehicle and the like, and controls the vehicle to travel along the detected white line.

【0016】次に、CCDカメラ10における白線検出
の機構について図2に基づいて説明する。CCDカメラ
10は、そのレンズ12の前方L1の距離の画像を取り
込むように車両に設置されている。そして、レンズ12
の焦点距離はfであり、レンズ12の後方L2の距離に
あるCCDリニアセンサ16において結像するようにな
っている。そこで、CCDリニアセンサ16の横幅wに
おいて検出できる前方の画像の幅はWとなる。そこで、
レンズ12の前方L1 において、白線がその中心線より
xずれた位置にあれば、CCDリニアセンサ16におい
て、この白線が結像される位置は、一義的に決定され
る。そして、このCCDリニアセンサ16の幅wにおけ
る素子数をNとし、CCDリニアセンサ16における中
心からの素子数をIとすれば、白線の中心からの距離x
は次のように示されることとなる。
Next, a mechanism for detecting a white line in the CCD camera 10 will be described with reference to FIG. The CCD camera 10 is installed in the vehicle so as to capture an image at a distance L1 in front of the lens 12. And the lens 12
Has a focal length f, and an image is formed on the CCD linear sensor 16 at a distance L2 behind the lens 12. Therefore, the width of the front image that can be detected at the horizontal width w of the CCD linear sensor 16 is W. Therefore,
If the white line is located at a position x shifted from the center line in the front L1 of the lens 12, the position where the white line is imaged in the CCD linear sensor 16 is uniquely determined. If the number of elements in the width w of the CCD linear sensor 16 is N, and the number of elements from the center of the CCD linear sensor 16 is I, the distance x from the center of the white line is obtained.
Is shown as follows.

【0017】まず、凸レンズ公式より、 1/L1+1/L2=1/f であり、その倍率より、 W=w・L2/L2 である。First, according to the convex lens formula, 1 / L1 + 1 / L2 = 1 / f, and from the magnification, W = w · L2 / L2.

【0018】このため、 W=w・(L1+f)/f となり、 x=(W/N)・(N/2−I) となる。Therefore, W = w · (L1 + f) / f, and x = (W / N) · (N / 2−I).

【0019】そこで、白線がCCDリニアセンサ16に
おける何番目の素子において検出されるかを検出すれ
ば、白線の位置xを検出することができる。
Therefore, by detecting at which element in the CCD linear sensor 16 the white line is detected, the position x of the white line can be detected.

【0020】全体フロー 次に、上述のような原理を利用した、白線検出ECU2
0におけるCCDカメラ10からの信号処理(白線検
出)について説明する。
The overall flow then using the principle as described above, the white line detection ECU2
The signal processing (white line detection) from the CCD camera 10 at 0 will be described.

【0021】図3は白線検出処理の全体動作を説明する
フローチャートであり、まず、CCDカメラ10におけ
る露光量が所定範囲に収まるよう露光制御を行う(S
1)。そして、所定の露光制御が行われたCCDカメラ
10からの各素子毎の輝度信号がシリアルデータとして
出力されるため、これをAD変換器24においてデジタ
ルデータに変換する(S2)。ここで、CCDカメラ1
0からのデータの出力はCCDリニアセンサ16の水平
出力シフトレジスタに供給されるクロックによって決定
されているため、このAD変換器24におけるクロック
周波数もこれに同期したものとする。
FIG. 3 is a flowchart for explaining the overall operation of the white line detection processing. First, exposure control is performed so that the exposure amount in the CCD camera 10 falls within a predetermined range (S).
1). Then, since a luminance signal for each element is output as serial data from the CCD camera 10 that has been subjected to predetermined exposure control, this is converted into digital data by the AD converter 24 (S2). Here, the CCD camera 1
Since the output of data from 0 is determined by the clock supplied to the horizontal output shift register of the CCD linear sensor 16, it is assumed that the clock frequency in the AD converter 24 is also synchronized with this.

【0022】そこで、CCDリニアセンサ16における
N個の各素子において得られたそれぞれの輝度信号が、
N個のデジタルデータとしてAD変換器24から順次出
力されることとなる。このデジタル信号はRAM30の
所定の場所に記憶される。
Therefore, each luminance signal obtained in each of the N elements in the CCD linear sensor 16 is
The data is sequentially output from the AD converter 24 as N digital data. This digital signal is stored in a predetermined location of the RAM 30.

【0023】そして、このようにして得られたCCDカ
メラ10における輝度信号の最大値検出及び平均値計算
を行い、この最大値及び平均値に基づいてしきい値を計
算する(S3)。
Then, the maximum value of the luminance signal in the CCD camera 10 obtained in this way is detected and the average value is calculated, and a threshold value is calculated based on the maximum value and the average value (S3).

【0024】次に、得られたしきい値を利用してAD変
換して得られたN個のデジタルデータをそれぞれ二値化
するとともに、この二値化デ―タの変化状態より、白線
の左右エッジ部を検出する(S4)。そして、検出され
た左右エッジの数から画像端部に白線がかかった場合を
考慮したエッジ補正を行う(S5)。
Next, the N digital data obtained by AD conversion using the obtained threshold values are respectively binarized, and the change state of the binarized data is used to determine the white line of the white line. Left and right edge portions are detected (S4). Then, based on the number of detected left and right edges, edge correction is performed in consideration of the case where a white line is applied to the end of the image (S5).

【0025】このようにして、複数の白線エッジが検出
され、この中から自車両が沿うべき白線を検出するが、
このとき少なくとも前回、前々回の白線位置の変化状態
から今回の白線位置を予測し、予測位置に最も近いもの
を選択する。そして、選択された白線の座標を出力する
(S6)。
In this way, a plurality of white line edges are detected, and a white line along which the host vehicle should follow is detected from these edges.
At this time, the current white line position is predicted at least from the last time the white line position has been changed two times before, and the one closest to the predicted position is selected. Then, the coordinates of the selected white line are output (S6).

【0026】この白線の座標は上述の説明の通り、白線
の中央からの距離に対応しており、このxを車両制御E
CU40に供給することにより、車両制御ECU40が
このxに基づいて操舵制御し、車線(白線)に沿った車
両走行が達成される。
As described above, the coordinates of the white line correspond to the distance from the center of the white line.
By supplying the vehicle to the CU 40, the vehicle control ECU 40 controls the steering based on the x, and the vehicle travels along the lane (white line).

【0027】このようにして、本実施例によれば、複数
検出された白線位置から自車両の沿うべき白線を予測、
選択するため、車両姿勢が大きく変化した場合において
も適確なライン白線検出を行うことができる。
As described above, according to the present embodiment, a white line to be followed by the own vehicle is predicted from a plurality of detected white line positions.
Since the selection is made, accurate line white line detection can be performed even when the vehicle attitude changes significantly.

【0028】しきい値算出 本実施例におけるしきい値算出の動作について、図4に
基づいて説明する。
Threshold Value Calculation The threshold value calculation operation in this embodiment will be described with reference to FIG.

【0029】まず、初期設定として3つの変数である平
均値avb、最大値maxd、AD変換データカウンタ
adcountの3つの変数を0にリセットすると共
に、AD変換して得られた輝度データのRAM30にお
ける先頭アドレス(e000h)を変数Aにセットする
(S101)。なお、ここでセットされた各変数の値
は、RAM30において記憶される。
First, as an initial setting, the three variables of the average value avb, the maximum value maxd, and the AD conversion data counter adcount, which are three variables, are reset to 0, and the brightness data obtained by the AD conversion is stored in the RAM 30 at the beginning. The address (e000h) is set to the variable A (S101). The values of the variables set here are stored in the RAM 30.

【0030】次に、adcountが400h(102
4)に至ったか否かを判定する(S102)。これは、
CCDリニアセンサ16における有効な素子数(幅wの
範囲の素子数)、すなわち一度の撮影時niAD変換器
24から出力されるデータの数に対応している。そこ
で、adcountが1024に至ったことで、全デー
タの処理が終了したことを判定できる。
Next, the adcount is 400h (102
It is determined whether or not 4) has been reached (S102). this is,
This corresponds to the effective number of elements in the CCD linear sensor 16 (the number of elements in the range of the width w), that is, the number of data output from the niAD converter 24 at one time of photographing. Thus, when the count reaches 1024, it can be determined that the processing of all data has been completed.

【0031】adcountが1024以下であった場
合には、データの処理がまだ終了していないため、変数
bc,ax,upに、次のようなデータを入力する(S
103)。
If adcount is less than 1024, data processing is not yet completed, and the following data is input to the variables bc, ax, and up (S
103).

【0032】bc=A,ax=adcount,up=
bc+axここで、変数upにはCCDリニアセンサ1
6で得られた1024の輝度信号が格納されるRAM3
0におけるアドレスが順次指定されることとなる。そし
て、この変数upで指定されたアドレスのデータを読み
出し、これを変数DATAの値として入力する(S10
4)。
Bc = A, ax = adcount, up =
bc + ax where the variable up is the CCD linear sensor 1
RAM 3 in which 1024 luminance signals obtained in step 6 are stored
The addresses at 0 will be sequentially specified. Then, the data at the address specified by the variable up is read and input as the value of the variable DATA (S10).
4).

【0033】次に、最大値の検出のために、DATAが
最大値maxdより小さいか否かを判定する(S10
5)。そして、DATAがmaxdより大きい場合に
は、これを最大値とすべきであり、変数maxdにDA
TAを入力して、この値を更新する(S106)。一
方、DATAが最大でない場合には、最大値maxdを
更新する必要はないため、S106を通らずに、次の処
理に移る。
Next, to detect the maximum value, it is determined whether DATA is smaller than the maximum value maxd (S10).
5). If DATA is larger than maxd, it should be set to the maximum value, and DA is added to the variable maxd.
The value is updated by inputting the TA (S106). On the other hand, if DATA is not the maximum, it is not necessary to update the maximum value maxd, and the process proceeds to the next process without passing through S106.

【0034】次に、平均値avb算出のために、DAT
Aの値をデータ数1024で除算した値を順次加算する
(S107)。そして、adcountに1を加算し
(S108)、S102に戻る。
Next, DAT is used to calculate the average value avb.
The value obtained by dividing the value of A by the number of data 1024 is sequentially added (S107). Then, 1 is added to adcount (S108), and the process returns to S102.

【0035】このため、最大値、平均値の算出(S10
6,S107)をデータ数が1024に至るまで繰り返
こととなり、全て(1024個)のデータについての処
理が終わった場合に、S102においてYESとなり、
しきい値thL0を次式によって算出する(S10
9)。
For this reason, the maximum value and the average value are calculated (S10
6, S107) is repeated until the number of data reaches 1024, and when processing for all (1024) data is completed, YES is determined in S102,
The threshold value thL0 is calculated by the following equation (S10)
9).

【0036】thL0=(avb+maxd)/2 このようにして、本実施例においては、CCDリニアセ
ンサ16によって得られた全ての素子におけるデータの
平均値と最大値の中間の値がしきい値thL0となる。
ThL0 = (avb + maxd) / 2 As described above, in this embodiment, the intermediate value between the average value and the maximum value of the data of all the elements obtained by the CCD linear sensor 16 is the threshold value thL0. Become.

【0037】二値化、エッジ検出処理 次に、図5及び図6に基づいて、二値化処理、エッジ検
出処理について説明する。
The binarization, edge detection processing Next, referring to FIGS. 5 and 6, binarization processing, edge detection processing will be described.

【0038】まず、次のように各変数に初期値をセット
する。(S201)。
First, an initial value is set for each variable as follows. (S201).

【0039】白線部継続カウント許可フラグcok1=
0,路面部継続カウント許可フラグcok2=0,白線
継続カウンタfc1=0,路面継続カウンタfc2=
0,白線左エッジ候補座標wn01=0,白線右エッジ
候補座標wn02=0,白線検出フラグfw1=0,白
線右エッジカウンタwc1=0,路面検出フラグfw2
=1,白線左エッジカウンタwc2=0また、上述のし
きい値算出の場合と同様に、変数Aに輝度データの先頭
アドレス(e000h)を入力し(S202)、102
4個のデータのナンバーを表すAD変換データカウンタ
adcountを0にセットする(S203)。
White line portion continuation count permission flag cok1 =
0, road surface continuation count permission flag cok2 = 0, white line continuation counter fc1 = 0, road surface continuation counter fc2 =
0, white line left edge candidate coordinates wn01 = 0, white line right edge candidate coordinates wn02 = 0, white line detection flag fw1 = 0, white line right edge counter wc1 = 0, road surface detection flag fw2
= 1, white line left edge counter wc2 = 0 Also, as in the case of the above-described threshold value calculation, the head address (e000h) of the luminance data is input to variable A (S202), and 102
An AD conversion data counter adcount indicating the number of the four data is set to 0 (S203).

【0040】まず、adcountが1024(400
h)に至り、全データの処理が終了したかを判定する
(S204)。そして、処理が終了していない場合に
は、変数bc,ax,upにA,adcount,bc
+axの値を代入するとともに、upで決定されるアド
レスの輝度データの値を変数DATAに入力する(S2
05)。
First, the adcount is 1024 (400
h), it is determined whether the processing of all data has been completed (S204). If the processing has not been completed, A, adcount, bc are set in the variables bc, ax, and up.
+ Ax, and the value of the luminance data at the address determined by up is input to the variable DATA (S2
05).

【0041】次に、二値化処理を行うが、まず変数DA
TAとしきい値thLを比較する(S206)。
Next, a binarization process is performed.
TA is compared with threshold value thL (S206).

【0042】ここで、このthLは上述のS110で算
出されたthL1とは異なる。すなわち、このしきい値
thLは今回の処理において算出されたしきい値ではな
く前回以前の処理において算出されたものである。
Here, this thL is different from thL1 calculated in S110 described above. That is, the threshold value thL is not a threshold value calculated in the current process but a value calculated in the previous process.

【0043】そして、DATA≦thLの場合には路面
部であるため、白線部の継続検出数を表わす変数fc1
=0,白線左エッジの検出座標を示す変数wn01=
0,路面検出を示す変数fw2=1にセットする(S2
07)。
When DATA ≦ thL, the road is a road surface, and therefore, a variable fc1 representing the number of continuous detections of the white line portion.
= 0, a variable wn01 indicating the detection coordinates of the left edge of the white line =
0, a variable fw2 = 1 indicating road surface detection is set (S2
07).

【0044】また、cok1が0であるかを判定する
(S208)。cok1は、後述するように黒から白
(DATA≦thL→DATA>thL)に変化した場
合に1となり、白の状態が2つ続いた場合には、0に戻
るフラグである。このため、黒を検出した際(DATA
≦thL)にcok1が0でないということは、前回の
白(DATA>thL)検出が1回で終了したことを示
している。そして、白の検出が1回で終了したというこ
とは、路面の中に白線でない白い点などが存在したもの
と考えられ、この時に右エッジを検出すべきではない。
そこで、S208において、cok1が0でなかった場
合にはcok1=0,fw1=0として(S209)、
白を検出したことについてのフラグを0にリセットする
とともに、adcountに1を加算して(S21
0)、S204に戻る。
Further, it is determined whether or not cok1 is 0 (S208). cok1 is a flag that becomes 1 when black changes to white (DATA ≦ thL → DATA> thL) as described later, and returns to 0 when two white states continue. Therefore, when black is detected (DATA
That cok1 is not 0 in ≦ thL) indicates that the previous white (DATA> thL) detection has been completed once. The fact that the detection of white is completed once means that a white point or the like that is not a white line exists on the road surface, and the right edge should not be detected at this time.
Therefore, if cok1 is not 0 in S208, cok1 = 0 and fw1 = 0 are set (S209),
The flag for detecting white is reset to 0, and 1 is added to adcount (S21).
0), and return to S204.

【0045】一方、cok1=0であった場合には、前
回の検出結果が上述のような異常な状態でなかったた
め、次のようにして右エッジを検出する。まず、fw1
=1か否かを判定する(S211)。fw1はS201
において初期設定としては0にセットされており、白線
を検出した際、すなわちDATA>thLの場合に1に
セットされるものである。従って、S206においてデ
ータが≦thLであり、S208においてfw1が1で
あるということは、白線の右エッジを検出したことを意
味している。そこで、S211においてfw1=1であ
れば、路面の検出が検出されたため、fw1=0とする
とともに,右エッジの検出位置を示す変数wn02=a
dcount,路面継続カウント許可フラグcok2=
1とする(S212)。
On the other hand, when cok1 = 0, the right edge is detected as follows because the previous detection result was not in the abnormal state as described above. First, fw1
= 1 is determined (S211). fw1 is S201
Is set to 0 as an initial setting, and is set to 1 when a white line is detected, that is, when DATA> thL. Therefore, the fact that the data is ≦ thL in S206 and that fw1 is 1 in S208 means that the right edge of the white line has been detected. Therefore, if fw1 = 1 in S211, since the detection of the road surface has been detected, fw1 = 0 and the variable wn02 = a indicating the detection position of the right edge.
dcount, road surface continuation count permission flag cok2 =
It is set to 1 (S212).

【0046】ここで、エッジを検出した場合にそのad
countの値をそのままエッジ位置として記憶しても
よいが、この例においては、右エッジを検出した後、次
のデータも白線でない場合にのみその位置を右エッジと
判定し、誤判定の発生を抑制する。このために、路面継
続カウント許可フラグcok2=1としている。
Here, when an edge is detected, its ad
Although the value of count may be stored as the edge position as it is, in this example, after detecting the right edge, the position is determined as the right edge only when the next data is not a white line, and the occurrence of an erroneous determination is determined. Suppress. For this reason, the road surface continuation count permission flag cok2 = 1.

【0047】次に、路面継続許可フラグcok2が1か
否かを判定する(S213)。cok2が1であった場
合には、路面継続カウンタfc2に1を加算し(S21
4)、cok2が1でなかった場合には、この加算は行
わず、次にfc2が2であるか否かを判定する(S21
5)。このfc2はS214を2回続けて通った場合、
すなわちしきい値thL以下のデータが2つ続いた場合
に2となっている。そこで、fc2が2である場合に
は、右エッジカウンタwc2で特定される白線右エッジ
座標を示す配列変数wn2[wc2]に上述のS212
でセットされた白線右エッジ候補座標wn02の値を記
憶する。また、変数cok2,fc2を0にリセットす
ると共に、右エッジカウンタwc2に1を加算する(S
216)。従って、次回の右エッジ検出の場合には、w
c2が1多い数となっている。このため、配列変数wn
2に次の右エッジの位置が記憶できることとなる。S2
15においてfc2<2の場合及びS216の処理をお
えた場合には、右エッジについての処理が終了したた
め、adcountに1を加算し(S210)、S20
4に戻る。
Next, it is determined whether or not the road surface continuation permission flag cok2 is 1 (S213). If cok2 is 1, 1 is added to the road surface continuation counter fc2 (S21).
4) If cok2 is not 1, this addition is not performed, and it is next determined whether or not fc2 is 2 (S21).
5). This fc2 is obtained when S214 is passed twice consecutively.
That is, the value is 2 when two or less pieces of data having the threshold value thL or less continue. Therefore, when fc2 is 2, the above-described S212 is set in the array variable wn2 [wc2] indicating the white line right edge coordinate specified by the right edge counter wc2.
And stores the value of the white line right edge candidate coordinate wn02 set in the above. The variables cok2 and fc2 are reset to 0, and 1 is added to the right edge counter wc2 (S
216). Therefore, in the case of the next right edge detection, w
c2 is 1 more. Therefore, the array variable wn
2, the position of the next right edge can be stored. S2
In step 15, when fc2 <2 and when the processing in step S216 is completed, the processing for the right edge is completed, and therefore, 1 is added to adcount (S210), and step S20 is performed.
Return to 4.

【0048】一方、S206においてDATA>thL
と判定され、白線部分を検出した場合には、次のように
して左エッジの検出を行う。
On the other hand, in S206, DATA> thL
When the white line portion is detected, the left edge is detected as follows.

【0049】まず、路面継続カウンタfc2,左エッジ
候補座標wn02を0にリセットし、白線検出フラグf
w1を1にセットする(S217)。すなわち、fc2
は路面のデータが続いた数を示す変数であるため、白線
についてのデータが検出した場合に0にリセットする。
また、wn02は右エッジの候補座標についての変数で
あるが、左エッジの検出のル―プに入ったためここでリ
セットする。さらに、fw1は白線部を検出したことを
示すフラグであり、ここでfw=1とする。
First, the road surface continuation counter fc2 and the left edge candidate coordinate wn02 are reset to 0, and the white line detection flag f
w1 is set to 1 (S217). That is, fc2
Is a variable indicating the number of consecutive road surface data, and is reset to 0 when data on the white line is detected.
Also, wn02 is a variable for the candidate coordinates of the right edge, but is reset here because it has entered the loop for detecting the left edge. Further, fw1 is a flag indicating that a white line portion has been detected, where fw = 1 is set.

【0050】また、cok2が0であるかを判定する
(S218)。cok2は、前述したように白から黒
(DATA>thL→DATA)に変化した場合に1と
なり(S212)、黒の状態が2つ続いた場合には、0
に戻る(S216)フラグである。このため、S206
において白を検出した際(DATA>thL)にcok
2が0でないということは、前回の黒(DATA≦th
L)検出が1回で終了したことを示している。そして、
黒の検出が1回で終了したということは、白線の中にか
すれている部分などが存在したものと考えられ、この時
に左エッジを検出すべきではない。そこで、S218に
おいて、cok2が0でなかった場合にはcok2=
0,fw2=0として(S219)、黒を検出したこと
についてのフラグを0にリセットするとともに、adc
ountに1を加算して(S210)、S204に戻
る。
Further, it is determined whether or not cok2 is 0 (S218). cok2 becomes 1 when the state changes from white to black (DATA> thL → DATA) as described above (S212), and becomes 0 when two black states continue.
(S216) is the flag. For this reason, S206
Cok when detecting white in (DATA> thL)
That 2 is not 0 means that the previous black (DATA ≦ th
L) Indicates that the detection has been completed once. And
The fact that the detection of black has been completed once is considered that a faint portion or the like exists in the white line, and the left edge should not be detected at this time. Therefore, if cok2 is not 0 in S218, cok2 =
0, fw2 = 0 (S219), resets the flag for detecting black to 0, and sets adc
One is added to "out" (S210), and the process returns to S204.

【0051】一方、cok1=0であった場合には、前
回の検出結果が上述のような異常な状態でなかったた
め、次のようにして右エッジを検出する。まず、fw2
=1か否かを判定する(S216)。このfw2は、路
面を検出した時に1にセットされるものであるため、こ
こにおいてfw2=1であることにより、路面より白線
に移ったこと、すなわち左エッジを認識する。そして、
路面を検出したことを示す変数fw2を0にリセット
し、左エッジ候補座標wn01にadcountの値を
入力し、左エッジ検出カウンタcok1を1にセットす
る(S221)。
On the other hand, if cok1 = 0, the right edge is detected in the following manner because the previous detection result was not abnormal as described above. First, fw2
It is determined whether or not = 1 (S216). Since fw2 is set to 1 when a road surface is detected, fw2 = 1 indicates that the road has shifted to a white line from the road surface, that is, the left edge is recognized. And
The variable fw2 indicating that the road surface has been detected is reset to 0, the value of adcount is input to the left edge candidate coordinate wn01, and the left edge detection counter cok1 is set to 1 (S221).

【0052】そして、次に白線継続カウント許可フラグ
cok1及び白線継続カウンタfc1を用いて、白線部
が2つ続いて右エッジを検出されたか否かを判定する。
Then, using the white line continuation count permission flag cok1 and the white line continuation counter fc1, it is determined whether two consecutive white line portions have detected the right edge.

【0053】このために、まずcok1が1であるかを
判定する(S222)。そして、cok1が1であれ
ば、左エッジを検出したしたため、左エッジ検出時の白
線検出数を示す左エッジカウンタfc1に1を加算する
(S223)。次に、fc1が2であるか否かを判定し
(S224)、2であれば、路面から白線に移り、白線
のデータが2つ続いたことを意味しているため、S22
1で入力された候補座標wn01の値をwc1で特定さ
れる配列変数wn1[wc1]に入力する。これによっ
て、検出された白線右エッジの位置が記憶される。ま
た、この入力がなされたため、フラグcok1=1,f
c1=0にリセットすると共に、右エッジの数を示す変
数wc1に1を加算する(S225)。そして、adc
ountに1を加算し(S210)、S204に戻る。
For this purpose, first, it is determined whether or not cok1 is 1 (S222). If cok1 is 1, since the left edge has been detected, 1 is added to the left edge counter fc1 indicating the number of detected white lines at the time of detecting the left edge (S223). Next, it is determined whether or not fc1 is 2 (S224). If it is 2, it means that the road surface has shifted to the white line and that two data of the white line have continued, so that S22 is performed.
The value of the candidate coordinate wn01 input at 1 is input to the array variable wn1 [wc1] specified by wc1. As a result, the position of the detected right edge of the white line is stored. Also, since this input has been made, the flags cok1 = 1, f
In addition to resetting c1 to 0, 1 is added to a variable wc1 indicating the number of right edges (S225). And adc
One is added to "out" (S210), and the process returns to S204.

【0054】このような動作adcount=1024
まで繰り返し、右エッジ及び左エッジの位置を検出した
数だけ記憶することができる。また、その検出した数
は、wc1,wc2に記憶される。そして、S204に
おいてadcountが1024に至ったことを判定し
た場合には、全データについての白線エッジ検出が終了
したため、二値化、白線エッジ検出の動作を終了し、検
出エッジ補正の処理を行う。
Such an operation adcount = 1024
And the number of detected positions of the right edge and the left edge can be stored. The detected number is stored in wc1 and wc2. Then, when it is determined in S204 that the count has reached 1024, since the white line edge detection for all data has been completed, the binarization and white line edge detection operations are completed, and the detection edge correction process is performed.

【0055】検出エッジ補正 次に、図7に基づいて、検出エッジ補正について説明す
る。上述のようにして、左右エッジの位置を配列変数w
n1[wc1]・wn2[wc2]に入力した場合に
は、wc1,wc2より1を減算する。これは、上述の
エッジ検出の処理の際にwc1,wc2に1を加算して
いる(S213,S221)ため、これを実際に配列変
数に使用されたwc1,wc2にその値を戻すためであ
る(S401)。
Detection Edge Correction Next, detection edge correction will be described with reference to FIG. As described above, the positions of the left and right edges are determined using the array variable w.
When n1 [wc1] · wn2 [wc2] is input, 1 is subtracted from wc1 and wc2. This is because 1 is added to wc1 and wc2 at the time of the edge detection processing described above (S213 and S221), and this is returned to wc1 and wc2 actually used for the array variable. (S401).

【0056】そしてwc1とwc2を比較する(S40
2)。wc1<wc2の場合には、左エッジの数が右エ
ッジの数より小さいことを意味しており、カメラの画像
の左端に白線がかかっていることを意味している。この
ため、この左端に左エッジを挿入することで、画面の左
端にかかった白線を認識することができる。
Then, wc1 and wc2 are compared (S40).
2). If wc1 <wc2, it means that the number of left edges is smaller than the number of right edges, and that a white line is applied to the left end of the image of the camera. Therefore, by inserting the left edge at the left end, a white line on the left end of the screen can be recognized.

【0057】そこで、変数jにwc1の値を代入し(S
403)、このjの値を1と比較する(S404)。そ
して、j>1の場合には変数axにjの値を代入し、こ
のaxによって特定される配列変数wn1[ax]の値
を変数upに代入する(S405)。次に変数axにj
+1を代入し、このaxによって特定される配列変数w
n1[ax]に上述のS405で得られた変数upの値
を入力する(S406)。これによってwn1[j]の
値がwn1[j+1]の値に変換される。そして、jの
値を1減算し(S407)、S404に戻る。
Then, the value of wc1 is substituted for the variable j (S
403), and compares the value of j with 1 (S404). If j> 1, the value of j is substituted for the variable ax, and the value of the array variable wn1 [ax] specified by this ax is substituted for the variable up (S405). Next, j
+1 is substituted, and the array variable w specified by this ax
The value of the variable up obtained in S405 is input to n1 [ax] (S406). As a result, the value of wn1 [j] is converted to the value of wn1 [j + 1]. Then, 1 is subtracted from the value of j (S407), and the process returns to S404.

【0058】このようにしてjが1になるまで、この処
理を繰り返すため、配列変数wn1[wc1]に入力さ
れていた値がそれぞれwn1[wc1+1]に変換され
る。即ち、wn1の値としてn個の値があり、これがw
n1[1]〜wn1[n]の値として記憶されていた場
合、この処理によりwn1[2]〜wn1[n+1]の
値に変換される。
In this way, since this process is repeated until j becomes 1, the values input to the array variable wn1 [wc1] are converted into wn1 [wc1 + 1]. That is, there are n values of wn1 and this is wn1.
When stored as values of n1 [1] to wn1 [n], the values are converted to values of wn1 [2] to wn1 [n + 1] by this processing.

【0059】次に、wn1[1]に0の値を代入する
(S407)。これによって、配列変数wn1の値とし
て1つ強制的に挿入され、左エッジが検出できなかった
場合にも、これが挿入される。
Next, a value of 0 is substituted for wn1 [1] (S407). As a result, one is forcibly inserted as the value of the array variable wn1, and is inserted even when the left edge cannot be detected.

【0060】一方、S402において、wc1≧wc2
であった場合には、右エッジが欠けているか、両者が同
数である。そこで、次にwc2とwc1を比較する(S
409)。ここで、wc2≧wc1であった場合には、
両者が等しいことを意味しており、補正処理は不要であ
る。
On the other hand, in S402, wc1 ≧ wc2
If so, the right edge is missing or both are the same number. Therefore, next, wc2 is compared with wc1 (S
409). Here, if wc2 ≧ wc1,
It means that both are equal, and no correction processing is required.

【0061】一方、wc2の方がwc1より小さかった
場合には、右エッジ挿入の補正を行わねばならない。そ
こで、wc2に1を加算し、このwc2によって特定さ
れる配列変数wn2[wc2]に1023を強制挿入す
る。これによって右エッジとして、視野の右端の値が挿
入されることとなる。
On the other hand, if wc2 is smaller than wc1, the right edge insertion must be corrected. Therefore, 1 is added to wc2, and 1023 is forcibly inserted into the array variable wn2 [wc2] specified by wc2. As a result, the value at the right end of the field of view is inserted as the right edge.

【0062】このようにして、左エッジが欠けた場合に
は、カメラ視野の左端を左エッジの値として入力し、ラ
インが右端にかかり右エッジが欠けた場合には、カメラ
視野の右端である1023の値が右エッジの位置として
入力される。
In this way, when the left edge is missing, the left end of the camera view is input as the value of the left edge, and when the line is at the right end and the right edge is missing, it is the right end of the camera view. The value of 1023 is input as the position of the right edge.

【0063】白線座標出力・予測値算出 次に、白線座標の出力及び次回の白線位置の予測につい
て図8〜図11に基づいて説明する。上述のようにし
て、エッジ検出を行った場合には、これより白線を検出
すると共に、次回の白線検出位置の予測を行う。ここ
で、まず制御開始当初か否かを示す変数scが0である
かを判定し(S300)、sc=0の場合には、制御開
始当初であるため、CCDカメラの中心付近の白線を自
車が沿うべき白線とするために、後述するCCD中心優
先法による処理を行う。
Output of White Line Coordinates / Prediction Value Calculation Next, output of white line coordinates and prediction of the next white line position will be described with reference to FIGS. When the edge detection is performed as described above, the white line is detected from this, and the next white line detection position is predicted. Here, first, it is determined whether a variable sc indicating whether or not the control has been started is 0 (S300). If sc = 0, since the control has been started, the white line near the center of the CCD camera is automatically set. In order to set a white line along which the car should follow, a process based on the CCD center priority method described later is performed.

【0064】そして、sc≠0の場合には、通常の白線
検出の処理を行うため、wc1またはwc2が0か否か
を判定する(S301,S302)。このwc1及びw
c2は白線位置検出の数を表すものであり、いずれかが
0であれば、白線検出ができなかったことを示してい
る。そこで、この場合にはエラー処理のループに入る。
次に、wc1とwc2を比較する(S303)。そし
て、両者が等しくない場合には、右エッジの数と左エッ
ジの数が相違しており、正確な白線検出が行われなかっ
たものと判断し、エラー処理のループに進む。
When sc ≠ 0, it is determined whether or not wc1 or wc2 is 0 in order to perform normal white line detection processing (S301, S302). This wc1 and w
c2 represents the number of white line position detections, and if any of them is 0, it indicates that white line detection could not be performed. Thus, in this case, a loop for error processing is entered.
Next, wc1 and wc2 are compared (S303). If they are not equal, the number of right edges is different from the number of left edges, and it is determined that accurate white line detection has not been performed, and the process proceeds to an error processing loop.

【0065】一方、wc1=wc2であった場合には、
次のようにして白線の位置を検出する。すなわち、検出
した白線候補の数を表す変数knを0にセットし(S3
04)、何番目の白線であるかを示す変数jを1にセッ
トする(S305)。そして、このjと検出された白線
の数wc1とを比較する(S306)。jがwc1以下
であれば、ここまでの処理が正常であったものと判断さ
れ、白線の左右エッジ座標よりj番目の白線の中央座標
hLと白線の幅RP2を次式によって算出する(S30
7)。
On the other hand, when wc1 = wc2,
The position of the white line is detected as follows. That is, the variable kn representing the number of detected white line candidates is set to 0 (S3).
04), a variable j indicating the number of the white line is set to 1 (S305). Then, j is compared with the number wc1 of the detected white lines (S306). If j is equal to or less than wc1, it is determined that the processing so far is normal, and the center coordinate hL of the j-th white line and the width RP2 of the white line are calculated from the left and right edge coordinates of the white line by the following equation (S30).
7).

【0066】 hL=(wn1[j]+wn2[j])/2 RP2=wn2[j]−wn1[j] 次に、算出された白線位置hLが所定の範囲内にあるか
を判定する。即ち、前回以前の処理ループにおいて算出
され、記憶されている予測白線位置wcの周辺の所定の
範囲内(±moff)にあるかを次のようにして判定す
る。
HL = (wn1 [j] + wn2 [j]) / 2 RP2 = wn2 [j] −wn1 [j] Next, it is determined whether the calculated white line position hL is within a predetermined range. That is, it is determined as follows whether or not it is within a predetermined range (± moff) around the predicted white line position wc calculated and stored in the previous processing loop.

【0067】まず、変数ax=wc−moffとして
(S308)、このaxが0か否かを判定する(S30
9)。axが0以上であれば、axはカメラ視野範囲に
あるため、そのままとするが、ax<0であればax=
0とする(S310)。次に、axを検出した白線位置
hLと比較する(S311)。hL<axであった場合
には、予測範囲外であるためこの白線位置の記憶は行わ
れない。
First, a variable ax = wc-moff is set (S308), and it is determined whether or not this ax is 0 (S30).
9). If ax is equal to or greater than 0, ax is in the camera view range, and thus is left as it is.
It is set to 0 (S310). Next, ax is compared with the detected white line position hL (S311). If hL <ax, the white line position is not stored because it is outside the prediction range.

【0068】一方、hL≧axであった場合には、この
hLが所定の上限値以下であるかを判断しなければなら
ない。そこで、bc=wc+moffとしてbcに範囲
の上限をセットし(S312)、白線位置hLとbcを
比較する(S313)。
On the other hand, if hL ≧ ax, it must be determined whether hL is equal to or less than a predetermined upper limit. Therefore, the upper limit of the range is set to bc as bc = wc + moff (S312), and the white line position hL is compared with bc (S313).

【0069】そしてhL≦bcであった場合には、hL
が所定範囲内(ax≧hL≧bc)にあった為、kn=
kn+1(S314)、wLk[kn]=hL(S31
5)、wLd[kn]=rp2(S316)として、推
定範囲内において検出した白線の数によって特定される
白線座標、白線の幅を配列変数wLk[kn]及びwL
d[kn]にセットする。
If hL ≦ bc, hL
Is within a predetermined range (ax ≧ hL ≧ bc), so that kn =
kn + 1 (S314), wLk [kn] = hL (S31
5), assuming that wLd [kn] = rp2 (S316), the white line coordinates and the width of the white line specified by the number of white lines detected in the estimation range are array variables wLk [kn] and wL.
Set to d [kn].

【0070】そして、次の白線の判定を行うために、j
=j+1として(S317、S316)に戻る。なお、
S311、S313において、hL<axまたはhL>
bcと判定された場合には、上述の白線位置、白線幅の
セットは行わず、直接S317に進む。
Then, to judge the next white line, j
= J + 1 and the process returns to (S317, S316). In addition,
In S311, S313, hL <ax or hL>
If it is determined to be bc, the process directly proceeds to S317 without setting the above-described white line position and white line width.

【0071】このような処理を検出したすべての白線に
ついての処理が終わるまで(j>wc)繰り返し、所定
の推定範囲内にある白線の位置及び幅を配列変数wLk
[kn]及びwLd[kn]にセットする。
This processing is repeated until the processing for all the detected white lines is completed (j> wc), and the position and width of the white line within the predetermined estimation range are determined by the array variable wLk.
[Kn] and wLd [kn].

【0072】このようにして、予測範囲内の白線候補を
検出した場合には、これらの中から推定値wcに1番近
いものを選択する。まず、knが0か否かを判定するこ
とにより推定範囲内に白線があったか否かを判定し(S
401)、knが0でなかった場合には、推定値wcに
最も近い位置にある白線の番号を表す変数pitに0を
セットする(S402)。また、推定範囲内において最
初に検出された白線位置wLk[1]の値をaxに代入
すると共に(S403)、このaxの値をhLに代入す
る(S404)。
As described above, when a white line candidate within the prediction range is detected, a candidate closest to the estimated value wc is selected from these candidates. First, by determining whether or not kn is 0, it is determined whether or not there is a white line in the estimation range (S
401), if kn is not 0, 0 is set to a variable pit representing the number of the white line closest to the estimated value wc (S402). Further, the value of the white line position wLk [1] detected first in the estimation range is substituted for ax (S403), and the value of ax is substituted for hL (S404).

【0073】次に、knが1であるかを判定し(S40
5)、これが1であった場合には、白線の選択が不要な
ため、次の処理に進むが、これが1でなかった場合に
は、次のような白線選択の処理を行う。
Next, it is determined whether kn is 1 (S40).
5) If this is 1, the process proceeds to the next process because selection of a white line is unnecessary, but if this is not 1, the following white line selection process is performed.

【0074】まず、推定値wcに最も近い白線位置が入
力される変数wLmに最初の白線位置ax(wLk
[1])を代入する(S406)。そして、ax=ax
−wcとして、axに推定位置からの距離を一旦入れて
おき(S407)、この差axが0以下であった場合に
はaxに0をセットし(S408,S409)、得られ
た推定白線位置からの距離を変数difに代入する(S
410)。
First, the first white line position ax (wLk) is set in a variable wLm to which the white line position closest to the estimated value wc is input.
[1]) is substituted (S406). And ax = ax
As -wc, the distance from the estimated position is once entered in ax (S407). If the difference ax is equal to or less than 0, ax is set to 0 (S408, S409), and the obtained estimated white line position is obtained. Is substituted into the variable dif (S
410).

【0075】次に、この差difが最も小さい白線位置
をwLmに代入するために、次のような処理を行う。す
なわち、j2をセットし(S411)、このjがkn以
下であるかを判定する(S412)。jがkn以下であ
れば、次の白線候補があるため、ax=wLk[j]と
して次の白線候補の座標をaxに代入し(S413)、
このaxを変数hLに代入する(S414)。そして、
今回の白線位置と予測値の差ax=ax−wcを求め
(S415)、この差axが0以下であった場合にはこ
れを0にセットし(S416,S417)、このように
して求められたaxと前回までに求められている差di
fを比較する(S418)。そして、ax<difであ
った場合には、今回の白線位置の方がこれまでに検出し
た他の白線位置よりも推定値wcに近いため、dif=
axとしてdifをより小さな値に変更し(S41
9)、この時の白線位置座標hLをwLmに代入するこ
とによってwLmにその時点で最も推定値wcに近い白
線位置座標に更新し(S420)、その時のjをpit
に代入して、このpitを最も推定値wcに近い白線番
号に更新する(S421)。
Next, the following processing is performed to substitute the white line position having the smallest difference dif into wLm. That is, j2 is set (S411), and it is determined whether or not j is equal to or smaller than kn (S412). If j is equal to or smaller than kn, there is a next white line candidate, and the coordinates of the next white line candidate are substituted into ax as ax = wLk [j] (S413).
This ax is substituted for the variable hL (S414). And
The difference ax = ax-wc between the current white line position and the predicted value is calculated (S415). If the difference ax is less than 0, it is set to 0 (S416, S417). Ax and the difference di obtained up to the previous time
f is compared (S418). If ax <dif, the current white line position is closer to the estimated value wc than the other white line positions detected so far.
change dif to a smaller value as ax (S41)
9), the white line position coordinates hL at this time are substituted into wLm to update wLm to the white line position coordinates closest to the estimated value wc at that time (S420), and j at that time is pit
Is updated to the white line number closest to the estimated value wc (S421).

【0076】このように、白線位置の更新を行った場
合、またはS418でax≧difであり、更新の必要
がなかった場合には、jに1を加算し(S422)、S
412に戻る。この処理をj>knになるまで繰り返す
ことにより、推定範囲内において検出した白線候補の中
から推定値wcに最も近い白線の位置を検出することが
でき、この値がwLmにセットされている為、hL=w
Lmとする(S412)。これによって、hLに推定値
wcに最も近い白線の中心位置座標が入力されることと
なる。
As described above, when the white line position is updated, or when ax ≧ dif in S418 and it is not necessary to update, 1 is added to j (S422), and S
It returns to 412. By repeating this process until j> kn, the position of the white line closest to the estimated value wc can be detected from among the white line candidates detected within the estimation range, and this value is set to wLm. , HL = w
Lm (S412). As a result, the center position coordinates of the white line closest to the estimated value wc are input to hL.

【0077】次に、上述のようにして検出された白線に
ついて、その幅が大き過ぎないかを判定する。すなわ
ち、ax=wLd[pit]とし(S501)、このa
xが224(70h)以上か否かを判定する(S50
2)。白線の幅がCCDの数として224以上であった
場合には、誤検出とみなされるため、hL=wcとし
(S502)、検出した白線位置に代え、推定値wcを
今回検出の白線位置座標とする(S502)。また、S
502において、ax<70hであった場合には、正常
な白線検出が行われたのであり、このようなhLの書き
替えは行わない。
Next, it is determined whether the width of the white line detected as described above is too large. That is, ax = wLd [pit] is set (S501).
It is determined whether or not x is equal to or greater than 224 (70h) (S50)
2). If the width of the white line is 224 or more as the number of CCDs, it is regarded as an erroneous detection. Therefore, hL = wc (S502), and instead of the detected white line position, the estimated value wc is used as the white line position coordinates of the current detection. (S502). Also, S
If ax <70h in 502, normal white line detection has been performed, and such rewriting of hL is not performed.

【0078】そしてax=hLとし(S503)、ax
=ax−w1として(S504)、前回検出の白線位置
と今回検出の白線位置の差を求める。また、このように
して求めた差がマイナスであれば、これを0に戻し(S
505,S506)、この値が160以下であるかを判
定する(S507)。前回の検出値と今回の検出値が大
きく離れる(160以上)ことは、現実には考えられ
ず、この場合にはエラーとし、所定範囲内の場合にのみ
次回の白線位置予測のループに進む。
Then, ax = hL (S503), and ax
= Ax-w1 (S504), and the difference between the white line position detected last time and the white line position detected this time is determined. If the difference thus obtained is minus, the difference is returned to 0 (S
505, S506), it is determined whether this value is 160 or less (S507). It is not conceivable that the previous detection value greatly deviates from the current detection value (160 or more). In this case, an error occurs, and the process proceeds to the next white line position prediction loop only when the current value is within a predetermined range.

【0079】推定値wcの算出 まず、今回検出した白線座標hLと過去2回の白線座標
wL,w1を移動平均し最新の平均白線位置座標を算出
する(S601)。そして、このようにして算出された
最新の平均位置座標を含め、移動平均座標のデータを1
つ送る(S602)。これによって、ws0,ws1,
wsLにそれぞれ前々回、前回、今回の移動平均座標が
入力されることとなる。
Calculation of Estimated Value wc First, the white line coordinates hL detected this time and the past two white line coordinates wL and w1 are moving averaged to calculate the latest average white line position coordinates (S601). Then, the moving average coordinate data including the latest average position coordinate calculated in this way is set to 1
(S602). Thereby, ws0, ws1,
The moving average coordinates of the last time, the last time, and the current time are respectively input to wsL.

【0080】また、検出した白線位置座標について送り
も行う(S603)。これによって、w0,w1,wL
にそれぞれ前々回、前回、今回の検出した白線位置座標
が入力されることとなる。
Also, the detected white line position coordinates are sent (S603). Thereby, w0, w1, wL
, The coordinates of the white line position detected this time, the previous time, and the current time, respectively, are input.

【0081】そして、上述の3つの移動平均座標ws
0,ws1,wsLを用いて、次回の白線座標の推定値
wcを次式によって算出する。
Then, the above three moving average coordinates ws
Using 0, ws1, and wsL, an estimated value wc of the next white line coordinate is calculated by the following equation.

【0082】wc=3×(wsL−ws1)+ws0 これは図10に模式的に示す。すなわち、w1〜w3の
結果によってws0が算出され、w2〜w4の結果によ
ってws1が算出され、w3〜w5の値によってwsL
が算出される。そしてこれらws0〜wsLの結果を用
いてwcが算出されこれが磁界の白線座標w6を検出す
るための推定値wcとなる。
Wc = 3 × (wsL−ws1) + ws0 This is schematically shown in FIG. That is, ws0 is calculated based on the results of w1 to w3, ws1 is calculated based on the results of w2 to w4, and wsL is calculated based on the values of w3 to w5.
Is calculated. Then, wc is calculated using the results of ws0 to wsL, and this is the estimated value wc for detecting the white line coordinate w6 of the magnetic field.

【0083】ここで、3つの移動平均値から次回の白線
位置座標の推定値を算出する算出式について図11に基
づいて説明する。
A calculation formula for calculating an estimated value of the next white line position coordinate from the three moving average values will be described with reference to FIG.

【0084】白線検出ECU20における1回の処理ル
―チンに要する時間をΔtとし、横軸に時間、縦軸にC
CDカメラ10によって検出した白線位置をとる。そし
て、図11(A)に示すように車両が左にカ―ブした場
合について考える。
The time required for one processing routine in the white line detection ECU 20 is represented by Δt, and the horizontal axis represents time, and the vertical axis represents C.
The position of the white line detected by the CD camera 10 is taken. Then, consider a case where the vehicle curves to the left as shown in FIG.

【0085】処理サイクルΔt毎に得られた5つの検出
位置w1,w2,w3,w4,w5より、次の演算を行
い、今回移動平均位置wsL、前回位置ws1、前々回
位置ws0が得られる。
The following calculation is performed from the five detected positions w1, w2, w3, w4, and w5 obtained in each processing cycle Δt, and the current moving average position wsL, the previous position ws1, and the position ws0 before the previous time are obtained.

【0086】ws0=(w1+w2+w3)/3 ws2=(w2+w3+w4)/3 ws3=(w3+w4+w5)/3 そして、前々回位置→前回位置の差Δ1、前回→今回位
置の差Δ2、今回→次回の予測される差Δ3とすると、
Δ2→Δ3の変化量は、Δ1→Δ2の変化量と同一であ
ると推定するのがよいと考えられる。すなわち、処理サ
イクルΔtは微小であり、時間Δtの前後においては、
操舵量は同一と置いても考えられる。そして、操舵量が
同一であれば、白線検出位置の変化量は同一だからであ
る。このため、図11(B)に示すように、横軸に時間
を取り縦軸に差Δ1〜Δ3をとれば、直線Δ1とΔ2を
結ぶ直線上にΔ3が位置すると推定されることになる。
Ws0 = (w1 + w2 + w3) / 3 ws2 = (w2 + w3 + w4) / 3 ws3 = (w3 + w4 + w5) / 3 Then, the difference Δ1 between the position immediately before the previous position → the previous position, the difference Δ2 between the previous position and the current position, the current position → the next predicted time Assuming the difference Δ3,
It is considered good to estimate that the change amount of Δ2 → Δ3 is the same as the change amount of Δ1 → Δ2. That is, the processing cycle Δt is minute, and before and after the time Δt,
It is conceivable that the steering amount is the same. If the steering amount is the same, the change amount of the white line detection position is the same. Therefore, as shown in FIG. 11 (B), if time is taken on the horizontal axis and differences Δ1 to Δ3 are taken on the vertical axis, it is estimated that Δ3 is located on a straight line connecting the straight lines Δ1 and Δ2.

【0087】従って、Δ3は次のように表される。Therefore, Δ3 is expressed as follows.

【0088】 Δ3={(Δ2−Δ1)/Δt}・Δt+Δ2=Δ2−Δ1+Δ2 そこで、wcは次のように表され、この式を利用して、
wcを算出する(S611)。
Δ3 = {(Δ2-Δ1) / Δt} .Δt + Δ2 = Δ2-Δ1 + Δ2 Then, wc is expressed as follows, and using this equation,
wc is calculated (S611).

【0089】 wc=wsL+Δ3=wsL+2・Δ2−Δ1 =wsL+2(wsL−ws1)−(ws1−ws0) =3(wsL−ws1)+ws0 このようにして、次回の処理ル―プにおいて用いる予測
白線位置wLLを算出することができ、これを利用し
て、白線の選択をすることができるため、常に正確な白
線位置検出を行うことができる。
Wc = wsL + Δ3 = wsL + 2 · Δ2-Δ1 = wsL + 2 (wsL−ws1) − (ws1−ws0) = 3 (wsL−ws1) + ws0 In this way, the predicted white line position wLL used in the next processing loop Can be calculated, and the white line can be selected by using this, so that accurate white line position detection can always be performed.

【0090】そして、算出した推定値wcが所定の範囲
(255以下)であるかを判定して実際のwcを決定す
る(S604〜S606)。
Then, it is determined whether the calculated estimated value wc is within a predetermined range (255 or less), and the actual wc is determined (S604 to S606).

【0091】一方、上述のようにして、wLに今回求め
た白線位置座標が入力されているわけであるが、この値
は16ビットの値である。そこで、これを8ビットのデ
ータに変換すると共に、車線の中心位置を表わす値に換
算する(S607,S608)。そして、正常な白線検
出が行われたため、エラーカウンタを0にクリアし(S
609)、換算結果の白線位置座標wLcを出力する
(S610)。
On the other hand, as described above, the white line position coordinates obtained this time are input to wL, and this value is a 16-bit value. Therefore, the data is converted into 8-bit data and converted into a value representing the center position of the lane (S607, S608). Then, since the normal white line is detected, the error counter is cleared to 0 (S
609), and outputs the white line position coordinates wLc of the conversion result (S610).

【0092】エラー処理 一方、上述の処理において、白線検出が正常に行われな
かった場合には、次のようにしてエラー処理を行う。
Error Processing On the other hand, in the above processing, if white line detection is not performed normally, error processing is performed as follows.

【0093】すなわち、図12に示すように、まず検出
または算出できなかった今回の移動平均値wsL、今回
の検出位置wL、前回の白線位置w1、予測白線位置w
cについて、前回算出した予測値ws1を代入する(S
701)。そして、この値に基づいてwLcを算出する
と共に(S702,S703)、エラーカウンタに1を
加算する(S704)。そして、エラーカウンタの値が
16に達するか否かを判定し、16以下であれば、wL
cを出力すると共に(S706)、S610におけるw
Lcのシリアル出力に戻る。一方、エラーカウンタが1
6以上となった場合には、エラーの続く回数が所定以上
とみなし、エラーコードを出力すると共に(S70
7)、エラーカウンタを0にクリアする(S708)。
That is, as shown in FIG. 12, first, the current moving average value wsL, the current detected position wL, the previous white line position w1, the previous white line position w, and the predicted white line position w that could not be detected or calculated.
For c, substitute the predicted value ws1 calculated last time (S
701). Then, wLc is calculated based on this value (S702, S703), and 1 is added to the error counter (S704). Then, it is determined whether or not the value of the error counter reaches 16, and if it is 16 or less, wL
c is output (S706), and w in S610 is output.
Return to the serial output of Lc. On the other hand, if the error counter is 1
If the number is equal to or greater than 6, the number of times that the error continues is regarded as a predetermined number or more, and an error code is output (S70).
7), the error counter is cleared to 0 (S708).

【0094】中心優先法 次に、ライン検出装置の動作開始時には、複数映った白
線の中から自車両が沿うべき白線を選択しなければなら
ない。そこで、ライン検出装置の動作開始時には、CC
Dリニアセンサの中心座標付近の白線を選択することと
する。これは、通常の場合ライン検出の動作開始はドラ
イバが直進時において指示することが多いと考えられる
からである。このCCD中心優先法の動作フローについ
て図13に基づいて説明する。
Center Priority Method Next, when the operation of the line detecting device starts, it is necessary to select a white line along which the host vehicle should follow from among a plurality of white lines reflected. Therefore, at the start of the operation of the line detection device, CC
A white line near the center coordinates of the D linear sensor is selected. This is because it is generally considered that the driver often gives an instruction to start the line detection operation when the vehicle goes straight. The operation flow of the CCD center priority method will be described with reference to FIG.

【0095】まず、sc=sc−1として中心優先法を
行うべき回数を1減算しておく(S801)。ここで、
この変数scについては、初期設定として、6程度の値
にセットしておく。これによって6回の処理ループ(Δ
t×6の時間)については上述の推定値による方法では
なく、中心付近の白線を検出することが優先となる。次
に、jに1をセットし(S802)、jがwc1より大
きいか否かを判定する(S803)。このwc1は、左
エッジの検出数(右エッジの検出数も等しい)であり、
j≦wc1の場合には、次式によって白線の中心座標を
検出する(S804)。
First, the number of times the center priority method is to be performed is subtracted by 1 as sc = sc−1 (S801). here,
This variable sc is set to a value of about 6 as an initial setting. Thus, six processing loops (Δ
For (t × 6 time), detection of the white line near the center is prioritized instead of the method using the above-described estimated value. Next, j is set to 1 (S802), and it is determined whether or not j is greater than wc1 (S803). This wc1 is the number of detected left edges (the number of detected right edges is also equal),
If j ≦ wc1, the center coordinates of the white line are detected by the following equation (S804).

【0096】 ax=(wn1[j]+wn2[j])/2 そして、このようにして算出した白線位置axをsuL
と比較する。このsuLはCCD画素数の約半分くらい
の値にセットしておく。そして、このsuLが最小の白
線を探すための下限値となっている。そこで、suLよ
りaxの方が小さい場合にはjに1を加算し(S80
6)、一方、ax≧suLであった場合には、ws0=
ws1,ws1=wsL、wsL=axとして(S80
7)、移動平均の値を更新すると共に、w0=w1、w
1=wL、wL=axとして(S808)、白線座標に
ついてのデータを更新する。
Ax = (wn1 [j] + wn2 [j]) / 2 Then, the white line position ax calculated in this way is represented by suL
Compare with This suL is set to a value of about half of the number of CCD pixels. This suL is the lower limit for searching for the smallest white line. Therefore, when ax is smaller than suL, 1 is added to j (S80).
6) On the other hand, if ax ≧ suL, ws0 =
ws1, ws1 = wsL, wsL = ax (S80
7), while updating the value of the moving average, w0 = w1, w
Assuming that 1 = wL and wL = ax (S808), the data on the white line coordinates is updated.

【0097】このようにして、中心優先法のループにい
る間は、移動平均は行わず、移動平均値についての変数
にも白線検出値を入力しておく。
As described above, while in the loop of the center priority method, the moving average is not performed, and the white line detection value is also input to the variable for the moving average value.

【0098】そして、wLb=wL/8として今回の検
出白線位置を8ビットの値に換算して変数wLbに代入
する(S810)。更に、wLc=wLb+coff
(S811)として、wLcに白線位置から車線幅の1
/2離れた車線中心位置の座標値を入力する。
Then, assuming that wLb = wL / 8, the position of the white line detected this time is converted into an 8-bit value and substituted into a variable wLb (S810). Further, wLc = wLb + coff
As (S811), the width of the lane from the white line position to 1
A coordinate value of the lane center position at a distance of / 2 is input.

【0099】一方、S803においてjがwc1より大
きくなった場合には、白線がもう検出されていないた
め、suL=suL−8としてsuLの値を減少し(S
812)検出範囲を広げると共に、sc=sc+1とし
てscの値を元に戻した後(S813)wLc出力する
(S814)。
On the other hand, if j becomes larger than wc1 in S803, since the white line is no longer detected, the value of suL is reduced by setting suL = suL-8 (S
812) While widening the detection range and setting sc = sc + 1 to return the value of sc to the original value (S813), wLc is output (S814).

【0100】このようにしてCCD中心優先法の場合に
は、検出した白線座標から中心付近のものを選択してこ
れを白線座標とする。
In the case of the CCD center priority method as described above, one near the center is selected from the detected white line coordinates, and this is set as the white line coordinate.

【0101】[0101]

【発明の効果】以上説明したように、本発明によれば、
カメラで得られた画像信号を順次二値化処理し、得られ
た二値化データの変化状態からエッジを検出する。従っ
て、二値化処理を行ないながらエッジ検出を行なうこと
ができ、ライン検出を高速に行なうことができる。さら
に、二値化データの変化後の状態からエッジが有効か否
かを判定し、ラインのかすれなどに起因する誤検出を防
止する。特に、1つのエッジを誤検出した場合には、こ
れに対応したもう1つのエッジ誤検出が存在するが、こ
の誤検出エッジも無効とするため、エッジ検出の際の誤
検出を効果的に防止することができる。
As described above, according to the present invention, by the present invention lever,
The image signals obtained by the camera are sequentially binarized and
Edges are detected from the changed state of the binarized data. Follow
To perform edge detection while performing binarization processing
And line detection can be performed at high speed. Further
Whether the edge is valid from the state after the change of the binarized data
To prevent erroneous detection due to blurred lines.
Stop. Especially when one edge is erroneously detected.
There is another false edge detection corresponding to this,
False detection edges are also invalidated.
Detection can be effectively prevented.

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

【図1】本発明に係るライン検出装置の一実施例を示す
構成ブロック図である。
FIG. 1 is a configuration block diagram illustrating an embodiment of a line detection device according to the present invention.

【図2】CCDカメラにおける位置検出を説明するため
の説明図である。
FIG. 2 is an explanatory diagram for explaining position detection in a CCD camera.

【図3】白線検出ECUにおける処理動作を説明するた
めのフローチャートである。
FIG. 3 is a flowchart illustrating a processing operation in a white line detection ECU.

【図4】しきい値計算の動作を示すフローチャートであ
る。
FIG. 4 is a flowchart illustrating an operation of calculating a threshold value.

【図5】エッジ検出、二値化処理の動作を示すフローチ
ャートである。
FIG. 5 is a flowchart illustrating an operation of edge detection and binarization processing.

【図6】エッジ検出、二値化処理の動作を示すフローチ
ャートである。
FIG. 6 is a flowchart illustrating an operation of edge detection and binarization processing.

【図7】エッジ補正の動作を示すフローチャートであ
る。
FIG. 7 is a flowchart illustrating an operation of edge correction.

【図8】白線座標出力、白線位置予測の動作を示すフロ
ーチャートである。
FIG. 8 is a flowchart illustrating operations of white line coordinate output and white line position prediction.

【図9】白線座標出力、白線位置予測の動作を示すフロ
ーチャートである。
FIG. 9 is a flowchart illustrating operations of white line coordinate output and white line position prediction.

【図10】白線座標出力、白線位置予測の動作を示すフ
ローチャートである。
FIG. 10 is a flowchart showing operations of white line coordinate output and white line position prediction.

【図11】白線位置予測の手法を示す説明図である。FIG. 11 is an explanatory diagram showing a method of predicting a white line position.

【図12】エラー処理の動作を示すフローチャートであ
る。
FIG. 12 is a flowchart showing an error processing operation.

【図13】CCD中心有線方の動作を示すフローチャー
トである。
FIG. 13 is a flowchart showing the operation of the CCD center wired method.

【図14】白線位置予測の例を示す説明図である。FIG. 14 is an explanatory diagram showing an example of white line position prediction.

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

10 CCDカメラ 20 白線検出ECU 24 AD変換器 26 CPU Reference Signs List 10 CCD camera 20 White line detection ECU 24 AD converter 26 CPU

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】車両に搭載され、道路に沿って設けられた
ガイドラインを検出するライン検出装置であって、 所定範囲の道路を撮影し、この撮影結果についての輝度
信号を出力するカメラと、 このカメラから出力される輝度信号を所定のしきい値を
用いて順次二値化して出力する二値化手段と、 この二値化手段から出力される二値化データを順次処理
し、そのデータの変化状態より、路面からガイドライン
へのエッジ及びガイドラインから路面への2種類の方向
のエッジをそれぞれ検出するエッジ検出手段と、 このエッジ検出手段おいて1つの方向のエッジを検出
した場合に、その検出したエッジについて二値化データ
の変化した後の状態が所定時間継続したか否かを判定す
る継続判定手段と、 この継続判定手段において、継続時間が所定以下である
と判定された場合には、その判定の対象となった1つの
方向の検出エッジを無効にすると共に、次に検出され
他の方向の変化のエッジについても無効とする無効エッ
ジ判定手段と、 この無効エッジ判定手段において、無効と判定されなか
った検出エッジに基づいてガイドラインを認識するガイ
ドライン認識手段と、 を有することを特徴とするライン検出装置。
1. A line detection device mounted on a vehicle and detecting a guide line provided along a road, comprising: a camera for photographing a predetermined range of roads, and outputting a luminance signal about the photographed result; A binarization unit for sequentially binarizing a luminance signal output from the camera using a predetermined threshold and outputting the binarized data; and sequentially processing binarized data output from the binarization unit. from changing state, an edge detecting means for detecting each of the two directions of the edge from the edge and guidelines to guidelines from the road surface to the road surface, when detecting the direction of one of the edge Oite to the edge detection means, the a continuation determining means for determining a state after the change of the binarized data for the detected edges whether continues for a predetermined time, in this continuation determination means, Tokoro duration In a case where it is determined to be equal to or less than one as the object of the determination of
With Disable direction of the detected edge, then the invalid edge determination means for disabling also the change in the edge of the detected Ru <br/> other direction, in the ineffective edge determination unit, is not determined to be invalid A line detection device comprising: a guideline recognition unit that recognizes a guideline based on a detection edge.
JP3064970A 1991-03-28 1991-03-28 Line detector Expired - Fee Related JP2833249B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3064970A JP2833249B2 (en) 1991-03-28 1991-03-28 Line detector

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3064970A JP2833249B2 (en) 1991-03-28 1991-03-28 Line detector

Publications (2)

Publication Number Publication Date
JPH04299710A JPH04299710A (en) 1992-10-22
JP2833249B2 true JP2833249B2 (en) 1998-12-09

Family

ID=13273417

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3064970A Expired - Fee Related JP2833249B2 (en) 1991-03-28 1991-03-28 Line detector

Country Status (1)

Country Link
JP (1) JP2833249B2 (en)

Also Published As

Publication number Publication date
JPH04299710A (en) 1992-10-22

Similar Documents

Publication Publication Date Title
US5410346A (en) System for monitoring condition outside vehicle using imaged picture by a plurality of television cameras
US5424952A (en) Vehicle-surroundings monitoring apparatus
JP4028135B2 (en) Object detection device
JP2000357233A (en) Body recognition device
JPH07192199A (en) Travel guide device for vehicle
JP2003150938A (en) Image recognizing device
JP2017054481A (en) Parallax image creation device, parallax image creation method, parallax image creation program, object recognition device, and instrument control system
JPH06107096A (en) Forward monitoring method for vehicle
US11151395B2 (en) Roadside object detection device, roadside object detection method, and roadside object detection system
JP2000230834A (en) Updating equipment of road map information and its control method
JP2833248B2 (en) Line detector
JP3827368B2 (en) Inter-vehicle distance measuring device with compound eye camera
JPH07225893A (en) Inter-vehicle distance controller
JPH11296660A (en) Road white line detector
JPH10267618A (en) Distance measuring instrument
JP2833249B2 (en) Line detector
JP3626733B2 (en) Lane recognition image processing apparatus and program for executing the processing
JP3757500B2 (en) Leading vehicle following device
JPH04299799A (en) Line detector
JP3762406B2 (en) Vehicle travel guidance device
JP2635232B2 (en) Inter-vehicle distance detection device
JP4528320B2 (en) Object detection device
JP3517999B2 (en) Vehicle recognition device
JPH1047922A (en) Method and device for detecting lane on road surface
JP3094758B2 (en) Image sensors for vehicles

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees