JPH01298479A - Inclination angle detector - Google Patents
Inclination angle detectorInfo
- Publication number
- JPH01298479A JPH01298479A JP63130592A JP13059288A JPH01298479A JP H01298479 A JPH01298479 A JP H01298479A JP 63130592 A JP63130592 A JP 63130592A JP 13059288 A JP13059288 A JP 13059288A JP H01298479 A JPH01298479 A JP H01298479A
- Authority
- JP
- Japan
- Prior art keywords
- area
- window
- inclination angle
- image
- picture
- 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.)
- Granted
Links
- 238000001514 detection method Methods 0.000 claims description 12
- 238000005259 measurement Methods 0.000 abstract description 9
- 238000000034 method Methods 0.000 description 12
- 230000001186 cumulative effect Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000006073 displacement reaction Methods 0.000 description 2
- 238000000926 separation method Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
Landscapes
- Image Analysis (AREA)
Abstract
Description
【発明の詳細な説明】
〈産業上の利用分野〉
この発明は、例えば多角形状をなす物体画像の任意の辺
につきその傾き角度を計測して、物体の傾きや姿勢など
を検出する傾き角度検出装置に関する。[Detailed Description of the Invention] <Industrial Application Field> The present invention relates to a tilt angle detection method that detects the tilt and posture of an object by measuring the tilt angle of any side of an object image having a polygonal shape, for example. Regarding equipment.
〈従来の技術〉
従来この種の傾き角度検出装置は、カメラで得た物体画
像につき、所定の画像処理を行ってその物体部分の輪郭
を求めたり、或いは着目した辺の両端点やその辺上の任
意の2点を検出した後、これら輪郭線や検出点から着目
した辺の傾き角度を検出している。<Prior art> Conventionally, this type of inclination angle detection device performs predetermined image processing on an object image obtained by a camera to determine the outline of the object part, or detects the outline of the object part or the end points of the side of interest. After detecting two arbitrary points, the inclination angle of the side of interest is detected from these contour lines and detection points.
〈発明が解決しようとする問題点〉
しかしながら輪郭線による方式では、画像処理が複雑と
なって処理時間が長くかかり、また検出点による方式で
は、端点や任意の2点の検出が容易でなく、しかもノイ
ズや画像の歪などの影響を受けて、検出誤差が大きくな
るなどの問題がある。<Problems to be Solved by the Invention> However, the method using contour lines complicates image processing and takes a long time, and the method using detection points makes it difficult to detect end points or arbitrary two points. Furthermore, there are problems such as increased detection errors due to the effects of noise and image distortion.
この発明は、上記問題に着目してなされたもので、物体
画像における任意の辺に対してウィンドウ設定を行った
後、そのウィンドウ内の画像につき積分的な処理をリア
ルタイムで実行することにより、高速かつ安定して任意
の辺の傾き角度を検出し得る新規な傾き角度検出装置を
提供することを目的とする。This invention was made by focusing on the above problem, and after setting a window for any side of an object image, it performs integral processing on the image within that window in real time. It is an object of the present invention to provide a novel tilt angle detection device that can stably detect the tilt angle of any side.
く問題点を解決するための手段〉
上記目的を達成するため、この発明の傾き角度検出装置
では、物体を撮像して物体画像を生成する手段と、物体
画像における任意の辺に対しウィンドウを設定する手段
と、設定されたウィンドウ内の領域を均等に分割する手
段と、分割された各領域に含まれる物体部分の面積を計
測する手段と、各領域内の物体部分の面積に基づきウィ
ンドウ設定された辺の傾き角度を算出する手段とを具備
させることにした。Means for Solving the Problems In order to achieve the above object, the inclination angle detection device of the present invention includes means for capturing an image of an object to generate an object image, and setting a window for any side of the object image. a means for equally dividing the area within the set window; a means for measuring the area of the object part included in each divided area; and a means for setting the window based on the area of the object part in each divided area. It was decided to provide a means for calculating the inclination angle of each side.
く作用〉
物体の姿勢などを検出するには、物体を撮像して得た物
体画像につき任意の辺に着目してウィンドウ設定を行う
。しかる後、そのウィンドウ内の領域を均等に分割して
各分割領域内の物体部分の面積を計測し、その計測結果
より着目した辺の傾き角度を算出して、物体の姿勢など
を検出することになる。この場合にビデオ信号から画像
の物体部分を構成する画素数を計数して前記の面積を計
測し、ビデオ信号の垂直帰線期間を利用して傾き角度の
算出演算を行えば、ビデオレードで着目した辺の傾き角
度を検出できる。また単一のウィンドウを設定すれば足
るから、操作性に優れ、しかも積分的処理によるから、
ノイズや画像の歪による計測誤差が小さくなり、安定し
た計測が可能である。Effect> To detect the posture of an object, window settings are performed by focusing on an arbitrary side of the object image obtained by capturing the object. After that, the area within the window is divided equally, the area of the object part in each divided area is measured, and the inclination angle of the side of interest is calculated from the measurement results to detect the posture of the object. become. In this case, if you count the number of pixels that make up the object part of the image from the video signal, measure the area, and calculate the tilt angle using the vertical blanking period of the video signal, you can The angle of inclination of the side can be detected. In addition, it is easy to operate because you only need to set up a single window, and because it uses integral processing,
Measurement errors due to noise and image distortion are reduced, allowing stable measurements.
〈実施例〉
第1図は、この発明の一実施例にかかる傾き角度検出装
置の回路構成例を示し、第2図および第3図はこの装置
の原理を示している。<Embodiment> FIG. 1 shows an example of the circuit configuration of a tilt angle detection device according to an embodiment of the present invention, and FIGS. 2 and 3 show the principle of this device.
第2図および第3図は、XY座標系で示される物体画像
1を示すもので、この画像中に多角形状の物体部分2が
含まれている。この物体画像1は、具体的には物体を撮
像して得たビデオ信号を2値化処理して求められた2値
画像であって、前記物体部分2が例えば黒画素、背景部
分2′が白画素により構成される。FIGS. 2 and 3 show an object image 1 expressed in an XY coordinate system, and this image includes a polygonal object portion 2. FIG. Specifically, this object image 1 is a binary image obtained by binarizing a video signal obtained by imaging an object, and the object portion 2 is, for example, a black pixel, and the background portion 2' is a binary image. Consists of white pixels.
第2図では、物体部分2における水平に近い傾きをもつ
辺3に着目しており、この辺3に対し、2個の点P (
X、、Y、)およびQ(χ2゜Yz)を指定することに
より、矩形状のウィンドウ4を設定している。In Fig. 2, we focus on a side 3 of the object part 2 that has an almost horizontal inclination, and two points P (
A rectangular window 4 is set by specifying X,,Y,) and Q(χ2°Yz).
このウィンドウ4内の領域を中央の垂直線6により左右
均等に分割すると、ウィンドウ4のX方向の長さはX、
−X、で与えられるから、矩形状をなす各分割領域a、
bのX方向の長さ!!、、f、は(xz−x、)/2と
なる。If the area within this window 4 is divided equally on the left and right by the central vertical line 6, the length of the window 4 in the X direction is
−X, so each rectangular divided area a,
The length of b in the X direction! ! ,,f becomes (xz-x,)/2.
いま垂直線6を挟んで左右の各分割領域a。Now, each divided area a on the left and right across the vertical line 6.
bに含まれる物体部分2の面積(具体的には黒画素の数
)をS、、S、とじ、各分割領域a。The area (specifically, the number of black pixels) of the object portion 2 included in b is set as S, ,S, and each divided area a is divided into two areas.
bの各中心線7,8と辺3との交点をA、Bとすると、
交点A、B間のX方向およびY方向の各変位ΔX、ΔY
は次式で与えられる。If the intersections of center lines 7 and 8 of b and side 3 are A and B,
Displacements ΔX and ΔY in the X and Y directions between intersections A and B
is given by the following equation.
X、−X。X, -X.
ΔX=□ ・・・・■
また点Aを通る水平線5に対する辺ABがなす角度をθ
′とすると、
であり、また傾き角度θと角度θ′とは、θ=π−θ′
・・・・■
の関係が成立するから、傾き角度θは上記0〜0式より
つぎのように表される。ΔX=□ ...■ Also, the angle formed by side AB with respect to the horizontal line 5 passing through point A is θ
′, then , and the tilt angle θ and angle θ′ are θ=π−θ′
Since the following relationship holds true, the inclination angle θ is expressed as follows from the above equations 0 to 0.
つぎに第3図では、物体部分2における垂直に近い傾き
をもつ辺9に着目しており、この辺9に′対し、2個の
点R(X3 、 Y3 )およびT(x、、y、)を
指定することにより、矩形状のウィンドウ10を設定し
ている。Next, in FIG. 3, we focus on the side 9 of the object part 2 that has an almost vertical inclination, and with respect to this side 9, two points R (X3, Y3) and T (x,,y,) By specifying , a rectangular window 10 is set.
前記ウィンドウ10内の領域を中央の水平線12により
上下均等に分割し、この水平線12を挟んで上下の各分
割領域c、dに含まれる物体部分2の面積(具体的には
黒画素の数)をSc、Sdとし、各分割領域c、dの各
中心線11.13と辺9との交点をC,Dとすると、交
点C,D間のX方向およびX方向の各変位ΔX、ΔYは
、前記と同様、つぎの00式で与えられ、さらに傾き角
度θはつぎの■弐で与えられる。The area within the window 10 is equally divided vertically by the central horizontal line 12, and the area (specifically, the number of black pixels) of the object portion 2 included in each of the upper and lower divided areas c and d with this horizontal line 12 in between is calculated. are Sc and Sd, and the intersections of the center lines 11.13 of each divided area c and d with the side 9 are C and D, then the displacements ΔX and ΔY in the X direction and the X direction between the intersections C and D are , as before, is given by the following equation 00, and the inclination angle θ is given by the following (2).
この実施例の場合、ビデオ信号の各水平走査ライン毎に
、ウィンドウや各分割領域に含まれる物体部分の面積(
黒画素数)を求めると共に、各水平走査ライン毎に有効
垂直走査期間にわたる面積(黒画素数)の累積加算値を
求め、つぎの垂直帰線期間に前記累積加算値に基づき前
記0式または0式の演算を実行して、着目した辺の傾き
角度θを算出している。In this example, for each horizontal scanning line of the video signal, the area (
The number of black pixels) is determined, and the cumulative addition value of the area (number of black pixels) over the effective vertical scanning period is determined for each horizontal scanning line, and the formula 0 or 0 is calculated based on the cumulative addition value during the next vertical retrace period. The calculation of the formula is executed to calculate the inclination angle θ of the side of interest.
第4図は、この実施例におけるビデオ信号VD、のタイ
ムチャートを示す。同図において、上半分の図は、垂直
走査期間にかかるビデオ信号VD、を、下半分の図は水
平走査期間にかかるビデオ信号VD、を、それぞれ示し
ている。FIG. 4 shows a time chart of the video signal VD in this embodiment. In the figure, the upper half of the diagram shows the video signal VD during the vertical scanning period, and the lower half of the diagram shows the video signal VD during the horizontal scanning period.
図中、VDは垂直同期信号、HDは水平同期信号を示し
、1垂直走査期間(16,7ミリ秒)は20H(ただし
LHは1水平走査期間を意味し63.5マイクo秒であ
る)の垂直帰線期間と、残りの有効垂直走査期間とから
構成されている。この有効垂直走査期間には、242本
の水平走査ラインを含み、また各水平走査ラインには、
256個の画素データを含んでいる。In the figure, VD indicates a vertical synchronization signal, HD indicates a horizontal synchronization signal, and one vertical scanning period (16.7 milliseconds) is 20H (however, LH means one horizontal scanning period, which is 63.5 microseconds). , and the remaining valid vertical scanning period. This effective vertical scanning period includes 242 horizontal scanning lines, and each horizontal scanning line includes:
It contains 256 pixel data.
第1図は、上記原理に基づく傾き角度検出装置の具体例
を示している。FIG. 1 shows a specific example of a tilt angle detection device based on the above principle.
第1図において、テレビカメラ20は、物体21を例え
ば上方より撮像して濃淡画像を生成する。この濃淡画像
のビデオ信号VD、は同期分離回路22へ出力され、こ
こで水平同期信号11D。In FIG. 1, a television camera 20 images an object 21 from above, for example, and generates a grayscale image. The video signal VD of this grayscale image is output to the synchronization separation circuit 22, where it is output as a horizontal synchronization signal 11D.
垂直同期信号VD、 クロック信号CKなどが分離され
る。2値化回路23はビデオ信号νD、に対し一定のス
レシュホールドレベルを設定することにより、濃淡画像
を白黒2値化して2値画像を生成する。ウィンドウ制御
回路24は、ウィンドウ設定部40により2個の点P、
QやR,Tが指定されて、ウィンドウ4.10の設定が
行われたとき、このウィンドウ4,10のX方向領域X
、〜X2やX3〜×4に対応してオンするウィンドウ信
号WDを出力し、ゲート回路25゜26を開閉制御する
。Vertical synchronization signal VD, clock signal CK, etc. are separated. The binarization circuit 23 sets a certain threshold level for the video signal νD to binarize the grayscale image into black and white to generate a binary image. The window control circuit 24 uses the window setting unit 40 to set two points P,
When Q, R, and T are specified and window 4.10 is set, the X direction area
, ~X2 and X3 ~ x4, the window signal WD is turned on to control the opening and closing of the gate circuits 25 and 26.
これらゲート回路25.26には2値化回路23より2
値データが与えられ、一方のゲート回路25はウィンド
ウ信号WDがオンのとき、2値データを第1の画素カウ
ンタ27へ与え、他方のゲート回路26はウィンドウ信
号WDおよび後記の分割信号DVがオンのとき、2値デ
ータを第2の画素カウンタ28へ与える。These gate circuits 25 and 26 have two
One gate circuit 25 gives binary data to the first pixel counter 27 when the window signal WD is on, and the other gate circuit 26 gives the binary data to the first pixel counter 27 when the window signal WD and the division signal DV (described later) are on. At this time, binary data is given to the second pixel counter 28.
第1の画素カウンタ27は、ビデオ信号VD。The first pixel counter 27 receives the video signal VD.
の1水平走査ライン毎に、ウィンドウ4,10に含まれ
る物体部分2を構成する画素(この実施例では黒画素)
の数を計数するためのものであり、また第2の画素カウ
ンタ28は、ウィンドウ4内の一方の分割領域すに含ま
れる黒画素の数を計数するためのものであって、各画素
カウンタ27,28による計数値N4.N、2はI10
ポート29を介してマイクロコンピュータにおけるCP
U30に取り込まれる。この場合にCPU30は、ウィ
ンドウ4のY方向領域Y、−Y2やY3〜Y4に対応し
て計数値の取込みを行うことになる。For each horizontal scanning line of
The second pixel counter 28 is used to count the number of black pixels included in one divided area within the window 4, and each pixel counter 27 , 28 count value N4. N, 2 is I10
CP in the microcomputer via port 29
Incorporated into U30. In this case, the CPU 30 will take in the count values corresponding to the Y-direction areas Y, -Y2, and Y3 to Y4 of the window 4.
水平カウンタ31は、2値画像の水平座標アドレス(第
2,3図ではX座標)を与えるためのもの、ラッチ回路
34はウィンドウを左右均等に分割する垂直線6の水平
座標位置(第2図では(X+ +Xz ) / 2 )
をラッチするためのもの、コンパレータ33は前記水平
カウンタ31の計数値とラッチ回路34のラッチデータ
とを比較して両者の一致・不一致を判定するためのもの
であって、フリップフロップ35はコンパレータ33の
一致出力および水平同期信号HDを人力して分割領域す
に対応してオンする分割信号DVを出力する。The horizontal counter 31 is for giving the horizontal coordinate address (X coordinate in Figures 2 and 3) of the binary image, and the latch circuit 34 is for giving the horizontal coordinate position of the vertical line 6 that equally divides the window left and right (see Figure 2). Then (X+ +Xz) / 2)
The comparator 33 is for comparing the counted value of the horizontal counter 31 and the latch data of the latch circuit 34 to determine whether they match or do not match. The matching output and the horizontal synchronizing signal HD are manually input to output a divided signal DV that turns on corresponding to the divided area.
また垂直カウンタ36は、2値画像の垂直座標アドレス
(第2図ではY座標)を与えるためのもので、垂直同期
信号VDの立下がりより20Hに相当する時間経過後よ
り水平同期信号+1Dの計数を開始し、その計数値Y、
はI10ボート29を介して前記CPU30に取り込ま
れる。The vertical counter 36 is for giving the vertical coordinate address (Y coordinate in FIG. 2) of the binary image, and starts counting the horizontal synchronizing signal +1D after a time corresponding to 20H has elapsed since the fall of the vertical synchronizing signal VD. , and its count value Y,
is taken into the CPU 30 via the I10 boat 29.
CPU30は、第2図に示す原理によるときは、CPU
30に対し水平同期信号+10による割込みTNTがあ
る毎に、第5図に示す制御手順を実行して、着目した辺
3の傾き角度θを検出する。またCPU30は、第3図
に示す原理によるときは、同様に水平同期信号HDによ
る割込みINTがある毎に、第6図に示す制御手順を実
行して、着目した辺9の傾き角度θを検出する。When the CPU 30 is based on the principle shown in FIG.
Each time there is an interrupt TNT caused by the horizontal synchronizing signal +10 for 30, the control procedure shown in FIG. 5 is executed to detect the inclination angle θ of the side 3 of interest. Further, when based on the principle shown in FIG. 3, the CPU 30 similarly executes the control procedure shown in FIG. 6 every time there is an interrupt INT caused by the horizontal synchronization signal HD, and detects the inclination angle θ of the side 9 of interest. do.
なお第1図中、FROM37は傾き角度θの検出にかか
る一連のプログラムを格納し、またRAM38は各種デ
ータを格納する他、ワークエリアとして用いられる。ま
た通信制御部39はCPU30の演算結果を上位の制御
機を送信する。In FIG. 1, FROM 37 stores a series of programs related to detecting the tilt angle θ, and RAM 38 stores various data and is also used as a work area. Further, the communication control unit 39 transmits the calculation results of the CPU 30 to a higher-level controller.
つぎに第1図の回路動作を第5図に基づき詳細に説明す
る。Next, the operation of the circuit shown in FIG. 1 will be explained in detail based on FIG. 5.
まずテレビカメラ20により物体21を描像すると、同
期分離回路22で垂直同期信号VD。First, when the object 21 is imaged by the television camera 20, the synchronization separation circuit 22 generates a vertical synchronization signal VD.
水平同期信号11D、クロック信号CKが分離され、さ
らに2値化回路23でビデオ信号VD、の2値化処理が
実行されて、2値画像が生成される。The horizontal synchronization signal 11D and the clock signal CK are separated, and the video signal VD is further binarized in the binarization circuit 23 to generate a binary image.
この2値画像出力は、ゲート回路25.26を介して第
1.第2の各画素カウンタ27,28へ送られ、第1の
画素カウンタ27では、各水平走査ラインにつき、ウィ
ンドウ信号WDによりゲート回路25がオンのとき、ウ
ィンドウ4に含まれる黒画素を計数し、また第2の画素
カウンタ28では、ウィンドウ信号WDおよび分割信号
DVによりゲート回路26がオンのとき、分割領域すに
含まれる黒画素数を計数する。This binary image output is passed through gate circuits 25 and 26 to the first . The first pixel counter 27 counts the black pixels included in the window 4 for each horizontal scanning line when the gate circuit 25 is turned on by the window signal WD. Further, the second pixel counter 28 counts the number of black pixels included in the divided area when the gate circuit 26 is turned on by the window signal WD and the divided signal DV.
そして各水平走査期間毎に、CPU30に対し水平同期
信号HDによる割込みINTが発生すると、まずCPU
30は、第5図のステップ1(図中rsTIJで示す)
において第1の画素カウンタ27の計数値N4を読み取
り、続(ステップ2でその累積加算値Nを演算して、こ
れをRAM3Bに格納する。さらにCPU30はつぎの
ステップ3において第2の画素カウンタ28の計数値N
、2を読み取り、続くステップ4でその累積加算値N2
を演算して、これをRAM38に格納する。Then, when an interrupt INT is generated by the horizontal synchronization signal HD to the CPU 30 in each horizontal scanning period, first the CPU
30 is step 1 in FIG. 5 (indicated by rsTIJ in the figure)
In step 3, the CPU 30 reads the count value N4 of the first pixel counter 27, and in step 2 calculates the cumulative addition value N and stores it in the RAM 3B. Count value N
, 2 is read, and in the subsequent step 4, the cumulative addition value N2 is read.
is calculated and stored in the RAM 38.
つぎにCPU30は、ステップ5で垂直カウンタ36の
計数値Y、を読み取ると、続くステップ6でその値Y、
が242に達したか否か、すなわち最終の水平走査ライ
ンについてのステップl〜5の処理が完了したか否かを
判定し、もしその判定が“NO′”であれば、つぎの割
込みTNTに待機し、以下の水平走査ラインについての
上記の各処理が繰り返し実行される。Next, in step 5, the CPU 30 reads the count value Y of the vertical counter 36, and in the following step 6, the CPU 30 reads the count value Y,
It is determined whether or not has reached 242, that is, whether or not the processing of steps 1 to 5 for the final horizontal scanning line has been completed, and if the determination is "NO'", the next interrupt TNT is executed. The process waits, and the above-described processes for the following horizontal scanning lines are repeatedly executed.
かくして最終の水平走査ラインについの処理が終了する
と、ステンブ6が“YES“となってステップ7へ進み
、CPU30は第1の画素カウンタ27の計数値の累積
加算値N(ウィンドウ4内に含まれる物体部分2の面積
に相当する)より第2の画素カウンタ28の計数値の累
積加算値N2 (分割領域すに含まれる物体部分2の面
積S、に相当する)を差し引くことにより、分割領域a
に含まれる物体部分2の面積8つに相当する値N1を算
出して、これをRAM38に格納する。When the processing for the final horizontal scanning line is thus completed, the step 6 becomes "YES" and the process proceeds to step 7, where the CPU 30 calculates the cumulative addition value N (included in the window 4) of the count value of the first pixel counter 27. By subtracting the cumulative addition value N2 of the count value of the second pixel counter 28 (corresponding to the area S of the object part 2 included in the divided area A) from the divided area a (corresponding to the area of the object part 2),
A value N1 corresponding to eight areas of the object portion 2 included in is calculated and stored in the RAM 38.
つぎにステップ8において、CPU30は各分割領域a
、bの面積S、、S、やウィンドウ設定部40による設
定データを用いて前記■弐の演算を実行することにより
、傾き角度θを算出し、最後にRAM3Bに格納された
データN。Next, in step 8, the CPU 30 controls each divided area a.
, b by using the area S, , S and the setting data from the window setting unit 40 to calculate the inclination angle θ, and finally the data N stored in the RAM 3B.
N、、N2をクリアする(ステップ9)。Clear N, , N2 (step 9).
つぎに第3図に示す原理によるときは、第6回に示す制
御手順を実行することになる。この場合に、各水平走査
期間毎に、CPU30に対し水平同期信号HDによる割
込み[NTが発生すると、まずCPU30は、第6図の
ステップ11において第1の画素カウンタ27の計数値
N。Next, when the principle shown in FIG. 3 is used, the control procedure shown in the sixth time will be executed. In this case, when an interrupt [NT by the horizontal synchronizing signal HD occurs to the CPU 30 in each horizontal scanning period, the CPU 30 first calculates the count value N of the first pixel counter 27 in step 11 of FIG.
を読み取り、続くステップ12で垂直カウンタ36の計
数値Y、を読み取る。In the following step 12, the count value Y of the vertical counter 36 is read.
つぎにCPU30は、ステップ13で垂直カウンタ36
の計数値Y、が分割領域c、dの境界位置(Y 3 +
Y 4 ) / 2に達したか否かを判定しており、
もしその判定が“NOパであれば、ステップ14へ進み
、CPU30は計数値NJの累積演算を実行し、その算
出値を分割領域Cの面積相当値N、としてRAM3 B
の所定エリアに格納する。Next, in step 13, the CPU 30 starts the vertical counter 36.
The count value Y, is the boundary position (Y 3 +
It is determined whether Y 4 ) / 2 has been reached.
If the determination is "NO," the process proceeds to step 14, where the CPU 30 executes the cumulative calculation of the count value NJ, and stores the calculated value as the area equivalent value N of the divided area C in the RAM 3B.
stored in a predetermined area.
もしステップ13の判定が“YES”となれば、分割領
域Cの面積の計測が終了したものと判断してステップ1
5へ進み、CPU30は同様に計数値NJの累積演算を
実行し、その算出値を分割領域dの面積相当値N2とし
てRAM38の他のエリアに格納する。If the determination in step 13 is "YES", it is determined that the measurement of the area of divided region C has been completed, and step 1
5, the CPU 30 similarly performs the cumulative calculation of the count value NJ, and stores the calculated value in another area of the RAM 38 as the area equivalent value N2 of the divided region d.
つぎにステップ16では、CPU30は、垂直カウンタ
36の計数値Y、が242に達したか否か、すなわち最
終の水平走査ラインについてのステップ11〜15の処
理が完了したか否かを判定しており、もしその判定が“
NO°゛であれば、つぎの割込みINTに待機し、以下
の水平走査ラインについての上記の処理が繰り返し実行
される。Next, in step 16, the CPU 30 determines whether the count value Y of the vertical counter 36 has reached 242, that is, whether or not the processing of steps 11 to 15 for the final horizontal scanning line has been completed. If the judgment is “
If NO°, the process waits for the next interrupt INT, and the above-described process is repeatedly executed for the following horizontal scanning lines.
かくして最終の水平走査ラインについての処理が終了す
ると、ステップ16が“YES”となってステップ17
へ進み、CPU30は2個の累積加算値N、(分割領域
Cに含まれる物体部分2の面積Scに相当する)および
NZ (分割領域dに含まれる物体部分2の面積S、
に相当する)とウィンドウ設定部40による設定データ
とを用いて前記0式の演算を実行することにより、1頃
き角度θを算出し、最後にRAM38に格納されたデー
タN、、N2をクリアする(ステップ18)。When the processing for the final horizontal scanning line is thus completed, step 16 becomes "YES" and step 17 is executed.
Then, the CPU 30 calculates two cumulative addition values N, (corresponding to the area Sc of the object portion 2 included in the divided region C) and NZ (the area S, of the object portion 2 included in the divided region d).
) and the setting data from the window setting unit 40 to calculate the angle θ around 1 by executing the calculation of the above equation 0, and finally clear the data N, , N2 stored in the RAM 38. (Step 18).
なお上記実施例は、第1の画素カウンタ27でウィンド
ウ4内に含まれる物体部分2の面積を求め、第2の画素
カウンタ28で分割領域すに含まれる物体部分2の面積
S、を求めて、両者の差から分割領域aに含まれる物体
部分2の面積S、を求めているが、2個の画素カウンタ
を用いて各分割領域a、bに含まれる物体部分2の面積
を直接水めることも可能である。In the above embodiment, the first pixel counter 27 calculates the area of the object part 2 included in the window 4, and the second pixel counter 28 calculates the area S of the object part 2 included in the divided area. , the area S of the object part 2 included in the divided area a is calculated from the difference between the two, but the area of the object part 2 included in each divided area a and b is calculated directly using two pixel counters. It is also possible to
第7図は、その具体例を示しており、フリップフロップ
41,2個のゲート回路42,43゜画素カウンタ44
.ラッチ回路45より成る回路群51をもって分割領域
すに含まれる物体部分2の面積S、を求め、またフリッ
プフロップ 446.2個のゲート回路47.48.画
素カウンタ49.ラッチ回路50より成る回路群51を
もって分割領域aに含まれる物体部分2の面積S、を求
めている。FIG. 7 shows a specific example of this, in which a flip-flop 41, two gate circuits 42, a 43° pixel counter 44
.. The area S of the object portion 2 included in the divided area is determined using the circuit group 51 consisting of the latch circuit 45, and the area S of the object portion 2 included in the divided area is calculated, and the gate circuits 47, 48, 446. Pixel counter 49. The area S of the object portion 2 included in the divided area a is determined using a circuit group 51 consisting of a latch circuit 50.
〈発明の効果〉
この発明は上記の如く、物体画像の任意の辺に対してウ
ィンドウ設定を行い、そのウィンドウ内の領域を均等に
分割して各分割領域内の物体部分の面積を計測し、その
計測結果より着目した辺の傾き角度を算出するよう構成
したから、ビデオ信号から物体部分の画像構成数を計数
して面積の計測を行い、ビデオ信号の垂直帰線期間を利
用して傾き角度を算出することが可能であり、ビテオレ
ートで任意の辺の傾き角度を検出できる。また単一のウ
ィンドウを設定すれば足るから、操作性に優れ、しかも
積分的処理によるから、ノイズや画像の歪による計測誤
差が小さなり、安定した計測が可能であるなど2発明目
的を達成した顕著な効果を奏する。<Effects of the Invention> As described above, the present invention sets a window for any side of an object image, divides the area within the window equally, measures the area of the object part in each divided area, Since the configuration is configured to calculate the inclination angle of the side of interest from the measurement results, the area is measured by counting the number of image components of the object part from the video signal, and the inclination angle is calculated using the vertical retrace period of the video signal. It is possible to calculate the angle of inclination of any side using video rate. In addition, since it is sufficient to set a single window, it has excellent operability, and since it uses integral processing, measurement errors due to noise and image distortion are small, and stable measurement is possible, achieving the two objectives of the invention. It has a remarkable effect.
第1図はこの発明の一実施例にかかる傾き角度検出装置
の回路ブロック図、第2図および第3図はこの発明の原
理を示す説明図、第4図はビデオ信号のタイムチャート
、第5図および第6図はCPUの割込み制御の手順を示
すフローチャート、第7図は他の実施例を示す回路ブロ
ック図である。
4.10・・・・ウィンドウ
20・・・・テレビカメラ
24・・・・ウィンドウ制御回路
25、26・・・・ゲート回路
27、28・・・・画素カウンタ
30・・・・CP U 31・・・・水平カ
ウンタ33・・・・コンパレータ 34・・・・ ラ
ンチ回路36011.垂直カウンタ
40・・・・ウィンドウ設定部FIG. 1 is a circuit block diagram of a tilt angle detection device according to an embodiment of the present invention, FIGS. 2 and 3 are explanatory diagrams showing the principle of the invention, FIG. 4 is a time chart of a video signal, and FIG. 6 and 6 are flowcharts showing the procedure of CPU interrupt control, and FIG. 7 is a circuit block diagram showing another embodiment. 4.10... Window 20... Television camera 24... Window control circuit 25, 26... Gate circuit 27, 28... Pixel counter 30... CPU 31. ... Horizontal counter 33 ... Comparator 34 ... Launch circuit 36011. Vertical counter 40...Window setting section
Claims (1)
の傾き角度検出装置であって、 物体を撮像して物体画像を生成する手段と、物体画像に
おける任意の辺に対しウィンドウを設定する手段と、 設定されたウィンドウ内の領域を均等に分割する手段と
、 分割された各領域に含まれる物体部分の面積を計測する
手段と、 各領域内の物体部分の面積に基づきウィンドウ設定され
た辺の傾き角度を算出する手段とを具備して成る傾き角
度検出装置。[Claims] An inclination angle detection device for detecting the inclination angle of an arbitrary side of an object image, comprising means for capturing an image of an object to generate an object image; A means for setting a window, a means for equally dividing an area within the set window, a means for measuring the area of an object part included in each divided area, and a means for measuring the area of an object part within each area. A tilt angle detection device comprising means for calculating a tilt angle of a side on which a window is set.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63130592A JP2638073B2 (en) | 1988-05-27 | 1988-05-27 | Tilt angle detector |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP63130592A JP2638073B2 (en) | 1988-05-27 | 1988-05-27 | Tilt angle detector |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH01298479A true JPH01298479A (en) | 1989-12-01 |
JP2638073B2 JP2638073B2 (en) | 1997-08-06 |
Family
ID=15037891
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP63130592A Expired - Fee Related JP2638073B2 (en) | 1988-05-27 | 1988-05-27 | Tilt angle detector |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2638073B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011085402A (en) * | 2009-10-13 | 2011-04-28 | Mitsutoyo Corp | Surface property measuring instrument |
US8650939B2 (en) | 2009-10-13 | 2014-02-18 | Mitutoyo Corporation | Surface texture measuring machine and a surface texture measuring method |
-
1988
- 1988-05-27 JP JP63130592A patent/JP2638073B2/en not_active Expired - Fee Related
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011085402A (en) * | 2009-10-13 | 2011-04-28 | Mitsutoyo Corp | Surface property measuring instrument |
US8650939B2 (en) | 2009-10-13 | 2014-02-18 | Mitutoyo Corporation | Surface texture measuring machine and a surface texture measuring method |
Also Published As
Publication number | Publication date |
---|---|
JP2638073B2 (en) | 1997-08-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH01298479A (en) | Inclination angle detector | |
JP3716466B2 (en) | Image processing device | |
JP2638074B2 (en) | Intersection position detection device | |
JP3507087B2 (en) | Imaging device | |
JPH09218952A (en) | Machined surface inspection device | |
JPH0587782B2 (en) | ||
JPH03195922A (en) | Detecting apparatus for degree of congestion | |
US11659270B2 (en) | Image processing device for detecting horizontal direction of photographing angle | |
JPH0237481A (en) | Subject color discriminator | |
JPH02246590A (en) | Convergence measurement method | |
JP2023101580A (en) | Image processing device | |
JPH02280471A (en) | Panning detection circuit | |
CN115100284A (en) | A kind of binocular feature matching displacement measurement method and device | |
KR100190702B1 (en) | Method for detecting bezel of monitor | |
JPS62169020A (en) | Volume measurement system of rectangular parallelepiped by image input | |
JPS60263274A (en) | Two-dimensional vision recognizing device | |
JPS6312310B2 (en) | ||
JPS6121579A (en) | Two-dimensional visual recognizer | |
JPS6365347A (en) | Singular point detecting method by image processing | |
JPS62168278A (en) | Picture processor | |
JPH04216179A (en) | Picture processor | |
JPH0546759A (en) | Image processor | |
JPH05342342A (en) | Boundary line detector | |
JPH05135176A (en) | Image processor with interrupting function | |
JP2006109315A (en) | Image analyzing apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |