JPH0614311B2 - Coordinate correction method - Google Patents
Coordinate correction methodInfo
- Publication number
- JPH0614311B2 JPH0614311B2 JP57195974A JP19597482A JPH0614311B2 JP H0614311 B2 JPH0614311 B2 JP H0614311B2 JP 57195974 A JP57195974 A JP 57195974A JP 19597482 A JP19597482 A JP 19597482A JP H0614311 B2 JPH0614311 B2 JP H0614311B2
- Authority
- JP
- Japan
- Prior art keywords
- grid
- coordinate
- coordinates
- input
- cursor
- 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 Input (AREA)
- Image Processing (AREA)
Description
【発明の詳細な説明】 〔発明の利用分野〕 本発明のカーソル等を用いて入力された指定位置を本来
の図面の基準位置となるように補正する座標補正方法に
係り、特に印刷された格子位置の上に存在する図面の基
準位置を正確に求める場合に好適な座標補正方法に関す
る。Description: BACKGROUND OF THE INVENTION Field of Application of the Invention The present invention relates to a coordinate correction method for correcting a designated position input by using a cursor or the like so as to become a reference position of an original drawing, and particularly a printed grid. The present invention relates to a coordinate correction method suitable for accurately obtaining a reference position of a drawing existing above a position.
〔従来技術〕 従来、図面の認識装置等では、図面の基準位置を計算機
へ入力するのに、カーソル等の座標入力装置を用いて、
人間の手によって入力したい基準位置の近くへ移行さ
せ、その位置の座標を入力することが考えられる(以
下、カーソル等の座標入力手段を用いて入力した、基準
位置とすべき座標のことを「指定位置」の座標とい
う)。ところが、カーソルの取付精度の不足又はカーソ
ルの拡大倍率が不足している場合は、人間の意図した図
面の基準位置にカーソルの中心である指定位置が必ずし
も合致しないという問題があった。[Prior Art] Conventionally, in a drawing recognition device or the like, a coordinate input device such as a cursor is used to input a reference position of the drawing into a computer,
It is conceivable that the coordinate of the position is input by moving the position near the reference position to be input by a human hand (hereinafter, the coordinate to be used as the reference position is input using a coordinate input means such as a cursor. The coordinates of "specified position"). However, if the cursor attachment accuracy is insufficient or the cursor magnification is insufficient, there is a problem that the designated position, which is the center of the cursor, does not always match the reference position of the drawing intended by a human.
本発明は上記事情に鑑みてなされたものであり、その目
的はカーソル等を用いて人間の手で入力した指定位置の
座標を、図面上に印刷された格子の交点上の正確な位置
(格子位置)の座標へ補正することにある。The present invention has been made in view of the above circumstances, and an object of the present invention is to accurately convert the coordinates of a specified position input by a human hand using a cursor or the like to an accurate position on the intersection of the grid printed on the drawing (grid). It is to correct to the coordinates of (position).
多くの図面(特に設計図)は図面上に印刷された格子を
単位として図形が描かれており、図面の基準位置もその
格子位置上にある。しかしカーソル等で入力される指定
位置は、基準位置である格子位置を意識したものである
にもかかわらず誤差を含んでいる。Many drawings (particularly design drawings) have graphics drawn on the basis of a grid printed on the drawing, and the reference position of the drawing is also on the grid position. However, the designated position input with the cursor or the like includes an error although the lattice position, which is the reference position, is taken into consideration.
本発明は、図面読取り手段を用いて予め格子が記載され
た図面を読取り、座標入力手段を用いて基準位置とすべ
き座標を入力し、処理手段を用いて、上記座標入力手段
にて入力した指定位置の座標を、上記基準位置の座標と
して上記読み取った図面の格子位置の座標の1つに補正
する座標補正方法であって、上記処理手段を用いて、上
記読取った図面の格子画像の周辺分布を求め、上記周辺
分布から格子位置の座標を推定し、上記推定した格子位
置の座標の中で、上記指定位置の座標に最も距離の近い
格子位置の座標を求め、上記指定位置の座標を、上記基
準位置の座標として上記求めた最も距離の近い格子位置
の座標に補正することを特徴とする。According to the present invention, a drawing in which a grid is written is read in advance by using the drawing reading means, coordinates to be used as a reference position are input by using the coordinate input means, and the coordinates are input by the coordinate input means by using the processing means. A coordinate correction method for correcting the coordinates of a specified position to one of the coordinates of the grid position of the read drawing as the coordinates of the reference position, wherein the processing means is used to surround the grid image of the read drawing. Obtain the distribution, estimate the coordinates of the grid position from the peripheral distribution, find the coordinates of the grid position closest to the coordinates of the specified position among the coordinates of the estimated grid position, and calculate the coordinates of the specified position. The coordinate of the reference position is corrected to the coordinate of the lattice position closest to the obtained distance.
第1図は本発明による座標補正方法を実施する認識装置
の一実施例を示すもので、ドラム型の線図形認識装置の
例である。第1図において、認識の対象となる図面1は
ドラムに密着して巻きつけられており、ドラム2はY方
向モータ3より矢印の方向へ回転される。この回転によ
るドラム2の位置の変化は、Y方向エンコーダ4によっ
て検出され、そのパルス信号はY方向アップダウンカウ
ンタ5に送られる。画像入力ヘッド6は第2図のように
レンズ7、照明用ランプ8、光センサ9、ボールナット
10より構成され、第1図のX方向モータ11に直結さ
れたボールネジ13によって左右に移動する。カーソル
12は図面上の任意の位置を指定するために画像入力ヘ
ッド6に固定され連動する。また画像入力ヘッド6は、
X方向位置の変化を検知するために、リニアスケール1
4を備え、画像入力ヘッド6に直結したヘッド部分15
から位置パルスがY方向アップダウンカウンタ16に送
られる。第1図におけるX方向モータ11およびY方向
モータ3は、制御回路17によって制御されるX方向モ
ータ駆動回路18およびY方向モータ駆動回路19によ
って駆動される。制御回路17の制御命令および状態
は、コマンドステータスレジスタ20によって反映され
る。コマンドステータスレジスタ20、Y方向アップダ
ウンカウンタ5、およびX方向アップダウンカウンタ1
6は、セレクタ22によって選択され、データバス23
に接続される。マイクロプロセッサ24は、データバス
23を介してプログラムメモリ25、データメモリ2
6、セレクタ22、補正データメモリ27、画像メモリ
28をアクセス可能とする。マイクロプロセッサ24
は、プログラムメモリ25に記憶されている命令を解読
して実行する。一方モータ制御キーボード21は、オペ
レータによってカーソル12をドラム2上の任意の位置
に移動させるような制御を与えるため、制御回路17に
接続され、X方向モータ駆動回路18およびY方向モー
タ駆動回路19をオフライン的に制御する。そして同時
に、そのときのカーソルによる指定位置を、X方向アッ
プダウンカウンタ16の値および、Y方向アップダウン
カウンタ5の値から読み出し、その値を補正データ記憶
メモリ27に転送するためのコマンドをコマンドステー
タスレジスタ20に与える。FIG. 1 shows an embodiment of a recognition apparatus for carrying out the coordinate correction method according to the present invention, which is an example of a drum type line figure recognition apparatus. In FIG. 1, a drawing 1 to be recognized is closely wound around a drum, and a drum 2 is rotated by a Y-direction motor 3 in a direction of an arrow. The change in the position of the drum 2 due to this rotation is detected by the Y-direction encoder 4, and its pulse signal is sent to the Y-direction up / down counter 5. The image input head 6 is composed of a lens 7, an illumination lamp 8, an optical sensor 9 and a ball nut 10 as shown in FIG. 2, and is moved left and right by a ball screw 13 directly connected to an X-direction motor 11 in FIG. The cursor 12 is fixed and interlocked with the image input head 6 for designating an arbitrary position on the drawing. The image input head 6 is
Linear scale 1 is used to detect changes in the X-direction position.
Head part 15 which is directly connected to the image input head 6
A position pulse is sent to the Y direction up / down counter 16 from. The X-direction motor 11 and the Y-direction motor 3 in FIG. 1 are driven by an X-direction motor drive circuit 18 and a Y-direction motor drive circuit 19 controlled by the control circuit 17. The control command and state of the control circuit 17 are reflected by the command status register 20. Command status register 20, Y-direction up / down counter 5, and X-direction up / down counter 1
6 is selected by the selector 22, and the data bus 23
Connected to. The microprocessor 24 includes a program memory 25 and a data memory 2 via the data bus 23.
6, the selector 22, the correction data memory 27, and the image memory 28 are made accessible. Microprocessor 24
Decodes and executes the instruction stored in the program memory 25. On the other hand, the motor control keyboard 21 is connected to the control circuit 17 in order to give the control for moving the cursor 12 to an arbitrary position on the drum 2 by the operator, and connects the X-direction motor drive circuit 18 and the Y-direction motor drive circuit 19 to each other. Control offline. At the same time, the position designated by the cursor at that time is read from the value of the X-direction up / down counter 16 and the value of the Y-direction up / down counter 5, and a command for transferring the value to the correction data storage memory 27 is command status. It is given to the register 20.
さて人間の手で図面1をドラム2に装着して図面の認識
を行なう場合には、図面の傾き・図面の読取範囲等を設
定する必要がある。たとえば第3図に示すように、ドラ
ム2の入力可能領域D1,D2,D3,D4とし、図面1をP1,
P2,P3,P4、図面の入力範囲をO1,O2,O3,O4(第3図
には図示せず)とすると、図面1はドラム基準D2,D3に
対しθの傾斜を持っている。そこで傾斜角の補正データ
と図面の読取範囲を設定するために図面の基準位置とな
るべきO1,O2,O3,O4を指定位置として入力する。ただ
し、O4の入力は必ずしも必要としない。この3つの基準
位置とすべき指定位置の座標入力のためには、カーソル
12の中心をキーボード21を用いて図面の基準位置上
に移動させ、その座標値をカーソルの指定位置としてX
方向リニアスケール14とY方向エンコーダ4から読み
取る。ところがカーソルの機械的な取付精度が不足して
いたり、カーソルの倍率が低く人間の目による解像度が
リニアスケールやエンコーダのサンプルピッチ相当まで
取れない場合には、カーソルの中心の指定位置と実際に
入力したい図面の基準位置とのずれが生じる。そこでカ
ーソルにより指定された指定位置を中心に、横DX、縦
DYの大きさの格子画像を画像入力ヘッド6により画像
メモリ28へ入力し、マイクロプロセッサ24によりず
れを補正する処理を行なう。すなわちカーソルとキーボ
ード操作により指定された3つの指定位置を中心とした
領域(O1に関して領域S11,S12,S13,S14、O2に関
してS21,S22,S23,S24、O3に関してS31,S32,
S33,S34)の格子画像の周辺分布から格子位置を推定
し、カーソルにより入力された指定位置の座標を格子位
置の座標へ補正する処理をそれぞれ行う。第4図はカー
ソルで入力された指定位置の座標P(X,Y)を中心と
した領域の1つの格子画像を拡大したもので、横DX,
縦DYの範囲にわたって、+印を印刷された格子の画像
部分として示したものである。第4図において格子上の
本来入力すべき図面の基準位置Oの座標(OX,OY)
とカーソルで入力した指定位置Pの座標(X,Y)との
間には、OFFX,OFFYの位置ずれが存在する。こ
こで格子間隔をGとすると、 の場合には、カーソルで入力された指定位置Pの座標
(X,Y)を本来入力すべき図面の基準位置Oの座標
(OX,OY)へ移行する処理を行なう。本来入力すべ
き基準位置Oの座標(OX,OY)は第1図における座
像入力ヘッド6から入力され画像メモリ28に格納され
ている格子画像を用いて、マイクロプロセッサ24によ
り、第5図に示すような一連の処理を行うことにより求
める。最初に第5図のSTEP1にて格子画像VXY
(I,J)(I=1〜DX,J=1〜DY;DX,DY
は第4図における画像のサイズ)からx方向の周辺分布
CX(I)と、y方向の周辺分布CY(J)とを求め
る。画像データVXY(I,J)は0の場合を背景、0
以外の場合格子であるように第1図の画像入力ヘッド6
から画像メモリ28に格納されているとすると、第6図
に示すように各I,Jの位置において、VXY(I,
J)は0以外のとき各周辺分布のカウントを1だけ増加
させる。When the drawing 1 is attached to the drum 2 by a human hand to recognize the drawing, it is necessary to set the inclination of the drawing, the reading range of the drawing, and the like. For example, as shown in FIG. 3, inputtable areas D 1 , D 2 , D 3 and D 4 of the drum 2 are set, and drawing 1 is set to P 1 ,
P 2, P 3, P 4, when the input range of figures O 1, O 2, O 3 , O 4 and (in FIG. 3 not shown), with respect to the drawings 1 is the drum reference D 2, D 3 It has a slope of θ. So entering the O 1, O 2, O 3 , O 4 to be the reference position of the drawing in order to set the reading range of the correction data and drawings of the inclination angle as the designated position. However, the input of O 4 is not always necessary. In order to input the coordinates of the designated positions to be the three reference positions, the center of the cursor 12 is moved to the reference position of the drawing by using the keyboard 21, and the coordinate values are designated as the designated positions of the cursor X.
It is read from the directional linear scale 14 and the Y-direction encoder 4. However, if the mechanical attachment accuracy of the cursor is insufficient, or the resolution of the cursor is low and the resolution by the human eye cannot reach the linear scale or the sample pitch of the encoder, enter the designated position of the center of the cursor and actually input it. A deviation from the reference position of the desired drawing occurs. Then, a lattice image having a size of horizontal DX and vertical DY is input to the image memory 28 by the image input head 6 centered on the designated position designated by the cursor, and the microprocessor 24 performs a process of correcting the shift. That S 21, S 22, S 23 with respect to those regions S 11, S 12, S 13 , S 14, O 2 with respect to regions (O 1 around the three specified positions specified by the cursor and keyboard operation, S 24, With respect to O 3 , S 31 , S 32 ,
In steps S 33 and S 34 , the grid position is estimated from the peripheral distribution of the grid image, and the coordinates of the designated position input by the cursor are corrected to the coordinates of the grid position. FIG. 4 is an enlarged view of one lattice image of the area centered on the coordinate P (X, Y) of the designated position input by the cursor.
The + mark is shown as the image portion of the printed grid over the range of the vertical DY. In FIG. 4, the coordinates (OX, OY) of the reference position O of the drawing to be originally input on the grid
There is a positional deviation of OFFX and OFFY between the and the coordinates (X, Y) of the designated position P input by the cursor. Here, if the lattice spacing is G, In the case, the process of shifting the coordinates (X, Y) of the designated position P input by the cursor to the coordinates (OX, OY) of the reference position O of the drawing to be originally input is performed. The coordinates (OX, OY) of the reference position O to be originally input are shown in FIG. 5 by the microprocessor 24 using the lattice image input from the seat image input head 6 in FIG. 1 and stored in the image memory 28. It is obtained by performing a series of processing as described above. First, in STEP 1 of FIG. 5, the lattice image VXY
(I, J) (I = 1 to DX, J = 1 to DY; DX, DY
Calculates the peripheral distribution CX (I) in the x direction and the peripheral distribution CY (J) in the y direction from the image size in FIG. The image data VXY (I, J) is 0 when the background, 0
In other cases, the image input head 6 of FIG.
From the image memory 28, the VXY (I,
J) increments the count of each marginal distribution by 1 when it is other than 0.
すなわち、 CX(I)=CX(I)+1, CY(J)=CY(J)+1 とする。以上の流れに従がって第4図のような格子画像
の周辺分布を計算するとx方向の周辺分布は第4図の画
像上側に、y方向の周辺分布は第4図の画像右側のよう
になる。このような周辺分布を計算する方式で問題とな
るのは、周辺分布をx軸又はy軸と平行に求めるため、
画像の傾斜が一定以上を超えると、その周辺分布が正確
に求まらなくなる。すなわち第7図において傾きθを持
ち、格子間隔G、大きさDX,DYの格子画像におい
て、θの大きさが、 となると、周辺分布は平坦になり、格子位置を推定する
だけの有益な分布の差がみられなくなる。たちえばDX
=50,G=10と考えると となる。ところが第1図におけるドラム2にA4版の図
面1を11°傾斜させて装着すると、傾斜による位置ず
れ量dは、A4版長手方向で57mm程度となり、実際そ
れだけ傾斜させて図面を装着することはない。通常人間
の手で図面の傾きがないように意識して装着すれば、2
°以下となることが実験的にわかっている。したがって
格子画像の周辺分布から格子位置を推定することが可能
である。That is, CX (I) = CX (I) +1 and CY (J) = CY (J) +1. When the marginal distribution of the lattice image as shown in FIG. 4 is calculated according to the above flow, the marginal distribution in the x direction is on the upper side of the image in FIG. 4, and the marginal distribution in the y direction is on the right side of the image in FIG. become. The problem with the method of calculating the marginal distribution is that the marginal distribution is obtained in parallel with the x-axis or the y-axis.
If the inclination of the image exceeds a certain level, the peripheral distribution cannot be accurately obtained. That is, in the grid image having the tilt θ in FIG. 7 and the grid spacing G and the sizes DX and DY, the size of θ is Then, the marginal distribution becomes flat, and there is no useful distribution difference enough to estimate the grid position. Tachibana DX
= 50, G = 10 Becomes However, if the drawing 1 of the A4 plate is mounted on the drum 2 in FIG. 1 with an inclination of 11 °, the positional deviation amount d due to the tilt becomes about 57 mm in the longitudinal direction of the A4 plate. Absent. If you wear it with normal human hands so that there is no inclination in the drawing, 2
It is experimentally known that the temperature will be below °. Therefore, it is possible to estimate the grid position from the peripheral distribution of the grid image.
次に、第5図のSTEP2にて、得られた周辺分布CX
(I),CY(J)の和をそれぞれ独立に求め、平均値
THX,THYを求める。そして、第5図のSTEP3
およびSTEP4にて、各CX(I),CY(J)の平
均値以下の値をとる要素を0にする。第8図(a)を第
4図におけるx方向の周辺分布とすると、この処理によ
って第8図(b)のように、THX以下の成分は0とな
る。これによって格子位置は、0以外の連続する各要素
の中に存在すると考えられる。そこで、第5図のSTE
P5にて、第8図(b)のように、周辺分布の値が0か
ら0以外の値になる位置をSX(I),周辺分布の値が
0以外の値から0になる位置EX(I)を求め、その各
区間 〔SX(I),EX(I)〕 内での周辺分布の最大値をとる位置を求め、これを格子
位置の推定値とする。ただし最大値が同一の値をとる場
合は、その最大値をとる位置の中間位置を格子位置の推
定値とする。第8図(c)は、このようにして求めた最
大値をとる位置または中間位置である、格子位置の推定
値MX(I)を示す。y方向の格子位置の推定値MY
(I)も同様の処理によって得る(第5図のSTEP
6)。Next, in STEP 2 of FIG. 5, the obtained marginal distribution CX is obtained.
The sums of (I) and CY (J) are independently obtained to obtain average values THX and THY. Then, STEP 3 of FIG.
In STEP 4 and STEP 4, elements having a value less than or equal to the average value of CX (I) and CY (J) are set to 0. Assuming that FIG. 8 (a) is the peripheral distribution in the x direction in FIG. 4, this process results in zero components below THX as shown in FIG. 8 (b). Therefore, the grid position is considered to exist in each continuous element other than 0. Therefore, the STE of FIG.
At P5, as shown in FIG. 8 (b), the position where the value of the peripheral distribution becomes a value other than 0 to a value other than 0 is SX (I), and the position EX (where the value of the peripheral distribution becomes a value other than 0 becomes 0 ( I) is obtained, the position having the maximum value of the peripheral distribution in each section [SX (I), EX (I)] is obtained, and this is used as the estimated value of the lattice position. However, when the maximum values have the same value, the intermediate position of the position having the maximum value is the estimated value of the grid position. FIG. 8 (c) shows the estimated value MX (I) of the lattice position, which is the position or intermediate position having the maximum value thus obtained. Estimated value MY of the grid position in the y direction
(I) is also obtained by the same processing (STEP in FIG. 5).
6).
格子間隔のGを得るためには、まず隣接する格子位置の
推定値の間隔を計算し、その値に対応した頻度分布を求
める。すなわち、第5図のSTEP7にて、|MX
(I)−MX(I+1)|からMX(I)の頻度分布C
MX(I)を、第5図のSTEP8にて、|MY(J)
−MY(J+1)|からMY(J)の頻度分布CMY
(J)を求める。通常の図面では、x方向及びy方向の
格子間隔は同一であるので、頻度分布CMX(I)とC
MY(J)の値の中で最も高いものを格子間隔Gとする
(第5図のSTEP9)。In order to obtain the lattice spacing G, the spacing between the estimated values of adjacent lattice positions is first calculated, and the frequency distribution corresponding to that value is obtained. That is, in STEP 7 of FIG. 5, | MX
Frequency distribution C of (I) -MX (I + 1) | to MX (I)
MX (I) is set to MY (J) in STEP 8 of FIG.
Frequency distribution CMY from -MY (J + 1) | to MY (J)
Find (J). In a normal drawing, since the lattice spacings in the x direction and the y direction are the same, the frequency distributions CMX (I) and C
The highest value among the values of MY (J) is set as the lattice spacing G (STEP 9 in FIG. 5).
つぎに図面の入力範囲(第4図ではO1,O2,O3)中の格
子位置の推定値MX(I)、MY(I)から、同一の格
子間隔Gをもった格子位置XX(I),XY(J)を求
めるための基点となるべき算出基点位置MMX,MMY
を求める。本実施例における算出基点位置MMX,MM
Yは、本来第4図の本来入力すべき基準位置Oの座標
(OX,OY)で示されるように図面上の格子の中で他
の格子に比べ太く印刷された格子の交点であり、まずこ
の位置を求めるものとする。つまり、第4図の図面の入
力範囲O1,O2,O3において、先に求めた格子位置の推定
値MX(I),MY(I)の中で周辺分布cx(I),
CY(J)の値が最も大きく(例えば、第8図(C)で
はMX(3)の周辺分布の値が最も高い)、かつ2つの
隣接する格子位置の推定値との間隔が両方ともGとなる
位置の条件を満足するものがあればこれを算出基点位置
MMX(第5図のSTEP10),MMY(第5図のS
TEP11)とする。さらに、このような条件を満たす
位置がない場合は、x方向については第5図のSTEP
12にて、y方向については第5図のSTEP14に
て、2つの隣接する格子位置の推定値との間隔が両方と
もGとなる位置を求め、その位置をそれぞれ算出基点位
置MMX,またはMMYに修正する。さらに上記条件の
いずれも満足する位置がない場合は、第5図では図示し
ていないが、周辺分布CX(I),CY(J)の値が最
も大きい格子位置の推定値MX(I),MY(I)を求
め、その位置を算出基点位置MMX,またはMMYに修
正してもよい。Next, from the estimated values MX (I) and MY (I) of the grid positions in the input range (O 1 , O 2 , O 3 in FIG. 4) of the drawing, the grid positions XX (having the same grid spacing G I), XY (J) calculated base point positions MMX, MMY which should be base points
Ask for. Calculation base point positions MMX, MM in the present embodiment
Y is the intersection of the grids printed thicker than the other grids in the grid as shown by the coordinates (OX, OY) of the reference position O to be originally input in FIG. This position shall be determined. That is, in the input ranges O 1 , O 2 , O 3 in the drawing of FIG. 4, the marginal distribution cx (I), among the estimated values MX (I), MY (I) of the lattice positions previously obtained,
The value of CY (J) is the largest (for example, the value of the marginal distribution of MX (3) is the highest in FIG. 8 (C)), and the interval between the estimated values of two adjacent grid positions is G. If there is one that satisfies the condition of the position, the base point position MMX (STEP 10 in FIG. 5), MMY (S in FIG. 5) is calculated.
TEP11). Furthermore, if there is no position satisfying such a condition, STEP in FIG.
12, in the y direction, in STEP 14 of FIG. 5, a position at which the interval between the estimated values of two adjacent grid positions is both G is obtained, and the position is calculated as the base point position MMX or MMY, respectively. Fix it. Further, when there is no position satisfying any of the above conditions, although not shown in FIG. 5, the estimated value MX (I) of the grid position having the largest values of the peripheral distributions CX (I) and CY (J), MY (I) may be obtained and the position may be corrected to the calculated base point position MMX or MMY.
以下算出基点位置MMX,MMYのうち、x方向のMM
Xを求める第5図のSTEP10およびSTEP12に
おける具体的な処理の流れを第9図に示す。最初に周辺
分布の値が最大となる位置MMXをMMX0に記憶させ
る(第9図のSTEP1)。MMXに隣接するMX
(I)とMMXとの間隔を求め、その値がGと合致する
かどうかを調べる(第9図のSTEP2)。もし両側と
もにGに合致するならば、そのときのMMXを算出基点
位置とする。この条件を満足しない場合は、一旦MMX
を右側に隣接するMX(I)(第9図のSTEP3)に
移し同様に両側ともにGに合致するかどうかを調べる
(第9図のSTEP4)。合致しない場合は、境界に達
するまでMMXを右側の(I)に移動させる。境界に達
した場合は、MMXを一旦MMX0にもどし(第9図の
STEP5)、今度は左側に隣接するMX(I)にMM
Xを移動させ同様の処理を行う(第9図のSTEP6〜
STEP8)。このように、左側の境界に達した場合
は、MMXをMMX0(第9図のSTEP9)にもど
す。y方向のMMYの計算方法もMMXと同様に行う
(第5図のSTEP11およびSTEP14)。Of the calculated base point positions MMX and MMY, MM in the x direction will be described below.
FIG. 9 shows a specific processing flow in STEP 10 and STEP 12 of FIG. 5 for obtaining X. First, the position MMX where the value of the marginal distribution is maximum is stored in MMX0 (STEP1 in FIG. 9). MX adjacent to MMX
The interval between (I) and MMX is obtained, and it is checked whether the value matches G (STEP 2 in FIG. 9). If both sides match G, MMX at that time is set as the calculation base point position. If this condition is not satisfied, once MMX
Is moved to the adjacent MX (I) on the right side (STEP 3 in FIG. 9), and it is similarly checked whether or not both sides match G (STEP 4 in FIG. 9). If they do not match, the MMX is moved to (I) on the right side until the boundary is reached. When the boundary is reached, the MMX is once returned to MMX0 (STEP 5 in FIG. 9), and this time the MM is moved to the adjacent MX (I) on the left side.
X is moved and the same processing is performed (STEP 6 to FIG. 9).
STEP8). In this way, when the left boundary is reached, MMX is returned to MMX0 (STEP 9 in FIG. 9). The calculation method of MMY in the y direction is performed in the same manner as MMX (STEP 11 and STEP 14 in FIG. 5).
上記処理によって得られた算出基点位置MMX,MMY
の位置を中心にして、x方向については第5図のSTE
P13、y方向については第5図のSTEP15の処理
を行なう。つまり、x方向について第5図のSTEP1
0およびSTEP12(第9図参照)にて得られた算出
基点位置MMX、y方向について第5図のSTEP11
およびSTEP14にて得られた算出基点位置MMYを
中心に、境界に達するまで一定の格子間隔Gを持った格
子位置XX(I)とYY(J)とを求める。Calculated base point positions MMX and MMY obtained by the above processing
Centered on the position of, the STE of FIG.
For P13 and the y direction, the processing of STEP15 in FIG. 5 is performed. That is, STEP 1 in FIG. 5 in the x direction
0 and STEP 12 (see FIG. 9), the calculated reference point position MMX, STEP 11 in FIG.
Then, the grid positions XX (I) and YY (J) having a constant grid interval G until reaching the boundary are obtained with the calculated base point position MMY obtained in STEP 14 as the center.
さて、第5図のSTEP16では、カーソルで入力され
た指定位置Pの座標(X,Y)をそれぞれXX(I),
YY(J)の座標と比較し、その差がG/2以下となる
XX(I),YY(J)を選択して、最も距離の近い格
子位置の座標を求める。本実施例の場合、カーソルの中
心を図面上の基準位置Oの座標(OX,OY)となるよ
うに人間の手で移動させており、求めた最も近い格子位
置は、算出基点位置MMX,MMYと一致することが期
待できる。Now, in STEP 16 of FIG. 5, the coordinates (X, Y) of the designated position P input by the cursor are respectively changed to XX (I),
The coordinates of YY (J) are compared, XX (I) and YY (J) whose difference is G / 2 or less are selected, and the coordinates of the closest grid position are obtained. In the case of the present embodiment, the center of the cursor is moved by the human hand so as to be the coordinates (OX, OY) of the reference position O on the drawing, and the closest calculated grid point positions are calculated base point positions MMX, MMY. Can be expected to match.
さて第1図の構成において、格子を意識して書かれた図
面を認識する場合を考える。最初にドラム2に貼られた
図面1の傾きや位置ずれの設定、および図面の読取範囲
の設定を兼ねて、3つの基準点の入力をカーソル12を
用いて行なう。すなわち、オペレーターがモータ制御用
のキーボード21を使ってカーソルの中心が図面上の基
準位置の中心となるように移動させ、その指定位置にお
けるX方向アップダウンカウンタ16およびY方向アッ
プダウンカウンタ5の値をセレクタ22およびデータバ
ス23を介し、データメモリ26へ読込む。ところがデ
ータメモリ26に格納されたカーソルの中心の指定位置
は、図面上の基準位置に対しOFFX,OFFYの誤差
が含まれていると考えられるので、カーソルによる指定
位置を中心にDX,DYの大きさの格子図面を画像入力
ヘッド6から画像入力メモリ28へ読み込み、本発明に
よる座標補正処理を行なう。これによって補正された3
つの図面の基準位置をORG,ORGX,ORGYとす
ると、座標変換によってORG−ORGXをx軸、OR
G−ORGYをy軸とした座標系の傾斜を補正するとと
もに、線認識後の端点・屈曲点等の特徴点の座標値がO
RG−ORGX間ORG−ORGY間を格子間隔で等分
割するように推定した格子位置となるように補正する。Now, in the configuration of FIG. 1, consider the case of recognizing a drawing written with a grid in mind. First, the cursor 12 is used to input three reference points, both for setting the inclination and positional deviation of the drawing 1 attached to the drum 2 and for setting the reading range of the drawing. That is, the operator uses the keyboard 21 for controlling the motor to move the cursor so that the center of the cursor is at the center of the reference position on the drawing, and the values of the X-direction up / down counter 16 and the Y-direction up / down counter 5 at the designated positions. Is read into the data memory 26 via the selector 22 and the data bus 23. However, since it is considered that the designated position of the center of the cursor stored in the data memory 26 includes an error of OFFX and OFFY with respect to the reference position on the drawing, the size of DX and DY is centered on the designated position of the cursor. The grid drawing is read from the image input head 6 into the image input memory 28, and the coordinate correction processing according to the present invention is performed. 3 corrected by this
If the reference position of one drawing is ORG, ORGX, ORGY, ORG-ORGX is converted to x-axis, OR by coordinate conversion.
The inclination of the coordinate system with G-ORGY as the y-axis is corrected, and the coordinate values of the characteristic points such as the end points and bending points after line recognition are O.
Correction between RG-ORGX and ORG-ORGY is performed so that the grid position is estimated to be equally divided at grid intervals.
一方第1図で示したハードウエアの構成以外に、カーソ
ルやモータ制御用のキーボードがないファックスとライ
トペン付きのCRTとで構成した線認識装置において
も、本発明による座標補正方法は有効である。すなわ
ち、ファックスにより入力された画像のうち図面の基準
位置付近を表示して、その基準位置をライトペンによっ
て指示する場合、ライトペンの解像度の不足等により位
置ずれを生ずる。そこで本発明で述べたような格子画像
の周辺分布から推定した格子位置に基準位置を補正する
ことにより、線認識後の特徴点の座標値を正確にするこ
とが可能である。On the other hand, in addition to the hardware configuration shown in FIG. 1, the coordinate correction method according to the present invention is also effective for a line recognition device including a fax without a cursor and a keyboard for motor control and a CRT with a light pen. . That is, when the vicinity of the reference position of the drawing is displayed in the image input by fax and the reference position is designated by the light pen, a position shift occurs due to insufficient resolution of the light pen. Therefore, by correcting the reference position to the grid position estimated from the peripheral distribution of the grid image as described in the present invention, the coordinate value of the feature point after line recognition can be made accurate.
以上述べたように本発明によれば、カーソル等を使って
入力した指定位置と、図面用紙に印刷された間隔Gを持
つ本来入力すべき格子位置との差がG/2以下の場合で
あれば、自動的に格子中心位置へ修正することができ、
線認識後の特徴点に位置精度を向上させる効果を持つ。As described above, according to the present invention, the difference between the designated position input using the cursor or the like and the grid position to be originally input having the interval G printed on the drawing sheet is G / 2 or less. You can automatically correct to the grid center position,
This has the effect of improving the positional accuracy of the feature points after line recognition.
第1図は本発明による座標補正方法を実現する装置の一
実施例の構成図、第2図は第1図の一部の具体的構成
図、第3図は基準位置の座標の図面上の位置を示す図、
第4図は処理の対象とする格子画像の例とその周辺分
布、第5図は補正後の座標値を求めるための処理の全体
の流れを示す図、第6図は格子画像の周辺分布を求める
流れ図、第7図は有意な周辺分布を求める原理図、第8
図は周辺分布から格子位置を推定するための原理図、第
9図は等間隔の格子位置を得るための流れ図。 1…図面、2…ドラム、3…画像入力ヘッド、24…マ
イクロプロセッサ。FIG. 1 is a block diagram of an embodiment of an apparatus for implementing the coordinate correction method according to the present invention, FIG. 2 is a specific block diagram of a part of FIG. 1, and FIG. A diagram showing the position,
FIG. 4 shows an example of the lattice image to be processed and its peripheral distribution, FIG. 5 shows the overall flow of the process for obtaining the corrected coordinate values, and FIG. 6 shows the peripheral distribution of the lattice image. Fig. 7 is a flow chart for the calculation, and Fig. 7 is a principle diagram for calculating a significant marginal distribution.
The figure is a principle diagram for estimating the grid positions from the peripheral distribution, and Fig. 9 is a flow chart for obtaining the grid positions at equal intervals. 1 ... Drawing, 2 ... Drum, 3 ... Image input head, 24 ... Microprocessor.
───────────────────────────────────────────────────── フロントページの続き (72)発明者 嶋田 茂 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 江尻 正員 東京都国分寺市東恋ケ窪1丁目280番地 株式会社日立製作所中央研究所内 (72)発明者 阿部 修 東京都小平市上水本町1450番地 株式会社 日立製作所武蔵工場内 (72)発明者 綿住 輝博 神奈川県海老名市上今泉2100番地 日立精 工株式会社内 (72)発明者 池内 勉 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウエアエンジニアリング株式会 社内 (56)参考文献 特開 昭57−101988(JP,A) 実開 昭57−10043(JP,U) ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Shigeru Shimada 1-280 Higashi Koigokubo, Kokubunji City, Tokyo Inside Hitachi Central Research Laboratory (72) Inventor Ejiri 1-280 Higashi Koigokubo, Kokubunji, Tokyo Hitachi Ltd. (72) Inventor Osamu Abe 1450, Kamisuihonmachi, Kodaira-shi, Tokyo Inside the Musashi Factory, Hitachi, Ltd. (72) Teruhiro Watazumi 2100, Kamiimaizumi, Ebina, Kanagawa Prefecture Hitachi Seiko Co., Ltd. (72) Inventor Tsutomu Ikeuchi 6-81 Onoue-cho, Naka-ku, Yokohama-shi, Kanagawa Hitachi Software Engineering Co., Ltd. In-house (56) References JP 57-101988 (JP, A) Actual 57-10043 (JP) , U)
Claims (2)
れた図面を読取り、 座標入力手段を用いて基準位置とすべき座標を入力し、 処理手段を用いて、上記座標入力手段にて入力した指定
位置の座標を、上記基準位置の座標として上記読み取っ
た図面の格子位置の座標の1つに補正する座標補正方法
であって、 上記処理手段を用いて、 上記読取った図面の格子画像の周辺分布を求め、 上記周辺分布から格子位置の座標を推定し、上記推定し
た格子位置の座標の中で、上記指定位置の座標に最も距
離の近い格子位置の座標を求め、上記指定位置の座標
を、上記基準位置の座標として上記求めた最も距離の近
い格子位置の座標に補正することを特徴とする座標補正
方法。1. A drawing in which a grid is described in advance is read by using a drawing reading means, coordinates to be used as a reference position are input by using a coordinate input means, and input by the coordinate input means by using a processing means. A coordinate correction method for correcting the coordinate of the specified position to one of the coordinates of the grid position of the read drawing as the coordinate of the reference position, wherein the processing means is used to convert the grid image of the read drawing. Obtain the marginal distribution, estimate the coordinates of the grid position from the marginal distribution, find the coordinate of the grid position closest to the coordinate of the specified position among the estimated coordinates of the grid position, and calculate the coordinate of the specified position. Is corrected to the coordinate of the lattice position having the shortest distance obtained as the coordinate of the reference position.
手段を用いて、上記周辺分布から格子位置の座標を推定
する際に、上記周辺分布の平均値を求め、上記求めた平
均値を越える領域内での周辺分布の値が最大となる位置
の座標を格子位置の座標と推定することを特徴とする座
標補正方法。2. The claim 1, wherein when the processing means is used to estimate the coordinates of the grid position from the peripheral distribution, an average value of the peripheral distribution is calculated, and the calculated average value is calculated. A coordinate correction method characterized in that the coordinates of the position where the value of the peripheral distribution is maximum in the exceeding area are estimated as the coordinates of the grid position.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57195974A JPH0614311B2 (en) | 1982-11-10 | 1982-11-10 | Coordinate correction method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57195974A JPH0614311B2 (en) | 1982-11-10 | 1982-11-10 | Coordinate correction method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5987582A JPS5987582A (en) | 1984-05-21 |
| JPH0614311B2 true JPH0614311B2 (en) | 1994-02-23 |
Family
ID=16350094
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57195974A Expired - Lifetime JPH0614311B2 (en) | 1982-11-10 | 1982-11-10 | Coordinate correction method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0614311B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH02118713A (en) * | 1988-10-27 | 1990-05-07 | Sharp Corp | Character recognition device |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS6145547Y2 (en) * | 1980-06-18 | 1986-12-22 | ||
| JPS57101988A (en) * | 1980-12-18 | 1982-06-24 | Fujitsu Ltd | Shaping system of handwriting graphic input device |
-
1982
- 1982-11-10 JP JP57195974A patent/JPH0614311B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5987582A (en) | 1984-05-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6470271B2 (en) | Obstacle detecting apparatus and method, and storage medium which stores program for implementing the method | |
| US8010224B2 (en) | Automatic cutting device and production method for beveled product | |
| US5500906A (en) | Locating curvilinear objects using feathered fiducials | |
| CN111390901B (en) | Automatic calibration method and calibration device for mechanical arm | |
| CN110281240B (en) | Method and system for positioning and picking up glass of liquid crystal display screen and vision processing system | |
| CN109213090B (en) | Position control system, position detection device, and recording medium | |
| JP2019190969A (en) | Image processing apparatus, and image processing method | |
| JP3339090B2 (en) | Position detection method | |
| JP2840801B2 (en) | Automatic setting method of coordinate conversion coefficient | |
| JPH0614311B2 (en) | Coordinate correction method | |
| JP3774320B2 (en) | Wafer position grasping method, exposure method, and exposure apparatus | |
| US6490541B1 (en) | Method and apparatus for visual measurement | |
| US12536691B2 (en) | Machine vision system utilizing measurement marking device | |
| JPH11283035A (en) | Focus adjustment device for image equipment | |
| WO2024162142A1 (en) | Display video correction device, display video correction method, and program | |
| JP7520608B2 (en) | Robot hand position detection system | |
| JPH0658212B2 (en) | Three-dimensional coordinate measuring device | |
| JPH07208924A (en) | Calibration method of recognition optical system of visual recognition device | |
| JP2000258121A (en) | Master substrate for calibrating a plurality of cameras and calibration method for image recognition camera | |
| KR102696176B1 (en) | Method and apparatus for merging machine coordinate system and camera coordinate system | |
| CN120293494B (en) | Distortion correction method of flight light path and laser equipment | |
| KR100759067B1 (en) | Position correction system and method of industrial robot | |
| RU2280838C2 (en) | Method of contact-free measurement of objects having defocused borders onto image | |
| JPH08181062A (en) | Positioning device and positioning method | |
| KR100213096B1 (en) | Calibration method in robot controller |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 19920512 |