[go: up one dir, main page]

JP2706711B2 - Method and apparatus for correcting positional distortion of image data - Google Patents

Method and apparatus for correcting positional distortion of image data

Info

Publication number
JP2706711B2
JP2706711B2 JP3303936A JP30393691A JP2706711B2 JP 2706711 B2 JP2706711 B2 JP 2706711B2 JP 3303936 A JP3303936 A JP 3303936A JP 30393691 A JP30393691 A JP 30393691A JP 2706711 B2 JP2706711 B2 JP 2706711B2
Authority
JP
Japan
Prior art keywords
image data
vertex
distortion correction
correction
position distortion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP3303936A
Other languages
Japanese (ja)
Other versions
JPH06131452A (en
Inventor
修 下村
聖一 安川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Steel Corp
Original Assignee
Nippon Steel 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 Nippon Steel Corp filed Critical Nippon Steel Corp
Priority to JP3303936A priority Critical patent/JP2706711B2/en
Publication of JPH06131452A publication Critical patent/JPH06131452A/en
Application granted granted Critical
Publication of JP2706711B2 publication Critical patent/JP2706711B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Input (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、図面データの自動入力
装置などに利用される画像データの位置歪みを補正する
方法及び装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for correcting positional distortion of image data used for an automatic input device for drawing data.

【0002】[0002]

【従来の技術】図面をイメージスキャナーなどで電子的
に走査し、得られた2値の画像データに対してベクトル
化処理と文字、記号等の図形要素の認識とを行う図面の
自動入力装置が知られている。このような自動入力装置
においては、図面の描かれている媒体( 例えば紙やマイ
ラー紙) の伸縮や、イメージスキャナの有限の解像度、
あるいは媒体の送り精度等に起因する図形データの微小
な位置誤差( 歪み) が自動入力された図面データ全体に
わたって生じる。
2. Description of the Related Art An automatic drawing input device for electronically scanning a drawing with an image scanner or the like and performing vectorization processing on the obtained binary image data and recognition of graphic elements such as characters and symbols is known. Are known. In such an automatic input device, the expansion and contraction of the medium on which the drawing is drawn (for example, paper or mylar paper), the finite resolution of an image scanner,
Alternatively, a minute positional error (distortion) of the graphic data due to the feeding accuracy of the medium or the like occurs throughout the automatically input drawing data.

【0003】このような位置歪みを補正する方法として
は、例えば周知のアフィン変換による方法( 「エレクト
ロニクス技術集中基礎口座 ディジタル画像処理技術」
日本工業技術センター 昭和58年発行) や、立体幾何の
“点による投影" に基づく方法( 「数学ワンポイント双
書 立体幾何」 共立出版昭和54年発行) 、あるいは水
平もしくは垂直方向に存在する位置歪みをその位置歪み
の方向と直交する方向に段階的に補正する方法( 特開平
1-253796) などが知られている。
As a method of correcting such positional distortion, for example, a method using a well-known affine transformation (“Digital image processing technology based on electronics technology concentration basic account”)
The Japan Industrial Technology Center (published in 1983), a method based on the "projection of points" of solid geometry ("Mathematics One-point Sosoku Solid Geometry" published by Kyoritsu Shuppan in 1979), or positional distortion existing in the horizontal or vertical direction A method of correcting in a stepwise manner in a direction perpendicular to the direction of the positional distortion (see
1-253796).

【0004】[0004]

【発明が解決しようとする課題】自動入力された図面デ
ータの歪み補正を行う場合、図面の上下左右の四隅の点
( 例えば図面枠の4頂点) の位置を所定の位置に合致さ
せることが必要になる。しかしながら、上述した従来の
技術における第1の方法は基本的に3点位置歪み補正で
あるため、図面データの有する非線型な歪みの補正にお
いて第4の基準点の位置を正しく補正することは困難で
あるという問題がある。
When correcting distortion of automatically input drawing data, four points at the top, bottom, left and right of the drawing are used.
It is necessary to match the position of (for example, the four vertices of the drawing frame) with a predetermined position. However, since the first method in the above-described conventional technique is basically a three-point position distortion correction, it is difficult to correct the position of the fourth reference point correctly in the correction of the non-linear distortion included in the drawing data. There is a problem that is.

【0005】また、従来の技術における第2の方法によ
れば4点位置歪み補正が可能である反面、その発生のメ
カニズムから図面サイズに比べて極めて微小な位置歪み
の補正に際し、投影のための基準点がその計算精度によ
っては無限遠点となり、補正が不可能になる場合があ
る。
Further, according to the second method of the prior art, it is possible to correct four-point position distortion, but on the other hand, due to the mechanism of its occurrence, when correcting position distortion that is extremely small compared to the drawing size, it is necessary to perform projection. The reference point may be a point at infinity depending on the calculation accuracy, and correction may not be possible.

【0006】更に、従来の技術における第3の方法は基
本的にラスタデータの位置歪みを補正する方法であり、
また自動入力後の図面枠の一辺が既に水平あるいは垂直
で、その長さが基準値に等しくかつ歪みの方向が上記の
基準となる図面枠に直交する方向に存在する場合にのみ
有効であるなどの制限がある。このため、自動入力後の
ような任意の方向に歪みを有する図面データに対する4
点補正には適用できないという問題がある。従って、本
発明の課題は、自動入力後のような任意の方向に位置歪
みを有する図面データに対し4点補正を行うことができ
る簡易な位置歪みの補正方法を提供することにある。
Further, a third method in the prior art is basically a method of correcting positional distortion of raster data.
Also, it is effective only when one side of the drawing frame after the automatic input is already horizontal or vertical, the length thereof is equal to the reference value, and the direction of the distortion exists in the direction orthogonal to the drawing frame serving as the reference. There are restrictions. For this reason, 4D for drawing data having a distortion in an arbitrary direction such as after automatic input.
There is a problem that it cannot be applied to point correction. Accordingly, an object of the present invention is to provide a simple position distortion correction method capable of performing four-point correction on drawing data having position distortion in an arbitrary direction such as after automatic input.

【0007】[0007]

【課題を解決するための手段及び作用】本発明に係わる
画像データの位置歪み補正方法は、位置歪み補正対象の
画像データにまず、アフィン変換による3点位置歪み補
正を施したのち、この3点位置歪み補正後の画像データ
を囲む四角形の4個の頂点のうち未補正の1個の頂点を
補正後の頂点に一致させるためにに必要な補正量を算定
しこの補正量を3点位置歪み補正後の各画素にその位置
と上記1個の頂点との位置関係に応じて比例配分するこ
とにより最終的な4点歪み補正を施すように構成されて
いる。
According to the method for correcting positional distortion of image data according to the present invention, image data to be subjected to positional distortion correction is first subjected to three-point positional distortion correction by affine transformation, and then the three-point position distortion correction is performed. A correction amount required to match one uncorrected vertex of the four vertexes of the rectangle surrounding the image data after the position distortion correction with the corrected vertex is calculated, and the correction amount is calculated by three-point position distortion. A final four-point distortion correction is performed by proportionally distributing the corrected pixels in accordance with the positional relationship between the position and the one vertex.

【0008】[0008]

【実施例】本発明の一実施例の処理内容を図3乃至図6
の概念図を参照しながら説明する。なお、各図におい
て、座標原点は各図の左下隅にあるものとする。
FIG. 3 to FIG. 6 show processing contents of an embodiment of the present invention.
This will be described with reference to the conceptual diagram of FIG. In each drawing, the coordinate origin is assumed to be at the lower left corner of each drawing.

【0009】まず、図3に示すように、位置歪み補正対
象の画像データ、例えば自動入力直後の図面データを囲
む四角形(この例では長方形)abcdを定義する。こ
の四角形abcdは、イメージスキャナなどで読み取ら
れる図面に付加された図枠そのものであってもよいし、
そのような図枠を持たない図面データなどについては自
動入力後にその全体あるいは一部を囲むように設定した
仮想的なものであってもよい。説明の便宜上、以下で
は、四角形abcdを図枠とも称する。この四角形ab
cdは、自動入力に伴う種々の好ましくない現象に起因
して歪んでいる。この歪んだ四角形abcdの各頂点を
「旧頂点」と称する。
First, as shown in FIG. 3, a quadrangle (rectangle in this example) abcd surrounding image data to be subjected to position distortion correction, for example, drawing data immediately after automatic input is defined. This square abcd may be the drawing frame itself added to the drawing read by an image scanner or the like,
Such drawing data having no drawing frame may be virtual data set so as to surround the whole or a part thereof after automatic input. In the following, for convenience of description, the square abcd is also referred to as a drawing frame. This square ab
cd is distorted due to various undesirable phenomena associated with automatic input. Each vertex of this distorted rectangle abcd is called an "old vertex".

【0010】次に、図3に示すように、位置歪み補正後
の画像データを囲む四角形ABCDを定義する。この四
角形ABCDは、仮に図面データが無歪みで自動入力さ
れたとした場合の理想的な図枠などに該当する。この四
角形ABCDの各頂点を「新頂点」と称する。上記新旧
各頂点の(X,Y)座標をそれぞれ、 a(Xa,Ya),b(Xb,Yb),c(Xc,Y
c),d(Xd,Yd) A(XA ,YA ),B(XB ,YB ),C(XC ,YC
),D(XD ,YD ) とする。
Next, as shown in FIG. 3, a rectangular ABCD surrounding the image data after the positional distortion correction is defined. This square ABCD corresponds to an ideal drawing frame or the like in the case where drawing data is automatically input without distortion. Each vertex of this square ABCD is called a “new vertex”. The (X, Y) coordinates of each of the new and old vertices are represented by a (Xa, Ya), b (Xb, Yb), c (Xc, Y
c), d (Xd, Yd) A (XA, YA), B (XB, YB), C (XC, YC)
), D (XD, YD).

【0011】次に、4個の旧頂点a,b,c,dのうち
任意の3個を選択し、それぞれを最隣接の3個の新頂点
のそれぞれに一致させるために必要なアフィン変換係数
を算定する。この例では、図3に示すように、3個の旧
頂点a,b,dのそれぞれを最隣接の3個の新頂点A,
B,Dのそれぞれに一致させるものとする。すなわち、
任意の点についてアフィン変換前の座標を(X,Y),
アフィン変換後の座標を(X1 ,Y1 )とし、アフィン
変換係数をα01,α10,α00,β01,β10,β00とおけ
ば、 X1 =α01X+α10Y+α00 ・・・(1) Y1 =β01X+β10Y+β00 ・・・(2) の関係が成立する。(1),(2)式中に含まれる6個
のアフィン変換係数、すなわち6個の未知数は、任意の
3点(この例では3個の旧頂点a,b,d)について変
換前後の(X,Y)座標を各式に代入して6個の等式を
定義することにより決定できる。
Next, any three of the four old vertices a, b, c, and d are selected, and the affine transformation coefficients required to match each of the three old vertices with the three nearest new vertices are selected. Is calculated. In this example, as shown in FIG. 3, each of the three old vertices a, b, and d is replaced with the three nearest new vertices A,
B and D should be matched. That is,
For any point, the coordinates before affine transformation are (X, Y),
If the coordinates after the affine transformation are (X 1 , Y 1 ) and the affine transformation coefficients are α 01 , α 10 , α 00 , β 01 , β 10 , and β 00 , X 1 = α 01 X + α 10 Y + α 00. .. (1) Y 1 = β 01 X + β 10 Y + β 00 (2) The six affine transformation coefficients included in the equations (1) and (2), that is, the six unknowns, are obtained by converting three arbitrary points (in this example, three old vertices a, b, and d) before and after the transformation. (X, Y) coordinates can be substituted into each equation to define six equations.

【0012】このようにして6個のアフィン変換係数を
決定したのち、このアフィン変換係数を用いて図枠ab
cd内の画像データの全ての要素の位置座標を新たな位
置座標に変換する。図3の例では、任意の要素の位置座
標(X,Y)を示す点P(X,Y)が補正後の位置座標
(X1 ,Y1 )を示す点P1 (X1 ,Y1 )に変換され
る。ここで、位置歪み補正対象のベクトル化された画像
データを構成する要素とは、始点と終点の位置座標で定
義される線分、中心点の位置座標と半径で定義される円
や円弧、頂点の位置座標で定義される多角形、あるいは
認識文字や記号の中心点の位置座標などである。
After the six affine transformation coefficients are determined in this manner, the figure frame ab is
The position coordinates of all the elements of the image data in the cd are converted into new position coordinates. In the example of FIG. 3, the position coordinates of any element (X, Y) points indicating the P (X, Y) is the position coordinates after correction (X 1, Y 1) points indicating the P 1 (X 1, Y 1 ). Here, the elements constituting the vectorized image data to be subjected to the position distortion correction include a line segment defined by the position coordinates of the start point and the end point, a circle or an arc defined by the position coordinates and the radius of the center point, and a vertex. , Or a position coordinate of the center point of a recognized character or symbol.

【0013】上記アフィン変換による3点補正の結果、
図4に示すように、図枠の4個の旧頂点のうち3個は補
正後の図枠の最隣接の新頂点と一致するが、アフィン変
換後の1個の旧頂点C1 (XC 1 ,YC 1 )だけは最隣
接の新頂点C(XC ,YC )からずれたままになってい
る。そこで、このアフィン変換後の旧頂点C1 を新頂点
Cに一致させるために必要な位置の補正量、すなわち点
1 とC間の距離を算定する。次に、算定済みの補正量
をアフィン変換後の各点と頂点C1 との位置関係に応じ
て比例配分することにより最終的な4点歪み補正を行
う。この4点歪み補正の結果、図4に例示するように、
アフィン変換後の点P1 (X1 ,Y1 )が点P
2 (X2 ,Y2 )に変換、すなわち移動せしめられる。
As a result of the three-point correction by the affine transformation,
As shown in FIG. 4, three of the four old vertices of the drawing frame match the newest vertex nearest to the corrected drawing frame, but one old vertex C 1 (XC 1 , YC 1 ) remain displaced from the nearest new vertex C (XC, YC). Therefore, the correction amount of the position required to match the old vertex C 1 after the affine transformation to the new vertex C, that calculates the distance between points C 1 and C. Next, a final 4 Ten'yugami corrected by prorating according to calculate already correction on a positional relationship between each point and the vertex C 1 after the affine transformation. As a result of the four-point distortion correction, as illustrated in FIG.
The point P 1 (X 1 , Y 1 ) after the affine transformation is the point P
2 (X 2 , Y 2 ).

【0014】上記補正量の比例配分による4点位置歪み
補正の具体的な一例を図5と図6を参照しながら説明す
る。この例では、まず、点C1 と新頂点C間の距離(補
正量)がそのX成分(ΔX)とY成分(ΔY)とに分解
される。そして、図5に示すように、まず、各点にΔX
を比例配分することによりX方向への4点歪み補正を行
い、続いて図5に示すように各点にΔYを比例配分する
ことによりY方向への4点位置歪み補正を行う。
A specific example of the four-point position distortion correction based on the proportional distribution of the correction amount will be described with reference to FIGS. In this example, first, the distance (correction amount) between the point C 1 and the new vertex C is decomposed into its X component (ΔX) and Y component (ΔY). Then, as shown in FIG.
Are proportionally distributed to perform four-point distortion correction in the X direction, and then, as shown in FIG. 5, four-point position distortion correction in the Y direction is performed by proportionally distributing ΔY to each point.

【0015】まず、図4を参照しながら補正量ΔXを各
点に比例配分する方法について説明する。まず、アフィ
ン変換による3点位置歪み補正後の図枠ABC1 Dで囲
まれる領域を台形AEC1 Dで囲まれる第1の領域と、
直角三角形C1 EBで囲まれる第2の領域とに2分割す
る。第1の領域については、直角三角形DC1 2 に着
目し、その斜辺上でY座標としてY1 を有する点Fに比
例配分すべき補正量のX成分、すなわち線分FGの長さ
αを次式のように定める。 α=〔L(DG)/L(DC2 )〕ΔX ・・・(3) なお、ΔXは点C1 に対する補正量のX成分、すなわち
線分C1 2 の長さである。また、L(DC2 )、L
(DG)は線分DC2 、DGの長さを意味し、以下線分
の長さについては同様の記号を用いる。
First, a method of proportionally distributing the correction amount ΔX to each point will be described with reference to FIG. First, a region surrounded by the drawing frame ABC 1 D after three-point position distortion correction by affine transformation is a first region surrounded by a trapezoid AEC 1 D,
It is divided into two parts: a second area surrounded by a right triangle C 1 EB. For the first area, pay attention to the right triangle DC 1 C 2 , and calculate the X component of the correction amount to be proportionally distributed to the point F having Y 1 as the Y coordinate on the hypotenuse, that is, the length α of the line segment FG. Determined as the following equation. α = [L (DG) / L (DC 2 )] ΔX (3) where ΔX is the X component of the correction amount for the point C 1 , that is, the length of the line segment C 1 C 2 . L (DC 2 ), L
(DG) means the length of the line segments DC 2 and DG, and the same symbols are used for the lengths of the line segments.

【0016】次に、第1の領域内で点Fと同一のY座標
を有する任意の点P1 (X1 ,Y1)に比例配分すべき
X方向の補正量δXを次式のように定める。 δX=〔L(G’P1 )/L(G’F)〕α ・・・(4) 以下では、説明を簡略にするため、四角形ABCDの辺
ADとBCをX軸に平行に設定すると共に辺ABとCD
をY軸に平行に設定したものとすれば、 XA =XB ≡Xmin ,XC =XD ≡Xmax YA =YD ≡Ymin ,YB =YC ≡Ymax ・・・(5) と表現できる。
Next, the correction amount δX in the X direction to be proportionally distributed to an arbitrary point P 1 (X 1 , Y 1 ) having the same Y coordinate as the point F in the first area is expressed by the following equation. Determine. δX = [L (G′P 1 ) / L (G′F)] α (4) In the following, for simplicity of explanation, the sides AD and BC of the square ABCD are set parallel to the X axis. AB and CD with
Is set parallel to the Y axis, XA = XBBXmin, XC = XD≡Xmax YA = YD≡Ymin, YB = YC≡Ymax (5)

【0017】(3)式乃至(5)式から、 α=〔(Y1 ーYmin )/(YC 1 −Ymin )〕ΔX ・・・(6) δX=〔(X1 ーXmin )/(Wーα)〕α ・・・(7) ただし、Wは辺ADの長さ、すなわち Xmax −Xmin
である。通常は、位置歪み率が1よりも十分小さいとい
う条件、すなわちα≪W の条件が成立するので、
(7)式から十分な近似精度のもとに次式が得られる。 δX≒〔(X1 ーXmin )/W〕α =〔(X1 ーXmin )/(Xmax −Xmin )〕 ×〔(Y1 ーYmin )/(YC 1 −Ymin )〕ΔX ・・・(8)
[0017] From equation (3) to (5), alpha = [(Y 1 over Ymin) / (YC 1 -Ymin)] [Delta] X · · · (6) [delta] X = [(X 1 over Xmin) / (W −α)] α (7) where W is the length of the side AD, that is, Xmax−Xmin
It is. Normally, the condition that the position distortion rate is sufficiently smaller than 1, that is, the condition of α≪W is satisfied,
From the equation (7), the following equation can be obtained with sufficient approximation accuracy. [delta] X ≒ [(X 1 over Xmin) / W] alpha = [(X 1 over Xmin) / (Xmax -Xmin)] × [(Y 1 over Ymin) / (YC 1 -Ymin)] [Delta] X · · · (8 )

【0018】次に、図5において直角三角形C1 BEで
囲まれる第2の領域内については、まず、直角三角形C
1 BJに着目し、その斜辺上でY座標値Y1 を有する点
Hに比例配分すべき補正量のX成分βを次式のように定
める。 β=〔L(H I)/L(C1 J)〕ΔX =〔(Ymax −Y1 )/(Ymax −YC 1 )〕ΔX ・・・(9) 更に、上記第2の領域内で点Hと同一のY座標値Y1
有する任意の点P1 (X1 ,Y1 )に比例配分すべきX
方向の補正量δXを次式のように定める。 δX=〔L(H’P1 )/L(H’H)〕α ・・・(10)
Next, in the second region surrounded by the right triangle C 1 BE in FIG.
Focusing on 1 BJ, the X component β of the correction amount to be proportionally distributed to the point H having the Y coordinate value Y 1 on the hypotenuse is determined by the following equation. β = [L (HI) / L (C 1 J)] ΔX = [(Ymax−Y 1 ) / (Ymax−YC 1 )] ΔX (9) Further, a point in the second area is set. X to be proportionally distributed to an arbitrary point P 1 (X 1 , Y 1 ) having the same Y coordinate value Y 1 as H
The direction correction amount δX is determined as in the following equation. δX = [L (H′P 1 ) / L (H′H)] α (10)

【0019】ここで、再び直角三角形C1 BJに着目す
れば、 L(H’H) L(B I) =(XC 1 −Xmin )〔(Ymax −Y1 )/(Ymax −YC 1 )〕 ・・・(11) の比例関係が成立するので、(9)式乃至(11) 式か
ら、次式の関係が得られる。 δX=〔(X1 −Xmin )/(XC 1 −Xmin )〕ΔX ・・・(12)
Attention is again paid to the right triangle C 1 BJ. L (H′H) L (BI) = (XC 1 −Xmin) [(Ymax−Y 1 ) / (Ymax−YC 1 )] .. (11) holds, the following relationship is obtained from the expressions (9) to (11). δX = [(X 1 −Xmin) / (XC 1 −Xmin)] ΔX (12)

【0020】(8)式と(12) 式から明らかなように、
頂点C1 に対する位置歪みの補正量のX成分ΔXをこの
頂点C1 と任意の点との位置関係に基づき任意の点に比
例配分することにより、この任意の点のX方向の位置歪
みを補正することができる。
As is clear from equations (8) and (12),
By proportioning the arbitrary point on the basis of the X component ΔX correction amount of the position distortion for the vertex C 1 on the positional relationship between any point and the vertex C 1, corrects the positional distortion of the X-direction of the arbitrary point can do.

【0021】上記X方向への位置歪みの補正が終了した
のちの図枠は、図6に示すような四角形ABC2 Dとな
る。引き続き、頂点C2 をY方向に移動させることによ
りこれを新頂点Cに一致させ、これに必要な補正量ΔY
を四角形ABC2 D内の各点に比例配分する。まず、直
角三角形C2 BCに着目し、その斜辺上においてX座標
値X2 を有する点Kに比例配分すべき補正量のY成分、
すなわち線分KLの長さγを次式のように定める。 γ=〔L(BL)/L(BC)〕ΔY =〔(X2 ーXmin )/(Xmax −Xmin )〕ΔY ・・・(13)
After completion of the correction of the positional distortion in the X direction, the figure frame becomes a square ABC 2 D as shown in FIG. Subsequently, the vertex C 2 is moved in the Y direction so that it matches the new vertex C, and the correction amount ΔY
Is proportionally distributed to each point in the square ABC 2 D. First, focusing on the right triangle C 2 BC, the Y component of the correction amount to be proportionally distributed to the point K having the X coordinate value X 2 on the hypotenuse,
That is, the length γ of the line segment KL is determined as follows. γ = [L (BL) / L (BC)] ΔY = [(X 2 −Xmin) / (Xmax−Xmin)] ΔY (13)

【0022】続いて、四角形ABC2 D内で点Kと同一
のX座標を持つ点P2 (X2 ,Y2)に比例配分すべき
Y方向の補正量δYを次式のように定める。 δY=〔L(L’P2 )/L(L’K)〕γ ・・・(14) ここで、 L(L’K)=(Ymax −Ymin )−γ ・・・(15) である。通常は、位置歪み率が1よりも十分小さいとい
う条件、すなわちγ≪(Ymax −Ymin )の条件が成立
するので、(13)式乃至(15)式から十分な近似精度のも
とに次式が得られる。 δY≒〔(Y2 ーYmin )/(Ymax −Ymin )〕 ×〔(X2 ーXmin )/(Xmax −Xmin )〕ΔY ・・・(16) (16) 式から明らかなように、頂点C2 に対する位置歪
みの補正量のY成分ΔYをこの頂点C2 とX方向への4
点位置歪み補正後の任意の点との位置関係に基づき任意
の点に比例配分することにより、この任意の点のY方向
への4点位置歪みを補正することができる。
Subsequently, a correction amount δY in the Y direction to be proportionally distributed to a point P 2 (X 2 , Y 2 ) having the same X coordinate as the point K in the square ABC 2 D is determined as follows. δY = [L (L′ P 2 ) / L (L′ K)] γ (14) where L (L′ K) = (Ymax−Ymin) −γ (15) . Normally, the condition that the position distortion rate is sufficiently smaller than 1 is satisfied, that is, the condition of γ≪ (Ymax−Ymin) is satisfied. Therefore, the following equations are obtained from equations (13) to (15) with sufficient approximation accuracy. Is obtained. δY ≒ [(Y 2 −Y min) / (Y max −Y min)] × [(X 2 −X min) / (X max −X min)] ΔY (16) As is apparent from the equation (16), the vertex C of the correction amount of the Y component ΔY position distortion for 2 to vertex C 2 and X direction 4
By performing proportional distribution to an arbitrary point based on the positional relationship with the arbitrary point after the correction of the point position distortion, it is possible to correct the four-point positional distortion in the Y direction of the arbitrary point.

【0023】以上説明した処理の内容を図1のフローチ
ャートに要約して示す。また、図1のフローチャートの
ステップ6に関し具体的な一例として説明した処理内容
を図2のフローチャートに要約して示す。
The contents of the processing described above are summarized in the flowchart of FIG. Further, the processing content described as a specific example regarding step 6 of the flowchart of FIG. 1 is summarized in the flowchart of FIG.

【0024】以上、4点位置歪み補正については、ま
ず、全ての要素についてX方向の位置歪み補正を行い、
続いて全ての要素についてY方向の位置歪み補正を行う
場合を例示した。しかしながら、まず、全ての要素につ
いてY方向の位置歪み補正を行い、続いて全ての要素に
ついてX方向の位置歪み補正を行う構成としてもよい。
あるいは、ある要素についてX,Y方向の位置補正歪み
を行ったのち次の要素についてX,Y方向の位置補正歪
みを行うという処理を全ての要素について反復する構成
としてもよい。
As for the four-point position distortion correction, first, position distortion correction in the X direction is performed for all elements.
Subsequently, the case where the positional distortion correction in the Y direction is performed for all the elements is illustrated. However, the configuration may be such that the positional distortion correction in the Y direction is performed on all the elements first, and then the positional distortion correction in the X direction is performed on all the elements.
Alternatively, the processing of performing the position correction distortion in the X and Y directions for one element and then performing the position correction distortion in the X and Y directions for the next element may be repeated for all the elements.

【0025】図7は、上記実施例の位置歪み補正機能を
組み込んだ図面自動入力装置の構成の典型的な一例を示
している。この図面自動入力装置は、図面を光学的に走
査して2次元配列のドットパターンデータとして読み取
るイメージスキャナ21と、このドットパターンデータ
を処理してベクトル化データに変換する画像処理装置2
2と、このベクトル化データに対して上記実施例の位置
歪み補正を行うワークステーション23とから構成され
ている。
FIG. 7 shows a typical example of the configuration of an automatic drawing input device incorporating the position distortion correction function of the above embodiment. The automatic drawing input device includes an image scanner 21 that optically scans a drawing to read two-dimensionally arranged dot pattern data, and an image processing device 2 that processes the dot pattern data and converts it into vectorized data.
2 and a workstation 23 for performing the position distortion correction of the above-described embodiment on the vectorized data.

【0026】以下に、図7の装置を用いて行った上記実
施例の実験結果を示す。イメージスキャナ21で読み取
ったドットパターンデータの解像度は16ドット/mm 、画
像処理装置22のメモリ容量は16メガバイト、ワークス
テーション23としてはパーソナルコンピュータを使用
した。ベクトル化のアルゴリズムとしては距離変換・骨
格抽出に基づく方法を用いた。
The results of an experiment conducted on the above embodiment using the apparatus shown in FIG. 7 will be described below. The resolution of the dot pattern data read by the image scanner 21 was 16 dots / mm 2, the memory capacity of the image processing device 22 was 16 megabytes, and a personal computer was used as the workstation 23. As a vectorization algorithm, a method based on distance transformation and skeleton extraction was used.

【0027】入力対象の図面としてはA1サイズ(84
12mm×594mm) の建築平面図を使用し、ベクトル処
理後のベクター総数は4835個であった。この図面デ
ータをワークステーション23のディスプレイ装置上に
表示し、マウスを用いて選択した図面枠の4個の旧頂点
の座標( 単位はmm) は、a( 14.63,19.31 )、b(1
6.31 ,560.19 )、c( 796.94 ,559.44 )、d( 79
6.75 ,17.94 )である。これに対してキーボードから入
力した補正後の新頂点の座標はA( 14.63 , 19.31 ) 、
B( 14.63 , 559.31) 、C( 794.63 , 559.31 ) 、D(
794.63 , 19.31)である。まず、3個の旧頂点a,b,
dを新頂点A,B,Dに位置変換するようなアフィン変
換処理だけを行ったところ、全処理時間として9 秒を要
し、変換後の残る一つの旧頂点C1 の座標は ( 793.13
, 559.94 )であった。次に、本発明に従って、アフィ
ン変換処理と4点補正処理を行った結果、全処理時間と
して10秒を要し、上記4個の旧頂点が全て上記4個の新
頂点に合致した。
The drawing to be input is A1 size (84
Using an architectural plan of 12 mm x 594 mm), the total number of vectors after vector processing was 4,835. This drawing data is displayed on the display device of the workstation 23, and the coordinates (unit: mm) of the four old vertices of the drawing frame selected by using the mouse are a (14.63, 19.31), b (1
6.31, 560.19), c (796.94, 559.44), d (79
6.75, 17.94). On the other hand, the coordinates of the corrected new vertex input from the keyboard are A (14.63, 19.31),
B (14.63, 559.31), C (794.63, 559.31), D (
794.63, 19.31). First, the three old vertices a, b,
d new vertices A, B, was subjected to only the affine transformation processing for position conversion into D, takes 9 seconds as the total processing time, one of the old coordinates of vertices C 1 remaining points after conversion (793.13
, 559.94). Next, as a result of performing the affine transformation processing and the four-point correction processing according to the present invention, it took 10 seconds as the total processing time, and all the four old vertices coincided with the four new vertices.

【0028】[0028]

【発明の効果】以上詳細に説明したように、本発明を例
えば図面自動入力装置における編集・修正のための後処
理ソフトの一機能として組み込むことにより、図面デー
タに含まれる歪みの4点補正が可能となり、修正作業の
効率化と作成される図面データの質の大幅な向上が期待
される。
As described above in detail, by incorporating the present invention as a function of post-processing software for editing / correcting in, for example, an automatic drawing input device, it is possible to correct four points of distortion contained in drawing data. This makes it possible to improve the efficiency of the correction work and significantly improve the quality of the created drawing data.

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

【図1】本発明の一実施例に係わる位置歪み補正方法の
処理内容を要約して示すフローチャートである。
FIG. 1 is a flowchart summarizing processing contents of a position distortion correction method according to an embodiment of the present invention.

【図2】図1のフローチャートのステップ6の処理内容
の具体的な一例を要約して示すフローチャートである。
FIG. 2 is a flowchart summarizing a specific example of the processing content of step 6 in the flowchart of FIG. 1;

【図3】上記一実施例の処理内容を補足説明するための
概念図であり、4個の旧頂点a,b,c,dで囲まれる
四角形と4個の新頂点A,B,C,Dで囲まれる四角形
を例示したもの。
FIG. 3 is a conceptual diagram for supplementarily explaining the processing content of the embodiment, and shows a rectangle surrounded by four old vertices a, b, c, and d and four new vertices A, B, C, and An example of a square surrounded by D.

【図4】上記一実施例の処理内容を補足説明するための
概念図であり、3個の旧頂点a,b,dを3個の新頂点
A,B,Dに一致させるようにアフィン変換を決定しこ
れに基づき3点一歪み補正を行う様子を示すもの。
FIG. 4 is a conceptual diagram for supplementarily explaining the processing content of the embodiment, and is an affine transformation so that three old vertices a, b, and d match three new vertices A, B, and D; Is determined, and a three-point-by-one distortion correction is performed based on this.

【図5】上記一実施例の処理内容を補足説明するための
概念図であり、4点一歪み補正をまずX方向に対して行
う様子を示すもの。
FIG. 5 is a conceptual diagram for supplementary explanation of the processing content of the embodiment, showing how four-point-one distortion correction is first performed in the X direction.

【図6】上記一実施例の処理内容を補足説明するための
概念図であり、4点一歪み補正を続いてY方向に対して
行う様子を示すもの
FIG. 6 is a conceptual diagram for supplementarily explaining the processing content of the embodiment, showing a state in which four-point-one distortion correction is subsequently performed in the Y direction.

【図7】上記一実施例の補正方法を実施するための図面
自動入力装置の構成の一例を示すブロック図である。
FIG. 7 is a block diagram illustrating an example of the configuration of an automatic drawing input device for implementing the correction method according to the embodiment.

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

21 イメージスキャナ 22 画像処理装置 23 ワークステーション 21 image scanner 22 image processing device 23 workstation

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】ベクトル化処理された二次元の画像データ
に対し位置の歪み補正を行う位置歪み補正方法であっ
て、 前記位置歪み補正対象の画像データを囲む四角形(その
各頂点を「旧頂点」と称する)と位置歪み補正後の画像
データを囲む四角形(その各頂点を「新頂点」と称す
る)とを定義し、4個の旧頂点のうち任意の3個を選択
しそれぞれを最隣接の3個の新頂点に一致させるために
必要なアフィン変換係数を算定し、 この算定済みのアフィン変換係数に基づき前記旧頂点内
前記歪み補正対象のすべての画像データの要素に3点
位置歪み補正を施し、 この3点位置歪み補正後の画像データを囲む四角形の4
個の頂点のうち新頂点と一致していない1個の頂点を最
隣接の新頂点に一致させるために、前記補正後の画像デ
ータを囲む四角形の縦および横方向について前記最隣接
の新頂点と一致していない1個の頂点と一致される前記
最隣接の新頂点間の距離をそれぞれ算定し、 前記補正後の画像データを囲む四角形の縦および横方向
について、それぞれ算定した前記距離を前記 3点位置歪
み補正後の画像データの各要素にその位置と前記一致し
ていない1個の頂点との位置関係に応じて比例配分する
ことにより4点位置歪み補正を施すことを特徴とする画
像データの位置歪み補正方法。
1. A position distortion correction method for performing position distortion correction on vectorized two-dimensional image data, comprising: a rectangle surrounding the image data to be subjected to the position distortion correction (each vertex is referred to as an “old vertex”). ) And a rectangle surrounding the image data after the position distortion correction (each vertex thereof is referred to as a “new vertex”), and arbitrary three of the four old vertices are selected, and each is selected as the nearest neighbor. The affine transformation coefficients required to match the three new vertices are calculated , and based on the calculated affine transformation coefficients ,
The distortion correction and facilities elements in 3-point displacement correction of all image data of the object, the fourth rectangle that encloses the image data after the three-point displacement correction of
In order to match one of the vertices that does not match the new vertex to the nearest new vertex, the image data after the correction
The nearest neighbor in the vertical and horizontal directions of the rectangle surrounding the data
Is matched with one vertex that does not match the new vertex of
The distance between the nearest new vertices is calculated, and the vertical and horizontal directions of the square surrounding the corrected image data are calculated.
For each element of the image data after the three-point position distortion correction ,
A position distortion correction method for image data, wherein four-point position distortion correction is performed by proportionally distributing the four points according to the positional relationship with one not- existing vertex.
【請求項2】前記位置歪み補正対象の画像データは認識
された文字及び記号又はこれらの一方を含むことを特徴
とする請求項1記載の画像データの位置歪み補正方法。
2. A displacement correction method of the image data according to claim 1, wherein the image data of the displacement correction target comprising the recognized characters and symbols or the one of them.
【請求項3】前記位置歪み補正後の画像データを囲む四
角形は表示画面上で横方向に平行な2辺と縦方向に平行
な2辺を持つ矩形であり、前記4点補正における各画素
に対する補正量の比例配分はまず、横方向成分につい
て、次に縦方向成分について行われることを特徴とする
請求項1記載の画像データの位置歪み補正方法。
3. A rectangle surrounding the image data after the positional distortion correction is a rectangle having two sides parallel to the horizontal direction and two sides parallel to the vertical direction on the display screen. 2. The method according to claim 1, wherein the proportional distribution of the correction amount is performed first for the horizontal component and then for the vertical component.
【請求項4】ベクトル化処理された二次元の画像データ
に対し位置の歪み補正を行う位置歪み補正装置であっ
て、 前記位置歪み補正対象の画像データを囲む四角形(その
各頂点を「旧頂点」と称する)と位置歪み補正後の画像
データを囲む四角形(その各頂点を「新頂点」と称す
る)とを定義し、4個の旧頂点のうち任意の3個を選択
しそれぞれを最隣接の3個の新頂点に一致させるために
必要なアフィン変換係数を算定する係数算定手段と、 この算定済みのアフィン変換係数に基づき前記旧頂点内
前記歪み補正対象のすべての画像データの要素に3点
位置歪み補正を施す3点位置歪み補正手段と、 この3点位置歪み補正後の画像データを囲む四角形の4
個の頂点のうち新頂点と一致していない1個の頂点を最
隣接の新頂点に一致させるために、前記補正後の画像デ
ータを囲む四角形の縦および横方向について前記最隣接
の新頂点と一致していない1個の頂点と一致される前記
最隣接の新頂点間の距離をそれぞれ算定する距離算定手
段と、 前記補正後の画像データを囲む四角形の縦および横方向
について、それぞれ算定した前記距離を前記 3点位置歪
み補正後の画像データの各要素にその位置と前記一致し
ていない1個の頂点との位置関係に応じて比例配分する
ことにより4点位置歪み補正を施す比例配分手段とを有
することを特徴とする画像データの位置歪み補正装置。
4. A position distortion correction device for performing position distortion correction on vectorized two-dimensional image data, comprising: a rectangle surrounding the position distortion correction target image data (each vertex is referred to as an “old vertex”). ) And a rectangle surrounding the image data after the position distortion correction (each vertex thereof is referred to as a “new vertex”), and arbitrary three of the four old vertices are selected, and each is selected as the nearest neighbor. 3 and coefficient calculating means for calculating an affine transformation coefficients necessary to match the new vertex, the old vertices inside based on the affine transformation coefficients of the calculation already
A three-point position distortion correcting means for performing three-point position distortion correction on all image data elements to be subjected to the distortion correction, and a square 4 surrounding the image data after the three-point position distortion correction.
In order to match one of the vertices that does not match the new vertex to the nearest new vertex, the image data after the correction
The nearest neighbor in the vertical and horizontal directions of the rectangle surrounding the data
Is matched with one vertex that does not match the new vertex of
A distance calculator that calculates the distance between the nearest new vertices.
Steps and vertical and horizontal directions of a square surrounding the corrected image data
For each element of the image data after the three-point position distortion correction ,
Prorated to in accordance with the positional relationship between one vertex not
Proportional distribution means for correcting four-point position distortion.
An apparatus for correcting positional distortion of image data.
JP3303936A 1991-10-23 1991-10-23 Method and apparatus for correcting positional distortion of image data Expired - Fee Related JP2706711B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3303936A JP2706711B2 (en) 1991-10-23 1991-10-23 Method and apparatus for correcting positional distortion of image data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3303936A JP2706711B2 (en) 1991-10-23 1991-10-23 Method and apparatus for correcting positional distortion of image data

Publications (2)

Publication Number Publication Date
JPH06131452A JPH06131452A (en) 1994-05-13
JP2706711B2 true JP2706711B2 (en) 1998-01-28

Family

ID=17927068

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3303936A Expired - Fee Related JP2706711B2 (en) 1991-10-23 1991-10-23 Method and apparatus for correcting positional distortion of image data

Country Status (1)

Country Link
JP (1) JP2706711B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007081896A (en) * 2005-09-15 2007-03-29 Fuji Xerox Co Ltd Automatic document feeder, and image reading device and image forming device using the same

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6972089B2 (en) * 2016-03-10 2021-11-24 キヤノン株式会社 Image processing equipment, image processing methods, and programs

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01320579A (en) * 1988-06-22 1989-12-26 Tokyo Gas Co Ltd Graphic processing mechanism

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007081896A (en) * 2005-09-15 2007-03-29 Fuji Xerox Co Ltd Automatic document feeder, and image reading device and image forming device using the same
JP4665681B2 (en) * 2005-09-15 2011-04-06 富士ゼロックス株式会社 Image forming apparatus
US7957613B2 (en) 2005-09-15 2011-06-07 Fuji Xerox Co., Ltd. Automatic original feeding device, and image reader and image forming apparatus using automatic original feeding device

Also Published As

Publication number Publication date
JPH06131452A (en) 1994-05-13

Similar Documents

Publication Publication Date Title
US5539534A (en) Method of scaling an image capable of line width preservation
US7313289B2 (en) Image processing method and apparatus and computer-readable storage medium using improved distortion correction
KR100525425B1 (en) Image warping method and apparatus
JP2001512265A (en) Texture mapping in 3D computer graphics
US5864639A (en) Method and apparatus of rendering a video image
JPH0816795A (en) Method and apparatus for improvement of edge of pixel image
JP2964841B2 (en) Data converter
JP3057935B2 (en) Character output device
US20080025641A1 (en) Apparatus and method to rotate a bitmap image
JP2706711B2 (en) Method and apparatus for correcting positional distortion of image data
EP0472455B1 (en) Reproduction of image pattern data
JPH05298417A (en) Picture aligning device and its usage
JP2918465B2 (en) Image processing method
CN114495105A (en) Image tilt correction method, device, storage medium and computer equipment
JP4374778B2 (en) Image distortion correction processing device
JP3065855B2 (en) Image processing device
JP3212873B2 (en) Tone image generation method
JPH05151350A (en) Image data position distortion correction method
JP2706744B2 (en) Image data position distortion correction method
JPH0668247A (en) Method and device for varying power of digital image data
JPH10340337A (en) Correction method for inclination, extension and contraction of image data of drawing with drawing frame line graphic
JPH06259531A (en) Method for correcting inclination of dot pattern
JPH0573026A (en) Character figure generation method
CN119520750A (en) Projection device, projection picture correction method and storage medium
JPH1153513A (en) Method and device for setting region in image

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19970325

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19970902

LAPS Cancellation because of no payment of annual fees