JPS63214888A - Picture processing method - Google Patents

Picture processing method

Info

Publication number
JPS63214888A
JPS63214888A JP62046776A JP4677687A JPS63214888A JP S63214888 A JPS63214888 A JP S63214888A JP 62046776 A JP62046776 A JP 62046776A JP 4677687 A JP4677687 A JP 4677687A JP S63214888 A JPS63214888 A JP S63214888A
Authority
JP
Japan
Prior art keywords
image
distribution
image data
image processing
article
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.)
Pending
Application number
JP62046776A
Other languages
Japanese (ja)
Inventor
Yoshimi Niihara
良美 新原
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.)
Mazda Motor Corp
Original Assignee
Mazda 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 Mazda Motor Corp filed Critical Mazda Motor Corp
Priority to JP62046776A priority Critical patent/JPS63214888A/en
Publication of JPS63214888A publication Critical patent/JPS63214888A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To measure an end position of an object accurately while excluding causes of error due to a change in the lighting or the shape of the end by applying statistical processing to the picture edge. CONSTITUTION:Two-dimension picture data of an object 100 is obtained by an image pickup means and the two-dimension picture data is divided into plural areas in two different directions, e.g., x, y directions. Then the change in the picture data sampled at two adjacent areas is detected as to all the regions as to the two directions x, y. The distribution of frequency of sample numbers where the change in the picture data is a prescribed threshold value or over as to two directions x, y is obtained and the position of the end of the object 100 is detected based on the distribution of frequency.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、例えば自動車のヘッドライトの如ぎ実質的に
略四角形形状を有する物品の端部位置を検出するための
画像処理方法に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to an image processing method for detecting the end position of an article having a substantially rectangular shape, such as a headlight of an automobile.

(従来の技術) 従来より、自動車の組み立てにおいて、そのヘッドライ
トの組み付は後には、光軸が所定の規格範囲内にあるよ
うに調整検査する必要がある。この先軸調整はヘッドラ
イトの照射光の最輝点若しくは明暗境界線が、基準範囲
内にあるように調整するものである。
(Prior Art) Conventionally, in the assembly of automobiles, after the headlights are assembled, it is necessary to perform adjustment inspection to ensure that the optical axis is within a predetermined standard range. This forward axis adjustment is performed so that the brightest point or the brightness/darkness boundary line of the headlight irradiation light is within a reference range.

この光軸調整に関し、照射光の配光パターンを光学的に
画像処理し、光軸調整の精度向上を図るようにした技術
が、例えば、特開昭59−24232号にみられるよう
に提案されている。この先行例においては、同一車種に
おいて、照射光の配光パターンの一定光度以上の重心位
置から一定の相対位置にある明暗境界線(シャープカッ
ト推定線)を推定して求めて、規格内に前記明暗境界線
が入るようにヘッドライトの光軸を調整するようにした
ものである。
Regarding this optical axis adjustment, a technology has been proposed that improves the precision of optical axis adjustment by optically image processing the light distribution pattern of the irradiated light, as seen in, for example, Japanese Patent Laid-Open No. 59-24232. ing. In this prior example, a bright and dark boundary line (estimated sharp cut line) located at a certain relative position from the center of gravity of the light distribution pattern of the irradiated light at a certain luminous intensity or higher is estimated and found for the same car model, and the The optical axis of the headlights is adjusted so that the boundary line between bright and dark is included.

又、同じヘッドライトの光軸調整に関する技術として、
本願発明の特許出願人からの、特願昭6l−1tA66
15号のような提案技術がある。前述の特開昭59−2
4232号が、同一車種においては最輝点と明暗境界線
とは一定の相対関係にあるという根拠のない前提に依拠
している点に鑑み、上記提案技術は、各自動車毎の実際
の最輝点と明暗境界戦との相対位置関係を求めて、精度
の良い光軸調整を達成しようとしている。
In addition, as a technology for adjusting the optical axis of the same headlight,
Patent application Sho 6l-1tA66 from the patent applicant for the claimed invention
There is a proposed technology like No. 15. The aforementioned Japanese Patent Application Publication No. 59-2
In view of the fact that No. 4232 is based on the unfounded premise that there is a certain relative relationship between the brightest point and the bright/dark boundary line in the same car model, the above proposed technology is based on the actual brightest point for each car. We are trying to achieve highly accurate optical axis adjustment by finding the relative positional relationship between the point and the contrast between bright and dark boundaries.

(発明が解決しようとする問題点) ところが、上記の2件の光軸調整に関する技術は、自動
車の車高、車体の左右位置等のようなヘッドライト位置
(ヘッドライトビームの方向)に影響する要素を正確に
知っていることを前提とする。タイヤの空気圧等の違い
により同一車種でも車高等が異なることとなり、その結
果、ヘッドライト照射光の最輝点などを検出しても、そ
れと比較すべき基準となる規格明暗境界線が定まらない
ことになるからである。
(Problem to be solved by the invention) However, the above two optical axis adjustment technologies affect the headlight position (direction of the headlight beam), such as the height of the vehicle and the left-right position of the vehicle body. It is assumed that you know the elements accurately. Due to differences in tire pressure, etc., the height of the vehicle may vary even for the same model, and as a result, even if the brightest point of the headlight irradiation is detected, the standard brightness/darkness boundary line that should be compared with it cannot be determined. This is because it becomes

そこで、前記特開昭59−24232号はテレビカメラ
等で車高を測定してヘッドライト位置を予想することに
より、又前記提案技術では同じくテレビカメラ等でヘッ
ドライトの上辺及び内側辺を検出等して、ヘッドライト
位置を求めるようにしている。
Therefore, the above-mentioned Japanese Patent Application Laid-open No. 59-24232 uses a TV camera etc. to measure the vehicle height and predict the headlight position, and the above proposed technology also uses a TV camera etc. to detect the upper and inner sides of the headlights. to determine the headlight position.

ところが、このようなテレビカメラ等の撮像手段によっ
て、例えばヘッドライト若しくは車高等を測定すること
は、ヘッドライトのエツジ、車体のエツジ等がハレーシ
ョン、乱反射等を引き起こし誤測定し易い、即ち照明の
悪影響を受は易いのである。
However, when measuring the headlights or vehicle height using an imaging means such as a television camera, the edges of the headlights, the edges of the vehicle body, etc. cause halation, diffused reflection, etc., making it easy to make erroneous measurements.In other words, the adverse effects of illumination It is easy to accept.

そして、上記の問題はヘッドライト、車体等の端部検出
に限られず、一般的な物品の端部位置を画像処理により
検出するときに発生する問題でもある。
The above problem is not limited to edge detection of headlights, vehicle bodies, etc., but also occurs when detecting edge positions of general articles by image processing.

そこで、本発明は上述従来例の欠点を除去するために提
案されたものでその目的は、物品の画像データを取り込
んで、正確な物品の位置を測定することのできる画像処
理方法を提案するものである。
Therefore, the present invention was proposed in order to eliminate the drawbacks of the above-mentioned conventional examples, and its purpose is to propose an image processing method that can capture image data of an article and accurately measure the position of the article. It is.

(問題点を解決するための手段及び作用)上記課題を達
成するための本発明の画像処理方法の構成は第1図に示
すように、撮像手段によって物品100の二次元画像デ
ータを得る入力工程と、二次元画像データを、異なる2
方向、例えば図示の如<x、X方向について複数の領域
に分割する分割工程と、x、y2方向の各方向に関して
、隣接する2つの領域間でサンプルした画像データ値の
変化を、全領域について検出する変化点検出工程と、上
記変化が所定の閾値以上のサンプル数の上記2方向につ
いての度数分布を求める分布工程と、上記度数分布に基
づいて前記物品の端部の位置を検出する端部検出工程と
からなる。
(Means and operations for solving the problems) The configuration of the image processing method of the present invention for achieving the above-mentioned problems is as shown in FIG. , the two-dimensional image data is
For example, as shown in the figure, the division step is to divide into multiple regions in the x and a change point detection step for detecting a change point; a distribution step for determining a frequency distribution in the two directions of the number of samples in which the change is greater than or equal to a predetermined threshold; and an end portion for detecting the position of the end of the article based on the frequency distribution. It consists of a detection step.

(実施例) 以下添付図面を参照して本発明に係る実施例を説明する
(Examples) Examples according to the present invention will be described below with reference to the accompanying drawings.

第1図は、この物品端部位置確認のための本発明に係る
基本的な実施例の原理を説明する図である。略四角形状
を有する物品100を例えばCCDエリアセンサ(又は
ラインセンナ)等を有するカメラ等で撮像すると、同図
(b)に示したような二次元の多値画像データが得られ
る。これらの多値画像データの1画素は、通常CODセ
ンナの1画素に対応し、例えば8ビット■256階調の
濃度変化を表現する。物品100の表面が同じ物質で覆
われているならば、上記二次元の多値画像データの値は
、その端部部分を除いて、僅かの変化しかない、一方、
端部部分は輝度が大きく変化するために、その多値画像
データ値は大きく変化する。これが画像エツジである。
FIG. 1 is a diagram illustrating the principle of a basic embodiment of the present invention for confirming the position of the end of an article. When an image of an article 100 having a substantially rectangular shape is captured by a camera having a CCD area sensor (or line sensor), etc., two-dimensional multi-valued image data as shown in FIG. 2(b) is obtained. One pixel of these multivalued image data usually corresponds to one pixel of a COD sensor, and expresses density changes of, for example, 8 bits and 256 gradations. If the surface of the article 100 is covered with the same material, the values of the two-dimensional multivalued image data will have only slight changes except for the edge portions.
Since the brightness of the end portion changes greatly, the multivalued image data value thereof changes greatly. This is the image edge.

この変化は通常端部において、明度が暗くなるものとし
て認識される。更に、この端部部分の画像では、ハレー
ションや乱反射等により、上記の画像エツジ位置にバラ
ツキを生じている。この様子を第1図(b)に示す、第
1図(b)では、x、y座標で示す画像平面内で、z軸
方向に多値画像データ値を三次元的に示している。
This change is usually perceived as a darkening of the brightness at the edges. Furthermore, in the image of this end portion, the above-mentioned image edge position varies due to halation, diffused reflection, and the like. This state is shown in FIG. 1(b). In FIG. 1(b), multivalued image data values are three-dimensionally shown in the z-axis direction within the image plane indicated by x and y coordinates.

このような分布をもつ多値画像データについて、X方向
とX方向の夫々の隣接する2画素について、画像データ
値の変化を検出する。第1図(C)は、X方向の各ライ
ン毎にX方向に互いに隣接する2画素間の画像データ値
の差を2軸方向にとって、三次元的に示している。同じ
く第1図(d)は、Y方向に互いに隣接する2画素間で
、その画像データ値の差を2軸方向にとって、三次一元
的に示している。この差が大きい点は物品100の端部
の画像エツジに対応する筈である。
Regarding multivalued image data having such a distribution, changes in image data values are detected for two adjacent pixels in each of the X direction and the X direction. FIG. 1(C) three-dimensionally shows the difference in image data values between two pixels adjacent to each other in the X direction for each line in the X direction in two axial directions. Similarly, FIG. 1(d) shows the difference in image data values between two pixels adjacent to each other in the Y direction in two axial directions in a three-dimensional and one-dimensional manner. Points where this difference is large should correspond to image edges at the ends of article 100.

これら2つの分布から、上記差が所定値以上のものであ
るサンプル点の数を累積して、度数図(ヒストグラム)
としたものが、第1図(e)。
From these two distributions, the number of sample points for which the difference is greater than or equal to a predetermined value is accumulated, and a frequency diagram (histogram) is created.
This is shown in Figure 1(e).

Cf)である、この度数図において、ピーク値をもつサ
ンプル点の位置が、物品の端部に対応する画像エツジの
中心であると考えられる。即ち、■:上記のような統計
的な処理を施すことにより、ハレーション、乱反射等の
照明の影響を除外できると共に、物品100の端部が直
線を形成していない場合であっても、端部の位置を認識
することができる。
Cf), the location of the sample point with the peak value is considered to be the center of the image edge corresponding to the edge of the article. That is, ■: By performing the above statistical processing, it is possible to exclude the effects of illumination such as halation and diffused reflection, and even if the edges of the article 100 do not form a straight line, the edges can recognize the location of

■:例え、物品100の表面が均一な物質で覆われてい
ても、その画像データには多少のバラツキが発生してい
ると考えられるが、互いに隣接する2画素間の多値画像
データの差を統計的に処理することにより、上記バラツ
キによるノイズは吸収できる。
■: Even if the surface of the article 100 is covered with a uniform substance, there may be some variation in the image data, but there is a difference in the multivalued image data between two adjacent pixels. By statistically processing the above, noise caused by the above-mentioned variations can be absorbed.

尚、上記の第1図に示した実施例では、変化点検出と、
度数分布作成とを別個の過程として説明しているが、x
、X方向をもつ画像メモリに格納し、X方向の度数分布
を得るときは、この画像メモリのXアドレスカウンタ値
を固定にして、Xアドレスカウンタをインクリメントし
つつ、画像データを読出し、その差が所定値以上のもの
の数を計数し、この操作をXアドレスカウンタをインク
リメントしながら繰返すようにする。X方向の度数分布
についても同様である。このようにすると、高速処理が
可能になる。
In addition, in the embodiment shown in FIG. 1 above, change point detection and
Although the creation of the frequency distribution is explained as a separate process,
, and to obtain the frequency distribution in the X direction, fix the X address counter value of this image memory, read out the image data while incrementing the X address counter, and calculate the difference between them. The number of items exceeding a predetermined value is counted, and this operation is repeated while incrementing the X address counter. The same applies to the frequency distribution in the X direction. In this way, high-speed processing becomes possible.

しかし、第1図の基本実施例におけるように、多値画像
データを画像処理したのでは、処理時間に多くを要する
。そこで第2図以下に説明するところの、本発明を自動
車のヘッドライトの光軸調整に適用した変形実施例では
、処理速度を上げるために、多値画像データの代りに二
値画像データを用いる。そして、この実施例では後述す
るように、二値画像データは上記二値化レベルの許容幅
が小さくノイズに弱い点に鑑みて、二値化レベル(Jl
)を端部検出過程で可変としている。
However, performing image processing on multivalued image data as in the basic embodiment shown in FIG. 1 requires a long processing time. Therefore, in a modified embodiment in which the present invention is applied to the optical axis adjustment of an automobile headlight, which will be explained below in Fig. 2, binary image data is used instead of multivalued image data in order to increase the processing speed. . In this embodiment, as will be described later, in view of the fact that the binary image data has a small tolerance range for the binarization level and is susceptible to noise, the binarization level (Jl
) is made variable during the edge detection process.

第2図以下に説明する実施例は、本発明に係企画像処理
方法を、自動車のヘッドライトの光軸禅整時のヘッドラ
イト位置の確認に適用したものである。ここで、本実施
例のヘッドライト位置確認方法は、ヘッドライト等のよ
うな物品は、その端部以外の部分が略同じ輝度を有し、
その一方でエツジ部では輝度が低下する(又は、上がる
)ことを利用する。第2図はその先軸調整システムの全
体構成が示されており、ヘッドライトの光軸検査ライン
に搬入された自動車1の前方には、左右のヘッドライト
2a、2bの照射光が夫々照射される左右のスクリーン
3a、3bの近傍には、前記自動車1の左右のヘッドラ
イト2a、2bを撮像する左右の第1のテレビカメラ4
a、4b (CCDカメラ)が設置される一方、スクリ
ーン3a。
In the embodiment described below in FIG. 2, the image processing method according to the present invention is applied to the confirmation of the headlight position when adjusting the optical axis of the headlight of an automobile. Here, in the headlight position confirmation method of the present embodiment, an article such as a headlight has substantially the same brightness in parts other than its ends, and
On the other hand, the fact that the brightness decreases (or increases) at the edge portion is utilized. FIG. 2 shows the overall configuration of the front axis adjustment system, and the front of the automobile 1 that has been brought into the headlight optical axis inspection line is illuminated with light from left and right headlights 2a and 2b, respectively. In the vicinity of the left and right screens 3a and 3b, there are left and right first television cameras 4 that take images of the left and right headlights 2a and 2b of the automobile 1.
a, 4b (CCD camera) are installed, while the screen 3a.

3b上の照射光の配光パターンA(第8図)を撮像する
左右の第2のテレビカメラ5a、5b (CCDカメラ
)が設置されている。これらのテレビカメラは、所謂ラ
スクスキャン方式で撮像対象をスキャンして得たアナロ
グ画像信号を、画像処理装置6に水平同期信号等と共に
出力するものである。又、車種等の情報を操作入力する
操作盤7からの信号が同様に画像処理装置6に人力され
、そして、この画像処理装置6からの出力信号が左右ヘ
ッドライト2a、2bの近傍に設置された表示装置8a
、8bで表示される。
Second television cameras 5a and 5b (CCD cameras) on the left and right sides are installed to take images of the light distribution pattern A (FIG. 8) of the irradiated light on the screen 3b. These television cameras output an analog image signal obtained by scanning an object to be imaged using a so-called rusk scan method to an image processing device 6 together with a horizontal synchronization signal and the like. Further, a signal from an operation panel 7 for inputting information such as the vehicle type is similarly inputted manually to an image processing device 6, and an output signal from this image processing device 6 is installed near the left and right headlights 2a, 2b. display device 8a
, 8b.

第2B図はこの画像処理装置6のブロック図である。C
PUl0はこの画像処理装置6の全体の制御を行なう中
央処理装置である。テレビカメラ4a、4b、5a、5
bからの水平ライン毎のアナログ映像信号は、CPUl
0の指示に応じたアナログマルチプレクサ15により、
適宜1つ選択されてデジタルの多値画像データに変換さ
れ、画像メモリ13に蓄えられる。11は二値化回路で
あり、12は変化点検出回路である。
FIG. 2B is a block diagram of this image processing device 6. C
PU10 is a central processing unit that controls the entire image processing device 6. TV cameras 4a, 4b, 5a, 5
The analog video signal for each horizontal line from b
By the analog multiplexer 15 according to the instruction of 0,
An appropriate one is selected, converted into digital multi-valued image data, and stored in the image memory 13. 11 is a binarization circuit, and 12 is a change point detection circuit.

第3A図に二値化回路11の一例を示す、これは画像メ
モリ13内の多値画像データを1ライン毎の1画素ずつ
シリアルに、デジタルコンパレータ(CMP)20によ
り二値化レベルと比較し、二値化する。この文はcpu
ioから与えられ、その値は後述するように可変である
。第3B図に二値化された各画素毎の画像データの一例
を示す。
FIG. 3A shows an example of the binarization circuit 11, which serially compares the multi-value image data in the image memory 13 one pixel per line with the binarization level by a digital comparator (CMP) 20. , binarize. This sentence is cpu
io, and its value is variable as described below. FIG. 3B shows an example of binarized image data for each pixel.

CMP20によって二値化された画像データは変化点検
出回路12により、その変化点を検出される。第3C図
はこの回路12の回路図である。
The change point of the image data binarized by the CMP 20 is detected by the change point detection circuit 12. FIG. 3C is a circuit diagram of this circuit 12.

21はフリップフロップであり、x、y夫々の方向に隣
接する2画素の画像データ値の変化を排他的論理和ゲー
ト(EXOR)2e2で検出するために、1画素遅延さ
せるためのものである0図中の画素クロックは1画素毎
のタイミングを得るためのクロックである。かくしてゲ
ート23からは、二値画像データ値が1“→“0′″又
は“O″→“1”と変化する画素位置毎に“1”を出力
する。第3D図に、第3B図の画像データから、X方向
において変化点を抽出されたデータ列を示す、このX方
向において検出された変化点の二次元分布を、「X方向
変化点分布」と便宜上呼ぶ。
21 is a flip-flop, which is used to delay one pixel in order to detect a change in the image data value of two pixels adjacent in each of the x and y directions using an exclusive OR gate (EXOR) 2e2. The pixel clock in the figure is a clock for obtaining timing for each pixel. In this way, the gate 23 outputs "1" for each pixel position where the binary image data value changes from 1" to "0'" or from "O" to "1". For convenience, this two-dimensional distribution of change points detected in the X direction, which indicates a data string in which change points are extracted in the X direction from image data, is referred to as "X direction change point distribution."

第1図の基本実施例では、第1図(c)がこの「X方向
変化点分布」に該当する。この変化点検出はX方向につ
いてもなされる。これを同じく「X方向変化点分布」と
呼び、前記基本実施例では、第1図の(d)に相当する
。。
In the basic embodiment shown in FIG. 1, FIG. 1(c) corresponds to this "X-direction change point distribution". This change point detection is also performed in the X direction. This is also called the "X-direction change point distribution" and corresponds to (d) in FIG. 1 in the basic embodiment. .

第4A図に自動車1のヘッドライト部分の外観を示す、
尚、第4A図は説明の便宜上、ヘッドライト30の周辺
をその輪郭を描くことによって表わしているが、実際は
画像の濃淡として表現されるものである。さてこのよう
な対象を、テレビカメラ4a、4bで撮像し、二値化回
路11で二値化し、更に変化点検出回路12でその変化
点を検出すると、第5図の(a)、(b)のような二値
データの分布が得られる。尚、第5図の(a)。
Figure 4A shows the appearance of the headlight part of the car 1.
Although FIG. 4A shows the periphery of the headlight 30 by drawing its outline for convenience of explanation, it is actually expressed as the shading of the image. Now, when such an object is imaged by the television cameras 4a and 4b, and binarized by the binarization circuit 11, and the change point is detected by the change point detection circuit 12, the images (a) and (b) in FIG. ) can be obtained. In addition, (a) of FIG.

(b)は夫々、ヘッドライト3oの近傍の上記「X方向
変化点分布」と「X方向変化点分布」とを、その変化点
(画像エツジ)を黒で表わし、無変化点を白で表わした
ものである。
(b) shows the above-mentioned "X-direction change point distribution" and "X-direction change point distribution" in the vicinity of the headlight 3o, with the change points (image edges) shown in black and the no-change points shown in white. It is something that

cpuioは、そこで、「X方向変化点分布」のデータ
について、X方向の最初の1ライン上の“1”であるも
のを加算して、その累積値を第1ライン(x=1)の度
数値とし、次に第2ライン(x=2)の度数値を求め、
この操作をX方向の全ラインに繰り返して、第5図の(
C)のようなX方向の度数分布を得る。同じ操作をX方
向の、全ラインについても行ない、X方向の度数分布(
第5図の(d))を得る。更に、これらの度数分布に基
づいて、画像エツジを検出し、更にこの画像エツジ位置
から、ヘッドライト位置、車体位置等を検出する。これ
は、第5図の(C)、(d)に示すように、x、yの夫
々の方向の度数分布において、一定の設定値以上の度数
をもつピーク点を画像エツジとする。
Therefore, cpuio adds the "1" on the first line in the X direction to the "X direction change point distribution" data, and calculates the cumulative value for each of the first line (x=1). as a numerical value, then find the degree value of the second line (x = 2),
Repeat this operation for all lines in the X direction, as shown in Figure 5 (
Obtain the frequency distribution in the X direction as shown in C). The same operation is performed for all lines in the X direction, and the frequency distribution in the X direction (
(d) in FIG. 5 is obtained. Furthermore, image edges are detected based on these frequency distributions, and headlight positions, vehicle body positions, etc. are further detected from the image edge positions. As shown in FIGS. 5(C) and 5(d), in the frequency distribution in each of the x and y directions, a peak point having a frequency greater than a certain set value is defined as an image edge.

ところで、自動車のような物品によっては、ヘッドライ
ト30以外にも画像エツジをもつものが当然ある。その
ような画像エツジは第5図の(C)、(d)に示すよう
に複数個衣われる。自動車のヘッドライトの光軸調整の
ような場合は、車種は前もって既知であり従ってその形
状(画像エツジの分布)も分っているので、得られる画
像エツジの分布も予想できる。即ち、前もって、車種毎
に正確なヘッドライト近傍の画像エツジの絶対位置を測
定して、その分布をメモリ等に記憶格納しておくことが
できる。この場合、個々のピークの位置及び度数値、そ
してピーク間の距離等を記憶しておけば十分である。
By the way, some articles such as automobiles naturally have image edges in addition to the headlights 30. A plurality of such image edges are displayed as shown in FIGS. 5(C) and 5(d). In cases such as adjusting the optical axis of a car's headlights, the type of car is known in advance and its shape (distribution of image edges) is also known, so the distribution of image edges to be obtained can also be predicted. That is, the absolute position of the image edge in the vicinity of the headlight can be measured in advance for each vehicle type, and the distribution can be stored in a memory or the like. In this case, it is sufficient to memorize the positions and frequency values of individual peaks, the distances between peaks, and the like.

一方、第2A図システムに搬入される自動車1の位置も
それほどバラツクわけではないので、それから得られた
画像エツジ(例えば、第5図の(C))のなかには、上
記既知の画像エツジ分布と一致する部分が必 ずある、即ち、得られた画像エツジの分布と、既知の画
像エツジの分布とは、相対的に平行移動しり関係にあり
、又、上述したように既知の画像エツジの絶対位置は分
っており、上記平行移動距離もピーク間のズレを計算す
ることによって容易に分るから、自動車1がズレな位置
に停車しても、照明の具合によって画像エツジがボケな
ものであっても、ヘッドライト30の端部の絶対位置を
容易に知ることができるわけである。
On the other hand, since the position of the automobile 1 carried into the system shown in FIG. 2A does not vary so much, some of the image edges obtained therefrom (for example, (C) in FIG. 5) match the known image edge distribution described above. In other words, the distribution of the obtained image edges and the distribution of known image edges are in a relative translation relationship, and as mentioned above, the absolute position of the known image edges is Since the above-mentioned parallel movement distance can be easily found by calculating the deviation between the peaks, even if the car 1 stops at a misaligned position, the edges of the image may be blurred due to the lighting conditions. Also, the absolute position of the end of the headlight 30 can be easily known.

さて、上記のように、ヘッドライト位置を検出した上で
、光軸調整をどのように行なうかを簡単に説明する。第
6図はその光軸調整の制御手順のフローチャートである
。第7図は前述したヘッドライト位置を測定する手順の
フローチャートである。
Now, we will briefly explain how to adjust the optical axis after detecting the headlight position as described above. FIG. 6 is a flowchart of the control procedure for adjusting the optical axis. FIG. 7 is a flowchart of the procedure for measuring the headlight position described above.

第8図は光軸調整の際に調整作業員の手助けとなるよう
に表示装置8a、8bに表示される光軸調整指示画像で
ある。この光軸調整指示画像中で、等直線縞状のAは、
1つのヘッドライトの照射光がスクリーン3a、3b上
に投影され、その画像をテレビカメラ5a、5bで撮影
した画像を画像処理装置6が演算して、等しい明度をも
つ部分を等直線で結んで可視画像化した配光パターンで
ある。
FIG. 8 shows an optical axis adjustment instruction image displayed on the display devices 8a and 8b to assist the adjustment operator during optical axis adjustment. In this optical axis adjustment instruction image, the equilinear striped A is
The irradiation light of one headlight is projected onto the screens 3a and 3b, and the image processing device 6 calculates the images taken by the television cameras 5a and 5b, and connects the parts with equal brightness with equal straight lines. This is a visible image of the light distribution pattern.

Pはその画像中の最も明るい点を示す、この点Pの位置
も、特願昭6l−11f41,113号に示されている
ように、上記ヘッドライトの照射画像を二次元の画素ブ
ロックに細分割してヒストグラムを得、このヒストグラ
ムから二値化のための閾値を求め、二値化し、この二値
化画像の“1”の部分の面積から重心位置を求め、この
重心位置を最輝点Pとする。Lは、ヘッドライト照射画
像中で、明暗が実際に急激に変化する境界を、調整作業
者の助けとなるように直線画像として強調して可視化し
たものである。このLは水平線部aと斜線部すとからな
る。Sはその交点である0本実施例ではこのa、b、S
も画像処理装置6により求められるaLoは、ヘッドラ
イト2a、2bの位置が本発明の画像処理方法により測
定された上で、正規に光軸調整されたヘッドライトであ
れば、上記t、oはこのLよりも下方に位置する筈であ
るという基準明暗境界線である。従って、光軸調整作業
者はこのLを目標にして、光軸調整を行なえばよいわけ
である。
P indicates the brightest point in the image.The position of this point P is also determined by subdividing the headlight irradiation image into two-dimensional pixel blocks, as shown in Japanese Patent Application No. 6l-11f41,113. Divide the image to obtain a histogram, find a threshold for binarization from this histogram, binarize it, find the center of gravity from the area of the "1" part of this binarized image, and use this center of gravity as the brightest point. Let it be P. L is an image in which a boundary where brightness actually changes suddenly in a headlight irradiation image is emphasized and visualized as a straight line image to help the adjustment operator. This L consists of a horizontal line part a and a diagonal line part A. S is the intersection point 0 In this example, a, b, S
If the positions of the headlights 2a and 2b are measured by the image processing method of the present invention and the optical axes of the headlights are properly adjusted, aLo obtained by the image processing device 6 is as follows. This is a reference brightness/darkness boundary line that should be located below this L. Therefore, the optical axis adjustment operator can adjust the optical axis with this L as a target.

第6図のステップS1で、搬入される自動車1の車種が
操作盤フから入力され、自動車1も光軸調整ラインの所
定位置に搬入停止される。この車種入力により、ヘッド
ライトの形状、テレビカメラの撮影方向、そしてヘッド
ライト画像の基準となるピーク分布パターン等を画像処
理装置6は知ることができる。ステップS2ではヘッド
ライト近傍の画像入力を行なう、これは、テレビカメラ
4a、4bにより得られた多値画像データを画像メモリ
13に取り込む過程である1次にステップS3で、ヘッ
ドライト2a、2bの点灯する旨の指示を表示装置8a
、8bに表示する。
In step S1 of FIG. 6, the type of vehicle 1 to be carried in is input from the operation panel, and the vehicle 1 is also stopped at a predetermined position on the optical axis adjustment line. By inputting the vehicle type, the image processing device 6 can learn the shape of the headlights, the photographing direction of the television camera, the peak distribution pattern that serves as a reference for the headlight image, and the like. In step S2, an image of the vicinity of the headlights is input. This is a process of importing multivalued image data obtained by the television cameras 4a, 4b into the image memory 13.First, in step S3, images of the headlights 2a, 2b are input. The display device 8a displays an instruction to turn on the light.
, 8b.

一方、ヘッドライト近傍の多値画像データをステップS
2で得ると、ステップS4に進み、ヘッドライト位置の
検出を行なう、このヘッドライト位置検出の詳細手順を
第7図に示す、先ず、ステップS20で二値化回路11
による二値化を行なう、このときの二値化レベルは見で
ある。ステップS21で、変化点検出回路12により、
「X方向変化点分布」と「X方向変化点分布」を求める
。次に、ステップS22で、第5図の(C)。
On the other hand, step S
2, the process proceeds to step S4 and detects the headlight position.The detailed procedure for detecting the headlight position is shown in FIG.
The binarization level at this time is unknown. In step S21, the change point detection circuit 12
Find the "X direction change point distribution" and "X direction change point distribution". Next, in step S22, (C) of FIG.

(d)のようなX+3’両方向についての度数分布を得
る。ステップS23では、2つの度数分布から、各方向
の画像エツジを検出し、ステップS24で、ピーク間距
離を求める。ステップS25では、前述した既知のピー
クパターンの分布と、ステップS24で求められたピー
クの分布とを比較して、いずれかの相対的位置で、両パ
ターンが合致したのならば、ステップ326へ進み、そ
の分布間の相対的距離を算出する。一方、もし、ステッ
プS25でパターンが合致するものがなければ、ステッ
プS30で二値化レベル文を、所定量aだけ変更する。
Obtain frequency distributions in both the X+3' directions as shown in (d). In step S23, image edges in each direction are detected from the two frequency distributions, and in step S24, the distance between peaks is determined. In step S25, the distribution of the known peak pattern described above is compared with the distribution of the peaks determined in step S24, and if the two patterns match at any relative position, the process proceeds to step 326. , calculate the relative distance between the distributions. On the other hand, if there is no matching pattern in step S25, the binary level sentence is changed by a predetermined amount a in step S30.

ステップS31では、この変更後の文の値が二値化閾値
として意味のある値であるかを判断して、もしYESな
らば、ステップS20へ戻り、二値化をやり直し、更に
上述のフローを繰り返す。
In step S31, it is determined whether the value of the sentence after this change is a meaningful value as a binarization threshold, and if YES, the process returns to step S20, the binarization is redone, and the above-mentioned flow is continued. repeat.

もしステップS31でNOであるならば、自動車の位置
がズレ過ぎているか、車高が高過ぎる等の問題があり、
光軸調整不能であるから、エラー処理として、表示装置
8にその旨表示する。この場合、作業者は自動車1の位
置を動かすことになろう。
If NO in step S31, there is a problem such as the position of the car is too misaligned or the car height is too high.
Since the optical axis cannot be adjusted, this fact is displayed on the display device 8 as an error process. In this case, the operator would move the position of the car 1.

このようにしてステップS5のヘッドライト位置検出サ
ブルーチンにより、第2a図の光軸調整システム内にお
けるヘッドライトの絶対位置が検出される。そこで、第
6図のフローチャートのステップS5に戻る。この時点
で、ヘッドライト2a、2bの絶対位置が分っているの
で、光軸が規格内に調整されているヘッドライトがその
位置にあれば、スクリーン3a、3bのどの位置に明暗
境界が映る筈という、その規格明暗基準線LOをステッ
プS5で計算する。そして、このLoを表示装置8a、
8bに表示する。
In this manner, the absolute position of the headlight within the optical axis adjustment system of FIG. 2a is detected by the headlight position detection subroutine of step S5. Therefore, the process returns to step S5 in the flowchart of FIG. At this point, the absolute positions of the headlights 2a and 2b are known, so if the headlights whose optical axes are adjusted within the standard are in that position, where on the screens 3a and 3b will the bright and dark boundary appear? The standard light/dark reference line LO, which is called ``Shutaku'', is calculated in step S5. Then, this Lo is displayed on the display device 8a,
8b.

一方、ステップS6でヘッドライト2a、2bが点灯さ
れると、上述した画像処理をステップS7で行ない、第
8図のようなA、L、P、a、b等を求め表示する。こ
の場合、特願昭67−/’7’6675号にも説明しで
あるように、ヘッドライトの照射画像のブロックに細分
割され二値化された画像データのX方向の“0”→“1
”に変化する点の座標群から、例えば最小二乗法等によ
り直線aを求める。直線すについても、X方向(若しく
は、X方向)の変化点座標群から求める。Sはaとbの
交点とし求められる。更に、ステップS8で、Pと8間
の距離りを求める。この距離りは同一自動車のヘッドラ
イトであるかぎり、光軸を調整して動かしても不変であ
る。ステップs9では、光軸が規格内に入っていたかを
判断する。これは、作業者が、表示装置8a、8bに表
示されたしとLoとを見て、規格内に入っているか否か
を作業者が判断し、その判断結果を示すキー(操作盤7
上にある)入力を、画像処理装置6が判断することによ
りなされる。規格内であれば、ステップS14に進み、
スクリーンが上り、調整は終了である。
On the other hand, when the headlights 2a and 2b are turned on in step S6, the above-mentioned image processing is performed in step S7, and A, L, P, a, b, etc. as shown in FIG. 8 are determined and displayed. In this case, as explained in Japanese Patent Application No. 67-/'7'6675, "0" in the X direction of the image data that has been subdivided into blocks of the headlight irradiation image and binarized is changed to "0" in the X direction. 1
Find the straight line a from the coordinate group of points that change to ``, for example, by the method of least squares.The straight line a is also found from the coordinate group of changing points in the X direction (or X direction).S is the intersection of a and b. Further, in step S8, the distance between P and 8 is found.As long as the headlights of the same car are used, this distance remains unchanged even if the optical axis is adjusted and moved.In step s9, the distance between P and 8 is determined. Determine whether the axis is within the specifications.This is done by the operator looking at the marks and Lo displayed on the display devices 8a and 8b and determining whether or not the axis is within the specifications. , the key that shows the judgment result (operation panel 7
This is done by the image processing device 6 determining the input (on the top). If it is within the standard, proceed to step S14,
The screen will go up and the adjustment is complete.

規格外であれば、ステップs10へ進み、作業者が光軸
調整を行なう。次にステップSttで、再度テレビカメ
ラ5a、5bから、ヘッドライトの照射画像を画像処理
装置6内に取り込んで、前述した方法により、新たな最
輝点Pの位置を求める。上述したように、Dは不変であ
るから、今度はステップS7で行なったような演算を必
要とせずに、PとDから明暗境界線りを予測することが
でき、それを表示装置8a、8bに表示する。一方、t
、oは最初に計測した位置のままである。そして、ステ
ップS9へ戻り、前述の動作を繰り返す。
If it is outside the standard, the process proceeds to step s10, where the operator adjusts the optical axis. Next, in step Stt, images irradiated by the headlights are again taken into the image processing device 6 from the television cameras 5a and 5b, and a new position of the brightest point P is determined by the method described above. As mentioned above, since D is unchanged, it is possible to predict the brightness/darkness boundary line from P and D without the need for the calculations performed in step S7, and it is displayed on the display devices 8a and 8b. to be displayed. On the other hand, t
, o remains at the initially measured position. Then, the process returns to step S9 and the above-described operations are repeated.

かくして、本発明の画像処理方法をヘッドライトの光軸
調整に応用すれば、ヘッドライトの位置を、照明の変化
、ヘッドライトの端部形状の相違等による影響を除去し
て、正確に検出することができ、その結果、微妙な調整
を必要とする光軸調整を正確に行なうことができる。
Thus, if the image processing method of the present invention is applied to the optical axis adjustment of a headlight, the position of the headlight can be accurately detected by eliminating the effects of changes in illumination, differences in the shape of the end of the headlight, etc. As a result, optical axis adjustment that requires delicate adjustment can be performed accurately.

(発明の効果) 以上説明したように本発明の画像処理方法によれば、物
品の端部位置を、画像エツジの統計的処理により、その
端部の形状、照明等の変化による誤差原因を排除して、
正確に測定することができる。
(Effects of the Invention) As explained above, according to the image processing method of the present invention, causes of error due to changes in the shape of the edge, illumination, etc. are eliminated by statistical processing of image edges in the edge position of the article. do,
Can be measured accurately.

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

第1図の(a)〜(f)は本発明に係る基本実施例の原
理を説明する図、 第2A図は本発明の画像処理方法を自動車のヘッドライ
トの光軸調整システムに通用した場合の該システムの全
体図、 第2B図は第2A図システム中の画像処理装置6の内部
ブロック図、 第3A図、第3B図は夫々、二値化回路及び変化点検出
回路の一例の回路図、 第3C図、第3D図は夫々、上記二値化回路。 変化点検出回路により得られた画像データ列の一例を示
す図、 第4図は自動車のヘッドライト近傍を示す外観図、 第5図の(a)〜(電)は、前記光軸調整システムにお
けるヘッドライト位置検出の画像処理過程を説明する図
、 第6図、第7図は前記光軸調整システムにおける全体の
制御手順を示すフローチャート、第8図は前記光軸調整
システムにおける表示装置に表示される指示画像を示す
図である。 図中、 1・・・自動車、2a、2b、30・・・ヘッドライト
、3a、3b・・・スクリーン、4a、4b、5a、5
b・・・テレビカメラ、6・・・画像処理装置、7・・
・操作盤、8a、8b・・・表示装置、10 ・CPU
、11・・・二値化回路、12−・・変化点検出回路、
13−・・画像メモリ、14−A/D変換器、15・・
・°アナログマルチプレクサ、20・・・デジタルコン
パレータ、21・・・フリップフロップ、22−・・排
他的論理和回路、23・−A N Dゲート、A・・・
配光パターン、P・・・最輝点、L・・・明暗境界線、
Lo・・・基準明暗境界線、D・・・相対距離である。
Fig. 1 (a) to (f) are diagrams explaining the principle of the basic embodiment of the present invention, and Fig. 2A is a case in which the image processing method of the present invention is applied to an optical axis adjustment system of an automobile headlight. 2B is an internal block diagram of the image processing device 6 in the system shown in FIG. 2A, and FIGS. 3A and 3B are circuit diagrams of an example of a binarization circuit and a change point detection circuit, respectively. , 3C and 3D respectively show the above-mentioned binarization circuit. A diagram showing an example of an image data string obtained by the change point detection circuit, FIG. 4 is an external view showing the vicinity of the headlight of a car, and FIGS. FIGS. 6 and 7 are flowcharts showing the overall control procedure in the optical axis adjustment system, and FIG. FIG. In the figure, 1...Car, 2a, 2b, 30...Headlight, 3a, 3b...Screen, 4a, 4b, 5a, 5
b...TV camera, 6...Image processing device, 7...
・Operation panel, 8a, 8b...Display device, 10 ・CPU
, 11... Binarization circuit, 12-... Change point detection circuit,
13--Image memory, 14-A/D converter, 15-...
・°Analog multiplexer, 20...Digital comparator, 21...Flip-flop, 22-...Exclusive OR circuit, 23--A N D gate, A...
Light distribution pattern, P... brightest point, L... light and dark boundary line,
Lo: Reference brightness/darkness boundary line, D: Relative distance.

Claims (5)

【特許請求の範囲】[Claims] (1)撮像手段によつて物品の二次元画像データを得る
入力工程と、 上記二次元画像データを、異なる2方向について複数の
領域に分割する分割工程と、 上記2方向の各方向に関して、隣接する2つの領域間で
サンプルした画像データ値の変化を、全領域について検
出する変化点検出工程と、 上記変化が所定の第1の閾値以上のサンプル数の上記2
方向についての度数分布を求める分布算出工程と、 上記度数分布に基づいて前記物品の端部の位置を検出す
る端部検出工程とからなる画像処理方法。
(1) An input step of obtaining two-dimensional image data of the article using an imaging means; A dividing step of dividing the two-dimensional image data into a plurality of regions in two different directions; a change point detection step of detecting a change in image data values sampled between two areas for all areas;
An image processing method comprising: a distribution calculation step of calculating a frequency distribution in a direction; and an edge detection step of detecting a position of an end of the article based on the frequency distribution.
(2)前記端部検出工程は、1方向の度数分布のピーク
に対応するサンプル点を他の1方向についての画像エッ
ジとし、該画像エッジを物品の端部と同定する工程を含
む事を特徴とする特許請求の範囲第1項に記載の画像処
理方法。
(2) The edge detection step includes a step of determining a sample point corresponding to the peak of the frequency distribution in one direction as an image edge in another direction, and identifying the image edge as an edge of the article. An image processing method according to claim 1.
(3)前記端部検出工程は、1方向の度数分布について
の2つのピークに対応するサンプル点間の間隔と、前記
物品の端部間の既知の間隔とを比較する比較工程を含み
、 上記2つの間隔が等しくないときに、前記分布算出工程
から端部検出工程を繰り返し、 その分布算出工程は前記第1の閾値を変化させる工程を
含むことを特徴とする特許請求の範囲第1項に記載の画
像処理方法。
(3) the edge detection step includes a comparison step of comparing the spacing between sample points corresponding to two peaks for the frequency distribution in one direction with a known spacing between the edges of the article; Claim 1, characterized in that when the two intervals are unequal, the distribution calculation step to the edge detection step are repeated, and the distribution calculation step includes a step of changing the first threshold value. Image processing method described.
(4)前記入力工程は多値画像データを所定の第2の閾
値との比較により二値化する二値化処理工程を含み、 前記端部検出工程は、1方向の度数分布についての2つ
のピークに対応するサンプル点間の間隔と、前記物品の
端部間の既知の間隔とを比較する比較工程を含み、 上記2つの間隔が等しくないときに、前記二値化処理工
程から端部検出工程を繰り返し、 その二値化処理工程は前記第2の閾値を変化させる工程
を含むことを特徴とする特許請求の範囲第1項に記載の
画像処理方法。
(4) The input step includes a binarization processing step of binarizing the multivalued image data by comparing it with a predetermined second threshold value, and the edge detection step includes two values for the frequency distribution in one direction. a comparison step of comparing a spacing between sample points corresponding to a peak with a known spacing between edges of the article; edge detection from the binarization processing step when the two spacings are not equal; 2. The image processing method according to claim 1, wherein the steps are repeated, and the binarization processing step includes a step of changing the second threshold value.
(5)前記2方向は、直交する縦横の2方向である事を
特徴とする特許請求の範囲第1項乃至第4項のいずれか
に記載の画像処理方法。
(5) The image processing method according to any one of claims 1 to 4, wherein the two directions are vertical and horizontal directions that are perpendicular to each other.
JP62046776A 1987-03-03 1987-03-03 Picture processing method Pending JPS63214888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62046776A JPS63214888A (en) 1987-03-03 1987-03-03 Picture processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62046776A JPS63214888A (en) 1987-03-03 1987-03-03 Picture processing method

Publications (1)

Publication Number Publication Date
JPS63214888A true JPS63214888A (en) 1988-09-07

Family

ID=12756729

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62046776A Pending JPS63214888A (en) 1987-03-03 1987-03-03 Picture processing method

Country Status (1)

Country Link
JP (1) JPS63214888A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008039729A (en) * 2006-08-10 2008-02-21 Watanabe Denki Kogyo Kk Method of detecting center of head lamp and apparatus therefor
US7912320B1 (en) 2007-01-16 2011-03-22 Paul Minor Method and apparatus for photographic measurement

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61134884A (en) * 1984-12-06 1986-06-21 Fujitsu Ltd Image processor
JPS61267184A (en) * 1985-05-22 1986-11-26 Fujitsu Ltd Row position detecting system of character string

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61134884A (en) * 1984-12-06 1986-06-21 Fujitsu Ltd Image processor
JPS61267184A (en) * 1985-05-22 1986-11-26 Fujitsu Ltd Row position detecting system of character string

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008039729A (en) * 2006-08-10 2008-02-21 Watanabe Denki Kogyo Kk Method of detecting center of head lamp and apparatus therefor
US7912320B1 (en) 2007-01-16 2011-03-22 Paul Minor Method and apparatus for photographic measurement

Similar Documents

Publication Publication Date Title
CN107607040B (en) Three-dimensional scanning measurement device and method suitable for strong reflection surface
KR101773791B1 (en) Method and device for inspecting surfaces of an examined object
US10699476B2 (en) Generating a merged, fused three-dimensional point cloud based on captured images of a scene
US5774574A (en) Pattern defect detection apparatus
JP6161276B2 (en) Measuring apparatus, measuring method, and program
CN109341527B (en) Automatic shadow compensation structured light projection three-dimensional measurement system and method
JP2001524228A (en) Machine vision calibration target and method for determining position and orientation of target in image
CN113205593B (en) High-light-reflection surface structure light field three-dimensional reconstruction method based on point cloud self-adaptive restoration
JP3185559B2 (en) Surface defect inspection equipment
JP2006010392A (en) Through hole measuring system, method, and through hole measuring program
CN115272256A (en) Sub-pixel level sensing optical fiber path Gaussian extraction method and system
JP3327068B2 (en) Road surface measurement device
CN115375608A (en) Detection method and device, detection equipment and storage medium
CN109000587A (en) The method for obtaining accurate high density point cloud
JPS63214888A (en) Picture processing method
JP2017194380A (en) Inspection device, recording medium and program
US20110279656A1 (en) Surface Scanning System
CN113724173B (en) Method, device and equipment for detecting edge-to-edge distance of carbon plate demolding cloth and storage medium
CN112925351B (en) Method and device for controlling light source of vision machine
JP2961140B2 (en) Image processing method
JP7306620B2 (en) Surface defect inspection device and surface defect inspection method
JP4286605B2 (en) Object surface inspection apparatus and surface inspection method
US20070065042A1 (en) Method for measuring dimensions by means of a digital camera
CN114689604A (en) Image processing method for optical detection of object to be detected with smooth surface and detection system thereof
JPH09152316A (en) Form inspection device for three-dimensional object