JP2003281207A - Figure shaping program - Google Patents
Figure shaping programInfo
- Publication number
- JP2003281207A JP2003281207A JP2002076822A JP2002076822A JP2003281207A JP 2003281207 A JP2003281207 A JP 2003281207A JP 2002076822 A JP2002076822 A JP 2002076822A JP 2002076822 A JP2002076822 A JP 2002076822A JP 2003281207 A JP2003281207 A JP 2003281207A
- Authority
- JP
- Japan
- Prior art keywords
- original
- rectangle
- simplified
- graphic
- base line
- 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
- 238000000034 method Methods 0.000 claims abstract description 33
- 230000005484 gravity Effects 0.000 claims description 25
- 238000000605 extraction Methods 0.000 claims description 21
- 238000007493 shaping process Methods 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 11
- 230000003247 decreasing effect Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 102100033040 Carbonic anhydrase 12 Human genes 0.000 description 1
- 101100321670 Fagopyrum esculentum FA18 gene Proteins 0.000 description 1
- 101000867855 Homo sapiens Carbonic anhydrase 12 Proteins 0.000 description 1
- 238000005452 bending Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000001788 irregular Effects 0.000 description 1
Landscapes
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
- Image Analysis (AREA)
Abstract
(57)【要約】
【課題】 原図形の直線化及び直角補正を自動処理す
る。
【解決手段】 原図形に対するXY座標軸に平行な辺を
有する外接矩形と原図形との接点を順次結んで単純化図
形を求め、その最長辺を基線とする。次いで、原図形に
対して基線方向に平行な辺を有する第2の外接矩形を作
成し、第2の外接矩形を原図形と等積の等積矩形に変換
した後、等積矩形と原図形との重複率を算出し、重複率
が所定値以上の場合には等積矩形を整形図形とし、重複
率が所定値以下の場合には、基線方向を基準にメッシュ
で原図形を覆い、原図形に対するメッシュの重複率が所
定値以上のメッシュを選択連結して整形図形とする。
(57) [Summary] [PROBLEMS] To automatically process linearization and right angle correction of an original figure. SOLUTION: A simplified figure is obtained by sequentially connecting a contact point between a circumscribed rectangle having sides parallel to the XY coordinate axes with respect to the original figure and the original figure, and the longest side is set as a base line. Next, a second circumscribed rectangle having sides parallel to the base line direction with respect to the original figure is created, and the second circumscribed rectangle is converted into an equal-area rectangle of the same figure as the original figure. When the overlap rate is equal to or greater than a predetermined value, the equal-size rectangle is defined as a shaped figure, and when the overlap rate is equal to or less than the predetermined value, the original figure is covered with a mesh based on the base line direction. A mesh whose overlap ratio of the mesh with the figure is equal to or more than a predetermined value is selectively connected to form a shaped figure.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、建物図形のような
不定形図形の直線化及び直角補正を自動処理する図形整
形プログラムに関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a graphic shaping program for automatically processing linearization and right-angle correction of an irregular graphic such as a building graphic.
【0002】[0002]
【従来の技術】図面や航空写真から自動でベクトル化し
て取得される建物等の形状については、ピクセル単位で
取得される関係上斜めの線は直線とはならず、また画像
からエッジを判断して形状を取得する際にもばらつきが
でてくる。したがって、一般に図面や航空写真から取得
される図形はガタガタ折れ曲がっており、これを地図に
する際には見栄えをよくする、データ量を圧縮するとい
った目的で、ガタガタ折れ曲がった線を直線化し、その
間の角を直角に補正する必要があった。2. Description of the Related Art Regarding shapes of buildings and the like that are automatically vectorized from drawings and aerial photographs, diagonal lines are not straight lines because of the pixel-by-pixel relationship, and edges are judged from images. Variation also appears when acquiring the shape. Therefore, generally, the figures obtained from drawings and aerial photographs are rattlingly bent, and for the purpose of improving the appearance when compressing this into a map and compressing the amount of data, the rattling bent line is linearized, and in between. It was necessary to correct the corners at right angles.
【0003】すなわち、実際の建物の外形は、角が直角
で角と角の間は直線となっている、というものが大半で
あること、また、建物は、土地の区割りや道路に正対し
て建てられている、といった形態がやはり大半であるこ
とから、工事用の施工管理図といった特殊な用途の大縮
尺図を除き、地図表現の見映え上建物は矩形によった表
現が通常であること、また、建物形状を土地の区割りや
道路に正対させる際、ガタガタ折れ曲がった形状のまま
では歪んだ形状に見えてしまうことからも、直線化ない
し直角補正は必要な処理であった。従来、図形の直角補
正は、表示画面上でオペレータが目視で判断して修正し
たり、オペレータが基準となる線を選択又は入力して基
準線を決定し、その後直角に近い角になるように自動補
正していた(特開平8−180182号参照)。That is, most of the outer shapes of actual buildings are that the corners are right angles and straight lines are formed between the corners. Moreover, the building is directly confronted with land divisions and roads. Since most of the forms are built, except for large-scale maps for special purposes such as construction control charts for construction, the appearance of the map is usually represented by rectangles. In addition, straightening or right-angle correction was necessary because the shape of a building would look distorted if it was left in a rattling bent shape when it was directly aligned with a land division or a road. Conventionally, the correction of the right angle of the figure is performed by the operator visually judging and correcting it on the display screen, or the operator selects or inputs the reference line to determine the reference line, and then the angle becomes close to a right angle. It was automatically corrected (see Japanese Patent Laid-Open No. 8-180182).
【0004】[0004]
【発明が解決しようとする課題】しかし、オペレータを
介さずに、直線化ないし直角補正を完全に自動化したも
のは存在しなかった。本発明の目的は、原図形の直線化
と直角補正を同時に自動処理する図形整形プログラムを
提供することである。However, there has not been a fully automatic linearization or right-angle correction without an operator. An object of the present invention is to provide a graphic shaping program that automatically processes straightening and orthogonal correction of an original graphic at the same time.
【0005】[0005]
【課題を解決するための手段】本発明は、上記目的を達
成するために、原図形を単純化して基線を抽出し、基線
を基準に原図形の等積矩形を得て整形図形とするか、基
線を基準にメッシュを選択連結して整形図形とするもの
であり、また等積矩形を得た後、等積矩形と原図形の面
積重複率を算出し、所定値以上の場合には前記等積矩形
を整形図形とし、前記重複率が所定値以下の場合には、
メッシュを選択連結して整形図形とするものである。According to the present invention, in order to achieve the above object, is it necessary to simplify an original figure to extract a base line and obtain an equal-area rectangle of the original figure with the base line as a reference to form a shaped figure. , A mesh is selected and connected based on a baseline to form a shaped figure, and after obtaining an equal area rectangle, the area overlap ratio of the equal area rectangle and the original figure is calculated. If the equal area rectangle is a shaped figure and the overlap rate is less than or equal to a predetermined value,
A mesh is selectively connected to form a shaped figure.
【0006】本発明によれば、基線抽出ステップでは、
原図形に対して第1の外接矩形を形成し、原図形と第1
の外接矩形との接点を順次結んで単純化図形を求め、単
純化図形の最長辺を基線として抽出し、整形図形を得る
ステップでは、基線に平行な辺を有する原図形の第2の
外接矩形を求め、第2の外接矩形を原図形と等積の等積
矩形に変換して、該等積矩形を求める整形図形とする図
形整形プログラムが提供される。According to the present invention, in the baseline extraction step,
A first circumscribed rectangle is formed for the original figure and
In the step of obtaining a shaped figure by extracting the longest side of the simplified figure by sequentially connecting the points of contact with the circumscribed rectangle of the original figure, the second circumscribed rectangle of the original figure having a side parallel to the base line is obtained. Is provided, and the second circumscribing rectangle is converted into an equal-area rectangle that is equal in area to the original figure, and a figure-shaping program that provides the equal-area rectangle as a shaped figure is provided.
【0007】また、前記基線抽出ステップの後、整形図
形を得るステップでは、基線に平行な直線と垂直な直線
からなるメッシュで原図形を覆い、原図形に対する各メ
ッシュの重複率が所定の値以上となるメッシュを選択連
結して整形図形とする図形整形プログラムが提供され
る。また、前記基線抽出ステップの後、整形図形を得る
ステップでは、等積図形を得て、前記等積矩形と原図形
との重複率を算出し、所定値以上の場合には前記等積矩
形を整形図形とし、前記重複率が所定値以下の場合に
は、前記基線に平行な直線と直交する直線からなるメッ
シュで原図形を覆い、原図形に対するメッシュの重複率
が所定の値以上となるメッシュを選択連結して整形図形
とする図形整形プログラムが提供される。In the step of obtaining a shaped figure after the baseline extraction step, the original figure is covered with a mesh consisting of straight lines parallel to the baseline and vertical lines, and the overlapping rate of each mesh with respect to the original figure is equal to or more than a predetermined value. A shape shaping program for selectively connecting meshes to be shaped into a shaped shape is provided. Further, in the step of obtaining the shaped figure after the baseline extraction step, the equal area figure is obtained, and the overlapping ratio of the equal area rectangle and the original figure is calculated. If the shape is a shaped figure, and if the overlap rate is less than or equal to a predetermined value, the original figure is covered with a mesh consisting of straight lines parallel to the base line, and the overlap rate of the mesh with respect to the original figure becomes a predetermined value or more. A figure shaping program for selectively connecting and forming a figure is provided.
【0008】本発明によれば、等積矩形に変換する際
に、第2の外接矩形を縦横比一定、重心不変で等積矩形
に変換することもできる。また、メッシュを第2の外接
矩形の重心を基準として配置すること、メッシュのサイ
ズ又は前記メッシュの重複率には所望の値を入力するこ
と、メッシュのサイズを、原図形の面積をほぼ100分
割する正方形とすることもできる。According to the present invention, the second circumscribed rectangle can be converted into the equal-area rectangle without changing the aspect ratio and without changing the center of gravity when converting into the equal-area rectangle. Further, the mesh is arranged with the center of gravity of the second circumscribing rectangle as a reference, a desired value is input to the mesh size or the mesh overlap ratio, and the mesh size is divided into approximately 100 areas of the original figure. It can also be a square.
【0009】さらに、本発明によると、図形整形の基準
となる基線を抽出する基線抽出プログラムであって、原
図形に対して外接矩形を形成し、該外接矩形と原図形の
接点を順次結んで単純化図形を求めるステップと、前記
単純化図形の最長辺を基線として抽出させるステップと
を備えるものが提供され、さらに、第1の単純化図形と
原図形との差分をとり、各差分に対して外接矩形を形成
し、該外接矩形と原図形の接点を第1の単純化図形に付
加して順次結んで得られる第2の単純化図形を求めるス
テップとを備える基線抽出プログラムも提供される。こ
の場合、単純化図形を求めるステップは、入力される単
純化回数に従って、第2の単純化図形を求めるステップ
を所定回数繰り返すこともできる。本発明の図形整形プ
ログラムと基線抽出プログラムをとを適宜組み合わせる
ことも可能である。Further, according to the present invention, there is provided a base line extraction program for extracting a base line which serves as a reference for shaping a figure, wherein a circumscribed rectangle is formed with respect to the original figure, and the circumscribed rectangle and the contact point of the original figure are sequentially connected. There is provided a method including a step of obtaining a simplified figure and a step of extracting the longest side of the simplified figure as a base line. Further, the difference between the first simplified figure and the original figure is obtained, and for each difference And a circumscribing rectangle is formed to add a contact point between the circumscribing rectangle and the original figure to the first simplified figure to sequentially obtain a second simplified figure, and a base line extraction program is also provided. . In this case, in the step of obtaining the simplified figure, the step of obtaining the second simplified figure may be repeated a predetermined number of times in accordance with the number of times of simplification input. It is also possible to appropriately combine the figure shaping program and the baseline extraction program of the present invention.
【0010】[0010]
【発明の実施の形態】図を参照して、本発明の実施の形
態を説明する。図1は、以下に詳細に説明する実施形態
の概要である。本例は、原図形の基線抽出ステップ10
0と、整形図形生成ステップ200とからなり、整形図
形生成ステップ200は、等積矩形生成ステップ210
と、整形図形選択ステップ220とからなる。まず、基
線抽出ステップ100において基線を求め、等積矩形生
成ステップ210においてその基線を基準に等積矩形を
生成し、整形図形選択ステップ220においてこの等積
矩形を求める整形図形として採用するか、そうでなけれ
ば基線を基準に原図形をメッシュで覆い、原図形に係る
メッシュを連結して矩形を生成し、これを求める整形図
形とするものである。DETAILED DESCRIPTION OF THE INVENTION An embodiment of the present invention will be described with reference to the drawings. FIG. 1 is an outline of an embodiment described in detail below. In this example, the baseline extraction step 10 of the original figure is performed.
0 and a shaped figure generation step 200. The shaped figure generation step 200 includes an equal area rectangle generation step 210.
And a shaped figure selection step 220. First, in the baseline extraction step 100, a baseline is obtained, in the equal area rectangle generation step 210, an equal area rectangle is generated with reference to the baseline, and in the shaped figure selection step 220, this equal area rectangle is adopted as a shaped figure to be obtained. Otherwise, the original figure is covered with a mesh on the basis of the base line, the meshes related to the original figure are connected to generate a rectangle, and this is a shaped figure to be obtained.
【0011】以下に説明する実施形態1では、等積矩形
と原図形との面積重複率が設定値より高く、等積な矩形
を整形図形として採用する。実施形態2は、等積矩形と
原図形との面積重複率が設定値より低く、原図形を覆う
メッシュを作成し所定のメッシュを連結した図形を整形
図形とする。実施の形態を説明する図1〜9では、説明
のために表示画面上での図形を示すが、実際の図形整形
の過程は画面上に表示されることはない。In the first embodiment described below, the area overlapping ratio of the equal area rectangle and the original figure is higher than the set value, and the equal area rectangle is adopted as the shaped figure. In the second embodiment, the area overlapping ratio between the equal-area rectangle and the original figure is lower than the set value, and a figure covering the original figure is created and a figure in which a predetermined mesh is connected is used as the shaped figure. 1 to 9 for explaining the embodiment, a figure on the display screen is shown for the sake of explanation, but the actual figure shaping process is not displayed on the screen.
【0012】(実施形態1)図2〜4は、原図形に対し
て基線を求め、基線を基準に等積図形を求めて整形図形
とする第1の実施の形態を説明する図である。図2は、
第1の単純化図形を得るまでを示し、図3は、基線を決
定するまでを示し、図4は、整形図形を得るまでを示
す。図2(a)には、説明のための表示画面D上に頂点
の座標p1〜p10がプロットされた原図形1を示す。
他の図の外枠も表示画面Dを示すが、符号Dは省略し
た。(Embodiment 1) FIGS. 2 to 4 are views for explaining a first embodiment in which a base line is obtained for an original figure, and an equal-volume figure is obtained with the base line as a reference to form a shaped figure. Figure 2
It shows up to obtaining a first simplified figure, FIG. 3 shows up to determining a baseline, and FIG. 4 shows up to obtaining a shaped figure. FIG. 2A shows an original figure 1 in which the coordinates p1 to p10 of the vertices are plotted on the display screen D for explanation.
The outer frame of the other figures also shows the display screen D, but the symbol D is omitted.
【0013】整形の対象となる原図形は、たとえば、ス
キャンニングされた図面、航空写真、衛星写真などの画
像から自動でベクトル化したものである。このベクトル
化の手段は公知のものを用いる。原図形は、説明のため
に、次の座標(X,Y)で与えられる10の頂点を有す
るポリゴン(面積 74.44m2)とする。後に説明するよ
うに、原図形の単純化回数は2回で、等積矩形と原図形
との重複率のしきい値を90%とする。単純化回数及び
重複率は、オペレータが所望の値を入力できるものであ
る。The original figure to be shaped is automatically vectorized from an image such as a scanned drawing, aerial photograph, or satellite photograph. A known means is used for this vectorization. For the sake of explanation, the original figure is a polygon (area 74.44 m 2 ) having 10 vertices given by the following coordinates (X, Y). As will be described later, the number of simplifications of the original figure is two, and the threshold value of the overlapping rate of the equal-area rectangle and the original figure is 90%. The number of simplifications and the duplication rate can be entered by the operator.
【0014】 頂点 X Y p1 17.981 28.762 p2 20.509 32.340 p3 22.725 35.412 p4 24.787 39.846 p5 27.703 38.134 p6 30.776 38.690 p7 27.276 32.845 p8 25.331 28.801 p9 23.387 26.506 p10 20.975 27.245[0014] Apex XY p1 17.981 28.762 p2 20.509 32.340 p3 22.725 35.412 p4 24.787 39.846 p5 27.703 38.134 p6 30.776 38.690 p7 27.276 32.845 p8 25.331 28.801 p9 23.387 26.506 p10 20.975 27.245
【0015】図2(b)に示すように、原図形に1対し
て、所定のXY座標系(通常、表示画面の水平垂直方向
をXY方向とする。)のX軸及びY軸に平行な辺を有す
る矩形であって、原図形に外接するものを作成し、原図
形との接点を求める。実際には、X座標が最大最小とな
る点、Y座標が最大最小となる点を求めることになる。
本例では、X座標が最大となる点は頂点p6、最小とな
る点は頂点p1、Y座標が最大となる点は頂点p4、最
小となる点は頂点p9である。As shown in FIG. 2 (b), the X-axis and Y-axis of a predetermined XY coordinate system (usually the horizontal and vertical directions of the display screen are the XY directions) are parallel to the original figure. A rectangle having sides that circumscribes the original figure is created, and the contact point with the original figure is obtained. Actually, the point where the X coordinate is maximum and minimum and the point where the Y coordinate is maximum and minimum are obtained.
In this example, the point having the maximum X coordinate is the vertex p6, the point having the minimum X coordinate is the vertex p1, the point having the maximum Y coordinate is the vertex p4, and the minimum point is the vertex p9.
【0016】次いで、図2(c)に示すように、抽出し
た4つの頂点を順次結線し、第1次単純化図形を作成す
る。さらに、図3(a)に示すように、原図形と第1次
単純化図形2との差分d1〜d5を抽出し、抽出した差
分に対して図3(b)と同様の単純化処理を行う。すな
わち、各差分に対して、X軸Y軸に平行な辺を有する外
接矩形を作成し、その接点を抽出し、第1次単純化図形
の頂点ではない接点が得られると、それを追加して接点
間を順次結び、第2次単純化図形3とする。Next, as shown in FIG. 2C, the four extracted vertices are sequentially connected to create a first-order simplified figure. Further, as shown in FIG. 3A, the differences d1 to d5 between the original figure and the first-order simplified figure 2 are extracted, and the same simplification process as in FIG. 3B is performed on the extracted differences. To do. That is, for each difference, a circumscribing rectangle having sides parallel to the X-axis and Y-axis is created, its contact points are extracted, and when a contact point that is not the vertex of the first-order simplified figure is obtained, it is added. The contact points are sequentially connected to form a second simplified figure 3.
【0017】本例の場合、差分d1では、差分と外接矩
形との接点はp1とp2の2点であり、結果的に追加す
べき点はでてこない。すなわち、差分d1は無視してよ
い差分であるということになる。また、差分d3では、
差分と外接矩形との接点はp6とpxの2点であり、こ
の差分d3も無視してよいものである。接点pxは、第
1次単純化図形2の辺上の点であり、抽出されるものの
第2次単純化図形3の頂点としては現れない。その他の
差分d2、d4及びd5についても同様に、新しく頂点
として追加される点は現れない。したがって、本例の場
合は、第1次単純化図形2と第2次単純化図形3とは同
じ図形になる。In the case of this example, in the difference d1, the points of contact between the difference and the circumscribing rectangle are two points p1 and p2, and as a result, there are no points to be added. That is, the difference d1 is a difference that can be ignored. Further, in the difference d3,
There are two points of contact between the difference and the circumscribed rectangle, p6 and px, and this difference d3 can also be ignored. The contact point px is a point on the side of the primary simplified graphic 2 and is extracted but does not appear as a vertex of the secondary simplified graphic 3. Similarly, for the other differences d2, d4, and d5, no point newly added as a vertex does not appear. Therefore, in the case of this example, the first simplified figure 2 and the second simplified figure 3 are the same figure.
【0018】一般的には、第2次の単純化は、第1の単
純化図形に対して差分の増減処理を行うことで、第1次
単純化で失われた特徴部分をある程度回復することにな
る。また、必要に応じて、第2次単純化図形と原図形と
の差分に対してもさらに単純化処理を行ってもよく、次
々と単純化処理を行うことができる。この単純化処理を
何回行うかは、単純化処理の回数を指定することによっ
て行われる。本例では、単純化処理は2回行う設定とな
っている。Generally, in the second-order simplification, the feature part lost in the first-order simplification is recovered to some extent by performing a difference increasing / decreasing process on the first simplified graphic. become. Further, if necessary, the simplification process may be further performed on the difference between the secondary simplified figure and the original figure, and the simplification process can be performed one after another. The number of times of the simplification processing is performed by designating the number of times of the simplification processing. In this example, the simplification process is set to be performed twice.
【0019】図3(b)に示すように、第2次単純化図
形3を得て、第2次単純化図形3の各辺の長さを比較
し、最長辺を基線Lとする。この後は、基線Lを基準に
整形処理を進めることになる。図3(c)には、基線L
と原図形1の関係を示す。基線抽出処理が終わると、次
に、基線LをX軸に平行になるように原図形1を回転さ
せる。図4(a)に、原図形1の回転の結果を示す。一
般には原図形の回転は必須のものではない。以下の外接
矩形の形成あるいはメッシュ化など、回転を行わなくて
も可能である。しかし、回転させた方が矩形を作成する
アルゴリズムが簡単になり、メッシュの設定もスムース
に行うことができ、全体での処理ステップが減少する。As shown in FIG. 3B, the secondary simplified figure 3 is obtained, the lengths of the sides of the secondary simplified figure 3 are compared, and the longest side is set as the base line L. After that, the shaping process is performed with reference to the base line L. In FIG. 3C, the baseline L
And the original figure 1 are shown. After the base line extraction processing is completed, the original figure 1 is rotated so that the base line L is parallel to the X axis. FIG. 4A shows the result of rotation of the original figure 1. Generally, the rotation of the original figure is not essential. The following circumscribed rectangles can be formed or meshed without rotation. However, the rotation makes the algorithm for creating the rectangle simpler, the mesh can be set smoothly, and the overall processing steps are reduced.
【0020】そして、図4(a)に示すように、基線L
がX軸に平行になるように原図形1を回転した回転図形
1’に対して、基線に平行な辺をもつ外接矩形4を形成
し、その重心Gを求める。実際は、外接矩形は、XY座
標各々の最大値と最小値からなる4点を求めることによ
って得られる。外接矩形4の重心Gは外接矩形の対角線
の交点を求めることによって得られる。あるいはもっと
単純に、(最大X座標+最小X座標)/2、(最大Y座
標+最小Y座標)/2で求めても同じ結果が得られる。Then, as shown in FIG. 4 (a), the base line L
A circumscribing rectangle 4 having a side parallel to the base line is formed for a rotating figure 1 ′ obtained by rotating the original figure 1 so that is parallel to the X axis, and the center of gravity G thereof is obtained. Actually, the circumscribed rectangle is obtained by obtaining four points each having the maximum value and the minimum value of each XY coordinate. The center of gravity G of the circumscribed rectangle 4 is obtained by finding the intersection of the diagonal lines of the circumscribed rectangle. Alternatively, the same result can be obtained by more simply obtaining (maximum X coordinate + minimum X coordinate) / 2 and (maximum Y coordinate + minimum Y coordinate) / 2.
【0021】図4(b)で示す処理は、外接矩形4を原
図形1と等積の等積矩形5に変換し、等積矩形5と回転
図形1’との重複率を求めるものである。すなわち、外
接矩形4の重心を移動させることなく、外接矩形4の縦
横比に比例して縦横を伸縮させ、外接矩形4が原図形1
の面積と同面積になるようにする。このようにして求め
る等積矩形5が得られる。In the process shown in FIG. 4B, the circumscribed rectangle 4 is converted into an equal-area rectangle 5 that is equal in volume to the original figure 1, and the overlap rate between the equal-area rectangle 5 and the rotated figure 1'is obtained. . That is, the circumscribing rectangle 4 is expanded and contracted in proportion to the aspect ratio of the circumscribing rectangle 4 without moving the center of gravity of the circumscribing rectangle 4, so that the circumscribing rectangle 4 becomes the original figure 1.
The area should be the same as the area of. In this way, the equal-area rectangle 5 obtained is obtained.
【0022】そして、等積矩形5と回転図形1’との重
複率を求めるために、等積矩形5と回転図形1’との重
複面積を求める。本例では、重複面積は70.08m2
であった。原図形の面積は、74.44m2であるか
ら、重複率は、94.15%となる。求めた重複率と所
定の設定値90%と比較する。重複率は設定値以上であ
るから、等積矩形5を原図形1の整形図形として採用す
る。等積矩形は直線化も直角化も完了しており、原図形
1との重複率も90%を超えて、原図形1の整形図形と
してよいものである。Then, in order to obtain the overlapping rate of the equal-area rectangle 5 and the rotating figure 1 ', the overlapping area of the equal-area rectangle 5 and the rotating figure 1'is obtained. In this example, the overlapping area is 70.08m 2
Met. Since the area of the original figure is 74.44 m 2 , the overlap rate is 94.15%. The calculated overlap rate is compared with a predetermined set value of 90%. Since the overlapping rate is equal to or more than the set value, the equal area rectangle 5 is adopted as the shaping figure of the original figure 1. The equal-area rectangle has been completely linearized and right-angled, and the overlapping rate with the original figure 1 exceeds 90%, which is a good shape figure of the original figure 1.
【0023】次いで、図4(c)に示すように、この等
積矩形を逆回転して、元の位置に戻せば、求める直線化
及び直角補正がされた整形図形6が得られる。なお、回
転処理をしない場合には、この逆回転処理も必要がな
い。Next, as shown in FIG. 4 (c), by rotating the equal-area rectangle in the reverse direction and returning it to the original position, the shaped figure 6 on which the desired linearization and right-angle correction have been made can be obtained. If the rotation process is not performed, the reverse rotation process is not necessary.
【0024】ちなみに、整形図形6の座標(X,Y)は
次のとおりで、面積は74.44m2である。
頂点 X Y
q1 18.579 29.142
q2 25.040 39.665
q3 30.178 36.510
q4 23.176 25.987
このようにして、図2(a)で示した原図形1の直線化
直角化された図形が図4(c)に示す整形図形6として
得られたことになる。By the way, the coordinates (X, Y) of the shaped figure 6 are as follows, and the area thereof is 74.44 m 2 . Vertex XY q1 18.579 29.142 q2 25.040 39.665 q3 30.178 36.510 q4 23.176 25.987 Thus, the straightened and squared figure of the original figure 1 shown in FIG. 2 (a) is shaped figure 6 shown in FIG. 4 (c). Will be obtained as.
【0025】(実施形態2)次に、図5〜9を参照し
て、原図形に対して基線を求め、基線を基準にメッシュ
で原図形を覆って、メッシュを抽出連結することによっ
て求める整形図形とする第2の実施の形態を説明する。
この実施例では、図5に示される10個の頂点p1〜p
10をもつ図形(面積106.05m2)を原図形10
とする。原図形の座標(X,Y)は、次のとおりであ
る。(Embodiment 2) Next, referring to FIGS. 5 to 9, a base line is found for the original figure, the original figure is covered with a mesh on the basis of the base line, and the mesh is extracted and connected for shaping. A second embodiment of a figure will be described.
In this embodiment, the 10 vertices p1 to p shown in FIG.
A figure with 10 (area 106.05m 2 ) is the original figure 10
And The coordinates (X, Y) of the original figure are as follows.
【0026】
頂点 X Y
p1 -6.315 25.367
p2 -7.194 27.905
p3 -8.779 30.282
p4 -4.145 32.739
p5 -6.017 35.497
p6 2.474 39.916
p7 4.217 36.354
p8 6.695 32.716
p9 2.954 30.257
p10 -2.403 28.123
単純化回数は2回、原図形と等積矩形との重複率しきい
値は90%、直角化処理のためのメッシュサイズは、式
sqrt(面積106.65÷100)で求め、1.0
3mである。メッシュ採用率は50%である。メッシュ
サイズ、メッシュ採用率は、単純化回数及び重複率しき
い値と同様、所望の値を入力することができる。Vertex XY p1 -6.315 25.367 p2 -7.194 27.905 p3 -8.779 30.282 p4 -4.145 32.739 p5 -6.017 35.497 p6 2.474 39.916 p7 4.217 36.354 p8 6.695 32.716 p9 2.954 30.257 p10 -2.403 28.123 The overlapping rate threshold value of the figure and the equal-area rectangle is 90%, and the mesh size for the orthogonalization processing is calculated by the equation sqrt (area 106.65 ÷ 100) and is 1.0
It is 3m. The mesh adoption rate is 50%. As for the mesh size and mesh adoption rate, desired values can be input as in the simplification count and the overlap rate threshold value.
【0027】実施形態1とフローが共通する部分につい
ては、適宜省略して説明する。図5(b)は、第1次単
純化の過程を示す。原図形に対して、XY座標軸に平行
な辺を有する矩形であって、原図形に外接するものを作
成し、原図形との接点を求める。接点は、X座標が最大
最小となる点(頂点p6及びp1)、Y座標が最大最小
となる点(頂点p4及びp9)である。Portions having the same flow as in the first embodiment will be omitted as appropriate in the description. FIG. 5B shows the process of the first simplification. A rectangle having sides parallel to the XY coordinate axes with respect to the original figure and circumscribing the original figure is created, and a contact point with the original figure is obtained. The contact points are points where the X coordinate has the maximum and minimum (vertices p6 and p1) and the Y coordinate has the maximum and minimum (vertices p4 and p9).
【0028】次いで、図5(c)に示すように、抽出し
た4つの頂点を順次結線し、第1次単純化図形20を作
成する。図6(a)に示すように、原図形10と第1次
単純化図形20との差分d1〜d6を抽出し、抽出した
差分d1〜d6に対して第2次の単純化処理を行う。す
なわち、各差分に対して、座標軸に平行な辺を有する外
接矩形を作成し、その接点を抽出し、第1次単純化図形
20の頂点ではない接点が得られると、それを追加して
接点間を順次んで第2次単純化図形30とする。Next, as shown in FIG. 5C, the four extracted vertices are sequentially connected to create a first-order simplified figure 20. As shown in FIG. 6A, the differences d1 to d6 between the original figure 10 and the first-order simplified figure 20 are extracted, and the second-order simplification processing is performed on the extracted differences d1 to d6. That is, for each difference, a circumscribing rectangle having a side parallel to the coordinate axis is created, its contact point is extracted, and when a contact point that is not the vertex of the first-order simplified figure 20 is obtained, it is added to the contact point. The spaces are sequentially arranged to form the secondary simplified graphic 30.
【0029】差分d2の場合に外接矩形を図示したが、
差分と外接矩形との接点はp4とr1とr2の3点であ
り、第1次単純化図形20に付加する点はr1とr2と
いうことになる。この場合、差分d2は増やす部分とな
る。差分d1については、同様な処理をすることによっ
て、差分d1が減らす部分として現れる。その他の差分
d3〜d6については、各差分と外接矩形との接点が2
点しか出てこないので、増減処理すべき差分としては現
れない。図6(b)に、増減すべき差分d1、d2を示
す。このように、第2次の単純化は、第1の単純化図形
20に対して差分の増減処理を行うことで、第1次単純
化で失われた特徴部分をある程度回復することになる。
この単純化処理を何回行うかは、単純化処理の回数を指
定することによって行われる。Although the circumscribed rectangle is shown in the case of the difference d2,
The points of contact between the difference and the circumscribed rectangle are p4, r1 and r2, and the points added to the first-order simplified figure 20 are r1 and r2. In this case, the difference d2 is to be increased. The difference d1 appears as a portion where the difference d1 is reduced by performing similar processing. For the other differences d3 to d6, the contact point between each difference and the circumscribed rectangle is 2
Since only points appear, it does not appear as a difference to be increased or decreased. FIG. 6B shows the differences d1 and d2 to be increased / decreased. As described above, in the second-order simplification, the difference part is increased / decreased with respect to the first simplified figure 20 to recover the characteristic portion lost in the first-order simplification to some extent.
The number of times of the simplification processing is performed by designating the number of times of the simplification processing.
【0030】図6(c)に示すように、第2次単純化図
形30を得て、第2次単純化図形30の各辺の長さを比
較し、最長辺を基線Lとする。第1次単純化図形20に
おける最長辺とは異なる辺が選択されており、原図形に
対応させると適切な辺が基線Lとして選択されているこ
とがわかる。この後は、基線を基準に整形処理を進める
ことになる。基線抽出処理が終わると、次に、基線Lを
X軸に平行になるように原図形を回転させる。図7
(a)に、回転の結果を示す。この図形の回転は、実施
形態1で説明したように必須のものではない。しかし、
回転させた方が矩形を作成するアルゴリズムが簡単にな
り、メッシュ化もスムースに行うことができ、全体での
処理ステップが減少する。As shown in FIG. 6C, the secondary simplified graphic 30 is obtained, the lengths of the sides of the secondary simplified graphic 30 are compared, and the longest side is set as the base line L. It can be seen that a side different from the longest side in the primary simplified graphic 20 is selected, and an appropriate side is selected as the base line L when corresponding to the original graphic. After this, the shaping process will proceed based on the baseline. When the base line extraction processing is completed, the original figure is then rotated so that the base line L is parallel to the X axis. Figure 7
The result of rotation is shown in (a). The rotation of this figure is not essential as described in the first embodiment. But,
Rotating simplifies the algorithm for creating rectangles, allows smooth meshing, and reduces the overall processing steps.
【0031】図7(a)に示すように、基線LがX軸に
平行になるように原図形10を回転した回転図形10’
に対して、基線に平行な辺をもつ外接矩形40を形成
し、その重心Gを求める。外接矩形40の重心Gは外接
矩形40の対角線の交点を求めるか、または(最大X座
標+最小X座標)/2、(最大Y座標+最小Y座標)/
2で求めることにより簡単に求めることができる。As shown in FIG. 7A, a rotated figure 10 'obtained by rotating the original figure 10 so that the base line L is parallel to the X axis.
, A circumscribing rectangle 40 having a side parallel to the base line is formed, and its center of gravity G is obtained. The center of gravity G of the circumscribed rectangle 40 is obtained by finding the intersection of the diagonal lines of the circumscribed rectangle 40, or (maximum X coordinate + minimum X coordinate) / 2, (maximum Y coordinate + minimum Y coordinate) /
It can be easily obtained by finding in 2.
【0032】図7(b)に示すように、外接矩形40の
重心を移動させることなく、外接矩形の縦横比に比例し
て縦横を伸縮させ、外接矩形40が原図形10(回転図
形10’)の面積と同面積になるようにして等積矩形5
0を求める。As shown in FIG. 7B, the circumscribing rectangle 40 is expanded or contracted in proportion to the aspect ratio of the circumscribing rectangle without moving the center of gravity of the circumscribing rectangle 40. ) The same area rectangle 5
Ask for 0.
【0033】そして、等積矩形50と回転図形10’と
の重複面積を求める。本例では、92.74m2であ
り、原図形の面積が106.05m2であるから、重複
率は、87.45%であり、重複率の予め設定した設定
値90%以下である。Then, the overlapping area of the equal area rectangle 50 and the rotating figure 10 'is obtained. In this example, a 92.74M 2, since the area of the original figure is 106.05M 2, overlap rate is 87.45%, is equal to or smaller than the set value of 90% previously set the overlap ratio.
【0034】このように、重複率が設定値を下回ると、
等積矩形50を整形図形として採用せず、メッシュによ
る直角化処理を行って、直線化及び直角補正を行う。図
8は、メッシュによる直角化を説明する図である。説明
のために、第2の実施形態のメッシュサイズとは異な
り、メッシュサイズは、原図形を約10個のセルに分割
するように、3.26(=sqrt(106.05/10))としてあ
る。In this way, when the overlap rate is below the set value,
Instead of adopting the equal-area rectangle 50 as a shaping figure, a straightening process and a right-angle correction are performed by performing a right-angle process using a mesh. FIG. 8 is a diagram for explaining the orthogonalization by the mesh. For explanation, unlike the mesh size of the second embodiment, the mesh size is set to 3.26 (= sqrt (106.05 / 10)) so as to divide the original figure into about 10 cells.
【0035】メッシュの配置の基準点は外接矩形40の
重心Gとする。図8(a)に、再度原図形を回転した回
転図形10’と外接矩形40及びその重心Gの関係を示
す。本例では、外接矩形40から等積矩形50を求めた
ときに重心を求めているので、これを利用すればよい。
しかし、外接矩形40を等積矩形50に変換して重複率
を判断する処理を経ずに、すべての図形に対してメッシ
ュによる直角化処理を行う場合には、ここで重心を求め
る。また、外接矩形40の重心ではなく、回転図形1
0’の重心を採用することもできるが、回転図形10’
(原図形10)の形状によっては中心部からずれること
も多く、メッシュサイズが大きい場合には問題となる。
したがって、本例では、外接矩形40の重心を採用して
いる。The reference point for the mesh arrangement is the center of gravity G of the circumscribed rectangle 40. FIG. 8A shows the relationship between the rotated figure 10 ′ obtained by rotating the original figure again, the circumscribed rectangle 40 and the center of gravity G thereof. In this example, the center of gravity is obtained when the equal area rectangle 50 is obtained from the circumscribing rectangle 40, so this may be used.
However, when the quadrature process is performed on all the figures without performing the process of converting the circumscribed rectangle 40 into the equal-area rectangle 50 and determining the overlap rate, the center of gravity is obtained here. In addition, not the center of gravity of the circumscribed rectangle 40, but the rotated figure 1
It is possible to use the center of gravity of 0 ', but the rotating figure 10'
Depending on the shape of the (original figure 10), it often deviates from the center portion, which becomes a problem when the mesh size is large.
Therefore, in this example, the center of gravity of the circumscribing rectangle 40 is adopted.
【0036】図8(b)には、重心Gを基準として回転
図形40を覆うメッシュMを示す。重心Gを基準として
メッシュ化するのは、メッシュサイズを大きくした場合
にも、メッシュ化する基準の影響を受けにくくするため
である。FIG. 8B shows a mesh M that covers the rotating figure 40 with the center of gravity G as a reference. The reason why the center of gravity G is used for the meshing is to make it less susceptible to the meshing standard even when the mesh size is increased.
【0037】メッシュサイズは直角化に大きな影響を与
える。メッシュサイズが大きいと原図形との重複率を計
算する個数が少ない分だけ処理は早くなるが、原図形と
かけはなれてしまうおそれがある。メッシュサイズが小
さいと逆に原図形との近似は高くなるが、重複率の計算
に時間がかかる。また、整形すべき原図形の大きさが一
定でないときは、一定のしきい値では見栄えが悪くな
る。よって、原図形の大きさによらずきれいに直角補正
をするには、原図形の大きさに従って個々に閾値を算出
すればよい。経験上、式sqrt(原図形面積÷10
0)でしきい値を算出するのがよい。The mesh size has a great influence on the orthogonalization. If the mesh size is large, the processing speeds up as much as the number of calculation of the overlap rate with the original figure is small, but there is a possibility that the original figure may be different from the original figure. On the contrary, when the mesh size is small, the approximation with the original figure becomes high, but it takes time to calculate the overlap rate. Further, when the size of the original figure to be shaped is not constant, the appearance becomes poor with a constant threshold value. Therefore, in order to perform a right angle correction irrespective of the size of the original figure, the threshold value may be calculated individually according to the size of the original figure. From experience, the formula sqrt (original figure area ÷ 10
It is better to calculate the threshold value in 0).
【0038】図8(b)に、メッシュM中に数字を記載
して重複率計算の結果を示したが、各メッシュMについ
て、回転図形との重複率を計算して、重複率50%を越
えるメッシュを抽出して結合し、求める整形図形とす
る。図8(c)とは得られた整形図形60と回転図形
(原図形)10’の形状の関係を示す。各メッシュの採
用を決める重複率のしきい値をどの程度にするかは、適
宜決めることができる。そして、整形図形60を先の回
転とは逆に同じだけ回転すれば、求める直線化及び直角
補正がされた整形図形が得られる。In FIG. 8B, the result of the overlap rate calculation is shown by writing the numbers in the mesh M. For each mesh M, the overlap rate with the rotating figure is calculated to obtain the overlap rate of 50%. Extract the meshes that exceed and combine them into the desired shaped figure. FIG. 8C shows the relationship between the shapes of the obtained shaped figure 60 and the rotated figure (original figure) 10 '. The threshold value of the overlapping rate that determines the adoption of each mesh can be appropriately determined. Then, if the shaped figure 60 is rotated by the same amount as the previous rotation, the shaped figure that has undergone the linearization and the right-angle correction to be obtained can be obtained.
【0039】図9には、実施形態2についての、直角化
処理の結果を示す。この場合、直角化処理のためのメッ
シュサイズは、原図形面積を約100分割するもので、
先に述べたように、式sqrt(面積106.65÷1
00)で求め、1.03mである。FIG. 9 shows the result of the orthogonalization process for the second embodiment. In this case, the mesh size for the orthogonalization process divides the original figure area into about 100,
As described above, the expression sqrt (area 106.65 ÷ 1
00), and is 1.03 m.
【0040】図9(a)は求めた整形図形と原図形を回
転した回転図形10’との関係を示す。メッシュサイズ
を原図形面積を約100分割するものとすれば、非常に
近似度の高い整形図形が得られている。図9(b)に
は、逆回転で元の位置に戻された整形図形60を示す。
ちなみに、この整形図形60の(X,Y)座標は次のと
おりであり、面積は102.87m2である。FIG. 9A shows the relationship between the obtained shaped figure and the rotated figure 10 'obtained by rotating the original figure. If the mesh size is divided into about 100 areas of the original figure, a shaped figure with a very high degree of approximation can be obtained. FIG. 9B shows the shaped figure 60 returned to its original position by the reverse rotation.
By the way, the (X, Y) coordinates of the shaped figure 60 are as follows, and the area is 102.87 m 2 .
【0041】
頂点 X Y
q1 -8.652 30.038
q2 -4.169 32.570
q3 -5.688 35.260
q4 2.381 39.818
q5 6.433 32.645
q6 -6.120 25.554
このようにして、図5(a)に示した原図形から図9
(b)に示すような直線化直角化された整形図形が得ら
れたことになる。Vertex XY q1 -8.652 30.038 q2 -4.169 32.570 q3 -5.688 35.260 q4 2.381 39.818 q5 6.433 32.645 q6 -6.120 25.554 Thus, from the original figure shown in FIG.
This means that a straightened and right-angled shaped figure as shown in (b) is obtained.
【0042】先に述べたように、等積矩形を求めて原図
形との重複率を評価することなく、すべて原図形に対し
てメッシュによる直角補正を行うこともできるが、家屋
形状を直角補正する場合には、極力矩形にしたいので、
重複率の大きな図形は矩形にしたほうがよい。そうする
ことにより処理ステップを減らすこともできる。重複率
のしきい値は経験上ないし見た目から判断して90%前
後がよい。As described above, it is possible to perform the right-angle correction by the mesh on all the original figures without obtaining the equal area rectangle and evaluating the overlapping ratio with the original figure. If you want to make it, I want to make it as rectangular as possible, so
It is better to make the figures with a high overlap rate rectangular. By doing so, the number of processing steps can be reduced. The threshold value of the overlapping rate is preferably around 90%, judging from experience or appearance.
【0043】次に、図10〜11に示すフローチャート
により、本発明の実施形態の一例であるフローの詳細を
説明する。図1に示した実施形態の概要との対応は次の
とおりである。図10は、基線抽出ステップ100に対
応する基線抽出までのステップS1〜S7を示し、図1
1は、整形図形生成ステップ200に対応する基線を基
準に直線化直角化を行うステップS8〜S16を示す。
整形図形生成ステップ200の等積矩形生成ステップ2
10は、ステップS8〜S11に対応し、整形図形選択
ステップ220は、ステップS11〜S16に対応す
る。まず、ステップS1(図10)で、原図形の座標を
読み出す。Next, the details of the flow, which is an example of the embodiment of the present invention, will be described with reference to the flowcharts shown in FIGS. The correspondence with the outline of the embodiment shown in FIG. 1 is as follows. FIG. 10 shows steps S1 to S7 up to baseline extraction corresponding to the baseline extraction step 100.
Reference numeral 1 denotes steps S8 to S16 in which straightening and orthogonalization are performed with the base line corresponding to the shaped figure generation step 200 as a reference.
Step 2 of equal area rectangle formation of step 200 of shaping figure
10 corresponds to steps S8 to S11, and the shaped figure selection step 220 corresponds to steps S11 to S16. First, in step S1 (FIG. 10), the coordinates of the original figure are read.
【0044】ステップS2では、所定のXY座標系(通
常表示画面の水平垂直をXY方向とする。)のX軸及び
Y軸に平行な辺を有する矩形であって、原図形に外接す
るものを作成し、原図形との接点を求める。実際には、
X座標が最大最小となる点、Y座標が最大最小となる点
を求めることになる。ステップS3では、得られた接点
を順次結線し、第1次単純化図形を作成する。ステップ
S4では、原図形と第1次単純化図形との差分を抽出す
る。In step S2, a rectangle having sides parallel to the X and Y axes of a predetermined XY coordinate system (horizontal and vertical of the normal display screen is the XY direction), which is circumscribed with the original figure, is selected. Create and find the point of contact with the original figure. actually,
A point where the X coordinate is maximum and minimum and a point where the Y coordinate is maximum and minimum are obtained. In step S3, the obtained contact points are sequentially connected to create a first-order simplified figure. In step S4, the difference between the original graphic and the first-order simplified graphic is extracted.
【0045】ステップS5では、抽出した差分に対し
て、ステップ2と同様な単純化処理を行う。すなわち、
各差分に対して、X軸Y軸に平行な辺を有する外接矩形
を作成し、その接点を抽出する。ステップS6では、第
1次単純化図形の頂点ではない接点が得られると、それ
を追加して接点間を順次結ぶ。このようにして第2次単
純化図形を得る。この単純化処理は必要ならステップ4
に戻って複数回実行することができる。ステップS7で
は、第2次単純化ポリゴンの各辺の長さを比較し、最長
辺を基線として抽出する。In step S5, the simplification process similar to that in step 2 is performed on the extracted difference. That is,
For each difference, a circumscribing rectangle having a side parallel to the X axis and the Y axis is created, and the contact point is extracted. In step S6, when a contact which is not the vertex of the first-order simplified figure is obtained, it is added and the contacts are sequentially connected. In this way, a second-order simplified figure is obtained. Step 4 if this simplification is needed
You can go back and run it multiple times. In step S7, the lengths of the sides of the secondary simplified polygon are compared, and the longest side is extracted as the base line.
【0046】このように基線抽出処理が終わると、ステ
ップS8(図11)に進む。ステップS8では、基線を
X軸に平行になるように原図形を回転させる。ステップ
S9では、回転した原図形に対して、X軸(基線方向)
に平行な辺をもつ外接矩形を形成し、その重心を求め
る。ステップS10では、外接矩形の重心を移動させる
ことなく、外接矩形の縦横比に比例して縦横を伸縮さ
せ、原図形と同面積の等積矩形を求める。When the baseline extraction processing is completed in this way, the process proceeds to step S8 (FIG. 11). In step S8, the original figure is rotated so that the base line is parallel to the X axis. In step S9, the X-axis (baseline direction) is applied to the rotated original figure.
Form a circumscribed rectangle with sides parallel to, and find its center of gravity. In step S10, the vertical and horizontal directions are expanded and reduced in proportion to the aspect ratio of the circumscribing rectangle without moving the center of gravity of the circumscribing rectangle to obtain an equal-area rectangle having the same area as the original figure.
【0047】ステップS11では、等積矩形と回転させ
た原図形との重複率を求め、求めた重複率と所定の設定
値と比較する。重複率が設定値以上であるなら、ステッ
プS12に進み、重複率が設定値より下であるなら、ス
テップS13に進む。ステップS12では、等積矩形を
求める整形図形とする。ステップS16で、この等積矩
形を逆回転して元の位置に戻せば、求める直線化及び直
角補正がされた整形図形が得られる。In step S11, the overlap rate between the equal-area rectangle and the rotated original figure is obtained, and the obtained overlap rate is compared with a predetermined set value. If the overlap rate is equal to or higher than the set value, the process proceeds to step S12, and if the overlap rate is lower than the set value, the process proceeds to step S13. In step S12, a shaped figure for obtaining an equal area rectangle is set. In step S16, if this equal-area rectangle is reversely rotated and returned to its original position, the obtained straightened and right-angle corrected shaped figure can be obtained.
【0048】ステップS13では、ステップS11で、
等積矩形と原図形との重複率が設定値より小である場合
に、先に得た重心を基準として原図形を覆うメッシュを
作成する。ステップ14では、各メッシュについて、原
図形との重複率を計算し、所定値比較して、所定値以上
のメッシュを選択する。ステップ15では、選択したメ
ッシュを連結して整形図形とする。ステップS16で、
この整形矩形を逆回転して、元の位置に戻せば、求める
直線化及び直角補正がされた整形図形が得られる。In step S13, in step S11
When the overlapping rate of the equal-area rectangle and the original figure is smaller than the set value, a mesh covering the original figure is created with the center of gravity obtained earlier as a reference. In step 14, the overlap rate with the original figure is calculated for each mesh, and a predetermined value is compared, and a mesh having a predetermined value or more is selected. In step 15, the selected meshes are connected to form a shaped figure. In step S16,
By rotating this shaped rectangle in the reverse direction and returning it to its original position, the obtained straightened and right-angle corrected shaped figure can be obtained.
【0049】なお、このフローでは、ステップ11にお
いて、等積矩形の重複率により、異なる整形図形を得る
ようにしたが、ステップ11のような分岐判断を介する
ことなく、いずれかの整形図形のみを得るようにするこ
ともできる。最後に、図12を参照して、単純化回数す
なわち原図形を単純化する回数について説明する。一般
的には、単純化の回数は2回が適当である。単純化処理
を重ねることは、原図形の形状を回復してゆくことにな
り、目的とする原図形の単純化に逆行することになりか
ねない。また、各線分が短くなることから、基線抽出に
も影響する。In this flow, different shaped figures are obtained in step 11 depending on the overlapping rate of the equal-area rectangles. However, only one of the shaped figures can be obtained without the branch judgment as in step 11. You can also get it. Finally, the number of simplifications, that is, the number of simplifications of the original figure will be described with reference to FIG. Generally, two times of simplification is appropriate. If the simplification process is repeated, the shape of the original figure will be recovered, which may go against the simplification of the intended original figure. Further, since each line segment becomes short, it also affects the baseline extraction.
【0050】図12(a)〜(c)に、折れ曲がりの多
いガタガタした原図形Aに対して、作成された第1〜3
次単純化図形A1〜A3を重ねて示す。原図形は細線で
示し、単純化図形は太線で示す。原図形は53の頂点が
あり、各頂点の座標が与えられている。水平垂直の4辺
からなる外接矩形による第1の単純化処理を行うと、図
12(a)に示すような五角形の第1次単純化図形A1
が得られる。12 (a) to 12 (c), the first to third patterns created for the original figure A with a lot of bending are rattled.
The following simplified figures A1 to A3 are shown in an overlapping manner. The original figure is shown by a thin line, and the simplified figure is shown by a thick line. The original figure has 53 vertices, and the coordinates of each vertex are given. When the first simplification process using a circumscribing rectangle consisting of four horizontal and vertical sides is performed, a pentagonal first-order simplified figure A1 as shown in FIG.
Is obtained.
【0051】以下に、第1次単純化により抽出される座
標を記載する。頂点番号は左下の頂点をp1として、右
回りにp53までふられている。The coordinates extracted by the first-order simplification are described below. Regarding the vertex numbers, the vertex at the lower left is p1, and the numbers are shown clockwise until p53.
【0052】
なお、外接図形が矩形とならなかったのは、Y軸の最小
値を2頂点(1,43)が占めるからである。図12
(b)は第2次単純化図形A2、図12(c)は第3次
単純化図形A3を示す。本例の場合、単純化回数と単純
化図形と原図形との接点の数の対応は次のとおりであ
る。[0052] The circumscribing figure is not rectangular because the two vertices (1, 43) occupy the minimum value of the Y axis. 12
FIG. 12B shows the secondary simplified figure A2, and FIG. 12C shows the tertiary simplified figure A3. In the case of this example, the correspondence between the number of simplifications and the number of points of contact between the simplified figure and the original figure is as follows.
【0053】
本例の場合第2次単純化図形A2、原図形との接点が3
4に増えている。さらに第3次単純化図形A3では、接
点は55にも達している。この例によっても、原図形を
単純化しつつ原図形の特徴をある程度反映するようにす
るには、単純化処理は2回が適当であることが分かる。
ただし、単純化の程度が低くとも、原図形の特徴をあら
わしているほうがよい場合には、単純化処理の回数は適
宜選択できるものである。また、単純化処理を1回で済
ませる場合も考えられる。[0053] In the case of this example, the contact point between the secondary simplified figure A2 and the original figure is 3
Has increased to 4. Further, in the third simplified figure A3, the number of contact points reaches 55. This example also shows that the simplification process should be performed twice in order to simplify the original figure and to reflect the characteristics of the original figure to some extent.
However, even if the degree of simplification is low, if it is better to show the characteristics of the original figure, the number of times of simplification processing can be appropriately selected. In addition, there may be a case where the simplification process is completed once.
【0054】[0054]
【発明の効果】本発明の図形整形プログラムによれば、
原図形の直線化と直角補正とが同時に自動処理できる。
また、どのような原図形に対しても、最適な近似形状を
選択することができる。さらに、データ圧縮が可能であ
る。本発明の基線選択プログラムによれば、最適な基線
を自動的に選択抽出ができ、オペレータの基線選択を不
要にすることができる。According to the graphic shaping program of the present invention,
Automatic processing of straightening the original figure and right-angle correction can be performed simultaneously.
Further, an optimum approximate shape can be selected for any original figure. Furthermore, data compression is possible. According to the baseline selection program of the present invention, the optimal baseline can be automatically selected and extracted, and the operator's baseline selection can be eliminated.
【図面の簡単な説明】[Brief description of drawings]
【図1】本発明の実施形態の概要を示す図である。FIG. 1 is a diagram showing an outline of an embodiment of the present invention.
【図2】本発明の実施形態1の第1次単純化処理を示す
図である。FIG. 2 is a diagram showing a first-order simplification process according to the first embodiment of the present invention.
【図3】本発明の実施形態1の基線抽出処理を示す図で
ある。FIG. 3 is a diagram showing a baseline extraction process according to the first embodiment of the present invention.
【図4】本発明の実施形態1の整形図形作成処理を示す
図である。FIG. 4 is a diagram showing a shaped figure creation process according to the first embodiment of the present invention.
【図5】本発明の実施形態2の第1次単純化処理を示す
図である。FIG. 5 is a diagram showing a first-order simplification process according to the second embodiment of the present invention.
【図6】本発明の実施形態2の基線抽出処理を示す図で
ある。FIG. 6 is a diagram showing a baseline extraction process according to the second embodiment of the present invention.
【図7】本発明の実施形態2の等積矩形作成処理を示す
図である。FIG. 7 is a diagram showing an equal-area rectangle creation process according to the second embodiment of the present invention.
【図8】本発明の実施形態2のメッシュ作成処理を示す
図である。FIG. 8 is a diagram showing a mesh creating process according to the second embodiment of the present invention.
【図9】本発明の実施形態2の整形図形作成処理を示す
図である。FIG. 9 is a diagram showing a shaped figure creation process according to the second embodiment of the present invention.
【図10】本発明の実施形態の基線抽出までのフローを
示すフローチャートである。FIG. 10 is a flowchart showing a flow until base line extraction according to the embodiment of the present invention.
【図11】本発明の実施形態の基線抽出後整形図形を得
るまでのフローを示すフローチャートである。FIG. 11 is a flowchart showing a flow for obtaining a shaped figure after baseline extraction according to the embodiment of the present invention.
【図12】本発明の単純化処理の回数選択を説明する図
である。FIG. 12 is a diagram illustrating selection of the number of times of simplification processing of the present invention.
G…重心 L…基線 m…メッシュ G ... center of gravity L ... Baseline m ... mesh
───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5B046 DA02 FA04 5B050 BA02 BA07 BA17 EA06 FA15 5B057 AA13 CA12 CA17 CB12 CB17 CF05 5L096 BA12 FA18 FA59 FA60 FA77 MA03 ─────────────────────────────────────────────────── ─── Continued front page F-term (reference) 5B046 DA02 FA04 5B050 BA02 BA07 BA17 EA06 FA15 5B057 AA13 CA12 CA17 CB12 CB17 CF05 5L096 BA12 FA18 FA59 FA60 FA77 MA03
Claims (18)
プとをコンピュータに実行させる図形整形プログラムで
あって、 前記基線抽出ステップは、原図形に対して所定の座標軸
に水平な辺を有する第1の外接矩形を形成し、第1の外
接矩形と原図形との接点を順次結んで単純化図形を求
め、該単純化図形に基づいて基線を抽出するステップで
あり、 前記整形図形生成ステップは、前記基線に平行な辺を有
し原図形と等積の等積矩形を生成し、該等積矩形を整形
図形とするステップである図形整形プログラム。1. A graphic shaping program for causing a computer to execute a base line extraction step and a shaped graphic generation step, wherein the base line extraction step includes a first circumscribing line having a horizontal side to a predetermined coordinate axis with respect to the original graphic. Forming a rectangle, sequentially connecting the contact points of the first circumscribing rectangle and the original figure to obtain a simplified figure, and extracting a baseline based on the simplified figure. A shape shaping program that is a step of generating an equal-area rectangle having sides parallel to the original shape and having the same area as the original figure, and using the equal-area rectangle as a shaped figure.
記原図形に対して前記基線に平行な辺を有する第2の外
接矩形を求め、第2の外接矩形を原図形と等積の等積矩
形に変換するステップである請求項1に記載の図形整形
プログラム。2. The step of generating the equal-area rectangle obtains a second circumscribing rectangle having a side parallel to the base line with respect to the original figure, and equalizes the second circumscribing rectangle with the original figure. The graphic shaping program according to claim 1, which is a step of converting into a product rectangle.
不変で等積矩形に変換する請求項2に記載の図形整形プ
ログラム。3. The graphic shaping program according to claim 2, wherein the second circumscribed rectangle is converted into an equal-area rectangle with a constant aspect ratio and a constant center of gravity.
プとをコンピュータに実行させる図形整形プログラムで
あって、 前記基線抽出ステップは、原図形に対して所定の座標軸
に水平な辺を有する第1の外接矩形を形成し、第1の外
接矩形と原図形との接点を順次結んで単純化図形を求
め、該単純化図形に基づいて基線を抽出するステップで
あり、 前記整形図形生成ステップは、前記基線に平行な直線と
垂直な直線からなるメッシュで原図形を覆い、原図形に
対する各メッシュの重複率が所定の値以上となるメッシ
ュを選択連結して整形図形とするステップである図形整
形プログラム。4. A graphic shaping program for causing a computer to execute a base line extraction step and a shaped graphic generation step, wherein the base line extraction step is a first circumscribing line having a horizontal side with respect to an original graphic in a predetermined coordinate axis. Forming a rectangle, sequentially connecting the contact points of the first circumscribing rectangle and the original figure to obtain a simplified figure, and extracting a baseline based on the simplified figure. A shape shaping program which is a step of covering an original figure with a mesh consisting of straight lines parallel to and a straight line and selecting and connecting meshes having an overlapping ratio of each mesh with respect to the original figure or more to a predetermined value to form a shaped figure.
基準として配置する請求項4に記載の図形整形プログラ
ム。5. The graphic shaping program according to claim 4, wherein the mesh is arranged with a center of gravity of a second circumscribing rectangle as a reference.
をほぼ100分割する正方形とする請求項4又は5に記
載の図形整形プログラム。6. The graphic shaping program according to claim 4, wherein the size of the mesh is a square that divides the area of the original graphic into approximately 100 areas.
プとをコンピュータに実行させる図形整形プログラムで
あって、 前記基線抽出ステップは、原図形に対して所定の座標軸
に水平な辺を有する第1の外接矩形を形成し、第1の外
接矩形と原図形との接点を順次結んで単純化図形を求
め、該単純化図形に基づいて基線を抽出するステップで
あり、 前記整形図形生成ステップは、 前記基線に平行な辺を有し原図形と等積の等積矩形を生
成するステップと、 前記等積矩形と原図形との重複率を算出し、所定値以上
の場合には前記等積矩形を整形図形とし、前記重複率が
所定値以下の場合には、前記基線に平行な直線と直交す
る直線からなるメッシュで原図形を覆い、原図形に対す
るメッシュの重複率が所定の値以上となるメッシュを選
択連結して整形図形とするステップとを有する、図形整
形プログラム。7. A graphic shaping program for causing a computer to execute a base line extraction step and a shaped graphic generation step, wherein the base line extraction step is a first circumscribing line having a horizontal side with respect to an original graphic in a predetermined coordinate axis. Forming a rectangle, sequentially connecting the contact points of the first circumscribing rectangle and the original figure to obtain a simplified figure, and extracting a baseline based on the simplified figure. A step of generating an equal-area rectangle having sides parallel to the original figure and having an equal area to the original figure; calculating an overlap rate between the equal-area rectangle and the original figure; As a figure, when the overlap rate is less than or equal to a predetermined value, the original figure is covered with a mesh composed of a straight line parallel to the base line and a straight line orthogonal to the base line, and a mesh in which the overlap rate of the mesh with respect to the original figure is a predetermined value or more Selective connection And a step of a shaping figure Te, figure shaping program.
記原図形に対して前記基線に平行な辺を有する第2の外
接矩形を求め、第2の外接矩形を原図形と等積の等積矩
形に変換するステップである請求項7に記載の図形整形
プログラム。8. The step of generating the equal-area rectangle obtains a second circumscribed rectangle having a side parallel to the base line with respect to the original figure, and equalizes the second circumscribed rectangle with the original figure. The graphic shaping program according to claim 7, which is a step of converting into a product rectangle.
不変で等積矩形に変換する請求項8に記載の図形整形プ
ログラム。9. The graphic shaping program according to claim 8, wherein the second circumscribed rectangle is converted into an equal-area rectangle with a constant aspect ratio and a constant center of gravity.
を基準として配置する請求項7〜9のいずれか1項に記
載の図形整形プログラム。10. The graphic shaping program according to claim 7, wherein the mesh is arranged with a center of gravity of a second circumscribing rectangle as a reference.
積をほぼ100分割する正方形とする請求項7〜10の
いずれか1項に記載の図形整形プログラム。11. The graphic shaping program according to claim 7, wherein the size of the mesh is a square that divides the area of the original graphic into approximately 100 areas.
形を形成し、該外接矩形と原図形の接点を順次結んで単
純化図形を求めるステップと、 前記第1の単純化図形と前記原図形との差分をとり、各
差分に対して所定の座標軸に平行な辺を有する外接矩形
を形成し、該外接矩形と原図形の接点を第1の単純化図
形に付加して順次結んで得られる第2の単純化図形を求
めるステップと、 該単純化図形に基づいて基線を抽出するステップとを有
する請求項1〜11のいずれか1項に記載の図形整形プ
ログラム。12. The base line extracting step includes the step of forming a circumscribed rectangle having sides parallel to a predetermined coordinate axis with respect to the original figure, and successively connecting the circumscribed rectangle and the contact point of the original figure to obtain a simplified figure. , Taking a difference between the first simplified figure and the original figure, forming a circumscribed rectangle having a side parallel to a predetermined coordinate axis for each difference, and making a contact point between the circumscribed rectangle and the original figure into a first 12. The method according to claim 1, further comprising: a step of obtaining a second simplified figure obtained by sequentially connecting the simplified figures to obtain a second simplified figure; and a step of extracting a base line based on the simplified figure. Shape shaping program.
プが複数回繰り返される請求項12に記載の図形整形プ
ログラム。13. The graphic shaping program according to claim 12, wherein the step of obtaining the second simplified graphic is repeated a plurality of times.
するステップは、前記単純化図形の最長辺を基線として
抽出するステップである請求項1〜13に記載の図形整
形プログラム。14. The graphic shaping program according to claim 1, wherein the step of extracting a baseline based on the simplified graphic is a step of extracting the longest side of the simplified graphic as a baseline.
線を前記所定の座標軸に平行になるように回転するステ
ップと、 整形図形を得た後前記基線を前記回転とは逆に回転する
ステップを有する請求項1〜14のいずれか1項に記載
の図形整形プログラム。15. A step of rotating the base line so as to be parallel to the predetermined coordinate axes after the step of extracting the base line, and a step of rotating the base line in a direction opposite to the rotation after obtaining a shaped figure. The graphic shaping program according to any one of claims 1 to 14, which has.
ータに抽出させる基線抽出プログラムであって、 原図形に対して所定の座標軸に平行な辺を有する外接矩
形を形成し、該外接矩形と原図形の接点を順次結んで単
純化図形を求めるステップと、 前記単純化図形の最長辺を基線として抽出させるステッ
プとを有する基線抽出プログラム。16. A base line extraction program for causing a computer to extract a base line which is a reference for shape shaping, wherein a circumscribed rectangle having sides parallel to predetermined coordinate axes is formed with respect to the original figure, and the circumscribed rectangle and the original figure are formed. A base line extraction program including a step of sequentially connecting the points of contact to obtain a simplified figure, and a step of extracting the longest side of the simplified figure as a base line.
形を形成し、該外接矩形と原図形の接点を順次結んで第
1の単純化図形を求めるステップと、 前記第1の単純化図形と前記原図形との差分をとり、各
差分に対して所定の座標軸に水平な辺を有する外接矩形
を形成し、該外接矩形と原図形の接点を第1の単純化図
形に付加して順次結んで得られる第2の単純化図形を求
めるステップとを有する請求項16に記載の基線抽出プ
ログラム。17. The step of obtaining the simplified figure comprises forming a circumscribed rectangle having sides parallel to a predetermined coordinate axis with respect to the original figure, and connecting the circumscribed rectangle and the tangent point of the original figure sequentially to obtain a first simple figure. And a difference between the first simplified figure and the original figure is formed, and a circumscribed rectangle having a horizontal side at a predetermined coordinate axis is formed for each difference, and the circumscribed rectangle and the original figure are formed. 17. The base line extracting program according to claim 16, further comprising the step of adding a contact point of 1 to the first simplified figure to obtain a second simplified figure obtained by sequentially connecting them.
数回数繰り返される請求項17に記載の基線抽出プログ
ラム。18. The baseline extraction program according to claim 17, wherein the step of obtaining the simplified figure is repeated a plurality of times.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002076822A JP4027130B2 (en) | 2002-03-19 | 2002-03-19 | Shape shaping program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002076822A JP4027130B2 (en) | 2002-03-19 | 2002-03-19 | Shape shaping program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2003281207A true JP2003281207A (en) | 2003-10-03 |
JP2003281207A5 JP2003281207A5 (en) | 2005-09-02 |
JP4027130B2 JP4027130B2 (en) | 2007-12-26 |
Family
ID=29227835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002076822A Expired - Fee Related JP4027130B2 (en) | 2002-03-19 | 2002-03-19 | Shape shaping program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4027130B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011076178A (en) * | 2009-09-29 | 2011-04-14 | Hitachi Solutions Ltd | Geographical information generation system and geographical information generation method |
JP2012174155A (en) * | 2011-02-24 | 2012-09-10 | Mitsubishi Electric Corp | Drawing editing device and drawing editing program |
-
2002
- 2002-03-19 JP JP2002076822A patent/JP4027130B2/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011076178A (en) * | 2009-09-29 | 2011-04-14 | Hitachi Solutions Ltd | Geographical information generation system and geographical information generation method |
US8483425B2 (en) | 2009-09-29 | 2013-07-09 | Hitachi Solutions, Ltd. | Geospatial information creating system and geospatial information creating method |
JP2012174155A (en) * | 2011-02-24 | 2012-09-10 | Mitsubishi Electric Corp | Drawing editing device and drawing editing program |
Also Published As
Publication number | Publication date |
---|---|
JP4027130B2 (en) | 2007-12-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6600485B1 (en) | Polygon data generation method and image display apparatus using same | |
JP2642070B2 (en) | Method and system for generating quadrilateral mesh | |
JP3148045B2 (en) | 3D object CG creation device | |
JPH0816820A (en) | 3D animation creation device | |
US6462740B1 (en) | System for in-scene cloth modification | |
JP3353581B2 (en) | Bird's-eye view display navigation device | |
JP3471115B2 (en) | Image coordinate transformation method | |
CN118379470B (en) | Interactive three-dimensional model texture editing method and system and electronic equipment | |
JP4541537B2 (en) | Drawing device | |
JP2837584B2 (en) | How to create terrain data | |
JP2003281207A (en) | Figure shaping program | |
JP4165060B2 (en) | Graphic reduction and compilation method and apparatus, and graphic deformation apparatus and method | |
JP4760550B2 (en) | Image conversion apparatus and image conversion program | |
CN113096209B (en) | Display method of vehicle-mounted image track line | |
JPH10289262A (en) | Design generating device | |
US7831110B2 (en) | Resolution converting method | |
CN106600694A (en) | Smoothing processing method and smoothing processing device of landform data | |
JPH04107687A (en) | Topographical data preparing device | |
JP4706723B2 (en) | Method and apparatus for reducing and compiling figures | |
US6380936B1 (en) | System and method for inferring projective mappings | |
JP3490169B2 (en) | Three-dimensional animation processing system and processing method | |
JP3147391B2 (en) | Method and apparatus for setting curved surface in three-dimensional boundary fitting mesh division | |
JPH11232482A (en) | Curved face generation method in computer graphics | |
CN116912263A (en) | Automatic cropping and mapping method and system for geological and mineral maps in three-dimensional space | |
CN114581608A (en) | Three-dimensional model intelligent construction system and method based on cloud platform |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050303 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050303 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070911 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20071009 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101019 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111019 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111019 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121019 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121019 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131019 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |