JPH0624015B2 - Hough transform method in image processing apparatus - Google Patents
Hough transform method in image processing apparatusInfo
- Publication number
- JPH0624015B2 JPH0624015B2 JP62215898A JP21589887A JPH0624015B2 JP H0624015 B2 JPH0624015 B2 JP H0624015B2 JP 62215898 A JP62215898 A JP 62215898A JP 21589887 A JP21589887 A JP 21589887A JP H0624015 B2 JPH0624015 B2 JP H0624015B2
- Authority
- JP
- Japan
- Prior art keywords
- degrees
- pixel
- distance
- inclination
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
Landscapes
- Image Analysis (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、移動体の前方を撮像する撮像手段と、その撮
像手段で得られた画像情報をハフ変換して直線化処理す
る直線化処理手段とを備え、前記画像情報のX−Y座標
系において、X軸方向及びY軸方向に並ぶように位置付
けされる複数個の画素のうちの、候補点に対応する複数
個の候補点画素を通る直線を検出する画像処理装置にお
けるハフ変換方法に関する。DETAILED DESCRIPTION OF THE INVENTION [Industrial field of application] The present invention relates to an image pickup means for picking up an image of the front of a moving body, and a linearization process for Hough transforming image information obtained by the image pickup means to perform linearization processing. A plurality of candidate point pixels corresponding to the candidate point among a plurality of pixels positioned so as to be aligned in the X-axis direction and the Y-axis direction in the XY coordinate system of the image information. The present invention relates to a Hough transform method in an image processing device that detects a passing straight line.
上記この種のハフ変換方法は、例えば、移動体の一例と
して、芝刈り作業車等の作業車を未処理作業地と処理済
作業地との境界を走行用ガイドとして用いて自動走行さ
せたり、あるいは、工場内等において各種物品を搬送さ
せるための移動体等を、所定の走行ガイドに沿って自動
走行させたりするために、移動体の走行経路前方側を二
次元方向に亘って撮像した画像情報から、各画素の明る
さ等に基づいて候補点に対応する画素を抽出し、抽出さ
れた候補点画素を通る直線のうちの最大頻度となる直線
を求めることにより、走行用ガイドに対応する情報を得
るようにする場合等に用いられることになる。The above Hough conversion method of this kind, for example, as an example of a mobile body, a working vehicle such as a lawnmower working vehicle is automatically traveled using a boundary between an unprocessed work site and a processed work site as a travel guide, Alternatively, in order to automatically move a moving body or the like for transporting various articles in a factory or the like along a predetermined traveling guide, an image obtained by capturing the front side of the traveling route of the moving body in a two-dimensional direction Corresponding to the guide for traveling by extracting the pixels corresponding to the candidate points based on the brightness of each pixel from the information and obtaining the straight line with the maximum frequency among the straight lines passing through the extracted candidate point pixels. It will be used when obtaining information.
作業車を未処理作業地との境界を走行用ガイドとして用
いて自動走行させる場合を例に説明を加えれば、未処理
作業地(B)と処理済作業地(C)の境界(L)を含む所定範囲
の作業地を二次元方向に亘って撮像した画像情報(第2
図(イ)参照)を、未処理作業地(B)と処理済作業地(C)の
明るさの差に基づいて2値化することにより、上記境界
(L)に対応する複数個の候補点画素を抽出して、それら
複数個の候補点画素を通る直線のうちの最大頻度となる
ものを、上記境界(L)に対応する直線として求めること
になる(第2図(ロ)参照)。If an explanation is added using an example in which the work vehicle is automatically driven using the boundary between the unprocessed work site as a traveling guide, the boundary (L) between the unprocessed work site (B) and the processed work site (C) is Image information of the work area within a predetermined range including the two-dimensional direction (second
Figure (b)) is binarized based on the difference in brightness between the unprocessed work site (B) and the processed work site (C), and
By extracting a plurality of candidate point pixels corresponding to (L) and finding the maximum frequency among the straight lines passing through the plurality of candidate point pixels as the straight line corresponding to the boundary (L) (See Figure 2 (b)).
ところで、ハフ変換においては、X−Y座標系において
X軸方向及びY軸方向に並ぶ画素として抽出された候補
点画素を通る直線を、下記式に示すように、極座標系に
おける基準線に対する傾き(θ)と原点からの距離(ρ)と
して表現することになる(第3図参照)。By the way, in the Hough transform, a straight line passing through candidate point pixels extracted as pixels lined up in the X-axis direction and the Y-axis direction in the XY coordinate system is tilted with respect to the reference line in the polar coordinate system (see θ) and the distance (ρ) from the origin (see FIG. 3).
ρ=X・cosθ+y・sinθ 尚、x,yはX−Y座標系における候補点画素の座標値
である。ρ = X · cos θ + y · sin θ where x and y are the coordinate values of the candidate point pixel in the XY coordinate system.
又、上記傾き(θ)は、0度乃至180度の範囲において予
め複数段階に設定した値を順次代入することになる。Further, as the inclination (θ), a value set in advance in a plurality of stages in the range of 0 degree to 180 degrees is sequentially substituted.
そして、複数段階に設定された傾き(θ)とそれに対応し
て求められた距離(ρ)の値の組み合わせを二次元配列を
利用してヒストグラムにとり、上記傾き(θ)とそれに対
応して求められた距離(ρ)が最大頻度となるものを上記
境界に対応する直線として求めることになる。Then, the combination of the inclination (θ) set in multiple steps and the value of the distance (ρ) obtained corresponding to it is taken as a histogram using a two-dimensional array, and the inclination (θ) and the corresponding value are obtained. The distance having the maximum distance (ρ) is obtained as a straight line corresponding to the boundary.
ところで、求めた距離(ρ)の値は、上記式からも明らか
なように、小数値となる場合があるが、上記基準線に対
する傾き(θ)と原点からの距離(ρ)の組み合わせをヒス
トグラムにとる場合には、二次元配列の大きさが大きく
なると情報量が増大して高速処理が困難になることか
ら、情報量を低減するために、その距離(ρ)の値を整数
化して、その整数化された値に基づいてヒストグラムと
して用いる二次元配列の位置を決定することが望まれ
る。By the way, the value of the obtained distance (ρ) may be a decimal value, as is clear from the above equation, but the combination of the inclination (θ) with respect to the reference line and the distance (ρ) from the origin is a histogram. In this case, when the size of the two-dimensional array increases, the amount of information increases and high-speed processing becomes difficult.Therefore, in order to reduce the amount of information, the value of the distance (ρ) is converted to an integer, It is desired to determine the position of the two-dimensional array used as the histogram based on the integerized value.
但し、撮像情報を画像処理する場合、一般的には、X−
Y座標系において、X軸及びY軸方向夫々での1画素当
たりの距離が等距離となるように、いわゆる正方画素に
量子化することになる。However, when performing image processing on the imaging information, generally, X-
In the Y coordinate system, so-called square pixels are quantized so that the distances per pixel in the X-axis direction and the Y-axis direction are equal.
しかしながら、上述の如く整数化すると、次に述べる不
利がある。However, the integer conversion as described above has the following disadvantages.
つまり、第2図(ハ)に示すように、各候補画素毎に求め
られる直線のうちで、X−Y座標系におけるX軸又はY
軸に平行な方向となる直線の場合(図中、L0,L1で示す
直線参照)には、それらの原点からの距離(ρ)を、例え
ば切り捨て処理して整数化しても、そのような直線に対
する分解能は、本来、X−Y座標系における1画素分の
分解能であればよいから、整数化によって不利は生じな
い。しかしながら、このX軸及びY軸に対して求めた直
線が傾いている場合(図中、L2,L3で示す直線参照)に
は、極座標系における原点からの距離(ρ)の整数部分の
値が、例えばX軸方向において隣接する候補点画素を通
り、且つ、同じ傾きの直線(L2),(L3)では同じ値となる
ために、隣接する直線(L2),(L3)を区別できなくなる
等、整数化のために、X軸及びY軸に傾いている直線に
対する分解能が、求められる直線の分解能よりも低くな
る不利が生じる。That is, as shown in FIG. 2C, among the straight lines obtained for each candidate pixel, the X-axis or the Y-axis in the XY coordinate system is used.
In the case of straight lines that are parallel to the axis (refer to the straight lines indicated by L 0 and L 1 in the figure), even if the distance (ρ) from the origin is rounded down to an integer, The resolution with respect to such a straight line is essentially the resolution of one pixel in the XY coordinate system, and therefore, no disadvantage occurs due to integer conversion. However, when the straight line obtained with respect to the X-axis and the Y-axis is inclined (see the straight lines indicated by L 2 and L 3 in the figure), the integral part of the distance (ρ) from the origin in the polar coordinate system For example, since the values pass through adjacent candidate point pixels in the X-axis direction and have the same value on the straight lines (L 2 ) and (L 3 ) having the same slope, the adjacent straight lines (L 2 ) and (L 3 ) Cannot be distinguished, and the resolution of a straight line inclined to the X-axis and the Y-axis becomes lower than the required resolution of the straight line due to the integerization.
そこで、従来では、ハフ変換における原点からの距離
(ρ)の小数点以下の値をも区別できるように、ヒストグ
ラムとして用いる二次元配列を細分化したり、あるい
は、処理対象となる画素を高精細にしたりして、上記距
離(ρ)の最小分解能を高くすることにより、細かい距離
変化を区別できるようにして、検出精度の低下を抑制す
るようにしていた。Therefore, conventionally, the distance from the origin in the Hough transform
The minimum resolution of the above distance (ρ) can be obtained by subdividing the two-dimensional array used as a histogram so that the values below the decimal point of (ρ) can be distinguished, or by making the pixels to be processed highly precise. By increasing the distance, it is possible to discriminate small distance changes and suppress a decrease in detection accuracy.
しかしながら、極座標系における原点からの距離の小数
点以下の値を区別できるようにするために距離の最小分
解能を高くしたり量子化する画素を高精細にすると、画
素情報が二次元情報であることからも、ハフ変換の処理
対象となる情報量が多くなり、最大頻度の直線が求めら
れるまでに要する処理時間が増大して、例えば、作業車
の走行速度に対応した速度で直線を求めることができな
くなる不利が生じるものとなる。However, if the minimum resolution of the distance is increased or the pixel to be quantized is made high-definition so that the value after the decimal point of the distance from the origin in the polar coordinate system can be distinguished, the pixel information is two-dimensional information. However, the amount of information to be processed by the Hough transform increases, and the processing time required to obtain the straight line with the maximum frequency increases. For example, a straight line can be obtained at a speed corresponding to the traveling speed of the work vehicle. Disadvantages will occur.
本発明は、上記実情に鑑みてなされたものであって、そ
の目的は、ハフ変換における処理情報量を増大させるこ
となく、検出の精度が低下しないようにすることにあ
る。The present invention has been made in view of the above circumstances, and an object thereof is to prevent the accuracy of detection from decreasing without increasing the amount of processing information in Hough transform.
本発明による画像処理装置におけるハフ変換方法の特徴
構成は、基準線が前記X−Y座標系におけるX軸又はY
軸と平行な線として決められた極座標系において、前記
各候補点画素夫々に対して、その画素を通る複数本の直
線を、0度乃至180度の範囲において複数段階に設定さ
れた前記基準線に対する傾きと、原点からの距離として
求め、前記傾きが0度以上45度未満の範囲においては、
その傾きの余弦で、且つ、前記傾きが45度以上90度未満
の範囲においては、90度からその傾きを減算した値の余
弦で、且つ、前記傾きが90度以上135度未満の範囲にお
いては、その傾きから90度を減算した値の余弦で、且
つ、前記傾きが135度以上180度以下の範囲においては、
180度からその傾きを減算した値の余弦で、前記極座標
系において求められた前記距離を除算し、その除算によ
って求められた値を整数化し、前記各画素夫々に対し
て、前記傾きと前記整数化された値との組み合わせとし
て求められた直線のうちの最大頻度のものを抽出する点
にあり、その作用並びに効果は以下の通りである。In the characteristic configuration of the Hough transform method in the image processing apparatus according to the present invention, the reference line is the X axis or the Y axis in the XY coordinate system.
In the polar coordinate system determined as a line parallel to the axis, for each of the candidate point pixels, a plurality of straight lines passing through the pixel are set to a plurality of stages in the range of 0 to 180 degrees, and the reference line is set. And the distance from the origin, and in the range where the inclination is 0 degree or more and less than 45 degrees,
In the range of the cosine of the inclination, and the inclination is 45 degrees or more and less than 90 degrees, the cosine of the value obtained by subtracting the inclination from 90 degrees, and in the range of the inclination of 90 degrees or more and less than 135 degrees, , The cosine of the value obtained by subtracting 90 degrees from the inclination, and in the range where the inclination is 135 degrees or more and 180 degrees or less,
With the cosine of the value obtained by subtracting the inclination from 180 degrees, the distance obtained in the polar coordinate system is divided, the value obtained by the division is converted into an integer, and for each of the pixels, the inclination and the integer. The maximum frequency of the straight lines obtained as a combination with the converted value is extracted, and the action and effect thereof are as follows.
つまり、各候補点画素夫々に対して、その画素を通る複
数本の直線を、0度乃至180度の範囲において複数段階
に設定された前記基準線に対する傾きと、原点からの距
離として求め、その傾きと原点からの距離を整数化した
値の組み合わせの最大頻度を求めるようにして、ハフ変
換における処理に要する情報量を低減させるようにしな
がらも、求めた距離の値を傾きに応じて、その傾きが45
度に近づくほど前記距離の値の変化が拡大されるように
補正して、その補正した値を整数化させるようにして、
検出精度の低下を抑制するのである。That is, for each candidate point pixel, a plurality of straight lines passing through the pixel are obtained as the inclination with respect to the reference line set in a plurality of stages in the range of 0 to 180 degrees and the distance from the origin, and The maximum frequency of the combination of the slope and the value obtained by integerizing the distance from the origin is calculated to reduce the amount of information required for the processing in the Hough transform, and the calculated value of the distance is calculated according to the slope. Tilt 45
It is corrected so that the change in the value of the distance is enlarged as it approaches, and the corrected value is converted into an integer,
This suppresses a decrease in detection accuracy.
従って、検出処理速度の高速化を図るべく、処理対象と
なる情報量を低減させながらも、求める直線の精度が低
下しないようにできるに至った。Therefore, in order to increase the detection processing speed, it has become possible to reduce the amount of information to be processed, but to prevent the accuracy of the obtained straight line from decreasing.
以下、本発明を未処理作業地と処理済作業地との境界を
検出するための手段に適用した場合の実施例を図面に基
づいて説明する。An embodiment in which the present invention is applied to a means for detecting a boundary between an unprocessed work site and a processed work site will be described below with reference to the drawings.
第5図に示すように、未刈地(B)と既刈地(C)との境界
(L)に沿って自動走行する作業車(V)〔移動体の一例〕
に、走行前方側の作業地を二次元方向に亘って撮像する
イメージセンサ(S)〔撮像手段の一例〕が、前記作業車
(V)に対して前方側の作業地の所定範囲を斜め上方から
望む状態で撮像するように設けられている。As shown in Fig. 5, the boundary between uncut land (B) and already cut land (C)
Work vehicle that automatically travels along (L) (V) (Example of moving body)
The image sensor (S) [an example of an image pickup means] for picking up an image of the work site on the front side of traveling in the two-dimensional direction is
It is provided so as to image a predetermined range of the work site on the front side with respect to (V) in a state of being viewed obliquely from above.
前記イメージセンサ(S)の撮像視野について説明を加え
れば、前記作業車(V)が、未刈地(B)と既刈地(C)との境
界(L)に対して適正状態に沿っている状態において、前
記境界(L)が、前記イメージセンサ(S)の視野の横幅方向
中央に位置する状態となるようにしてある。If the image sensor visual field of the image sensor (S) is further described, the work vehicle (V) follows the proper condition with respect to the boundary (L) between the uncut land (B) and the already cut land (C). In this state, the boundary (L) is located at the center of the visual field of the image sensor (S) in the lateral width direction.
つまり、前記作業車(V)は、周囲を既刈地(C)で囲まれた
四角状の未刈地(B)の一辺から対辺に至る部分を、一つ
の作業行程として、前記作業車(V)が作業行程の長さ方
向に沿う側の前記未刈地(B)と既刈地(C)との境界(L)に
沿って自動走行するように、前記イメージセンサ(S)の
撮像情報からハフ変換を利用して検出された前記境界
(L)に対応する直線化処理を行う直線化処理手段を制御
プログラムで備えた画像処理装置を備え、得られた直線
の情報に基づいて操向制御されることになり、そして、
一つの作業行程の終端側つまり前記未刈地(B)の対辺に
達するに伴って、その作業行程に隣接する次の作業行程
の始端部に向けて自動的にターンさせることを繰り返す
ことにより、いわゆる往復刈り形式で、所定範囲の芝刈
り作業を自動的に行うことになる。That is, the work vehicle (V), the portion from one side of the square uncut land (B) surrounded by the already cut land (C) to the opposite side, as one work stroke, the work vehicle ( The image of the image sensor (S) is taken so that V) automatically travels along the boundary (L) between the uncut land (B) and the already cut land (C) on the side along the length direction of the work process. The boundary detected from the information using the Hough transform
(L) is provided with an image processing apparatus having a linearization processing means for performing linearization processing corresponding to (L), and the steering control is performed based on the information of the obtained straight line, and
By reaching the end side of one work stroke, that is, the opposite side of the uncut land (B), by automatically turning toward the start end of the next work stroke adjacent to that work stroke, In the so-called reciprocating mowing method, the lawn mowing work within a predetermined range is automatically performed.
次に、第1図に示す直線化処理手段の制御フローチャー
トに基づいて、前記境界(L)に対応する直線を検出する
ための画像処理について説明する。Next, the image processing for detecting the straight line corresponding to the boundary (L) will be described based on the control flowchart of the straightening processing means shown in FIG.
すなわち、前記作業車(V)が設定距離走行する毎に、境
界検出のための処理が起動されることになり、前記イメ
ージセンサ(S)による撮像情報が、予め設定された画素
密度(32×32画素に設定してある)に対応してその明る
さレベルが、1画素当たりの車体進行方向に対応するY
軸方向の距離と車体横幅方向に対応するX軸方向の距離
の夫々が等距離となるX−Y座標系における正方画素に
量子化される(第2図(イ)乃至(ハ)参照)。That is, every time the work vehicle (V) travels a set distance, the process for boundary detection is started, and the image pickup information by the image sensor (S) has a preset pixel density (32 × The brightness level is set to 32 pixels), and the brightness level of Y corresponds to the vehicle body traveling direction per pixel.
The distance in the axial direction and the distance in the X-axis direction corresponding to the lateral direction of the vehicle body are quantized into square pixels in the XY coordinate system where they are equidistant (see FIGS. 2A to 2C).
但し、詳しくは後述するが、処理の都合上、極座標系に
おける原点と前記X−Y座標の基準点とを一致させるた
めに、画面中央を前記X−Y座標の基準点として設定し
てある。However, as will be described later in detail, for the convenience of processing, the center of the screen is set as the reference point of the XY coordinates in order to match the origin in the polar coordinate system with the reference point of the XY coordinates.
次に、第4図にも示すように、処理対象となる画素(e)
の周囲に隣接する8画素(a〜d,f〜i)の値に基づい
て、前記処理対象の画素(e)の画像上のX軸方向におけ
る明るさの微分値の絶対値とY軸方向における明るさの
微分値の絶対値とを加算した微分値(IP)を、下記(i)式
を用いて求める処理が、二次元方向に並ぶ各画素につい
て行われる。Next, as shown in FIG. 4, the pixel (e) to be processed
The absolute value of the differential value of the brightness in the X-axis direction on the image of the pixel (e) to be processed and the Y-axis direction based on the values of 8 pixels (a to d, f to i) adjacent to The process of obtaining the differential value (IP) obtained by adding the absolute value of the differential value of the brightness in (1) using the following formula (i) is performed for each pixel arranged in the two-dimensional direction.
IP(x,y)=|(c+2f+i)−(a+2d+g)| +|(a+2b+c)−(g+2h+i)|……(i) そして、前記微分値(IP)の値が予め設定された設定閾値
より大となる画素のみを抽出するように2値化すること
により、明るさ変化が大なる箇所の画素をハフ変換の対
象となる候補点画素として抽出する(第2図(ロ)参
照)。IP (x, y) = | (c + 2f + i) − (a + 2d + g) | + | (a + 2b + c) − (g + 2h + i) | ... (i) and the above By binarizing so that only the pixels whose differential value (IP) value is greater than the preset threshold value are extracted, the pixels at the location where the brightness change is large are candidate points to be Hough transformed. It is extracted as a pixel (see FIG. 2B).
但し、画面最外部に位置する画素は、それに隣接する画
素情報が無いために微分処理を行うことができないの
で、処理対象から除外することになる。However, the pixel located at the outermost part of the screen cannot be differentiated because there is no pixel information adjacent to it, so it is excluded from the processing target.
従って、実際の処理対象となる画素範囲は、量子化した
画素範囲からX軸方向及びY軸方向の夫々で、両端部に
位置する1画素分を減じた範囲となる。Therefore, the pixel range to be actually processed is a range obtained by subtracting one pixel located at both ends in the X-axis direction and the Y-axis direction from the quantized pixel range.
次に、画素の座標値(x,y)を最小値(X=-14,y=-1
4)に初期設定して、その画素の2値化された値が
“1”であるか否かを判別することにより、候補点画素
であるか否かを判別した後、ハフ変換を利用して、その
画素を通る複数本の直線を求めることになる。Next, set the pixel coordinate values (x, y) to the minimum values (X = -14, y = -1).
After initializing to 4) and determining whether or not the binarized value of the pixel is “1”, it is determined whether or not the pixel is a candidate point pixel, and then the Hough transform is used. Then, a plurality of straight lines passing through the pixel are obtained.
但し、抽出された候補点画素を通る多数本の直線を、前
記X軸に対して0度乃至180度の範囲において、画面中
心と画面端部に位置する各画素とを結ぶ線を区別できる
ように、X−Y座標系における画素の量子化精度に対応
して予め複数段階に設定された傾き(θ)毎に、その値が
180度に達するまで、下記(ii)式に基づいて、極座標系
における基準線としての前記X軸に対する傾き(θ)と、
原点つまり画面中央からの距離(ρ)として求める(第3
図参照)。However, a large number of straight lines passing through the extracted candidate point pixels can be distinguished from each other in the range of 0 to 180 degrees with respect to the X-axis so as to distinguish the line connecting the screen center and each pixel located at the screen edge. In addition, for each inclination (θ) preset in a plurality of stages corresponding to the pixel quantization accuracy in the XY coordinate system, the value is
Until reaching 180 degrees, based on the following equation (ii), the inclination (θ) with respect to the X axis as the reference line in the polar coordinate system,
Calculated as the distance (ρ) from the origin, that is, the center of the screen (3rd
See figure).
ρ=x・cosθ+y・sinθ ……(ii) 前記X軸に対して0度乃至180度の範囲において複数段
階に設定する前記傾き(θ)の値について説明を加えれ
ば、例えば、原点としての画面中央に位置する画素と、
画面上最も外側に並ぶ画素とを結ぶ直線の傾きを、1画
素分の分解能で区別できるように設定することになる。ρ = x · cos θ + y · sin θ (ii) If the description of the value of the inclination (θ) set in multiple steps in the range of 0 ° to 180 ° with respect to the X-axis, for example, a screen as an origin A pixel located in the center,
The inclination of the straight line connecting the pixels arranged on the outermost side on the screen is set so as to be distinguishable with the resolution of one pixel.
ところで、第2図(ハ)にも示すように、前記各画素は、
X軸方向とY軸方向の1画素当たりの距離が等しくなる
ように正方画素に量子化されていることから、例えば、
前記Y軸に平行な方向で互いに1画素分の距離の差があ
る二本の直線(L0),(L1)の前記原点からの距離(ρ)の差
は、それを整数化してもX−Y座標系における1画素分
の距離の差に一致して誤差が生じない状態となるが、前
記X軸又はY軸に対して45度の傾きとなり且つ前記極座
標系における原点からの距離(ρ)が1段階異なる二本の
直線(L2),(L3)の各距離(ρ)の整数部分は同じ値となる
ために、整数化すると区別できなくなる状態となる。By the way, as shown in FIG. 2C, each pixel is
Since it is quantized into square pixels so that the distances per pixel in the X-axis direction and the Y-axis direction are equal,
The difference in the distance (ρ) from the origin of the two straight lines (L 0 ) and (L 1 ) having a difference in distance of one pixel from each other in the direction parallel to the Y-axis is expressed by an integer. An error does not occur in accordance with the difference in the distance of one pixel in the XY coordinate system, but there is an inclination of 45 degrees with respect to the X axis or the Y axis, and the distance from the origin in the polar coordinate system ( Since the integer part of each distance (ρ) of the two straight lines (L 2 ) and (L 3 ) whose ρ) differ by one step has the same value, it becomes indistinguishable when converted to an integer.
尚、前記原点からの距離(ρ)を整数化する場合、一般的
には小数点以下の数値を切り捨て処理することになる。When the distance (ρ) from the origin is converted into an integer, generally, the value below the decimal point is truncated.
従って、前記極座標系における原点からの距離(ρ)の値
を、下記(iii)式に基づいて、前記傾き(θ)の値が45度
に近づくほど前記距離(ρ)の値の変化が拡大されるよう
に補正して、前記距離(ρ)を整数化した値の最小分解能
が、前記X−Y座標系における1画素分の分解能に対応
するように補正するのである。Therefore, the value of the distance (ρ) from the origin in the polar coordinate system, based on the following formula (iii), the change in the value of the distance (ρ) increases as the value of the inclination (θ) approaches 45 degrees. Then, the minimum resolution of the value obtained by converting the distance (ρ) into an integer corresponds to the resolution of one pixel in the XY coordinate system.
但し、 0≦θ<45 の範囲ではψ=θ 45≦θ<90 の範囲ではψ=90−θ 90≦θ<135の範囲ではψ=θ−90 135≦θ≦180の範囲ではψ=180−θ とする。 However, in the range of 0 ≦ θ <45, ψ = θ in the range of 45 ≦ θ <90 ψ = 90−θ in the range of 90 ≦ θ <135 ψ = θ−90 in the range of 135 ≦ θ ≦ 180 ψ = 180 −θ.
次に、前記距離(ρ)の小数点以下を切り捨て処理して整
数化し、その整数化した値と前記複数段階に設定された
傾き(θ)とに対応して予め設定された二次元配列を用い
て、そのヒストグラムを加算する。Next, the decimal point of the distance (ρ) is rounded down to be an integer, and a preset two-dimensional array is used corresponding to the integerized value and the inclinations (θ) set in the plurality of steps. And add the histograms.
そして、一つの候補点画素について、前記複数段階に設
定された傾き(θ)の値が180度に達するまでヒストグラ
ムを加算する処理を繰り返した後、前記画素の座標値
(x,y)が最大値(x=15,y=15)に達するまで、その
座標値を順次更新しながら、抽出された各候補点画素毎
に、その画素を通る直線に対応する傾き(θ)と原点から
の距離(ρ)の組み合わせのヒストグラムを加算する処理
を繰り返して、全候補点画素を通る直線を求めることに
なる。Then, for one candidate point pixel, after repeating the process of adding the histogram until the value of the inclination (θ) set in the plurality of steps reaches 180 degrees, the coordinate value (x, y) of the pixel is maximum. For each extracted candidate point pixel, the slope (θ) corresponding to the straight line passing through the pixel and the distance from the origin are updated until the value (x = 15, y = 15) is reached. The process of adding the histograms of the combination of (ρ) is repeated to obtain the straight line passing through all the candidate point pixels.
全候補点画素を通る直線を求める処理が完了した後は、
ヒストグラムに加算された値から、最大頻度となる前記
傾き(θ)と原点からの距離(ρ)の組み合わせを求めて、
各候補点画素を通る直線のうちの最大頻度となる一つの
直線を決定し、その直線を前記境界(L)に対応する直線
として求めることになる。After completing the process of finding the straight line that passes through all candidate point pixels,
From the value added to the histogram, obtain the combination of the slope (θ) and the distance from the origin (ρ) that is the maximum frequency,
One straight line having the maximum frequency among straight lines passing through each candidate point pixel is determined, and the straight line is obtained as a straight line corresponding to the boundary (L).
そして、境界(L)に対する作業車(V)のずれの算出は、求
められた各値(ρ),(θ)から、実際の地面の座標系、つ
まり、前記量子化された画素の分解能に対応させてX−
Y座標系に写像することにより、前記境界(L)に対する
作業車(V)の実際の位置を算出することになる。Then, the deviation of the work vehicle (V) with respect to the boundary (L) is calculated from the obtained values (ρ) and (θ) to the actual ground coordinate system, that is, the resolution of the quantized pixel. Corresponding to X-
By mapping to the Y coordinate system, the actual position of the work vehicle (V) with respect to the boundary (L) will be calculated.
前記距離(ρ)の整数化の方法としては、切り上げや四捨
五入等各種の方法が利用できる。As a method of converting the distance (ρ) into an integer, various methods such as rounding up or rounding off can be used.
尚、特許請求の範囲の項に図面との対照を便利にするた
めに符号を記すが、該記入により本発明は添付図面の構
造に限定されるものではない。It should be noted that reference numerals are added to the claims for convenience of comparison with the drawings, but the present invention is not limited to the structures of the accompanying drawings by the entry.
図面は本発明に係る画像処理装置のおけるハフ変換方法
の実施例を示し、第1図は画像処理のフローチャート、
第2図(イ),(ロ),(ハ)は画像の説明図、第3図はハフ変
換の説明図、第4図は微分処理の説明図、第5図は作業
地の説明図である。 (x,y)……画素、(θ)……基準線に対する傾き、(ρ)
……原点からの距離、(S)……撮像手段、(V)……移動
体。The drawings show an embodiment of a Hough transform method in an image processing apparatus according to the present invention, and FIG. 1 is a flowchart of image processing,
2 (a), (b), and (c) are explanatory diagrams of images, FIG. 3 is an explanatory diagram of Hough transform, FIG. 4 is an explanatory diagram of differential processing, and FIG. 5 is an explanatory diagram of a work site. is there. (X, y) …… Pixel, (θ) …… Slope with respect to the reference line, (ρ)
...... Distance from the origin, (S) …… Image pickup means, (V) …… Moving body.
Claims (1)
と、その撮像手段(S)で得られた画像情報をハフ変換し
て直線化処理する直線化処理手段とを備え、前記画像情
報のX−Y座標系において、X軸方向及びY軸方向に並
ぶように位置付けされる複数個の画素(x,y)のうち
の、候補点に対応する複数個の候補点画素を通る直線を
検出する画像処理装置におけるハフ変換方法であって、 基準線が前記X−Y座標系におけるX軸又はY軸と平行
な線として決められた極座標系において、前記各候補点
画素夫々に対して、その画像を通る複数本の直線を、0
度乃至180度の範囲において複数段階に設定された前記
基準線に対する傾き(θ)と、原点からの距離(ρ)として
求め、 前記傾き(θ)が0度以上45度未満の範囲においては、そ
の傾き(θ)の余弦で、 且つ、前記傾き(θ)が45度以上90度未満の範囲において
は、90からその傾き(θ)を減算した値の余弦で、 且つ、前記傾き(θ)が90度以上135度未満の範囲におい
ては、その傾き(θ)から90度を減算した値の余弦で、 且つ、前記傾き(θ)が135度以上180度以下の範囲におい
ては、180度からその傾き(θ)を減算した値の余弦で、 前記極座標系において求められた前記距離(ρ)を除算
し、その除算によって求められた値を整数化し、前記各
画素(x,y)夫々に対して、前記傾き(θ)と前記整数化
された値との組み合わせとして求められた直線のうちの
最大頻度のものを抽出する画像処理装置におけるハフ変
換方法。1. An imaging means (S) for photographing the front of a moving body (V)
And linearization processing means for Hough-converting and linearizing the image information obtained by the image pickup means (S), and in the XY coordinate system of the image information, in the X-axis direction and the Y-axis direction. A Hough transform method in an image processing apparatus for detecting a straight line passing through a plurality of candidate point pixels corresponding to a candidate point among a plurality of pixels (x, y) positioned so as to be arranged side by side. In a polar coordinate system determined as a line parallel to the X-axis or Y-axis in the XY coordinate system, a plurality of straight lines passing through the image for each candidate point pixel are set to 0.
The inclination (θ) with respect to the reference line set in a plurality of stages in the range of degrees to 180 degrees and the distance (ρ) from the origin are obtained. In the range where the inclination (θ) is 0 degree or more and less than 45 degrees, The cosine of the slope (θ), and in the range where the slope (θ) is 45 degrees or more and less than 90 degrees, the cosine of the value obtained by subtracting the slope (θ) from 90, and the slope (θ) Is 90 degrees or more and less than 135 degrees, it is the cosine of the value obtained by subtracting 90 degrees from the inclination (θ), and when the inclination (θ) is 135 degrees or more and 180 degrees or less, With the cosine of the value obtained by subtracting the slope (θ), the distance (ρ) obtained in the polar coordinate system is divided, the value obtained by the division is converted into an integer, and each pixel (x, y) is divided into On the other hand, of the straight lines obtained as a combination of the slope (θ) and the integerized value, the image with the highest frequency is extracted. Hough transform method in the processing apparatus.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62215898A JPH0624015B2 (en) | 1987-08-28 | 1987-08-28 | Hough transform method in image processing apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62215898A JPH0624015B2 (en) | 1987-08-28 | 1987-08-28 | Hough transform method in image processing apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6458065A JPS6458065A (en) | 1989-03-06 |
| JPH0624015B2 true JPH0624015B2 (en) | 1994-03-30 |
Family
ID=16680080
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62215898A Expired - Lifetime JPH0624015B2 (en) | 1987-08-28 | 1987-08-28 | Hough transform method in image processing apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0624015B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2967157B2 (en) * | 1990-03-08 | 1999-10-25 | 信越化学工業株式会社 | Optical isolator |
-
1987
- 1987-08-28 JP JP62215898A patent/JPH0624015B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6458065A (en) | 1989-03-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6546118B1 (en) | Image processing apparatus for vehicle | |
| CN110569861A (en) | An Image Matching and Localization Method Based on Fusion of Point Features and Contour Features | |
| JPH10143659A (en) | Object detection device | |
| CN111213153A (en) | Target object motion state detection method, device and storage medium | |
| US7221789B2 (en) | Method for processing an image captured by a camera | |
| CN114549400A (en) | Image identification method and device | |
| JP4128837B2 (en) | Road lane detection device | |
| JP3807651B2 (en) | White line recognition device | |
| CN113096145B (en) | Target boundary detection method and device based on Hough transformation and linear regression | |
| JP2003308599A (en) | Roadway environment detection device | |
| JP2798349B2 (en) | Vehicle position detection device | |
| JPH0624015B2 (en) | Hough transform method in image processing apparatus | |
| JPH11345336A (en) | Obstacle detection device | |
| JPH0436405B2 (en) | ||
| JP4018950B2 (en) | Stereo camera misalignment inspection apparatus and misalignment inspection method | |
| JPH1141521A (en) | Imaging device, inter-vehicle distance measuring device, and inter-vehicle distance measuring method | |
| JP3063481B2 (en) | Vehicle object detection device | |
| JP2520104B2 (en) | Boundary detection device for autonomous vehicles | |
| JP2624390B2 (en) | Crop row detector | |
| JPH10124687A (en) | Road white line detection method and road white line detection device | |
| JP2850607B2 (en) | Roadway detection device for vehicles | |
| JPH0624016B2 (en) | Imaging type boundary detection device | |
| CN121089710B (en) | A navigation method and system for a green-cutting robot | |
| JPH07222504A (en) | Travel control method for autonomous vehicle | |
| JP3020734B2 (en) | Boundary detection device for autonomous vehicles |